From f57317580562c876c83440dd5e63c6f5fd8c5b98 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Tue, 7 Mar 2017 13:36:43 +0100 Subject: [PATCH] rootfsinstall.sh: baytrail: parametrize kernel version, run depmod and mkinitrd --- src/rootfsinstall.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/rootfsinstall.sh b/src/rootfsinstall.sh index e3f3f63..6faa988 100755 --- a/src/rootfsinstall.sh +++ b/src/rootfsinstall.sh @@ -163,7 +163,8 @@ case $TARGETDEVICE in BOOTFSTYPE=fat16 BOOTFSSIZE=22M BOOTFSSTART=1049k - KERNELDEST="@BOOT@/kernel.img" + KERNELVER="4.9.9-baytrail" + KERNELDEST="@BOOT@/vmlinuz-$KERNELVER" INSTALLPACKAGES="kernel-baytrail kernel-baytrail-headers \ chipone_ts grub-efi rtl8723bs_bt rtl8723bs axpd $INSTALLPACKAGES" REMOVEPACKAGES="kernel-mamba-x86_64" @@ -394,6 +395,11 @@ if [ "$TARGETDEVICE" = "baytrail" ]; then errorAndExit $"Error: unable to create GRUB x86_64-efi image" &>>$LOGFILE } + KERNELDEST="vmlinuz-$KERNELVER" + INITRAMFSDEST="initramfs-$KERNELVER.img" + chroot $ROOTMP depmod $KERNELVER + chroot $ROOTMP mkinitrd /boot/$INITRAMFSDEST $KERNELVER || exit 1 + cat >> $BOOTMP/EFI/BOOT/grub.cfg << _EOF # # GRUB configuration generated by openmamba rootfsinstall tool @@ -411,17 +417,17 @@ set timeout=0 insmod=png set menu_color_normal=white/black set menu_color_highlight=white/green -search --no-floppy --label --set=root openmamba +search --no-floppy --label --set=root $VOLUME_LABEL # # Boot entries taken from ISO bootloader # menuentry "4.9.9-baytrail" { -echo "Loading /boot/vmlinuz-4.9.9-baytrail" -linux /boot/vmlinuz-4.9.9-baytrail root=/dev/sda2 ro intel_idle.max_cstate=1 intel_pstate=disabled fbcon=rotate:1 quiet splash -echo "Loading /boot/initramfs-4.9.9-baitrail.img" -initrd /boot/initramfs-4.9.9-baytrail.img +echo "Loading /boot/$KERNELDEST" +linux /boot/$KERNELDEST root=/dev/sda2 ro intel_idle.max_cstate=1 intel_pstate=disabled fbcon=rotate:1 quiet splash +echo "Loading /boot/$INITRAMFSDEST" +initrd /boot/$INITRAMFSDEST } _EOF