33 Commits
danny ... dylan

Author SHA1 Message Date
Seth Bollinger
770b88b2ce sdcard_image-rpi.bbclass: Fix error in conditional test
When the shell tests for rootfs type I was seeing "[[: not found".  I
use echo and egrep to test for the xz rootfs type to work around this
error.

Signed-off-by: Seth Bollinger <seth.boll@gmail.com>
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2013-05-02 14:11:32 +02:00
Jan Schmidt
c5f81306b5 sdcard_image-rpi: Use the size of the generated rootfs
When constructing the SD card image, the code was using
the inherited ROOTFS_SIZE, which is the size of the
rootfs contents. When building (for example) a compressed
rootfs, this allocates a partition much larger than necessary.

Instead, take the size of the generated rootfs file that is
about to be written into the generated image, and round it
up to the IMAGE_ROOTFS_ALIGNMENT size.

Fix some comments - the alignment is 4MiB, not 4KiB.

Signed-off-by: Jan Schmidt <thaytan@noraisin.net>
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2013-05-02 13:10:14 +02:00
Eric Bénard
8ad03b9533 Use right license name for GPLv2
This patch fixes the license name for bcm2835 and rpi-first-run-wizard.

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2013-05-01 22:10:15 +02:00
Seth Bollinger
fe5cd81d27 sdcard_image-rpi.bbclass: Copy startup files required for 16MB GPU operation.
start_cd.elf and fixup_cd.dat are required when running the system with
a 16MB GPU memory configuration.  This change copies all files contained
in bcm2835-bootfiles instead of cherry picking.

Signed-off-by: Seth Bollinger <seth.boll@gmail.com>
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2013-05-01 21:20:42 +02:00
Paul Barker
53555972bc netbase: Remove bbappend and files
Dropped raspberrypi modifications to hosts and interfaces files as they are
unnecessary.

Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2013-05-01 20:58:46 +02:00
Andrei Gherzan
cf25e6fc90 rpi-first-run-wizard: Fix RDEPENDS warning
WARNING: QA Issue: [...]/rpi-first-run-wizard.bb:
Variable RDEPENDS is set as not being package specific, please fix this.

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2013-03-13 19:49:20 +02:00
Andrei Gherzan
7da69cff7c vc-graphics.inc: There is no libgl so get rid of this PROVIDES
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2013-03-13 19:42:56 +02:00
Andrei Gherzan
592274937b userland: Update to 8700279495e266378d36092ccf86424f0ee2539f
* install_vmcs not needed anymore
* By default package is installed in /opt/vc. Move everything in ${prefix}.
* Move recipe in recipes-graphics
* Add PACKAGE_ARCH = MACHINE_ARCH

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2013-03-13 19:42:51 +02:00
Andrei Gherzan
201f717a60 recipes.txt: Remove file
This file contains outdated informations.

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2013-03-13 19:42:45 +02:00
Andrei Gherzan
db2b8af828 layer.conf: Set LICENSE_PATH to layers's custom licenses directory
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2013-03-13 19:42:39 +02:00
Andrei Gherzan
996990c98f custom-licenses: Add directory to hold custom licenses
Add Broadcom license to this directory.

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2013-03-13 19:42:27 +02:00
Andrei Gherzan
33d2e1d7bb rpi-default-providers: Use userland as provider for egl and gles2
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2013-03-13 19:42:19 +02:00
Andrei Gherzan
bff90c7a0d rpi-default-providers: Remove virtual/libgl provider
There are no libgl binary shipped in raspberrypi firmware repo.

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2013-03-13 19:42:09 +02:00
Jan Schmidt
e7fdddc4e1 linux: Add a Linux 3.6 kernel recipe
* Add a recipe to build the linux kernel from the rpi-3.6.y branch at
  https://github.com/raspberrypi/linux
* Since this has a higher version, it will be the preferred linux kernel
  by default.

