85 Commits

Author SHA1 Message Date
Khem Raj
cd1a0018bb opensbi: Make FW_TEXT_START=0x40000000 specific to jh7110
This ensures that it does not inflict upon other RISCV SOCs and qemu
based machines, which can result in non-booting systems since entry
adddress in FW_JUMP Firmware Configuration  is wrong.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-05-31 15:32:37 -07:00
Justin Hammond
650490e644 Fix VisionFive 2 boot and Add Star64 Board
Several issues with the current visionfive 2 support:
* JH7110 Support is only in OpenSBI Master branch, (upcoming 1.3 release).  So pin OpenSBI Revision to the commit that adds JH7110 Support otherwise reset etc does not work
* There are two variants of VisionFive2 and Star64 - 4Gb and 8Gb. StarFive's u-boot reads the eeprom on board to determine what variant you have, and modifies the loaded FDT it passes to the kernel with the correct Memory. Current U-boot scripts in meta-riscv do not do this, and thus all boards end up with the default 4Gb configuration. I've updated this for Star64, but needs testing on VF2

* Some of the addresses used in uboot for kernel/initramfs or fdt were different from upstream. Aligned the addresses with upstream StarFive.

As both Star64 and VisionFive2 are based on the same SOC, i've changed the machine configuration so we have a JH7110 SOC and VisionFive2 and Star64 inherit from this. Where appropriate in the recipies, I've changed to jh7110 instead of visionfive2

Finally, as the Star64 has different kernel/u-boot configs/dts files, i've pointed those at my repos for now, and will be upstreaming (assuming Starfive accept star64 related PRs). Once upstreamed, I'll submit a new PR here.

This also lays the groundwork for the new PineTab-V from pine64 which is due to be shipped in May.

Signed-Off-By: Justin Hammond <justin@dynam.ac>
2023-04-18 17:01:54 -07:00
Alexey Firago
534eaf9336 u-boot-starfive: vf2: Update uEnv.txt
Align uEnv.txt with the Starfive SDK to boot from SD card.
uEnv sets required variables to read the fitImage from the
partition 3 on the SD card and rootfs is expected on the
partition 4.

Signed-off-by: Alexey Firago <alexey.firago@gmail.com>
2023-04-12 08:30:37 -07:00
Alexey Firago
a73da9374f u-boot-starfive: vf2: Rename uEnv.txt on deploy
Deploy uEnv.txt as vf2_uEnv.txt. This file is expected by the
Starfive U-Boot.

Signed-off-by: Alexey Firago <alexey.firago@gmail.com>
2023-04-12 08:30:37 -07:00
Alexey Firago
9d5b57ae99 u-boot-starfive: Build u-boot-spl.bin.normal.out
Build and deploy u-boot-spl.bin.normal.out. It is used to boot from
SD Card.

Signed-off-by: Alexey Firago <alexey.firago@gmail.com>
2023-04-12 08:30:37 -07:00
Alexey Firago
88cd6525d6 jh7110-spl-tool: Add recipe
Add recipe for a jh7110 signature tool, which is used to generate
SPL header information and generate u-boot-spl.bin.normal.out.

Signed-off-by: Alexey Firago <alexey.firago@gmail.com>
2023-04-12 08:30:37 -07:00
Alexey Firago
971466319a u-boot: visionfive2: Add u-boot-starfive_v2021.10
Add u-boot-starfive_v2021.10.bb recipe to build U-Boot v2021.10
from https://github.com/starfive-tech/u-boot

Signed-off-by: Alexey Firago <alexey.firago@gmail.com>
2023-04-12 08:30:37 -07:00
Andreas Cord-Landwehr
a739220862 visionfive2-firmware.inc: update to release 2.11.5 2023-04-09 07:36:11 -07:00
Khem Raj
bcb10a0866 common/visionfive2-firmware: Upgrade to VF2_v2.10.4
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-03-15 15:33:21 -07:00
Andreas Cord-Landwehr
7e5e6ba709 visionfive2-firmware: introduce shared config for binary blob versions 2023-03-06 10:19:34 -08:00
Andreas Cord-Landwehr
9710130a4e visionfive2: add initial u-boot support
Regarding uEnv, note that this is simply a fork of the version from the
Debian based SDK image, only appended by setting the bootargs.
2023-03-06 10:19:34 -08:00
Khem Raj
a37e69820b u-boot: Always depend on openSBI do_deploy
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-03-05 14:47:40 -08:00
Pavel Zhukov
06e529beb2 mangopi-mq-pro: Sync DTS with kernel
At this point DTSes differ between d1/wip branch of the kernel
and corresponding branch of u-boot. Mangopi-MQ-Pro dts is missed in
u-boot part which leads to missing devices nodes (bluetooth in
particular). Sync dts and pin patch to mangopi only to not affect Nezha.

Signed-off-by: Pavel Zhukov <pavel@zhukoff.net>
2023-02-09 16:43:45 -08:00
Pavel Zhukov
0539e6e8fa u-boot: Rename nezha to allwinnerd1
Use SOC name (Allwinner D1) instead of board name for
generic recipes.
Move board specific configuration to corresponding machine conf

