aboutsummaryrefslogtreecommitdiff
path: root/resources/scripts/helpers/build/module
diff options
context:
space:
mode:
authorLeah Rowe <info@minifree.org>2016-08-22 19:36:13 +0100
committerLeah Rowe <info@minifree.org>2016-08-22 19:36:13 +0100
commitf073e9cdc89268d9789ece309add60e967bf3995 (patch)
treef49355b2429d5701430bd846e0a7f51a7ef18ffc /resources/scripts/helpers/build/module
parentb12a86d9d808bf2239573aea7496b21d54123ee0 (diff)
downloadlibrebootfr-f073e9cdc89268d9789ece309add60e967bf3995.tar.gz
librebootfr-f073e9cdc89268d9789ece309add60e967bf3995.zip
Revert "fix build system: build cbfstool, etc before patching coreboot"
This reverts commit 9798405c5e4dffb6db8c1a98f3ab875123f5997c.
Diffstat (limited to 'resources/scripts/helpers/build/module')
-rwxr-xr-xresources/scripts/helpers/build/module/coreboot72
1 files changed, 36 insertions, 36 deletions
diff --git a/resources/scripts/helpers/build/module/coreboot b/resources/scripts/helpers/build/module/coreboot
index f6e23cae..86e1dfec 100755
--- a/resources/scripts/helpers/build/module/coreboot
+++ b/resources/scripts/helpers/build/module/coreboot
@@ -24,35 +24,13 @@
[ "x${DEBUG+set}" = 'xset' ] && set -v
set -u -e
-HOMEDIR=$(pwd)
# Build utilities needed in coreboot directory
# --------------------------------------------------------------------
printf "Building the utilities in coreboot\n"
-# build coreboot utilities (in each revision) and
-# create symlinks to the crossgcc archive
-for payload in $HOMEDIR/coreboot/*; do
- for board in "${payload}/"*; do
-
- # cbfstool, cbmem, nvramtool
- for util in {cbfs,nvram}tool cbmem; do
- if [ "${util}" = "cbfstool" ]; then
- sed -i '/.*fmd_scanner.o.*-Wno-unused-function$/ s/$/ -Wno-sign-compare/' "${board}"/util/cbfstool/Makefile.inc
- fi
- make -BC "${board}/util/${util}"
- done
- # create symlink to crossgcc
- (
-
- ln -s $HOMEDIR/crossgcc/util/crossgcc/ ${board}/util/crossgcc
- )
-
- done
-done
-
-for payloads in $HOMEDIR/resources/libreboot/config/*; do
+for payloads in resources/libreboot/config/*; do
if [ ! -d "${payloads}/" ]; then
continue
@@ -60,7 +38,7 @@ for payloads in $HOMEDIR/resources/libreboot/config/*; do
payload="${payloads##*/}"
- for boardconfig in $HOMEDIR/resources/libreboot/config/${payload}/*; do
+ for boardconfig in resources/libreboot/config/${payload}/*; do
if [ ! -d "${boardconfig}/" ]; then
continue
@@ -70,8 +48,8 @@ for payloads in $HOMEDIR/resources/libreboot/config/*; do
cbrevision=$(cat "${boardconfig}/cbrevision")
vbootrevision=$(cat "${boardconfig}/vbootrevision")
- reused_coreboot_patches="$HOMEDIR/resources/libreboot/patch/coreboot/${cbrevision}/${payload}/${boardname}/reused.list"
- reused_vboot_patches="$HOMEDIR/resources/libreboot/patch/vboot/${vbootrevision}/${payload}/${boardname}/reused.list"
+ reused_coreboot_patches="resources/libreboot/patch/coreboot/${cbrevision}/${payload}/${boardname}/reused.list"
+ reused_vboot_patches="resources/libreboot/patch/vboot/${vbootrevision}/${payload}/${boardname}/reused.list"
for reused_patches in "${reused_coreboot_patches}" "${reused_vboot_patches}"; do
if [ -f "${reused_patches}" ]; then
for patch in $(cat "${reused_patches}"); do
@@ -125,7 +103,7 @@ create_branch() {
# use git-init on everything
# this is so that we can then apply patche
# for these revisions of vboot and coreboot
-for i in $HOMEDIR/coreboot/*; do
+for i in coreboot/*; do
if [ ! -d "${i}/" ]; then
continue
fi
@@ -146,7 +124,7 @@ for i in $HOMEDIR/coreboot/*; do
done
done
-for payloads in $HOMEDIR/resources/libreboot/config/*; do
+for payloads in resources/libreboot/config/*; do
if [ ! -d "${payloads}/" ]; then
continue
@@ -154,7 +132,7 @@ for payloads in $HOMEDIR/resources/libreboot/config/*; do
payload="${payloads##*/}"
- for boardconfig in $HOMEDIR/resources/libreboot/config/${payload}/*; do
+ for boardconfig in resources/libreboot/config/${payload}/*; do
if [ ! -d "${boardconfig}/" ]; then
continue
@@ -171,17 +149,17 @@ for payloads in $HOMEDIR/resources/libreboot/config/*; do
# patch that version
(
- cd "$HOMEDIR/coreboot/${cbrevision}/${cbrevision}/"
+ cd "coreboot/${cbrevision}/${cbrevision}/"
create_branch ${branchname}
git checkout ${branchname}
# apply patches (coreboot, common to all systems using this revision)
- apply_patches_from_directory "$HOMEDIR/resources/libreboot/patch/common/coreboot/${cbrevision}"
+ apply_patches_from_directory "../../../resources/libreboot/patch/common/coreboot/${cbrevision}"
# apply patches re-used from other boards, before applying main patches (common patches for similar boards)
- apply_patches_from_file "$HOMEDIR/resources/libreboot/patch/coreboot/${cbrevision}/${payload}/${boardname}/reused.list" ../../..
+ apply_patches_from_file "../../../resources/libreboot/patch/coreboot/${cbrevision}/${payload}/${boardname}/reused.list" ../../..
# apply patches (coreboot, machine-specific for this revision)
- apply_patches_from_directory "$HOMEDIR/resources/libreboot/patch/coreboot/${cbrevision}/${payload}/${boardname}"
+ apply_patches_from_directory "../../../resources/libreboot/patch/coreboot/${cbrevision}/${payload}/${boardname}"
git checkout master
@@ -192,14 +170,36 @@ for payloads in $HOMEDIR/resources/libreboot/config/*; do
git checkout ${branchname}
# apply patches (vboot, common to all systems using this revision)
- apply_patches_from_directory "$HOMEDIR/resources/libreboot/patch/common/vboot/${vbootrevision}"
+ apply_patches_from_directory "../../../../../resources/libreboot/patch/common/vboot/${vbootrevision}"
# apply patches re-used from other boards, before applying main patches (common patches for similar boards)
- apply_patches_from_file "$HOMEDIR/resources/libreboot/patch/vboot/${vbootrevision}/${payload}/${boardname}/reused.list" ../../../../..
+ apply_patches_from_file "../../../../../resources/libreboot/patch/vboot/${vbootrevision}/${payload}/${boardname}/reused.list" ../../../../..
# apply patches (vboot, machine-specific for this revision)
- apply_patches_from_directory "$HOME/resources/libreboot/patch/vboot/${vbootrevision}/${payload}/${boardname}"
+ apply_patches_from_directory "../../../../../resources/libreboot/patch/vboot/${vbootrevision}/${payload}/${boardname}"
git checkout master
)
done
done
+
+# build coreboot utilities (in each revision) and
+# create symlinks to the crossgcc archive
+for payload in coreboot/*; do
+ for board in "${payload}/"*; do
+
+ # cbfstool, cbmem, nvramtool
+ for util in {cbfs,nvram}tool cbmem; do
+ if [ "${util}" = "cbfstool" ]; then
+ sed -i '/.*fmd_scanner.o.*-Wno-unused-function$/ s/$/ -Wno-sign-compare/' "${board}"/util/cbfstool/Makefile.inc
+ fi
+ make -BC "${board}/util/${util}"
+ done
+ # create symlink to crossgcc
+ (
+ cd "${board}/util/"
+ ln -s "../../../../crossgcc/util/crossgcc/" crossgcc
+ )
+
+ done
+done
+