Signed-off-by: Jan Schmidt <thaytan@noraisin.net>
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2013-01-27 15:28:25 +02:00
Jan Schmidt
b3de8baa2f bcm2835-bootfiles: Bump the firmware revision
* Pull in a newer firmware revision (0ac68c 7th Jan 2013) from
  https://github.com/raspberrypi/firmware for various fixes and
  improvements

Signed-off-by: Jan Schmidt <thaytan@noraisin.net>
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2013-01-27 15:28:09 +02:00
Andreas Müller
d3ec4b1258 layer.conf: fix parse
after meta-systemd commit [1] the following error was thrown during parsing:

ERROR: Unable to parse /home/Superandy/data/oe-core/sources/meta-raspberrypi/conf/layer.conf:
Failure expanding variable BBFILES, expression was
...
which triggered exception NameError: name 'base_contains' is not defined

[1] http://cgit.openembedded.org/meta-openembedded/commit/?id=3c21a46020bd0816579648f684c41dbd6333583e

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2013-01-27 01:01:39 +02:00
Andrei Gherzan
e3e92fe903 README: Refactor
* Use maximum 80 columns per line
* Add contents
* Add "Contribution" section

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2013-01-24 21:34:48 +02:00
Andrei Gherzan
305c5259e2 arch-arm: define different ARMPKGARCH when different CCARGS are used
* without this tune-xscale and tune-arm926ejs were both creating
  packages in armv5te feed, but each with different -mtune, with
  OEBasicHash enabled it was causing each package to rebuild with new
  -mtune after MACHINE switch, but that doesn't make sense with output
  stored in the same armv5te feed

* this makes different feed for each -mtune, but more generic one to be
  selected with DEFAULTTUNE

* tune-iwmmxt and tune-ep9312 were already using this, just move it
  bellow AVAILTUNES and use ARMPKGARCH_tune-foo syntax

* tune-cortexr4 and tune-cortexm3 are using armv7r/armv7m as ARMPKGARCH
  because there isn't another tune to use the same -march

(From OE-Core rev: cffda9a821a3b83a8529d643c567859e091c6846)

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2012-11-28 02:30:04 +02:00
Andrei Gherzan
76c6b87958 tune-*: define more generic DEFAULTTUNE to share feed between machines
* this is mostly for backwards compatibility and to share binary feed
  like it was before, but now without missing different -mtune in it
* if you want to build some package with -mtune add something like this
  to your distro config
  DEFAULTTUNE_qemuarm_pn-openssl = "arm926ejs"
  DEFAULTTUNE_qemuarmx_pn-openssl = "xscale"
  be aware that if you do this you should do it also for all packages
  which depends on openssl because if you dont and you build e.g. dhcp,
  then dhcp build for arm926ejs (even with DEFAULTTUNE armv5te) will
  depend on openssl with arm926ejs, so dhcp in armv5te feed will be
  rebuild after each MACHINE switch.
* cortexm3, cortexr4, iwmmx and ep9312 are using own DEFAULTTUNE because
  they define also different -march
* shared feeds are
  armv4t: arm920t, arm9tdmi
  armv5te: arm926ejs, xscale
  armv7a-neon: cortexa8, cortexa9

(From OE-Core rev: a11bdc36a1be18cc5aa14682b2a2c9ee83141f51)

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2012-11-28 02:30:04 +02:00
Andrei Gherzan
c71508dae6 userland: Initial integration
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2012-11-27 22:42:43 +02:00
Andrei Gherzan
cf62711b7c sdcard_image-rpi: Remove RPI_GPU_FIRMWARE and add/remove files to boot partition
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2012-11-27 22:42:43 +02:00
Andrei Gherzan
ed0cd94914 README: Replace old RPI_GPU_FIRMWARE with GPU_MEM variables
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2012-11-27 22:42:42 +02:00
Andrei Gherzan
43faccc504 rpi-config: Add variables to set memory split for 256/512 models
GPU_MEM
gpu_mem - GPU memory in megabyte. Sets the memory split between the ARM and
GPU. ARM gets the remaining memory. Min 16. Default 64

