mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-05-08 09:21:53 +00:00
* Add support for raspi3 rootfs builds (based on Ryan Finnie).
* For ubuntu-image consumption, export the kernel and initrd to image/boot/uboot for raspi*.
This commit is contained in:
commit
41b4130759
3
debian/changelog
vendored
3
debian/changelog
vendored
@ -2,6 +2,9 @@ livecd-rootfs (2.543) UNRELEASED; urgency=medium
|
|||||||
|
|
||||||
* Avoid issues of hard-linking to a symbolic vmlinuz as this can lead to a
|
* Avoid issues of hard-linking to a symbolic vmlinuz as this can lead to a
|
||||||
dangling symlink.
|
dangling symlink.
|
||||||
|
* Add support for raspi3 rootfs builds (based on Ryan Finnie).
|
||||||
|
* For ubuntu-image consumption, export the kernel and initrd to
|
||||||
|
image/boot/uboot for raspi*.
|
||||||
|
|
||||||
-- Łukasz 'sil2100' Zemczak <lukasz.zemczak@ubuntu.com> Tue, 18 Sep 2018 10:21:30 +0200
|
-- Łukasz 'sil2100' Zemczak <lukasz.zemczak@ubuntu.com> Tue, 18 Sep 2018 10:21:30 +0200
|
||||||
|
|
||||||
|
@ -572,7 +572,7 @@ case $PROJECT:${SUBPROJECT:-} in
|
|||||||
if [ "$PROJECT:$SUBPROJECT" = "ubuntu-core:system-image" ]; then
|
if [ "$PROJECT:$SUBPROJECT" = "ubuntu-core:system-image" ]; then
|
||||||
case $ARCH in
|
case $ARCH in
|
||||||
armhf)
|
armhf)
|
||||||
subarches="generic raspi2"
|
subarches="generic raspi2 raspi3"
|
||||||
;;
|
;;
|
||||||
arm64)
|
arm64)
|
||||||
subarches="generic dragonboard"
|
subarches="generic dragonboard"
|
||||||
@ -610,6 +610,8 @@ case $PROJECT:${SUBPROJECT:-} in
|
|||||||
armhf)
|
armhf)
|
||||||
if [ "$devarch" = "raspi2" ]; then
|
if [ "$devarch" = "raspi2" ]; then
|
||||||
linux_package="linux-image-raspi2"
|
linux_package="linux-image-raspi2"
|
||||||
|
elif [ "$devarch" = "raspi3" ]; then
|
||||||
|
linux_package="linux-image-raspi2"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
ppc64el|s390x)
|
ppc64el|s390x)
|
||||||
@ -677,7 +679,7 @@ case $PROJECT:${SUBPROJECT:-} in
|
|||||||
if [ -n "$dtbs" ]; then
|
if [ -n "$dtbs" ]; then
|
||||||
mv "$dtbs" $TMPDIR/assets/dtbs
|
mv "$dtbs" $TMPDIR/assets/dtbs
|
||||||
case $devarch in
|
case $devarch in
|
||||||
raspi2)
|
raspi2|raspi3)
|
||||||
# ubuntu-device-flash does not like subdirs here, we need to tar it up
|
# ubuntu-device-flash does not like subdirs here, we need to tar it up
|
||||||
if [ -e $TMPDIR/assets/dtbs/overlays ]; then
|
if [ -e $TMPDIR/assets/dtbs/overlays ]; then
|
||||||
tar -C $TMPDIR/assets/dtbs -f $TMPDIR/assets/dtbs/overlays.tgz -czv overlays
|
tar -C $TMPDIR/assets/dtbs -f $TMPDIR/assets/dtbs/overlays.tgz -czv overlays
|
||||||
@ -724,6 +726,9 @@ EOF
|
|||||||
if [ "$devarch" = "raspi2" ];then
|
if [ "$devarch" = "raspi2" ];then
|
||||||
tarname="raspi2.$tarname"
|
tarname="raspi2.$tarname"
|
||||||
manifestname="$devarch.$manifestname"
|
manifestname="$devarch.$manifestname"
|
||||||
|
elif [ "$devarch" = "raspi3" ];then
|
||||||
|
tarname="raspi3.$tarname"
|
||||||
|
manifestname="$devarch.$manifestname"
|
||||||
elif [ "$devarch" = "dragonboard" ];then
|
elif [ "$devarch" = "dragonboard" ];then
|
||||||
tarname="$devarch.$tarname"
|
tarname="$devarch.$tarname"
|
||||||
manifestname="$devarch.$manifestname"
|
manifestname="$devarch.$manifestname"
|
||||||
@ -753,6 +758,9 @@ EOF
|
|||||||
if [ "$devarch" = "raspi2" ];then
|
if [ "$devarch" = "raspi2" ];then
|
||||||
metaname=canonical-pi2-linux
|
metaname=canonical-pi2-linux
|
||||||
snapname="$devarch.kernel.snap"
|
snapname="$devarch.kernel.snap"
|
||||||
|
elif [ "$devarch" = "raspi3" ];then
|
||||||
|
metaname=canonical-pi3-linux
|
||||||
|
snapname="$devarch.kernel.snap"
|
||||||
elif [ "$devarch" = "generic" ] && [ "$ARCH" = "armhf" ];then
|
elif [ "$devarch" = "generic" ] && [ "$ARCH" = "armhf" ];then
|
||||||
metaname=canonical-bbb-linux
|
metaname=canonical-bbb-linux
|
||||||
elif [ "$devarch" = "dragonboard" ] && [ "$ARCH" = "arm64" ];then
|
elif [ "$devarch" = "dragonboard" ] && [ "$ARCH" = "arm64" ];then
|
||||||
@ -862,36 +870,46 @@ if [ "$NUMFLAVOURS" = 1 ] && [ "$LB_LINUX_FLAVOURS" != "none" ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$SUBARCH" = "ac100" ]; then
|
case $SUBARCH in
|
||||||
# create the md5sum and size files for which we are actually doing all this
|
ac100)
|
||||||
md5sum $PREFIX.rootfs.tar.gz >chroot/installer.md5
|
# create the md5sum and size files for which we are actually doing all this
|
||||||
wc -c $PREFIX.rootfs.tar.gz >chroot/installer.size
|
md5sum $PREFIX.rootfs.tar.gz >chroot/installer.md5
|
||||||
|
wc -c $PREFIX.rootfs.tar.gz >chroot/installer.size
|
||||||
|
|
||||||
|
INFO_DESC="$(lsb_release -d -s)"
|
||||||
|
INFO_STAMP=$(date +20%y%m%d-%H:%M)
|
||||||
|
|
||||||
|
echo "$INFO_DESC - $ARCH ($INFO_STAMP)" >chroot/media-info
|
||||||
|
|
||||||
|
# make sure update-initramfs feels cosy and warm in the environment
|
||||||
|
lb chroot_proc install "$@"
|
||||||
|
lb chroot_sysfs install "$@"
|
||||||
|
lb chroot_devpts install "$@"
|
||||||
|
|
||||||
|
# re-create initrd to contain the installer.md5 file
|
||||||
|
Chroot chroot "env FLASH_KERNEL_SKIP=1 update-initramfs -k all -t -u -v"
|
||||||
|
|
||||||
|
# create boot.img
|
||||||
|
Chroot chroot "abootimg --create /boot/installer-${KVERS}.img -f /boot/bootimg.cfg-$SUBARCH -r /boot/initrd.img-${KVERS} -k /boot/vmlinuz-${KVERS}"
|
||||||
|
|
||||||
|
# clean up
|
||||||
|
lb chroot_devpts remove "$@"
|
||||||
|
lb chroot_sysfs remove "$@"
|
||||||
|
lb chroot_proc remove "$@"
|
||||||
|
|
||||||
|
cp "chroot/boot/installer-${KVERS}.img" "$PREFIX.bootimg-$FLAVOUR"
|
||||||
|
ln -sf "$PREFIX.bootimg-$FLAVOUR" "$PREFIX.bootimg"
|
||||||
|
;;
|
||||||
|
|
||||||
INFO_DESC="$(lsb_release -d -s)"
|
raspi2|raspi3)
|
||||||
INFO_STAMP=$(date +20%y%m%d-%H:%M)
|
UBOOT_BOOT="image/boot/uboot"
|
||||||
|
|
||||||
echo "$INFO_DESC - $ARCH ($INFO_STAMP)" >chroot/media-info
|
mkdir -p $UBOOT_BOOT
|
||||||
|
|
||||||
# make sure update-initramfs feels cosy and warm in the environment
|
cp $PREFIX.initrd $UBOOT_BOOT/initrd.img || true
|
||||||
lb chroot_proc install "$@"
|
cp $PREFIX.kernel $UBOOT_BOOT/vmlinuz || true
|
||||||
lb chroot_sysfs install "$@"
|
;;
|
||||||
lb chroot_devpts install "$@"
|
esac
|
||||||
|
|
||||||
# re-create initrd to contain the installer.md5 file
|
|
||||||
Chroot chroot "env FLASH_KERNEL_SKIP=1 update-initramfs -k all -t -u -v"
|
|
||||||
|
|
||||||
# create boot.img
|
|
||||||
Chroot chroot "abootimg --create /boot/installer-${KVERS}.img -f /boot/bootimg.cfg-$SUBARCH -r /boot/initrd.img-${KVERS} -k /boot/vmlinuz-${KVERS}"
|
|
||||||
|
|
||||||
# clean up
|
|
||||||
lb chroot_devpts remove "$@"
|
|
||||||
lb chroot_sysfs remove "$@"
|
|
||||||
lb chroot_proc remove "$@"
|
|
||||||
|
|
||||||
cp "chroot/boot/installer-${KVERS}.img" "$PREFIX.bootimg-$FLAVOUR"
|
|
||||||
ln -sf "$PREFIX.bootimg-$FLAVOUR" "$PREFIX.bootimg"
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$PROJECT" = "ubuntu-touch" ] || [ "$PROJECT" = "ubuntu-touch-custom" ]; then
|
if [ "$PROJECT" = "ubuntu-touch" ] || [ "$PROJECT" = "ubuntu-touch-custom" ]; then
|
||||||
sourceslist="chroot/etc/apt/sources.list"
|
sourceslist="chroot/etc/apt/sources.list"
|
||||||
|
@ -805,6 +805,12 @@ case $ARCH in
|
|||||||
add_package install linux-firmware-raspi2 u-boot-rpi flash-kernel u-boot-tools
|
add_package install linux-firmware-raspi2 u-boot-rpi flash-kernel u-boot-tools
|
||||||
BINARY_REMOVE_LINUX=false
|
BINARY_REMOVE_LINUX=false
|
||||||
;;
|
;;
|
||||||
|
raspi3)
|
||||||
|
COMPONENTS='main restricted universe multiverse'
|
||||||
|
KERNEL_FLAVOURS=raspi2
|
||||||
|
add_package install linux-firmware-raspi2 u-boot-rpi flash-kernel u-boot-tools
|
||||||
|
BINARY_REMOVE_LINUX=false
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
Loading…
x
Reference in New Issue
Block a user