50 Commits
pyro ... morty

Author SHA1 Message Date
c92c83ef0c gstreamer-plugins-bad: enable wayland for OpenGL in vc4graphics
Signed-off-by: Moorthy Baskar <moorthy.bs@ltts.com>
2020-06-09 17:55:06 +01:00
08d6fc96da rpi-base.inc: enable vc4graphics in MACHINE_FEATURES
Signed-off-by: Moorthy Baskar <moorthy.bs@ltts.com>
2020-06-09 17:55:06 +01:00
3b5f62835a userland: add changes for vc4graphics support
Signed-off-by: Moorthy Baskar <moorthy.bs@ltts.com>
2020-06-09 17:55:06 +01:00
2a192261a9 README: update dependencies
The rpi-test-image requires meta-networking and meta-python.

Fixes #78

Signed-off-by: Mirza Krak <mirza.krak@gmail.com>
2017-09-19 20:34:39 +01:00
83422c158d raspberrypi3-64.conf: Don't use raspberrypi as MACHINEOVERRIDES
The current setup broke the build for rpi3-64 when we wanted to port
some changes from rpi3 to rpi0.

Signed-off-by: Michal Mazurek <michal@resin.io>
2017-09-08 19:00:25 +01:00
380bf2ff44 README: Update contribution instructions for morty branch
We don't want to pull in all the documentation changes recently made on
master, but we should now direct people to submit pull requests via
GitHub.

Signed-off-by: Paul Barker <pbarker@toganlabs.com>
2017-05-31 23:59:09 +01:00
6baa6641ea linux-rasbperrypi: Update to 4.9.27
Signed-off-by: Paul Barker <pbarker@toganlabs.com>
2017-05-31 23:59:09 +01:00
eafd9b8e4f Merge pull request #72 from agherzan/pbarker/morty-next
linux-raspberrypi_4.9.bb: Update to 4.9.23
2017-05-17 18:42:33 +01:00
a1311ee550 Merge pull request #54 from mickey-happygolucky/morty
modify to use xf86-input-libinput
2017-05-16 12:40:59 +01:00
e5467bf777 linux-raspberrypi_4.9.bb: Update to 4.9.23
bring CMA > 256M changes

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-05-15 09:53:31 +00:00
12d8ec9d64 xserver-xorg: add xf86-input-libinput to XSERVER_RRECOMMENDS
oe-core's commit is not merged in morty branch.

| xorg-xserver recommends xf86-input-libinput since oe-core's commit
|
|   | commit 2d005faff6341a81a2afae28860101ba9db51ae8
|   | Author: Jussi Kukkonen <jussi.kukkonen@intel.com>
|   | Date:   Wed Oct 26 11:37:38 2016 +0300
|   |
|   |    conf: Use xf86-input-libinput by default
|   | ...

This is workaround to fix the problem that mouse does not work in morty.

Signed-off-by: Yusuke Mitsuki <mickey.happygolucky@gmail.com>
2017-04-21 23:13:01 +09:00
99967e3763 xserver-xf86-config: remove evdev configuration
xorg-xserver recommends xf86-input-libinput since oe-core's commit

| commit 2d005faff6341a81a2afae28860101ba9db51ae8
| Author: Jussi Kukkonen <jussi.kukkonen@intel.com>
| Date:   Wed Oct 26 11:37:38 2016 +0300
|
|    conf: Use xf86-input-libinput by default
| ...

As nice side effect warnings for missing evdev in Xorg.0.log are gone.

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
2017-04-21 22:26:24 +09:00
28d4404f89 raspberrypi3.conf: Use a stand alone machine configuration
As well make all the variables assigned in a way that they can be
overwritten so we can give maximum flexibility to distros.

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2017-04-20 18:17:59 +01:00
ecb269577b raspberrypi3-64.conf: Make SERIAL_CONSOLE overwritable
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2017-04-20 18:17:10 +01:00
8b433e41f6 raspberrypi2.conf: Make SERIAL_CONSOLE overwritable
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2017-04-20 18:16:35 +01:00
f95491903a raspberrypi.conf: Have the ability to overwrite SERIAL_CONSOLE
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2017-04-20 12:24:51 +01:00
039a1d7f2a raspberrypi0-wifi.conf: Use a stand alone machine configuration
As well make all the variables assigned in a way that they can be
overwritten so we can give maximum flexibility to distros.

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2017-04-19 19:19:32 +01:00
375e5d64ba rpi-config: Specify bcm2710-rpi-3-b dtb for 64bit rpi3
Let config.txt explicitly specify it

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-04-19 19:17:57 +01:00
b61403a6a3 sdcard: Use kernel8.img for 64bit kernel image name
This helps the firmware to identify the kernel as 64bit
image

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-04-19 19:17:56 +01:00
a151923fa5 raspberrypi3-64: Override rpi-default-versions.inc
Signed-off-by: Paul Barker <pbarker@toganlabs.com>
2017-04-19 19:17:55 +01:00
a168fc389e raspberrypi3-64.conf: Specifiy rpi3-64bit dtbs
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-04-19 19:17:53 +01:00
bc2a2abce0 raspberrypi3-64.conf: Use 4.9 as default kernel
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-04-19 19:17:52 +01:00
317cdf9934 Add raspberrypi3-64.conf
Signed-off-by: Herve Jourdain <herve.jourdain@neuf.fr>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-04-19 19:17:48 +01:00
0fa47d5f2a linux-raspberrypi: Add defconfig for raspberrypi3-64
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-04-19 19:17:47 +01:00
b82067de87 linux-raspberrypi_4.9: Bump to 4.9.21
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2017-04-19 19:17:46 +01:00
1df7181396 udev: Create rules file to generate serial0/1
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2017-04-18 20:08:42 +02:00
45638700dd README: Add info about raspberrypi0-wifi
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2017-04-17 13:27:43 +01:00
736e4fabca raspberrypi0-wifi.conf: Add machine configuration file
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2017-04-17 13:20:46 +01:00
e9a4bf9ef5 rpi-base.inc: Include dtb for RPI0 WiFi
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2017-04-17 13:20:10 +01:00
19e9381dbc firmware.inc: Bump to 20170405
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2017-04-17 13:16:51 +01:00
ab9335f90c firmware: Update to 20170303 release
Uses 4.9.13 and has rpi0w support

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-04-17 13:16:46 +01:00
4c1362117a firmware: Update to 20161215 release
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-04-17 13:16:42 +01:00
86fe4f9ccb linux-firmware: Bring up wifi/ble interface on rpi3
Currently the firmware is installed but kernel fails to load it
due this .txt file missing in the firmware directory and it ends
up with wifi/bluetooth i/f not being initialized. The error is
also in dmesg

