134 Commits
morty ... pyro

Author SHA1 Message Date
6786c0709d docs, readme: Update branch references for pyro
Signed-off-by: Paul Barker <pbarker@toganlabs.com>
2017-12-04 17:53:58 +01:00
3fa61f096f firmware.inc: Update to 20171029
Signed-off-by: Andrei Gherzan <andrei@gherzan.com>
2017-12-04 17:53:58 +01:00
89a9e2d88d linux-raspberrypi: Update 4.9 recipe to 4.9.59
Signed-off-by: Andrei Gherzan <andrei@gherzan.com>
2017-12-04 17:53:58 +01:00
b7defa119a userland: Update to latest revision
Forward port patches as needed

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-12-04 17:53:58 +01:00
d4ce736c91 userland: RPROVIDES is missing libegl
userland package is the Raspberry Pi provider for the openGL stack.
If selected, it shall provide the gles2 and egl stacks in conjunction
with mesa-gl.

libegl was missing in the RPROVIDES variable, thus some run-time
dependencies were not met when using userland as provider.

Signed-off-by: Francesco Giancane <francescogiancane8@gmail.com>
2017-12-04 17:53:58 +01:00
b0acfb8dd3 userland: Update to current master HEAD
Signed-off-by: Andrei Gherzan <andrei@gherzan.com>
2017-12-04 17:53:58 +01:00
8bd0459044 userland: Add missing EGL_CAST defines
Needed by libepoxy

Signed-off-by: Andrea Galbusera <gizero@gmail.com>
2017-12-04 17:53:58 +01:00
40447de478 rpi-base.inc: Set dependencies for creating wic images
We need to ensure that the bootloader and firmware files are present in the
deploy directory before creating wic images.

Signed-off-by: Paul Barker <pbarker@toganlabs.com>
2017-10-20 15:53:35 +01:00
a6ebf95260 rpi-base.inc: Simplify setting of IMAGE_BOOT_FILES
Signed-off-by: Paul Barker <pbarker@toganlabs.com>
2017-10-20 15:53:35 +01:00
9bb89a75c0 rpi-base: wic: generate entries for u-boot
This commit allow wic generated images to work when we want u-boot to
load the kernel image.

Augment IMAGE_BOOT_FILES with the proper entries when KERNEL_IMAGETYPE
is "uImage". More specifically add u-boot image and boot.scr to deployed files
and give the proper name to the kernel image accordingly.

Signed-off-by: Andrea Galbusera <gizero@gmail.com>
2017-10-20 15:53:35 +01:00
015999bc02 linux-raspberrypi_4.9.bb: Upgrade to 4.9.50
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-10-20 15:53:35 +01:00
093286dae8 sdcard_image-rpi: fix absolute path in vfat symlink
Fix bitbake complaining with:

ERROR: core-image-minimal-1.0-r0 do_image_complete: sstate found an absolute
path symlink [...].vfat pointing at [...].vfat. Please replace this with a
relative link.

This patch redefines SDIMG_VFAT as a file name instead of a full absolute path,
then fixing the symlink creation by pointing to a relative target. The cp
command that deploys the artifact is changed accordingly to include the
destination path.

Signed-off-by: Andrea Galbusera <gizero@gmail.com>
2017-10-20 15:53:35 +01:00
ed3b254454 Merge pull request #134 from agherzan/pyro-wifi-fw-update
linux-firmware: Update brcmfmac43430 to 7.45.41.46
2017-10-04 10:00:41 +01:00
1220c461d8 linux-firmware: Update brcmfmac43430 to 7.45.41.46
The version of this firmware provided by linux-firmware is 7.45.41.26. This
version seems to have connectivity issues when bonding interfaces. Raspbian
included an updated version (7.45.41.46) which tested, proved to fix this
problem (see https://github.com/resin-os/meta-resin/issues/812).

The version Raspbian is providing is not yet in linux-firmware as they have it
directly from Cypress (see https://github.com/RPi-Distro/repo/issues/88).
Besides the issue described above, it fixes various other issues including a
broadpwn fix.

Hopefully this version, or a newer one, will end up in upstream soon. In order
to catch when that happens and stop overwriting this firmware, a check is added
in the racipe based on the md5sum of the current shipped firmware.

In terms of ditribution license, we got an informal one in the github thread
mentioned above.

Signed-off-by: Andrei Gherzan <andrei@gherzan.com>
2017-10-02 12:28:53 +01:00
c981f01a2c wiringpi: Fix linking problem
[github issue #105: wiringpi library is not linked correctly]

Incorrect order of compiler flags causing the libwiringpi.so library
to not have the required linking dependencies. The cross-compilation
patch needed to be reworked in order to fix this problem.

Fixes #105

Signed-off-by: Aurelian Zanoschi <aurelian17@gmail.com>
2017-09-12 13:48:38 +01:00
8291756c3f firmware: Update to tag '1.20170811'
Signed-off-by: Paul Barker <pbarker@toganlabs.com>
2017-09-06 18:44:27 +01:00
6521c4db7d linux-raspberrypi: Update to tag 'raspberrypi-kernel_1.20170811-1'
Signed-off-by: Paul Barker <pbarker@toganlabs.com>
2017-09-06 18:44:27 +01:00
6b38f3c6f9 rpio: Add RDEPENDS For python-logging & python-threading
[GitHub Ticket #98 - rpio requires the logging and threading Python
packages but does not RDEPENDS them in recipie]

The rpio tool needs the Python logging and threading pacakges installed
on the target system for it to work.  The pacakges are not included when
doing a rpi-basci-image.  This change updates the recipe so that all the
required dependencies of the prio script are identified by the recipie.

Fixes #98

Signed-off-by: Thomas A F Thorne <TafThorne@GoogleMail.com>
2017-09-06 18:44:27 +01:00
62ecc5a45b linux-rasbperrypi: Update to 4.9.35
Signed-off-by: Paul Barker <pbarker@toganlabs.com>
2017-09-06 18:44:27 +01:00
8ba2d6fc80 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-07-04 16:49:14 +01:00
ff59ad9d4b sdcard_image-rpi.bbclass: deploy vfat partition
This is useful to update the bootloader/vfat partition from u-boot when
you don't want to update everything:

U-Boot> tftpboot 0x1000000 tmp/0VXje
Waiting for Ethernet connection... done.
Using sms0 device
TFTP from server 192.168.0.1; our IP address is 192.168.0.26
Filename 'image.vfat'.
Load address: 0x1000000
Loading: ##################################################  40 MiB
	 2.1 MiB/s
done
Bytes transferred = 41943040 (2800000 hex)
U-Boot> mmc part

Partition Map for MMC device 0  --   Partition Type: DOS

Part	Start Sector	Num Sectors	UUID		Type
  1	8192      	81920     	a63a4fbc-01	0c Boot
  2	90112     	163840    	a63a4fbc-02	83
U-Boot> mmc erase 0x2000 0x14000

MMC erase: dev # 0, block # 8192, count 81920 ... 81920 blocks erased:
OK
U-Boot> mmc write 0x1000000 0x2000 0x14000

MMC write: dev # 0, block # 8192, count 81920 ... 81920 blocks written:
OK
U-Boot>

Signed-off-by: Matthew McClintock <msm-oss@mcclintock.net>
2017-07-04 16:49:14 +01:00
c750b0ac5d pi-blaster: update to include proper rpi3 support
Update to latest available revision, in order to include proper rpi3
support as well as latest fixes.

LIC_FILES_CHKSUM for the license text in README.md is changed to handle
fixes of whitespace and newlines in the license text, introduced by the
pi-blaster commit: '0e1a1df Cleaning up the README'.

Signed-off-by: Petter Mabäcker <petter@technux.se>
2017-07-04 16:49:14 +01:00
31a813c069 Merge pull request #81 from agherzan/master
[pyro] Update to follow master
2017-06-02 12:27:12 +01:00
081405feaa linux-raspberrypi-dev: Skip if not preferred provider
This should avoid network traffic to resolve ${AUTOREV} unless this
recipe is explicitly selected as the preferred provider of
virtual/kernel.

Signed-off-by: Paul Barker <pbarker@toganlabs.com>
2017-06-01 13:48:23 +01:00
e147e12d94 linux-raspberrypi-dev: Rename recipe
This recipe is now uniquely named instead of just being another version
of linux-raspberrypi.

Signed-off-by: Paul Barker <pbarker@toganlabs.com>
2017-06-01 13:48:23 +01:00
a71483f9d9 bcm2835: Remove dependency of bcm2835-dev on bcm2835
By default, the ${PN}-dev package of a recipe depends on the ${PN}
package.  However, since the bcm2835 package contains no file, it is not
generated.  As a result, when trying to include bcm2835-dev in an image
(or another package that depends on bcm2835-dev, such as
bcm2835-staticdev), we receive an error message saying that the bcm2835
package is not found.

A solution would be to define ALLOW_EMPTY for bcm2835, so that an empty
package is generated.  However, that would causes a useless package to
be installed on the target.  This patch uses another solution, which is
to empty the RDEPENDS variable of bcm2835-dev, so that it doesn't pull
in bcm2835.

Fixes #22

Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2017-05-27 03:24:35 +01:00
371f85ce53 docs: Format all links correctly
Signed-off-by: Paul Barker <pbarker@toganlabs.com>
2017-05-26 12:16:52 +01:00
5eb159d32d docs: small editorial fix
Signed-off-by: Mirza Krak <mirza.krak@endian.se>
2017-05-26 12:16:52 +01:00
caabd6a608 docs: drop "Device tree support" section
We no longer provide any Linux kernel which do not have device-tree
support and all machines setup KERNEL_DEVICETREE correctly.

Signed-off-by: Mirza Krak <mirza.krak@endian.se>
2017-05-26 12:16:52 +01:00
34113350f4 docs: fix alignment of "code blocks"
We provide a lot of variable examples as code blocks in the following
format:

	some text: `Variable`

or
	some test:
	`Variable`

Which is not as pretty as (when converted to html/pdf):

	some text:

		Variable

Converted all and hoppefully this will improve readability a bit.

Signed-off-by: Mirza Krak <mirza.krak@endian.se>
2017-05-26 12:16:52 +01:00
a30708d49c docs: Remove incompatible table format
Sadly sphinx doesn't support pipe tables in markdown at the minute.
Let's use a bullet-point list instead.

Signed-off-by: Paul Barker <pbarker@toganlabs.com>
2017-05-26 12:16:52 +01:00
bf02bfd2ed docs: Include readme in sphinx documentation
This allows us to avoid having to duplicate any information in the
readme into another documentation file.

Signed-off-by: Paul Barker <pbarker@toganlabs.com>
2017-05-26 12:16:52 +01:00
654d84d68a docs: Initial sphinx configuration
This allows us to create documentation by running 'make html' or 'make
latexpdf' in the docs directory. It depends on sphinx and the
recommonmark python module (for parsing markdown files in sphinx).
Creation of the PDF document requires a full LaTeX toolchain to be
installed.

Signed-off-by: Paul Barker <pbarker@toganlabs.com>
2017-05-26 12:16:52 +01:00
03976f7ff1 docs: Initial split of README into docs directory
The top-level README document has got pretty unwieldy and so we need to
switch to add some more structure to our documentation. The first step
is to split out sub-sections of the README document into separate files
in a new 'docs' directory.

Whilst splitting up the README, we can also take the opportunity to tidy
things up and fix a couple of typos.

Signed-off-by: Paul Barker <pbarker@toganlabs.com>
2017-05-26 12:16:52 +01:00
f6764c85e3 userland: Update to latest
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-05-26 11:18:55 +01:00
7f88c39eeb linux-raspberrypi: Minor recipe tidyup
Signed-off-by: Paul Barker <pbarker@toganlabs.com>
2017-05-26 11:18:55 +01:00
b32257c841 linux-rasbperrypi: Update to 4.9.27
Signed-off-by: Paul Barker <pbarker@toganlabs.com>
2017-05-26 11:18:55 +01:00
4f2dd0f0e8 userland: Update to latest
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-05-24 16:20:58 +01:00
45ece9cd0a linux-raspberrypi: Minor recipe tidyup
Signed-off-by: Paul Barker <pbarker@toganlabs.com>
2017-05-22 10:48:05 +02:00
e5f33333ca linux-rasbperrypi: Update to 4.9.27
Signed-off-by: Paul Barker <pbarker@toganlabs.com>
2017-05-22 10:48:05 +02:00
3d43e174d2 Merge pull request #71 from agherzan/pbarker/dev-4.11
linux-raspberrypi: Switch dev recipe to 4.11 branch
2017-05-17 18:49:11 +01:00
c4e6ff4f9f Merge pull request #59 from LocutusOfBorg/patch-2
Make CMDLINE overridable from outside
2017-05-17 18:48:50 +01:00
39e1d49097 Merge pull request #70 from agherzan/pbarker/drop-4.4
linux-rasberrypi: Drop 4.4 series kernel
2017-05-17 18:48:36 +01:00
adf62cd9e8 Merge pull request #68 from resin-os/ignore-logs
.gitignore: Ignore log files
2017-05-16 12:26:41 +01:00
e28e6e6422 raspberrypi0.conf: make SERIAL_CONSOLE overridable from outside
currently there is no way to override the default SERIAL_CONSOLE,
 this variable needs to be set only if the developer didn't set it already from
 another layer.

Signed-off-by: Gianfranco Costamagna <gianfranco.costamagna@abinsula.com>
2017-05-16 12:54:04 +02:00
4a2e37f96e linux-raspberrypi: Make CMDLINE overridable from outside
currently there is no way to override the default CMDLINE,
 this variable needs to be set only if the developer didn't set it already from
 another layer.

Signed-off-by: Gianfranco Costamagna <gianfranco.costamagna@abinsula.com>
2017-05-16 12:53:47 +02:00
6d5d83f1d6 Merge pull request #67 from agherzan/misc-fixes
Various tweaks and fixes
2017-05-15 13:12:28 +01:00
a438f1d514 Merge pull request #69 from agherzan/github
GitHub templates
2017-05-15 12:25:24 +01:00
a001d9f316 linux-raspberrypi: Switch dev recipe to 4.11 branch
Signed-off-by: Paul Barker <pbarker@toganlabs.com>
2017-05-15 10:29:14 +01:00
9eaff5ce1a linux-rasberrypi: Drop 4.4 series kernel
The rpi-4.4.y branch has been unmaintained for a couple of months now.
Let's drop it before branching for pyro.

Signed-off-by: Paul Barker <pbarker@toganlabs.com>
2017-05-15 10:19:17 +01:00
135a7ae55f PULL_REQUEST_TEMPLATE.md: Add pull request template
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2017-05-12 20:41:05 +01:00
63aa85268c ISSUE_TEMPLATE.md: Add issue template
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2017-05-12 20:40:48 +01:00
d0abd927f5 .gitignore: Ignore log files
Signed-off-by: Andrei Gherzan <andrei@resin.io>
2017-05-12 18:46:49 +01:00
abeddc3b0d README.md: Add info about github pull requests
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2017-05-12 18:38:54 +01:00
d8da77b57e README: Migrate to markdown version
Add badges too.

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2017-05-12 18:16:57 +01:00
3cf2582cc9 README: Document missing dependencies
We depend on other layers from meta-oe.

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2017-05-12 18:16:40 +01:00
d9e94b87a7 mesa-gl: Enable gbm for rpi
weston needs gbm support which is not
in userland

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-05-11 18:18:08 +01:00
2aa6b1a637 userland: Add missing GLES2 defines
Needed by weston

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-05-11 18:18:05 +01:00
8527a396d3 rpi-base: fix make_dtb_boot_files() for raspberrypi3-64
Building the stock wic image for raspberrypi3-64 failed to find dtbs listed in
IMAGE_BOOT_FILES. This patch updates the make_dtb_boot_files() function to
account for dtbs listed in KERNEL_DEVICETREE that do include a path prefix:
this is the case for things like broadcom/bcm2710-rpi-3-b.dtb (the dts dir
layout in the kernel sources is different for arm64). Use the same approach
already used for overlays/ dir. While at it also fix a typo in dtb overlay
code path comments.

Signed-off-by: Andrea Galbusera <gizero@gmail.com>
2017-04-21 18:01:08 +01:00
decdacf30c 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-21 17:02:28 +01:00
0d28786dac raspberrypi3-64.conf: Make SERIAL_CONSOLE overwritable
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2017-04-21 17:00:02 +01:00
b05e5e32a4 raspberrypi2.conf: Make SERIAL_CONSOLE overwritable
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2017-04-21 17:00:02 +01:00
e8682225ef raspberrypi.conf: Have the ability to overwrite SERIAL_CONSOLE
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2017-04-20 12:22:49 +01:00
7d064961c2 linux-raspberrypi_4.9.bb: Update to 4.9.23
bring CMA > 256M changes

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-04-20 11:58:56 +01:00
962ba44ec8 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 18:43:48 +01:00
668446e283 udev: Create rules file to generate serial0/1
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2017-04-19 17:47:39 +01:00
8a450f0a8a README: document 64 bit r-pi3 variant for MACHINE
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2017-04-17 02:33:31 +01:00
af79504e44 pitft: Add documentation for pitft35r in README
The support for the PiTFT 3.5 inch resistive touchscreen is optional.
It may be enabled by adding the following line in local.conf:

    MACHINE_FEATURES += "pitft pitft35r"

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
2017-04-17 02:22:35 +01:00
0ef0667550 pitft: Include a pitft35r MACHINE_FEATURE
This MACHINE_FEATURE will automatically add the recommended
Adafruit configuration line to the Raspberry Pi config.txt.

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
2017-04-17 02:22:34 +01:00
e11d38f8dc pitft: Include the pitft35r dtbo files
Include the pitft35r device tree blobs in the filesystem of the image.

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
2017-04-17 02:22:33 +01:00
d70e311c43 psplash: Let distro override the default splash image if it provides
BSPs should not be overriding the distro splash images, here we
reduce the priority of psplash-raspberrypi below 100 so the defaults
from distros can kick in.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-04-17 02:20:30 +01:00
7e941bb1ed eglinfo-fb: Mark is userland specific
It does not yet compile/work with vc4 open graphics driver

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-04-17 02:20:21 +01:00
1a42bce360 userland: Upgrade to latest
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-04-17 02:20:15 +01:00
fe909cd5b9 x264: Fix build for armv6 RaspberryPi boards
quant-a.S uses rbit thumb instruction unconditionally even though only
from ARMV6T2 this is available (which is not the case for RPI1, RPI0
etc). Avoid this by disabling asm.

Signed-off-by: Andrei Gherzan <andrei@resin.io>
2017-04-17 02:13:48 +01:00
1b05ca6bb4 omxplayer: Bump to head and fix missing native dependency
Signed-off-by: Andrei Gherzan <andrei@resin.io>
2017-04-17 02:13:42 +01:00
78612dfcc5 README: Add info about raspberrypi0-wifi
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2017-04-14 21:12:40 +01:00
723f04622f raspberrypi0-wifi.conf: Add machine configuration file
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2017-04-14 21:12:17 +01:00
66e0e37ce3 rpi-base.inc: Include dtb for RPI0 WiFi
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2017-04-14 21:11:49 +01:00
aa454eea68 linux-raspberrypi_4.9: Bump to 4.9.21
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2017-04-14 21:11:13 +01:00
e3620fc038 firmware.inc: Bump to 20170405
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2017-04-14 21:10:53 +01:00
58b2015564 bcm2835: Update to v1.52
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2017-04-14 21:10:26 +01:00
2adfc6818e rpi-gpio: Update to v0.6.2
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2017-04-14 21:10:04 +01:00
4b0bc450e0 wiringpi: uprev to 2.44
This upgrade is required to solve the following runtime hardware detection
issue when calling wiringPiSetup() on the Pi3:

  Unable to determine hardware version. I see: Hardware   : BCM2835
  ,
  - expecting BCM2708 or BCM2709.

This was triggered by the recent kernel upgrade to 4.9 that introduced
"BCM2835" as the hardware signature in /proc/cpuinfo.

Patches reworked as follow:
* 0001-Add-initial-cross-compile-support.patch: rebase to current upstream
* 0001-include-asm-ioctl.h-directly-for-_IOC_SIZEBITS.patch: drop since is now
upstream

Signed-off-by: Andrea Galbusera <gizero@gmail.com>
2017-04-05 16:37:13 +01:00
d0c152d7f8 rpi-config: fix invalid shell variable name
Commit da32aac introduced an invalid shell variable name in do_deploy():
according to bash manpage variable names cannot contain dots. Replace
dot with underscore to fix it.

Signed-off-by: Andrea Galbusera <gizero@gmail.com>
2017-04-05 16:35:21 +01:00
da32aac453 rpi-config: waveshare screen support
Add support for the Waveshare 1024x600 "C" Rev2.1 7" IPS Capacitive Touch
Screen LCD with HDMI interface:

	http://www.waveshare.com/7inch-HDMI-LCD-C.htm
	http://www.waveshare.com/wiki/7inch_HDMI_LCD_(C)

This product works "out of the box" with the Raspberry Pi. Simply connect
the provided HDMI and USB cables between the two devices. The touch<=>mouse
integration works automatically.

Tested with a Raspberry Pi 3, with a 32-bit raspberrypi3 build.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2017-04-03 14:38:35 +01:00
0948d17ded omxplayer: Add dependency on coreutils-native
Internal ffmpeg configure uses pr which is provided by coreutils-native:
| ./configure: line 471: pr: command not found

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2017-03-21 16:15:29 +00:00
6c8ca9ccf1 sdcard_image: fix sdcard image generation
Rely on  shell environment when copying devicetree
and devicetree overlays to target image.

Signed-off-by: Janek Filus <janek.filus@bytesatwork.ch>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-03-11 17:38:06 -08:00
e070005aa8 userland: Do not provide libgl
libgl is actually provided by mesa-gl and this
casued unneeded conflict between these two
packages resulting in sato image reporting missing
libGL.so.1

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-03-11 13:34:46 -08:00
a84ba9b73c linux-raspberrypi_dev: Add back arm64 dtbo rules patch
This patch hasn't yet been applied to the 4.10.y branch of
linux-raspberrypi.

Signed-off-by: Paul Barker <pbarker@toganlabs.com>
2017-03-11 09:43:17 -08:00
65b9376450 linux-raspberrypi_4.4: Update to 4.4.50
Signed-off-by: Paul Barker <pbarker@toganlabs.com>
2017-03-11 09:33:17 -08:00
7a9c3e48b2 linux-raspberrypi_dev: Disable version sanity check
Signed-off-by: Paul Barker <pbarker@toganlabs.com>
2017-03-11 09:33:17 -08:00
65723a9455 linux-raspberrypi_dev: Allow branch override
This makes the linux-raspberrypi_dev recipe more flexible by allowing
the kernel branch to be overridden in local.conf.

Signed-off-by: Paul Barker <pbarker@toganlabs.com>
2017-03-11 09:33:17 -08:00
bfae6d8952 linux-raspberrypi_dev: Use AUTOREV
The development branches of linux-raspberrypi are rebased frequently. To
avoid fetch failures caused by out-of-date git hashes we need to use
AUTOREV.

LINUX_VERSION may need to be overridden in local.conf to match the
upstream version.

Signed-off-by: Paul Barker <pbarker@toganlabs.com>
2017-03-11 09:33:17 -08:00
6561befc96 linux-raspberrypi: Fix uImage build on 4.9.y and later
Signed-off-by: Paul Barker <pbarker@toganlabs.com>
2017-03-11 09:33:17 -08:00
52bec45b67 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-03-11 04:39:15 -08:00
c01466aabb rpi-base: wic: generate entries for device tree files
Augment IMAGE_BOOT_FILES with entries picking up proper dtb[o]s. This allows for
building usable wic images once again.

Signed-off-by: Maciej Borzecki <maciej.borzecki@rndity.com>
2017-03-11 04:39:15 -08:00
6bafea4f37 wic: move sdimage-raspberrypi to toplevel wic location
Wic supports picking up image files from toplevel LAYERDIR/wic directory. Using
this location has the benefit that image files are easier to find (compare that
to previously used scripts/lib/image/canned-wks/ location).

Signed-off-by: Maciej Borzecki <maciej.borzecki@rndity.com>
2017-03-11 04:39:14 -08:00
ff914ff622 gstreamer1.0-omx: remove bbappend for version 1.2.0 and git
OE-Core rev: aa06a18d59eb391d1a7ace9daa0681bdf8daf17f
removed gstreamer1.0-omx_1.2.0 recipe.

OE-Core removed all gst git recipes as well

Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-03-11 04:39:13 -08:00
a23003794f userland: Update to latest
Forward port the patches

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-03-11 04:39:13 -08:00
8873478623 linux-raspberrypi: Default to 4.9 kernel
4.9 is now declared stable for raspberrypi

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-03-11 04:39:12 -08:00
59d111195d linux-raspberrypi_4.9.bb: Update to 4.9.13
drop upstreamed patch

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-03-11 04:38:58 -08:00
12f8a354bf firmware: Update to 20170303 release
Uses 4.9.13 and has rpi0w support

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-03-11 04:38:55 -08:00
6ce6e57782 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-02-16 18:02:46 -08:00
9aded8f9d4 omxplayer: Update to latest and disable on rpi64
Its uses omaxplayer/mmal APIs from firmware which seems
to not work with 4.9 kernel

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-02-16 16:45:58 -08:00
c768a3d1ae linux-raspberrypi_dev: Fix build on rpi3 64bit
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-02-16 20:53:18 +01:00
9d418db5ed raspberrypi3-64.conf: Add vc4graphics to MACHINE_FEATURES
Userland wont work in 64bit mode

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-02-16 20:53:15 +01:00
f81e9ac1bb rpi-default-versions.inc: Use fallback weak assignment
This lets machines use ?= to choose their preferred kernel
e.g. 64bit rpi3 needs 4.9 minimum but default right now
is 4.4

At the same time it keeps the option for user to override
any of these settings via config metadata e.g. local.conf

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-02-16 20:53:14 +01:00
11d376d2fe 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-02-16 20:53:12 +01:00
50f769f82c 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-02-16 20:53:10 +01:00
9eee2833c3 raspberrypi3-64.conf: Specifiy rpi3-64bit dtbs
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-02-16 20:53:08 +01:00
8990caf8b7 linux-raspberrypi: Add defconfig for raspberrypi3-64
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-02-16 20:53:07 +01:00
c9cf319f47 firmware: Update to 20161215 release
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-02-16 20:53:05 +01:00
d01bf8751b userland: Upgrade to latest and implement triple buffering for wayland
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-02-16 20:53:04 +01:00
39bd54a3f6 linux-raspberrypi_4.9.bb: Upgrade to 4.9.10
Fix dtbo builds for arm64

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-02-16 20:53:02 +01:00
d9c6b7903e linux-raspberrypi_dev.bb: Add recipe for tracking development tip
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-02-16 20:53:01 +01:00
0be123e5b8 raspberrypi3-64.conf: Use 4.9 as default kernel
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-02-16 20:53:00 +01:00
9ed927caae rpi-default-providers: Let mesa provide libgbm
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-02-16 20:52:58 +01:00
36a3895d4e Add raspberrypi3-64.conf
Signed-off-by: Herve Jourdain <herve.jourdain@neuf.fr>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-02-16 20:52:57 +01:00
67e0216492 u-boot: Fix boot on rpi3
U-boot configured with 'rpi_2_config' does not boot on a RaspberryPi 3.
Instead we need to configure with 'rpi_3_32b_config'.

Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2017-02-16 01:11:36 +01:00
acbbe4b252 linux-raspberrypi_4.4: Update to 4.4.48
Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2017-02-16 01:11:30 +01:00
68634deeed u-boot: drop backported patches
U-boot has been updated to 2017.01 in poky/oe-core which contains these
patches.

Signed-off-by: Mirza Krak <mirza.krak@gmail.com>
2017-01-25 16:37:11 +01:00
ae2be3aff9 README: Mention CM1 and CM3 support
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2017-01-20 20:15:12 +01:00
8f1511d72d rpi-base.inc: Include dtb file for CM1 and CM3
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2017-01-20 20:15:12 +01:00
9d4b68dc77 raspberrypi*.conf: Minor tweaks
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2017-01-20 20:15:12 +01:00
f43dd79dcc raspberrypi-cm3.conf: Add dummy machine for CM3 (alias for RPi2)
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2017-01-20 20:15:12 +01:00
3ea6f9f455 raspberrypi-cm.conf: Add dummy machine for CM1 (alias for RPi1)
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2017-01-20 20:15:12 +01:00
ec28a0d5b3 linux-raspberrypi_4.9: Update to 4.9.4
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2017-01-18 18:33:20 +01:00
9288778503 linux-raspberrypi_4.4: Update to 4.4.43
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2017-01-18 18:32:59 +01:00
7f99a4cb6d gstreamer1.0-omx: Add 1.10x support
Restructure the bbappends such that common portions
can be put in a common bbappend and version specific
bbappend then only do the patching

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-01-18 17:45:56 +01:00
ac715f78f8 linux-raspberrypi: Drop v4.8
Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2017-01-18 17:08:00 +01:00
6dcdb7fba3 linux-raspberrypi: Drop v4.7
Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2017-01-18 17:08:00 +01:00
8716d7027c linux-raspberrypi: Upgrade to v4.4.39
Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2017-01-18 16:43:02 +01:00
642d5c25b2 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-18 16:43:00 +01:00
3ad29d11e7 Remove True option to getVar calls
getVar() now defaults to expanding by default.

Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2017-01-18 16:42:59 +01:00
84 changed files with 1512 additions and 1191 deletions

27
.github/ISSUE_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,27 @@
<!--
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.):**

16
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,16 @@
<!--
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,3 +3,5 @@ build*
.*.swp
*.orig
*.rej
*.log
docs/_build

352
README

File diff suppressed because it is too large Load Diff

55
README.md Normal file
View File

@ -0,0 +1,55 @@
# 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", True)
dts = d.getVar("KERNEL_DEVICETREE", True)
staging_dir = d.getVar("STAGING_KERNEL_BUILDDIR")
dts = d.getVar("KERNEL_DEVICETREE")
# d.getVar() might return 'None' as a normal string
# leading to 'is None' check isn't enough.

View File

@ -72,6 +72,10 @@ 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
@ -107,7 +111,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
@ -115,7 +119,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}"`
@ -145,6 +149,16 @@ 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,6 +32,7 @@ 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 \
@ -42,7 +43,7 @@ KERNEL_DEVICETREE ?= " \
"
KERNEL_IMAGETYPE ?= "Image"
MACHINE_FEATURES += "apm usbhost keyboard vfat ext2 screen touchscreen alsa bluetooth wifi sdio ${@bb.utils.contains('DISABLE_VC4GRAPHICS', '1', '', 'vc4graphics', d)}"
MACHINE_FEATURES += "apm usbhost keyboard vfat ext2 screen touchscreen alsa bluetooth wifi sdio"
# Raspberry Pi has no hardware clock
MACHINE_FEATURES_BACKFILL_CONSIDERED = "rtc"
@ -52,7 +53,44 @@ MACHINE_EXTRA_RRECOMMENDS += " kernel-modules"
# Set Raspberrypi splash image
SPLASH = "psplash-raspberrypi"
IMAGE_BOOT_FILES ?= "bcm2835-bootfiles/* ${KERNEL_IMAGETYPE};${SDIMG_KERNELIMAGE}"
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)} \
"
# The kernel image is installed into the FAT32 boot partition and does not need
# to also be installed into the rootfs.

