summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscript/roms37
1 files changed, 15 insertions, 22 deletions
diff --git a/script/roms b/script/roms
index 4cf36e38..865c4909 100755
--- a/script/roms
+++ b/script/roms
@@ -41,7 +41,7 @@ main()
$err "Cannot generate list of boards for building"
for x in $boards; do
[ -d "config/coreboot/$x/config" ] && configure_target "$x" \
- && build_payloads && build_board && [ -d "bin/$board" ] \
+ && build_board && [ -d "bin/$board" ] \
&& targets="$targets, $x"; continue
done
@@ -125,12 +125,6 @@ configure_target()
[ "$payload_uboot" = "y" ] || payload_uboot="n"
[ -n "$uboot_config" ] || uboot_config="default"
- [ "$xbmk_release" = "y" ] && [ "$release" = "n" ] && return 1
- [ "$board" = "$tree" ] && return 1; return 0
-}
-
-build_payloads()
-{
romdir="bin/$board"
cbdir="src/coreboot/$board"
[ "$board" = "$tree" ] || cbdir="src/coreboot/$tree"
@@ -138,20 +132,9 @@ build_payloads()
cbrom="$cbdir/build/coreboot.rom"
[ -f "$cbfstool" ] || x_ ./update trees -b coreboot utils $tree
- [ "$payload_memtest" = "y" ] && x_ ./update trees -b memtest86plus
- [ "$payload_seabios" = "y" ] && x_ ./update trees -b seabios
- if [ "$payload_grub" = "y" ] || [ "$payload_seabios_withgrub" = "y" ] \
- || [ "$payload_seabios_grubonly" = "y" ]; then
- [ -f "$grubelf" ] || x_ ./update trees -b grub $grubtree
- fi
-
- [ "$payload_uboot" = "y" ] || return 0
- x_ ./update trees -b u-boot $board
- ubdir="elf/u-boot/$board/$uboot_config"
- ubootelf="$ubdir/u-boot.elf" && [ ! -f "$ubootelf" ] && \
- ubootelf="$ubdir/u-boot"
- [ -f "$ubootelf" ] || $err "$board: Can't find u-boot"; return 0
+ [ "$xbmk_release" = "y" ] && [ "$release" = "n" ] && return 1
+ [ "$board" = "$tree" ] && return 1; return 0
}
build_board()
@@ -184,8 +167,8 @@ build_roms()
cbrom="$(mktemp -t coreboot_rom.XXXXXXXXXX)"
x_ cp "$_cbrom" "$cbrom"
- [ "$payload_memtest" != "y" ] || cbfs "$cbrom"
- "elf/memtest86plus/memtest.bin" img/memtest
+ [ "$payload_memtest" = "y" ] && x_ ./update trees -b memtest86plus && \
+ cbfs "$cbrom" "elf/memtest86plus/memtest.bin" img/memtest
[ "$payload_seabios" = "y" ] && build_seabios_roms
[ "$payload_grub" != "y" ] || build_grub_roms "$cbrom" "grub"
[ "$payload_uboot" = "y" ] || return 0
@@ -216,6 +199,8 @@ build_grub_roms()
tmprom="$1"
payload1="$2" # allow values: grub, seabios, seabios_withgrub
+ x_ ./update trees -b grub $grubtree
+
grub_cbfs="fallback/payload"
if [ "$payload1" = "grub" ] && [ "$payload_grub_withseabios" = "y" ]
then
@@ -260,6 +245,8 @@ mkSeabiosRom() {
tmprom="$(mktemp -t coreboot_rom.XXXXXXXXXX)" # 1=cbrom, 2=cbfs path
_seabioself="elf/seabios/default/$initmode/bios.bin.elf"
+ x_ ./update trees -b seabios
+
x_ cp "$1" "$tmprom"
cbfs "$tmprom" "$_seabioself" "$2"
x_ "$cbfstool" "$tmprom" add-int -i 3000 -n etc/ps2-keyboard-spinup
@@ -275,6 +262,12 @@ mkSeabiosRom() {
build_uboot_roms()
{
+ x_ ./update trees -b u-boot $board
+ ubdir="elf/u-boot/$board/$uboot_config"
+ ubootelf="$ubdir/u-boot.elf" && [ ! -f "$ubootelf" ] && \
+ ubootelf="$ubdir/u-boot"
+ [ -f "$ubootelf" ] || $err "$board: Can't find u-boot"
+
tmprom="$(mktemp -t coreboot_rom.XXXXXXXXXX)"
newrom="$romdir/uboot_payload_${board}_${initmode}_$displaymode.rom"
x_ cp "$cbrom" "$tmprom"