diff --git a/src/02_build_kernel.sh b/src/02_build_kernel.sh index 01d6896ba..8984aee41 100755 --- a/src/02_build_kernel.sh +++ b/src/02_build_kernel.sh @@ -75,8 +75,15 @@ else # Enable the EFI stub sed -i "s/.*CONFIG_EFI_STUB.*/CONFIG_EFI_STUB=y/" .config - # Explicitly enable the mixed EFI mode. - echo "CONFIG_EFI_MIXED=y" > .config + # Check if we are building 32-bit kernel. The exit code is '1' when we are + # building 64-bit kernel, otherwise the exit status is '0'. + grep -q "CONFIG_X86_32=y" .config + + # The '$?' variable holds the exit code of the last issued command. + if [ $? = 1 ] ; then + # Enable the mixed EFI mode when building 64-bit kernel. + echo "CONFIG_EFI_MIXED=y" > .config + fi fi # Compile the kernel with optimization for 'parallel jobs' = 'number of processors'. diff --git a/src/12_generate_iso.sh b/src/12_generate_iso.sh index f2d78c705..670a2c5ac 100755 --- a/src/12_generate_iso.sh +++ b/src/12_generate_iso.sh @@ -136,7 +136,7 @@ echo 'default kernel.xz initrd=rootfs.xz vga=ask' > ./syslinux.cfg mkdir -p efi/boot cat << CEOF > ./efi/boot/startup.nsh echo -off -echo "Minimal Linux Live" is starting... +echo Minimal Linux Live is starting... \\kernel.xz initrd=\\rootfs.xz CEOF