roms: allow user override of grub_scan_disk
this effectively lets you change the boot order. example: ./build roms -s "nvme ata" t1650_12mb the above example would set: grub_scan_disk="nvme ata" another example: ./build roms -s nvme t1650_12mb this would set: grub_scan_disk="nvme" this overrides what's set in target.cfg for the given target. useful for quick reconfiguration if building from source Signed-off-by: Leah Rowe <leah@libreboot.org>20240612_branch
parent
b00800a7cc
commit
a4bd49ded6
|
@ -26,7 +26,7 @@ v="romdir cbrom initmode displaymode cbcfg targetdir tree keymaps release"
|
||||||
v="$v grub_timeout ubdir board grub_scan_disk uboot_config"
|
v="$v grub_timeout ubdir board grub_scan_disk uboot_config"
|
||||||
eval "$(setvars "n" $pv serprog)"
|
eval "$(setvars "n" $pv serprog)"
|
||||||
eval "$(setvars "" $v boards _displaymode _payload _keyboard all targets \
|
eval "$(setvars "" $v boards _displaymode _payload _keyboard all targets \
|
||||||
serprog_boards_dir)"
|
serprog_boards_dir _scandisk)"
|
||||||
|
|
||||||
main()
|
main()
|
||||||
{
|
{
|
||||||
|
@ -37,6 +37,7 @@ main()
|
||||||
-d) _displaymode="$2" ;;
|
-d) _displaymode="$2" ;;
|
||||||
-p) _payload="$2" ;;
|
-p) _payload="$2" ;;
|
||||||
-k) _keyboard="$2" ;;
|
-k) _keyboard="$2" ;;
|
||||||
|
-s) _scandisk="$2" ;;
|
||||||
*)
|
*)
|
||||||
[ "$1" = "all" ] && all="y"
|
[ "$1" = "all" ] && all="y"
|
||||||
boards="$1 $boards"
|
boards="$1 $boards"
|
||||||
|
@ -150,6 +151,7 @@ configure_target()
|
||||||
# Override the above defaults using target.cfg
|
# Override the above defaults using target.cfg
|
||||||
. "$targetdir/target.cfg"
|
. "$targetdir/target.cfg"
|
||||||
|
|
||||||
|
[ -n "$_scandisk" ] && grub_scan_disk="$_scandisk"
|
||||||
[ -z "$grub_scan_disk" ] && grub_scan_disk="nvme ahci ata"
|
[ -z "$grub_scan_disk" ] && grub_scan_disk="nvme ahci ata"
|
||||||
_ata=""
|
_ata=""
|
||||||
_ahci=""
|
_ahci=""
|
||||||
|
|
Loading…
Reference in New Issue