Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Testing
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Switch - Testing
Commits
b49fb8eb
Commit
b49fb8eb
authored
Jul 17, 2012
by
Benoit Rat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
apts: Correct a bug in install scripts when we want to use only TFTP instalation
parent
da6c9536
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
53 deletions
+56
-53
install.sh
sw/install.sh
+56
-53
No files found.
sw/install.sh
View file @
b49fb8eb
...
...
@@ -12,8 +12,6 @@ check_vars () {
fi
}
check_vars WRS_BASE_DIR WRS_OUTPUT_DIR
SCRIPTDIR
=
$(
dirname
$0
)
NFSROOT
=
$1
...
...
@@ -22,65 +20,70 @@ if [ -d ${NFSROOT} ]; then
echo
"--- Installing in
${
NFSROOT
}
"
mkdir
-p
${
NFSROOT
}
/alpha-pts/
rm
${
NFSROOT
}
/alpha-pts/
*
.sh
rm
${
NFSROOT
}
/alpha-pts/bin/
*
cp
${
SCRIPTDIR
}
/alpha-pts/
*
.sh
${
NFSROOT
}
/alpha-pts/
cp
${
SCRIPTDIR
}
/alpha-pts/bin/
*
${
NFSROOT
}
/alpha-pts/bin/
rm
${
NFSROOT
}
/alpha-pts/
*
.sh &> /dev/null
rm
${
NFSROOT
}
/alpha-pts/bin/
*
&> /dev/null
cp
-Rvf
${
SCRIPTDIR
}
/alpha-pts/
${
NFSROOT
}
/
exit
0
fi
echo
"--- Wrapping test filesystem"
DEVTAR
=
"
$WRS_BASE_DIR
/../userspace/devices.tar.gz"
rootfs_vanilla
=
"
$WRS_OUTPUT_DIR
/build/buildroot-2011.11/output/target"
rootfs_override
=
"
$WRS_BASE_DIR
/../userspace/rootfs_override"
ROOTFS_IMAGE_CPIO
=
"
$WRS_OUTPUT_DIR
/images/wrs-image_test.cpio.gz"
ROOTFS_IMAGE_TGZ
=
"
$WRS_OUTPUT_DIR
/images/wrs-image_test.tar.gz"
ROOTFS_IMAGE_JFFS2
=
"
$WRS_OUTPUT_DIR
/images/wrs-image_test.jffs2"
TMPFS
=
$(
mktemp
-d
/tmp/rootfs.XXXXXX
)
TMPSCRIPT
=
$(
mktemp
/tmp/rootfs-script.XXXXXX
)
cat
>
$TMPSCRIPT
<<
EOF
mkdir -p
$TMPFS
/wr
else
check_vars WRS_BASE_DIR WRS_OUTPUT_DIR
echo
"--- Wrapping test filesystem"
DEVTAR
=
"
$WRS_BASE_DIR
/../userspace/devices.tar.gz"
rootfs_vanilla
=
"
$WRS_OUTPUT_DIR
/build/buildroot-2011.11/output/target"
rootfs_override
=
"
$WRS_BASE_DIR
/../userspace/rootfs_override"
ROOTFS_IMAGE_CPIO
=
"
$WRS_OUTPUT_DIR
/images/wrs-image_test.cpio.gz"
ROOTFS_IMAGE_TGZ
=
"
$WRS_OUTPUT_DIR
/images/wrs-image_test.tar.gz"
ROOTFS_IMAGE_JFFS2
=
"
$WRS_OUTPUT_DIR
/images/wrs-image_test.jffs2"
TMPFS
=
$(
mktemp
-d
/tmp/rootfs.XXXXXX
)
TMPSCRIPT
=
$(
mktemp
/tmp/rootfs-script.XXXXXX
)
cat
>
$TMPSCRIPT
<<
EOF
mkdir -p
$TMPFS
/wr
cp -r
$rootfs_vanilla
/*
$TMPFS
cp -r
$WRS_OUTPUT_DIR
/images/wr/*
$TMPFS
/wr
cp -r
$WRS_OUTPUT_DIR
/images/lib/*
$TMPFS
/lib
rm -f
$TMPFS
/etc/init.d/*
cp -r
$rootfs_override
/*
$TMPFS
rm -rf
$TMPFS
/dev
(cd
$TMPFS
&& tar xzf
$DEVTAR
)
(cd
$TMPFS
&& ln -fs sbin/init .)
mkdir -p
$TMPFS
/root/.ssh
cat
$HOME
/.ssh/id_?sa.pub >>
$TMPFS
/root/.ssh/authorized_keys
if [ -f
$WRS_BASE_DIR
/authorized_keys ]; then
cat
$WRS_BASE_DIR
/authorized_keys >>
$TMPFS
/root/.ssh/authorized_keys
fi
chmod 600
$TMPFS
/root/.ssh/authorized_keys
chmod g-w
$TMPFS
/root
$TMPFS
/root/.ssh
chown -R root:root
$TMPFS
/root
chown -R root:root
$TMPFS
/etc/dropbear
##Test Anchor
cp -r
$(
dirname
$0
)
/alpha-pts/
$TMPFS
/alpha-pts
cp -r
$(
dirname
$0
)
/S59apts
$TMPFS
/etc/init.d/
(cd "
$TMPFS
" && find . | cpio -o -H newc | gzip) >
$ROOTFS_IMAGE_CPIO
(cd "
$TMPFS
" && tar cz .>
$ROOTFS_IMAGE_TGZ
)
/usr/sbin/mkfs.jffs2 --little-endian --eraseblock=0x20000 -n --pad -d
$TMPFS
-o
$ROOTFS_IMAGE_JFFS2
.img
EOF
cp -r
$rootfs_vanilla
/*
$TMPFS
cp -r
$WRS_OUTPUT_DIR
/images/wr/*
$TMPFS
/wr
cp -r
$WRS_OUTPUT_DIR
/images/lib/*
$TMPFS
/lib
rm -f
$TMPFS
/etc/init.d/*
cp -r
$rootfs_override
/*
$TMPFS
rm -rf
$TMPFS
/dev
(cd
$TMPFS
&& tar xzf
$DEVTAR
)
(cd
$TMPFS
&& ln -fs sbin/init .)
fakeroot bash
$X
$TMPSCRIPT
mkdir -p
$TMPFS
/root/.ssh
cat
$HOME
/.ssh/id_?sa.pub >>
$TMPFS
/root/.ssh/authorized_keys
if [ -f
$WRS_BASE_DIR
/authorized_keys ]; then
cat
$WRS_BASE_DIR
/authorized_keys >>
$TMPFS
/root/.ssh/authorized_keys
fi
chmod 600
$TMPFS
/root/.ssh/authorized_keys
chmod g-w
$TMPFS
/root
$TMPFS
/root/.ssh
chown -R root:root
$TMPFS
/root
chown -R root:root
$TMPFS
/etc/dropbear
rm
-rf
$TMPFS
rm
-rf
$TMPSCRIPT
##Test Anchor
cp -r
$(
dirname
$0
)
/alpha-pts/
$TMPFS
/alpha-pts
cp -r
$(
dirname
$0
)
/S59apts
$TMPFS
/etc/init.d/
fi
(cd "
$TMPFS
" && find . | cpio -o -H newc | gzip) >
$ROOTFS_IMAGE_CPIO
(cd "
$TMPFS
" && tar cz .>
$ROOTFS_IMAGE_TGZ
)
/usr/sbin/mkfs.jffs2 --little-endian --eraseblock=0x20000 -n --pad -d
$TMPFS
-o
$ROOTFS_IMAGE_JFFS2
.img
EOF
fakeroot bash
$X
$TMPSCRIPT
rm
-rf
$TMPFS
rm
-rf
$TMPSCRIPT
echo
"------------------------------------"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment