Skip to content

Commit

Permalink
raspberrypi-firmware: Resort to github APIs for tarballs
Browse files Browse the repository at this point in the history
The firmware repo is huge ( 36G ) to clone is onerous
using shallow clone tarballs require them to be pre-populated
at some mirror which we don't have. Third option is to let
github provide the tarball, there is concern that tarballs
might change the compression etc and thus checksum would change
that is something github would communicate to users in advance [1]

Therefore this is the best solution for us right now.

Also upgrade to latest while here and drop PR settings

[1] https://docs.github.com/en/repositories/working-with-files/using-files/downloading-source-code-archives#stability-of-source-code-archives

Signed-off-by: Khem Raj <[email protected]>
  • Loading branch information
kraj committed Mar 20, 2024
1 parent d88e625 commit abfdb87
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
3 changes: 0 additions & 3 deletions recipes-bsp/bootfiles/rpi-bootfiles.bb
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ COMPATIBLE_MACHINE = "^rpi$"

S = "${RPIFW_S}/boot"

PR = "r3"

do_deploy() {
install -d ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}

Expand All @@ -40,4 +38,3 @@ addtask deploy before do_build after do_install
do_deploy[dirs] += "${DEPLOYDIR}/${BOOTFILES_DIR_NAME}"

PACKAGE_ARCH = "${MACHINE_ARCH}"

14 changes: 6 additions & 8 deletions recipes-bsp/common/raspberrypi-firmware.inc
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
RPIFW_DATE ?= "20240312"
SRCREV = "5689dd184872b809af91d6636a832b1484d90fef"
RPIFW_SRC_URI ?= "git://github.com/raspberrypi/firmware;protocol=https;branch=master"
RPIFW_S ?= "${WORKDIR}/git"
RPIFW_DATE ?= "20240319"
SRCREV = "9f24f4bc2bdd07ffd158cfbb4bce88a2efc4c1f5"
SHORTREV = "${@d.getVar("SRCREV", False).__str__()[:7]}"
RPIFW_SRC_URI ?= "https://api.github.com/repos/raspberrypi/firmware/tarball/9f24f4bc2bdd07ffd158cfbb4bce88a2efc4c1f5;downloadfilename=raspberrypi-firmware-${SHORTREV}.tar.gz"
RPIFW_S ?= "${WORKDIR}/raspberrypi-firmware-${SHORTREV}"

SRC_URI = "${RPIFW_SRC_URI}"
SRC_URI[sha256sum] = "4b436f8946b139c6a1202375ef55d4848e3bcd8c1a9cb47000e06d7ecec828f7"

PV = "${RPIFW_DATE}"

# Firmware repo is huge due to its content nature being binary blobs
# use shallow clone to reduce amount of git metadata being pulled down
BB_GIT_SHALLOW = "1"

0 comments on commit abfdb87

Please sign in to comment.