mbox series

[v2,0/4] Add RISC-V 32 NOMMU support

Message ID 20221217051337.3778405-1-Mr.Bossman075@gmail.com
Headers show
Series Add RISC-V 32 NOMMU support | expand

Message

Jesse T Dec. 17, 2022, 5:13 a.m. UTC
This patch-set aims to add NOMMU support to RV32.
Many people want to build simple emulators or HDL
models of RISC-V this patch makes it posible to
run linux on them.

Yimin Gu is the original author of this set.
Submitted here:
https://lists.buildroot.org/pipermail/buildroot/2022-November/656134.html

Though Jesse T made the configs more concise.
Aswell fixed the 1k line Dconf,
and split into 3 distinct patches.

A couple things to note:
- UcLibc seems to want __ARCH_WANT_TIME32_SYSCALLS
for adjtimex, but Linux doesnt provide this for RV32.
- Patch 2 adds __ARCH_WANT_STAT64,
but I'm not sure if this is needed.
- Busybox doesnt build umask or unset for NOMMU systems.
I have seen this happen on STM32 aswell as I.MXRT

[__ARCH_WANT_TIME32_SYSCALLS]:
https://patchwork.kernel.org/project/linux-arm-kernel/patch/20190218210712.3503891-5-arnd@arndb.de/

Jesse Taube (1):
  configs/qemu_riscv32_nommu_virt_defconfig: New defconfig

Yimin Gu (3):
  package/elf2flt: add RISC-V 32-bits support
  package/uclibc: Add RISC-V 32-bit support
  arch: Enable support for RISC-V 32-bit NOMMU

 arch/Config.in.riscv                          |   2 -
 board/qemu/riscv32-virt/nommu/defconfig       |  16 ++
 .../riscv32-virt/nommu/patches/linux-headers  |   1 +
 ...nfig-Allow-RV32-to-build-with-no-MMU.patch |  43 ++++++
 ...le-stat64-and-time32-for-RV32-uclibc.patch |  40 +++++
 board/qemu/riscv32-virt/readme.txt            |   6 +-
 configs/qemu_riscv32_nommu_virt_defconfig     |  31 ++++
 package/Makefile.in                           |   4 +-
 .../0007-Added-RISC-V-32-bit-support.patch    |  87 +++++++++++
 .../uclibc/0001-RISC-V-32-bit-support.patch   | 145 ++++++++++++++++++
 package/uclibc/Config.in                      |   2 +
 11 files changed, 372 insertions(+), 5 deletions(-)
 create mode 100644 board/qemu/riscv32-virt/nommu/defconfig
 create mode 120000 board/qemu/riscv32-virt/nommu/patches/linux-headers
 create mode 100644 board/qemu/riscv32-virt/nommu/patches/linux/6.0/0001-riscv-Kconfig-Allow-RV32-to-build-with-no-MMU.patch
 create mode 100644 board/qemu/riscv32-virt/nommu/patches/linux/6.0/0002-riscv-Enable-stat64-and-time32-for-RV32-uclibc.patch
 create mode 100644 configs/qemu_riscv32_nommu_virt_defconfig
 create mode 100644 package/elf2flt/0007-Added-RISC-V-32-bit-support.patch
 create mode 100644 package/uclibc/0001-RISC-V-32-bit-support.patch

Comments

Jesse T Jan. 8, 2023, 7:40 p.m. UTC | #1
Hi,

Peter Korsgaard would you be willing to review this set?

