diff options
Diffstat (limited to 'resources/scripts/build')
-rwxr-xr-x | resources/scripts/build/boot/roms_helper | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/resources/scripts/build/boot/roms_helper b/resources/scripts/build/boot/roms_helper index 2d8dce78..99713b8a 100755 --- a/resources/scripts/build/boot/roms_helper +++ b/resources/scripts/build/boot/roms_helper @@ -335,14 +335,22 @@ make_grubrom_from_keymap() { cp "${target_cbrom}" "${tmprom}" "${cbfstool_path}" "${tmprom}" add-payload -f "${grubelf}" -n ${target_grubelf_cbfs_path} -c lzma + + tmpgrubcfg=$(mktemp -t grub.cfg.XXXXXXXXXX) + tmpgrubtestcfg=$(mktemp -t grubtest.cfg.XXXXXXXXXX) if [ "${grub_scan_disk}" = "ahci" ]; then - sed 's/search_grub ata//' "${grubcfg}" > "${grubcfg}" + sed 's/set\ grub_scan_disk=\"both\"/set\ grub_scan_disk=\"ahci\"/' "${grubcfg}" > "${tmpgrubcfg}" + sed 's/set\ grub_scan_disk=\"both\"/set\ grub_scan_disk=\"ahci\"/' "${grubtestcfg}" > "${tmpgrubtestcfg}" elif [ "${grub_scan_disk}" = "ata" ]; then - sed 's/search_grub ahci//' "${grubcfg}" > "${grubcfg}" + sed 's/set\ grub_scan_disk=\"both\"/set\ grub_scan_disk=\"ata\"/' "${grubcfg}" > "${tmpgrubcfg}" + sed 's/set\ grub_scan_disk=\"both\"/set\ grub_scan_disk=\"ata\"/' "${grubtestcfg}" > "${tmpgrubtestcfg}" + else + cp "${grubcfg}" "${tmpgrubcfg}" + cp "${grubtestcfg}" "${tmpgrubtestcfg}" fi - - "${cbfstool_path}" "${tmprom}" add -f "${grubcfg}" -n grub.cfg -t raw - "${cbfstool_path}" "${tmprom}" add -f "${grubtestcfg}" -n grubtest.cfg -t raw + "${cbfstool_path}" "${tmprom}" add -f "${tmpgrubcfg}" -n grub.cfg -t raw + "${cbfstool_path}" "${tmprom}" add -f "${tmpgrubtestcfg}" -n grubtest.cfg -t raw + rm -f "${tmpgrubcfg}" "${tmpgrubcfgtest}" backgroundfile="background1280x800.png" if [ "${board}" = "x60" ] || [ "${board}" = "t60_intelgpu" ]; then |