summaryrefslogtreecommitdiffstats
path: root/bsp/meta-raspberrypi/recipes-bsp
diff options
context:
space:
mode:
Diffstat (limited to 'bsp/meta-raspberrypi/recipes-bsp')
-rw-r--r--bsp/meta-raspberrypi/recipes-bsp/armstubs/armstubs.bb36
-rw-r--r--bsp/meta-raspberrypi/recipes-bsp/bootfiles/bootfiles.bb (renamed from bsp/meta-raspberrypi/recipes-bsp/bootfiles/bcm2835-bootfiles.bb)10
-rw-r--r--bsp/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bb162
-rw-r--r--bsp/meta-raspberrypi/recipes-bsp/common/firmware.inc11
-rw-r--r--bsp/meta-raspberrypi/recipes-bsp/common/raspberrypi-firmware.inc10
-rw-r--r--bsp/meta-raspberrypi/recipes-bsp/common/raspberrypi-tools.inc9
-rw-r--r--bsp/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/files/boot.cmd.in1
-rw-r--r--bsp/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bb2
-rw-r--r--bsp/meta-raspberrypi/recipes-bsp/u-boot/files/fw_env.config1
-rw-r--r--bsp/meta-raspberrypi/recipes-bsp/u-boot/libubootenv_%.bbappend12
-rw-r--r--bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot/0001-dm-core-Move-ofdata_to_platdata-call-earlier.patch51
-rw-r--r--bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot_%.bbappend6
12 files changed, 230 insertions, 81 deletions
diff --git a/bsp/meta-raspberrypi/recipes-bsp/armstubs/armstubs.bb b/bsp/meta-raspberrypi/recipes-bsp/armstubs/armstubs.bb
new file mode 100644
index 00000000..d8f3fe70
--- /dev/null
+++ b/bsp/meta-raspberrypi/recipes-bsp/armstubs/armstubs.bb
@@ -0,0 +1,36 @@
+DESCRIPTION = "Boot strap code that the GPU puts on memory to start running the boot loader"
+LICENSE = "BSD-3-Clause"
+
+LIC_FILES_CHKSUM = "file://armstub.S;beginline=1;endline=26;md5=9888f34ac06a676129416c952a6a521e"
+
+inherit deploy nopackages
+
+include recipes-bsp/common/raspberrypi-tools.inc
+
+COMPATIBLE_MACHINE = "^rpi$"
+
+S = "${RPITOOLS_S}/armstubs"
+
+export CC7="${CC}"
+export LD7="${LD}"
+export OBJCOPY7="${OBJCOPY}"
+export OBJDUMP7="${OBJDUMP}"
+export CC8="${CC}"
+export LD8="${LD}"
+export OBJCOPY8="${OBJCOPY}"
+export OBJDUMP8="${OBJDUMP} -maarch64"
+
+do_compile() {
+ [ -z "${ARMSTUB}" ] && bbfatal "No ARMSTUB defined for your machine."
+ oe_runmake ${ARMSTUB}
+}
+
+do_deploy() {
+ install -d ${DEPLOYDIR}/${PN}
+ cp ${S}/armstub*.bin ${DEPLOYDIR}/${PN}
+}
+
+addtask deploy before do_build after do_install
+do_deploy[dirs] += "${DEPLOYDIR}/${PN}"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/bsp/meta-raspberrypi/recipes-bsp/bootfiles/bcm2835-bootfiles.bb b/bsp/meta-raspberrypi/recipes-bsp/bootfiles/bootfiles.bb
index 466f4438..80e226d4 100644
--- a/bsp/meta-raspberrypi/recipes-bsp/bootfiles/bcm2835-bootfiles.bb
+++ b/bsp/meta-raspberrypi/recipes-bsp/bootfiles/bootfiles.bb
@@ -1,11 +1,11 @@
-DESCRIPTION = "Closed source binary files to help boot the ARM on the BCM2835."
-LICENSE = "Proprietary"
+DESCRIPTION = "Closed source binary files to help boot all raspberry pi devices."
+LICENSE = "Broadcom-RPi"
-LIC_FILES_CHKSUM = "file://LICENCE.broadcom;md5=4a4d169737c0786fb9482bb6d30401d1"
+LIC_FILES_CHKSUM = "file://LICENCE.broadcom;md5=c403841ff2837657b2ed8e5bb474ac8d"
inherit deploy nopackages
-include recipes-bsp/common/firmware.inc
+include recipes-bsp/common/raspberrypi-firmware.inc
INHIBIT_DEFAULT_DEPS = "1"
@@ -34,6 +34,8 @@ do_deploy() {
touch ${DEPLOYDIR}/${PN}/${PN}-${PV}.stamp
}
+do_deploy[depends] += "rpi-config:do_deploy"
+
addtask deploy before do_build after do_install
do_deploy[dirs] += "${DEPLOYDIR}/${PN}"
diff --git a/bsp/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bb b/bsp/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bb
index fcc7771b..67c166a0 100644
--- a/bsp/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bb
+++ b/bsp/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bb
@@ -20,182 +20,214 @@ INHIBIT_DEFAULT_DEPS = "1"
PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}"
PITFT22="${@bb.utils.contains("MACHINE_FEATURES", "pitft22", "1", "0", d)}"
PITFT28r="${@bb.utils.contains("MACHINE_FEATURES", "pitft28r", "1", "0", d)}"
+PITFT28c="${@bb.utils.contains("MACHINE_FEATURES", "pitft28c", "1", "0", d)}"
PITFT35r="${@bb.utils.contains("MACHINE_FEATURES", "pitft35r", "1", "0", d)}"
VC4GRAPHICS="${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "1", "0", d)}"
VC4DTBO ?= "vc4-kms-v3d"
+GPIO_IR ?= "18"
+GPIO_IR_TX ?= "17"
inherit deploy nopackages
do_deploy() {
- install -d ${DEPLOYDIR}/bcm2835-bootfiles
+ install -d ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}
- cp ${S}/config.txt ${DEPLOYDIR}/bcm2835-bootfiles/
+ cp ${S}/config.txt ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/
if [ -n "${KEY_DECODE_MPG2}" ]; then
- sed -i '/#decode_MPG2=/ c\decode_MPG2=${KEY_DECODE_MPG2}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ sed -i '/#decode_MPG2=/ c\decode_MPG2=${KEY_DECODE_MPG2}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
fi
if [ -n "${KEY_DECODE_WVC1}" ]; then
- sed -i '/#decode_WVC1=/ c\decode_WVC1=${KEY_DECODE_WVC1}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ sed -i '/#decode_WVC1=/ c\decode_WVC1=${KEY_DECODE_WVC1}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
fi
if [ -n "${DISABLE_OVERSCAN}" ]; then
- sed -i '/#disable_overscan=/ c\disable_overscan=${DISABLE_OVERSCAN}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ sed -i '/#disable_overscan=/ c\disable_overscan=${DISABLE_OVERSCAN}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
fi
- if [ -n "${DISABLE_SPLASH}" ]; then
- sed -i '/#disable_splash=/ c\disable_splash=${DISABLE_SPLASH}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ if [ "${DISABLE_SPLASH}" = "1" ]; then
+ sed -i '/#disable_splash=/ c\disable_splash=${DISABLE_SPLASH}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
fi
# Set overclocking options
if [ -n "${ARM_FREQ}" ]; then
- sed -i '/#arm_freq=/ c\arm_freq=${ARM_FREQ}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ sed -i '/#arm_freq=/ c\arm_freq=${ARM_FREQ}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
fi
if [ -n "${GPU_FREQ}" ]; then
- sed -i '/#gpu_freq=/ c\gpu_freq=${GPU_FREQ}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ sed -i '/#gpu_freq=/ c\gpu_freq=${GPU_FREQ}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
fi
if [ -n "${CORE_FREQ}" ]; then
- sed -i '/#core_freq=/ c\core_freq=${CORE_FREQ}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ sed -i '/#core_freq=/ c\core_freq=${CORE_FREQ}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
fi
if [ -n "${SDRAM_FREQ}" ]; then
- sed -i '/#sdram_freq=/ c\sdram_freq=${SDRAM_FREQ}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ sed -i '/#sdram_freq=/ c\sdram_freq=${SDRAM_FREQ}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
fi
if [ -n "${OVER_VOLTAGE}" ]; then
- sed -i '/#over_voltage=/ c\over_voltage=${OVER_VOLTAGE}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ sed -i '/#over_voltage=/ c\over_voltage=${OVER_VOLTAGE}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
fi
# GPU memory
if [ -n "${GPU_MEM}" ]; then
- sed -i '/#gpu_mem=/ c\gpu_mem=${GPU_MEM}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ sed -i '/#gpu_mem=/ c\gpu_mem=${GPU_MEM}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
fi
if [ -n "${GPU_MEM_256}" ]; then
- sed -i '/#gpu_mem_256=/ c\gpu_mem_256=${GPU_MEM_256}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ sed -i '/#gpu_mem_256=/ c\gpu_mem_256=${GPU_MEM_256}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
fi
if [ -n "${GPU_MEM_512}" ]; then
- sed -i '/#gpu_mem_512=/ c\gpu_mem_512=${GPU_MEM_512}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ sed -i '/#gpu_mem_512=/ c\gpu_mem_512=${GPU_MEM_512}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
fi
if [ -n "${GPU_MEM_1024}" ]; then
- sed -i '/#gpu_mem_1024=/ c\gpu_mem_1024=${GPU_MEM_1024}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ sed -i '/#gpu_mem_1024=/ c\gpu_mem_1024=${GPU_MEM_1024}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
fi
# Set boot delay
if [ -n "${BOOT_DELAY}" ]; then
- sed -i '/#boot_delay=/ c\boot_delay=${BOOT_DELAY}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ sed -i '/#boot_delay=/ c\boot_delay=${BOOT_DELAY}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
fi
if [ -n "${BOOT_DELAY_MS}" ]; then
- sed -i '/#boot_delay_ms=/ c\boot_delay_ms=${BOOT_DELAY_MS}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ sed -i '/#boot_delay_ms=/ c\boot_delay_ms=${BOOT_DELAY_MS}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
fi
# Set HDMI and composite video options
if [ -n "${HDMI_FORCE_HOTPLUG}" ]; then
- sed -i '/#hdmi_force_hotplug=/ c\hdmi_force_hotplug=${HDMI_FORCE_HOTPLUG}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ sed -i '/#hdmi_force_hotplug=/ c\hdmi_force_hotplug=${HDMI_FORCE_HOTPLUG}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
fi
if [ -n "${HDMI_DRIVE}" ]; then
- sed -i '/#hdmi_drive=/ c\hdmi_drive=${HDMI_DRIVE}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ sed -i '/#hdmi_drive=/ c\hdmi_drive=${HDMI_DRIVE}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
fi
if [ -n "${HDMI_GROUP}" ]; then
- sed -i '/#hdmi_group=/ c\hdmi_group=${HDMI_GROUP}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ sed -i '/#hdmi_group=/ c\hdmi_group=${HDMI_GROUP}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
fi
if [ -n "${HDMI_MODE}" ]; then
- sed -i '/#hdmi_mode=/ c\hdmi_mode=${HDMI_MODE}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ sed -i '/#hdmi_mode=/ c\hdmi_mode=${HDMI_MODE}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
fi
if [ -n "${CONFIG_HDMI_BOOST}" ]; then
- sed -i '/#config_hdmi_boost=/ c\config_hdmi_boost=${CONFIG_HDMI_BOOST}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ sed -i '/#config_hdmi_boost=/ c\config_hdmi_boost=${CONFIG_HDMI_BOOST}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
fi
if [ -n "${SDTV_MODE}" ]; then
- sed -i '/#sdtv_mode=/ c\sdtv_mode=${SDTV_MODE}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ sed -i '/#sdtv_mode=/ c\sdtv_mode=${SDTV_MODE}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
fi
if [ -n "${SDTV_ASPECT}" ]; then
- sed -i '/#sdtv_aspect=/ c\sdtv_aspect=${SDTV_ASPECT}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ sed -i '/#sdtv_aspect=/ c\sdtv_aspect=${SDTV_ASPECT}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
fi
if [ -n "${DISPLAY_ROTATE}" ]; then
- sed -i '/#display_rotate=/ c\display_rotate=${DISPLAY_ROTATE}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ sed -i '/#display_rotate=/ c\display_rotate=${DISPLAY_ROTATE}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
fi
# Video camera support
- if [ -n "${VIDEO_CAMERA}" ]; then
- echo "# Enable video camera" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
- echo "start_x=1" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ if [ "${VIDEO_CAMERA}" = "1" ]; then
+ echo "# Enable video camera" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
+ echo "start_x=1" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
fi
# Offline compositing support
- if [ -n "${DISPMANX_OFFLINE}" ]; then
- echo "# Enable offline compositing" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
- echo "dispmanx_offline=1" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ if [ "${DISPMANX_OFFLINE}" = "1" ]; then
+ echo "# Enable offline compositing" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
+ echo "dispmanx_offline=1" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
fi
# SPI bus support
- if [ -n "${ENABLE_SPI_BUS}" ] || [ "${PITFT}" = "1" ]; then
- echo "# Enable SPI bus" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
- echo "dtparam=spi=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ if [ "${ENABLE_SPI_BUS}" = "1" ] || [ "${PITFT}" = "1" ]; then
+ echo "# Enable SPI bus" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
+ echo "dtparam=spi=on" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
fi
# I2C support
- if [ -n "${ENABLE_I2C}" ] || [ "${PITFT}" = "1" ]; then
- echo "# Enable I2C" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
- echo "dtparam=i2c1=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
- echo "dtparam=i2c_arm=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ if [ "${ENABLE_I2C}" = "1" ] || [ "${PITFT}" = "1" ]; then
+ echo "# Enable I2C" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
+ echo "dtparam=i2c1=on" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
+ echo "dtparam=i2c_arm=on" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
fi
# PiTFT22 display support
if [ "${PITFT22}" = "1" ]; then
- echo "# Enable PITFT22 display" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
- echo "dtoverlay=pitft22,rotate=270,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ echo "# Enable PITFT22 display" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
+ echo "dtoverlay=pitft22,rotate=270,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
fi
if [ "${PITFT28r}" = "1" ]; then
- echo "# Enable PITFT28r display" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
- echo "dtoverlay=pitft28-resistive,rotate=90,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ echo "# Enable PITFT28r display" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
+ echo "dtoverlay=pitft28-resistive,rotate=90,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
+ fi
+ if [ "${PITFT28c}" = "1" ]; then
+ echo "# Enable PITFT28c display" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
+ echo "dtoverlay=pitft28-capacitive,rotate=90,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
+ echo "dtoverlay=pitft28-capacitive,touch-swapxy,touch-invx" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
fi
if [ "${PITFT35r}" = "1" ]; then
- echo "# Enable PITFT35r display" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
- echo "dtoverlay=pitft35-resistive,rotate=90,speed=42000000,fps=20" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ echo "# Enable PITFT35r display" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
+ echo "dtoverlay=pitft35-resistive,rotate=90,speed=42000000,fps=20" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
fi
# UART support
if [ "${ENABLE_UART}" = "1" ]; then
- echo "# Enable UART" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
- echo "enable_uart=1" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ echo "# Enable UART" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
+ echo "enable_uart=1" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
+ fi
+
+ # Infrared support
+ if [ "${ENABLE_IR}" = "1" ]; then
+ echo "# Enable infrared" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
+ echo "dtoverlay=gpio-ir,gpio_pin=${GPIO_IR}" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
+ echo "dtoverlay=gpio-ir-tx,gpio_pin=${GPIO_IR_TX}" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
fi
# VC4 Graphics support
if [ "${VC4GRAPHICS}" = "1" ]; then
- echo "# Enable VC4 Graphics" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
- echo "dtoverlay=${VC4DTBO}" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ echo "# Enable VC4 Graphics" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
+ echo "dtoverlay=${VC4DTBO}" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
fi
# Waveshare "C" 1024x600 7" Rev2.1 IPS capacitive touch (http://www.waveshare.com/7inch-HDMI-LCD-C.htm)
if [ "${WAVESHARE_1024X600_C_2_1}" = "1" ]; then
- echo "# Waveshare \"C\" 1024x600 7\" Rev2.1 IPS capacitive touch screen" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
- echo "max_usb_current=1" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
- echo "hdmi_group=2" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
- echo "hdmi_mode=87" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
- echo "hdmi_cvt 1024 600 60 6 0 0 0" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
- echo "hdmi_drive=1" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ echo "# Waveshare \"C\" 1024x600 7\" Rev2.1 IPS capacitive touch screen" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
+ echo "max_usb_current=1" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
+ echo "hdmi_group=2" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
+ echo "hdmi_mode=87" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
+ echo "hdmi_cvt 1024 600 60 6 0 0 0" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
+ echo "hdmi_drive=1" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
fi
# DWC2 USB peripheral support
if [ "${ENABLE_DWC2_PERIPHERAL}" = "1" ]; then
- echo "# Enable USB peripheral mode" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
- echo "dtoverlay=dwc2,dr_mode=peripheral" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ echo "# Enable USB peripheral mode" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
+ echo "dtoverlay=dwc2,dr_mode=peripheral" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
fi
# AT86RF23X support
if [ "${ENABLE_AT86RF}" = "1" ]; then
- echo "# Enable AT86RF23X" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
- echo "dtoverlay=at86rf233,speed=3000000" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ echo "# Enable AT86RF23X" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
+ echo "dtoverlay=at86rf233,speed=3000000" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
+ fi
+
+ # ENABLE CAN
+ if [ "${ENABLE_CAN}" = "1" ]; then
+ echo "# Enable CAN" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
+ echo "dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=25" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
fi
# Append extra config if the user has provided any
- printf "${RPI_EXTRA_CONFIG}\n" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ printf "${RPI_EXTRA_CONFIG}\n" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
+
+ # Handle setup with armstub file
+ if [ "${@bb.utils.contains("MACHINE_FEATURES", "armstub", "1", "0", d)}" = "1" ]; then
+ echo "\n# ARM stub configuration" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
+ echo "armstub=${ARMSTUB}" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
+ case "${ARMSTUB}" in
+ *-gic.bin)
+ echo "enable_gic=1" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
+ ;;
+ esac
+ fi
}
do_deploy_append_raspberrypi3-64() {
- echo "# have a properly sized image" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
- echo "disable_overscan=1" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ echo "# have a properly sized image" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
+ echo "disable_overscan=1" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
- echo "# Enable audio (loads snd_bcm2835)" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
- echo "dtparam=audio=on" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ echo "# Enable audio (loads snd_bcm2835)" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
+ echo "dtparam=audio=on" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
}
addtask deploy before do_build after do_install
-do_deploy[dirs] += "${DEPLOYDIR}/bcm2835-bootfiles"
+do_deploy[dirs] += "${DEPLOYDIR}/${BOOTFILES_DIR_NAME}"
PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/bsp/meta-raspberrypi/recipes-bsp/common/firmware.inc b/bsp/meta-raspberrypi/recipes-bsp/common/firmware.inc
deleted file mode 100644
index 37cd343f..00000000
--- a/bsp/meta-raspberrypi/recipes-bsp/common/firmware.inc
+++ /dev/null
@@ -1,11 +0,0 @@
-RPIFW_DATE ?= "20190212"
-SRCREV ?= "83977fe3b6ef54c1d29c83b0a778d330f523441f"
-RPIFW_SRC_URI ?= "https://github.com/raspberrypi/firmware/archive/${SRCREV}.tar.gz"
-RPIFW_S ?= "${WORKDIR}/firmware-${SRCREV}"
-
-SRC_URI = "${RPIFW_SRC_URI}"
-SRC_URI[md5sum] = "5ccdb5447cbdd3ee0158a514f7b76cb9"
-SRC_URI[sha256sum] = "9a34ccc4a51695a33206cc6c8534f615ba5a30fcbce5fa3add400ecc6b80ad8a"
-
-
-PV = "${RPIFW_DATE}"
diff --git a/bsp/meta-raspberrypi/recipes-bsp/common/raspberrypi-firmware.inc b/bsp/meta-raspberrypi/recipes-bsp/common/raspberrypi-firmware.inc
new file mode 100644
index 00000000..d4d2e3ca
--- /dev/null
+++ b/bsp/meta-raspberrypi/recipes-bsp/common/raspberrypi-firmware.inc
@@ -0,0 +1,10 @@
+RPIFW_DATE ?= "20200713"
+SRCREV ?= "7e74bcb4f9706f36f752d1c3d3164628ccf2aae5"
+RPIFW_SRC_URI ?= "https://github.com/raspberrypi/firmware/archive/${SRCREV}.tar.gz"
+RPIFW_S ?= "${WORKDIR}/firmware-${SRCREV}"
+
+SRC_URI = "${RPIFW_SRC_URI}"
+SRC_URI[md5sum] = "46a19d68b81f388443394492dd6a873c"
+SRC_URI[sha256sum] = "f987cafcbc72179493673191e3e4aa8c1f18eccf871546be5d26156abbf8eff1"
+
+PV = "${RPIFW_DATE}"
diff --git a/bsp/meta-raspberrypi/recipes-bsp/common/raspberrypi-tools.inc b/bsp/meta-raspberrypi/recipes-bsp/common/raspberrypi-tools.inc
new file mode 100644
index 00000000..0d4c627c
--- /dev/null
+++ b/bsp/meta-raspberrypi/recipes-bsp/common/raspberrypi-tools.inc
@@ -0,0 +1,9 @@
+SRCREV ?= "b0c869bc929587a7e1d20a98e2dc828a24ca396a"
+RPITOOLS_SRC_URI ?= "https://github.com/raspberrypi/tools/archive/${SRCREV}.tar.gz"
+RPITOOLS_S ?= "${WORKDIR}/tools-${SRCREV}"
+
+SRC_URI = "${RPITOOLS_SRC_URI}"
+SRC_URI[md5sum] = "fd999aad4424088b5e8746a9d946bb56"
+SRC_URI[sha256sum] = "a0a8aff308d9302318442e6bcd2df14cbbb3b633f12ca6b9c43c4ab69bf45bb1"
+
+PV = "0.0+git${SRCREV}"
diff --git a/bsp/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/files/boot.cmd.in b/bsp/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/files/boot.cmd.in
index ad54cd06..627d1815 100644
--- a/bsp/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/files/boot.cmd.in
+++ b/bsp/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/files/boot.cmd.in
@@ -1,3 +1,4 @@
fdt addr ${fdt_addr} && fdt get value bootargs /chosen bootargs
fatload mmc 0:1 ${kernel_addr_r} @@KERNEL_IMAGETYPE@@
+if test ! -e mmc 0:1 uboot.env; then saveenv; fi;
@@KERNEL_BOOTCMD@@ ${kernel_addr_r} - ${fdt_addr}
diff --git a/bsp/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bb b/bsp/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bb
index 593fc903..4cb8978e 100644
--- a/bsp/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bb
+++ b/bsp/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bb
@@ -24,3 +24,5 @@ do_deploy() {
}
addtask do_deploy after do_compile before do_build
+
+PROVIDES += "u-boot-default-script"
diff --git a/bsp/meta-raspberrypi/recipes-bsp/u-boot/files/fw_env.config b/bsp/meta-raspberrypi/recipes-bsp/u-boot/files/fw_env.config
new file mode 100644
index 00000000..d00df0cb
--- /dev/null
+++ b/bsp/meta-raspberrypi/recipes-bsp/u-boot/files/fw_env.config
@@ -0,0 +1 @@
+/boot/uboot.env 0x0000 0x4000
diff --git a/bsp/meta-raspberrypi/recipes-bsp/u-boot/libubootenv_%.bbappend b/bsp/meta-raspberrypi/recipes-bsp/u-boot/libubootenv_%.bbappend
new file mode 100644
index 00000000..22d1bdc4
--- /dev/null
+++ b/bsp/meta-raspberrypi/recipes-bsp/u-boot/libubootenv_%.bbappend
@@ -0,0 +1,12 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+SRC_URI_append_rpi = " \
+ file://fw_env.config \
+"
+
+DEPENDS_append_rpi = " rpi-u-boot-scr"
+
+do_install_append_rpi () {
+ install -d ${D}${sysconfdir}
+ install -m 0644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config
+}
diff --git a/bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot/0001-dm-core-Move-ofdata_to_platdata-call-earlier.patch b/bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot/0001-dm-core-Move-ofdata_to_platdata-call-earlier.patch
new file mode 100644
index 00000000..996ad107
--- /dev/null
+++ b/bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot/0001-dm-core-Move-ofdata_to_platdata-call-earlier.patch
@@ -0,0 +1,51 @@
+From 336d86ebd146905cf4384912f4f27699b6e37c72 Mon Sep 17 00:00:00 2001
+From: Simon Glass <sjg@chromium.org>
+Date: Sun, 29 Dec 2019 21:19:17 -0700
+Subject: [PATCH] dm: core: Move ofdata_to_platdata() call earlier
+
+This method is supposed to extract platform data from the device tree. It
+should be done before the device itself is probed. Move it earlier in the
+device_probe() function.
+
+Upstream-Status: Backport
+
+Signed-off-by: Simon Glass <sjg@chromium.org>
+---
+ drivers/core/device.c | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/drivers/core/device.c b/drivers/core/device.c
+index 4e03708..291ff4c 100644
+--- a/drivers/core/device.c
++++ b/drivers/core/device.c
+@@ -375,6 +375,13 @@ int device_probe(struct udevice *dev)
+ return 0;
+ }
+
++ if (drv->ofdata_to_platdata &&
++ (CONFIG_IS_ENABLED(OF_PLATDATA) || dev_has_of_node(dev))) {
++ ret = drv->ofdata_to_platdata(dev);
++ if (ret)
++ goto fail;
++ }
++
+ seq = uclass_resolve_seq(dev);
+ if (seq < 0) {
+ ret = seq;
+@@ -411,13 +418,6 @@ int device_probe(struct udevice *dev)
+ goto fail;
+ }
+
+- if (drv->ofdata_to_platdata &&
+- (CONFIG_IS_ENABLED(OF_PLATDATA) || dev_has_of_node(dev))) {
+- ret = drv->ofdata_to_platdata(dev);
+- if (ret)
+- goto fail;
+- }
+-
+ /* Only handle devices that have a valid ofnode */
+ if (dev_of_valid(dev)) {
+ /*
+--
+2.7.4
+
diff --git a/bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot_%.bbappend b/bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot_%.bbappend
index 95015f49..40b4fc0a 100644
--- a/bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot_%.bbappend
+++ b/bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot_%.bbappend
@@ -1 +1,5 @@
-DEPENDS_append_rpi = " rpi-u-boot-scr"
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+DEPENDS_append_rpi = " u-boot-default-script"
+
+SRC_URI_append_raspberrypi-cm3 = " file://0001-dm-core-Move-ofdata_to_platdata-call-earlier.patch"