aboutsummaryrefslogtreecommitdiff
path: root/resources/scripts/helpers
diff options
context:
space:
mode:
authorLeah Rowe <info@minifree.org>2016-08-22 11:01:55 +0100
committerLeah Rowe <info@minifree.org>2016-08-22 11:01:55 +0100
commitfbdda3218fc2881f5ae703fd383864a95c6eafc7 (patch)
tree2f8a88f14964b43d229de221d6eb58e1c50361a8 /resources/scripts/helpers
parente36093541b4c4511888efc3994c424d3622707eb (diff)
downloadlibrebootfr-fbdda3218fc2881f5ae703fd383864a95c6eafc7.tar.gz
librebootfr-fbdda3218fc2881f5ae703fd383864a95c6eafc7.zip
build/release/util: once again build nvramtool and cbfstool
Pulled from the crossgcc directory, for version consistency.
Diffstat (limited to 'resources/scripts/helpers')
-rwxr-xr-xresources/scripts/helpers/build/release/util71
1 files changed, 64 insertions, 7 deletions
diff --git a/resources/scripts/helpers/build/release/util b/resources/scripts/helpers/build/release/util
index 05a53225..0cd0a7f5 100755
--- a/resources/scripts/helpers/build/release/util
+++ b/resources/scripts/helpers/build/release/util
@@ -109,6 +109,42 @@ mv "flashrom/flashrom_lenovobios_macronix" "${distdir}/flashrom/${arch}/"
rm -Rf "flashrom/"
mv "flashrom_/" "flashrom/"
+ # ----------------
+# cbfstool related
+# ----------------
+# build cbfstool, compiled (statically linked) and include the binary
+
+mkdir -p "${distdir}/cbfstool/${arch}/"
+
+cd "crossgcc/util/"
+cp -R "cbfstool" "cbfstool_/"
+cd "cbfstool/"
+make clean
+make SHARED=0 CC='gcc -static'
+
+mv "cbfstool" "../../../${distdir}/cbfstool/${arch}/"
+
+if [ "${arch}" = "x86_64" ]
+ then
+ # Now build 32-bit binaries
+ make clean
+ make SHARED=0 CC='gcc -static -m32'
+ mkdir "../../../${distdir}/cbfstool/i686"
+ mv "cbfstool" "../../../${distdir}/cbfstool/i686/"
+fi
+
+# cross-compile for ARM
+make clean
+make SHARED=0 CC='arm-linux-gnueabi-gcc -static'
+mkdir "../../../${distdir}/cbfstool/armv7l/"
+mv "cbfstool" "../../../${distdir}/cbfstool/armv7l/"
+
+cd ../
+rm -Rf "cbfstool/"
+mv "cbfstool_/" "cbfstool/"
+cd ../../
+
+
# ----------------
# ich9deblob related
# ----------------
@@ -150,17 +186,38 @@ rm -Rf "ich9deblob/"
mv "ich9deblob_/" "ich9deblob/"
cd "../../"
+# -----------------
+# nvramtool related
+# -----------------
+# build nvramtool, compiled (statically linked) and include the binary
+cd "crossgcc/util/"
+cp -R "nvramtool/" "nvramtool_/"
+cd "nvramtool/"
+make clean
+make SHARED=0 CC='gcc -static'
+
+mkdir -p "../../../${distdir}/nvramtool/${arch}/"
+
+mv "nvramtool" "../../../${distdir}/nvramtool/${arch}/"
+
+if [ "${arch}" = "x86_64" ]
+ then
+ # Now build 32-bit binaries
+ make clean
+ make SHARED=0 CC='gcc -static -m32'
+ mkdir "../../../${distdir}/nvramtool/i686/"
+ mv "nvramtool" "../../../${distdir}/nvramtool/i686/"
+fi
+
+cd "../"
+rm -Rf "nvramtool/"
+mv "nvramtool_/" "nvramtool/"
+cd "../../"
+
# -------------
# Miscellaneous
# -------------
-cp -R "crossgcc/util/cbfstool/" "${distdir}/"
-(cd "${distdir}/cbfstool/" && make clean)
-cp -R "crossgcc/util/nvramtool/" "${distdir}/"
-(cd "${distdir}/nvramtool/" && make clean)
-cp -R "crossgcc/util/ectool/" "${distdir}/"
-(cd "${distdir}/ectool/" && make clean)
-
# Flashing script
cp "flash" "${distdir}/"