Commit Graph

109 Commits

Author SHA1 Message Date
Martin Jansa
e8e4b39b8b layer.conf: update LAYERSERIES_COMPAT for langdale
* the next release 4.2 will be named mickledore

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2022-09-30 09:10:09 -04:00
Trevor Woerner
3d640e3246 wic: add e2fsprogs dependency
Started seeing the following error in my builds:

	 ERROR: A native program mkfs.ext4 required to build the image was not found
	 Please make sure wic-tools have e2fsprogs-native in its DEPENDS

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2022-03-08 21:15:10 -05:00
Khem Raj
966e8a3ffa layers: bump to use kirkstone
Its not going to be backward ABI compatible with honister due to variable
renaming.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-02-22 09:14:08 -05:00
Trevor Woerner
6fed2791f1 override syntax fixup
The _virtual notation is not an override. These syntax "fixes" need to be
reverted.

In the case of the kernel override, when it was added, the rock-pi-e needed
the latest kernel (linux-yocto-dev) but now the default linux-yocto kernel
will suffice. So this mistake actually switched the rock-pi-e from
linux-yocto-dev back to linux-yocto inadvertently but at a time when
linux-yocto-dev was no longer required.

In the case of the bootloader overrides, u-boot was always the default, so
these overrides were always redundant.

Therefore, in the end, simply removing these overrides is the best way
forward (considering these aren't doing anything, and the builds are working
fine regardless).

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2021-12-13 17:32:36 -05:00
Trevor Woerner
fcd503f6c6 nanopi-m4: add common override
Add a common override for both nanopi-m4 MACHINEs.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2021-10-05 16:26:05 -04:00
Trevor Woerner
9534c174b1 include/nanopi-m4: remove KMACHINE
There is no "nanopi-m4" defined in any yocto kernel metadata (yet?), therefore
remove this superfluous line.

Build (core-image-base) and run tested (both systemd and sysvinit) on:
- nanopi-m4

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2021-10-05 16:25:59 -04:00
Markus Volk
ed3a97f7b2 rockchip-wic.inc: don't let wic edit fstab
For a while we've noticed that /etc/fstab ends up with "junk" appended to the
end e.g.:

	/dev/sda1       loader1 vfat    defaults        0       0
	/dev/sda2       reserved1       vfat    defaults        0       0
	/dev/sda3       reserved2       vfat    defaults        0       0
	/dev/sda4       loader2 vfat    defaults        0       0
	/dev/sda5       atf     vfat    defaults        0       0
	/dev/sda6       /boot   vfat    defaults        0       0

