From e28bad99e922e6e17a1ff76aab28f3e9fdee7a14 Mon Sep 17 00:00:00 2001 From: Alistair Francis Date: Thu, 29 Nov 2018 13:00:15 -0800 Subject: [PATCH] recipes-kernel: Add support for 32-bit builds Signed-off-by: Alistair Francis --- recipes-kernel/linux/files/32bit.cfg | 14 ++++++++++++++ recipes-kernel/linux/linux-riscv-common.inc | 3 +++ 2 files changed, 17 insertions(+) create mode 100644 recipes-kernel/linux/files/32bit.cfg diff --git a/recipes-kernel/linux/files/32bit.cfg b/recipes-kernel/linux/files/32bit.cfg new file mode 100644 index 0000000..fa8a9fd --- /dev/null +++ b/recipes-kernel/linux/files/32bit.cfg @@ -0,0 +1,14 @@ +CONFIG_32BIT=y +CONFIG_PAGE_OFFSET=0xC0000000 +CONFIG_PGTABLE_LEVELS=2 +CONFIG_ARCH_RV32I=y +# CONFIG_ARCH_RV64I is not set +CONFIG_MAXPHYSMEM_2GB=y +CONFIG_LBDAF=y +# CONFIG_SCSI_NSP32 is not set +CONFIG_GENERIC_ATOMIC64=y +CONFIG_GENERIC_LIB_ASHLDI3=y +CONFIG_GENERIC_LIB_ASHRDI3=y +CONFIG_GENERIC_LIB_LSHRDI3=y +CONFIG_GENERIC_LIB_UCMPDI2=y +CONFIG_GENERIC_LIB_UMODDI3=y diff --git a/recipes-kernel/linux/linux-riscv-common.inc b/recipes-kernel/linux/linux-riscv-common.inc index 1cba04a..eba81cc 100644 --- a/recipes-kernel/linux/linux-riscv-common.inc +++ b/recipes-kernel/linux/linux-riscv-common.inc @@ -17,6 +17,9 @@ SRC_URI_append_freedom-u540 = " file://defconfig \ file://0001-risc-v-Fix-issue-ignoring-CONFIG_CMDLINE_OVERRIDE.patch \ " +SRC_URI_append_qemuriscv32 = " file://32bit.cfg \ + " + LINUX_VERSION_EXTENSION = "-riscv" PV = "${LINUX_VERSION}+git${SRCPV}"