[    3.120991] usbcore: registered new interface driver brcmfmac
[    3.148240] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43430-sdio.txt failed with error -2

After applying this patch now ifconfig -a can list wlan0 interface
successfully.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-04-17 12:58:46 +01:00
5de45f285e linux-raspberrypi_4.4: Update to 4.4.50
Signed-off-by: Paul Barker <pbarker@toganlabs.com>
2017-03-21 16:54:08 +00:00
cb8587a395 linux-raspberrypi: Fix uImage build on 4.9.y and later
Signed-off-by: Paul Barker <pbarker@toganlabs.com>
2017-03-21 16:54:06 +00:00
9cd3776bd2 linux-raspberrypi_4.9.bb: Update to 4.9.13
drop upstreamed patch

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-03-21 16:54:05 +00:00
cce6292e41 linux-raspberrypi_4.9.bb: Upgrade to 4.9.10
Fix dtbo builds for arm64

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2017-02-19 22:27:55 -08:00
c34a6b0343 linux-raspberrypi_4.4: Update to 4.4.48
Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2017-02-19 22:27:54 -08:00
73980301cf Revert "u-boot: drop patch to include lowlevel_init"
Not applicable on U-boot 2016.03 which is used in poky/morty and causes an build
error when KERNEL_IMAGETYPE = "uImage".

This reverts commit 031e26954b.