Signed-off-by: Pavel Zhukov <pavel@zhukoff.net>
2023-02-09 16:43:45 -08:00
Pavel Zhukov
423e90657a u-boot: Sync dtc tree with kernel
Signed-off-by: Pavel Zhukov <pavel@zhukoff.net>
2023-02-09 16:43:45 -08:00
Pavel Zhukov
f4d336cb7e conf/machine: Add mangopi-mq-pro machine
Based on Nezha D1 machine config with addjusterd DTB configuration
and added wifi module driver.
Tested with core-image-(base|weston) on MangoPi MQ Pro rev 1.3:
- HDMI output/weston and wifi are working. USB-C ethernet detected but not
  tested due to lack of HW.

Signed-off-by: Pavel Zhukov <pavel@zhukoff.net>
2023-02-05 19:30:23 -08:00
Andreas Cord-Landwehr
224eba4646 opensbi: Remove obsolete nezha-d1 patches for opensbi
Due to wrong machine value, the patches were not applied anymore.
Moreover, opensbi 1.1 works with nezsha D1 without changes.
2023-01-08 08:07:38 -08:00
Andreas Cord-Landwehr
05a629193a boot0: Remove obsolete boot0 package 2023-01-08 08:07:38 -08:00
Andreas Cord-Landwehr
9bd5bfb356 u-boot-nezha: Refresh 0001-sun20i-set-CONFIG_SYS_BOOTM_LEN.patch 2023-01-08 08:07:38 -08:00
Andreas Cord-Landwehr
7b708ba969 u-boot-nezha: Switch u-boot-spl to mainline format 2023-01-08 08:07:38 -08:00
Yu Chien Peter Lin
363d3021de u-boot: Add patch for OpenSBI fdt driver support
Add 2 patches from mainline U-boot to use with fdt drivers of
OpenSBI.

Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>
2022-11-07 08:18:07 -08:00
Yu Chien Peter Lin
1ae57fa3fd u-boot: ae350-ax45mp: Add patch for fdt start address alignment
If start address ($a1) is not 8-byte aligned, the system will hang in
fw_platform_init where OpenSBI starts to parse fdt, thus need this patch
to adjust the address in SPL.

Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>
2022-11-07 08:18:07 -08:00
Yu Chien Peter Lin
680760f703 u-boot: ae350-ax45mp: Add display info config fragment
Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>
2022-11-07 08:18:07 -08:00
Yu Chien Peter Lin
13e8b5f249 opensbi: Specify the OpenSBI revision for Andes AE350
OE-Core is using OpenSBI tag v1.1, this revision is based to v1.1 while
includes fdt driver support for AE350 platform so it can use with the
latest device tree provided by Andes Linux kernel 6.0.

Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>
2022-11-07 08:18:07 -08:00
Yu Chien Peter Lin
82318d6161 u-boot: Drop patches for ae350-ax45mp
ae350-ax45mp was using U-boot v2022.07 with the applied patches:
- (f4512618caa0) riscv: ae350: Fix XIP config boot failure
- (aa0eda17cf98) spl: opensbi: convert scratch options to config

Since OE-Core U-boot has upgraded to v2022.10 which includes both
patches so we can drop them.

Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>
2022-10-31 08:17:14 -07:00
Khem Raj
b5de81a229 u-boot-starfive: Build outside source tree
u-boot common files set O=.. option for make which actually
sets KBUILD_SRC, which triggers a step in u-boot system called
prepare3. This step checks if make has been run inside sourcedir
and since we are setting O=${B} and B is set to S, it has run
inside S during do_configure, so do_compile fails to build e.g.

|   /mnt/b/yoe/master/build/tmp/work/visionfive-yoe-linux/u-boot-starfive/v2021.04-r0/git is not clean, please run 'make mrproper'
|   in the '/mnt/b/yoe/master/build/tmp/work/visionfive-yoe-linux/u-boot-starfive/v2021.04-r0/git' directory.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-10-10 22:36:40 -07:00
Khem Raj
c5f397f37e u-boot: Add opensbi do_deploy dep only for machines with opensbi
This is a generic bbappend and opensbi is riscv specific, so this causes
problems when this layer is includes and a build is done for non-riscv
machines e.g.

    MACHINE=qemumips bitbake -n world

will show the problem

ERROR: Nothing PROVIDES 'opensbi'
opensbi was skipped: incompatible with host mips-yoe-linux-musl (not in COMPATIBLE_HOST)
NOTE: Runtime target 'u-boot-default-env' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['u-boot-default-env', 'opensbi']
ERROR: Required build target 'meta-world-pkgdata' has no buildable providers.
Missing or unbuildable dependency chain was: ['meta-world-pkgdata', 'libubootenv', 'u-boot-default-env', 'opensbi']

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-09-15 07:26:38 -07:00
Matheus Castello
b19530f12d u-boot: nezha: Override the u-boot LIC_FILES_CHKSUM
The LIC_FILES_CHKSUM md5sum changed with the latest mainline u-boot
release. So manually specify the original md5sum value.

