board/andes: rearrange nds32 folder structure
PATCH 1/2 board/andes: rearrange nds32 folder structure
---
.../patches/linux/0001-nds32-Fix-boot-messages-garbled.patch | 0
board/andes/{ => ae3xx}/readme.txt | 0
configs/andes_ae3xx_defconfig | 2 +-
3 files changed, 1 insertion(+), 1 deletion(-)
rename board/andes/{ => ae3xx}/patches/linux/0001-nds32-Fix-boot-messages-garbled.patch (100%)
rename board/andes/{ => ae3xx}/readme.txt (100%)board/andes/ae3xx/patches/linux/0001-nds32-Fix-boot-messages-garbled.patch renamed from board/andes/patches/linux/0001-nds32-Fix-boot-messages-garbled.patch +0 -0
board/andes/ae3xx/readme.txt renamed from board/andes/readme.txt +0 -0
configs/andes_ae3xx_defconfig +1 -1
@@ -1,5 +1,5 @@ BR2_nds32=y -BR2_GLOBAL_PATCH_DIR="board/andes/patches/" +BR2_GLOBAL_PATCH_DIR="board/andes/ae3xx/patches" BR2_TOOLCHAIN_EXTERNAL=y BR2_TOOLCHAIN_EXTERNAL_ANDES_NDS32=y BR2_LINUX_KERNEL=y
Signature · 6 lines
2.17.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 2/2 board/andes/ae350: add support for Andes AE350
This patch provides defconfig and basic support for the Andes 45 series RISC-V architecture.
--- DEVELOPERS | 3 +- board/andes/ae350/ae350.dts | 274 ++ board/andes/ae350/boot.cmd | 3 + board/andes/ae350/genimage_sdcard.cfg | 29 + board/andes/ae350/linux.config.fragment | 2 + .../0001-Add-AE350-platform-defconfig.patch | 158 + ...002-Andes-support-for-Faraday-ATCMAC.patch | 510 +++ .../0003-Andes-support-for-ATCDMAC.patch | 3301 +++++++++++++++++ .../linux/0004-Andes-support-for-FTSDC.patch | 1884 ++++++++++ ...5-Non-cacheability-and-Cache-support.patch | 1132 ++++++ ...-Add-andes-sbi-call-vendor-extension.patch | 231 ++ ...e-update-function-local_flush_tlb_al.patch | 101 + ...rt-time32-stat64-sys_clone3-syscalls.patch | 47 + .../0009-dma-Support-smp-up-with-dma.patch | 120 + ...ix-atcdmac300-chained-irq-mapping-is.patch | 300 ++ .../linux/0011-DMA-Add-msb-bit-patch.patch | 387 ++ .../0012-Remove-unused-Andes-SBI-call.patch | 147 + ...isable-PIC-explicitly-for-assembling.patch | 29 + ...2-Enable-cache-for-opensbi-jump-mode.patch | 25 + ...001-Fix-mmc-no-partition-table-error.patch | 27 + ...2-Prevent-fw_dynamic-from-relocation.patch | 27 + ...0003-Fix-u-boot-proper-booting-issue.patch | 26 + ...04-Enable-printing-OpenSBI-boot-logo.patch | 25 + board/andes/ae350/readme.txt | 66 + board/andes/ae350/uboot.config.fragment | 5 + configs/ae350_andestar45_defconfig | 46 + 26 files changed, 8904 insertions(+), 1 deletion(-) create mode 100755 board/andes/ae350/ae350.dts create mode 100644 board/andes/ae350/boot.cmd create mode 100644 board/andes/ae350/genimage_sdcard.cfg create mode 100644 board/andes/ae350/linux.config.fragment create mode 100644 board/andes/ae350/patches/linux/0001-Add-AE350-platform-defconfig.patch create mode 100644 board/andes/ae350/patches/linux/0002-Andes-support-for-Faraday-ATCMAC.patch create mode 100644 board/andes/ae350/patches/linux/0003-Andes-support-for-ATCDMAC.patch create mode 100644 board/andes/ae350/patches/linux/0004-Andes-support-for-FTSDC.patch create mode 100644 board/andes/ae350/patches/linux/0005-Non-cacheability-and-Cache-support.patch create mode 100644 board/andes/ae350/patches/linux/0006-Add-andes-sbi-call-vendor-extension.patch create mode 100644 board/andes/ae350/patches/linux/0007-riscv-Porting-pte-update-function-local_flush_tlb_al.patch create mode 100644 board/andes/ae350/patches/linux/0008-Support-time32-stat64-sys_clone3-syscalls.patch create mode 100644 board/andes/ae350/patches/linux/0009-dma-Support-smp-up-with-dma.patch create mode 100644 board/andes/ae350/patches/linux/0010-riscv-platform-Fix-atcdmac300-chained-irq-mapping-is.patch create mode 100644 board/andes/ae350/patches/linux/0011-DMA-Add-msb-bit-patch.patch create mode 100644 board/andes/ae350/patches/linux/0012-Remove-unused-Andes-SBI-call.patch create mode 100644 board/andes/ae350/patches/opensbi/0001-Disable-PIC-explicitly-for-assembling.patch create mode 100644 board/andes/ae350/patches/opensbi/0002-Enable-cache-for-opensbi-jump-mode.patch create mode 100644 board/andes/ae350/patches/uboot/0001-Fix-mmc-no-partition-table-error.patch create mode 100644 board/andes/ae350/patches/uboot/0002-Prevent-fw_dynamic-from-relocation.patch create mode 100644 board/andes/ae350/patches/uboot/0003-Fix-u-boot-proper-booting-issue.patch create mode 100644 board/andes/ae350/patches/uboot/0004-Enable-printing-OpenSBI-boot-logo.patch create mode 100644 board/andes/ae350/readme.txt create mode 100644 board/andes/ae350/uboot.config.fragment create mode 100644 configs/ae350_andestar45_defconfig
DEVELOPERS +2 -1
@@ -2122,10 +2122,11 @@ N: Norbert Lange <[email protected]> F: package/systemd/ F: package/tcf-agent/ -N: Nylon Chen <[email protected]> +N: Yu Chien Peter Lin <[email protected]> F: arch/Config.in.nds32 F: board/andes F: configs/andes_ae3xx_defconfig +F: configs/ae350_andestar45_defconfig F: toolchain/toolchain-external/toolchain-external-andes-nds32/ N: Olaf Rempel <[email protected]>
board/andes/ae350/ae350.dts new file +274 -0
274 lines not on this page · raw message
board/andes/ae350/boot.cmd new file +3 -0
@@ -0,0 +1,3 @@ +setenv bootargs earlycon=sbi root=/dev/mmcblk0p2 rootwait +load mmc 0:1 0x600000 Image +booti 0x600000 - $fdtcontroladdr
board/andes/ae350/genimage_sdcard.cfg new file +29 -0
@@ -0,0 +1,29 @@ +image boot.vfat { + vfat { + files = { + "Image", + "boot.scr", + "u-boot-spl.bin", + "u-boot.itb", + "ae350.dtb", + } + } + size = 128M +} + +image sdcard.img { + hdimage { + gpt = true + } + + partition u-boot { + partition-type-uuid = ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type-uuid = 0fc63daf-8483-4772-8e79-3d69d8477de4 + image = "rootfs.ext4" + } +}
board/andes/ae350/linux.config.fragment new file +2 -0
@@ -0,0 +1,2 @@ +CONFIG_INITRAMFS_SOURCE="" +CONFIG_EFI_PARTITION=y
board/andes/ae350/patches/linux/0001-Add-AE350-platform-defconfig.patch new file +158 -0
158 lines not on this page · raw message
board/andes/ae350/patches/linux/0002-Andes-support-for-Faraday-ATCMAC.patch new file +510 -0
510 lines not on this page · raw message
board/andes/ae350/patches/linux/0003-Andes-support-for-ATCDMAC.patch new file +3301 -0
2,012 lines not on this page · raw message
board/andes/ae350/patches/linux/0004-Andes-support-for-FTSDC.patch new file +1884 -0
1,884 lines not on this page · raw message
board/andes/ae350/patches/linux/0005-Non-cacheability-and-Cache-support.patch new file +1132 -0
1,132 lines not on this page · raw message
board/andes/ae350/patches/linux/0006-Add-andes-sbi-call-vendor-extension.patch new file +231 -0
231 lines not on this page · raw message
board/andes/ae350/patches/linux/0007-riscv-Porting-pte-update-function-local_flush_tlb_al.patch new file +101 -0
101 lines not on this page · raw message
board/andes/ae350/patches/linux/0008-Support-time32-stat64-sys_clone3-syscalls.patch new file +47 -0
47 lines not on this page · raw message
board/andes/ae350/patches/linux/0009-dma-Support-smp-up-with-dma.patch new file +120 -0
120 lines not on this page · raw message
board/andes/ae350/patches/linux/0010-riscv-platform-Fix-atcdmac300-chained-irq-mapping-is.patch new file +300 -0
300 lines not on this page · raw message
board/andes/ae350/patches/linux/0011-DMA-Add-msb-bit-patch.patch new file +387 -0
387 lines not on this page · raw message
board/andes/ae350/patches/linux/0012-Remove-unused-Andes-SBI-call.patch new file +147 -0
147 lines not on this page · raw message
board/andes/ae350/patches/opensbi/0001-Disable-PIC-explicitly-for-assembling.patch new file +29 -0
Lines of this file are not shown. View the raw message.
board/andes/ae350/patches/opensbi/0002-Enable-cache-for-opensbi-jump-mode.patch new file +25 -0
Lines of this file are not shown. View the raw message.
board/andes/ae350/patches/uboot/0001-Fix-mmc-no-partition-table-error.patch new file +27 -0
Lines of this file are not shown. View the raw message.
board/andes/ae350/patches/uboot/0002-Prevent-fw_dynamic-from-relocation.patch new file +27 -0
Lines of this file are not shown. View the raw message.
board/andes/ae350/patches/uboot/0003-Fix-u-boot-proper-booting-issue.patch new file +26 -0
Lines of this file are not shown. View the raw message.
board/andes/ae350/patches/uboot/0004-Enable-printing-OpenSBI-boot-logo.patch new file +25 -0
Lines of this file are not shown. View the raw message.
board/andes/ae350/readme.txt new file +66 -0
66 lines not on this page · raw message
board/andes/ae350/uboot.config.fragment new file +5 -0
Lines of this file are not shown. View the raw message.
configs/ae350_andestar45_defconfig new file +46 -0
46 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 7 lines
2.17.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Part of the diff is not shown here. View the raw message.
Hello Yu,
Quoted 9 lines · On Tue, 11 Jan 2022 11:58:58 +0800 Yu Chien Peter Lin <[email protected]>…
Signed-off-by Yu Chien Peter Lin <[email protected]>Signed-off-by Alan Kao <[email protected]>--- .../patches/linux/0001-nds32-Fix-boot-messages-garbled.patch | 0 board/andes/{ => ae3xx}/readme.txt | 0 configs/andes_ae3xx_defconfig | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) rename board/andes/{ => ae3xx}/patches/linux/0001-nds32-Fix-boot-messages-garbled.patch (100%) rename board/andes/{ => ae3xx}/readme.txt (100%)
Thanks for your patch. However, I am a bit confused, because after your two patches, we will have:
board/andes/ae3xx/ => the NDS32 platform
board/andes/ae350/ => the RISC-V platform
but the ae3xx wildcard matches ae350, so it feels really odd.
Could you clarify?
Best regards,
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH 2/2] board/andes/ae350: add support for Andes AE350
In reply to Yu Chien Peter LinHello Yu,
Quoted 5 lines · On Tue, 11 Jan 2022 11:58:59 +0800 Yu Chien Peter Lin <[email protected]>…
This patch provides defconfig and basic support for the Andes 45 series RISC-V architecture.
Signed-off-by Yu Chien Peter Lin <[email protected]>Signed-off-by Alan Kao <[email protected]>
Thanks for your patch! See below a number of comments.
Quoted 16 lines
--- DEVELOPERS | 3 +- board/andes/ae350/ae350.dts | 274 ++ board/andes/ae350/boot.cmd | 3 + board/andes/ae350/genimage_sdcard.cfg | 29 + board/andes/ae350/linux.config.fragment | 2 + .../0001-Add-AE350-platform-defconfig.patch | 158 + ...002-Andes-support-for-Faraday-ATCMAC.patch | 510 +++ .../0003-Andes-support-for-ATCDMAC.patch | 3301 +++++++++++++++++ .../linux/0004-Andes-support-for-FTSDC.patch | 1884 ++++++++++ ...5-Non-cacheability-and-Cache-support.patch | 1132 ++++++ ...-Add-andes-sbi-call-vendor-extension.patch | 231 ++ ...e-update-function-local_flush_tlb_al.patch | 101 + ...rt-time32-stat64-sys_clone3-syscalls.patch | 47 + .../0009-dma-Support-smp-up-with-dma.patch | 120 + ...ix-atcdmac300-chained-irq-mapping-is.patch | 300 ++
Quoted 8 lines
.../linux/0011-DMA-Add-msb-bit-patch.patch | 387 ++ .../0012-Remove-unused-Andes-SBI-call.patch | 147 + ...isable-PIC-explicitly-for-assembling.patch | 29 + ...2-Enable-cache-for-opensbi-jump-mode.patch | 25 + ...001-Fix-mmc-no-partition-table-error.patch | 27 + ...2-Prevent-fw_dynamic-from-relocation.patch | 27 + ...0003-Fix-u-boot-proper-booting-issue.patch | 26 + ...04-Enable-printing-OpenSBI-boot-logo.patch | 25 +
That is really a *huge* number of patches, and some of them are very large. I'm not sure we want all of them in Buildroot. It's of course nice to see that it allows your defconfig to use the upstream Linux kernel, but I think at this point it would be nicer to have a Git repository with your Linux kernel code, and fetch that code.
Have all those patches been submitted to their respective upstream projects?
DEVELOPERS N: Norbert Lange <[email protected]> · line 2125
Quoted 10 lines
DEVELOPERS +1
-1@@ -2122,10 +2122,11 @@ N: Norbert Lange <[email protected]> F: package/systemd/ F: package/tcf-agent/ -N: Nylon Chen <[email protected]> +N: Yu Chien Peter Lin <[email protected]>
It would be nicer to have a separate patch to re-assign yourself on this DEVELOPERS entry.
DEVELOPERS N: Norbert Lange <[email protected]> · line 2129
Quoted 4 lines
DEVELOPERS +1
-0F: arch/Config.in.nds32 F: board/andes F: configs/andes_ae3xx_defconfig +F: configs/ae350_andestar45_defconfig
It would probably be nicer to have a defconfig that starts with "andes", to match the previous defconfig?
board/andes/ae350/linux.config.fragment line 2
Quoted 8 lines
board/andes/ae350/linux.config.fragment new file +2
-0@@ -0,0 +1,2 @@ +CONFIG_INITRAMFS_SOURCE="" +CONFIG_EFI_PARTITION=y
It feels quite odd that you need a linux configuration fragment, while just below there is a patch adding the Linux kernel defconfig. Why not adjust the Linux kernel defconfig directly?
board/andes/ae350/patches/linux/0001-Add-AE350-platform-defconfig.patch line 4
Quoted 10 lines
board/andes/ae350/patches/linux/0001-Add-AE350-platform-defconfig.patch new file +4
-0@@ -0,0 +1,158 @@ +From 8a9097c1be79fdab3d907a8bbc66a222807cb81a Mon Sep 17 00:00:00 2001 +From: Yu Chien Peter Lin <[email protected]> +Date: Tue, 28 Dec 2021 09:05:34 +0800 +Subject: [PATCH 01/12] Add AE350 platform defconfig
Please use "git format-patch -N" to generate patches.
board/andes/ae350/readme.txt line 6
Quoted 12 lines
board/andes/ae350/readme.txt new file +6
-0@@ -0,0 +1,66 @@ +Intro +===== + +Andestech AE350 Platform + +The AE350 prototype demonstrates the AE350 platform on the FPGA.
Is this platform publicly available? The way I read this sentence, it seems like it's an internal prototyping platform. If that's the case, I'm not sure what's the value for you to upstream these patches in Buildroot, and what's the value for Buildroot to have this defconfig.
Quoted 6 lines
configs/ae350_andestar45_defconfig new file +0
-0
configs/ae350_andestar45_defconfig line 8
Quoted 8 lines
configs/ae350_andestar45_defconfig new file +8
-0@@ -0,0 +1,46 @@ +BR2_riscv=y +BR2_riscv_custom=y +BR2_RISCV_ISA_CUSTOM_RVM=y +BR2_RISCV_ISA_CUSTOM_RVF=y +BR2_RISCV_ISA_CUSTOM_RVD=y +BR2_RISCV_ISA_CUSTOM_RVC=y +BR2_GLOBAL_PATCH_DIR="board/andes/ae350/patches" +BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
Any reason to override the default C library?
configs/ae350_andestar45_defconfig line 12
Quoted 4 lines
configs/ae350_andestar45_defconfig new file +4
-0+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_10=y +BR2_BINUTILS_VERSION_2_37_X=y +BR2_GCC_VERSION_11_X=y +BR2_GCC_ENABLE_OPENMP=y
Please keep the default binutils and gcc version, and don't enable OpenMP support. The defconfigs should be minimal.
configs/ae350_andestar45_defconfig line 23
Quoted 11 lines
configs/ae350_andestar45_defconfig new file +11
-0+BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/andes/ae350/genimage_sdcard.cfg" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.10.84" +BR2_LINUX_KERNEL_DEFCONFIG="ae350_rv64_smp" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/andes/ae350/linux.config.fragment" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="board/andes/ae350/ae350.dts" +BR2_PACKAGE_OPENSSL=y
Please remove OpenSSL.
configs/ae350_andestar45_defconfig line 26
Quoted 3 lines
configs/ae350_andestar45_defconfig new file +3
-0+BR2_TARGET_ROOTFS_CPIO=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y
Why both cpio and ext4 ? Only one of them should be needed.
Quoted 10 lines
configs/ae350_andestar45_defconfig new file +10
-0+BR2_TARGET_OPENSBI=y +BR2_TARGET_OPENSBI_PLAT="andes/ae350" +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2022.01" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="ae350_rv64_spl_xip" +BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="board/andes/ae350/uboot.config.fragment" +BR2_TARGET_UBOOT_NEEDS_OPENSBI=y +# BR2_TARGET_UBOOT_FORMAT_BIN is not set
configs/ae350_andestar45_defconfig line 46
Quoted 10 lines
configs/ae350_andestar45_defconfig new file +10
-0+BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.itb" +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="ARCH_FLAGS=-march=rv64imafdc" +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT=y +BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE="board/andes/ae350/boot.cmd"
Could you rework your patch to take into account those comments and post an updated version?
Thanks a lot!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot