1 Commits

Author SHA1 Message Date
1ad98cf651 README: Modify dependencies for danny branch
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2012-10-29 20:18:20 +02:00
132 changed files with 1599 additions and 7550 deletions

5
.gitignore vendored
View File

@ -1,5 +0,0 @@
build*
*~
.*.swp
*.orig
*.rej

407
README

File diff suppressed because it is too large Load Diff

View File

@ -1,39 +0,0 @@
inherit linux-kernel-base
def get_dts(d, ver):
staging_dir = d.getVar("STAGING_KERNEL_BUILDDIR", True)
dts = d.getVar("KERNEL_DEVICETREE", True)
# d.getVar() might return 'None' as a normal string
# leading to 'is None' check isn't enough.
# TODO: Investigate if this is a bug in bitbake
if ver is None or ver == "None":
''' if 'ver' isn't set try to grab the kernel version
from the kernel staging '''
ver = get_kernelversion_file(staging_dir)
if ver is not None:
min_ver = ver.split('.', 3)
else:
return dts
# Always turn off device tree support for kernel's < 3.18
try:
if int(min_ver[0]) <= 3:
if int(min_ver[1]) < 18:
dts = ""
except IndexError:
min_ver = None
return dts
def split_overlays(d, out):
dts = get_dts(d, None)
if out:
overlays = oe.utils.str_filter_out('\S+\-overlay\.dtb$', dts, d)
else:
overlays = oe.utils.str_filter('\S+\-overlay\.dtb$', dts, d)
return overlays

View File

