RISC-V Proxy Kernel
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
1.0 KiB

# See LICENSE for license details.
AC_ARG_ENABLE([logo], AS_HELP_STRING([--enable-logo], [Enable boot logo]))
AS_IF([test "x$enable_logo" = "xyes"], [
AC_SUBST([BBL_ENABLE_LOGO], 1)
AC_DEFINE([PK_ENABLE_LOGO],,[Define if the RISC-V logo is to be displayed])
])
AC_ARG_WITH([payload], AS_HELP_STRING([--with-payload], [Set ELF payload for bbl]),
RISC-V: Support separate firmware and kernel payload Support for separate firmware and kernel payload is added by updating BBL to read optional preloaded kernel address attributes from device-tree using a similar mechanism to that used to pass init ramdisk addresses to linux kernel. chosen { riscv,kernel-start = <0x00000000 0x80200000>; riscv,kernel-end = <0x00000000 0x80590634>; }; These attributes are added by QEMU and read by BBL when combining -bios <firmware-image> and -kernel <kernel-image> options. e.g. $ qemu-system-riscv64 -machine virt -bios bbl -kernel vmlinux With this change, bbl can be compiled without --with-payload and the dummy payload alignment is altered to make the memory footprint of the firmware-only bbl smaller. The dummy payload message is updated to indicate the alternative load method. This load method could also be supported by a first stage boot loader that reads seperate firmware and kernel from SPI flash. The main advantage of this new mechanism is that it eases kernel development by avoiding the riscv-pk packaging step after kernel builds, makes building per repository artefacts for CI simpler, and mimics bootloaders on other platforms that can load a kernel image file directly. Ultimately BBL should use an SPI driver to load the kernel image however this mechanism supports use cases such such as QEMU's -bios, -kernel and -initrd options following examples from other platforms that pass kernel entry to firmware via device-tree. Cc: Palmer Dabbelt <palmer@sifive.com> Cc: Alistair Francis <Alistair.Francis@wdc.com> Signed-off-by: Michael Clark <mjc@sifive.com>
8 years ago
[
AC_SUBST([BBL_PAYLOAD], $with_payload, [Kernel payload for bbl])
AC_DEFINE(RELAXED_ALIGNMENT,[0],[Use relaxed payload alignment])
], [
AC_SUBST([BBL_PAYLOAD], [dummy_payload], [Kernel payload for bbl])
AC_DEFINE(RELAXED_ALIGNMENT,[1],[Use relaxed payload alignment])
])
AC_ARG_WITH([logo], AS_HELP_STRING([--with-logo], [Specify a better logo]),
[AC_SUBST([BBL_LOGO_FILE], $with_logo, [Logo for bbl])],
[AC_SUBST([BBL_LOGO_FILE], [riscv_logo.txt], [Logo for bbl])])
AC_ARG_ENABLE([boot-machine], AS_HELP_STRING([--enable-boot-machine], [Run payload in machine mode]))
AS_IF([test "x$enable_boot_machine" = "xyes"], [
AC_DEFINE([BBL_BOOT_MACHINE],,[Define to run payload in machine mode])
])