Commit Graph

35 Commits

Author SHA1 Message Date
Leon Anavi
cd558f77b6 u-boot_%.bbappend: Increase CONFIG_SYS_BOOTM_LEN
Some checks failed
Mirrors / Yocto Git Mirror (push) Has been cancelled
Increase CONFIG_SYS_BOOTM_LEN for machine raspberrypi4 (32-bit)
because the kernel size has increased. This fixes the following
issue when booting an image with U-Boot:

   Image Name:   Linux-6.6.63-v7l
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    8559752 Bytes = 8.2 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Booting using the fdt blob at 0x2eff2000
Working FDT set to 2eff2000
   Loading Kernel Image to 8000
Image too large: increase CONFIG_SYS_BOOTM_LEN
Must RESET board to recover

Fixes: https://github.com/agherzan/meta-raspberrypi/issues/1306

Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
2025-03-12 02:12:30 -07:00
Khem Raj
ee5ae72808 recipes: Switch to using UNPACKDIR instead of WORKDIR
UNPACKDIR is new contruct for do_unpack things in latest master
we should be using that instead of WORKDIR for referencing those
files

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-05-28 23:52:53 +01:00
Tim Orling
6d593646ba u-boot: re-enable rapsberrypi5
With meta-lts-mixins scarthgap/u-boot we can now support raspberrypi5

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
2024-05-28 23:06:18 +01:00
Leon Anavi
4814f09e49 u-boot_%.bbappend: Skip for Raspberry Pi 5
Temporary avoid Raspberry Pi 5 machines because U-Boot has not been
ported to it yet.

This work was sponsored by GOVCERT.LU.

Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
2024-01-25 17:25:39 +00:00
Martin Jansa
195c7d59bc *.patch: add Upstream-Status to all patches
There is new patch-status QA check in oe-core:
https://git.openembedded.org/openembedded-core/commit/?id=76a685bfcf927593eac67157762a53259089ea8a

This is temporary work around just to hide _many_ warnings from
optional patch-status (if you add it to WARN_QA).

This just added
Upstream-Status: Pending
everywhere without actually investigating what's the proper status.

This is just to hide current QA warnings and to catch new .patch files being
added without Upstream-Status, but the number of Pending patches is now terrible:
Patches in Pending state: 41 (57%)

With recent change to enable patch-status not only for all .patch
files in oe-core, but for all recipes from oe-core:
https://git.openembedded.org/openembedded-core/commit/?id=61a881fdbe8b5a21c6276b8a5d06cc30486b1eb3
this causes bluez5 do_patch failures as reported in:
https://lists.openembedded.org/g/openembedded-core/message/183177

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2023-06-22 00:04:40 +01:00
Meng Li
c3275986b6 u-boot: Remove the randundant patch
This patch had been merged into u-boot upstream. Its commit is
29f7d05a347a("dm: core: Move ofdata_to_platdata() call earlier").
So, remove the randundant patch to avoid building error.

Signed-off-by: Meng Li <Meng.Li@windriver.com>
2022-04-21 21:41:38 +01:00
Matthias Klein
c06ae5eacf u-boot: always set fdt_addr with firmware-provided FDT address
The Raspberry firmware prepares the FDT blob in memory at an address that
depends on both the memory size and the blob size.
For details see description in the patch itself.

The patch is not yet upstream, but has already been submitted by the original
author: https://lore.kernel.org/all/20210512123945.25649-1-m.salvini@koansoftware.com/

For me, the described problem occurs in conjunction with RAUC, which uses the
following U-Boot script: https://github.com/rauc/meta-rauc-community/blob/master/meta-rauc-raspberrypi/recipes-bsp/rpi-u-boot-scr/files/boot.cmd.in

As soon as I add an overlay the fdt_addr changes and the system does not boot
anymore.

Signed-off-by: Matthias Klein <matthias@extraklein.de>
2022-03-27 22:59:24 +01:00
Martin Jansa
9ea7aa2cd2 Convert to new override syntax
This is the result of automated script conversion:

oe-core/scripts/contrib/convert-overrides.py .

converting the metadata to use ":" as the override character instead of "_".

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2021-08-04 12:30:12 +03:00
Marek Belisko
a8085558b5 u-boot: Fix booting raspberrypi CM3 module
With stock u-boot v2020.01 which we use from poky CM3 module won't boot.
We need to apply this patch in order to have platform again working.

Add it only for cm3 to not break anything else.

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2020-10-21 17:39:43 +01:00
Fabio Berton
fc72c06141 u-boot: Move fw_env.config to u-boot append
The u-boot-env is provided by u-boot recipe and not by libubootenv, so
right recipe to append is the u-boot.