@ -1,5 +1,4 @@
inherit image_types
inherit linux-raspberrypi-base
#
# Create an image that can by written onto a SD card using dd.
@ -14,122 +13,88 @@ inherit linux-raspberrypi-base
# Default Free space = 1.3x
# Use IMAGE_OVERHEAD_FACTOR to add more space
# <--------->
# 4MiB 40MiB SDIMG_ROOTFS
# 4KiB 20MiB SDIMG_ROOTFS
# <-----------------------> <----------> <---------------------->
# ------------------------ ------------ ------------------------
# | IMAGE_ROOTFS_ALIGNMENT | BOOT_SPACE | ROOTFS_SIZE |
# ------------------------ ------------ ------------------------
# ^ ^ ^ ^
# | | | |
# 0 4MiB 4MiB + 40MiB 4MiB + 40Mib + SDIMG_ROOTFS
# ------------------------ ------------ ------------------------ -------------------------------
# | IMAGE_ROOTFS_ALIGNMENT | BOOT_SPACE | ROOTFS_SIZE | IMAGE_ROOTFS_ALIGNMENT |
# ------------------------ ------------ ------------------------ -------------------------------
# ^ ^ ^ ^ ^
# | | | | |
# 0 4096 4KiB + 20MiB 4KiB + 20Mib + SDIMG_ROOTFS 4KiB + 20MiB + SDIMG_ROOTFS + 4KiB
# This image depends on the rootfs image
IMAGE_TYPEDEP_rpi-sdimg = "${SDIMG_ROOTFS_TYPE}"
# Set kernel and boot loader
IMAGE_BOOTLOADER ?= "bcm2835-bootfiles"
# Set initramfs extension
KERNEL_INITRAMFS ?= ""
# Kernel image name
SDIMG_KERNELIMAGE_raspberrypi ?= "kernel.img"
SDIMG_KERNELIMAGE_raspberrypi2 ?= "kernel7.img"
# Boot partition volume id
BOOTDD_VOLUME_ID ?= "${MACHINE}"
# Boot partition size [in KiB] (will be rounded up to IMAGE_ROOTFS_ALIGNMENT)
BOOT_SPACE ?= "40960"
# Boot partition size [in KiB]
BOOT_SPACE ?= "20480"
# Set alignment to 4MB [in KiB]
IMAGE_ROOTFS_ALIGNMENT = "4096"
# Use an uncompressed ext3 by default as rootfs
SDIMG_ROOTFS_TYPE ?= "ext3"
SDIMG_ROOTFS = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.${SDIMG_ROOTFS_TYPE}"
SDIMG_ROOTFS = "${IMAGE_NAME}.rootfs.${SDIMG_ROOTFS_TYPE}"
RPI_GPU_FIRMWARE ?= "arm192"
IMAGE_DEPENDS_rpi-sdimg = " \
parted-native \
mtools-native \
dosfstools-native \
virtual/kernel:do_deploy \
virtual/kernel \
${IMAGE_BOOTLOADER} \
${@bb.utils.contains('KERNEL_IMAGETYPE', 'uImage', 'u-boot', '',d)} \
"
# SD card image name
SDIMG = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.rpi-sdimg"
# Compression method to apply to SDIMG after it has been created. Supported
# compression formats are "gzip", "bzip2" or "xz". The original .rpi-sdimg file
# is kept and a new compressed file is created if one of these compression
# formats is chosen. If SDIMG_COMPRESSION is set to any other value it is
# silently ignored.
#SDIMG_COMPRESSION ?= ""
# Additional files and/or directories to be copied into the vfat partition from the IMAGE_ROOTFS.
FATPAYLOAD ?= ""
IMAGEDATESTAMP = "${@time.strftime('%Y.%m.%d',time.gmtime())}"
IMAGE_CMD_rpi-sdimg () {
# Align partitions
BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE} + ${IMAGE_ROOTFS_ALIGNMENT} - 1)
BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE_ALIGNED} - ${BOOT_SPACE_ALIGNED} % ${IMAGE_ROOTFS_ALIGNMENT})
SDIMG_SIZE=$(expr ${IMAGE_ROOTFS_ALIGNMENT} + ${BOOT_SPACE_ALIGNED} + $ROOTFS_SIZE)
echo "Creating filesystem with Boot partition ${BOOT_SPACE_ALIGNED} KiB and RootFS $ROOTFS_SIZE KiB"
# Check if we are building with device tree support
DTS="${@get_dts(d, None)}"
SDIMG_SIZE=$(expr ${IMAGE_ROOTFS_ALIGNMENT} + ${BOOT_SPACE_ALIGNED} + $ROOTFS_SIZE + ${IMAGE_ROOTFS_ALIGNMENT})
# Initialize sdcard image file
dd if=/dev/zero of=${SDIMG} bs=1024 count=0 seek=${SDIMG_SIZE}
dd if=/dev/zero of=${SDIMG} bs=1 count=0 seek=$(expr 1024 \* ${SDIMG_SIZE})
# Create partition table
parted -s ${SDIMG} mklabel msdos
# Create boot partition and mark it as bootable
parted -s ${SDIMG} unit KiB mkpart primary fat32 ${IMAGE_ROOTFS_ALIGNMENT} $(expr ${BOOT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT})
parted -s ${SDIMG} set 1 boot on
# Create rootfs partition to the end of disk
parted -s ${SDIMG} -- unit KiB mkpart primary ext2 $(expr ${BOOT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT}) -1s
# Create rootfs partition
parted -s ${SDIMG} unit KiB mkpart primary ext2 $(expr ${BOOT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT}) $(expr ${BOOT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT} \+ ${ROOTFS_SIZE})
parted ${SDIMG} print
# Create a vfat image with boot files
BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDIMG} unit b print | awk '/ 1 / { print substr($4, 1, length($4 -1)) / 512 /2 }')
rm -f ${WORKDIR}/boot.img
mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/* ::/
if test -n "${DTS}"; then
# Device Tree Overlays are assumed to be suffixed by '-overlay.dtb' string and will be put in a dedicated folder
DT_OVERLAYS="${@split_overlays(d, 0)}"
DT_ROOT="${@split_overlays(d, 1)}"
# Copy board device trees to root folder
for DTB in ${DT_ROOT}; do
DTB_BASE_NAME=`basename ${DTB} .dtb`
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTB_BASE_NAME}.dtb ::${DTB_BASE_NAME}.dtb
done
# Copy device tree overlays to dedicated folder
mmd -i ${WORKDIR}/boot.img overlays
for DTB in ${DT_OVERLAYS}; do
DTB_BASE_NAME=`basename ${DTB} .dtb`
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTB_BASE_NAME}.dtb ::overlays/${DTB_BASE_NAME}.dtb
done
fi
case "${KERNEL_IMAGETYPE}" in
"uImage")
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/u-boot.bin ::${SDIMG_KERNELIMAGE}
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin ::uImage
;;
*)
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin ::${SDIMG_KERNELIMAGE}
;;
case "${RPI_GPU_FIRMWARE}" in
"arm128" | "arm192" | "arm224" | "arm240")
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/${RPI_GPU_FIRMWARE}_start.elf ::start.elf
;;
*)
bberror "RPI_GPU_FIRMWARE is undefined or value not recognised. Possible values: arm128, arm192, arm224 or arm240."
exit 1
;;
esac
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/config.txt ::
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/cmdline.txt ::
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/bootcode.bin ::
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/loader.bin ::
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin ::kernel.img
if [ -n ${FATPAYLOAD} ] ; then
echo "Copying payload into VFAT"
for entry in ${FATPAYLOAD} ; do
@ -139,31 +104,18 @@ IMAGE_CMD_rpi-sdimg () {
fi
# Add stamp file
echo "${IMAGE_NAME}" > ${WORKDIR}/image-version-info
mcopy -i ${WORKDIR}/boot.img -v ${WORKDIR}/image-version-info ::
echo "${IMAGE_NAME}-${IMAGEDATESTAMP}" > ${WORKDIR}/image-version-info
mcopy -i ${WORKDIR}/boot.img -v ${WORKDIR}//image-version-info ::
# Burn Partitions
dd if=${WORKDIR}/boot.img of=${SDIMG} conv=notrunc seek=1 bs=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync
# If SDIMG_ROOTFS_TYPE is a .xz file use xzcat
if echo "${SDIMG_ROOTFS_TYPE}" | egrep -q "*\.xz"
if [[ "$SDIMG_ROOTFS_TYPE" == *.xz ]]
then
xzcat ${SDIMG_ROOTFS} | dd of=${SDIMG} conv=notrunc seek=1 bs=$(expr 1024 \* ${BOOT_SPACE_ALIGNED} + ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync
else
dd if=${SDIMG_ROOTFS} of=${SDIMG} conv=notrunc seek=1 bs=$(expr 1024 \* ${BOOT_SPACE_ALIGNED} + ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync
fi
# Optionally apply compression
case "${SDIMG_COMPRESSION}" in
"gzip")
gzip -k9 "${SDIMG}"
;;
"bzip2")
bzip2 -k9 "${SDIMG}"
;;
"xz")
xz -k "${SDIMG}"
;;
esac
}
ROOTFS_POSTPROCESS_COMMAND += " rpi_generate_sysctl_config ; "

View File

@ -2,13 +2,9 @@
BBPATH .= ":${LAYERDIR}"
# We have a recipes directory containing .bb and .bbappend files, add to BBFILES
BBFILES += "${LAYERDIR}/recipes*/*/*.bb \
BBFILES := "${BBFILES} ${LAYERDIR}/recipes*/*/*.bb \
${LAYERDIR}/recipes*/*/*.bbappend"
BBFILE_COLLECTIONS += "raspberrypi"
BBFILE_PATTERN_raspberrypi := "^${LAYERDIR}/"
BBFILE_PRIORITY_raspberrypi = "9"
# Additional license directories.
LICENSE_PATH += "${LAYERDIR}/files/custom-licenses"
BBFILE_PRIORITY_raspberrypi = "6"

View File

@ -1,53 +0,0 @@
include conf/machine/include/rpi-default-settings.inc
include conf/machine/include/rpi-default-versions.inc
include conf/machine/include/rpi-default-providers.inc
SOC_FAMILY = "rpi"
include conf/machine/include/soc-family.inc
IMAGE_FSTYPES ?= "tar.bz2 ext3 rpi-sdimg"
XSERVER = " \
xserver-xorg \
xf86-input-evdev \
xf86-input-mouse \
xf86-input-keyboard \
xf86-video-fbdev \
"
# Really supported starting from linux-raspberrypi 3.18.y only
KERNEL_DEVICETREE ?= " \
bcm2708-rpi-b.dtb \
bcm2708-rpi-b-plus.dtb \
bcm2709-rpi-2-b.dtb \
bcm2710-rpi-3-b.dtb \
\
overlays/hifiberry-amp-overlay.dtb \
overlays/hifiberry-dac-overlay.dtb \
overlays/hifiberry-dacplus-overlay.dtb \
overlays/hifiberry-digi-overlay.dtb \
overlays/i2c-rtc-overlay.dtb \
overlays/iqaudio-dac-overlay.dtb \
overlays/iqaudio-dacplus-overlay.dtb \
overlays/lirc-rpi-overlay.dtb \
overlays/pitft22-overlay.dtb \
overlays/pitft28-resistive-overlay.dtb \
overlays/pps-gpio-overlay.dtb \
overlays/rpi-ft5406-overlay.dtb \
overlays/w1-gpio-overlay.dtb \
overlays/w1-gpio-pullup-overlay.dtb \
overlays/pi3-miniuart-bt-overlay.dtb \
"
KERNEL_IMAGETYPE ?= "Image"
MACHINE_FEATURES += "apm usbhost keyboard vfat ext2 screen touchscreen alsa bluetooth wifi sdio"
# Raspberry Pi has no hardware clock
MACHINE_FEATURES_BACKFILL_CONSIDERED = "rtc"
MACHINE_EXTRA_RRECOMMENDS += " kernel-modules"
# Set Raspberrypi splash image
SPLASH = "psplash-raspberrypi"
IMAGE_BOOT_FILES ?= "bcm2835-bootfiles/* ${KERNEL_IMAGETYPE};${SDIMG_KERNELIMAGE}"

View File

@ -1,9 +1,7 @@
# RaspberryPi BSP default providers
PREFERRED_PROVIDER_virtual/kernel ?= "linux-raspberrypi"
PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
PREFERRED_PROVIDER_virtual/egl ?= "userland"
PREFERRED_PROVIDER_virtual/libgles2 ?= "userland"
PREFERRED_PROVIDER_virtual/libgl ?= "mesa-gl"
PREFERRED_PROVIDER_virtual/mesa ?= "mesa-gl"
PREFERRED_PROVIDER_jpeg ?= "jpeg"
PREFERRED_PROVIDER_virtual/kernel = "linux-raspberrypi"
PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg"
PREFERRED_PROVIDER_virtual/egl ?= "vc-graphics-hardfp"
PREFERRED_PROVIDER_virtual/libgles2 ?= "vc-graphics-hardfp"
PREFERRED_PROVIDER_virtual/libgl ?= "vc-graphics-hardfp"

View File

@ -1,3 +1,3 @@
# RaspberryPi BSP default versions
PREFERRED_VERSION_linux-raspberrypi ?= "4.1.%"
PREFERRED_VERSION_udev = "164"

View File

@ -1,15 +1,10 @@
DEFAULTTUNE ?= "armv6"
DEFAULTTUNE ?= "arm1176jzfs"
require conf/machine/include/arm/arch-armv6.inc
TUNEVALID[arm1176jzfs] = "Enable arm1176jzfs specific processor optimizations"
TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "arm1176jzfs", "-mtune=arm1176jzf-s", "", d)}"
TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "vfp", "-mfpu=vfp", "", d)}"
AVAILTUNES += "arm1176jzfs arm1176jzfshf"
ARMPKGARCH_tune-arm1176jzfs = "arm1176jzfs"
ARMPKGARCH_tune-arm1176jzfshf = "arm1176jzfs"
AVAILTUNES += "arm1176jzfs"
TUNE_FEATURES_tune-arm1176jzfs = "${TUNE_FEATURES_tune-armv6} arm1176jzfs"
TUNE_FEATURES_tune-arm1176jzfshf = "${TUNE_FEATURES_tune-arm1176jzfs} callconvention-hard"
PACKAGE_EXTRA_ARCHS_tune-arm1176jzfs = "${PACKAGE_EXTRA_ARCHS_tune-armv6}"
PACKAGE_EXTRA_ARCHS_tune-arm1176jzfshf = "${PACKAGE_EXTRA_ARCHS_tune-armv6hf} arm1176jzfshf-vfp"

View File

@ -1,12 +1,37 @@
#@TYPE: Machine
#@NAME: RaspberryPi Development Board
#@DESCRIPTION: Machine configuration for the RaspberryPi http://www.raspberrypi.org/ Board
#@MAINTAINER: John Willis
DEFAULTTUNE ?= "arm1176jzfshf"
include conf/machine/include/rpi-default-settings.inc
include conf/machine/include/rpi-default-versions.inc
include conf/machine/include/rpi-default-providers.inc
require conf/machine/include/tune-arm1176jzf-s.inc
include conf/machine/include/rpi-base.inc
IMAGE_FSTYPES ?= "tar.bz2 ext3 rpi-sdimg"
SERIAL_CONSOLE = "115200 ttyAMA0"
UBOOT_MACHINE = "rpi_config"
MACHINE_KERNEL_PR = "r4"
XSERVER = " \
xserver-xorg \
xf86-input-evdev \
xf86-input-mouse \
xf86-input-keyboard \
xf86-video-fbdev \
"
KERNEL_IMAGETYPE = "Image"
MACHINE_FEATURES = "kernel26 apm usbgadget usbhost keyboard vfat ext2 screen touchscreen alsa bluetooth wifi sdio"
#RaspberryPi has no hardware clock
MACHINE_FEATURES_BACKFILL_CONSIDERED = "rtc"
MACHINE_EXTRA_RRECOMMENDS += " \
kernel-modules \
"
# Set default GPU firmware image to be shipped
RPI_GPU_FIRMWARE ?= "arm192"

View File

@ -1,8 +0,0 @@
#@TYPE: Machine
#@NAME: RaspberryPi Zero Development Board
#@DESCRIPTION: Machine configuration for the RaspberryPi Zero board (https://www.raspberrypi.org/blog/raspberry-pi-zero)
MACHINEOVERRIDES = "raspberrypi:${MACHINE}"
include conf/machine/raspberrypi.conf
SERIAL_CONSOLE = "115200 ttyAMA0"

View File

@ -1,12 +0,0 @@
#@TYPE: Machine
#@NAME: RaspberryPi 2 Development Board
#@DESCRIPTION: Machine configuration for the RaspberryPi 2
DEFAULTTUNE ?= "cortexa7thf-neon-vfpv4"
require conf/machine/include/tune-cortexa7.inc
include conf/machine/include/rpi-base.inc
SERIAL_CONSOLE = "115200 ttyAMA0"
UBOOT_MACHINE = "rpi_2_config"

View File

@ -1,11 +0,0 @@
#@TYPE: Machine
#@NAME: RaspberryPi 3 Development Board
#@DESCRIPTION: Machine configuration for the RaspberryPi 3
MACHINEOVERRIDES = "raspberrypi2:${MACHINE}"
MACHINE_EXTRA_RRECOMMENDS += "linux-firmware-brcm43430"
include conf/machine/raspberrypi2.conf
SERIAL_CONSOLE = "115200 ttyS0"

View File

@ -1,25 +0,0 @@
Copyright (c) 2012, Broadcom Europe Ltd
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the copyright holder nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@ -5,36 +5,38 @@ SECTION = "base"
HOMEPAGE = "http://www.open.com.au/mikem/bcm2835"
AUTHOR = "Mike McCauley (mikem@open.com.au)"
LICENSE = "GPLv2"
LICENSE = "GPL-2.0"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
PR = "r0"
COMPATIBLE_MACHINE = "raspberrypi"
SRC_URI = "http://www.airspayce.com/mikem/bcm2835/bcm2835-${PV}.tar.gz"
SRC_URI = "http://www.open.com.au/mikem/bcm2835/bcm2835-1.8.tar.gz"
SRC_URI[md5sum] = "258caf3437012d09a651e1852d0bd60c"
SRC_URI[sha256sum] = "52180b8a61b6546c1df4aed259d0a4d2fa56e50605e0d4d967a76bf2b23dafb8"
inherit autotools
do_compile_append() {
# Now compiling the examples provided by the package
mkdir -p ${B}/examples
for file in `ls ${S}/examples`; do
${CC} ${LDFLAGS} ${S}/examples/${file}/${file}.c -o ${B}/examples/${file} -Bstatic -L${B}/src -lbcm2835 -I${S}/src
done
}
do_install_append() {
install -d ${D}/${libdir}/${BPN}
for file in ${B}/examples/*
do
install -m 0755 ${file} ${D}/${libdir}/${BPN}
done
}
SRC_URI[md5sum] = "cca8500049d4ebf9087de4bd1601d185"
SRC_URI[sha256sum] = "64be77b10aaf48ecb2a9022e13057f3b564093916875c0fc56373b4142dd5cae"
PACKAGES += "${PN}-tests"
FILES_${PN} = ""
FILES_${PN}-tests = "${libdir}/${BPN}"
FILES_${PN}-dbg += "${libdir}/${BPN}/.debug"
inherit autotools
do_compile_append() {
#Now compiling the examples provided by the package
for file in examples/*
do
${CC} ${file}/${file##*/}.c -o ${file}/${file##*/} -Bstatic -L${S}/src -lbcm2835 -I${S}/src
done
}
do_install_append() {
install -d ${D}/${libdir}/${BPN}
for file in examples/*
do
install -m 0755 ${file}/${file##*/} ${D}/${libdir}/${BPN}
done
}

