Improve build script for Liveboot OS image

Adding 'root=casper toram' to '/etc/default/flash-kernel' is more
generic since /usr/share/flash-kernel/preboot.d/upstream presents
for ODROID-N2/C4.

Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: I5bf5b160409474cc1d37423f0ac15f99912f9b83
This commit is contained in:
Dongjin Kim
2022-02-15 00:44:37 +09:00
parent d8b8709070
commit 0160e6239e

View File

@@ -4,9 +4,12 @@ echo flash-kernel flash-kernel/linux_cmdline string @@LINUX_KERNEL_CMDLINE@@ |
debconf-set-selections
if [ "x@@LIVESYSTEM@@" = "xtrue" ]; then
cat>/usr/share/flash-kernel/preboot.d/upstream/99-liveboot<<__EOF
setenv bootargs "\${bootargs} boot=casper toram"
__EOF
if [ -f /etc/default/flash-kernel ]; then
. /etc/default/flash-kernel
sed -i "s/^LINUX_KERNEL_CMDLINE=.*/LINUX_KERNEL_CMDLINE=\"$LINUX_KERNEL_CMDLINE boot=casper toram\"/g" \
/etc/default/flash-kernel
fi
fi
/usr/sbin/update-initramfs -u