mirror of
https://github.com/agherzan/meta-raspberrypi.git
synced 2025-12-06 14:19:12 +00:00
Compare commits
33 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
770b88b2ce | ||
|
|
c5f81306b5 | ||
|
|
8ad03b9533 | ||
|
|
fe5cd81d27 | ||
|
|
53555972bc | ||
|
|
cf25e6fc90 | ||
|
|
7da69cff7c | ||
|
|
592274937b | ||
|
|
201f717a60 | ||
|
|
db2b8af828 | ||
|
|
996990c98f | ||
|
|
33d2e1d7bb | ||
|
|
bff90c7a0d | ||
|
|
e7fdddc4e1 | ||
|
|
b3de8baa2f | ||
|
|
d3ec4b1258 | ||
|
|
e3e92fe903 | ||
|
|
305c5259e2 | ||
|
|
76c6b87958 | ||
|
|
c71508dae6 | ||
|
|
cf62711b7c | ||
|
|
ed0cd94914 | ||
|
|
43faccc504 | ||
|
|
14734e73a3 | ||
|
|
e79ec70804 | ||
|
|
bc7e740348 | ||
|
|
48e0739783 | ||
|
|
d952980bd4 | ||
|
|
4ac170e18b | ||
|
|
cfd5c65469 | ||
|
|
b3a4e96cf9 | ||
|
|
e1e8477a77 | ||
|
|
a74544ac37 |
106
README
106
README
@@ -24,8 +24,22 @@
|
|||||||
....
|
....
|
||||||
|
|
||||||
|
|
||||||
OpenEmbedded BSP Layer - RaspberryPi
|
|
||||||
--------------------------------------
|
Contents:
|
||||||
|
=========
|
||||||
|
1. OpenEmbedded BSP Layer - RaspberryPi
|
||||||
|
2. Yocto BSP Layer - RaspberryPi
|
||||||
|
2.A. Compressed deployed files
|
||||||
|
2.B. GPU memory
|
||||||
|
2.C. Add purchased license codecs
|
||||||
|
2.D. Disable overscan
|
||||||
|
2.E. Set overclocking options
|
||||||
|
3. Contribution
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
1. OpenEmbedded BSP Layer - RaspberryPi
|
||||||
|
=======================================
|
||||||
|
|
||||||
This is the general hardware specific BSP overlay for the RaspberryPi device.
|
This is the general hardware specific BSP overlay for the RaspberryPi device.
|
||||||
It should be used with openembedded-core (not old-style org.openembedded.dev).
|
It should be used with openembedded-core (not old-style org.openembedded.dev).
|
||||||
@@ -35,21 +49,25 @@ More information can be found at:
|
|||||||
http://www.raspberrypi.org/ (Official Site)
|
http://www.raspberrypi.org/ (Official Site)
|
||||||
http://www.distant-earth.com/ (My Site)
|
http://www.distant-earth.com/ (My Site)
|
||||||
|
|
||||||
Build scripts patched to support making a firmware image for the RaspberryPi with Angstrom can be found at:
|
Build scripts patched to support making a firmware image for the RaspberryPi
|
||||||
|
with Angstrom can be found at:
|
||||||
|
|
||||||
http://github.com/Angstrom-distribution/setup-scripts
|
http://github.com/Angstrom-distribution/setup-scripts
|
||||||
|
|
||||||
When not depending on meta-openembedded and not using systemd, you may need to
|
When not depending on meta-openembedded and not using systemd, you may need to
|
||||||
mask few recipes requiring systemd or other recipes not included in your distribution of choice.
|
mask few recipes requiring systemd or other recipes not included in your
|
||||||
|
distribution of choice.
|
||||||
|
|
||||||
You can achieve this by adding something like the following to local.conf:
|
You can achieve this by adding something like the following to local.conf:
|
||||||
|
|
||||||
BBMASK = "meta-raspberrypi/recipes-multimedia/libav|meta-raspberrypi/recipes-core/systemd"
|
BBMASK = "meta-raspberrypi/recipes-multimedia/libav|\
|
||||||
|
meta-raspberrypi/recipes-core/systemd"
|
||||||
|
|
||||||
You can adjust the BBMASK for any .bbappends that your distribution does not contain recipes for.
|
You can adjust the BBMASK for any .bbappends that your distribution does not
|
||||||
|
contain recipes for.
|
||||||
|
|
||||||
The core BSP part of meta-raspberrypi should work with different OpenEmbedded/Yocto
|
The core BSP part of meta-raspberrypi should work with different
|
||||||
distributions and layer stacks, such as:
|
OpenEmbedded/Yocto distributions and layer stacks, such as:
|
||||||
|
|
||||||
* Distro-less (only with OE-Core).
|
* Distro-less (only with OE-Core).
|
||||||
* Angstrom (main focus of testing).
|
* Angstrom (main focus of testing).
|
||||||
@@ -65,13 +83,10 @@ URI: git://git.openembedded.org/meta-openembedded
|
|||||||
branch: master
|
branch: master
|
||||||
revision: HEAD
|
revision: HEAD
|
||||||
|
|
||||||
It is preferred that people raise pull requests using GIThub by forking the appropriate tree:
|
|
||||||
|
|
||||||
https://github.com/djwillis/
|
|
||||||
(More info on achieving this can be found at http://help.github.com/send-pull-requests/)
|
|
||||||
|
|
||||||
Yocto BSP Layer - RaspberryPi
|
2. Yocto BSP Layer - RaspberryPi
|
||||||
-------------------------------
|
================================
|
||||||
|
|
||||||
This layer depends on:
|
This layer depends on:
|
||||||
|
|
||||||
@@ -94,40 +109,42 @@ How to use it:
|
|||||||
5. dd to a SD card the generated sdimg file (use xzcat if rpi-sdimg.xz is used)
|
5. dd to a SD card the generated sdimg file (use xzcat if rpi-sdimg.xz is used)
|
||||||
6. Boot your RPI.
|
6. Boot your RPI.
|
||||||
|
|
||||||
Optional - compressed deployed files:
|
2.A. Optional - compressed deployed files:
|
||||||
=====================================
|
==========================================
|
||||||
1. Overwrite IMAGE_FSTYPES in local.conf
|
1. Overwrite IMAGE_FSTYPES in local.conf
|
||||||
IMAGE_FSTYPES = "tar.bz2 ext3.xz rpi-sdimg.xz
|
IMAGE_FSTYPES = "tar.bz2 ext3.xz rpi-sdimg.xz
|
||||||
2. Overwrite SDIMG_ROOTFS_TYPE in local.conf
|
2. Overwrite SDIMG_ROOTFS_TYPE in local.conf
|
||||||
SDIMG_ROOTFS_TYPE = "ext3.xz"
|
SDIMG_ROOTFS_TYPE = "ext3.xz"
|
||||||
*Accommodate the values above to your own needs (ex: ext3 / ext4).
|
*Accommodate the values above to your own needs (ex: ext3 / ext4).
|
||||||
|
|
||||||
Optional - GPU firmware:
|
2.B. Optional - GPU memory:
|
||||||
========================
|
===========================
|
||||||
By default the GPU firmware shipped is arm192. You can overwrite this using the
|
Variable : Details
|
||||||
variable RPI_GPU_FIRMWARE with one of the values below.
|
GPU_MEM : GPU memory in megabyte. Sets the memory split between the ARM and
|
||||||
# arm128 : 128M ARM, 128M GPU split
|
GPU. ARM gets the remaining memory. Min 16. Default 64.
|
||||||
# arm192 : 192M ARM, 64M GPU split
|
GPU_MEM_256 : GPU memory in megabyte for the 256MB Raspberry Pi. Ignored by the
|
||||||
# arm224 : 224M ARM, 32M GPU split
|
512MB RP. Overrides gpu_mem. Max 192. Default not set.
|
||||||
# arm240 : 240M ARM, 16M GPU split
|
GPU_MEM_512 : GPU memory in megabyte for the 512MB Raspberry Pi. Ignored by the
|
||||||
|
256MB RP. Overrides gpu_mem. Max 448. Default not set.
|
||||||
|
|
||||||
Optional - Add purchased license codecs:
|
2.C.Optional - Add purchased license codecs:
|
||||||
========================================
|
============================================
|
||||||
To add you own licenses use variables KEY_DECODE_MPG2 and KEY_DECODE_WVC1 in local.conf. Example:
|
To add you own licenses use variables KEY_DECODE_MPG2 and KEY_DECODE_WVC1 in
|
||||||
|
local.conf. Example:
|
||||||
KEY_DECODE_MPG2 = "12345678"
|
KEY_DECODE_MPG2 = "12345678"
|
||||||
KEY_DECODE_WVC1 = "12345678"
|
KEY_DECODE_WVC1 = "12345678"
|
||||||
You can supply more licenses separated by comma. Example:
|
You can supply more licenses separated by comma. Example:
|
||||||
KEY_DECODE_WVC1 = "0x12345678,0xabcdabcd,0x87654321"
|
KEY_DECODE_WVC1 = "0x12345678,0xabcdabcd,0x87654321"
|
||||||
|
|
||||||
Optional - Disable overscan:
|
2.D. Optional - Disable overscan:
|
||||||
============================
|
=================================
|
||||||
By default the GPU adds a black border around the video output to compensate for TVs
|
By default the GPU adds a black border around the video output to compensate for
|
||||||
which cut off part of the image. To disable this set this variable in
|
TVs which cut off part of the image. To disable this set this variable in
|
||||||
local.conf:
|
local.conf:
|
||||||
DISALE_OVERSCAN = "0"
|
DISALE_OVERSCAN = "0"
|
||||||
|
|
||||||
Optional - Set overclocking options:
|
2.E. Optional - Set overclocking options:
|
||||||
====================================
|
=========================================
|
||||||
The Raspberry PI can be overclocked. As of now overclocking up to the "Turbo
|
The Raspberry PI can be overclocked. As of now overclocking up to the "Turbo
|
||||||
Mode" is officially supported by the raspbery and does not void warranty.
|
Mode" is officially supported by the raspbery and does not void warranty.
|
||||||
Check the config.txt for a detailed description of options and modes. Example:
|
Check the config.txt for a detailed description of options and modes. Example:
|
||||||
@@ -138,5 +155,28 @@ SDRAM_FREQ = "500"
|
|||||||
OVER_VOLTAGE = "6"
|
OVER_VOLTAGE = "6"
|
||||||
|
|
||||||
|
|
||||||
Layer maintainer: John Willis <John.Willis at distant-earth.com>
|
|
||||||
|
3. Contributing
|
||||||
|
===============
|
||||||
|
|
||||||
|
To contribute to this layer you should send the patches for review to the
|
||||||
|
mailing list.
|
||||||
|
|
||||||
|
Mailing list:
|
||||||
|
|
||||||
|
https://lists.yoctoproject.org/listinfo/yocto
|
||||||
|
|
||||||
|
Source code:
|
||||||
|
|
||||||
|
git://git.yoctoproject.org/meta-raspberrypi
|
||||||
|
http://git.yoctoproject.org/git/meta-raspberrypi
|
||||||
|
https://github.com/djwillis/meta-raspberrypi
|
||||||
|
|
||||||
|
When sending patches, please use something like:
|
||||||
|
|
||||||
|
git send-email --to yocto@yoctoproject.org \
|
||||||
|
--subject-prefix='meta-raspberrypi][PATCH'
|
||||||
|
|
||||||
|
|
||||||
|
Layer maintainers: John Willis <John.Willis at distant-earth.com>
|
||||||
Andrei Gherzan <andrei at gherzan.ro>
|
Andrei Gherzan <andrei at gherzan.ro>
|
||||||
|
|||||||
@@ -13,14 +13,14 @@ inherit image_types
|
|||||||
# Default Free space = 1.3x
|
# Default Free space = 1.3x
|
||||||
# Use IMAGE_OVERHEAD_FACTOR to add more space
|
# Use IMAGE_OVERHEAD_FACTOR to add more space
|
||||||
# <--------->
|
# <--------->
|
||||||
# 4KiB 20MiB SDIMG_ROOTFS
|
# 4MiB 20MiB SDIMG_ROOTFS
|
||||||
# <-----------------------> <----------> <---------------------->
|
# <-----------------------> <----------> <---------------------->
|
||||||
# ------------------------ ------------ ------------------------ -------------------------------
|
# ------------------------ ------------ ------------------------
|
||||||
# | IMAGE_ROOTFS_ALIGNMENT | BOOT_SPACE | ROOTFS_SIZE | IMAGE_ROOTFS_ALIGNMENT |
|
# | IMAGE_ROOTFS_ALIGNMENT | BOOT_SPACE | ROOTFS_SIZE |
|
||||||
# ------------------------ ------------ ------------------------ -------------------------------
|
# ------------------------ ------------ ------------------------
|
||||||
# ^ ^ ^ ^ ^
|
# ^ ^ ^ ^
|
||||||
# | | | | |
|
# | | | |
|
||||||
# 0 4096 4KiB + 20MiB 4KiB + 20Mib + SDIMG_ROOTFS 4KiB + 20MiB + SDIMG_ROOTFS + 4KiB
|
# 0 4MiB 4MiB + 20MiB 4MiB + 20Mib + SDIMG_ROOTFS
|
||||||
|
|
||||||
|
|
||||||
# Set kernel and boot loader
|
# Set kernel and boot loader
|
||||||
@@ -29,7 +29,7 @@ IMAGE_BOOTLOADER ?= "bcm2835-bootfiles"
|
|||||||
# Boot partition volume id
|
# Boot partition volume id
|
||||||
BOOTDD_VOLUME_ID ?= "${MACHINE}"
|
BOOTDD_VOLUME_ID ?= "${MACHINE}"
|
||||||
|
|
||||||
# Boot partition size [in KiB]
|
# Boot partition size [in KiB] (will be rounded up to IMAGE_ROOTFS_ALIGNMENT)
|
||||||
BOOT_SPACE ?= "20480"
|
BOOT_SPACE ?= "20480"
|
||||||
|
|
||||||
# Set alignment to 4MB [in KiB]
|
# Set alignment to 4MB [in KiB]
|
||||||
@@ -39,8 +39,6 @@ IMAGE_ROOTFS_ALIGNMENT = "4096"
|
|||||||
SDIMG_ROOTFS_TYPE ?= "ext3"
|
SDIMG_ROOTFS_TYPE ?= "ext3"
|
||||||
SDIMG_ROOTFS = "${IMAGE_NAME}.rootfs.${SDIMG_ROOTFS_TYPE}"
|
SDIMG_ROOTFS = "${IMAGE_NAME}.rootfs.${SDIMG_ROOTFS_TYPE}"
|
||||||
|
|
||||||
RPI_GPU_FIRMWARE ?= "arm192"
|
|
||||||
|
|
||||||
IMAGE_DEPENDS_rpi-sdimg = " \
|
IMAGE_DEPENDS_rpi-sdimg = " \
|
||||||
parted-native \
|
parted-native \
|
||||||
mtools-native \
|
mtools-native \
|
||||||
@@ -62,37 +60,30 @@ IMAGE_CMD_rpi-sdimg () {
|
|||||||
# Align partitions
|
# Align partitions
|
||||||
BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE} + ${IMAGE_ROOTFS_ALIGNMENT} - 1)
|
BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE} + ${IMAGE_ROOTFS_ALIGNMENT} - 1)
|
||||||
BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE_ALIGNED} - ${BOOT_SPACE_ALIGNED} % ${IMAGE_ROOTFS_ALIGNMENT})
|
BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE_ALIGNED} - ${BOOT_SPACE_ALIGNED} % ${IMAGE_ROOTFS_ALIGNMENT})
|
||||||
SDIMG_SIZE=$(expr ${IMAGE_ROOTFS_ALIGNMENT} + ${BOOT_SPACE_ALIGNED} + $ROOTFS_SIZE + ${IMAGE_ROOTFS_ALIGNMENT})
|
ROOTFS_SIZE=`du -bks ${SDIMG_ROOTFS} | awk '{print $1}'`
|
||||||
|
# Round up RootFS size to the alignment size as well
|
||||||
|
ROOTFS_SIZE_ALIGNED=$(expr ${ROOTFS_SIZE} + ${IMAGE_ROOTFS_ALIGNMENT} - 1)
|
||||||
|
ROOTFS_SIZE_ALIGNED=$(expr ${ROOTFS_SIZE_ALIGNED} - ${ROOTFS_SIZE_ALIGNED} % ${IMAGE_ROOTFS_ALIGNMENT})
|
||||||
|
SDIMG_SIZE=$(expr ${IMAGE_ROOTFS_ALIGNMENT} + ${BOOT_SPACE_ALIGNED} + ${ROOTFS_SIZE_ALIGNED})
|
||||||
|
|
||||||
|
echo "Creating filesystem with Boot partition ${BOOT_SPACE_ALIGNED} KiB and RootFS ${ROOTFS_SIZE_ALIGNED} KiB"
|
||||||
|
|
||||||
# Initialize sdcard image file
|
# Initialize sdcard image file
|
||||||
dd if=/dev/zero of=${SDIMG} bs=1 count=0 seek=$(expr 1024 \* ${SDIMG_SIZE})
|
dd if=/dev/zero of=${SDIMG} bs=1024 count=0 seek=${SDIMG_SIZE}
|
||||||
|
|
||||||
# Create partition table
|
# Create partition table
|
||||||
parted -s ${SDIMG} mklabel msdos
|
parted -s ${SDIMG} mklabel msdos
|
||||||
# Create boot partition and mark it as bootable
|
# 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} unit KiB mkpart primary fat32 ${IMAGE_ROOTFS_ALIGNMENT} $(expr ${BOOT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT})
|
||||||
parted -s ${SDIMG} set 1 boot on
|
parted -s ${SDIMG} set 1 boot on
|
||||||
# Create rootfs partition
|
# Create rootfs partition to the end of disk
|
||||||
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 -s ${SDIMG} -- unit KiB mkpart primary ext2 $(expr ${BOOT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT}) -1s
|
||||||
parted ${SDIMG} print
|
parted ${SDIMG} print
|
||||||
|
|
||||||
# Create a vfat image with boot files
|
# 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 }')
|
BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDIMG} unit b print | awk '/ 1 / { print substr($4, 1, length($4 -1)) / 512 /2 }')
|
||||||
mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS
|
mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS
|
||||||
case "${RPI_GPU_FIRMWARE}" in
|
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/* ::/
|
||||||
"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
|
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin ::kernel.img
|
||||||
|
|
||||||
if [ -n ${FATPAYLOAD} ] ; then
|
if [ -n ${FATPAYLOAD} ] ; then
|
||||||
@@ -110,7 +101,7 @@ IMAGE_CMD_rpi-sdimg () {
|
|||||||
# Burn Partitions
|
# Burn Partitions
|
||||||
dd if=${WORKDIR}/boot.img of=${SDIMG} conv=notrunc seek=1 bs=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync
|
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 SDIMG_ROOTFS_TYPE is a .xz file use xzcat
|
||||||
if [[ "$SDIMG_ROOTFS_TYPE" == *.xz ]]
|
if echo "${SDIMG_ROOTFS_TYPE}" | egrep -q "*\.xz"
|
||||||
then
|
then
|
||||||
xzcat ${SDIMG_ROOTFS} | dd of=${SDIMG} conv=notrunc seek=1 bs=$(expr 1024 \* ${BOOT_SPACE_ALIGNED} + ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync
|
xzcat ${SDIMG_ROOTFS} | dd of=${SDIMG} conv=notrunc seek=1 bs=$(expr 1024 \* ${BOOT_SPACE_ALIGNED} + ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -2,9 +2,13 @@
|
|||||||
BBPATH .= ":${LAYERDIR}"
|
BBPATH .= ":${LAYERDIR}"
|
||||||
|
|
||||||
# We have a recipes directory containing .bb and .bbappend files, add to BBFILES
|
# We have a recipes directory containing .bb and .bbappend files, add to BBFILES
|
||||||
BBFILES := "${BBFILES} ${LAYERDIR}/recipes*/*/*.bb \
|
BBFILES += "${LAYERDIR}/recipes*/*/*.bb \
|
||||||
${LAYERDIR}/recipes*/*/*.bbappend"
|
${LAYERDIR}/recipes*/*/*.bbappend"
|
||||||
|
|
||||||
BBFILE_COLLECTIONS += "raspberrypi"
|
BBFILE_COLLECTIONS += "raspberrypi"
|
||||||
BBFILE_PATTERN_raspberrypi := "^${LAYERDIR}/"
|
BBFILE_PATTERN_raspberrypi := "^${LAYERDIR}/"
|
||||||
BBFILE_PRIORITY_raspberrypi = "6"
|
BBFILE_PRIORITY_raspberrypi = "6"
|
||||||
|
|
||||||
|
# Additional license directories.
|
||||||
|
LICENSE_PATH += "${LAYERDIR}/files/custom-licenses"
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,6 @@
|
|||||||
|
|
||||||
PREFERRED_PROVIDER_virtual/kernel = "linux-raspberrypi"
|
PREFERRED_PROVIDER_virtual/kernel = "linux-raspberrypi"
|
||||||
PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg"
|
PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg"
|
||||||
PREFERRED_PROVIDER_virtual/egl ?= "vc-graphics-hardfp"
|
PREFERRED_PROVIDER_virtual/egl ?= "userland"
|
||||||
PREFERRED_PROVIDER_virtual/libgles2 ?= "vc-graphics-hardfp"
|
PREFERRED_PROVIDER_virtual/libgles2 ?= "userland"
|
||||||
PREFERRED_PROVIDER_virtual/libgl ?= "vc-graphics-hardfp"
|
PREFERRED_PROVIDER_linux-libc-headers ?= "linux-libc-headers-raspberrypi"
|
||||||
|
|||||||
@@ -1,3 +1,2 @@
|
|||||||
# RaspberryPi BSP default versions
|
# RaspberryPi BSP default versions
|
||||||
|
|
||||||
PREFERRED_VERSION_udev = "164"
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
DEFAULTTUNE ?= "arm1176jzfs"
|
DEFAULTTUNE ?= "armv6"
|
||||||
|
|
||||||
require conf/machine/include/arm/arch-armv6.inc
|
require conf/machine/include/arm/arch-armv6.inc
|
||||||
|
|
||||||
@@ -7,4 +7,5 @@ TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "arm1176jzfs", "-mtune=arm
|
|||||||
|
|
||||||
AVAILTUNES += "arm1176jzfs"
|
AVAILTUNES += "arm1176jzfs"
|
||||||
TUNE_FEATURES_tune-arm1176jzfs = "${TUNE_FEATURES_tune-armv6} arm1176jzfs"
|
TUNE_FEATURES_tune-arm1176jzfs = "${TUNE_FEATURES_tune-armv6} arm1176jzfs"
|
||||||
|
ARMPKGARCH_tune-arm1176jzfs = "arm1176jzfs"
|
||||||
PACKAGE_EXTRA_ARCHS_tune-arm1176jzfs = "${PACKAGE_EXTRA_ARCHS_tune-armv6}"
|
PACKAGE_EXTRA_ARCHS_tune-arm1176jzfs = "${PACKAGE_EXTRA_ARCHS_tune-armv6}"
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ IMAGE_FSTYPES ?= "tar.bz2 ext3 rpi-sdimg"
|
|||||||
|
|
||||||
SERIAL_CONSOLE = "115200 ttyAMA0"
|
SERIAL_CONSOLE = "115200 ttyAMA0"
|
||||||
|
|
||||||
MACHINE_KERNEL_PR = "r4"
|
MACHINE_KERNEL_PR = "r5"
|
||||||
|
|
||||||
XSERVER = " \
|
XSERVER = " \
|
||||||
xserver-xorg \
|
xserver-xorg \
|
||||||
@@ -32,6 +32,3 @@ MACHINE_FEATURES_BACKFILL_CONSIDERED = "rtc"
|
|||||||
MACHINE_EXTRA_RRECOMMENDS += " \
|
MACHINE_EXTRA_RRECOMMENDS += " \
|
||||||
kernel-modules \
|
kernel-modules \
|
||||||
"
|
"
|
||||||
|
|
||||||
# Set default GPU firmware image to be shipped
|
|
||||||
RPI_GPU_FIRMWARE ?= "arm192"
|
|
||||||
|
|||||||
25
files/custom-licenses/Broadcom
Normal file
25
files/custom-licenses/Broadcom
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
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.
|
||||||
|
|
||||||
@@ -5,7 +5,7 @@ SECTION = "base"
|
|||||||
HOMEPAGE = "http://www.open.com.au/mikem/bcm2835"
|
HOMEPAGE = "http://www.open.com.au/mikem/bcm2835"
|
||||||
AUTHOR = "Mike McCauley (mikem@open.com.au)"
|
AUTHOR = "Mike McCauley (mikem@open.com.au)"
|
||||||
|
|
||||||
LICENSE = "GPL-2.0"
|
LICENSE = "GPLv2"
|
||||||
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
|
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
|
||||||
|
|
||||||
PR = "r0"
|
PR = "r0"
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ SRC_URI = " \
|
|||||||
|
|
||||||
S = "${WORKDIR}/git/boot"
|
S = "${WORKDIR}/git/boot"
|
||||||
|
|
||||||
PR = "r2"
|
PR = "r3"
|
||||||
|
|
||||||
addtask deploy before do_package after do_install
|
addtask deploy before do_package after do_install
|
||||||
|
|
||||||
@@ -24,6 +24,9 @@ do_deploy() {
|
|||||||
for i in *.elf ; do
|
for i in *.elf ; do
|
||||||
cp $i ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles
|
cp $i ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles
|
||||||
done
|
done
|
||||||
|
for i in *.dat ; do
|
||||||
|
cp $i ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles
|
||||||
|
done
|
||||||
for i in *.bin ; do
|
for i in *.bin ; do
|
||||||
cp $i ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles
|
cp $i ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -7,13 +7,13 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384
|
|||||||
|
|
||||||
COMPATIBLE_MACHINE = "raspberrypi"
|
COMPATIBLE_MACHINE = "raspberrypi"
|
||||||
|
|
||||||
SRCREV = "afeaed02ba5f01298dec3ac4e1bd98f27bcd876e"
|
SRCREV = "62bf3e9db62f547eb1a2a352dde957d2f94bd216"
|
||||||
SRC_URI = "git://github.com/Evilpaul/RPi-config.git;protocol=git;branch=master \
|
SRC_URI = "git://github.com/Evilpaul/RPi-config.git;protocol=git;branch=master \
|
||||||
"
|
"
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
S = "${WORKDIR}/git"
|
||||||
|
|
||||||
PR = "r1"
|
PR = "r3"
|
||||||
|
|
||||||
addtask deploy before do_package after do_install
|
addtask deploy before do_package after do_install
|
||||||
|
|
||||||
@@ -41,6 +41,17 @@ do_deploy() {
|
|||||||
if [ -n "${OVER_VOLTAGE}" ]; then
|
if [ -n "${OVER_VOLTAGE}" ]; then
|
||||||
sed -i '/#over_voltage/ c\over_voltage=${OVER_VOLTAGE}' ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/config.txt
|
sed -i '/#over_voltage/ c\over_voltage=${OVER_VOLTAGE}' ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/config.txt
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# GPU memory
|
||||||
|
if [ -n "${GPU_MEM}" ]; then
|
||||||
|
sed -i '/#gpu_mem=/ c\gpu_mem=${GPU_MEM}' ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/config.txt
|
||||||
|
fi
|
||||||
|
if [ -n "${GPU_MEM_256}" ]; then
|
||||||
|
sed -i '/#gpu_mem_256/ c\gpu_mem_256=${GPU_MEM_256}' ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/config.txt
|
||||||
|
fi
|
||||||
|
if [ -n "${GPU_MEM_512}" ]; then
|
||||||
|
sed -i '/#gpu_mem_512/ c\gpu_mem_512=${GPU_MEM_512}' ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/config.txt
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# 13/09/2012 firmware; this can be overridden from distro config
|
# 7/1/2013 firmware; this can be overridden from distro config
|
||||||
RPIFW_SRCREV ?= "b616053edb93713efa25299cb4ea7efa439dcb61"
|
RPIFW_SRCREV ?= "0ac68cce44d4550c251172e8524100090e8211fa"
|
||||||
RPIFW_DATE ?= "20120913"
|
RPIFW_DATE ?= "20130107"
|
||||||
|
|
||||||
SRCREV = "${RPIFW_SRCREV}"
|
SRCREV = "${RPIFW_SRCREV}"
|
||||||
PV = "${RPIFW_DATE}"
|
PV = "${RPIFW_DATE}"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ LICENSE = "Proprietary"
|
|||||||
|
|
||||||
LIC_FILES_CHKSUM = "file://LICENCE;md5=86e53f5f5909ee66900418028de11780"
|
LIC_FILES_CHKSUM = "file://LICENCE;md5=86e53f5f5909ee66900418028de11780"
|
||||||
|
|
||||||
PROVIDES = "virtual/libgl virtual/libgles2 virtual/egl"
|
PROVIDES = "virtual/libgles2 virtual/egl"
|
||||||
COMPATIBLE_MACHINE = "raspberrypi"
|
COMPATIBLE_MACHINE = "raspberrypi"
|
||||||
|
|
||||||
include ../common/firmware.inc
|
include ../common/firmware.inc
|
||||||
@@ -14,7 +14,7 @@ SRC_URI = "git://github.com/raspberrypi/firmware.git;protocol=git;branch=master\
|
|||||||
|
|
||||||
S = "${WORKDIR}/git/${VCDIR}"
|
S = "${WORKDIR}/git/${VCDIR}"
|
||||||
|
|
||||||
INCPR = "r0"
|
INCPR = "r1"
|
||||||
|
|
||||||
inherit pkgconfig update-rc.d
|
inherit pkgconfig update-rc.d
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
127.0.0.1 localhost.localdomain localhost raspberrypi rpi
|
|
||||||
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
|
|
||||||
|
|
||||||
# The loopback interface
|
|
||||||
auto lo
|
|
||||||
iface lo inet loopback
|
|
||||||
|
|
||||||
# Wireless interfaces
|
|
||||||
iface wlan0 inet dhcp
|
|
||||||
wireless_mode managed
|
|
||||||
wireless_essid any
|
|
||||||
wpa-driver wext
|
|
||||||
wpa-conf /etc/wpa_supplicant.conf
|
|
||||||
|
|
||||||
# Bluetooth networking
|
|
||||||
iface bnep0 inet dhcp
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
|
||||||
# Don't forget to bump PRINC if you update the extra files.
|
|
||||||
PRINC = "1"
|
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
DESCRIPTION = "Scripts to support a first run wizard on the Raspberry Pi."
|
DESCRIPTION = "Scripts to support a first run wizard on the Raspberry Pi."
|
||||||
LICENSE = "GPLV2"
|
LICENSE = "GPLv2"
|
||||||
LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263"
|
LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263"
|
||||||
|
|
||||||
DEPENDS = "zenity dbus"
|
DEPENDS = "zenity dbus"
|
||||||
RDEPENDS = "slim sudo zenity dbus"
|
RDEPENDS_${PN} = "slim sudo zenity dbus"
|
||||||
|
|
||||||
COMPATIBLE_MACHINE = "raspberrypi"
|
COMPATIBLE_MACHINE = "raspberrypi"
|
||||||
|
|
||||||
PR = "r1"
|
PR = "r2"
|
||||||
|
|
||||||
SRC_URI = " \
|
SRC_URI = " \
|
||||||
file://LICENSE \
|
file://LICENSE \
|
||||||
|
|||||||
39
recipes-graphics/userland/userland_git.bb
Normal file
39
recipes-graphics/userland/userland_git.bb
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
DESCRIPTION = "This repository contains the source code for the ARM side \
|
||||||
|
libraries used on Raspberry Pi. These typically are installed in /opt/vc/lib \
|
||||||
|
and includes source for the ARM side code to interface to: EGL, mmal, GLESv2,\
|
||||||
|
vcos, openmaxil, vchiq_arm, bcm_host, WFC, OpenVG."
|
||||||
|
LICENSE = "Broadcom"
|
||||||
|
LIC_FILES_CHKSUM = "file://LICENCE;md5=957f6640d5e2d2acfce73a36a56cb32f"
|
||||||
|
|
||||||
|
PR = "r1"
|
||||||
|
|
||||||
|
PROVIDES = "virtual/libgles2 \
|
||||||
|
virtual/egl"
|
||||||
|
COMPATIBLE_MACHINE = "raspberrypi"
|
||||||
|
|
||||||
|
SRCREV = "8700279495e266378d36092ccf86424f0ee2539f"
|
||||||
|
SRC_URI = "git://github.com/raspberrypi/userland.git;protocol=git;branch=master \
|
||||||
|
"
|
||||||
|
S = "${WORKDIR}/git"
|
||||||
|
|
||||||
|
inherit cmake
|
||||||
|
|
||||||
|
EXTRA_OECMAKE = " \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
"
|
||||||
|
# The compiled binaries don't provide sonames.
|
||||||
|
SOLIBS = "${SOLIBSDEV}"
|
||||||
|
|
||||||
|
do_install_append() {
|
||||||
|
mkdir -p ${D}/${prefix}
|
||||||
|
mv ${D}/opt/vc/* ${D}/${prefix}
|
||||||
|
rm -rf ${D}/opt
|
||||||
|
}
|
||||||
|
|
||||||
|
FILES_${PN} += "${libdir}/*${SOLIBS}"
|
||||||
|
FILES_${PN}-dev = "${includedir} \
|
||||||
|
${prefix}/src"
|
||||||
|
FILES_${PN}-doc += "${datadir}/install"
|
||||||
|
|
||||||
|
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||||
|
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
require recipes-kernel/linux-libc-headers/linux-libc-headers.inc
|
||||||
|
|
||||||
|
PR = "r0"
|
||||||
|
|
||||||
|
PROVIDES = "linux-libc-headers"
|
||||||
|
RPROVIDES_${PN}-dev = "linux-libc-headers-dev"
|
||||||
|
RPROVIDES_${PN}-dbg = "linux-libc-headers-dbg"
|
||||||
|
|
||||||
|
SRCREV = "10182a3bc434b27740f81c2b836a1af943060241"
|
||||||
|
SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.2.27 \
|
||||||
|
"
|
||||||
|
S = "${WORKDIR}/git"
|
||||||
@@ -1,32 +1,22 @@
|
|||||||
COMPATIBLE_MACHINE = "raspberrypi"
|
|
||||||
|
|
||||||
require linux.inc
|
require linux.inc
|
||||||
|
|
||||||
DESCRIPTION = "Linux kernel for the RaspberryPi board"
|
DESCRIPTION = "Linux kernel for the RaspberryPi board"
|
||||||
|
COMPATIBLE_MACHINE = "raspberrypi"
|
||||||
|
|
||||||
PR = "r4"
|
PR = "r6"
|
||||||
|
PV_append = "+git${SRCREV}"
|
||||||
# Bump MACHINE_KERNEL_PR in the machine config if you update the kernel.
|
|
||||||
# This is on the rpi-3.2.27 branch
|
|
||||||
SRCREV = "e33263e7eab2d05349b438f6a4a8d1924686a824"
|
|
||||||
|
|
||||||
|
SRCREV = "10182a3bc434b27740f81c2b836a1af943060241"
|
||||||
SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.2.27 \
|
SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.2.27 \
|
||||||
"
|
"
|
||||||
|
|
||||||
LINUX_VERSION ?= "3.2.27-rpi"
|
|
||||||
PV = "${LINUX_VERSION}+git${SRCREV}"
|
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
S = "${WORKDIR}/git"
|
||||||
|
|
||||||
# NOTE: For now we pull in the default config from the RPi kernel GIT tree.
|
# NOTE: For now we pull in the default config from the RPi kernel GIT tree.
|
||||||
|
|
||||||
KERNEL_DEFCONFIG = "bcmrpi_defconfig"
|
KERNEL_DEFCONFIG = "bcmrpi_defconfig"
|
||||||
|
|
||||||
# CMDLINE for raspberrypi
|
# CMDLINE for raspberrypi
|
||||||
CMDLINE_raspberrypi = "dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait"
|
CMDLINE_raspberrypi = "dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait"
|
||||||
|
|
||||||
PARALLEL_MAKEINST = ""
|
|
||||||
|
|
||||||
UDEV_GE_141 ?= "1"
|
UDEV_GE_141 ?= "1"
|
||||||
|
|
||||||
do_configure_prepend() {
|
do_configure_prepend() {
|
||||||
|
|||||||
34
recipes-kernel/linux/linux-raspberrypi_3.6.11.bb
Normal file
34
recipes-kernel/linux/linux-raspberrypi_3.6.11.bb
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
require linux.inc
|
||||||
|
|
||||||
|
DESCRIPTION = "Linux kernel for the RaspberryPi board"
|
||||||
|
COMPATIBLE_MACHINE = "raspberrypi"
|
||||||
|
|
||||||
|
PR = "r6"
|
||||||
|
PV_append = "+git${SRCREV}"
|
||||||
|
|
||||||
|
SRCREV = "31a951046155b27361127d9cf85a1f58719fe9b3"
|
||||||
|
SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.6.y \
|
||||||
|
"
|
||||||
|
S = "${WORKDIR}/git"
|
||||||
|
|
||||||
|
# NOTE: For now we pull in the default config from the RPi kernel GIT tree.
|
||||||
|
KERNEL_DEFCONFIG = "bcmrpi_defconfig"
|
||||||
|
|
||||||
|
# CMDLINE for raspberrypi
|
||||||
|
CMDLINE_raspberrypi = "dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait"
|
||||||
|
|
||||||
|
UDEV_GE_141 ?= "1"
|
||||||
|
|
||||||
|
do_configure_prepend() {
|
||||||
|
install -m 0644 ${S}/arch/${ARCH}/configs/${KERNEL_DEFCONFIG} ${WORKDIR}/defconfig || die "No default configuration for ${MACHINE} / ${KERNEL_DEFCONFIG} available."
|
||||||
|
}
|
||||||
|
|
||||||
|
do_install_prepend() {
|
||||||
|
install -d ${D}/lib/firmware
|
||||||
|
}
|
||||||
|
|
||||||
|
do_deploy_append() {
|
||||||
|
# Deploy cmdline.txt
|
||||||
|
install -d ${DEPLOYDIR}/bcm2835-bootfiles
|
||||||
|
echo "${CMDLINE}" > ${DEPLOYDIR}/bcm2835-bootfiles/cmdline.txt
|
||||||
|
}
|
||||||
@@ -6,265 +6,111 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
|
|||||||
|
|
||||||
inherit kernel siteinfo
|
inherit kernel siteinfo
|
||||||
|
|
||||||
RPSRC = "http://www.rpsys.net/openzaurus/patches/archive"
|
|
||||||
|
|
||||||
# Enable OABI compat for people stuck with obsolete userspace
|
# Enable OABI compat for people stuck with obsolete userspace
|
||||||
ARM_KEEP_OABI ?= "1"
|
ARM_KEEP_OABI ?= "1"
|
||||||
|
|
||||||
# Quirk for udev greater or equal 141
|
# Quirk for udev greater or equal 141
|
||||||
UDEV_GE_141 ?= "0"
|
UDEV_GE_141 ?= "1"
|
||||||
|
|
||||||
# Specify the commandline for your device
|
|
||||||
|
|
||||||
# Boot from mmc
|
|
||||||
CMDLINE_at91sam9263ek = "mem=64M console=ttyS0,115200 root=/dev/mmcblk0p1 rootfstype=ext2 rootdelay=5"
|
|
||||||
# Boot from nfs
|
|
||||||
#CMDLINE_at91sam9263ek = "mem=64M console=ttyS0,115200 root=301 root=/dev/nfs nfsroot=172.20.3.1:/data/at91 ip=172.20.0.5:::255.255.0.0"
|
|
||||||
|
|
||||||
# Set the verbosity of kernel messages during runtime
|
# Set the verbosity of kernel messages during runtime
|
||||||
# You can define CMDLINE_DEBUG in your local.conf or distro.conf to override this behaviour
|
# You can define CMDLINE_DEBUG in your local.conf or distro.conf to override this behaviour
|
||||||
CMDLINE_DEBUG ?= '${@base_conditional("DISTRO_TYPE", "release", "quiet", "debug", d)}'
|
CMDLINE_DEBUG ?= '${@base_conditional("DISTRO_TYPE", "release", "quiet", "debug", d)}'
|
||||||
CMDLINE_append = " ${CMDLINE_DEBUG} "
|
CMDLINE_append = " ${CMDLINE_DEBUG}"
|
||||||
|
|
||||||
# Kernel bootlogo is distro-specific (default is OE logo).
|
# Set a variable in .configure
|
||||||
# Logo resolution (qvga, vga, ...) is machine-specific.
|
# $1 - Configure variable to be set
|
||||||
LOGO_SIZE ?= "."
|
# $2 - value [n/y/value]
|
||||||
|
kernel_configure_variable() {
|
||||||
# Support for binary device tree generation
|
# Remove the config
|
||||||
|
CONF_SED_SCRIPT="$CONF_SED_SCRIPT /CONFIG_$1[ =]/d;"
|
||||||
FILES_kernel-devicetree = "/boot/devicetree*"
|
if test "$2" = "n"
|
||||||
|
then
|
||||||
KERNEL_DEVICETREE_boc01 = "${WORKDIR}/boc01.dts"
|
echo "# CONFIG_$1 is not set" >> ${S}/.config
|
||||||
KERNEL_DEVICETREE_calamari = "arch/${ARCH}/boot/dts/mpc8536ds.dts"
|
else
|
||||||
KERNEL_DEVICETREE_canyonlands = "arch/${ARCH}/boot/dts/canyonlands.dts"
|
echo "CONFIG_$1=$2" >> ${S}/.config
|
||||||
KERNEL_DEVICETREE_kilauea = "arch/${ARCH}/boot/dts/kilauea.dts"
|
fi
|
||||||
KERNEL_DEVICETREE_lite5200 = "arch/${ARCH}/boot/dts/lite5200.dts"
|
|
||||||
KERNEL_DEVICETREE_lsppchd = "arch/${ARCH}/boot/dts/kuroboxHD.dts"
|
|
||||||
KERNEL_DEVICETREE_lsppchg = "arch/${ARCH}/boot/dts/kuroboxHG.dts"
|
|
||||||
KERNEL_DEVICETREE_mpc8313e-rdb = "arch/${ARCH}/boot/dts/mpc8313erdb.dts"
|
|
||||||
KERNEL_DEVICETREE_mpc8315e-rdb = "arch/${ARCH}/boot/dts/mpc8315erdb.dts"
|
|
||||||
KERNEL_DEVICETREE_mpc8323e-rdb = "arch/${ARCH}/boot/dts/mpc832x_rdb.dts"
|
|
||||||
KERNEL_DEVICETREE_mpc8544ds = "arch/${ARCH}/boot/dts/mpc8544ds.dts"
|
|
||||||
KERNEL_DEVICETREE_mpc8641-hpcn = "arch/${ARCH}/boot/dts/mpc8641_hpcn.dts"
|
|
||||||
KERNEL_DEVICETREE_p1020rdb = "arch/${ARCH}/boot/dts/p1020rdb.dts"
|
|
||||||
KERNEL_DEVICETREE_p2020ds = "arch/${ARCH}/boot/dts/p2020ds.dts"
|
|
||||||
KERNEL_DEVICETREE_sequoia = "arch/${ARCH}/boot/dts/sequoia.dts"
|
|
||||||
KERNEL_DEVICETREE_tqm8540 = "arch/${ARCH}/boot/dts/tqm8540.dts"
|
|
||||||
KERNEL_DEVICETREE_xilinx-ml507 = "arch/${ARCH}/boot/dts/virtex440-ml507.dts"
|
|
||||||
|
|
||||||
KERNEL_DEVICETREE_FLAGS = "-R 8 -S 0x3000"
|
|
||||||
|
|
||||||
CORTEXA8FIXUP ?= "yes"
|
|
||||||
|
|
||||||
python __anonymous () {
|
|
||||||
|
|
||||||
import bb
|
|
||||||
|
|
||||||
devicetree = bb.data.getVar('KERNEL_DEVICETREE', d, 1) or ''
|
|
||||||
if devicetree:
|
|
||||||
depends = bb.data.getVar("DEPENDS", d, 1)
|
|
||||||
bb.data.setVar("DEPENDS", "%s dtc-native" % depends, d)
|
|
||||||
packages = bb.data.getVar("PACKAGES", d, 1)
|
|
||||||
bb.data.setVar("PACKAGES", "%s kernel-devicetree" % packages, d)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
do_configure_prepend() {
|
do_configure_prepend() {
|
||||||
|
# Clean .config
|
||||||
# Rename getline in ./scripts/unifdef.c
|
|
||||||
# Kernels up to 2.6.29 are currently failing to build unifdef.c,
|
|
||||||
# clashing with exposed getline() from <stdio.h>
|
|
||||||
# see https://patchwork.kernel.org/patch/11166/
|
|
||||||
# committed in 2.6.29 (commit d15bd1067b1fcb2b7250d22bc0c7c7fea0b759f7)
|
|
||||||
|
|
||||||
sed -i -e 's/getline/parseline/g' ${S}/scripts/unifdef.c
|
|
||||||
|
|
||||||
|
|
||||||
echo "" > ${S}/.config
|
echo "" > ${S}/.config
|
||||||
|
CONF_SED_SCRIPT=""
|
||||||
|
|
||||||
#
|
|
||||||
# logo support, if you supply logo_linux_clut224.ppm in SRC_URI, then it's going to be used
|
|
||||||
#
|
|
||||||
if [ -e ${WORKDIR}/${LOGO_SIZE}/logo_linux_clut224.ppm ]; then
|
|
||||||
install -m 0644 ${WORKDIR}/${LOGO_SIZE}/logo_linux_clut224.ppm drivers/video/logo/logo_linux_clut224.ppm
|
|
||||||
echo "CONFIG_LOGO=y" >> ${S}/.config
|
|
||||||
echo "CONFIG_LOGO_LINUX_CLUT224=y" >> ${S}/.config
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# oabi / eabi support
|
# oabi / eabi support
|
||||||
#
|
|
||||||
if [ "${TARGET_OS}" = "linux-gnueabi" -o "${TARGET_OS}" = "linux-uclibceabi" ]; then
|
if [ "${TARGET_OS}" = "linux-gnueabi" -o "${TARGET_OS}" = "linux-uclibceabi" ]; then
|
||||||
echo "CONFIG_AEABI=y" >> ${S}/.config
|
kernel_configure_variable AEABI y
|
||||||
if [ "${ARM_KEEP_OABI}" = "1" ] ; then
|
if [ "${ARM_KEEP_OABI}" = "1" ] ; then
|
||||||
echo "CONFIG_OABI_COMPAT=y" >> ${S}/.config
|
kernel_configure_variable OABI_COMPAT y
|
||||||
else
|
else
|
||||||
echo "# CONFIG_OABI_COMPAT is not set" >> ${S}/.config
|
kernel_configure_variable OABI_COMPAT n
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "# CONFIG_AEABI is not set" >> ${S}/.config
|
kernel_configure_variable AEABI n
|
||||||
echo "# CONFIG_OABI_COMPAT is not set" >> ${S}/.config
|
kernel_configure_variable OABI_COMPAT n
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# When enabling thumb for userspace we also need thumb support in the kernel
|
# Set cmdline
|
||||||
if [ "${ARM_INSTRUCTION_SET}" = "thumb" ] ; then
|
kernel_configure_variable CMDLINE "\"${CMDLINE}\""
|
||||||
sed -i -e /CONFIG_ARM_THUMB/d ${WORKDIR}/defconfig
|
|
||||||
echo "CONFIG_ARM_THUMB=y" >> ${S}/.config
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Enable thumb2 fixup for specific issue in angstrom toolchains when used on A8 r1p[012] silicon
|
# Localversion
|
||||||
if [ "${CORTEXA8FIXUP}" = "yes" ] ; then
|
kernel_configure_variable LOCALVERSION "\"\""
|
||||||
sed -i -e /CONFIG_ARM_ERRATA_430973/d ${WORKDIR}/defconfig
|
kernel_configure_variable LOCALVERSION_AUTO n
|
||||||
echo "CONFIG_ARM_ERRATA_430973=y" >> ${S}/.config
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# endian support
|
|
||||||
#
|
|
||||||
if [ "${SITEINFO_ENDIANNESS}" = "be" ]; then
|
|
||||||
echo "CONFIG_CPU_BIG_ENDIAN=y" >> ${S}/.config
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "CONFIG_CMDLINE=\"${CMDLINE}\"" >> ${S}/.config
|
|
||||||
|
|
||||||
sed -e '/CONFIG_AEABI/d' \
|
|
||||||
-e '/CONFIG_OABI_COMPAT=/d' \
|
|
||||||
-e '/CONFIG_CMDLINE=/d' \
|
|
||||||
-e '/CONFIG_CPU_BIG_ENDIAN/d' \
|
|
||||||
-e '/CONFIG_LOGO=/d' \
|
|
||||||
-e '/CONFIG_LOGO_LINUX_CLUT224=/d' \
|
|
||||||
-e '/CONFIG_LOCALVERSION/d' \
|
|
||||||
-e '/CONFIG_LOCALVERSION_AUTO/d' \
|
|
||||||
< '${WORKDIR}/defconfig' >>'${S}/.config'
|
|
||||||
|
|
||||||
echo 'CONFIG_LOCALVERSION=""' >>${S}/.config
|
|
||||||
echo '# CONFIG_LOCALVERSION_AUTO is not set' >>${S}/.config
|
|
||||||
|
|
||||||
#
|
|
||||||
# Udev quirks
|
# Udev quirks
|
||||||
#
|
|
||||||
|
|
||||||
# Newer versions of udev mandate that sysfs doesn't have deprecated entries
|
# Newer versions of udev mandate that sysfs doesn't have deprecated entries
|
||||||
if [ "${UDEV_GE_141}" = "1" ] ; then
|
if [ "${UDEV_GE_141}" = "1" ] ; then
|
||||||
sed -e /CONFIG_SYSFS_DEPRECATED/d \
|
kernel_configure_variable SYSFS_DEPRECATED n
|
||||||
-e /CONFIG_SYSFS_DEPRECATED_V2/d \
|
kernel_configure_variable SYSFS_DEPRECATED_V2 n
|
||||||
-e /CONFIG_HOTPLUG/d \
|
kernel_configure_variable HOTPLUG y
|
||||||
-e /CONFIG_UEVENT_HELPER_PATH/d \
|
kernel_configure_variable UEVENT_HELPER_PATH "\"\""
|
||||||
-e /CONFIG_UNIX/d \
|
kernel_configure_variable UNIX y
|
||||||
-e /CONFIG_SYSFS/d \
|
kernel_configure_variable SYSFS y
|
||||||
-e /CONFIG_PROC_FS/d \
|
kernel_configure_variable PROC_FS y
|
||||||
-e /CONFIG_TMPFS/d \
|
kernel_configure_variable TMPFS y
|
||||||
-e /CONFIG_INOTIFY_USER/d \
|
kernel_configure_variable INOTIFY_USER y
|
||||||
-e /CONFIG_SIGNALFD/d \
|
kernel_configure_variable SIGNALFD y
|
||||||
-e /CONFIG_TMPFS_POSIX_ACL/d \
|
kernel_configure_variable TMPFS_POSIX_ACL y
|
||||||
-e /CONFIG_BLK_DEV_BSG/d \
|
kernel_configure_variable BLK_DEV_BSG y
|
||||||
-i '${S}/.config'
|
kernel_configure_variable DEVTMPFS y
|
||||||
|
kernel_configure_variable DEVTMPFS_MOUNT y
|
||||||
echo '# CONFIG_SYSFS_DEPRECATED is not set' >> ${S}/.config
|
|
||||||
echo '# CONFIG_SYSFS_DEPRECATED_V2 is not set' >> ${S}/.config
|
|
||||||
echo 'CONFIG_HOTPLUG=y' >> ${S}/.config
|
|
||||||
echo 'CONFIG_UEVENT_HELPER_PATH=""' >> ${S}/.config
|
|
||||||
echo 'CONFIG_UNIX=y' >> ${S}/.config
|
|
||||||
echo 'CONFIG_SYSFS=y' >> ${S}/.config
|
|
||||||
echo 'CONFIG_PROC_FS=y' >> ${S}/.config
|
|
||||||
echo 'CONFIG_TMPFS=y' >> ${S}/.config
|
|
||||||
echo 'CONFIG_INOTIFY_USER=y' >> ${S}/.config
|
|
||||||
echo 'CONFIG_SIGNALFD=y' >> ${S}/.config
|
|
||||||
echo 'CONFIG_TMPFS_POSIX_ACL=y' >> ${S}/.config
|
|
||||||
echo 'CONFIG_BLK_DEV_BSG=y' >> ${S}/.config
|
|
||||||
echo 'CONFIG_DEVTMPFS=y' >> ${S}/.config
|
|
||||||
echo 'CONFIG_DEVTMPFS_MOUNT=y' >> ${S}/.config
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Newer inits like systemd need cgroup support
|
# Newer inits like systemd need cgroup support
|
||||||
if [ "${KERNEL_ENABLE_CGROUPS}" = "1" ] ; then
|
if [ "${KERNEL_ENABLE_CGROUPS}" = "1" ] ; then
|
||||||
sed -e /CONFIG_CGROUP_SCHED/d \
|
kernel_configure_variable CGROUP_SCHED y
|
||||||
-e /CONFIG_CGROUPS/d \
|
kernel_configure_variable CGROUPS y
|
||||||
-i '${S}/.config'
|
kernel_configure_variable CGROUP_NS y
|
||||||
|
kernel_configure_variable CGROUP_FREEZER y
|
||||||
echo 'CONFIG_CGROUP_SCHED=y' >> ${S}/.config
|
kernel_configure_variable CGROUP_DEVICE y
|
||||||
echo 'CONFIG_CGROUPS=y' >> ${S}/.config
|
kernel_configure_variable CPUSETS y
|
||||||
echo 'CONFIG_CGROUP_NS=y' >> ${S}/.config
|
kernel_configure_variable PROC_PID_CPUSET y
|
||||||
echo 'CONFIG_CGROUP_FREEZER=y' >> ${S}/.config
|
kernel_configure_variable CGROUP_CPUACCT y
|
||||||
echo 'CONFIG_CGROUP_DEVICE=y' >> ${S}/.config
|
kernel_configure_variable RESOURCE_COUNTERS y
|
||||||
echo 'CONFIG_CPUSETS=y' >> ${S}/.config
|
|
||||||
echo 'CONFIG_PROC_PID_CPUSET=y' >> ${S}/.config
|
|
||||||
echo 'CONFIG_CGROUP_CPUACCT=y' >> ${S}/.config
|
|
||||||
echo 'CONFIG_RESOURCE_COUNTERS=y' >> ${S}/.config
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
# root-over-nfs-over-usb-eth support. Limited, but should cover some cases
|
||||||
# root-over-nfs-over-usb-eth support. Limited, but should cover some cases.
|
|
||||||
# Enable this by setting a proper CMDLINE_NFSROOT_USB.
|
# Enable this by setting a proper CMDLINE_NFSROOT_USB.
|
||||||
#
|
|
||||||
if [ ! -z "${CMDLINE_NFSROOT_USB}" ]; then
|
if [ ! -z "${CMDLINE_NFSROOT_USB}" ]; then
|
||||||
oenote "Configuring the kernel for root-over-nfs-over-usb-eth with CMDLINE ${CMDLINE_NFSROOT_USB}"
|
oenote "Configuring the kernel for root-over-nfs-over-usb-eth with CMDLINE ${CMDLINE_NFSROOT_USB}"
|
||||||
sed -e '/CONFIG_INET/d' \
|
kernel_configure_variable INET y
|
||||||
-e '/CONFIG_IP_PNP=/d' \
|
kernel_configure_variable IP_PNP y
|
||||||
-e '/CONFIG_USB_GADGET=/d' \
|
kernel_configure_variable USB_GADGET y
|
||||||
-e '/CONFIG_USB_GADGET_SELECTED=/d' \
|
kernel_configure_variable USB_GADGET_SELECTED y
|
||||||
-e '/CONFIG_USB_ETH=/d' \
|
kernel_configure_variable USB_ETH y
|
||||||
-e '/CONFIG_NFS_FS=/d' \
|
kernel_configure_variable NFS_FS y
|
||||||
-e '/CONFIG_ROOT_NFS=/d' \
|
kernel_configure_variable ROOT_NFS y
|
||||||
-e '/CONFIG_CMDLINE=/d' \
|
kernel_configure_variable ROOT_NFS y
|
||||||
-i ${S}/.config
|
kernel_configure_variable CMDLINE "\"${CMDLINE_NFSROOT_USB}\""
|
||||||
echo "CONFIG_INET=y" >> ${S}/.config
|
|
||||||
echo "CONFIG_IP_PNP=y" >> ${S}/.config
|
|
||||||
echo "CONFIG_USB_GADGET=y" >> ${S}/.config
|
|
||||||
echo "CONFIG_USB_GADGET_SELECTED=y" >> ${S}/.config
|
|
||||||
echo "CONFIG_USB_ETH=y" >> ${S}/.config
|
|
||||||
echo "CONFIG_NFS_FS=y" >> ${S}/.config
|
|
||||||
echo "CONFIG_ROOT_NFS=y" >> ${S}/.config
|
|
||||||
echo "CONFIG_CMDLINE=\"${CMDLINE_NFSROOT_USB}\"" >> ${S}/.config
|
|
||||||
fi
|
fi
|
||||||
yes '' | oe_runmake oldconfig
|
|
||||||
|
|
||||||
#
|
|
||||||
# Activate CONFIG_LEGACY_PTYS
|
# Activate CONFIG_LEGACY_PTYS
|
||||||
#
|
kernel_configure_variable LEGACY_PTYS y
|
||||||
sed -e '/CONFIG_LEGACY_PTYS/d' -i ${S}/.config
|
|
||||||
echo "CONFIG_LEGACY_PTYS=y" >> ${S}/.config
|
|
||||||
}
|
|
||||||
|
|
||||||
do_configure_append() {
|
# Keep this the last line
|
||||||
if test -e scripts/Makefile.fwinst ; then
|
# Remove all modified configs and add the rest to .config
|
||||||
sed -i -e "s:-m0644:-m 0644:g" scripts/Makefile.fwinst
|
sed -e "${CONF_SED_SCRIPT}" < '${WORKDIR}/defconfig' >> '${S}/.config'
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# bitbake.conf only prepends PARALLEL make in tasks called do_compile, which isn't the case for compile_modules
|
yes '' | oe_runmake oldconfig
|
||||||
# So explicitly enable it for that in here
|
|
||||||
EXTRA_OEMAKE = "${PARALLEL_MAKE} "
|
|
||||||
|
|
||||||
do_install_append() {
|
|
||||||
oe_runmake headers_install INSTALL_HDR_PATH=${D}${exec_prefix}/src/linux-${KERNEL_VERSION} ARCH=$ARCH
|
|
||||||
}
|
|
||||||
|
|
||||||
PACKAGES =+ "kernel-headers"
|
|
||||||
FILES_kernel-headers = "${exec_prefix}/src/linux*"
|
|
||||||
|
|
||||||
do_devicetree_image() {
|
|
||||||
if test -n "${KERNEL_DEVICETREE}" ; then
|
|
||||||
dtc -I dts -O dtb ${KERNEL_DEVICETREE_FLAGS} -o devicetree ${KERNEL_DEVICETREE}
|
|
||||||
install -d ${D}/boot
|
|
||||||
install -m 0644 devicetree ${D}/boot/devicetree-${KERNEL_VERSION}
|
|
||||||
install -d ${DEPLOY_DIR_IMAGE}
|
|
||||||
install -m 0644 devicetree ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_BASE_NAME}.dtb
|
|
||||||
package_stagefile_shell ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_BASE_NAME}.dtb
|
|
||||||
cd ${DEPLOY_DIR_IMAGE}
|
|
||||||
rm -f ${KERNEL_IMAGE_SYMLINK_NAME}.dtb
|
|
||||||
ln -sf ${KERNEL_IMAGE_BASE_NAME}.dtb ${KERNEL_IMAGE_SYMLINK_NAME}.dtb
|
|
||||||
package_stagefile_shell ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_SYMLINK_NAME}.dtb
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
addtask devicetree_image after do_install before do_package do_deploy
|
|
||||||
|
|
||||||
pkg_postinst_kernel-devicetree () {
|
|
||||||
cd /${KERNEL_IMAGEDEST}; update-alternatives --install /${KERNEL_IMAGEDEST}/devicetree devicetree devicetree-${KERNEL_VERSION} ${KERNEL_PRIORITY} || true
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postrm_kernel-devicetree () {
|
|
||||||
cd /${KERNEL_IMAGEDEST}; update-alternatives --remove devicetree devicetree-${KERNEL_VERSION} || true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Automatically depend on lzop-native if CONFIG_KERNEL_LZO is enabled
|
# Automatically depend on lzop-native if CONFIG_KERNEL_LZO is enabled
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
recipes-bcm - Broadcom specific recipes and tweaks (including binary only bootloader).
|
|
||||||
recipes-bsp - Anything with links to the RaspberryPi hardware configuration information.
|
|
||||||
recipes-core - Extensions to existing upstream core recipes.
|
|
||||||
recipes-devtools - Extensions to existing upstream devtools recipes and other RaspberryPi specific devtools recipes.
|
|
||||||
recipes-devices - Device drivers/Init scripts.
|
|
||||||
recipes-graphics - XOrg Config and such.
|
|
||||||
recipes-kernel - The RaspberryPi kernel recipes and anything with strong kernel dependencies.
|
|
||||||
recipes-multimedia - Extensions to existing upstream multimedia recipes and other RaspberryPi specific multimedia recipes.
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user