View File

@ -0,0 +1,34 @@
DESCRIPTION = "Closed source binary files to help boot the ARM on the BCM2835."
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://LICENCE.broadcom;md5=e86e693d19572ee64cc8b17fb062faa9"
include ../common/firmware.inc
RDEPENDS_${PN} = "rpi-config"
COMPATIBLE_MACHINE = "raspberrypi"
SRC_URI = " \
git://github.com/raspberrypi/firmware.git;protocol=git;branch=master \
"
S = "${WORKDIR}/git/boot"
PR = "r2"
addtask deploy before do_package after do_install
do_deploy() {
install -d ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles
for i in *.elf ; do
cp $i ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles
done
for i in *.bin ; do
cp $i ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles
done
# Add stamp in deploy directory
touch ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/${PN}-${PV}.stamp
}
PACKAGE_ARCH = "${MACHINE_ARCH}"

View File

@ -0,0 +1,46 @@
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 = "afeaed02ba5f01298dec3ac4e1bd98f27bcd876e"
SRC_URI = "git://github.com/Evilpaul/RPi-config.git;protocol=git;branch=master \
"
S = "${WORKDIR}/git"
PR = "r1"
addtask deploy before do_package after do_install
do_deploy() {
install -d ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles
cp config.txt ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/
if [ -n "${KEY_DECODE_MPG2}" ]; then
sed -i '/#decode_MPG2/ c\decode_MPG2=${KEY_DECODE_MPG2}' ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/config.txt
fi
if [ -n "${KEY_DECODE_WVC1}" ]; then
sed -i '/#decode_WVC1/ c\decode_MVC1=${KEY_DECODE_WVC1}' ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/config.txt
fi
if [ -n "${DISABLE_OVERSCAN}" ]; then
sed -i '/#disable_overscan/ c\disable_overscan=${DISABLE_OVERSCAN}' ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/config.txt
fi
if [ -n "${ARM_FREQ}" ]; then
sed -i '/#arm_freq/ c\arm_freq=${ARM_FREQ}' ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/config.txt
fi
if [ -n "${CORE_FREQ}" ]; then
sed -i '/#core_freq/ c\core_freq=${CORE_FREQ}' ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/config.txt
fi
if [ -n "${SDRAM_FREQ}" ]; then
sed -i '/#sdram_freq/ c\sdram_freq=${SDRAM_FREQ}' ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/config.txt
fi
if [ -n "${OVER_VOLTAGE}" ]; then
sed -i '/#over_voltage/ c\over_voltage=${OVER_VOLTAGE}' ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/config.txt
fi
}
PACKAGE_ARCH = "${MACHINE_ARCH}"

