From 59456c36c8262a602d1bc1bef0f283d54fe2f916 Mon Sep 17 00:00:00 2001 From: Andrew Scheller Date: Sat, 22 Jun 2013 18:33:03 +0100 Subject: [PATCH] Fix generation of the rpi-firmware and rpi-userland version files They weren't being updated correctly, and they shouldn't have been stored in git in the first place --- BUILDME.sh | 6 ++---- buildroot/package/rpi-firmware/rpi-firmware.mk | 7 +++++++ buildroot/package/rpi-userland/rpi-userland.mk | 6 ++++++ buildroot/rpi-firmware-head | 1 - buildroot/rpi-userland-head | 1 - 5 files changed, 15 insertions(+), 6 deletions(-) delete mode 100644 buildroot/rpi-firmware-head delete mode 100644 buildroot/rpi-userland-head diff --git a/BUILDME.sh b/BUILDME.sh index 284c9816..bbdd95b4 100755 --- a/BUILDME.sh +++ b/BUILDME.sh @@ -16,14 +16,12 @@ for i in $*; do if [ $i = "update-firmware" ]; then rm -rf output/build/rpi-firmware-master rm -rf dl/rpi-firmware-master.tar.gz - echo "rpi-firmware Git HEAD @ "`git ls-remote --heads https://github.com/raspberrypi/firmware | sed -n 2p` > rpi-firmware-head & fi # Redownload userland from raspberrypi/userland master HEAD to update to latest if [ $i = "update-userland" ]; then rm -rf output/build/rpi-userland-master rm -rf dl/rpi-userland-master.tar.gz - echo "rpi-userland Git HEAD @ "`git ls-remote --heads https://github.com/raspberrypi/userland | sed -n 2p` > rpi-userland-head & fi done @@ -44,8 +42,8 @@ BUILD_INFO="../output/BUILD-DATA" echo "Build-date: $(date +"%Y-%m-%d")" > "$BUILD_INFO" echo "NOOBS Version: "`git describe` >> "$BUILD_INFO" echo "NOOBS Git HEAD @ "`git rev-parse --verify HEAD` >> "$BUILD_INFO" -cat rpi-userland-head >> "$BUILD_INFO" -cat rpi-firmware-head >> "$BUILD_INFO" +cat dl/rpi-userland-head.version >> "$BUILD_INFO" +cat dl/rpi-firmware-head.version >> "$BUILD_INFO" cd .. diff --git a/buildroot/package/rpi-firmware/rpi-firmware.mk b/buildroot/package/rpi-firmware/rpi-firmware.mk index 110d28c6..d6ac7ead 100644 --- a/buildroot/package/rpi-firmware/rpi-firmware.mk +++ b/buildroot/package/rpi-firmware/rpi-firmware.mk @@ -9,6 +9,13 @@ RPI_FIRMWARE_SITE = http://github.com/raspberrypi/firmware/tarball/$(RPI_FIRMWAR RPI_FIRMWARE_LICENSE = BSD-3c RPI_FIRMWARE_LICENSE_FILES = boot/LICENCE.broadcom +# we're downloading a branchname rather than a commit-id, so this gets the commit-id we just downloaded +define RPI_FIRMWARE_GET_CURRENT_VERSION + 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 +endef + +RPI_FIRMWARE_POST_DOWNLOAD_HOOKS += RPI_FIRMWARE_GET_CURRENT_VERSION + define RPI_FIRMWARE_INSTALL_TARGET_CMDS $(INSTALL) -D -m 0644 $(@D)/boot/bootcode.bin $(BINARIES_DIR)/rpi-firmware/bootcode.bin $(INSTALL) -D -m 0644 $(@D)/boot/start.elf $(BINARIES_DIR)/rpi-firmware/start.elf diff --git a/buildroot/package/rpi-userland/rpi-userland.mk b/buildroot/package/rpi-userland/rpi-userland.mk index 00b59369..2abb2696 100644 --- a/buildroot/package/rpi-userland/rpi-userland.mk +++ b/buildroot/package/rpi-userland/rpi-userland.mk @@ -11,6 +11,12 @@ RPI_USERLAND_LICENSE_FILES = LICENCE RPI_USERLAND_INSTALL_STAGING = YES RPI_USERLAND_CONF_OPT = -DVMCS_INSTALL_PREFIX=/usr +# we're downloading a branchname rather than a commit-id, so this gets the commit-id we just downloaded +define RPI_USERLAND_GET_CURRENT_VERSION + 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 +endef + +RPI_USERLAND_POST_DOWNLOAD_HOOKS += RPI_USERLAND_GET_CURRENT_VERSION define RPI_USERLAND_POST_TARGET_CLEANUP rm -Rf $(TARGET_DIR)/usr/src diff --git a/buildroot/rpi-firmware-head b/buildroot/rpi-firmware-head deleted file mode 100644 index 31e245d0..00000000 --- a/buildroot/rpi-firmware-head +++ /dev/null @@ -1 +0,0 @@ -rpi-firmware Git HEAD @ a0c98fa6bc0f93bad8cbfcf749f7be7dc2276192 refs/heads/master diff --git a/buildroot/rpi-userland-head b/buildroot/rpi-userland-head deleted file mode 100644 index f678e0de..00000000 --- a/buildroot/rpi-userland-head +++ /dev/null @@ -1 +0,0 @@ -rpi-userland Git HEAD @ a0c98fa6bc0f93bad8cbfcf749f7be7dc2276192 refs/heads/master