diff options
Diffstat (limited to 'import-layers/meta-raspberrypi/recipes-bsp')
5 files changed, 164 insertions, 0 deletions
diff --git a/import-layers/meta-raspberrypi/recipes-bsp/bootfiles/bcm2835-bootfiles.bb b/import-layers/meta-raspberrypi/recipes-bsp/bootfiles/bcm2835-bootfiles.bb new file mode 100644 index 000000000..b279e1551 --- /dev/null +++ b/import-layers/meta-raspberrypi/recipes-bsp/bootfiles/bcm2835-bootfiles.bb @@ -0,0 +1,39 @@ +DESCRIPTION = "Closed source binary files to help boot the ARM on the BCM2835." +LICENSE = "Proprietary" + +LIC_FILES_CHKSUM = "file://LICENCE.broadcom;md5=4a4d169737c0786fb9482bb6d30401d1" + +inherit deploy + +include recipes-bsp/common/firmware.inc + +RDEPENDS_${PN} = "rpi-config" + +COMPATIBLE_MACHINE = "raspberrypi" + +S = "${RPIFW_S}/boot" + +PR = "r3" + +do_deploy() { + install -d ${DEPLOYDIR}/${PN} + + for i in ${S}/*.elf ; do + cp $i ${DEPLOYDIR}/${PN} + done + for i in ${S}/*.dat ; do + cp $i ${DEPLOYDIR}/${PN} + done + for i in ${S}/*.bin ; do + cp $i ${DEPLOYDIR}/${PN} + done + + # Add stamp in deploy directory + touch ${DEPLOYDIR}/${PN}/${PN}-${PV}.stamp +} + +addtask deploy before do_package after do_install +do_deploy[dirs] += "${DEPLOYDIR}/${PN}" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + diff --git a/import-layers/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bb b/import-layers/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bb new file mode 100644 index 000000000..4bc8eb73d --- /dev/null +++ b/import-layers/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bb @@ -0,0 +1,110 @@ +DESCRIPTION = "Commented config.txt file for the Raspberry Pi. \ + The Raspberry Pi config.txt file is read by the GPU before \ + the ARM core is initialised. It can be used to set various \ + system configuration parameters." +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +COMPATIBLE_MACHINE = "raspberrypi" + +SRCREV = "648ffc470824c43eb0d16c485f4c24816b32cd6f" +SRC_URI = "git://github.com/Evilpaul/RPi-config.git;protocol=git;branch=master \ + " + +S = "${WORKDIR}/git" + +PR = "r4" + +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)}" + +inherit deploy + +do_deploy() { + install -d ${DEPLOYDIR}/bcm2835-bootfiles + + cp ${S}/config.txt ${DEPLOYDIR}/bcm2835-bootfiles/ + + if [ -n "${KEY_DECODE_MPG2}" ]; then + sed -i '/#decode_MPG2/ c\decode_MPG2=${KEY_DECODE_MPG2}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + fi + if [ -n "${KEY_DECODE_WVC1}" ]; then + sed -i '/#decode_WVC1/ c\decode_WVC1=${KEY_DECODE_WVC1}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + fi + if [ -n "${DISABLE_OVERSCAN}" ]; then + sed -i '/#disable_overscan/ c\disable_overscan=${DISABLE_OVERSCAN}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + fi + if [ -n "${ARM_FREQ}" ]; then + sed -i '/#arm_freq/ c\arm_freq=${ARM_FREQ}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + fi + if [ -n "${CORE_FREQ}" ]; then + sed -i '/#core_freq/ c\core_freq=${CORE_FREQ}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + fi + if [ -n "${SDRAM_FREQ}" ]; then + sed -i '/#sdram_freq/ c\sdram_freq=${SDRAM_FREQ}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + fi + if [ -n "${OVER_VOLTAGE}" ]; then + sed -i '/#over_voltage/ c\over_voltage=${OVER_VOLTAGE}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + fi + + # GPU memory + if [ -n "${GPU_MEM}" ]; then + sed -i '/#gpu_mem=/ c\gpu_mem=${GPU_MEM}' ${DEPLOYDIR}/bcm2835-bootfiles/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 + fi + if [ -n "${GPU_MEM_512}" ]; then + sed -i '/#gpu_mem_512/ c\gpu_mem_512=${GPU_MEM_512}' ${DEPLOYDIR}/bcm2835-bootfiles/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 + 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 + 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 + 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 + fi + + 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 + 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 + 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 + 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 + fi +} + +addtask deploy before do_package after do_install +do_deploy[dirs] += "${DEPLOYDIR}/bcm2835-bootfiles" + +PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/import-layers/meta-raspberrypi/recipes-bsp/common/firmware.inc b/import-layers/meta-raspberrypi/recipes-bsp/common/firmware.inc new file mode 100644 index 000000000..9df61565c --- /dev/null +++ b/import-layers/meta-raspberrypi/recipes-bsp/common/firmware.inc @@ -0,0 +1,8 @@ +RPIFW_SRCREV ?= "390f53ed0fd79df274bdcc81d99e09fa262f03ab" +RPIFW_DATE ?= "20160622" +RPIFW_SRC_URI ?= "git://github.com/raspberrypi/firmware.git;protocol=git;branch=master" +RPIFW_S ?= "${WORKDIR}/git" + +SRC_URI = "${RPIFW_SRC_URI}" +SRCREV = "${RPIFW_SRCREV}" +PV = "${RPIFW_DATE}" diff --git a/import-layers/meta-raspberrypi/recipes-bsp/formfactor/formfactor/raspberrypi/machconfig b/import-layers/meta-raspberrypi/recipes-bsp/formfactor/formfactor/raspberrypi/machconfig new file mode 100644 index 000000000..bef4ce3c9 --- /dev/null +++ b/import-layers/meta-raspberrypi/recipes-bsp/formfactor/formfactor/raspberrypi/machconfig @@ -0,0 +1,6 @@ +HAVE_TOUCHSCREEN=0 +HAVE_KEYBOARD=1 + +DISPLAY_CAN_ROTATE=0 +DISPLAY_ORIENTATION=0 +DISPLAY_DPI=133 diff --git a/import-layers/meta-raspberrypi/recipes-bsp/formfactor/formfactor_0.0.bbappend b/import-layers/meta-raspberrypi/recipes-bsp/formfactor/formfactor_0.0.bbappend new file mode 100644 index 000000000..72d991c7e --- /dev/null +++ b/import-layers/meta-raspberrypi/recipes-bsp/formfactor/formfactor_0.0.bbappend @@ -0,0 +1 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" |