diff options
author | Francis Rowe <info@gluglug.org.uk> | 2015-06-08 20:43:26 +0100 |
---|---|---|
committer | Francis Rowe <info@gluglug.org.uk> | 2015-06-08 20:44:58 +0100 |
commit | e70fadbdc939d1bfc6f4d5117264d5d6c51a7358 (patch) | |
tree | c81f02ecdd03b61825930d2f639894d0580127ce | |
parent | f06e2d27b99f7180b97511693cac8616bee97a9f (diff) | |
download | librebootfr-e70fadbdc939d1bfc6f4d5117264d5d6c51a7358.tar.gz librebootfr-e70fadbdc939d1bfc6f4d5117264d5d6c51a7358.zip |
build/roms/helper: add version information to CBFS
-rw-r--r-- | docs/index.html | 15 | ||||
-rwxr-xr-x | resources/scripts/helpers/build/roms/helper | 17 |
2 files changed, 31 insertions, 1 deletions
diff --git a/docs/index.html b/docs/index.html index 14f3c89e..6703f283 100644 --- a/docs/index.html +++ b/docs/index.html @@ -22,6 +22,9 @@ <p> <a href="#why">What is libreboot?</a> </p> + <p> + <a href="#version">How do I know what version I'm running?</a> + </p> </div> <div class="section"> @@ -151,6 +154,18 @@ </div> + <div class="section" id="version"> + + <p> + If you are 127 commits after release 20150518 + (commit message <i>build/roms/helper: add version information to CBFS</i>) + (or you have any stable release after 20150518), then you can + press C at the GRUB console, and use this command to find out what version of libreboot you have:<br/> + <b>cat (cbfsdisk)/lbversion</b> + </p> + + </div> + <div class="section"> <p> diff --git a/resources/scripts/helpers/build/roms/helper b/resources/scripts/helpers/build/roms/helper index a89ea578..82fd518c 100755 --- a/resources/scripts/helpers/build/roms/helper +++ b/resources/scripts/helpers/build/roms/helper @@ -35,6 +35,15 @@ printf "Helper script: build ROM images for '$1'\n" cd coreboot/ +if [ -f "../version" ]; then + # _src release archive is being used + version="$(cat ../version)" +else + # git repo is being used + version="$(git describe --tags HEAD)" +fi +printf '%s\n' "${version}" >"lbversion" + # Build ROM images with text-mode and corebootfb modes. # --------------------------------------------------------------------------------------------------------------- @@ -78,7 +87,10 @@ do mv build/coreboot.rom "$1"_"$romtype".rom # .config no longer needed rm -f .config - + + # Add version information to this image + ./util/cbfstool/cbfstool "$1"_"$romtype".rom add -f lbversion -n lbversion -t raw + # Add the background image if [ "$romtype" = "vesafb" ] then @@ -120,6 +132,9 @@ rm -Rf ../bin/"$1" # now put the new ROM's in ./bin mv "$1" ../bin +# libreboot version file no longer needed +rm -f "lbversion" + # go back to main source directory cd ../ |