configs/nanopi_r1: new defconfig
PATCH 1/1 configs/nanopi_r1: new defconfig
Add initial support for Nanopi R1 board with below features:
- U-Boot 2019.01
- Linux 5.0
- Default packages from buildroot
Configuration files taken from Armbian:
https://github.com/armbian/build/blob/master/patch
--- board/friendlyarm/nanopi-r1/boot.cmd | 8 + board/friendlyarm/nanopi-r1/genimage.cfg | 36 ++++ .../nanopi-r1/kernel/linux-extras.config | 2 + .../nanopi-r1/kernel/sun8i-h3-nanopi-r1.dts | 170 ++++++++++++++++++ .../friendlyarm/nanopi-r1/nanopi_r1_defconfig | 22 +++ board/friendlyarm/nanopi-r1/readme.txt | 29 +++ .../nanopi-r1/sun8i-h3-nanopi-r1.dts | 102 +++++++++++ configs/nanopi_r1_defconfig | 49 +++++ 8 files changed, 418 insertions(+) create mode 100644 board/friendlyarm/nanopi-r1/boot.cmd create mode 100644 board/friendlyarm/nanopi-r1/genimage.cfg create mode 100644 board/friendlyarm/nanopi-r1/kernel/linux-extras.config create mode 100644 board/friendlyarm/nanopi-r1/kernel/sun8i-h3-nanopi-r1.dts create mode 100644 board/friendlyarm/nanopi-r1/nanopi_r1_defconfig create mode 100644 board/friendlyarm/nanopi-r1/readme.txt create mode 100644 board/friendlyarm/nanopi-r1/sun8i-h3-nanopi-r1.dts create mode 100644 configs/nanopi_r1_defconfig
board/friendlyarm/nanopi-r1/boot.cmd new file +8 -0
@@ -0,0 +1,8 @@ +setenv fdt_high ffffffff + +setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait + +fatload mmc 0 $kernel_addr_r zImage +fatload mmc 0 $fdt_addr_r sun8i-h3-nanopi-r1.dtb + +bootz $kernel_addr_r - $fdt_addr_r
board/friendlyarm/nanopi-r1/genimage.cfg new file +36 -0
@@ -0,0 +1,36 @@ +# Minimal SD card image for the NanoPi M1 +# +image boot.vfat { + vfat { + files = { + "zImage", + "sun8i-h3-nanopi-r1.dtb", + "boot.scr" + } + } + size = 10M +} + +image sdcard.img { + hdimage { + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot-sunxi-with-spl.bin" + offset = 8192 + size = 1040384 # 1MB - 8192 + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + size = 512M + } +}
board/friendlyarm/nanopi-r1/kernel/linux-extras.config new file +2 -0
@@ -0,0 +1,2 @@ +# USB ethernet +CONFIG_USB_RTL8152=y
board/friendlyarm/nanopi-r1/kernel/sun8i-h3-nanopi-r1.dts new file +170 -0
170 lines not on this page · raw message
board/friendlyarm/nanopi-r1/nanopi_r1_defconfig new file +22 -0
@@ -0,0 +1,22 @@ +CONFIG_ARM=y +CONFIG_ARCH_SUNXI=y +CONFIG_SPL=y +CONFIG_MACH_SUN8I_H3=y +CONFIG_DRAM_CLK=408 +CONFIG_DRAM_ZQ=3881979 +CONFIG_DRAM_ODT_EN=y +CONFIG_MACPWR="PD6" +# CONFIG_VIDEO_DE2 is not set +CONFIG_NR_DRAM_BANKS=1 +# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set +CONFIG_CONSOLE_MUX=y +CONFIG_SYS_CLK_FREQ=480000000 +# CONFIG_CMD_FLASH is not set +# CONFIG_SPL_DOS_PARTITION is not set +# CONFIG_SPL_EFI_PARTITION is not set +CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-nanopi-r1" +CONFIG_SUN8I_EMAC=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_OHCI_HCD=y +CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y +CONFIG_MMC_SUNXI_SLOT_EXTRA=2
board/friendlyarm/nanopi-r1/readme.txt new file +29 -0
@@ -0,0 +1,29 @@ +NanoPi R1 + +Intro +===== + +This default configuration will allow you to start experimenting with the +buildroot environment for the NanoPi R1. With the current configuration +it will bring-up the board, and allow access through the serial console. + +How to build it +=============== + +Configure Buildroot: + + $ make nanopi_r1_defconfig + +Compile everything and build the SD card image: + + $ make + +How to write the SD card +======================== + +Once the build process is finished you will have an image called "sdcard.img" +in the output/images/ directory. + +Copy the bootable "sdcard.img" onto an SD card with "dd": + + $ sudo dd if=output/images/sdcard.img of=/dev/sdX
board/friendlyarm/nanopi-r1/sun8i-h3-nanopi-r1.dts new file +102 -0
102 lines not on this page · raw message
configs/nanopi_r1_defconfig new file +49 -0
49 lines not on this page · raw message
Signature · 1 line
2.20.1
PATCH 1/1 configs/nanopi_r1: new defconfig
Hello Davide,
I have finally applied your patch, but I have a number of comments/questions.
Quoted 11 lines · On Sun, 27 Oct 2019 20:50:46 +0100 Davide Viti <[email protected]> wrote:
Add initial support for Nanopi R1 board with below features:
- U-Boot 2019.01
- Linux 5.0
- Default packages from buildrootConfiguration files taken from Armbian:
https://github.com/armbian/build/blob/master/patch
Signed-off-by Davide Viti <[email protected]>
First of all, is this your new e-mail? Our DEVELOPERS file still has:
Davide Viti <[email protected]>
if your e-mail has changed, could you send a patch to update our DEVELOPERS file ?
Quoted 9 lines
board/friendlyarm/nanopi-r1/boot.cmd | 8 + board/friendlyarm/nanopi-r1/genimage.cfg | 36 ++++ .../nanopi-r1/kernel/linux-extras.config | 2 + .../nanopi-r1/kernel/sun8i-h3-nanopi-r1.dts | 170 ++++++++++++++++++ .../friendlyarm/nanopi-r1/nanopi_r1_defconfig | 22 +++ board/friendlyarm/nanopi-r1/readme.txt | 29 +++ .../nanopi-r1/sun8i-h3-nanopi-r1.dts | 102 +++++++++++ configs/nanopi_r1_defconfig | 49 +++++ 8 files changed, 418 insertions(+)
You forgot to update the DEVELOPERS file and the .gitlab-ci.yml file, so I've done that as part of applying your patch.
Quoted 4 lines
create mode 100644 board/friendlyarm/nanopi-r1/boot.cmd create mode 100644 board/friendlyarm/nanopi-r1/genimage.cfg create mode 100644 board/friendlyarm/nanopi-r1/kernel/linux-extras.config create mode 100644 board/friendlyarm/nanopi-r1/kernel/sun8i-h3-nanopi-r1.dts
These two files were nicely under a kernel/ subdirectory.
Quoted 1 line
create mode 100644 board/friendlyarm/nanopi-r1/nanopi_r1_defconfig
But this one.
Quoted 2 lines
create mode 100644 board/friendlyarm/nanopi-r1/readme.txt create mode 100644 board/friendlyarm/nanopi-r1/sun8i-h3-nanopi-r1.dts
And this one, which are U-Boot specific were not in a uboot/ sub-directory, so I moved them into a uboot/ sub-directory, and adjusted the defconfig accordingly.
Another question is: your defconfig was done at the time of Linux 5.0 and U-Boot 2019.01, but it seems like support for this board has still not made its way to the upstream Linux kernel and upstream U-Boot. Why so? Could you work with FriendlyArm, or yourself submit support for this board to upstream Linux and U-Boot, so that ultimately, we can drop the .dts files from Buildroot ?
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com