Thanks,
Jesse
On 12/17/22 00:13, Jesse Taube wrote:
> This patch-set aims to add NOMMU support to RV32.
> Many people want to build simple emulators or HDL
> models of RISC-V this patch makes it posible to
> run linux on them.
> 
> Yimin Gu is the original author of this set.
> Submitted here:
> https://lists.buildroot.org/pipermail/buildroot/2022-November/656134.html
> 
> Though Jesse T made the configs more concise.
> Aswell fixed the 1k line Dconf,
> and split into 3 distinct patches.
> 
> A couple things to note:
> - UcLibc seems to want __ARCH_WANT_TIME32_SYSCALLS
> for adjtimex, but Linux doesnt provide this for RV32.
> - Patch 2 adds __ARCH_WANT_STAT64,
> but I'm not sure if this is needed.
> - Busybox doesnt build umask or unset for NOMMU systems.
> I have seen this happen on STM32 aswell as I.MXRT
> 
> [__ARCH_WANT_TIME32_SYSCALLS]:
> https://patchwork.kernel.org/project/linux-arm-kernel/patch/20190218210712.3503891-5-arnd@arndb.de/
> 
> Jesse Taube (1):
>    configs/qemu_riscv32_nommu_virt_defconfig: New defconfig
> 
> Yimin Gu (3):
>    package/elf2flt: add RISC-V 32-bits support
>    package/uclibc: Add RISC-V 32-bit support
>    arch: Enable support for RISC-V 32-bit NOMMU
> 
>   arch/Config.in.riscv                          |   2 -
>   board/qemu/riscv32-virt/nommu/defconfig       |  16 ++
>   .../riscv32-virt/nommu/patches/linux-headers  |   1 +
>   ...nfig-Allow-RV32-to-build-with-no-MMU.patch |  43 ++++++
>   ...le-stat64-and-time32-for-RV32-uclibc.patch |  40 +++++
>   board/qemu/riscv32-virt/readme.txt            |   6 +-
>   configs/qemu_riscv32_nommu_virt_defconfig     |  31 ++++
>   package/Makefile.in                           |   4 +-
>   .../0007-Added-RISC-V-32-bit-support.patch    |  87 +++++++++++
>   .../uclibc/0001-RISC-V-32-bit-support.patch   | 145 ++++++++++++++++++
>   package/uclibc/Config.in                      |   2 +
>   11 files changed, 372 insertions(+), 5 deletions(-)
>   create mode 100644 board/qemu/riscv32-virt/nommu/defconfig
>   create mode 120000 board/qemu/riscv32-virt/nommu/patches/linux-headers
>   create mode 100644 board/qemu/riscv32-virt/nommu/patches/linux/6.0/0001-riscv-Kconfig-Allow-RV32-to-build-with-no-MMU.patch
>   create mode 100644 board/qemu/riscv32-virt/nommu/patches/linux/6.0/0002-riscv-Enable-stat64-and-time32-for-RV32-uclibc.patch
>   create mode 100644 configs/qemu_riscv32_nommu_virt_defconfig
>   create mode 100644 package/elf2flt/0007-Added-RISC-V-32-bit-support.patch
>   create mode 100644 package/uclibc/0001-RISC-V-32-bit-support.patch
>
Jesse T Feb. 12, 2023, 8:59 p.m. UTC | #2
Any updates on this set?

On 12/17/22 00:13, Jesse Taube wrote:
> This patch-set aims to add NOMMU support to RV32.
> Many people want to build simple emulators or HDL
> models of RISC-V this patch makes it posible to
> run linux on them.
> 
> Yimin Gu is the original author of this set.
> Submitted here:
> https://lists.buildroot.org/pipermail/buildroot/2022-November/656134.html
> 
> Though Jesse T made the configs more concise.
> Aswell fixed the 1k line Dconf,
> and split into 3 distinct patches.
> 
> A couple things to note:
> - UcLibc seems to want __ARCH_WANT_TIME32_SYSCALLS
> for adjtimex, but Linux doesnt provide this for RV32.
> - Patch 2 adds __ARCH_WANT_STAT64,
> but I'm not sure if this is needed.
> - Busybox doesnt build umask or unset for NOMMU systems.
> I have seen this happen on STM32 aswell as I.MXRT
> 
> [__ARCH_WANT_TIME32_SYSCALLS]:
> https://patchwork.kernel.org/project/linux-arm-kernel/patch/20190218210712.3503891-5-arnd@arndb.de/
> 
> Jesse Taube (1):
>    configs/qemu_riscv32_nommu_virt_defconfig: New defconfig
> 
> Yimin Gu (3):
>    package/elf2flt: add RISC-V 32-bits support
>    package/uclibc: Add RISC-V 32-bit support
>    arch: Enable support for RISC-V 32-bit NOMMU
> 
>   arch/Config.in.riscv                          |   2 -
>   board/qemu/riscv32-virt/nommu/defconfig       |  16 ++
>   .../riscv32-virt/nommu/patches/linux-headers  |   1 +
>   ...nfig-Allow-RV32-to-build-with-no-MMU.patch |  43 ++++++
>   ...le-stat64-and-time32-for-RV32-uclibc.patch |  40 +++++
>   board/qemu/riscv32-virt/readme.txt            |   6 +-
>   configs/qemu_riscv32_nommu_virt_defconfig     |  31 ++++
>   package/Makefile.in                           |   4 +-
>   .../0007-Added-RISC-V-32-bit-support.patch    |  87 +++++++++++
>   .../uclibc/0001-RISC-V-32-bit-support.patch   | 145 ++++++++++++++++++
>   package/uclibc/Config.in                      |   2 +
>   11 files changed, 372 insertions(+), 5 deletions(-)
>   create mode 100644 board/qemu/riscv32-virt/nommu/defconfig
>   create mode 120000 board/qemu/riscv32-virt/nommu/patches/linux-headers
>   create mode 100644 board/qemu/riscv32-virt/nommu/patches/linux/6.0/0001-riscv-Kconfig-Allow-RV32-to-build-with-no-MMU.patch
>   create mode 100644 board/qemu/riscv32-virt/nommu/patches/linux/6.0/0002-riscv-Enable-stat64-and-time32-for-RV32-uclibc.patch
>   create mode 100644 configs/qemu_riscv32_nommu_virt_defconfig
>   create mode 100644 package/elf2flt/0007-Added-RISC-V-32-bit-support.patch
>   create mode 100644 package/uclibc/0001-RISC-V-32-bit-support.patch
>