summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
Diffstat (limited to 'script')
-rwxr-xr-xscript/roms3
-rwxr-xr-xscript/trees17
2 files changed, 7 insertions, 13 deletions
diff --git a/script/roms b/script/roms
index 457a1baa..5cd8b66b 100755
--- a/script/roms
+++ b/script/roms
@@ -91,10 +91,9 @@ configure_target()
board="$1"
targetdir="$cfgsdir/$board"
- [ -f "$targetdir/target.cfg" ] || $err "$board: target.cfg missing"
# Override the above defaults using target.cfg
- . "$targetdir/target.cfg"
+ eval `setcfg "$targetdir/target.cfg"`
[ -z "$grub_scan_disk" ] && grub_scan_disk="nvme ahci ata"
diff --git a/script/trees b/script/trees
index b2b1e561..6a3c1ebd 100755
--- a/script/trees
+++ b/script/trees
@@ -35,7 +35,7 @@ main()
[ -z "$_f" ] && $err "missing flag (-m/-u/-b/-c/-x/-f/-s/-l/-n)"
[ -z "$project" ] && $err "project name not specified"
- [ -f "config/git/$project" ] || $err "project '$project' not defined"
+ [ -f "config/git/$project/pkg.cfg" ] || $err "'$project' not defined"
elfdir="elf/$project"
datadir="config/data/$project"
@@ -154,9 +154,7 @@ load_project_config()
{
eval "$(setvars "" xarch xlang tree bootstrapargs autoconfargs xtree \
tree_depend makeargs)"
-
- [ -f "$1/target.cfg" ] || return 0
- . "$1/target.cfg" || $err "loadp $1: can't load target.cfg"; return 0
+ eval `setcfg "$1/target.cfg" 0`; return 0
}
check_cross_compiler()
@@ -274,15 +272,12 @@ check_makefile()
mkpayload_grub()
{
- [ -f "$grubdata/module/$tree" ] || $err "$tree: grub modules missing"
- x_ rm -f "$cdir/grub.elf"
-
eval "$(setvars "" grub_modules grub_install_modules)"
-
- . "$grubdata/module/$tree" || $err "$tree: !source grub modules"
-
+ eval `setcfg "$grubdata/module/$tree"`
chkvars "grub_install_modules" "grub_modules"
+ x_ rm -f "$cdir/grub.elf"
+
"${cdir}/grub-mkstandalone" --grub-mkimage="${cdir}/grub-mkimage" \
-O i386-coreboot -o "${cdir}/grub.elf" -d "${cdir}/grub-core/" \
--fonts= --themes= --locales= --modules="$grub_modules" \
@@ -290,7 +285,7 @@ mkpayload_grub()
"/boot/grub/grub_default.cfg=${cdir}/.config" \
"/boot/grub/grub.cfg=$grubdata/memdisk.cfg" \
"/background.png=$grubdata/background/background1280x800.png" || \
- $err "$tree: cannot build grub.elf"
+ $err "$tree: cannot build grub.elf"; return 0
}
copy_elf()