Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
86
Issues
86
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Switch - Software
Commits
4f3a3245
Commit
4f3a3245
authored
May 17, 2011
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build: added wraprootfs
parent
ac1d08a8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
1 deletion
+60
-1
wrs_build_wraprootfs
build/scripts/wrs_build_wraprootfs
+59
-0
wrs_build-all
build/wrs_build-all
+1
-1
No files found.
build/scripts/wrs_build_wraprootfs
0 → 100755
View file @
4f3a3245
#!/bin/bash
# check variables, like all scripts herein do
WRS_SCRIPT_NAME
=
$(
basename
$0
)
if
[
-z
"
$WRS_BASE_DIR
"
]
;
then
echo
"
$0
: Plesae set WRS_BASE_DIR"
>
& 2
exit
1
fi
.
${
WRS_BASE_DIR
}
/scripts/wrs_functions
wrs_check_vars WRS_OUTPUT_DIR WRS_DOWNLOAD_DIR WRS_WR_REPOSITORY CROSS_COMPILE
wrs_echo
"--- Wrapping filesystem"
# This builds an initramfs thing. The cpio archive is made from
# a real directory, and we have no device table support. So let's
# extract a tar file with devices, instead.
DEVTAR
=
"
$WRS_BASE_DIR
/../userspace/devices.tar.gz"
TMPFS
=
$(
mktemp
/tmp/rootfs.XXXXXX
)
rootfs_vanilla
=
"
$WRS_OUTPUT_DIR
/build/buildroot-2009.11/output/target"
rootfs_override
=
"
$WRS_BASE_DIR
/../userspace/rootfs_override"
TMPSCRIPT
=
$(
mktemp
/tmp/rootfs-script.XXXXXX
)
ROOTFS_IMAGE
=
"
$WRS_OUTPUT_DIR
/images/ramdisk.ext2"
cat
>
$TMPSCRIPT
<<
EOF
rm -r -f
$TMPFS
mkdir -p
$TMPFS
/wr
cp -r
$rootfs_vanilla
/*
$TMPFS
cp -r
$WRS_OUTPUT_DIR
/images/wr/*
$TMPFS
/wr
cp -r
$rootfs_override
/*
$TMPFS
mkdir -p
$TMPFS
/wr/lib/modules
cp
$WRS_OUTPUT_DIR
/images/*ko
$TMPFS
/wr/lib/modules
rm -rf
$TMPFS
/dev
(cd
$TMPFS
&& tar xzf
$DEVTAR
)
(cd
$TMPFS
&& ln -s 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
(cd "
$TMPFS
" && find . | cpio -o -H newc | gzip) >
$ROOTFS_IMAGE
EOF
fakeroot bash
$X
$TMPSCRIPT
build/wrs_build-all
View file @
4f3a3245
...
...
@@ -79,7 +79,7 @@ wrs_build_step 03-kernel wrs_build_kernel
wrs_build_step 04-modules wrs_build_modules
wrs_build_step 05-ptp-noposix wrs_build_ptp_noposix
wrs_build_step 06-wrs-userspace wrs_build_userspace
#wrs_build_step wrap-rootfs wrs_build_final
rootfs
wrs_build_step 07-wrap-rootfs wrs_build_wrap
rootfs
if
$failed_step
;
then
wrs_die
"One or more build steps failed"
...
...
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