From d1f408f3725aa02bc1d76c4c6aadb4697bd073c0 Mon Sep 17 00:00:00 2001 From: Francis Rowe Date: Sat, 2 Jan 2016 22:10:32 +0000 Subject: Use different coreboot revisions and patches per board The release archives will be bigger, but this is a necessary change that makes libreboot development easier. At present, there are boards maintained in libreboot by different people. By doing it this way, that becomes much easier. This is in contrast to the present situation, where a change to one board potentially affects all other boards, especially when updating to a new version of coreboot. Coreboot-libre scripts, download scripts, build scripts - everything. The entire build system has been modified to reflect this change of development. For reasons of consistency, cbfstool and nvramtool are no longer included in the util archives. --- resources/scripts/helpers/build/module/coreboot | 33 ++++++++++++++++++------- 1 file changed, 24 insertions(+), 9 deletions(-) (limited to 'resources/scripts/helpers/build/module/coreboot') diff --git a/resources/scripts/helpers/build/module/coreboot b/resources/scripts/helpers/build/module/coreboot index eb99c25c..07659cdd 100755 --- a/resources/scripts/helpers/build/module/coreboot +++ b/resources/scripts/helpers/build/module/coreboot @@ -2,7 +2,7 @@ # helper script: builds the dependencies that coreboot needs before building a ROM image # -# Copyright (C) 2014, 2015 Francis Rowe +# Copyright (C) 2014, 2015, 2016 Francis Rowe # Copyright (C) 2015 Klemens Nanni # # This program is free software: you can redistribute it and/or modify @@ -30,13 +30,28 @@ set -u -e printf "Building the utilities in coreboot\n" -# crossgcc -# coreboot on x86 is 32-bit, so only build for i386. Also build for ARM -for architecture in i386 arm; do - make -j$(nproc) -BC coreboot crossgcc-${architecture} -done +# clean coreboot and crossgcc (source archives preserved) +for payload in coreboot/*; do + for board in "${payload}/"*; do + + if [ "${payload##*/}" = "crossgcc" ]; then # build crossgcc + + for architecture in i386 arm; do + make -j$(nproc) -BC "${board}/" crossgcc-${architecture} + done + else # build other utils + # cbfstool, cbmem, nvramtool + for util in {cbfs,nvram}tool cbmem; do + make -BC "${board}/util/${util}" + done + # create symlink to crossgcc + ( + boardconfig_path="resources/libreboot/config/${payload##*/}/${board##*/}" + cbrevision="$(cat "${boardconfig_path}/cbrevision")" + cd "${board}/util/" + ln -s "../../../crossgcc/${cbrevision}/util/crossgcc/" crossgcc + ) + fi -# cbfstool, cbmem, nvramtool -for util in {cbfs,nvram}tool cbmem; do - make -BC coreboot/util/${util} + done done -- cgit v1.2.3-70-g09d2