Commit Graph

76 Commits

Author SHA1 Message Date
Florin Sarbu
1e7750e3c8 Add Raspberry Pi 5
Signed-off-by: Florin Sarbu <florin@balena.io>
2024-01-25 17:25:39 +00:00
Carlos Alberto Lopez Perez
0a4a68dba6 linux-raspberrypi: stop setting powersave as the default CPU governor
* The defconfigs from the RPi Kernel set `powersave` as the default
  CPU governor, which is a bad idea as that reduces performance by
  setting the CPU frequency to the minimum one.

* In case of a Yocto build user-space is not configured by default
  to change the CPU governor, so `powersave` will remain the CPU
  governor and it will slow down everything.

* I submitted a fix for those defconfigs to upstream here:
  https://github.com/raspberrypi/linux/pull/5666
  However, we shouldn't wait until that is accepted and backported
  to all the stable branches (if ever is).

* This patch unsets the selection of `powersave` as the default CPU
  governor.

* Then the CPU governor that will be selected as default after this
  patch will be the Linux's default one that is either `ondemand` or
  `schedutil` depending on the Kernel version.

Signed-off-by: Carlos Alberto Lopez Perez <clopez@igalia.com>
2023-10-25 20:44:38 +01:00
Allan Xavier
c9d9582a23 linux-raspberrypi: Build eeprom access into kernel
To better support rpi-eeprom without depending on userland it was
decided to build nvmem-rmem support into the kernel for Raspberry Pi 4
machines.

Signed-off-by: Allan Xavier <mr.a.xavier@googlemail.com>
2023-02-08 22:04:18 +00:00
Khem Raj
2e9b0c375f linux-raspberrypi.inc: Weakly assign COMPATIBLE_MACHINE
COMPATIBLE_MACHINE is expected to be overridden by
linux-raspberrypi-v7.inc for linux-raspberrypi-v7 machine this however
does not work because linux-raspberrypi-v7_5.15.bb includes
linux-raspberrypi-v7.inc and linux-raspberrypi.inc ( via
linux-raspberrypi_5.15.bb) and setting from linux-raspberrypi.inc takes
precedence over one coming from linux-raspberrypi-v7.inc as a result
linux-raspberrypi-v7 kernel recipe becomes available for raspberrypi4
machine as well, this recipe however needs certain defines
e.g.RASPBERRYPI_v7_KERNEL which are only available in
raspberrypi-armv7.conf

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-01-06 05:26:38 +00:00
Andrei Gherzan
2f43edae00 Add support for a ARMv8 machine supporting multiple Raspberry Pi boards
The new raspberrypi-armv8.conf aims at supporting all the ARMv8
Raspberry Pi boards.

This initial support was tested on:
* Raspberry Pi 4 Model B
* Raspberry Pi 3 Model B
* Raspberry Pi 0 2 WiFi

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
2022-09-14 20:39:18 +01:00
Andrei Gherzan
10b649bdb0 Add support for a ARMv7 machine supporting multiple Raspberry Pi boards
The new raspberrypi-armv7.conf aims at supporting all the ARMv7
Raspberry Pi boards.

This initial support was tested on:
* Raspberry Pi 4 Model B
* Raspberry Pi 3 Model B
* Raspberry Pi 0 2 WiFi

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
2022-09-14 20:39:18 +01:00
AJ Bagwell
83f5577d8d linux-raspberrypi: add UBOOT_ENTRYPOINT to match LOADADDR
This is so that uboot fit images have an entry point that matches the
LOADADDR that everything is expecting.

