build/boot/roms: substitute grub_scan_disk according to board.cfg
parent
835ff5ec83
commit
6b4b49cf8f
|
@ -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
|
||||
if [ "${grub_scan_disk}" = "ahci" ]; then
|
||||
sed 's/search_grub ata//' "${grubcfg}" > "${grubcfg}"
|
||||
elif [ "${grub_scan_disk}" = "ata" ]; then
|
||||
sed 's/search_grub ahci//' "${grubcfg}" > "${grubcfg}"
|
||||
fi
|
||||
|
||||
"${cbfstool_path}" "${tmprom}" add -f "${grubcfg}" -n grub.cfg -t raw
|
||||
"${cbfstool_path}" "${tmprom}" add -f "${grubtestcfg}" -n grubtest.cfg -t raw
|
||||
tmpgrubcfg=$(mktemp -t grub.cfg.XXXXXXXXXX)
|
||||
tmpgrubtestcfg=$(mktemp -t grubtest.cfg.XXXXXXXXXX)
|
||||
if [ "${grub_scan_disk}" = "ahci" ]; then
|
||||
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/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 "${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
|
||||
|
|
Loading…
Reference in New Issue