Skip to content
Andrew Scheller edited this page Jun 9, 2019 · 1 revision

Difference between raspberrypi/firmware and Hexxeh/rpi-firmware

As of 9th June 2019, the file hierarchy in this repo can be generated from the files in the upstream repo, by a script like the following:

#!/bin/bash
UPSTREAM_REPO=https://github.com/raspberrypi/firmware
DOWNSTREAM_DIR=rpi-firmware
git clone --depth 1 "${UPSTREAM_REPO}"
UPSTREAM_DIR=$(basename "${UPSTREAM_REPO}")
mkdir -p "${DOWNSTREAM_DIR}"
# Copy generic files
cp -r "${UPSTREAM_DIR}/boot/"* "${DOWNSTREAM_DIR}/"
cp -r "${UPSTREAM_DIR}/modules" "${DOWNSTREAM_DIR}/"
cp "${UPSTREAM_DIR}/extra/"{Module.symvers,Module7.symvers,git_hash,uname_string,uname_string7} "${DOWNSTREAM_DIR}/"
VC_DIR=opt/vc
# Copy soft floating-point binaries & libs
UPSTREAM_SOFTFP_DIR=${UPSTREAM_DIR}/${VC_DIR}
DOWNSTREAM_SOFTFP_DIR=${DOWNSTREAM_DIR}/vc/softfp/${VC_DIR}
mkdir -p "${DOWNSTREAM_SOFTFP_DIR}"
cp -r "${UPSTREAM_SOFTFP_DIR}/"{bin,lib,LICENCE} "${DOWNSTREAM_SOFTFP_DIR}/"
# Copy hard floating-point binaries & libs
UPSTREAM_HARDFP_DIR=${UPSTREAM_DIR}/hardfp/${VC_DIR}
DOWNSTREAM_HARDFP_DIR=${DOWNSTREAM_DIR}/vc/hardfp/${VC_DIR}
mkdir -p "${DOWNSTREAM_HARDFP_DIR}"
cp -r "${UPSTREAM_HARDFP_DIR}/"{bin,lib,LICENCE} "${DOWNSTREAM_HARDFP_DIR}/"
# Copy SDK files
UPSTREAM_SDK_DIR=${UPSTREAM_SOFTFP_DIR}
DOWNSTREAM_SDK_DIR=${DOWNSTREAM_DIR}/vc/sdk/${VC_DIR}
mkdir -p "${DOWNSTREAM_SDK_DIR}"
cp -r "${UPSTREAM_SDK_DIR}/"{include,src} "${DOWNSTREAM_SDK_DIR}/"
rm "${DOWNSTREAM_SDK_DIR}/src/hello_pi/hello_video/"{README,test.h264}