GPU_MEM_256
gpu_mem_256 -GPU memory in megabyte for the 256MB Raspberry Pi. Ignored by
the 512MB RP. Overrides gpu_mem. Max 192.

GPU_MEM_512
gpu_mem_512 -GPU memory in megabyte for the 512MB Raspberry Pi. Ignored by
the 256MB RP. Overrides gpu_mem. Max 448.

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2012-11-27 22:42:42 +02:00
Andrei Gherzan
14734e73a3 rpi-config: Update to 62bf3e9db62f547eb1a2a352dde957d2f94bd216
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2012-11-27 22:42:42 +02:00
Andrei Gherzan
e79ec70804 linux.inc: Refactor inc file
Clean up the file and add function to setup configs.

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2012-11-27 22:42:42 +02:00
Andrei Gherzan
bc7e740348 linux-raspberrypi: Update to 10182a3bc434b27740f81c2b836a1af943060241
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2012-11-27 22:42:41 +02:00
Andrei Gherzan
48e0739783 linux-raspberrypi: Cleanup recipe
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2012-11-27 22:42:41 +02:00
Andrei Gherzan
d952980bd4 bcm2835-bootfiles: Deploy .dat files too
These files are used in the boot process with the updated bootloader.

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2012-11-27 22:42:41 +02:00
Andrei Gherzan
4ac170e18b firmware: Update to 537c78b113d06e37e2cca90a0b3d3f39a129ee23
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2012-11-27 22:42:41 +02:00
Andrei Gherzan
cfd5c65469 rpi-default-versions: Remove preferred version of udev
We use now the latest one from meta-openembedded.

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2012-11-27 22:42:40 +02:00
Andrei Gherzan
b3a4e96cf9 raspberrypi.conf: Remove RPI_GPU_FIRMWARE definition
We don't use this anymore as the memory split is now done from config.txt.

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2012-11-27 22:42:40 +02:00
Andrei Gherzan
e1e8477a77 rpi-default-providers: Use linux-libc-headers-raspberrypi
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2012-11-27 22:42:39 +02:00
Andrei Gherzan
a74544ac37 linux-libc-headers-raspberrypi: Add headers for raspberrypi kernel
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2012-11-27 22:42:39 +02:00
23 changed files with 333 additions and 370 deletions

108
README
View File

@@ -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.
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.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
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:
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
distributions and layer stacks, such as:
The core BSP part of meta-raspberrypi should work with different
OpenEmbedded/Yocto distributions and layer stacks, such as:
* Distro-less (only with OE-Core).
* Angstrom (main focus of testing).
@@ -65,13 +83,10 @@ URI: git://git.openembedded.org/meta-openembedded
branch: master
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:
@@ -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)
6. Boot your RPI.
Optional - compressed deployed files:
=====================================
2.A. Optional - compressed deployed files:
==========================================
1. Overwrite IMAGE_FSTYPES in local.conf
IMAGE_FSTYPES = "tar.bz2 ext3.xz rpi-sdimg.xz
2. Overwrite SDIMG_ROOTFS_TYPE in local.conf
SDIMG_ROOTFS_TYPE = "ext3.xz"
*Accommodate the values above to your own needs (ex: ext3 / ext4).
Optional - GPU firmware:
========================
By default the GPU firmware shipped is arm192. You can overwrite this using the
variable RPI_GPU_FIRMWARE with one of the values below.
# arm128 : 128M ARM, 128M GPU split
# arm192 : 192M ARM, 64M GPU split
# arm224 : 224M ARM, 32M GPU split
# arm240 : 240M ARM, 16M GPU split
2.B. Optional - GPU memory:
===========================
Variable : Details
GPU_MEM : GPU memory in megabyte. Sets the memory split between the ARM and
GPU. ARM gets the remaining memory. Min 16. Default 64.
GPU_MEM_256 : GPU memory in megabyte for the 256MB Raspberry Pi. Ignored by the
512MB RP. Overrides gpu_mem. Max 192. Default not set.
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:
========================================
To add you own licenses use variables KEY_DECODE_MPG2 and KEY_DECODE_WVC1 in local.conf. Example:
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:
KEY_DECODE_MPG2 = "12345678"
KEY_DECODE_WVC1 = "12345678"
You can supply more licenses separated by comma. Example:
KEY_DECODE_WVC1 = "0x12345678,0xabcdabcd,0x87654321"
Optional - Disable overscan:
============================
By default the GPU adds a black border around the video output to compensate for TVs
which cut off part of the image. To disable this set this variable in
2.D. Optional - Disable overscan:
=================================
By default the GPU adds a black border around the video output to compensate for
TVs which cut off part of the image. To disable this set this variable in
local.conf:
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
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:
@@ -138,5 +155,28 @@ SDRAM_FREQ = "500"
OVER_VOLTAGE = "6"
Layer maintainer: John Willis <John.Willis at distant-earth.com>
Andrei Gherzan <andrei at gherzan.ro>
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>

