rootfsinstall.sh: baytrail: parametrize kernel version, run depmod and mkinitrd

This commit is contained in:
Silvan Calarco 2017-03-07 13:36:43 +01:00
parent 31e7177127
commit f573175805

View File

@ -163,7 +163,8 @@ case $TARGETDEVICE in
BOOTFSTYPE=fat16 BOOTFSTYPE=fat16
BOOTFSSIZE=22M BOOTFSSIZE=22M
BOOTFSSTART=1049k BOOTFSSTART=1049k
KERNELDEST="@BOOT@/kernel.img" KERNELVER="4.9.9-baytrail"
KERNELDEST="@BOOT@/vmlinuz-$KERNELVER"
INSTALLPACKAGES="kernel-baytrail kernel-baytrail-headers \ INSTALLPACKAGES="kernel-baytrail kernel-baytrail-headers \
chipone_ts grub-efi rtl8723bs_bt rtl8723bs axpd $INSTALLPACKAGES" chipone_ts grub-efi rtl8723bs_bt rtl8723bs axpd $INSTALLPACKAGES"
REMOVEPACKAGES="kernel-mamba-x86_64" REMOVEPACKAGES="kernel-mamba-x86_64"
@ -394,6 +395,11 @@ if [ "$TARGETDEVICE" = "baytrail" ]; then
errorAndExit $"Error: unable to create GRUB x86_64-efi image" &>>$LOGFILE 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 cat >> $BOOTMP/EFI/BOOT/grub.cfg << _EOF
# #
# GRUB configuration generated by openmamba rootfsinstall tool # GRUB configuration generated by openmamba rootfsinstall tool
@ -411,17 +417,17 @@ set timeout=0
insmod=png insmod=png
set menu_color_normal=white/black set menu_color_normal=white/black
set menu_color_highlight=white/green 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 # Boot entries taken from ISO bootloader
# #
menuentry "4.9.9-baytrail" { menuentry "4.9.9-baytrail" {
echo "Loading /boot/vmlinuz-4.9.9-baytrail" echo "Loading /boot/$KERNELDEST"
linux /boot/vmlinuz-4.9.9-baytrail root=/dev/sda2 ro intel_idle.max_cstate=1 intel_pstate=disabled fbcon=rotate:1 quiet splash linux /boot/$KERNELDEST 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" echo "Loading /boot/$INITRAMFSDEST"
initrd /boot/initramfs-4.9.9-baytrail.img initrd /boot/$INITRAMFSDEST
} }
_EOF _EOF