Signed-off-by: Matheus Castello <matheus@castello.eng.br>
2022-09-10 20:15:30 -07:00
Khem Raj
7955f4ad47 u-boot-starfive: Update the branch name for beagleV
Fixes Issue #355

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-08-22 18:51:48 -07:00
Yu Chien Peter Lin
843c4a5e93 u-boot: add and patches for ae350-ax45mp
Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>
2022-08-15 08:56:10 -07:00
Alistair Francis
f016e25636 u-boot: starfive_v2021.04: Override the u-boot LIC_FILES_CHKSUM
The LIC_FILES_CHKSUM md5sum changed with the latest mainline u-boot
release, but hasn't changed for the older starfive release. So manually
specify the original md5sum value.

Resolves: https://github.com/riscv/meta-riscv/issues/350
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2022-08-07 19:13:47 -07:00
Richard Purdie
d16bc5a3f2 visionfive: Add initial support for Starfive Visionfive board
This is largely based on the beaglev code nbut tweaked to work with current
starfive kernel repositories and tweak to the board.

The kernel and rootfs boot with working network and graphics. The u-boot
binary builds but is as yet untested.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-07-05 07:09:47 -04:00
Khem Raj
be67b6968f u-boot-starfive: Use https protocol for github SRC_URI
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-04-11 17:22:07 -07:00
Khem Raj
669dc64f10 boot0: Pin to nezha-allwinner-d1
its not interesting for other machines yet

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-03-31 07:59:33 -07:00
Cezary Sobczak
c3966f6d9c u-boot-nezha: add patch which fix build with binutils 2.28
Signed-off-by: Cezary Sobczak <cezary.sobczak@3mdeb.com>
2022-03-30 18:54:52 -07:00
Cezary Sobczak
3b2a050de6 u-boot-nezha: add patch which increase the CONFIF_SYS_BOOTM_LEN
If this value is not increased, the error occurs during loading uncompressed
kernel from fitImage:
"Error: inflate() returned -5
Image too large: increase CONFIG_SYS_BOOTM_LEN"

Signed-off-by: Cezary Sobczak <cezary.sobczak@3mdeb.com>
2022-03-30 18:54:52 -07:00
Cezary Sobczak
2e545ae6cc toc.cfg: add configuration file of TOC1 U-Boot image
Signed-off-by: Cezary Sobczak <cezary.sobczak@3mdeb.com>
2022-03-30 18:54:52 -07:00
Cezary Sobczak
863373eae4 uEnv-nezha.txt: U-Boot bootargs for Nezha board
Signed-off-by: Cezary Sobczak <cezary.sobczak@3mdeb.com>
2022-03-30 18:54:52 -07:00
Cezary Sobczak
4238405756 u-boot-nezha: add recipe with patches for Nezha board
Signed-off-by: Cezary Sobczak <cezary.sobczak@3mdeb.com>
2022-03-30 18:54:52 -07:00
Cezary Sobczak
03bcb870e7 opensbi: add patches for Nezha board
Signed-off-by: Cezary Sobczak <cezary.sobczak@3mdeb.com>
2022-03-30 18:54:52 -07:00
Cezary Sobczak
ff5e85cb6f opensbi: update mainline with patches to fit Nezha board
Signed-off-by: Cezary Sobczak <cezary.sobczak@3mdeb.com>
2022-03-30 18:54:52 -07:00
Cezary Sobczak
94a8a881a0 boot0: add patch which fix build with binutils 2.28
Signed-off-by: Cezary Sobczak <cezary.sobczak@3mdeb.com>
2022-03-30 18:54:52 -07:00
Cezary Sobczak
0d1c2fb125 boot0: add patch for Makefile to fit it with yocto build environment
Signed-off-by: Cezary Sobczak <cezary.sobczak@3mdeb.com>
2022-03-30 18:54:52 -07:00
Cezary Sobczak
6192951a50 boot0: add recipe of the Nezha SPL
Signed-off-by: Cezary Sobczak <cezary.sobczak@3mdeb.com>
2022-03-30 18:54:52 -07:00
Khem Raj
2392e1f99d recipes: Convert to newer override syntax
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-08-04 23:14:25 -07:00
Khem Raj
5a3ff76ae5 meta-riscv: Convert to new override syntax
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-08-04 23:14:25 -07:00
Alistair Francis
f93cce53b7 recipes-bsp/opensbi: Drop the BeagleV patch
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2021-06-07 16:40:56 -07:00
Alistair Francis
9679cdd2c8 recipes-bsp/u-boot: Switch back to starfive u-boot
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2021-06-07 16:40:56 -07:00
Alistair Francis
acc633ec4b beaglev: opensbi: Use mainilne OpenSBI
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2021-06-01 19:46:28 -07:00
Khem Raj
83fc7164d7 u-boot-starfive: Move to Fedora_VIC_7100_2021.04 branch
Fedora is rename to this new name
Update to tip of branch while here

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-05-26 16:10:06 -07:00