View File

@ -6,4 +6,5 @@ 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.4.%"
PREFERRED_VERSION_linux-raspberrypi ??= "4.9.%"

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,9 +6,6 @@ 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
@ -26,6 +23,7 @@ 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 \
@ -39,3 +37,4 @@ 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_2_config"
UBOOT_MACHINE = "rpi_3_32b_config"
SERIAL_CONSOLE ?= "115200 ttyS0"
VC4_CMA_SIZE ?= "cma-256"

225
docs/Makefile Normal file
View File

@ -0,0 +1,225 @@
# 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."

343
docs/conf.py Normal file

File diff suppressed because it is too large Load Diff

38
docs/contributing.md Normal file
View File

@ -0,0 +1,38 @@
# 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]`

9
docs/extra-apps.md Normal file
View File

@ -0,0 +1,9 @@
# 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"

180
docs/extra-build-config.md Normal file
View File

@ -0,0 +1,180 @@
# 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>

26
docs/index.rst Normal file
View File

@ -0,0 +1,26 @@
.. 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`

24
docs/layer-contents.md Normal file
View File

@ -0,0 +1,24 @@
# 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.

1
docs/readme.md Symbolic link
View File

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

View File

@ -18,6 +18,7 @@ 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)}"
@ -99,6 +100,11 @@ 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
@ -110,6 +116,16 @@ 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,10 +1,9 @@
RPIFW_DATE ?= "20170405"
RPIFW_DATE ?= "20171029"
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] = "ea82d14a7cd8cfae9b78e00d4e56bc71"
SRC_URI[sha256sum] = "2f4e5bddbac1372590db203002c35cbba3fb9d6172a93c314ee27bf05ae13bff"
SRC_URI[md5sum] = "4d27c1888a7bab3097471906e7b4a319"
SRC_URI[sha256sum] = "46ce28c8d87ef22bdcc57ac1836ca3f04d1ec6f46580ff5a30bf76b3c0822117"
PV = "${RPIFW_DATE}"

View File

@ -1,56 +0,0 @@
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

@ -1,156 +0,0 @@
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

@ -1,25 +0,0 @@
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,7 +1 @@
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,2 +1,4 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SPLASH_IMAGES += "file://psplash-raspberrypi-img.h;outsuffix=raspberrypi"
SPLASH_IMAGES_append_rpi = " file://psplash-raspberrypi-img.h;outsuffix=raspberrypi"
ALTERNATIVE_PRIORITY_psplash-raspberrypi[psplash] = "10"

View File

@ -12,8 +12,8 @@ COMPATIBLE_MACHINE = "raspberrypi"
SRC_URI = "http://www.airspayce.com/mikem/bcm2835/bcm2835-${PV}.tar.gz"
SRC_URI[md5sum] = "258caf3437012d09a651e1852d0bd60c"
SRC_URI[sha256sum] = "52180b8a61b6546c1df4aed259d0a4d2fa56e50605e0d4d967a76bf2b23dafb8"
SRC_URI[md5sum] = "b5dc426b4ff258bb1397442f98e40236"
SRC_URI[sha256sum] = "b9fd10f7a80aadaed28a77168709b7c519568a63b6e98d0a50e9c5fe31bea6bb"
inherit autotools
@ -35,6 +35,8 @@ 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,13 +1,28 @@
Remove dependencies on LSB functions
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'.
Upstream-Status: Inappropriate [configuration]
Signed-off-by: Alex Lennon <ajlennon@dynamicdevices.co.uk>
Signed-off-by: Petter Mabäcker <petter@technux.se>
---
debian/pi-blaster.init | 38 +++++++-------------------------------
1 file changed, 7 insertions(+), 31 deletions(-)
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 @@
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
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
# Load the VERBOSE setting and other rcS variables
@ -22,7 +37,7 @@ diff -ur git.org/pi-blaster.boot.sh git/pi-blaster.boot.sh
#
# Function that starts the daemon/service
@@ -77,48 +77,23 @@
@@ -77,48 +77,24 @@ do_stop()
case "$1" in
start)
@ -52,6 +67,7 @@ diff -ur git.org/pi-blaster.boot.sh git/pi-blaster.boot.sh
# 'force-reload' alias
#
- log_daemon_msg "Restarting $DESC" "$NAME"
+ echo "Restarting $DESC" "$NAME"
do_stop
- case "$?" in
- 0|1)
@ -67,11 +83,14 @@ diff -ur git.org/pi-blaster.boot.sh git/pi-blaster.boot.sh
- 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}" >&2
+ echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
exit 3
;;
esac
--
1.9.1

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