mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-03-13 04:11:11 +00:00
- build device tarball with system/ prefix - include /vmlinz, /initrd.img into device tarball - include /boot/abi-* /boot/System.map-*
38 lines
1012 B
Bash
38 lines
1012 B
Bash
#!/bin/sh
|
|
#
|
|
# move the kernel out into a new device tarfile with system/boot
|
|
|
|
set -e
|
|
|
|
echo "I: Moving kernel into device tarball"
|
|
|
|
HERE="$(pwd)"
|
|
TMPDIR="$(mktemp -d)"
|
|
mkdir -p $TMPDIR/system/
|
|
|
|
# cp files, we can't simply use tar --transform as it changes the symlink target
|
|
(
|
|
cd binary/boot/filesystem.dir
|
|
cp -ar --parent boot/vmlinu?-* boot/initrd.img-* boot/abi-* boot/System.map-* $TMPDIR/system/
|
|
cp -ar --parent lib/modules/ $TMPDIR/system/
|
|
if [ -e vmlinu? ] && [ -e initrd.img ]; then
|
|
cp -ar --parent vmlinu? initrd.img $TMPDIR/system
|
|
fi
|
|
)
|
|
|
|
# and tar it up
|
|
(
|
|
cd $TMPDIR
|
|
tar -c -z -f $HERE/device.tar.gz system
|
|
)
|
|
rm -rf $TMPDIR
|
|
|
|
# remove files from the root filesystem
|
|
rm -f binary/boot/filesystem.dir/boot/vmlinu?-*
|
|
rm -f binary/boot/filesystem.dir/boot/initrd.img-*
|
|
rm -f binary/boot/filesystem.dir/boot/abi-*
|
|
rm -f binary/boot/filesystem.dir/boot/System.map-*
|
|
rm -f binary/boot/filesystem.dir/initrd.img
|
|
rm -f binary/boot/filesystem.dir/vmlinu?
|
|
rm -rf binary/boot/filesystem.dir/lib/modules
|