In most cases this doesn't appear to affect the systems negatively.
However, with the recent patch to switch to UUIDs [0aa5e600: "use uuid
instead of hard-coding root device"] this started becoming an issue on systems
using systemd. Therefore we need to stop wic from adding these junk entries so
that systems continue to boot correctly.

Build tested with core-image-base, nodistro, with both sysvinit and systemd
for:
- marsboard-rk3066
- rock2-square
- firefly-rk3288
- vyasa-rk3288
- nanopi-m4[-2gb]
- tinker-board[-s]
- rock-pi-e
- rock-pi-4[abc]
- rock64

Run tested, core-image-base, both sysvinit and systemd on:
- tinker-board
- rock-pi-e
- rock-pi-4b
- rock64

Commit message updated by Trevor Woerner <twoerner@gmail.com>

Tested-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: MarkusVolk <f_l_k@t-online.de>
2021-09-25 10:34:49 -04:00
Trevor Woerner
0aa5e60054 use uuid instead of hard-coding root device
Recent upstream kernel changes have made the mmc probing order unpredictable.
Therefore, boards with both an emmc and sdmmc interface aren't guaranteed to
boot with a hard-coded root device selected.

For example, on the rock64, with linux-yocto 5.10.y, using the uSD card (i.e.
the sdmmc interface) about 50% of the time the boot would succeed, and roughly
50% of the time it wouldn't:

	...
	[    0.612233] Waiting for root device /dev/mmcblk1p7...
	[    0.634551] mmc_host mmc1: Bus speed (slot 0) = 300000Hz (slot req 300000Hz, actual 300000HZ div = 0)
	[    0.639064] mmc_host mmc0: Bus speed (slot 0) = 50000000Hz (slot req 50000000Hz, actual 50000000HZ di)
	[    0.640007] mmc0: new high speed SDXC card at address 5048
	[    0.641176] mmcblk0: mmc0:5048 SD64G 58.0 GiB
	[    0.647610] random: fast init done
	[    0.648279] GPT:Primary header thinks Alt. header is not at the end of the disk.
	[    0.648941] GPT:376479 != 121634815
	[    0.649252] GPT:Alternate GPT header not at the end of the disk.
	[    0.649796] GPT:376479 != 121634815
	[    0.650106] GPT: Use GNU Parted to correct GPT errors.
	[    0.650598]  mmcblk0: p1 p2 p3 p4 p5 p6 p7

NOTE the discrepancy between the kernel waiting for device /dev/mmcblk1p7,
which comes from the hard-coded kernel cmdline, and the kernel probing putting
the sdmmc on mmcblk0.

With linux-yocto 5.13.y on the rock64 using the uSD card the board would never
boot, the sdmmc always appears on mmcblk0.

Instead of simply changing the hard-coded root device (i.e. from mmcblk0 to
mmcblk1) switch to using partition UUIDs instead. Hard-coding the boot device
would work with 5.13.y but would fail 50% of the time with 5.10.y; who knows
what other kernels will do?

In any case, switching to UUIDs works regardless of board, kernel, or
available mmc interfaces.

Boot tested on:
- rock64
- nanopi-m4-2gb
- tinker-board
- rock-pi-e
- rock-pi-4b

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2021-09-20 12:52:03 -04:00
Khem Raj
4ed72a368a machines: Adjust for new location of tune files in core
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-08-19 10:14:35 -04:00
Trevor Woerner
335bfcbf8d switch to the new bitbake OVERRIDE syntax
With bitbake commit 7dcf317cc141dc980634f8c18bfa84f83e57206a
("bitbake: Switch to using new override syntax"), applied on
Aug 2, 2021, the OVERRIDE separator is now a colon instead of
an underscore. Therefore all builds performed with a bitbake
before this change must use a meta-rockchip commit before this
one, and any builds performed with a bitbake after this change
must use a meta-rockchip starting from this commit onwards.

Build-tested for all meta-rockchip MACHINEs.

Run tested on:
- tinker-board
- nanopi-m4-2gb
- rock64
- rock-pi-4b
- rock-pi-e

The tinker-board and rock-pi-e work fine. The rest of the boards
seem to have a, hopefully unrelated, issue running a
5.13-yocto-standard kernel. However, all boards work with the
5.10-yocto-standard kernel.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-08-04 21:59:14 -04:00
Trevor Woerner
a3ef99b596 layer.conf: update layer compatibility for honister
Add honister, remove hardknott.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-08-04 21:59:00 -04:00
Trevor Woerner
88a9704bd6 remove LINUX_VERSION_EXTENSION
Adding "-rockchip" to the Linux kernel name implies, to me anyway, that this
is a vendor kernel. The PREFERRED_PROVIDERs of all kernels specified in this
BSP are upstream linux-yocto kernels, not vendor kernels. Therefore remove the
version name extension to avoid confusion.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2021-07-26 21:05:44 -04:00
Trevor Woerner
2b58202db1 rock-pi-e: update preferred kernel
The latest updates to linux-yocto-dev now include support for the rock-pi-e so
do away with our custom recipe and use the one from oe-core.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2021-07-26 21:05:34 -04:00
Trevor Woerner
2cf5a03eaa wic/wks cleanup
By exporting a couple more variables the wks file for every rockchip device
can be built from one template instead of having separate wks files for each
board and platform.

The following BSP variables were checked before and after this change to make
sure they remained valid/sensible:
- WKS_FILE
- UBOOT_SUFFIX
- SPL_BINARY
- IMAGE_FSTYPES

Built-tested for every MACHINE in this BSP.

Run-tested on the following devices to ensure they continue to boot correctly
to a cmdline (core-image-base):
- tinker-board
- rock-pi-e
- rock-pi-4b
- rock64
- nanopi-m4-2gb

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2021-06-30 12:11:52 -04:00
Trevor Woerner
1b38edb292 IMAGE_FSTYPES: remove ext4
The ext4 IMAGE_FSTYPES does not need to be mentioned explicitly. It will be
automatically generated in cases where it is needed.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2021-06-30 12:11:51 -04:00
Trevor Woerner
9b9325eb68 conf/machine/include/nanopi-m4.inc: add full include path
Specify the full include path to the rk3399.inc file.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2021-06-30 12:11:51 -04:00
Trevor Woerner
62d4201415 conf/machine/include/rockchip-wic.inc: create
Create a conf/machine/include/rockchip-wic.inc file to contain all the common
wic/wks things for easy inclusion by any MACHINEs that use wic for their image
creation.

NOTE: the wic image type of rock-pi-e changed from "wic.xz" to "wic" which
      matches all the other meta-rockchip MACHINEs that use wic

The following variables were checked before and after to make sure they remain
correct/sensible:
- IMAGE_FSTYPES
- WKS_FILE_DEPENDS
- IMAGE_BOOT_FILES
- RK_CONSOLE_BAUD
- RK_CONSOLE_DEVICE
- RK_BOOT_DEVICE
- SERIAL_CONSOLES
- WICVARS

Build-tested for all currently-defined MACHINEs.

Boot-tested on the following boards to make sure they continue to boot to a
console correctly (core-image-base):
- tinker-board
- rock64
- rock-pi-4b
- rock-pi-e
- nanopi-m4-2gb

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2021-06-28 11:13:21 -04:00
Trevor Woerner
8cd56cdcd8 console cleanup
Consolidate all the various console definitions to the common
conf/machine/include/rockchip-defaults.inc file and create
RK_CONSOLE_BAUD and RK_CONSOLE_DEVICE variables that can be
reused in the wks files.

The following variables were checked before and after this patch
to make sure they are sensible:
- SERIAL_CONSOLES
- RK_CONSOLE_DEVICE
- RK_CONSOLE_BAUD

A boot test was performed on the following boards to make sure
they all continue to boot to a cmdline:
- tinker-board
- rock-pi-e
- nanopi-m4-2gb
- rock64
- rock-pi-4b

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2021-06-27 14:43:56 -04:00
Khem Raj
41596bb21b qtbase: Add needed bbappend for rk3399 SOCs
This ensures that DISTRO_FEATURES can translate correctly
for qtbase PACKAGECONFIGs and we can get right platforms enabled.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-06-23 15:43:26 -04:00
Trevor Woerner
04fb5bc388 rock-pi-e: use common rk3328.inc
Now that there is a second rk3328-based MACHINE (rock64) switch rock-pi-e to
use the common rk3328 include.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2021-06-23 11:35:42 -04:00
Yann Dirson
7c7e5b9e59 rock64: add machine
This is a RK3328 board from Pine64.
Board details at https://wiki.pine64.org/wiki/ROCK64.

Default image is built to boot from SD-card.  Building an image for
eMMC requires to set RK_BOOT_DEVICE="mmcblk0".

Signed-off-by: Yann Dirson <yann@blade-group.com>
2021-06-17 22:29:22 -04:00
Yann Dirson
1cd4996051 NanoPi-M4: declare "usbhost" and "serial" in MACHINE_FEATURES
Signed-off-by: Yann Dirson <yann@blade-group.com>
2021-05-04 17:05:02 -04:00
Yann Dirson
3111beaae5 NanoPi-M4: let all variants use the same KMACHINE type
This will allow us to define a single set of kernel BSP for all
variants of the board (which only need to differ in u-boot dts).

Signed-off-by: Yann Dirson <yann@blade-group.com>
2021-05-04 17:04:51 -04:00
Yann Dirson
cde5e745be NanoPi-M4: add machines
We have two board variants, respectively with 2GB and 4GB RAM.

Signed-off-by: Yann Dirson <yann@blade-group.com>
2021-03-23 10:15:03 -04:00
Trevor Woerner
bafc4a2fda update layer compatibility
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2021-03-21 13:47:56 -04:00
Khem Raj
019ee14cf9 layer.conf: Add hardknott to compatible release branches
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-03-18 09:40:44 -04:00
Trevor Woerner
8703709519 tinker board: refactor machine config
Create a common conf/machine/include/tinker.inc and re-spin
    - conf/machine/tinker-board.conf
    - conf/machine-tinker-board-s.conf
to just contain the differences.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2021-03-04 23:37:13 -05:00
Trevor Woerner
43de504d48 rock-pi-e: add
Add support for Radxa's ROCK Pi E device
https://wiki.radxa.com/RockpiE

It's a great surprise to find upstream U-Boot and the Linux kernel already
provide support for this board! On the kernel side this support was
added in 5.11. However, that support is so new that even linux-yocto-dev
(which is based on 5.11) doesn't include the commits that add support
for this board yet. As a result I've added a custom Linux kernel recipe
(linux-stable-bleeding) which should, in time, become unnecessary.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2021-02-26 22:14:28 -05:00
Joshua Watt
ad65fd7736 rock-pi-4: Split our variant machines
Splits out the three variants of the rock-pi-4 (A, B & C) into their own
machines. Unfortunately, it is not possible to have a single machine
that works for all three, as there isn't any known ways for the
bootloader to distinguish them. The old rock-pi-4 machine is kept around
for use with older kernels

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
2021-01-29 22:10:49 -05:00
Trevor Woerner
b6cb9881a7 LAYERSERIES_COMPAT: → gatesgarth
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2020-10-17 11:58:21 -04:00
Joshua Watt
d269803649 Use TF-A recipe from meta-arm
Converts the build to pull the canonical TF-A recipe from meta-arm
instead of duplicating it in this layer.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
2020-06-25 16:38:48 -04:00
Joshua Watt
18b5329e2c Use linux-yocto kernel from OE-core
Updates all machines to use the linux-yocto kernel from OE-core instead
of maintaining distinct kernels in this repository.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
2020-04-19 00:39:54 -04:00
Trevor Woerner
fa06a975a8 LAYERSERIES_COMPAT: update for dunfell
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2020-03-29 23:20:52 -04:00
Trevor Woerner
d926dcdd54 veyron-speedy: remove machine
This MACHINE hasn't built successfully in a long time. Remove it, and
everything associated with it that isn't used anywhere else.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2020-02-14 00:25:26 -05:00
Sergey 'Jin' Bostandzhyan
3f8c52b2c4 Allow to override WKS_FILE variable
Currently machine configs define the partition layout for each machine
by setting the WKS_FILE variable. However, there are situations where it
may be needed to use a different, non default layout. To simplify such
configurations we will set WKS_FILE using ?= so that it can be easily
overriden in local configurations.

Signed-off-by: Sergey Bostandzhyan <jin@mediatomb.cc>
2020-02-11 11:24:40 -05:00
Sergey 'Jin' Bostandzhyan
022877f438 Add tinker-board-s machine configuration
Asus Tinker Board-S has emmc on mmcblk1, this is also the default
configuration when building the image. If you need an image for booting
from the sd card set RK_BOOT_DEVICE to mmcblk0

Signed-off-by: Sergey Bostandzhyan <jin@mediatomb.cc>
2020-02-11 10:20:58 -05:00
Sergey 'Jin' Bostandzhyan
1aea373d88 Add configuration parameter to set boot device for the image
wic modifies /etc/fstab on the root file system during image generation,
without the --ondisk parameter it assumes some default device name which
leads to an /etc/fstab file populated with /dev/sda entries.
This is not correct for the machines in the rockchip layer which use
mmcblkX.

This patch introduces an RK_BOOT_DEVICE option which is being set in the
machine configuratoin and which is being used in the wks files.
The variable expansion in the wks is handled by propagating the variable to
the wic environment.

This results in correct /etc/fstab entries and in a correct kernel
bootargs root= parameter.

Signed-off-by: Sergey Bostandzhyan <jin@mediatomb.cc>
2020-02-11 10:20:58 -05:00
Joshua Watt
0b7d842fca tinker-rk3288: Rename to tinker-board
Renames the tinker-rk3288 to match the convention of naming the machines
with the manufacturers official board name.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
2020-02-03 11:05:55 -05:00
Joshua Watt
764e7c8431 rock-pi-4: Fix description
The Rock Pi 4 is based on a RK3399, not a RK3288

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
2020-02-03 11:05:26 -05:00
Joshua Watt
a0162457c5 rock-pi-4: Add machine
Adds the machine definition for the Rock Pi 4 based around the RK3399
SoC.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
2020-01-27 16:32:28 -05:00
Joshua Watt
01467664da rk3399: Add generic rk3399 support
Adds support for the rk3399 SoC. Notably:
 *) Split out the default kernel config and image type from
    rockchip-defaults.inc now that not all support chips are ARMv7
 *) Apply a patch to Arm Trusted Firmware to fix a compile issue
 *) Arm Trusted Firmware requires the arm-none-eabi-native compiler to
    compile the M0 firmware.
 *) Modify u-boot to pull in the ATF files when compiling
 *) The rk3399 is support by the panfrost driver in mesa, so enable it

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
2020-01-27 16:32:19 -05:00
Joshua Watt
d59f392f3f rk3288: Add wic.bmap images
Adds the wic bitmap images to IMAGE_FSTYPES. bmaptool can use these
files to efficiently copy sparse images to media

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
2020-01-24 14:11:28 -05:00
Joshua Watt
5e96349999 rk3288: Convert to using wic
Coverts the firefly-rk3288, tinker-rk3288, and vyasa-rk3288 machines to
use wic instead of the rockchip-gpt-img class. The rock2-squared machine
has to keep the older image class because u-boot doesn't provided a
combined idbloader for it.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
2019-12-12 01:20:26 -05:00
Joshua Watt
e8fd1f92ed rk3288: Append GPT image type
Appends the GPT image type to IMAGE_FSTYPES instead of overriding. This
allows additional types to be preserved if they are specified in
local.conf

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
2019-12-10 23:00:58 -05:00
Trevor Woerner
6732e8b981 rock2-square: reinstate non-idbloader u-boot
Unfortunately, although the rock2-square is an rk3288-based device, its U-Boot
has not been updated to use the TPL+SPL/idbloader mechanism. This commit adds
back the previous U-Boot packaging but only for the rock2-square.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2019-12-10 12:52:18 -05:00
Joshua Watt
295b58facf Fix rk3288 bootloader
Recent versions of u-boot use a combined SPL/TPL (called idbloader.img)
in the loader1 partition, which then loads the full u-boot from the
loader2 partition. Update the GPT partition class to reflect this
change. Additionally, remove the u-boot bbappend since it is no longer
needed.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
2019-12-09 21:32:23 -05:00
Trevor Woerner
78d19c52fb layer compat: warrior -> zeus
Update the LAYERSERIES_COMPAT from warrior to zeus.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2019-10-09 07:37:15 -04:00
Trevor Woerner
bc09904bc2 classes/rockchip-gpt-img.bbclass: cleanup GPTIMG_APPEND
Put MACHINE-specific tweaks into MACHINE configuration.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2019-05-08 10:04:22 -04:00
Trevor Woerner
605f5fe077 layer.conf: update for warrior
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2019-04-03 02:10:56 -04:00
Trevor Woerner
e353b08fc2 conf/layer.conf: update COMPAT to thud
Update this layer's compatibility declaration to the next release: thud.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2018-10-02 04:27:10 -04:00