[Issue #43]

Signed-off-by: Mirza Krak <mirza.krak@gmail.com>
2017-01-25 16:32:28 +01:00
69c56754bd README: Mention CM1 and CM3 support
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2017-01-20 18:45:48 +01:00
56b0c59894 rpi-base.inc: Include dtb file for CM1 and CM3
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2017-01-20 18:45:41 +01:00
a7354774fe raspberrypi*.conf: Minor tweaks
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2017-01-20 18:45:30 +01:00
9923618351 raspberrypi-cm3.conf: Add dummy machine for CM3 (alias for RPi2)
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2017-01-20 18:42:20 +01:00
d5aa048edb raspberrypi-cm.conf: Add dummy machine for CM1 (alias for RPi1)
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2017-01-20 18:41:58 +01:00
5b5c4d9334 linux-raspberrypi_4.9: Update to 4.9.4
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2017-01-19 12:47:28 +01:00
f81f022439 linux-raspberrypi_4.4: Update to 4.4.43
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2017-01-19 12:47:22 +01:00
263e6bdf57 linux-raspberrypi: Drop v4.8
Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2017-01-19 12:47:15 +01:00
121e2005cc linux-raspberrypi: Drop v4.7
Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2017-01-19 12:47:10 +01:00
cb7068a6dc linux-raspberrypi: Upgrade to v4.4.39
Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2017-01-19 12:47:03 +01:00
38bc32478e linux-raspberrypi: Drop v4.1
The linux-raspberrypi 4.1 recipe has been broken for a while, probably since
09b76a43f6. It should now be safe to drop this
version.

Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2017-01-19 12:46:55 +01:00
84 changed files with 1191 additions and 1512 deletions

View File

@ -1,27 +0,0 @@
<!--
If you are reporting a new issue, make sure that we do not have any duplicates
already open. You can ensure this by searching the issue list for this
repository. If there is a duplicate, please close your issue and add a comment
to the existing issue instead.
-->
**Description**
<!--
Briefly describe the problem you are having in a few paragraphs.
-->
**Steps to reproduce the issue:**
1.
2.
3.
**Describe the results you received:**
**Describe the results you expected:**
**Additional information you deem important (e.g. issue happens only occasionally):**
**Additional details (revisions used, host distro, etc.):**

View File

@ -1,16 +0,0 @@
<!--
Please make sure you've read and understood our contributing guidelines.
For additional information on the contribution guidelines:
https://wiki.yoctoproject.org/wiki/Contribution_Guidelines#General_Information
If this PR fixes an issue, make sure your description includes "fixes #xxxx".
If this PR connects to an issue, make sure your description includes "connected to #xxxx".
Please provide the following information:
-->
**- What I did**
**- How I did it**

2
.gitignore vendored
View File

@ -3,5 +3,3 @@ build*
.*.swp
*.orig
*.rej
*.log
docs/_build

352
README Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,55 +0,0 @@
# meta-raspberrypi
Yocto BSP layer for the Raspberry Pi boards - <http://www.raspberrypi.org/>.
[![Build Status](https://yocto-ci.resin.io/job/meta-raspberrypi1/badge/icon)](https://yocto-ci.resin.io/job/meta-raspberrypi1)
[![Build Status](https://yocto-ci.resin.io/job/meta-raspberrypi2/badge/icon)](https://yocto-ci.resin.io/job/meta-raspberrypi2)
[![Build Status](https://yocto-ci.resin.io/job/meta-raspberrypi3/badge/icon)](https://yocto-ci.resin.io/job/meta-raspberrypi3)
[![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/agherzan/meta-raspberrypi)
## Quick links
* Git repository web frontend:
<http://git.yoctoproject.org/cgit/cgit.cgi/meta-raspberrypi/>
* Mailing list (yocto mailing list): <yocto@yoctoproject.org>
* Issues management (Github Issues):
<https://github.com/agherzan/meta-raspberrypi/issues>
## Description
This is the general hardware specific BSP overlay for the RaspberryPi device.
More information can be found at: <http://www.raspberrypi.org/> (Official Site)
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.
* Yocto/Poky (main focus of testing).
## Dependencies
This layer depends on:
* URI: git://git.yoctoproject.org/poky
* branch: pyro
* revision: HEAD
* URI: git://git.openembedded.org/meta-openembedded
* layers: meta-oe, meta-multimedia, meta-networking, meta-python
* branch: pyro
* revision: HEAD
## Quick Start
1. source poky/oe-init-build-env rpi-build
2. Add this layer to bblayers.conf and the dependencies above
3. Set MACHINE in local.conf to one of the supported boards
4. bitbake rpi-hwup-image
5. dd to a SD card the generated sdimg file (use xzcat if rpi-sdimg.xz is used)
6. Boot your RPI.
## Maintainers
* Andrei Gherzan `<andrei at gherzan.ro>`

View File

@ -3,8 +3,8 @@ inherit linux-kernel-base
def get_dts(d, ver=None):
import re
staging_dir = d.getVar("STAGING_KERNEL_BUILDDIR")
dts = d.getVar("KERNEL_DEVICETREE")
staging_dir = d.getVar("STAGING_KERNEL_BUILDDIR", True)
dts = d.getVar("KERNEL_DEVICETREE", True)
# d.getVar() might return 'None' as a normal string
# leading to 'is None' check isn't enough.

View File

@ -72,10 +72,6 @@ SDIMG = "${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.rpi-sdimg"
# Additional files and/or directories to be copied into the vfat partition from the IMAGE_ROOTFS.
FATPAYLOAD ?= ""
# SD card vfat partition image name
SDIMG_VFAT = "${IMAGE_NAME}.vfat"
SDIMG_LINK_VFAT = "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.vfat"
IMAGE_CMD_rpi-sdimg () {
# Align partitions
@ -111,7 +107,7 @@ IMAGE_CMD_rpi-sdimg () {
DT_ROOT="${@split_overlays(d, 1)}"
# Copy board device trees to root folder
for DTB in $DT_ROOT; do
for DTB in ${DT_ROOT}; do
DTB_BASE_NAME=`basename ${DTB} .dtb`
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTB_BASE_NAME}.dtb ::${DTB_BASE_NAME}.dtb
@ -119,7 +115,7 @@ IMAGE_CMD_rpi-sdimg () {
# Copy device tree overlays to dedicated folder
mmd -i ${WORKDIR}/boot.img overlays
for DTB in $DT_OVERLAYS; do
for DTB in ${DT_OVERLAYS}; do
DTB_EXT=${DTB##*.}
DTB_BASE_NAME=`basename ${DTB} ."${DTB_EXT}"`
@ -149,16 +145,6 @@ IMAGE_CMD_rpi-sdimg () {
echo "${IMAGE_NAME}" > ${WORKDIR}/image-version-info
mcopy -i ${WORKDIR}/boot.img -v ${WORKDIR}/image-version-info ::
# Deploy vfat partition (for u-boot case only)
case "${KERNEL_IMAGETYPE}" in
"uImage")
cp ${WORKDIR}/boot.img ${IMGDEPLOYDIR}/${SDIMG_VFAT}
ln -sf ${SDIMG_VFAT} ${SDIMG_LINK_VFAT}
;;
*)
;;
esac
# 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

View File

@ -32,7 +32,6 @@ KERNEL_DEVICETREE ?= " \
overlays/lirc-rpi.dtbo \
overlays/pitft22.dtbo \
overlays/pitft28-resistive.dtbo \
overlays/pitft35-resistive.dtbo \
overlays/pps-gpio.dtbo \
overlays/rpi-ft5406.dtbo \
overlays/w1-gpio.dtbo \
@ -43,7 +42,7 @@ KERNEL_DEVICETREE ?= " \
"
KERNEL_IMAGETYPE ?= "Image"
MACHINE_FEATURES += "apm usbhost keyboard vfat ext2 screen touchscreen alsa bluetooth wifi sdio"
MACHINE_FEATURES += "apm usbhost keyboard vfat ext2 screen touchscreen alsa bluetooth wifi sdio ${@bb.utils.contains('DISABLE_VC4GRAPHICS', '1', '', 'vc4graphics', d)}"
# Raspberry Pi has no hardware clock
MACHINE_FEATURES_BACKFILL_CONSIDERED = "rtc"
@ -53,44 +52,7 @@ MACHINE_EXTRA_RRECOMMENDS += " kernel-modules"
# Set Raspberrypi splash image
SPLASH = "psplash-raspberrypi"
def make_dtb_boot_files(d):
# Generate IMAGE_BOOT_FILES entries for device tree files listed in
# KERNEL_DEVICETREE.
alldtbs = d.getVar('KERNEL_DEVICETREE')
imgtyp = d.getVar('KERNEL_IMAGETYPE')
def transform(dtb):
if dtb.endswith('dtb'):
# eg: whatever/bcm2708-rpi-b.dtb has:
# DEPLOYDIR file: ${KERNEL_IMAGETYPE}-bcm2708-rpi-b.dtb
# destination: bcm2708-rpi-b.dtb
base = os.path.basename(dtb)
src = '{}-{}'.format(imgtyp, base)
dst = base
return '{};{}'.format(src, dst)
elif dtb.endswith('dtbo'):
# overlay dtb:
# eg: overlays/hifiberry-amp.dtbo has:
# DEPLOYDIR file: ${KERNEL_IMAGETYPE}-hifiberry-amp.dtbo
# destination: overlays/hifiberry-amp.dtbo
base = os.path.basename(dtb)
src = '{}-{}'.format(imgtyp, base)
dst = dtb
return '{};{}'.format(src, dtb)
return ' '.join([transform(dtb) for dtb in alldtbs.split(' ') if dtb])
IMAGE_BOOT_FILES ?= "bcm2835-bootfiles/* \
${@make_dtb_boot_files(d)} \
${@bb.utils.contains('KERNEL_IMAGETYPE', 'uImage', \
'${KERNEL_IMAGETYPE} u-boot.bin;${SDIMG_KERNELIMAGE} boot.scr', \
'${KERNEL_IMAGETYPE};${SDIMG_KERNELIMAGE}', d)} \
"
do_image_wic[depends] += " \
bcm2835-bootfiles:do_deploy \
${@bb.utils.contains('RPI_USE_U_BOOT', '1', 'u-boot:do_deploy', '',d)} \
"
IMAGE_BOOT_FILES ?= "bcm2835-bootfiles/* ${KERNEL_IMAGETYPE};${SDIMG_KERNELIMAGE}"
# The kernel image is installed into the FAT32 boot partition and does not need
# to also be installed into the rootfs.

View File

@ -6,5 +6,4 @@ PREFERRED_PROVIDER_virtual/egl ?= "${@bb.utils.contains("MACHINE_FEATURES", "vc4
PREFERRED_PROVIDER_virtual/libgles2 ?= "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "mesa", "userland", d)}"
PREFERRED_PROVIDER_virtual/libgl ?= "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "mesa", "mesa-gl", d)}"
PREFERRED_PROVIDER_virtual/mesa ?= "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "mesa", "mesa-gl", d)}"
PREFERRED_PROVIDER_libgbm ?= "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "mesa", "mesa-gl", d)}"
PREFERRED_PROVIDER_jpeg ?= "jpeg"

View File

@ -1,3 +1,3 @@
# RaspberryPi BSP default versions
PREFERRED_VERSION_linux-raspberrypi ??= "4.9.%"
PREFERRED_VERSION_linux-raspberrypi ?= "4.4.%"

View File

@ -5,5 +5,5 @@
MACHINEOVERRIDES = "raspberrypi:${MACHINE}"
include conf/machine/raspberrypi.conf
SERIAL_CONSOLE ?= "115200 ttyAMA0"
SERIAL_CONSOLE = "115200 ttyAMA0"
VC4_CMA_SIZE ?= "cma-128"

View File

@ -6,6 +6,9 @@ MACHINEOVERRIDES = "raspberrypi3:${MACHINE}"
MACHINE_EXTRA_RRECOMMENDS += "linux-firmware-bcm43430"
# Set this early so it overrides rpi-default-versions.inc
PREFERRED_VERSION_linux-raspberrypi ?= "4.9.%"
require conf/machine/include/arm/arch-armv8.inc
include conf/machine/include/rpi-base.inc
@ -23,7 +26,6 @@ KERNEL_DEVICETREE = " \
overlays/lirc-rpi.dtbo \
overlays/pitft22.dtbo \
overlays/pitft28-resistive.dtbo \
overlays/pitft35-resistive.dtbo \
overlays/pps-gpio.dtbo \
overlays/rpi-ft5406.dtbo \
overlays/w1-gpio.dtbo \
@ -37,4 +39,3 @@ SERIAL_CONSOLE ?= "115200 ttyS0"
VC4_CMA_SIZE ?= "cma-256"
UBOOT_MACHINE = "rpi_3_config"
MACHINE_FEATURES_append = " vc4graphics"

View File

@ -10,6 +10,6 @@ MACHINE_EXTRA_RRECOMMENDS += "linux-firmware-bcm43430"
SDIMG_KERNELIMAGE ?= "kernel7.img"
KERNEL_DEFCONFIG ?= "bcm2709_defconfig"
UBOOT_MACHINE = "rpi_3_32b_config"
UBOOT_MACHINE ?= "rpi_2_config"
SERIAL_CONSOLE ?= "115200 ttyS0"
VC4_CMA_SIZE ?= "cma-256"

View File

@ -1,225 +0,0 @@
# Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
.PHONY: help
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " applehelp to make an Apple Help Book"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " epub3 to make an epub3"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " texinfo to make Texinfo files"
@echo " info to make Texinfo files and run them through makeinfo"
@echo " gettext to make PO message catalogs"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " xml to make Docutils-native XML files"
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
@echo " coverage to run coverage check of the documentation (if enabled)"
@echo " dummy to check syntax errors of document sources"
.PHONY: clean
clean:
rm -rf $(BUILDDIR)/*
.PHONY: html
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
.PHONY: dirhtml
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
.PHONY: singlehtml
singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
.PHONY: pickle
pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."
.PHONY: json
json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."
.PHONY: htmlhelp
htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."
.PHONY: qthelp
qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/meta-raspberrypi.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/meta-raspberrypi.qhc"
.PHONY: applehelp
applehelp:
$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
@echo
@echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
@echo "N.B. You won't be able to view it unless you put it in" \
"~/Library/Documentation/Help or install it in your application" \
"bundle."
.PHONY: devhelp
devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/meta-raspberrypi"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/meta-raspberrypi"
@echo "# devhelp"
.PHONY: epub
epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
.PHONY: epub3
epub3:
$(SPHINXBUILD) -b epub3 $(ALLSPHINXOPTS) $(BUILDDIR)/epub3
@echo
@echo "Build finished. The epub3 file is in $(BUILDDIR)/epub3."
.PHONY: latex
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."
.PHONY: latexpdf
latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
.PHONY: latexpdfja
latexpdfja:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through platex and dvipdfmx..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
.PHONY: text
text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."
.PHONY: man
man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
.PHONY: texinfo
texinfo:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."
.PHONY: info
info:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
.PHONY: gettext
gettext:
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
.PHONY: changes
changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."
.PHONY: linkcheck
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
.PHONY: doctest
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."
.PHONY: coverage
coverage:
$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
@echo "Testing of coverage in the sources finished, look at the " \
"results in $(BUILDDIR)/coverage/python.txt."
.PHONY: xml
xml:
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
@echo
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
.PHONY: pseudoxml
pseudoxml:
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
@echo
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
.PHONY: dummy
dummy:
$(SPHINXBUILD) -b dummy $(ALLSPHINXOPTS) $(BUILDDIR)/dummy
@echo
@echo "Build finished. Dummy builder generates no files."

File diff suppressed because it is too large Load Diff

View File

@ -1,38 +0,0 @@
# Contributing
## Mailing list
The main communication tool we use is a mailing list:
* <yocto@yoctoproject.org>
* <https://lists.yoctoproject.org/listinfo/yocto>
Feel free to ask any kind of questions but always prepend your email subject
with "[meta-raspberrypi]". This is because we use the 'yocto' mailing list and
not a perticular 'meta-raspberrypi' mailing list.
## Patches and pull requests
All the contributions should be compliant with the openembedded patch
guidelines: <http://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines>
To contribute to this project you should send pull requests to the github mirror
(<https://github.com/agherzan/meta-raspberrypi>). **Additionally** you can send
the patches for review to the above specified mailing list.
When creating patches for the mailing list, please use something like:
git format-patch -s --subject-prefix='meta-raspberrypi][PATCH' origin
When sending patches to the mailing list, please use something like:
git send-email --to yocto@yoctoproject.org <generated patch>
## Github issues
In order to manage and trace the meta-raspberrypi issues, we use github issues:
<https://github.com/agherzan/meta-raspberrypi/issues>
If you push patches which have a github issue associated, please provide the
issue number in the commit log just before "Signed-off-by" line(s). Example line
for a bug:
`[Issue #13]`

View File

@ -1,9 +0,0 @@
# Extra apps
## omxplayer
omxplayer depends on libav which has a commercial license. So in order to be
able to compile omxplayer you will need to whiteflag the commercial
license in your local.conf:
LICENSE_FLAGS_WHITELIST = "commercial"

View File

@ -1,180 +0,0 @@
# Optional build configuration
There are a set of ways in which a user can influence different paramenters of
the build. We list here the ones that are closely related to this BSP or
specific to it. For the rest please check:
<http://www.yoctoproject.org/docs/latest/ref-manual/ref-manual.html>
## Compressed deployed files
1. Overwrite IMAGE_FSTYPES in local.conf
* `IMAGE_FSTYPES = "tar.bz2 ext3.xz"`
2. Overwrite SDIMG_ROOTFS_TYPE in local.conf
* `SDIMG_ROOTFS_TYPE = "ext3.xz"`
3. Overwrite SDIMG_COMPRESSION in local.conf
* `SDIMG_COMPRESSION = "xz"`
Accommodate the values above to your own needs (ex: ext3 / ext4).
## GPU memory
* `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.
* `GPU_MEM_1024`: GPU memory in megabyte for the 1024MB Raspberry Pi. Ignored by
the 256MB/512MB RP. Overrides gpu_mem. Max 944. Default not set.
## 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"
## 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:
DISABLE_OVERSCAN = "1"
## 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 turbo
mode:
ARM_FREQ = "1000"
CORE_FREQ = "500"
SDRAM_FREQ = "500"
OVER_VOLTAGE = "6"
## Video camera support with V4L2 drivers
Set this variable to enable support for the video camera (Linux 3.12.4+
required):
VIDEO_CAMERA = "1"
## Enable offline compositing support
Set this variable to enable support for dispmanx offline compositing:
DISPMANX_OFFLINE = "1"
This will enable the firmware to fall back to off-line compositing of Dispmanx
elements. Normally the compositing is done on-line, during scanout, but cannot
handle too many elements. With off-line enabled, an off-screen buffer is
allocated for compositing. When scene complexity (number and sizes
of elements) is high, compositing will happen off-line into the buffer.
Heavily recommended for Wayland/Weston.
See: <http://wayland.freedesktop.org/raspberrypi.html>
## Enable kgdb over console support
To add the kdbg over console (kgdboc) parameter to the kernel command line, set
this variable in local.conf:
ENABLE_KGDB = "1"
## Boot to U-Boot
To have u-boot load kernel image, set in your local.conf:
KERNEL_IMAGETYPE = "uImage"
This will make kernel.img be u-boot image which will load uImage. By default,
kernel.img is the actual kernel image (ex. Image).
## Image with Initramfs
To build an initramfs image:
* Set this 3 kernel variables (in linux-raspberrypi.inc for example)
- kernel_configure_variable BLK_DEV_INITRD y
- kernel_configure_variable INITRAMFS_SOURCE ""
- kernel_configure_variable RD_GZIP y
* Set the yocto variables (in linux-raspberrypi.inc for example)
- `INITRAMFS_IMAGE = "<a name for your initramfs image>"`
- `INITRAMFS_IMAGE_BUNDLE = "1"`
* Set the meta-rasberrypi variable (in raspberrypi.conf for example)
- `KERNEL_INITRAMFS = "-initramfs"`
## Enable SPI bus
When using device tree kernels, set this variable to enable the SPI bus:
ENABLE_SPI_BUS = "1"
## Enable I2C
When using device tree kernels, set this variable to enable I2C:
ENABLE_I2C = "1"
## Enable PiTFT support
Basic support for using PiTFT screens can be enabled by adding below in
local.conf:
* `MACHINE_FEATURES += "pitft"`
- This will enable SPI bus and i2c device-trees, it will also setup
framebuffer for console and x server on PiTFT.
NOTE: To get this working the overlay for the PiTFT model must be build, added
and specified as well (dtoverlay=<driver> in config.txt).
Below is a list of currently supported PiTFT models in meta-raspberrypi, the
modelname should be added as a MACHINE_FEATURES in local.conf like below:
MACHINE_FEATURES += "pitft <modelname>"
List of currently supported models:
* pitft22
* pitft28r
* pitft35r
## Misc. display
If you would like to use the Waveshare "C" 1024×600, 7 inch Capacitive Touch
Screen LCD, HDMI interface (<http://www.waveshare.com/7inch-HDMI-LCD-C.htm>) Rev
2.1, please set the following in your local.conf:
WAVESHARE_1024X600_C_2_1 = "1"
## Enable UART
RaspberryPi 0, 1, 2 and CM will have UART console enabled by default.
RaspberryPi 0 WiFi and 3 does not have the UART enabled by default because this
needs a fixed core frequency and enable_uart wil set it to the minimum. Certain
operations - 60fps h264 decode, high quality deinterlace - which aren't
performed on the ARM may be affected, and we wouldn't want to do that to users
who don't want to use the serial port. Users who want serial console support on
RaspberryPi3 will have to explicitely set in local.conf:
ENABLE_UART = "1"
Ref.:
* <https://github.com/raspberrypi/firmware/issues/553>
* <https://github.com/RPi-Distro/repo/issues/22>

View File

@ -1,26 +0,0 @@
.. meta-raspberrypi documentation master file, created by
sphinx-quickstart on Tue May 23 09:51:24 2017.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to meta-raspberrypi's documentation!
============================================
Contents:
.. toctree::
:maxdepth: 2
readme
layer-contents
extra-build-config
extra-apps
contributing
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

View File

@ -1,24 +0,0 @@
# Layer Contents
## Supported Machines
* raspberrypi
* raspberrypi0
* raspberrypi0-wifi
* raspberrypi2
* raspberrypi3
* raspberrypi3-64 (64 bit kernel & userspace)
* raspberrypi-cm (dummy alias for raspberrypi)
* raspberrypi-cm3 (dummy alias for raspberrypi2)
## Images
* rpi-hwup-image
* Hardware up image
* rpi-basic-image
* Based on rpi-hwup-image with some added features (ex: splash)
* rpi-test-image
* Image based on rpi-basic-image which includes most of the packages in this
layer and some media samples.

View File

@ -1 +0,0 @@
../README.md

View File

@ -18,7 +18,6 @@ PR = "r5"
PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}"
PITFT22="${@bb.utils.contains("MACHINE_FEATURES", "pitft22", "1", "0", d)}"
PITFT28r="${@bb.utils.contains("MACHINE_FEATURES", "pitft28r", "1", "0", d)}"
PITFT35r="${@bb.utils.contains("MACHINE_FEATURES", "pitft35r", "1", "0", d)}"
VC4GRAPHICS="${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "1", "0", d)}"
@ -100,11 +99,6 @@ do_deploy() {
echo "dtoverlay=pitft28-resistive,rotate=90,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
fi
if [ "${PITFT35r}" = "1" ]; then
echo "# Enable PITFT35r display" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
echo "dtoverlay=pitft35-resistive,rotate=90,speed=42000000,fps=20" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
fi
# UART support
if [ "${ENABLE_UART}" = "1" ]; then
echo "# Enable UART" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
@ -116,16 +110,6 @@ do_deploy() {
echo "# Enable VC4 Graphics" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
echo "dtoverlay=vc4-kms-v3d,${VC4_CMA_SIZE}" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
fi
# Waveshare "C" 1024x600 7" Rev2.1 IPS capacitive touch (http://www.waveshare.com/7inch-HDMI-LCD-C.htm)
if [ "${WAVESHARE_1024X600_C_2_1}" = "1" ]; then
echo "# Waveshare \"C\" 1024x600 7\" Rev2.1 IPS capacitive touch screen" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
echo "max_usb_current=1" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
echo "hdmi_group=2" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
echo "hdmi_mode=87" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
echo "hdmi_cvt 1024 600 60 6 0 0 0" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
echo "hdmi_drive=1" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
fi
}
do_deploy_append_raspberrypi3-64() {

View File

@ -1,9 +1,10 @@
RPIFW_DATE ?= "20171029"
RPIFW_DATE ?= "20170405"
RPIFW_SRC_URI ?= "https://github.com/raspberrypi/firmware/archive/1.${RPIFW_DATE}.tar.gz"
RPIFW_S ?= "${WORKDIR}/firmware-1.${RPIFW_DATE}"
SRC_URI = "${RPIFW_SRC_URI}"
SRC_URI[md5sum] = "4d27c1888a7bab3097471906e7b4a319"
SRC_URI[sha256sum] = "46ce28c8d87ef22bdcc57ac1836ca3f04d1ec6f46580ff5a30bf76b3c0822117"
SRC_URI[md5sum] = "ea82d14a7cd8cfae9b78e00d4e56bc71"
SRC_URI[sha256sum] = "2f4e5bddbac1372590db203002c35cbba3fb9d6172a93c314ee27bf05ae13bff"
PV = "${RPIFW_DATE}"

View File

@ -0,0 +1,56 @@
From 3e10fcde3f3c24a488866dd33fa3f5d46ff3d7a3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9dric=20Schieli?= <cschieli@gmail.com>
Date: Fri, 11 Nov 2016 11:59:06 +0100
Subject: [PATCH] arm: add save_boot_params for ARM1176
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Implement a hook to allow boards to save boot-time CPU state for later
use. When U-Boot is chain-loaded by another bootloader, CPU registers may
contain useful information such as system configuration information. This
feature mirrors the equivalent ARMv7 feature.
Signed-off-by: Cédric Schieli <cschieli@gmail.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
Upstream-status: Backport
---
arch/arm/cpu/arm1176/start.S | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/arch/arm/cpu/arm1176/start.S b/arch/arm/cpu/arm1176/start.S
index a602d4e..7c00201 100644
--- a/arch/arm/cpu/arm1176/start.S
+++ b/arch/arm/cpu/arm1176/start.S
@@ -16,6 +16,7 @@
#include <asm-offsets.h>
#include <config.h>
+#include <linux/linkage.h>
#ifndef CONFIG_SYS_PHY_UBOOT_BASE
#define CONFIG_SYS_PHY_UBOOT_BASE CONFIG_SYS_UBOOT_BASE
@@ -37,6 +38,11 @@
.globl reset
reset:
+ /* Allow the board to save important registers */
+ b save_boot_params
+.globl save_boot_params_ret
+save_boot_params_ret:
+
/*
* set the cpu to SVC32 mode
*/
@@ -110,3 +116,7 @@ mmu_disable_phys:
c_runtime_cpu_setup:
mov pc, lr
+
+WEAK(save_boot_params)
+ b save_boot_params_ret /* back to my caller */
+ENDPROC(save_boot_params)
--
2.1.4

View File

@ -0,0 +1,156 @@
From ade243a211d62327e9ebadce27bbbff7981e37f0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9dric=20Schieli?= <cschieli@gmail.com>
Date: Fri, 11 Nov 2016 11:59:07 +0100
Subject: [PATCH] rpi: passthrough of the firmware provided FDT blob
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Raspberry firmware used to pass a FDT blob at a fixed address (0x100),
but this is not true anymore. The address now depends on both the
memory size and the blob size [1].
If one wants to passthrough this FDT blob to the kernel, the most
reliable way is to save its address from the r2/x0 register in the
U-Boot entry point and expose it in a environment variable for
further processing.
This patch just does this:
- save the provided address in the global variable fw_dtb_pointer
- expose it in ${fdt_addr} if it points to a a valid FDT blob
There are many different ways to use it. One can, for example, use
the following script which will extract from the tree the command
line built by the firmware, then hand over the blob to a previously
loaded kernel:
fdt addr ${fdt_addr}
fdt get value bootargs /chosen bootargs
bootz ${kernel_addr_r} - ${fdt_addr}
Alternatively, users relying on sysboot/pxe can simply omit any FDT
statement in their extlinux.conf file, U-Boot will automagically pick
${fdt_addr} and pass it to the kernel.
[1] https://www.raspberrypi.org/forums//viewtopic.php?f=107&t=134018
Upstream-Status: Backport
Signed-off-by: Cédric Schieli <cschieli@gmail.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Jonathan Liu <net147@gmail.com>
---
board/raspberrypi/rpi/Makefile | 1 +
board/raspberrypi/rpi/lowlevel_init.S | 36 +++++++++++++++++++++++++++++++++++
board/raspberrypi/rpi/rpi.c | 29 ++++++++++++++++++++++++++++
3 files changed, 66 insertions(+)
create mode 100644 board/raspberrypi/rpi/lowlevel_init.S
diff --git a/board/raspberrypi/rpi/Makefile b/board/raspberrypi/rpi/Makefile
index 4ce2c98..dcb25ac 100644
--- a/board/raspberrypi/rpi/Makefile
+++ b/board/raspberrypi/rpi/Makefile
@@ -5,3 +5,4 @@
#
obj-y := rpi.o
+obj-y += lowlevel_init.o
diff --git a/board/raspberrypi/rpi/lowlevel_init.S b/board/raspberrypi/rpi/lowlevel_init.S
new file mode 100644
index 0000000..cdbd8e1
--- /dev/null
+++ b/board/raspberrypi/rpi/lowlevel_init.S
@@ -0,0 +1,36 @@
+/*
+ * (C) Copyright 2016
+ * Cédric Schieli <cschieli@gmail.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#include <config.h>
+
+.align 8
+.global fw_dtb_pointer
+fw_dtb_pointer:
+#ifdef CONFIG_ARM64
+ .dword 0x0
+#else
+ .word 0x0
+#endif
+
+/*
+ * Routine: save_boot_params (called after reset from start.S)
+ * Description: save ATAG/FDT address provided by the firmware at boot time
+ */
+
+.global save_boot_params
+save_boot_params:
+
+ /* The firmware provided ATAG/FDT address can be found in r2/x0 */
+#ifdef CONFIG_ARM64
+ adr x8, fw_dtb_pointer
+ str x0, [x8]
+#else
+ str r2, fw_dtb_pointer
+#endif
+
+ /* Returns */
+ b save_boot_params_ret
diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
index 6245b36..ffd6d31 100644
--- a/board/raspberrypi/rpi/rpi.c
+++ b/board/raspberrypi/rpi/rpi.c
@@ -25,6 +25,9 @@
DECLARE_GLOBAL_DATA_PTR;
+/* From lowlevel_init.S */
+extern unsigned long fw_dtb_pointer;
+
static const struct bcm2835_gpio_platdata gpio_platdata = {
.base = BCM2835_GPIO_BASE,
};
@@ -285,6 +288,31 @@ static void set_fdtfile(void)
setenv("fdtfile", fdtfile);
}
+/*
+ * If the firmware provided a valid FDT at boot time, let's expose it in
+ * ${fdt_addr} so it may be passed unmodified to the kernel.
+ */
+static void set_fdt_addr(void)
+{
+ if (getenv("fdt_addr"))
+ return;
+
+ if (fdt_magic(fw_dtb_pointer) != FDT_MAGIC)
+ return;
+
+ setenv_hex("fdt_addr", fw_dtb_pointer);
+}
+
+/*
+ * Prevent relocation from stomping on a firmware provided FDT blob.
+ */
+unsigned long board_get_usable_ram_top(unsigned long total_size)
+{
+ if ((gd->ram_top - fw_dtb_pointer) > SZ_64M)
+ return gd->ram_top;
+ return fw_dtb_pointer & ~0xffff;
+}
+
static void set_usbethaddr(void)
{
ALLOC_CACHE_ALIGN_BUFFER(struct msg_get_mac_address, msg, 1);
@@ -356,6 +384,7 @@ static void set_serial_number(void)
int misc_init_r(void)
{
+ set_fdt_addr();
set_fdtfile();
set_usbethaddr();
#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
--
2.10.2

View File

@ -0,0 +1,25 @@
From 1eb01436bc57ad32519a4567a1c9ec82d52d60a1 Mon Sep 17 00:00:00 2001
From: Paul Barker <paul@paulbarker.me.uk>
Date: Tue, 29 Nov 2016 19:47:49 +0000
Subject: [PATCH] Include lowlevel_init.o for rpi2
Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
Upstream-status: Inappropriate
(not needed upstream as rpi_2 board directory is removed in latest
version)
---
board/raspberrypi/rpi_2/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/board/raspberrypi/rpi_2/Makefile b/board/raspberrypi/rpi_2/Makefile
index d82cd21..9f865c5 100644
--- a/board/raspberrypi/rpi_2/Makefile
+++ b/board/raspberrypi/rpi_2/Makefile
@@ -5,3 +5,4 @@
#
obj-y := ../rpi/rpi.o
+obj-y += ../rpi/lowlevel_init.o
--
2.1.4

View File

@ -1 +1,7 @@
FILESEXTRAPATHS_prepend_rpi := "${THISDIR}/files:"
RDEPENDS_${PN}_append_rpi = " rpi-u-boot-scr"
SRC_URI_append_rpi = " \
file://0001-arm-add-save_boot_params-for-ARM1176.patch \
file://0002-rpi-passthrough-of-the-firmware-provided-FDT-blob.patch \
file://0003-Include-lowlevel_init.o-for-rpi2.patch \
"

View File

@ -1,4 +1,2 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SPLASH_IMAGES_append_rpi = " file://psplash-raspberrypi-img.h;outsuffix=raspberrypi"
ALTERNATIVE_PRIORITY_psplash-raspberrypi[psplash] = "10"
SPLASH_IMAGES += "file://psplash-raspberrypi-img.h;outsuffix=raspberrypi"

View File

@ -12,8 +12,8 @@ COMPATIBLE_MACHINE = "raspberrypi"
SRC_URI = "http://www.airspayce.com/mikem/bcm2835/bcm2835-${PV}.tar.gz"
SRC_URI[md5sum] = "b5dc426b4ff258bb1397442f98e40236"
SRC_URI[sha256sum] = "b9fd10f7a80aadaed28a77168709b7c519568a63b6e98d0a50e9c5fe31bea6bb"
SRC_URI[md5sum] = "258caf3437012d09a651e1852d0bd60c"
SRC_URI[sha256sum] = "52180b8a61b6546c1df4aed259d0a4d2fa56e50605e0d4d967a76bf2b23dafb8"
inherit autotools
@ -35,8 +35,6 @@ do_install_append() {
PACKAGES += "${PN}-tests"
RDEPENDS_${PN}-dev = ""
FILES_${PN} = ""
FILES_${PN}-tests = "${libdir}/${BPN}"
FILES_${PN}-dbg += "${libdir}/${BPN}/.debug"

View File

@ -1,28 +1,13 @@
From 1338f98a279616f4e5e9ea30a25d1dfa0c7df5d6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petter=20Mab=C3=A4cker?= <petter@technux.se>
Date: Sun, 4 Jun 2017 12:22:40 +0200
Subject: [PATCH] Remove dependencies on LSB functions
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
See this as a rebase of the previous 'Remove dependencies on LSB
functions patch' with only minor modifications from the original version,
based on the work done by Alex Lennon <ajlennon@dynamicdevices.co.uk> in
'25fd817 pi-blaster: Added recipe'.
Remove dependencies on LSB functions
Upstream-Status: Inappropriate [configuration]
Signed-off-by: Petter Mabäcker <petter@technux.se>
---
debian/pi-blaster.init | 38 +++++++-------------------------------
1 file changed, 7 insertions(+), 31 deletions(-)
Signed-off-by: Alex Lennon <ajlennon@dynamicdevices.co.uk>
diff --git a/debian/pi-blaster.init b/debian/pi-blaster.init
index b142d70..01a686c 100644
--- a/debian/pi-blaster.init
+++ b/debian/pi-blaster.init
@@ -28,12 +28,12 @@ SCRIPTNAME=/etc/init.d/$NAME
diff -ur git.org/pi-blaster.boot.sh git/pi-blaster.boot.sh
--- git.org/pi-blaster.boot.sh 2014-05-20 14:49:44.378582168 +0100
+++ git/pi-blaster.boot.sh 2014-05-20 14:51:08.330582386 +0100
@@ -28,12 +28,12 @@
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
# Load the VERBOSE setting and other rcS variables
@ -37,7 +22,7 @@ index b142d70..01a686c 100644
#
# Function that starts the daemon/service
@@ -77,48 +77,24 @@ do_stop()
@@ -77,48 +77,23 @@
case "$1" in
start)
@ -67,7 +52,6 @@ index b142d70..01a686c 100644
# 'force-reload' alias
#
- log_daemon_msg "Restarting $DESC" "$NAME"
+ echo "Restarting $DESC" "$NAME"
do_stop
- case "$?" in
- 0|1)
@ -83,14 +67,11 @@ index b142d70..01a686c 100644
- log_end_msg 1
- ;;
- esac
+ do_start
+ do_start
;;
*)
- echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
+ echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
+ echo "Usage: $SCRIPTNAME {start|stop|restart}" >&2
exit 3
;;
esac
--
1.9.1

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