Commit Graph

72 Commits

Author SHA1 Message Date
Alistair Francis
f71a0efe94 machine: qemuriscv32: Add the Xvisor platform
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2020-02-12 12:24:01 -08:00
Alistair Francis
b4ec1d4780 linux: Update bbappends for qemuriscv32
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2020-02-03 19:51:05 -08:00
Khem Raj
c95f5d9d17 qemuriscv32: Use linux-yocto-dev for now
Latest glibc wants kernel 5.4+ ABI and linux-yocto is still at 5.2, so
until that switches to 5.4 lets pin to dev kernel which is 5.5+

Fixes #199

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-01-24 17:14:32 -08:00
Alistair Francis
7cbf8f7121 machine/baremetal: Cleanup the baremetal code
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2019-12-03 12:09:11 -08:00
Alistair Francis
a501ae452a openocd: Use the RISC-V fork
We currently need the RISC-V fork of OpenOCD.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2019-11-12 19:17:37 -08:00
Alistair Francis
0ba537b927 u-boot: Update to 2019.10 and remove uneeded patches
Now that we are using U-Boot 2019.10 let's remove the uneeded patches
that have been merged into mainline u-boot.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2019-10-21 01:24:44 +05:30
Alistair Francis
99cdf8d0cf machine/qemuriscv32: Remove device loader
Now that we are using QEMU 4.1 we can use QEMU's -bios option and
-kernel option and remove the device loader.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2019-08-23 07:33:03 -07:00
Alistair Francis
cb0857efe5 freedom-u540: Use fitImage
Let's swap to using a fitImage by default. At the same time let's update
the u-boot boot commands to handle all the image types and support
loading a uEnv.txt file.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2019-07-25 15:19:43 -07:00
Ricardo Salveti
213de15b97 freedom-u540: prefer += instead of append for IMAGE_FSTYPES
Append causes IMAGE_FSTYPES to contaminate initramfs-based images, as
even when forcing it to be empty at the recipe level, it always shows up
after parsing.

Using += allows the recipe to set another value without being influenced
by the machine configuration.

Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2019-07-25 00:55:51 -07:00
Ricardo Salveti
311ab1a78f freedom-u540: set UBOOT_DTB_LOADADDRESS
Based on the default u-boot machine configuration, useful for fitImage
support (known address for loading the device-tree).

Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2019-07-24 11:50:56 -07:00
Alistair Francis
7f90dea34e u-boot: Update the boot script to fall back to MMC load
Update the u-boot boot script to try a TFTP load first and if that fails
fall back to an MMC load.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2019-07-10 09:43:38 -07:00
Alistair Francis
76f72ba89d freedom-u540.conf: Set the RISCV_SBI_FDT based on the kernel DTB
The Linux kernel 5.2 does not work with the device tree included in the
HiFive Unleashed firmware. To allow the kernel to boot let's build the
kernel's device tree into OpenSBI by default.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2019-07-10 09:37:34 -07:00
Alistair Francis
bdde094e02 freedom-u540.conf: Include OpenSBI on boot partition
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2019-07-09 14:22:59 -07:00
Alistair Francis
6f816dda30 freedom-u540.conf: Include boot.scr.uimg in the boot partition
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2019-07-09 14:22:59 -07:00
Alistair Francis
05425ec9f7 freedom-u540.conf: Use double # for comments
We are about to add commented out lines as well as comments, which can
be confusing to read. To clear it up a bit let's add doubl # lines for
real comments.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2019-07-09 14:22:59 -07:00
Alistair Francis
94ff1c259f conf/machine: Update with qemuriscv64 in OE-Core
Now that the qemuriscv64 machine is in OE-Core let's update the
meta-riscv layer to use that.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2019-06-24 19:15:08 -07:00
Alistair Francis
75d2ecbe9a u-boot: Fix UBOOT_ENTRYPOINT variable setting
Ensure that UBOOT_ENTRYPOINT is set correctly for the HiFive Unleased.

This patch also includes a small change that removes the incorrect and
unneeded arch option when using mkimage to create the boot script.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2019-06-24 19:14:51 -07:00
Alistair Francis
4157f3e012 gdb: Remove the RISC-V GDB
Now that GDB 8.3 has been merged into the meta layer we no longer need a
custom GDB version.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2019-05-21 09:29:33 -07:00
Alistair Francis
e3e7f75961 linux: Update to 5.1 stable
This patch does the following:
 - Update the current linux-mainline_5.1 recipe to AUTOREV from the
   stable branch
 - Use the linux-mainline_5.1 by default for the HiFive Unleashed
 - Remove the older linux-riscv_5.0 recipe
 - Rename the common include to linux-mainline-common.inc

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2019-05-07 11:54:29 -07:00
Alistair Francis
9e781551e5 freedom-u540: Setup u-boot autoboot for TFTP
This patch does two things:
 - Patches u-boot to set the server ip by default
   - When u-boot has SD/MMC support we should remove this patch and
     instead set enviroment variables from uEnv.txt

 - Adds a tftp-boot.txt file
   - This file is built into a boot.src.uimg file which should then be
     copied to the TFTP directory. This file should be used by those who
     are intereted in u-boot autobooting from TFTP.
   - In the future a seperate boot file can be added allowing autoboot
     from the SD card

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2019-04-22 15:37:08 -07:00
Alistair Francis
ce7cce91e8 freedom-u540: Allow u-boot to be an OpenSBI payload
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2019-04-22 15:37:08 -07:00
Alistair Francis
ef0189f2d8 wic: Update the sdcard generation
Update the SD card generation to follow a more standard sdcard boot
flow. At the moment we don't use this new boot flow, but let's at least
have it ready for future use.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2019-04-22 15:37:08 -07:00
Alistair Francis
bf5b279c3d freedom-u540: Don't hardcode linux-version
Don't hardcode the Linux version to make it easier to overwrite the
Linux provider. There is only one linux-riscv version so it is not
required.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2019-04-16 20:46:17 -07:00
Alistair Francis
d77546d36e qemuriscv: Allow overriding RISCV_SBI_PLAT
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2019-04-10 11:16:42 -07:00
Chin Huat Ang
014066d318 qemuriscv.inc: use ttyS0 as serial console
Fix /etc/inittab issue seen when running "runqemu nographic serial":

  INIT: Id "AMA0" respawning too fast: disabled for 5 minutes