Adding the rpi-u-boot-scr in DEPENDS variable is wrong because it is
forcing rpi-u-boot-scr to be a dependency, but it'll fail if I have
another recipe that provides bootscript, once both recipes provide the
same file. The default value of u-boot-default-script is rpi-u-boot-scr,
so right way is to use u-boot-default-script and change the
PREFERRED_PROVIDER_u-boot-default-script if needed.

Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
2020-07-27 15:34:17 +01:00
Leon Anavi
27d0016b6b libubootenv_%.bbappend: Add fw_env.config
Add fw_env.config that uses at run-time /boot/uboot.env generated
through the boot scripts (specifically boot.cmd.in) from recipe
rpi-u-boot-scr. This configuration file is required to
successfully run fw_printenv from the user space.

Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
2020-07-03 20:49:32 +01:00
Fabio Berton
44d7dd0e4a rpi-u-boot-scr: Set u-boot-default-script as provider
Add u-boot-default-script to the PROVIDES variable to make easier to
replace boot script in another layer just by changing
PREFERRED_PROVIDER_u-boot-default-script variable. Set rpi-u-boot-scr as
the default provider for meta-raspberrypi.

Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
2020-04-03 17:32:19 +01:00
Patrick Vacek
4776ecc532 u-boot: drop patches for RPi4 merged upstream.
Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
2019-10-23 11:35:53 +01:00
Martin Jansa
81f79f15c3 u-boot-fw-utils: apply the same rpi4 patches as for u-boot recipe
* otherwise u-boot-fw-utils build for rpi4 fails with:
  scripts/kconfig/conf  --defconfig=arch/../configs/rpi_4_defconfig
  Kconfig
  ***
  *** Can't find default configuration "arch/../configs/rpi_4_defconfig"!
  ***
  scripts/kconfig/Makefile:128: recipe for target 'rpi_4_defconfig' failed

