[Buildroot] [PATCH v2 0/6] Add RISC-V 64-bit architecture support

Mark Corbin mark.corbin at embecosm.com
Wed Sep 12 10:22:50 UTC 2018


This patch set adds support for the RISC-V 64-bit architecture.

Full RISC-V support is not expected in the upstream kernel until
the 4.19 release. As a result the ability to select custom toolchain
headers has been added. This allows a RISC-V toolchain to be built
against kernel headers from a git repository without having to build
a kernel.

A new method for overriding the BR2_GCC_TARGET_* settings has been
added. These variables are copied to corresponding GCC_TARGET_*
variables which may then be modified using architecture specific
makefiles (arch/arch.mk.<arch>). This allows a custom architecture
string to be built for the RISC-V from the various optional ISA
extensions. All package makefiles that were using the BR2_GCC_TARGET_*
variables have been updated to use the GCC_TARGET_* versions. Any new
makefiles must use the new variables.

The default glibc library paths for RISC-V are /lib64/<abi> and
/usr/lib64/<abi>. An architecture specific patch has been applied
to glibc.mk to override these settings and allow shared libraries to
be located by packages at runtime.

The riscv-pk (Proxy Kernel) package has been added to provide the
Berkeley Boot Loader (BBL) for booting RISC-V kernels.

A new defconfig has been added which can build a qemu-bootable
RISC-V 64-bit system.

Mark Corbin (6):
  linux: add hash file
  package/linux-headers: add support for custom headers
  arch: allow GCC target options to be optionally overwritten
  arch: add support for RISC-V 64-bit (riscv64) architecture
  boot/riscv-pk: add bootloader for RISC-V architecture
  configs/qemu: add qemu_riscv64_virt_defconfig

 DEVELOPERS                                    |   7 ++
 Makefile                                      |   5 +-
 arch/Config.in                                |  15 +++
 arch/Config.in.riscv                          | 104 ++++++++++++++++++
 arch/arch.mk                                  |  17 +++
 arch/arch.mk.riscv                            |  30 +++++
 board/qemu/riscv64-virt/linux.config          |  23 ++++
 board/qemu/riscv64-virt/readme.txt            |   7 ++
 boot/Config.in                                |   1 +
 boot/riscv-pk/Config.in                       |  13 +++
 boot/riscv-pk/riscv-pk.mk                     |  33 ++++++
 configs/qemu_riscv64_virt_defconfig           |  24 ++++
 linux/linux.hash                              |   9 ++
 package/binutils/Config.in.host               |   2 +
 package/ffmpeg/ffmpeg.mk                      |   8 +-
 package/freerdp/freerdp.mk                    |   2 +-
 package/gcc/gcc.mk                            |  27 ++---
 package/glibc/glibc.mk                        |  30 +++--
 package/kodi/kodi.mk                          |   2 +-
 package/kvm-unit-tests/kvm-unit-tests.mk      |   2 +-
 package/linux-headers/Config.in.host          |  45 +++++++-
 package/linux-headers/linux-headers.hash      |   1 +
 package/linux-headers/linux-headers.mk        |  94 +++++++++-------
 package/meson/meson.mk                        |   2 +-
 package/nodejs/nodejs.mk                      |   2 +-
 package/tvheadend/tvheadend.mk                |   2 +-
 package/valgrind/valgrind.mk                  |   2 +-
 toolchain/toolchain-buildroot/Config.in       |   6 +-
 .../pkg-toolchain-external.mk                 |  22 ++--
 29 files changed, 447 insertions(+), 90 deletions(-)
 create mode 100644 arch/Config.in.riscv
 create mode 100644 arch/arch.mk
 create mode 100644 arch/arch.mk.riscv
 create mode 100644 board/qemu/riscv64-virt/linux.config
 create mode 100644 board/qemu/riscv64-virt/readme.txt
 create mode 100644 boot/riscv-pk/Config.in
 create mode 100644 boot/riscv-pk/riscv-pk.mk
 create mode 100644 configs/qemu_riscv64_virt_defconfig
 create mode 100644 linux/linux.hash
 create mode 120000 package/linux-headers/linux-headers.hash

-- 
2.17.1



More information about the buildroot mailing list