2015-11-06 09:54:59 +00:00
|
|
|
#!/bin/bash -ex
|
2016-02-05 11:08:26 -08:00
|
|
|
|
|
|
|
if [ -n "$SUBARCH" ]; then
|
|
|
|
echo "Skipping rootfs build for subarch flavor build"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2016-02-10 07:51:55 -08:00
|
|
|
. /build/config/functions
|
|
|
|
|
2016-02-22 11:31:01 +00:00
|
|
|
mkdir binary/boot/filesystem.dir
|
|
|
|
cp -a chroot/* binary/boot/filesystem.dir
|
|
|
|
|
2016-02-09 14:29:22 -08:00
|
|
|
setup_mountpoint binary/boot/filesystem.dir
|
2015-11-06 09:54:59 +00:00
|
|
|
|
|
|
|
chroot binary/boot/filesystem.dir dpkg-divert --local --rename /usr/sbin/grub-probe
|
|
|
|
chroot binary/boot/filesystem.dir touch /usr/sbin/grub-probe
|
|
|
|
chroot binary/boot/filesystem.dir chmod +x /usr/sbin/grub-probe
|
|
|
|
|
2016-02-08 16:07:17 +00:00
|
|
|
env DEBIAN_FRONTEND=noninteractive chroot binary/boot/filesystem.dir apt-get --purge remove --assume-yes '^linux-.*' 'linux-base+'
|
2015-11-06 09:54:59 +00:00
|
|
|
env DEBIAN_FRONTEND=noninteractive chroot binary/boot/filesystem.dir apt-get --purge remove --assume-yes '^grub-.*'
|
2016-01-17 01:06:56 +01:00
|
|
|
env DEBIAN_FRONTEND=noninteractive chroot binary/boot/filesystem.dir apt-get autoremove --purge --assume-yes
|
2016-02-08 10:23:14 -07:00
|
|
|
chroot binary/boot/filesystem.dir mkdir /lib/modules
|
2015-11-06 09:54:59 +00:00
|
|
|
|
|
|
|
chroot binary/boot/filesystem.dir rm /usr/sbin/grub-probe
|
|
|
|
chroot binary/boot/filesystem.dir dpkg-divert --remove --local --rename /usr/sbin/grub-probe
|
|
|
|
|
2016-02-10 08:26:36 -08:00
|
|
|
mv resolv.conf.tmp "binary/boot/filesystem.dir/etc/resolv.conf"
|
|
|
|
umount "binary/boot/filesystem.dir/proc"
|
|
|
|
umount "binary/boot/filesystem.dir/sys"
|
2016-02-10 09:29:55 -08:00
|
|
|
umount "binary/boot/filesystem.dir/dev/pts"
|
2016-02-10 08:26:36 -08:00
|
|
|
umount "binary/boot/filesystem.dir/dev"
|
2016-02-10 09:30:48 -08:00
|
|
|
umount "binary/boot/filesystem.dir/tmp"
|