Skip to content
This repository was archived by the owner on Feb 27, 2023. It is now read-only.

Commit 492eb5a

Browse files
author
Rob Bishop
committed
Merge pull request #68 from lurch/fix-version-files
Fix generation of the rpi-firmware and rpi-userland version files
2 parents 85c43ad + 59456c3 commit 492eb5a

File tree

5 files changed

+15
-6
lines changed

5 files changed

+15
-6
lines changed

BUILDME.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,12 @@ for i in $*; do
1616
if [ $i = "update-firmware" ]; then
1717
rm -rf output/build/rpi-firmware-master
1818
rm -rf dl/rpi-firmware-master.tar.gz
19-
echo "rpi-firmware Git HEAD @ "`git ls-remote --heads https://github.com/raspberrypi/firmware | sed -n 2p` > rpi-firmware-head &
2019
fi
2120

2221
# Redownload userland from raspberrypi/userland master HEAD to update to latest
2322
if [ $i = "update-userland" ]; then
2423
rm -rf output/build/rpi-userland-master
2524
rm -rf dl/rpi-userland-master.tar.gz
26-
echo "rpi-userland Git HEAD @ "`git ls-remote --heads https://github.com/raspberrypi/userland | sed -n 2p` > rpi-userland-head &
2725
fi
2826
done
2927

@@ -44,8 +42,8 @@ BUILD_INFO="../output/BUILD-DATA"
4442
echo "Build-date: $(date +"%Y-%m-%d")" > "$BUILD_INFO"
4543
echo "NOOBS Version: "`git describe` >> "$BUILD_INFO"
4644
echo "NOOBS Git HEAD @ "`git rev-parse --verify HEAD` >> "$BUILD_INFO"
47-
cat rpi-userland-head >> "$BUILD_INFO"
48-
cat rpi-firmware-head >> "$BUILD_INFO"
45+
cat dl/rpi-userland-head.version >> "$BUILD_INFO"
46+
cat dl/rpi-firmware-head.version >> "$BUILD_INFO"
4947

5048
cd ..
5149

buildroot/package/rpi-firmware/rpi-firmware.mk

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ RPI_FIRMWARE_SITE = http://github.com/raspberrypi/firmware/tarball/$(RPI_FIRMWAR
99
RPI_FIRMWARE_LICENSE = BSD-3c
1010
RPI_FIRMWARE_LICENSE_FILES = boot/LICENCE.broadcom
1111

12+
# we're downloading a branchname rather than a commit-id, so this gets the commit-id we just downloaded
13+
define RPI_FIRMWARE_GET_CURRENT_VERSION
14+
echo "rpi-firmware Git HEAD @ "`git ls-remote --heads https://github.com/raspberrypi/firmware | grep refs/heads/$(RPI_FIRMWARE_VERSION)` > $(BR2_DL_DIR)/rpi-firmware-head.version
15+
endef
16+
17+
RPI_FIRMWARE_POST_DOWNLOAD_HOOKS += RPI_FIRMWARE_GET_CURRENT_VERSION
18+
1219
define RPI_FIRMWARE_INSTALL_TARGET_CMDS
1320
$(INSTALL) -D -m 0644 $(@D)/boot/bootcode.bin $(BINARIES_DIR)/rpi-firmware/bootcode.bin
1421
$(INSTALL) -D -m 0644 $(@D)/boot/start.elf $(BINARIES_DIR)/rpi-firmware/start.elf

buildroot/package/rpi-userland/rpi-userland.mk

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ RPI_USERLAND_LICENSE_FILES = LICENCE
1111
RPI_USERLAND_INSTALL_STAGING = YES
1212
RPI_USERLAND_CONF_OPT = -DVMCS_INSTALL_PREFIX=/usr
1313

14+
# we're downloading a branchname rather than a commit-id, so this gets the commit-id we just downloaded
15+
define RPI_USERLAND_GET_CURRENT_VERSION
16+
echo "rpi-userland Git HEAD @ "`git ls-remote --heads https://github.com/raspberrypi/userland | grep refs/heads/$(RPI_USERLAND_VERSION)` > $(BR2_DL_DIR)/rpi-userland-head.version
17+
endef
18+
19+
RPI_USERLAND_POST_DOWNLOAD_HOOKS += RPI_USERLAND_GET_CURRENT_VERSION
1420

1521
define RPI_USERLAND_POST_TARGET_CLEANUP
1622
rm -Rf $(TARGET_DIR)/usr/src

buildroot/rpi-firmware-head

Lines changed: 0 additions & 1 deletion
This file was deleted.

buildroot/rpi-userland-head

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)