View File

@ -0,0 +1,6 @@
# 13/09/2012 firmware; this can be overridden from distro config
RPIFW_SRCREV ?= "b616053edb93713efa25299cb4ea7efa439dcb61"
RPIFW_DATE ?= "20120913"
SRCREV = "${RPIFW_SRCREV}"
PV = "${RPIFW_DATE}"

View File

@ -1,6 +1,8 @@
CONFLICTS = "vc-graphics"
VCDIR = "hardfp/opt/vc"
require vc-graphics.inc
PR = "${INCPR}.0"

View File

@ -1,6 +1,8 @@
CONFLICTS = "vc-graphics-hardfp"
VCDIR = "opt/vc"
require vc-graphics.inc
PR = "${INCPR}.0"

View File

@ -3,19 +3,18 @@ LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://LICENCE;md5=86e53f5f5909ee66900418028de11780"
PROVIDES = "virtual/libgles2 virtual/egl"
PROVIDES = "virtual/libgl virtual/libgles2 virtual/egl"
COMPATIBLE_MACHINE = "raspberrypi"
include recipes-bsp/common/firmware.inc
include ../common/firmware.inc
SRC_URI += " \
file://egl.pc \
file://vchiq.sh \
"
SRC_URI = "git://github.com/raspberrypi/firmware.git;protocol=git;branch=master\
file://egl.pc \
file://vchiq.sh"
S = "${RPIFW_S}/${VCDIR}"
S = "${WORKDIR}/git/${VCDIR}"
INCPR = "r1"
INCPR = "r0"
inherit pkgconfig update-rc.d
@ -49,8 +48,6 @@ INITSCRIPT_PARAMS = "start 03 S ."
FILES_${PN} = "${bindir}/* \
${sbindir}/* \
${libdir}/lib*.so \
${sysconfdir}/init.d \
${libdir}/plugins"
${sysconfdir}/init.d"
FILES_${PN}-dev = "${libdir}/pkgconfig \
${includedir}"
FILES_${PN}-dbg += "${libdir}/plugins/.debug"