View File

@@ -13,14 +13,14 @@ inherit image_types
# Default Free space = 1.3x
# 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 |
# ------------------------ ------------ ------------------------ -------------------------------
# ^ ^ ^ ^ ^
# | | | | |
# 0 4096 4KiB + 20MiB 4KiB + 20Mib + SDIMG_ROOTFS 4KiB + 20MiB + SDIMG_ROOTFS + 4KiB
# ------------------------ ------------ ------------------------
# | IMAGE_ROOTFS_ALIGNMENT | BOOT_SPACE | ROOTFS_SIZE |
# ------------------------ ------------ ------------------------
# ^ ^ ^ ^
# | | | |
# 0 4MiB 4MiB + 20MiB 4MiB + 20Mib + SDIMG_ROOTFS
# Set kernel and boot loader
@@ -29,7 +29,7 @@ IMAGE_BOOTLOADER ?= "bcm2835-bootfiles"
# Boot partition volume id
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"
# Set alignment to 4MB [in KiB]
@@ -39,8 +39,6 @@ IMAGE_ROOTFS_ALIGNMENT = "4096"
SDIMG_ROOTFS_TYPE ?= "ext3"
SDIMG_ROOTFS = "${IMAGE_NAME}.rootfs.${SDIMG_ROOTFS_TYPE}"
RPI_GPU_FIRMWARE ?= "arm192"
IMAGE_DEPENDS_rpi-sdimg = " \
parted-native \
mtools-native \
@@ -62,37 +60,30 @@ 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 + ${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
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
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
parted -s ${SDIMG} unit KiB mkpart primary ext2 $(expr ${BOOT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT}) $(expr ${BOOT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT} \+ ${ROOTFS_SIZE})
# Create rootfs partition to the end of disk
parted -s ${SDIMG} -- unit KiB mkpart primary ext2 $(expr ${BOOT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT}) -1s
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 }')
mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS
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}/bcm2835-bootfiles/* ::/
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin ::kernel.img
if [ -n ${FATPAYLOAD} ] ; then
@@ -110,7 +101,7 @@ IMAGE_CMD_rpi-sdimg () {
# 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 [[ "$SDIMG_ROOTFS_TYPE" == *.xz ]]
if echo "${SDIMG_ROOTFS_TYPE}" | egrep -q "*\.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

View File

@@ -2,9 +2,13 @@
BBPATH .= ":${LAYERDIR}"
# 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"
BBFILE_COLLECTIONS += "raspberrypi"
BBFILE_PATTERN_raspberrypi := "^${LAYERDIR}/"
BBFILE_PRIORITY_raspberrypi = "6"
# Additional license directories.
LICENSE_PATH += "${LAYERDIR}/files/custom-licenses"

View File

@@ -2,6 +2,6 @@
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"
PREFERRED_PROVIDER_virtual/egl ?= "userland"
PREFERRED_PROVIDER_virtual/libgles2 ?= "userland"
PREFERRED_PROVIDER_linux-libc-headers ?= "linux-libc-headers-raspberrypi"

View File

@@ -1,3 +1,2 @@
# RaspberryPi BSP default versions
PREFERRED_VERSION_udev = "164"

View File

@@ -1,4 +1,4 @@
DEFAULTTUNE ?= "arm1176jzfs"
DEFAULTTUNE ?= "armv6"
require conf/machine/include/arm/arch-armv6.inc
@@ -7,4 +7,5 @@ TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "arm1176jzfs", "-mtune=arm
AVAILTUNES += "arm1176jzfs"
TUNE_FEATURES_tune-arm1176jzfs = "${TUNE_FEATURES_tune-armv6} arm1176jzfs"
ARMPKGARCH_tune-arm1176jzfs = "arm1176jzfs"
PACKAGE_EXTRA_ARCHS_tune-arm1176jzfs = "${PACKAGE_EXTRA_ARCHS_tune-armv6}"

View File

@@ -12,7 +12,7 @@ IMAGE_FSTYPES ?= "tar.bz2 ext3 rpi-sdimg"
SERIAL_CONSOLE = "115200 ttyAMA0"
MACHINE_KERNEL_PR = "r4"
MACHINE_KERNEL_PR = "r5"
XSERVER = " \
xserver-xorg \
@@ -32,6 +32,3 @@ MACHINE_FEATURES_BACKFILL_CONSIDERED = "rtc"
MACHINE_EXTRA_RRECOMMENDS += " \
kernel-modules \
"
# Set default GPU firmware image to be shipped
RPI_GPU_FIRMWARE ?= "arm192"

View 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.

View File

@@ -5,7 +5,7 @@ SECTION = "base"
HOMEPAGE = "http://www.open.com.au/mikem/bcm2835"
AUTHOR = "Mike McCauley (mikem@open.com.au)"
LICENSE = "GPL-2.0"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
PR = "r0"

View File

@@ -15,7 +15,7 @@ SRC_URI = " \
S = "${WORKDIR}/git/boot"
PR = "r2"
PR = "r3"
addtask deploy before do_package after do_install
@@ -24,6 +24,9 @@ do_deploy() {
for i in *.elf ; do
cp $i ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles
done
for i in *.dat ; do
cp $i ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles
done
for i in *.bin ; do
cp $i ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles
done

View File

@@ -7,13 +7,13 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384
COMPATIBLE_MACHINE = "raspberrypi"
SRCREV = "afeaed02ba5f01298dec3ac4e1bd98f27bcd876e"
SRCREV = "62bf3e9db62f547eb1a2a352dde957d2f94bd216"
SRC_URI = "git://github.com/Evilpaul/RPi-config.git;protocol=git;branch=master \
"
S = "${WORKDIR}/git"
PR = "r1"
PR = "r3"
addtask deploy before do_package after do_install
@@ -41,6 +41,17 @@ do_deploy() {
if [ -n "${OVER_VOLTAGE}" ]; then
sed -i '/#over_voltage/ c\over_voltage=${OVER_VOLTAGE}' ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/config.txt
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}"

View File

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

View File

@@ -3,7 +3,7 @@ LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://LICENCE;md5=86e53f5f5909ee66900418028de11780"
PROVIDES = "virtual/libgl virtual/libgles2 virtual/egl"
PROVIDES = "virtual/libgles2 virtual/egl"
COMPATIBLE_MACHINE = "raspberrypi"
include ../common/firmware.inc
@@ -14,7 +14,7 @@ SRC_URI = "git://github.com/raspberrypi/firmware.git;protocol=git;branch=master\
S = "${WORKDIR}/git/${VCDIR}"
INCPR = "r0"
INCPR = "r1"
inherit pkgconfig update-rc.d

View File

@@ -1,2 +0,0 @@
127.0.0.1 localhost.localdomain localhost raspberrypi rpi

View File

@@ -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

View File

@@ -1,3 +0,0 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
# Don't forget to bump PRINC if you update the extra files.
PRINC = "1"

View File

@@ -1,13 +1,13 @@
DESCRIPTION = "Scripts to support a first run wizard on the Raspberry Pi."
LICENSE = "GPLV2"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263"
DEPENDS = "zenity dbus"
RDEPENDS = "slim sudo zenity dbus"
RDEPENDS_${PN} = "slim sudo zenity dbus"
COMPATIBLE_MACHINE = "raspberrypi"
PR = "r1"
PR = "r2"
SRC_URI = " \
file://LICENSE \

View 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}"

View File

@@ -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"

View File

@@ -1,32 +1,22 @@
COMPATIBLE_MACHINE = "raspberrypi"
require linux.inc
DESCRIPTION = "Linux kernel for the RaspberryPi board"
COMPATIBLE_MACHINE = "raspberrypi"
PR = "r4"
# Bump MACHINE_KERNEL_PR in the machine config if you update the kernel.
# This is on the rpi-3.2.27 branch
SRCREV = "e33263e7eab2d05349b438f6a4a8d1924686a824"
PR = "r6"
PV_append = "+git${SRCREV}"
SRCREV = "10182a3bc434b27740f81c2b836a1af943060241"
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"
# 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"
PARALLEL_MAKEINST = ""
UDEV_GE_141 ?= "1"
do_configure_prepend() {

View 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
}

View File

@@ -6,265 +6,111 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
inherit kernel siteinfo
RPSRC = "http://www.rpsys.net/openzaurus/patches/archive"
# Enable OABI compat for people stuck with obsolete userspace
ARM_KEEP_OABI ?= "1"
# Quirk for udev greater or equal 141
UDEV_GE_141 ?= "0"
# 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"
UDEV_GE_141 ?= "1"
# Set the verbosity of kernel messages during runtime
# 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_append = " ${CMDLINE_DEBUG} "
CMDLINE_append = " ${CMDLINE_DEBUG}"
# Kernel bootlogo is distro-specific (default is OE logo).
# Logo resolution (qvga, vga, ...) is machine-specific.
LOGO_SIZE ?= "."
# Support for binary device tree generation
FILES_kernel-devicetree = "/boot/devicetree*"
KERNEL_DEVICETREE_boc01 = "${WORKDIR}/boc01.dts"
KERNEL_DEVICETREE_calamari = "arch/${ARCH}/boot/dts/mpc8536ds.dts"
KERNEL_DEVICETREE_canyonlands = "arch/${ARCH}/boot/dts/canyonlands.dts"
KERNEL_DEVICETREE_kilauea = "arch/${ARCH}/boot/dts/kilauea.dts"
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() {
# 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
#
# 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
#
if [ "${TARGET_OS}" = "linux-gnueabi" -o "${TARGET_OS}" = "linux-uclibceabi" ]; then
echo "CONFIG_AEABI=y" >> ${S}/.config
if [ "${ARM_KEEP_OABI}" = "1" ] ; then
echo "CONFIG_OABI_COMPAT=y" >> ${S}/.config
else
echo "# CONFIG_OABI_COMPAT is not set" >> ${S}/.config
fi
else
echo "# CONFIG_AEABI is not set" >> ${S}/.config
echo "# CONFIG_OABI_COMPAT is not set" >> ${S}/.config
fi
# When enabling thumb for userspace we also need thumb support in the kernel
if [ "${ARM_INSTRUCTION_SET}" = "thumb" ] ; then
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
if [ "${CORTEXA8FIXUP}" = "yes" ] ; then
sed -i -e /CONFIG_ARM_ERRATA_430973/d ${WORKDIR}/defconfig
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
#
# Newer versions of udev mandate that sysfs doesn't have deprecated entries
if [ "${UDEV_GE_141}" = "1" ] ; then
sed -e /CONFIG_SYSFS_DEPRECATED/d \
-e /CONFIG_SYSFS_DEPRECATED_V2/d \
-e /CONFIG_HOTPLUG/d \
-e /CONFIG_UEVENT_HELPER_PATH/d \
-e /CONFIG_UNIX/d \
-e /CONFIG_SYSFS/d \
-e /CONFIG_PROC_FS/d \
-e /CONFIG_TMPFS/d \
-e /CONFIG_INOTIFY_USER/d \
-e /CONFIG_SIGNALFD/d \
-e /CONFIG_TMPFS_POSIX_ACL/d \
-e /CONFIG_BLK_DEV_BSG/d \
-i '${S}/.config'
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
# Newer inits like systemd need cgroup support
if [ "${KERNEL_ENABLE_CGROUPS}" = "1" ] ; then
sed -e /CONFIG_CGROUP_SCHED/d \
-e /CONFIG_CGROUPS/d \
-i '${S}/.config'
echo 'CONFIG_CGROUP_SCHED=y' >> ${S}/.config
echo 'CONFIG_CGROUPS=y' >> ${S}/.config
echo 'CONFIG_CGROUP_NS=y' >> ${S}/.config
echo 'CONFIG_CGROUP_FREEZER=y' >> ${S}/.config
echo 'CONFIG_CGROUP_DEVICE=y' >> ${S}/.config
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
#
# root-over-nfs-over-usb-eth support. Limited, but should cover some cases.
# Enable this by setting a proper CMDLINE_NFSROOT_USB.
#
if [ ! -z "${CMDLINE_NFSROOT_USB}" ]; then
oenote "Configuring the kernel for root-over-nfs-over-usb-eth with CMDLINE ${CMDLINE_NFSROOT_USB}"
sed -e '/CONFIG_INET/d' \
-e '/CONFIG_IP_PNP=/d' \
-e '/CONFIG_USB_GADGET=/d' \
-e '/CONFIG_USB_GADGET_SELECTED=/d' \
-e '/CONFIG_USB_ETH=/d' \
-e '/CONFIG_NFS_FS=/d' \
-e '/CONFIG_ROOT_NFS=/d' \
-e '/CONFIG_CMDLINE=/d' \
-i ${S}/.config
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
yes '' | oe_runmake oldconfig
#
# Activate CONFIG_LEGACY_PTYS
#
sed -e '/CONFIG_LEGACY_PTYS/d' -i ${S}/.config
echo "CONFIG_LEGACY_PTYS=y" >> ${S}/.config
}
do_configure_append() {
if test -e scripts/Makefile.fwinst ; then
sed -i -e "s:-m0644:-m 0644:g" scripts/Makefile.fwinst
# Set a variable in .configure
# $1 - Configure variable to be set
# $2 - value [n/y/value]
kernel_configure_variable() {
# Remove the config
CONF_SED_SCRIPT="$CONF_SED_SCRIPT /CONFIG_$1[ =]/d;"
if test "$2" = "n"
then
echo "# CONFIG_$1 is not set" >> ${S}/.config
else
echo "CONFIG_$1=$2" >> ${S}/.config
fi
}
# bitbake.conf only prepends PARALLEL make in tasks called do_compile, which isn't the case for compile_modules
# So explicitly enable it for that in here
EXTRA_OEMAKE = "${PARALLEL_MAKE} "
do_configure_prepend() {
# Clean .config
echo "" > ${S}/.config
CONF_SED_SCRIPT=""
do_install_append() {
oe_runmake headers_install INSTALL_HDR_PATH=${D}${exec_prefix}/src/linux-${KERNEL_VERSION} ARCH=$ARCH
}
# oabi / eabi support
if [ "${TARGET_OS}" = "linux-gnueabi" -o "${TARGET_OS}" = "linux-uclibceabi" ]; then
kernel_configure_variable AEABI y
if [ "${ARM_KEEP_OABI}" = "1" ] ; then
kernel_configure_variable OABI_COMPAT y
else
kernel_configure_variable OABI_COMPAT n
fi
else
kernel_configure_variable AEABI n
kernel_configure_variable OABI_COMPAT n
fi
PACKAGES =+ "kernel-headers"
FILES_kernel-headers = "${exec_prefix}/src/linux*"
# Set cmdline
kernel_configure_variable CMDLINE "\"${CMDLINE}\""
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
}
# Localversion
kernel_configure_variable LOCALVERSION "\"\""
kernel_configure_variable LOCALVERSION_AUTO n
addtask devicetree_image after do_install before do_package do_deploy
# Udev quirks
# Newer versions of udev mandate that sysfs doesn't have deprecated entries
if [ "${UDEV_GE_141}" = "1" ] ; then
kernel_configure_variable SYSFS_DEPRECATED n
kernel_configure_variable SYSFS_DEPRECATED_V2 n
kernel_configure_variable HOTPLUG y
kernel_configure_variable UEVENT_HELPER_PATH "\"\""
kernel_configure_variable UNIX y
kernel_configure_variable SYSFS y
kernel_configure_variable PROC_FS y
kernel_configure_variable TMPFS y
kernel_configure_variable INOTIFY_USER y
kernel_configure_variable SIGNALFD y
kernel_configure_variable TMPFS_POSIX_ACL y
kernel_configure_variable BLK_DEV_BSG y
kernel_configure_variable DEVTMPFS y
kernel_configure_variable DEVTMPFS_MOUNT y
fi
pkg_postinst_kernel-devicetree () {
cd /${KERNEL_IMAGEDEST}; update-alternatives --install /${KERNEL_IMAGEDEST}/devicetree devicetree devicetree-${KERNEL_VERSION} ${KERNEL_PRIORITY} || true
}
# Newer inits like systemd need cgroup support
if [ "${KERNEL_ENABLE_CGROUPS}" = "1" ] ; then
kernel_configure_variable CGROUP_SCHED y
kernel_configure_variable CGROUPS y
kernel_configure_variable CGROUP_NS y
kernel_configure_variable CGROUP_FREEZER y
kernel_configure_variable CGROUP_DEVICE y
kernel_configure_variable CPUSETS y
kernel_configure_variable PROC_PID_CPUSET y
kernel_configure_variable CGROUP_CPUACCT y
kernel_configure_variable RESOURCE_COUNTERS y
fi
pkg_postrm_kernel-devicetree () {
cd /${KERNEL_IMAGEDEST}; update-alternatives --remove devicetree devicetree-${KERNEL_VERSION} || true
# root-over-nfs-over-usb-eth support. Limited, but should cover some cases
# Enable this by setting a proper CMDLINE_NFSROOT_USB.
if [ ! -z "${CMDLINE_NFSROOT_USB}" ]; then
oenote "Configuring the kernel for root-over-nfs-over-usb-eth with CMDLINE ${CMDLINE_NFSROOT_USB}"
kernel_configure_variable INET y
kernel_configure_variable IP_PNP y
kernel_configure_variable USB_GADGET y
kernel_configure_variable USB_GADGET_SELECTED y
kernel_configure_variable USB_ETH y
kernel_configure_variable NFS_FS y
kernel_configure_variable ROOT_NFS y
kernel_configure_variable ROOT_NFS y
kernel_configure_variable CMDLINE "\"${CMDLINE_NFSROOT_USB}\""
fi
# Activate CONFIG_LEGACY_PTYS
kernel_configure_variable LEGACY_PTYS y
# Keep this the last line
# Remove all modified configs and add the rest to .config
sed -e "${CONF_SED_SCRIPT}" < '${WORKDIR}/defconfig' >> '${S}/.config'
yes '' | oe_runmake oldconfig
}
# Automatically depend on lzop-native if CONFIG_KERNEL_LZO is enabled

View File

@@ -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.