Signed-off-by: AJ Bagwell <anthony.bagwell@hivehome.com>
2022-04-11 17:15:30 +01:00
Martin Jansa
2bfbdd633c meta: update license names
* openembedded-core/scripts/contrib/convert-spdx-licenses.py .
  ...
  All files processed with version 0.01

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2022-02-22 16:21:17 +00: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
Devendra Tewari
246555aea7 Add WM8960 soundcard support
Signed-off-by: Devendra Tewari <devendra.tewari@gmail.com>
2021-06-10 21:22:24 +01:00
Martin Jansa
7565931e23 linux-raspberrypi: update LIC_FILES_CHKSUM in .inc file and drop from 5.10 and dev recipe
* COPYING was changed only 4 times (last time in 5.6 with:
  https://github.com/torvalds/linux/commit/74835c7db0322 )
  so hopefully it will last for a while

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2021-02-06 13:23:34 +00:00
Jonas Vautherin
56ab926557 linux-raspberrypi: Superfluous 'inherit kernel'
'recipes-kernel/linux/linux-yocto.inc' already inherits 'kernel'.
This commit removes the superfluous one in 'linux-raspberrypi.inc'.

Signed-off-by: Jonas Vautherin <jonas.vautherin@protonmail.ch>
2021-01-26 10:07:51 +00:00
Ovidiu Panait
a7cc636d4e linux-raspberry: Drop 64-bit specific do_compile_append()
The functionality provided by this compile append is already present in
kernel-devicetree.bbclass since oe-core commit:
https://github.com/openembedded/openembedded-core/commit/74619de02774

The md5sums of the generated dtbs for raspberrypi3-64 and raspberrypi4-64 do
not change with this patch applied.

Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
2020-12-24 17:52:49 +00:00
Paul Barker
64f6a1b7cc linux-raspberrypi: Drop unused rpi-kernel-misc config fragment
This config fragment was unconditionally disabled for the v5.4 kernel
so it can be dropped.

Signed-off-by: Paul Barker <pbarker@konsulko.com>
2020-11-27 14:29:55 +00:00
Paul Barker
8827040d9c rpi-cmdline: Move cmdline.txt generation to a separate recipe
Instead of generating cmdline.txt in the kernel recipe, it is generated
in a standalone recipe and pulled in as a dependency of the bootfiles
recipe. This simplifies the process of using a linux-yocto,
linux-mainline or similiar kernel recipe instead of linux-raspberrypi.

In the rpi-cmdline recipe the command line is built from fragments which
can all be easily overridden. The variables `SERIAL` and `CMA` are
renamed to `CMDLINE_SERIAL` and `CMDLINE_CMA` for consistency. The
cmdline.txt file is created in the do_compile step to allow further
customisation via do_compile_append if needed.

Signed-off-by: Paul Barker <pbarker@konsulko.com>
2020-11-27 14:29:55 +00:00
Paul Barker
1c8ad80861 linux-raspberrypi: Convert dynamic config patching to config fragments
This allows us to drop all of the custom config patching in
linux-raspberrypi.inc. It also allows the kernel config to be checked
during the build for any discrepancies between the selected config
options and the resulting .config file - this identified that
`CONFIG_DRM_VC4` depends on `CONFIG_SND` and `CONFIG_SND_SOC`.

Signed-off-by: Paul Barker <pbarker@konsulko.com>
2020-11-27 14:29:55 +00:00
Khem Raj
2e0b2d41cf linux-raspberrypi: Do not use += with append
append operator and += when used together results in undefined behaviour
in bitbake

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-11-14 23:27:08 +00:00
Madhavan Krishnan
b70c7b9021 libcamera: Enabled camera overlays define based
Added imx219.dtbo file in the overlays, and added dtoverlay in
/boot/config.txt define based.

To enable Sony Raspberry pi camera imx219 sensor, need to set
the variable RASPBERRYPI_CAMERA_V2 as 1.

In future, we can add any camera overlays here to support and
use them with libcamera.

Signed-off-by: Madhavan Krishnan <madhavan.krishnan@linaro.org>
2020-11-14 23:26:39 +00:00
Alex Gonzalez
2324089fef linux-raspberrypi: Only deploy cmdline.txt for the main kernel
When multiple kernels are being built, not all of them can deploy the
same file.

Signed-off-by: Alex Gonzalez <alexg@balena.io>
2020-10-12 10:05:48 +01:00
Jeff Ithier
f046b4128c Generalize the naming of the bootfiles deploy directory
The raspberry pi 4 variant has a BCM2711 chip, however it still
uses the same boot files as the BCM2835 used in previous generations.
This change generalizes the naming of the directory generated in the
$DEPLOY_DIR to avoid the implication that the files are only
meant for the BCM2835.

Signed-off-by: Jeff Ithier <ithijme@gmail.com>
2020-08-06 11:00:29 +01:00
Ricardo Salveti
12bbdd91b2 linux-raspberrypi: define kbuild defconfig for rpi cm3
Also define a default kbuild defconfig value for rpi cm3.

Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2020-01-08 11:24:51 +00:00
Michael Baisch
ef6555c09a linux-raspberrypi.inc: no longer set CONFIG_LOCALVERSION to empty string
Fixes: #533

Signed-off-by: Michael Baisch <baisch@tau-tec.com>
2019-12-23 14:13:18 +00:00
Andrei Gherzan
1e329d36c9 linux-raspberrypi: Build dtbs with dtbs make target for all 64bit targets
We already do this for rpi3-64 and we will need it for rpi4-64 as well.
See 6c4de0b5fe for more details.

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2019-07-16 13:39:01 +01:00
Andrei Gherzan
f027daf51d linux-raspberrypi.inc: Explicitly set defconfig for raspberrypi4-64
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2019-07-04 15:47:13 +01:00
Andrei Gherzan
dbe5c91cb2 linux-raspberrypi: Include configuration for RaspberryPi3 defconfig
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2019-06-30 16:14:31 +01:00
Andrei Gherzan
9bfbd7a26a linux-raspberrypi: Build rpi poe fan driver
Signed-off-by: Andrei Gherzan <andrei@gherzan.com>
2018-09-11 11:36:35 +01:00
Martin Jansa
e8f9a4e8f8 sdcard_image-rpi.bbclass: drop KERNEL_INITRAMFS variable
* use INITRAMFS_SYMLINK_NAME from new kernel-artifact-names.bbclass
  instead of KERNEL_INITRAMFS
* the documentation says that KERNEL_INITRAMFS should be used to
  define extension of initramfs, but in linux-raspberrypi.inc it's
  defined only to 1 or empty based on INITRAMFS_IMAGE_BUNDLE variable
  and I don't see any code in meta-raspberry or oe-core which would
  use KERNEL_INITRAMFS to actualy name the initramfs artifact to create:
  ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin
  used in classes/sdcard_image-rpi.bbclass
* also fix the assumption that there is -${MACHINE} suffix in:
  ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin
  because that's defined as KERNEL_IMAGE_SYMLINK_NAME and some DISTROs
  might use different value
* this depends on oe-core changes which were merged today:
  http://git.openembedded.org/openembedded-core/commit/?id=7d0ef0eaa1bfe97015a774c26f5791622e7e8b12
* this is the last piece of previous pull-request:
  https://github.com/agherzan/meta-raspberrypi/pull/159

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2018-07-16 16:54:32 +01:00
Khem Raj
014408d1ac linux-raspberrypi: Disable serial on kernel cmdline if ENABLE_UART is unset
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-05-04 22:08:38 +01:00
Paul Barker
693f36dded linux-raspberrypi: Drop CONFIG_OABI_COMPAT completely
There's no reason to support the old, outdated ARM OABI when upstream
linux-raspberrypi doesn't support this by default.

Signed-off-by: Paul Barker <pbarker@toganlabs.com>
2018-04-23 14:08:04 +01:00
Paul Barker
2c7eab2d0d linux-raspberrypi: Drop inappropriate forced settings
CONFIG_BLK_DEV_DRBD: Deciding whether to use the in-kernel DRBD module or the
external drbd recipe in meta-networking is a policy decision and doesn't belong
in our BSP layer.

CONFIG_LEGACY_PTYS: These are legacy for a reason. They're not enabled in the
defconfig so they shouldn't be required for rpi devices. Let's drop this here,
it can be added back in a distro layer where (if) needed.

Signed-off-by: Paul Barker <pbarker@toganlabs.com>
2018-04-23 14:08:04 +01:00
Paul Barker
d2ead7c039 linux-raspberrypi: Don't set CONFIG_CMDLINE
We force the command line at runtime via cmdline.txt anyway.

Signed-off-by: Paul Barker <pbarker@toganlabs.com>
2018-04-23 14:08:04 +01:00
Paul Barker
66103edbb8 linux-raspberrypi: Drop support for CMDLINE_NFSROOT_USB
This is obsolete, undocumented and won't work anyway since we force the kernel
command line to ${CMDLINE} via the cmdline.txt file.

Signed-off-by: Paul Barker <pbarker@toganlabs.com>
2018-04-23 14:08:04 +01:00
Paul Barker
be2d9b1bf6 linux-raspberrypi: Drop unnecessary configurations
KERNEL_ENABLE_CGROUPS: This is obsolete, all required config options for cgroups
are enabled by default.

KERNEL_INITRAMFS: Some of the config options we set are already enabled by
default.

UDEV_GE_141: This is long obsolete and all the required config options are
already set in the defconfig.

ARM_KEEP_OABI: AEABI=y and OABI_COMPAT=n are already set in the defconfig.

CONFIG_LOCALVERSION_AUTO: This setting is already disabled in the defconfig.

Signed-off-by: Paul Barker <pbarker@toganlabs.com>
2018-04-23 14:08:04 +01:00
Martin Jansa
ea35d07b5b recipes: use oe.utils.conditional instead of deprecated base_conditional
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2018-02-01 13:40:32 +00:00
Martin Kelly
8643e28c3a linux-raspberrypi: fix build with devtool
Currently, building linux-raspberrypi with "devtool build" breaks
because ${B}.config doesn't yet exist when do_configure_prepend runs.

Fix this by taking some logic from kernel.bbclass do_configure to populate
${B}.config before do_configure_prepend.

The full explanation for why this is necessary is fairly complex:

- In devtool builds, externalsrc.bbclass gets inherited and sets a list of
SRCTREECOVEREDTASKS, which don't get run because they affect the source tree
and, when using devtool, we want the developer's changes to be the single
source of truth. kernel-yocto.bbclass adds do_kernel_configme to
SRCTREECOVEREDTASKS, so it doesn't run in a devtool build., In a normal
non-devtool build, do_kernel_configme creates ${B}.config.

- Normally (e.g. in linux-yocto), it would be OK that do_kernel_configme
doesn't run, because the first few lines of do_configure in kernel.bbclass
populate ${B}.config from either ${S}.config (if it exists) for custom
developer changes, or otherwise from ${WORDIR}/defconfig.

- In linux-raspberrypi, we add do_configure_prepend, which tweaks
${B}.config. Since this runs *before* the kernel.bbclass do_configure,
${B}.config doesn't yet exist and we hit an error. Thus we need to move
the logic from do_configure up to before our do_configure_prepend. Because
we are copying only a portion of do_configure and not the whole thing,
there is no clean way to do it using OE functionality, so we just
copy-and-paste.

Signed-off-by: Martin Kelly <mkelly@xevo.com>
2018-01-31 20:38:58 +00:00
Martin Kelly
dfa7f00bab linux-raspberrypi: remove custom oldconfig command
This command is done (with more correct flags) in kernel.bbclass's
kernel_do_configure. Since we inherit that and prepend to it, we don't
need to run it ourselves, as we end up just running it twice.

Signed-off-by: Martin Kelly <mkelly@xevo.com>
2018-01-31 20:38:58 +00:00
Paul Barker
0c41915260 linux-raspberrypi: Don't install empty firmware directory
Signed-off-by: Paul Barker <pbarker@toganlabs.com>
2017-12-04 17:53:26 +01:00
Michael Gloff
1ab83ec30a linux-raspberrypi: Replace /lib with ${nonarch_base_libdir}
Use standard /lib variable name and avoid
QA errors when usermerge DISTRO_FEATURE is enabled.

Signed-off-by: Michael Gloff <mgloff@hotmail.com>
2017-10-27 22:28:31 +02:00
Paul Barker
9d84186870 linux-raspberrypi: Keep framebuffer support when vc4graphics is enabled
Framebuffer support may be required for some monitors and applications.

Signed-off-by: Paul Barker <pbarker@toganlabs.com>
2017-10-09 19:31:28 +01:00
Andrei Gherzan
c716e0d30c linux-raspberrypi.inc: Define KBUILD_DEFCONFIG for rpi0 WiFi
Signed-off-by: Andrei Gherzan <andrei@gherzan.com>
2017-10-03 17:09:35 +01:00
Paul Barker
49f1a94512 linux-raspberrypi: Move LOADADDR setting to inc file
There is no reason to continue supporting pre-4.8 series kernels so we can move
the setting of LOADADDR to the common inc file.

Signed-off-by: Paul Barker <pbarker@toganlabs.com>
2017-09-24 20:39:35 +01:00
Paul Barker
e7bac0bed5 linux-raspberrypi: Merge inc files
There is no need to have 2 separate inc files any more and the existing code has
several duplications.

Signed-off-by: Paul Barker <pbarker@toganlabs.com>
2017-09-24 20:39:35 +01:00
Paul Barker
cbd2412fb4 linux-raspberrypi-base.bbclass: Drop
The only remaining function in linux-raspberrypi-base was split_overlays() which
is used in the sdcard_image-rpi class. So we can move this function over and
drop the now-empty linux-raspberrypi-base class.

Signed-off-by: Paul Barker <pbarker@toganlabs.com>
2017-09-24 20:39:35 +01:00
Paul Barker
8311d16e59 linux-raspberrypi: Drop unnecessary code
* The kerneltype variable is not used anywhere after being set.

* The manipulation of KERNEL_DEVICETREE is effectively a no-op, we read the
  current value in get_dts() and store this back into the same variable.

Signed-off-by: Paul Barker <pbarker@toganlabs.com>
2017-09-24 20:39:35 +01:00
Khem Raj
6c4de0b5fe linux-raspberrypi: Build dtbs with dtbs make target for rpi64
OE currently builds dtb files with its own custom targets by
specifying each dtb file as makefile target, this creates bad
dtb for rpi64 bit. This patch calles 'make dtbs' at the end
which regenerates the correct dtb files

This makes the vc4 initialize properly on rpi64

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-09-20 15:50:20 +01:00
Zdzisław Krajewski
7a7d871cc1 linux-raspberrypi: Add option for disabling rpi boot logo.
Signed-off-by Zdzisław Krajewski <zdzichucb@gmail.com>
2017-09-01 11:14:19 +01:00
Andrea Ghittino
88478c3874 linux-raspberrypi: fix kernel configuration using cfg files
In tree configurations are now used to build the kernel and
it is possible to extend the config via bbappend and cfg fragments

Fix issue 14

Signed-off-by: Andrea Ghittino <aghittino@gmail.com>
2017-08-31 15:12:11 +01:00
Martin Jansa
56d0bdb5fe recipe: anchor regexps in COMPATIBLE_MACHINE
* bitbake is using re.match, so raspberrypi actually matches with anything
  ^raspberrypi.* which currently works, but it will also match with hypothetical
  raspberrypi-is-no-more-this-is-banana-now MACHINE which isn't intended by
  this COMPATIBLE_MACHINE.

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-07-27 10:56:34 +02:00
Gianfranco Costamagna
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
Khem Raj
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