View File

@ -1,39 +0,0 @@
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}"

View File

@ -1,110 +0,0 @@
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}"

View File

@ -1,8 +0,0 @@
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}"

View File

@ -1 +1,2 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
PRINC = "1"

View File

@ -1,26 +0,0 @@
From b4f2b77472aeb967d3a7595e8a965785c7a37c87 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.org>
Date: Tue, 16 Feb 2016 16:40:46 +0000
Subject: [PATCH 1/4] bcm43xx: Add bcm43xx-3wire variant
---
tools/hciattach.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/hciattach.c b/tools/hciattach.c
index 59a76a7..5861d33 100644
--- a/tools/hciattach.c
+++ b/tools/hciattach.c
@@ -1144,6 +1144,9 @@ struct uart_t uart[] = {
{ "bcm43xx", 0x0000, 0x0000, HCI_UART_H4, 115200, 3000000,
FLOW_CTL, DISABLE_PM, NULL, bcm43xx, NULL },
+ { "bcm43xx-3wire", 0x0000, 0x0000, HCI_UART_3WIRE, 115200, 3000000,
+ 0, DISABLE_PM, NULL, bcm43xx, NULL },
+
{ "ath3k", 0x0000, 0x0000, HCI_UART_ATH3K, 115200, 115200,
FLOW_CTL, DISABLE_PM, NULL, ath3k_ps, ath3k_pm },
--
1.9.1

View File

@ -1,37 +0,0 @@
From e145c9621f976063e5c573db1f2053d906f63427 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.org>
Date: Tue, 16 Feb 2016 16:39:09 +0000
Subject: [PATCH 2/4] bcm43xx: The UART speed must be reset after the firmware download
---
tools/hciattach_bcm43xx.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/tools/hciattach_bcm43xx.c b/tools/hciattach_bcm43xx.c
index 81f38cb..0b792e0 100644
--- a/tools/hciattach_bcm43xx.c
+++ b/tools/hciattach_bcm43xx.c
@@ -366,11 +366,8 @@ int bcm43xx_init(int fd, int def_speed, int speed, struct termios *ti,
return -1;
if (bcm43xx_locate_patch(FIRMWARE_DIR, chip_name, fw_path)) {
- fprintf(stderr, "Patch not found, continue anyway\n");
+ fprintf(stderr, "Patch not found for %s, continue anyway\n", chip_name);
} else {
- if (bcm43xx_set_speed(fd, ti, speed))
- return -1;
-
if (bcm43xx_load_firmware(fd, fw_path))
return -1;
@@ -380,6 +377,7 @@ int bcm43xx_init(int fd, int def_speed, int speed, struct termios *ti,
return -1;
}
+ sleep(1);
if (bcm43xx_reset(fd))
return -1;
}
--
1.9.1

View File

@ -1,25 +0,0 @@
From d41dc2046dd08d8c95197f677e224506f5b39bdd Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.org>
Date: Wed, 20 Jan 2016 16:00:37 +0000
Subject: [PATCH 3/4] Increase firmware load timeout to 30s
---
tools/hciattach.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/hciattach.c b/tools/hciattach.c
index 5861d33..4141796 100644
--- a/tools/hciattach.c
+++ b/tools/hciattach.c
@@ -1293,7 +1293,7 @@ int main(int argc, char *argv[])
{
struct uart_t *u = NULL;
int detach, printpid, raw, opt, i, n, ld, err;
- int to = 10;
+ int to = 30;
int init_speed = 0;
int send_break = 0;
pid_t pid;
--
1.9.1

Some files were not shown because too many files have changed in this diff Show More