diff options
author | Leah Rowe <leah@libreboot.org> | 2021-12-29 07:10:56 +0000 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2021-12-29 07:10:56 +0000 |
commit | 6b4b49cf8f66ac535a9dfd2530777fb95824240c (patch) | |
tree | bb71fc7048fb1a1d414c60a018328a514d8dfeaa /resources/scripts/build/boot | |
parent | 835ff5ec83ff8385d81eef285d38068636fe4ed0 (diff) |
build/boot/roms: substitute grub_scan_disk according to board.cfg
Diffstat (limited to 'resources/scripts/build/boot')
-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 |