* cannot include/require u-boot_2019.07.bbappend directly in
  u-boot-fw-utils_2019.07.bbappend, because then it fails with:
  "u-boot_2019.01.bbappend: not a BitBake file"

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2019-09-09 12:39:19 +03:00
Andrei Gherzan
9381de8f91 u-boot: Update patches for RPi4
After a review in upstream, some of the patches were modified. Most
notable changes:
1. use directly the dtb passed by the firmware and make sure uboot
doesn't tweak memory/reg
2. remove known unimplemented support (usb, eth etc.)
3. drop patches that are not needed anymore with the new firmware update
(for example 0012-bcm283x-mbox-Correctly-wait-for-space-to-send.patch)

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2019-07-19 19:36:11 +01:00
Andrei Gherzan
c33649a678 u-boot: Replace custom fork by patches
The upstream branch might suffer rebases due to effort of pushing the
patches upstream. To avoid issues, let's have here the patches we need
for RPi 4 support.

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2019-07-18 17:00:07 +01:00
Andrei Gherzan
1c06e2b417 u-boot: Use a temporary fork for RPi4 support
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2019-07-16 13:38:41 +01:00
Jonathan Haigh
d2015ceee0 u-boot: Remove upstreamed U-Boot rpi0w defconfig patch
[Issue #239] -- https://github.com/agherzan/meta-raspberrypi/issues/239

The patch 0002-rpi_0_w-Add-configs-consistent-with-RpI3.patch has been
applied to the upstream U-Boot repo and is now in the release that
openembedded-core uses so remove it from meta-raspberrypi's U-Boot
bbappend.

Signed-off-by: Jonathan Haigh <jonathan.haigh@arm.com>
2018-05-09 16:40:25 +01:00
Paul Barker
92aac38577 Don't use RDEPENDS in recipes which don't create packages
RDEPENDS is fairly meaningless for recipes which don't create a package to be
installed into the rootfs. Instead we should be using DEPENDS to guarantee
correct ordering of build tasks.

Signed-off-by: Paul Barker <pbarker@toganlabs.com>
2018-04-23 14:08:04 +01:00
Drew Moseley
72bc798ff5 u-boot: Update RPi Zero W defconfig to support DTB.
This makes the defconfig more consistent with the RPi 3 and
CONFIG_OF_EMBED is needed to get the RPi firmware provided
DTB to function.

Recently removed by:
    a50e19695f u-boot: drop upstreamed patches in v2018.01
however this change missed the cutoff for v2018.01

Signed-off-by: Drew Moseley <drew.moseley@northern.tech>
2018-02-14 17:52:28 +00:00
Andrea Galbusera
a50e19695f u-boot: drop upstreamed patches in v2018.01
These are now in upstream, so they are no longer required here.

Signed-off-by: Andrea Galbusera <gizero@gmail.com>
2018-01-22 20:20:38 +00:00
Drew Moseley
58d86c0986 u-boot: Update RPi Zero W defconfig to support DTB.
This makes the defconfig more consistent with the RPi 3 and
CONFIG_OF_EMBED is needed to get the RPi firmware provided
DTB to function.

Signed-off-by: Drew Moseley <drew.moseley@northern.tech>

Added patch status information in patch header, and re-word of commit
message

Signed-off-by: Mirza Krak <mirza.krak@endian.se>
2018-01-11 21:33:55 +00:00
Mirza Krak
f900a6568c u-boot: add support for Raspberry Pi Zero W
It is all ready supported upstream and this will apply a backported
patch until next U-boot release.

Signed-off-by: Mirza Krak <mirza.krak@endian.se>
2018-01-11 21:33:55 +00:00
Andrea Galbusera
5a2b34e56c u-boot: drop now upstreamed patches
oe-core now provides v2017.09 of u-boot which already merged both patches
introduced by commit 94e2929f74 so we can
drop them from meta-raspberrypi.

Signed-off-by: Andrea Galbusera <gizero@gmail.com>
2017-09-18 21:59:02 +01:00
Paul Barker
94e2929f74 u-boot: Fix boot and keyboard for rpi devices
u-boot v2017.07 was not able to boot a Linux kernel or handle keyboard input.
This is fixed by reverting a config change to re-enable CONFIG_OF_EMBED and
backporting another config change to enable CONFIG_DM_KEYBOARD.

Signed-off-by: Paul Barker <pbarker@toganlabs.com>
2017-08-28 22:20:02 +01:00
Mirza Krak
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
Mirza Krak
031e26954b u-boot: drop patch to include lowlevel_init
The patch 0003-Include-lowlevel_init.o-for-rpi2.patch does not apply on
2016.11 and causes an build error.

Patch 0002-rpi-passthrough-of-the-firmware-provided-FDT-blob.patch
provides the inclusion of lowlever_init.o.

Signed-off-by: Mirza Krak <mirza.krak@gmail.com>
2016-12-29 20:00:55 +01:00
Jonathan Liu
064aa0a388 u-boot: Simplify boot script
A patch is backported to check if the firmware loaded a device tree blob
into memory and set the fdt_addr variable if it is found. The U-Boot
script will then read the command line arguments generated by the
firmware from the device tree and boot the kernel with the command
line arguments and the loaded device tree.

This allows things like MAC address, board revision and serial number
to be correctly configured and options in config.txt to be used.

An additional patch is backported and further changes are made to support
this.

Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2016-12-06 19:16:11 +01:00
Jonathan Liu
b0308141c1 u-boot: Fix appending to RDEPENDS
The += operator should not be used in combination with overrides as it
will clear any existing values in the variable.

Example:
FOO = "bar"
FOO_rpi += "baz"

The above example would result in FOO being equal to " baz" instead of
"bar baz".

The bbappend is changed to use a wildcard instead of a specific version
to simplify updating U-Boot.

Signed-off-by: Jonathan Liu <net147@gmail.com>
2016-11-12 13:26:18 +01:00
Paul Barker
1d629b1925 u-boot: Add RDEPENDS on rpi-u-boot-scr
The boot.cmd file created by rpi-u-boot-scr is needed for u-boot to
automatically boot a RaspberryPi.

Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2016-10-31 15:59:19 +01:00
Paul Barker
d49bd07c5b u-boot: Use mainline u-boot recipe from oe-core
The repository used by u-boot-rpi has not been updated since 2012. In the
meantime, mailine u-boot has gained Raspberry Pi support. All we need to do is
set UBOOT_MACHINE to an appropriate value in the machine config files.

Currently configs are only provided for raspberrypi and raspberrypi2. The master
branch of u-boot now also appears to have a config file for raspberrypi3 so
support for this can be added in the future when u-boot is upgraded in oe-core.

The mainline u-boot recipe creates the file "u-boot.bin" instead of
"u-boot.img".

Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2016-07-08 12:17:41 +01:00
Jonathan Liu
249cb544e0 u-boot-rpi: update path to imagetool-uncompressed.py
Signed-off-by: Jonathan Liu <net147@gmail.com>
2016-03-01 15:04:04 +01:00
Jonathan Liu
048008a935 u-boot-rpi: update path to imagetool-uncompressed.py
Signed-off-by: Jonathan Liu <net147@gmail.com>
2016-02-28 10:48:56 +01:00
Maciej Borzecki
1465bc8787 u-boot-rpi: use STAGING_LIBEXECDIR_NATIVE for rpi-mkimage tools
The rpi-mkimage tools are installed ${libexecdir}/rpi-mkimage within
native sysroot, where ${libexecdir} resolves to /usr/libexec. This caused
the build to fail due to recipe trying to access ${libdir}/mkimage. Fix
the paths to use an unambiguous STAGING_LIBEXECDIR_NATIVE so that a
proper location is used.

Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
2016-02-26 20:42:18 +01:00
Andrei Gherzan
34047964fe u-boot-rpi: Integrate package
Change-Id: I61f2cd7d3b64ea3efac618aa2bb3555e9e79da2a
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2014-02-09 03:05:14 +02:00