Signed-off-by: Chin Huat Ang <chinhuat@gmail.com>
2019-03-26 11:17:51 -07:00
Khem Raj
ddbc816c35 freedom-u540.conf: set console to ttySIF0
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-03-21 09:06:06 -07:00
Alistair Francis
41ef243e31 qemuriscv: Add the virtio-rng device to pass entropy to the guest
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2019-03-14 19:34:26 -07:00
Alistair Francis
b7a47b47b5 machine: qemuriscv: Update the serial consoles
Update the serial console settings to be more supportive of running QEMU
ptests.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2019-03-14 19:34:26 -07:00
Alistair Francis
fbfab7fbaf qemuriscv: Enable earlycon via SBI
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2019-03-07 20:23:00 -08:00
Alistair Francis
f28b3cfb9a qemuriscv: Enable OpenSBI by default for booting
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2019-03-07 20:23:00 -08:00
Alistair Francis
3ee1f8f2d4 qemuriscv: Bump kernel versions to work with OpenSBI
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2019-03-07 20:23:00 -08:00
Alistair Francis
6cbef3699d freedom-u540: Enable OpenSBI by default for booting
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2019-03-04 18:21:38 -08:00
Alistair Francis
d6e7e6f7db recipes-kernel: linux-riscv: Update to 5.0 release
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2019-03-04 18:21:38 -08:00
Alistair Francis
14d0ed47db baremetal-riscv: Remove BBL
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2019-02-24 08:17:19 -08:00
Alistair Francis
1eb9df95db Revert "qemuriscv64.conf: Pin to linux-riscv again"
This reverts commit 7b7e2dbc51.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2019-01-24 21:02:05 -05:00
Khem Raj
7b7e2dbc51 qemuriscv64.conf: Pin to linux-riscv again
linux-yocto hangs before it reaches console, until that is
fixed we can not switch

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-01-20 14:12:21 -08:00
Alistair Francis
e253804993 qemuriscv64: Don't use the linux-riscv kernel
Default to the mainline 4.19 kernel for the 64-bit QEMU machine.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2019-01-14 10:15:52 -08:00
Alistair Francis
9c2038912a machine: qemuriscv: Don't set TCLIBC
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2018-12-17 09:48:19 -08:00
Alistair Francis
8fe85e46f4 machine: freedom-u540: Don't set TCLIBC
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2018-12-17 09:48:19 -08:00
sungwon.pino
7a3af75462 qemu : Usermode fails with invalid instruction error (for riscv32)
- backport for riscv32 arch
- Usermode fails with invalid instruction error (for riscv32)

Signed-off-by: pino-kim <sungwon.pino@gmail.com>
2018-12-13 09:38:57 -08:00
Alistair Francis
15e827879d machine: Rename the baremetal machines
The baremetal machines can't be built as bitbake complains about
riscv32/riscv64 being included twice in the PACKAGE_ARCH variable. To
fix this rename the machines to be different from the architecture.

Also remove the QEMU overrides as these are no longer required.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2018-12-07 14:46:16 -08:00
Alistair Francis
51ebe0bf47 qemuriscv32: Add support for a 32-bit machine
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2018-11-29 18:57:44 -08:00
Alistair Francis
1b9c91908b u-boot: Remove RISC-V specific version
Now that u-boot 2018.11 is supported in Yocto we no longer need custom
options for RISC-V support.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2018-11-29 13:41:33 -08:00
Khem Raj
4f4e1753d4 qemuriscv64.conf: Do not define hvc0 serial console
This fixes double prints on qemu console

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-11-14 21:15:20 -08:00
Alistair Francis
c84c026c94 machines: Use the 4.19 kernel by default
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2018-11-05 18:57:51 -07:00
Khem Raj
42308e5d34 qemuriscv64: Express u-boot bootloader choice
In a multi-BSP env u-boot may be provided by other BSP layers as well so
we need to be explicit about u-boot we need

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-10-27 05:13:46 +01:00
Alistair Francis
b6bab303c5 qemuriscv64: Add support for building u-boot
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2018-09-25 11:39:18 -07:00
Khem Raj
9d71c72b43 qemuriscv64.conf,freedom-u540.conf: Pin default libc to glibc
musl is not yet supported
Additionally sync with qemu invocation definitions from OE-Core qemus

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-09-22 07:27:03 -07:00
Khem Raj
b7526a3e22 risc-v: Fix packagegroup dependencies for no clang
clang is not yet supported and when meta-clang is in
layermix things start to fail.

This patch patches by assuming the dependencies
and later adding them to bad recommendations so
they are dropped from runtime deps too

might not work with with dpkg backend

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-08-29 18:08:30 -07:00
Alistair Francis
552526019d machine: Build an EXT4 rootFS image
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2018-08-27 11:32:03 -07:00