Imported using git-ubuntu import.
Changelog parent: 131941df22
New changelog entries:
* drop input group from snappy images, adjust md5 sums in
live-build/ubuntu-core/hooks/00-uid-gid-fix.chroot_early
* completely separate the snappy device tarball creation from the snappy
rootfs so one doesnt taint the other (which allows dropping a lot more from
the rootfs we do not need in a snappy system, like initramfs creation
tools and all its dependencies).
* drop live-build/ubuntu-core/hooks/500-move-kernel-to-device-tar.binary
* enable automated build of raspi2 device tarballs for snappy
impish
parent
131941df22
commit
3242ef6c59
@ -1,90 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# move the kernel out into a new device tarfile with system/boot
|
||||
|
||||
set -ex
|
||||
|
||||
echo "I: Moving kernel into device tarball"
|
||||
|
||||
HERE="$(pwd)"
|
||||
TMPDIR="$(mktemp -d)"
|
||||
ARCH=$(dpkg --print-architecture)
|
||||
mkdir -p $TMPDIR/system/
|
||||
mkdir -p $TMPDIR/assets/
|
||||
|
||||
# cp files, we can't simply use tar --transform as it changes the symlink target
|
||||
(
|
||||
cd binary/boot/filesystem.dir
|
||||
|
||||
cp -ar --parent lib/modules/ $TMPDIR/system/
|
||||
cp -ar --parent lib/firmware/ $TMPDIR/system/
|
||||
|
||||
# new assets handling
|
||||
if [ -f boot/vmlinu?-*.signed ]; then
|
||||
kernel=boot/vmlinu?-*.signed
|
||||
else
|
||||
kernel=boot/vmlinu?-*
|
||||
fi
|
||||
|
||||
initrd=boot/initrd.img-*
|
||||
|
||||
cp -ar $initrd $TMPDIR/assets/
|
||||
cp -ar $kernel $TMPDIR/assets/
|
||||
cp -ar boot/abi-* boot/System.map-* $TMPDIR/assets/
|
||||
|
||||
dtbs=$(find lib/firmware -type d -name 'device-tree' -print0)
|
||||
if [ -n "$dtbs" ]; then
|
||||
mv "$dtbs" $TMPDIR/assets/dtbs
|
||||
fi
|
||||
|
||||
# create hardware.yaml
|
||||
# this assumes armh == u-boot
|
||||
# and all others grub
|
||||
# common bits
|
||||
cat > $TMPDIR/hardware.yaml << EOF
|
||||
kernel: assets/$(basename $kernel)
|
||||
initrd: assets/$(basename $initrd)
|
||||
partition-layout: system-AB
|
||||
EOF
|
||||
|
||||
# arch specific ones
|
||||
if [ "$ARCH" = "armhf" ]; then
|
||||
cat >> $TMPDIR/hardware.yaml << EOF
|
||||
dtbs: assets/dtbs
|
||||
bootloader: u-boot
|
||||
EOF
|
||||
else
|
||||
cat >> $TMPDIR/hardware.yaml << EOF
|
||||
bootloader: grub
|
||||
EOF
|
||||
fi
|
||||
)
|
||||
|
||||
# and tar it up
|
||||
(
|
||||
cd $TMPDIR
|
||||
tar -c -z -f $HERE/device.tar.gz system assets hardware.yaml
|
||||
)
|
||||
|
||||
# now build the azure device tarball
|
||||
# this should go away once we have a custom grub.cfg for azure
|
||||
cp $HERE/device.tar.gz $HERE/device-azure.tar.gz
|
||||
|
||||
rm -rf $TMPDIR
|
||||
|
||||
# remove files from the root filesystem
|
||||
(cd binary/boot/filesystem.dir
|
||||
rm -f boot/vmlinu?-*
|
||||
rm -f boot/initrd.img-*
|
||||
rm -f boot/abi-*
|
||||
rm -f boot/System.map-*
|
||||
rm -f initrd.img
|
||||
rm -f vmlinu?
|
||||
rm -rf lib/modules
|
||||
rm -rf lib/firmware
|
||||
# lp: #1468469
|
||||
rm -rf boot/config-*
|
||||
rm -rf usr/share/doc/linux-image*
|
||||
rm -rf var/lib/initramfs-tools/*
|
||||
rm -rf lib/modprobe.d/blacklist_linux_*.conf
|
||||
)
|
Loading…
Reference in new issue