board: add support for nanopi-m1-plus
PATCH 1/1 board: add support for nanopi-m1-plus
Add initial support for nanopi-m1-plus board
with below features
- U-Boot 2017.07-rc3
- Linux 4.11.5
- linux patches to add nanopi-m1-plus dts
- Default packages from buildroot
--- .gitlab-ci.yml | 29 +----- DEVELOPERS | 2 + board/friendlyarm/nanopi-m1-plus/boot.cmd | 8 ++ board/friendlyarm/nanopi-m1-plus/genimage.cfg | 35 +++++++ ...ts-nanopi-m1-plus-add-dts-to-linux-4.11.5.patch | 101 ++++++++++++++++++++ board/friendlyarm/nanopi-m1-plus/readme.txt | 29 ++++++ configs/nanopi_m1_plus_defconfig | 44 +++++++++ 7 files changed, 220 insertions(+), 28 deletions(-) create mode 100644 board/friendlyarm/nanopi-m1-plus/boot.cmd create mode 100644 board/friendlyarm/nanopi-m1-plus/genimage.cfg create mode 100644 board/friendlyarm/nanopi-m1-plus/patches/linux-0001-ARM-dts-nanopi-m1-plus-add-dts-to-linux-4.11.5.patch create mode 100644 board/friendlyarm/nanopi-m1-plus/readme.txt create mode 100644 configs/nanopi_m1_plus_defconfig
.gitlab-ci.yml +1 -0
@@ -128,6 +128,7 @@ mx6cubox_defconfig: *defconfig mx6sx_udoo_neo_defconfig: *defconfig mx6udoo_defconfig: *defconfig nanopi_m1_defconfig: *defconfig +nanopi_m1_plus_defconfig: *defconfig nanopi_neo_defconfig: *defconfig nexbox_a95x_defconfig: *defconfig nitrogen6sx_defconfig: *defconfig
DEVELOPERS +2 -0
@@ -348,9 +348,11 @@ F: package/libsvg-cairo/ N: Chakra Divi <[email protected]> F: board/friendlyarm/nanopi-m1 +F: board/friendlyarm/nanopi-m1-plus F: board/olimex/a13_olinuxino F: board/orangepi/orangepi-plus F: configs/nanopi_m1_defconfig +F: configs/nanopi_m1_plus_defconfig F: configs/olimex_a13_olinuxino_defconfig F: configs/orangepi_plus_defconfig
board/friendlyarm/nanopi-m1-plus/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-m1-plus.dtb + +bootz $kernel_addr_r - $fdt_addr_r
board/friendlyarm/nanopi-m1-plus/genimage.cfg new file +35 -0
@@ -0,0 +1,35 @@ +# Minimal SD card image for the NanoPi M1 +# +image boot.vfat { + vfat { + files = { + "zImage", + "sun8i-h3-nanopi-m1-plus.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" + } +}
board/friendlyarm/nanopi-m1-plus/patches/linux-0001-ARM-dts-nanopi-m1-plus-add-dts-to-linux-4.11.5.patch new file +101 -0
101 lines not on this page · raw message
board/friendlyarm/nanopi-m1-plus/readme.txt new file +29 -0
@@ -0,0 +1,29 @@ +NanoPi M1 Plus + +Intro +===== + +This default configuration will allow you to start experimenting with the +buildroot environment for the NanoPi M1 Plus. 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_m1_plus_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
configs/nanopi_m1_plus_defconfig new file +44 -0
44 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH 1/1 board: add support for nanopi-m1-plus
Hello,
Quoted 3 lines · Chakra Divi
Add initial support for nanopi-m1-plus board
with below features
- U-Boot 2017.07-rc3
Would be good to mention why you use this version of U-Boot. I know why, but it's better when it's explicitly written in the commit log. Indeed, using release candidate versions is normally not accepted.
Quoted 5 lines
- Linux 4.11.5
- linux patches to add nanopi-m1-plus dts
- Default packages from buildrootSigned-off-by Chakra Divi <[email protected]>
Thanks, looks mostly good.
board/friendlyarm/nanopi-m1-plus/genimage.cfg
Quoted 5 lines
board/friendlyarm/nanopi-m1-plus/genimage.cfg new file +0
-0
At some point, factorizing the genimage.cfg file across similar Allwinner boards might be useful. See board/freescale/common/imx for an example.
But it's OK for now to have it as you did.
board/friendlyarm/nanopi-m1-plus/patches/linux-0001-ARM-dts-nanopi-m1-plus-add-dts-to
Quoted 5 lines
board/friendlyarm/nanopi-m1-plus/patches/linux-0001-ARM-dts-nanopi-m1-plus-add-dts-to new file +0
-0
-linux-4.11.5.patch
Has this patch submitted mainline?
board/friendlyarm/nanopi-m1-plus/patches/linux-0001-ARM-dts-nanopi-m1-plus-add-dts-to line 8
Quoted 9 lines
board/friendlyarm/nanopi-m1-plus/patches/linux-0001-ARM-dts-nanopi-m1-plus-add-dts-to new file +8
-0@@ -0,0 +1,101 @@ +From a2906d34dccec1c097aa3ef8d3082c0bf394ecc0 Mon Sep 17 00:00:00 2001 +From: Chakra Divi <[email protected]> +Date: Thu, 6 Jul 2017 18:22:35 +0530 +Subject: [PATCH] ARM: dts: nanopi-m1-plus : add dts to linux 4.11.5 + +This patch is used to add nanopi-m1-plus dts +file in linux source code helps to add nanopi-m1-plus +board support in buildroot
If so, please indicate it here.
Also, please put this patch in:
board/friendlyarm/nanopi-m1-plus/linux/patches/
and name it just 0001-<something>.patch (i.e without the linux- prefix).
Quoted 23 lines
configs/nanopi_m1_plus_defconfig new file +17
-0@@ -0,0 +1,44 @@ +# Architecture +BR2_arm=y +BR2_cortex_a7=y +BR2_ARM_FPU_VFPV4=y + +# Linux headers same as kernel, a 4.11 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_11=y + +# System configuration +BR2_TARGET_GENERIC_HOSTNAME="nanopi-m1-plus" +BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for the NanoPi M1 Plus" + +# Bootloaders +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2017.07-rc3"
configs/nanopi_m1_plus_defconfig line 27
Quoted 10 lines
configs/nanopi_m1_plus_defconfig new file +10
-0+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="nanopi_m1_plus" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-sunxi-with-spl.bin" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.11.5" +BR2_LINUX_KERNEL_PATCH="board/friendlyarm/nanopi-m1-plus/patches/linux-*.patch"
And replace this with BR2_GLOBAL_PATCH_DIR.
Otherwise looks good. Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH 1/1 board: add support for nanopi-m1-plus
Hi Thomas,
Thanks for the inputs. I have one Question regarding the patches directory.
Quoted 11 lines · Thomas Petazzoni
Hello,
Quoted 3 lines · Chakra Divi
Add initial support for nanopi-m1-plus board
with below features
- U-Boot 2017.07-rc3Would be good to mention why you use this version of U-Boot. I know why, but it's better when it's explicitly written in the commit log. Indeed, using release candidate versions is normally not accepted.
Ok will add the comments
Quoted 18 lines
Quoted 5 lines
- Linux 4.11.5
- linux patches to add nanopi-m1-plus dts
- Default packages from buildrootSigned-off-by Chakra Divi <[email protected]>Thanks, looks mostly good.
board/friendlyarm/nanopi-m1-plus/genimage.cfg
Quoted 5 lines
board/friendlyarm/nanopi-m1-plus/genimage.cfg new file +0
-0At some point, factorizing the genimage.cfg file across similar Allwinner boards might be useful. See board/freescale/common/imx for an example.
Quoted 2 lines
But it's OK for now to have it as you did.
Will keep a note and do it once all the boards are done.
Quoted 9 lines
board/friendlyarm/nanopi-m1-plus/patches/linux-0001-ARM-dts-nanopi-m1-plus-add-dts-to
Quoted 5 lines
board/friendlyarm/nanopi-m1-plus/patches/linux-0001-ARM-dts-nanopi-m1-plus-add-dts-to new file +0
-0-linux-4.11.5.patch
Has this patch submitted mainline?
yes this is part of mainline
Quoted 12 lines
board/friendlyarm/nanopi-m1-plus/patches/linux-0001-ARM-dts-nanopi-m1-plus-add-dts-to line 8
Quoted 9 lines
board/friendlyarm/nanopi-m1-plus/patches/linux-0001-ARM-dts-nanopi-m1-plus-add-dts-to new file +8
-0@@ -0,0 +1,101 @@ +From a2906d34dccec1c097aa3ef8d3082c0bf394ecc0 Mon Sep 17 00:00:00 2001 +From: Chakra Divi <[email protected]> +Date: Thu, 6 Jul 2017 18:22:35 +0530 +Subject: [PATCH] ARM: dts: nanopi-m1-plus : add dts to linux 4.11.5 + +This patch is used to add nanopi-m1-plus dts +file in linux source code helps to add nanopi-m1-plus +board support in buildrootIf so, please indicate it here.
Will add the info about mainline
Quoted 6 lines
Also, please put this patch in:
board/friendlyarm/nanopi-m1-plus/linux/patches/
and name it just 0001-<something>.patch (i.e without the linux- prefix).
Do we need additional "patches" directory here ? Is this a convention we need to follow for adding patches ?
Quoted 36 lines
Quoted 23 lines
configs/nanopi_m1_plus_defconfig new file +17
-0@@ -0,0 +1,44 @@ +# Architecture +BR2_arm=y +BR2_cortex_a7=y +BR2_ARM_FPU_VFPV4=y + +# Linux headers same as kernel, a 4.11 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_11=y + +# System configuration +BR2_TARGET_GENERIC_HOSTNAME="nanopi-m1-plus" +BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for the NanoPi M1 Plus" + +# Bootloaders +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2017.07-rc3"configs/nanopi_m1_plus_defconfig line 27
Quoted 10 lines
configs/nanopi_m1_plus_defconfig new file +10
-0+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="nanopi_m1_plus" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-sunxi-with-spl.bin" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.11.5" +BR2_LINUX_KERNEL_PATCH="board/friendlyarm/nanopi-m1-plus/patches/linux-*.patch"And replace this with
BR2_GLOBAL_PATCH_DIR.
Quoted 7 lines
Otherwise looks good. Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
Regards,
Chakra Divi,
Openedev.
PATCH 1/1 board: add support for nanopi-m1-plus
Hello,
Quoted 5 lines · Chakra D
Will add the info about mainline
Quoted 3 lines
Also, please put this patch in:
board/friendlyarm/nanopi-m1-plus/linux/patches/
I was wrong, it should be the opposite:
board/friendlyarm/nanopi-m1-plus/patches/linux/
Quoted 5 lines
Quoted 2 lines
and name it just 0001-<something>.patch (i.e without the linux- prefix).
Do we need additional "patches" directory here ? Is this a convention we need to follow for adding patches ?
See above. With BR2_GLOBAL_PATCH_DIR, you need one sub-directory per package. So, you can do:
BR2_GLOBAL_PATCH_DIR="board/friendlyarm/nanopi-m1-plus/"
with the Linux patch in board/friendlyarm/nanopi-m1-plus/linux
or you can do:
BR2_GLOBAL_PATCH_DIR="board/friendlyarm/nanopi-m1-plus/patches/"
with the Linux patch in board/friendlyarm/nanopi-m1-plus/patches/linux
The latter being the preferred way. See board/beaglebone/ for example.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH 1/1 board: add support for nanopi-m1-plus
In reply to Chakra DQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Chakra" == Chakra D <[email protected]> writes:
Hi,
Quoted 9 lines
Quoted 6 lines
Also, please put this patch in:
board/friendlyarm/nanopi-m1-plus/linux/patches/
and name it just 0001-<something>.patch (i.e without the linux- prefix).
Do we need additional "patches" directory here ? Is this a convention we need to follow for adding patches ?
This is for the generic (E.G. not specific to the Linux package) BR2_GLOBAL_PATCH_DIR option. With this, it will look in $BR2_GLOBAL_PATCH_DIR/linux for linux patches, and yes - Our convention is to use board/<vendor>/<board>/patches for the toplevel BR2_GLOBAL_PATCH_DIR.
Signature · 1 line
Bye, Peter Korsgaard