Skip to contentSkip to conversation

board/friendlyarm: Add support for friendlyarm nanopi neo4 board

PATCH New Shyam Saini 2 participants 5 messages Jun 4, 2019 – Aug 12, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 board/friendlyarm: Add support for friendlyarm nanopi neo4 board

This initial support includes:
Linux v5.2-rc1
Custom U-Boot
Arm Trusted Firmware v2.0
Buildroot default packages

---
 .gitlab-ci.yml                              |  1 +
 DEVELOPERS                                  |  2 ++
 board/friendlyarm/nanopi-neo4/extlinux.conf |  4 +++
 board/friendlyarm/nanopi-neo4/genimage.cfg  | 22 ++++++++++++
 board/friendlyarm/nanopi-neo4/post-build.sh |  9 +++++
 board/friendlyarm/nanopi-neo4/readme.txt    | 53 +++++++++++++++++++++++++++
 configs/nanopi_neo4_defconfig               | 55 +++++++++++++++++++++++++++++
 7 files changed, 146 insertions(+)
 create mode 100644 board/friendlyarm/nanopi-neo4/extlinux.conf
 create mode 100644 board/friendlyarm/nanopi-neo4/genimage.cfg
 create mode 100755 board/friendlyarm/nanopi-neo4/post-build.sh
 create mode 100644 board/friendlyarm/nanopi-neo4/readme.txt
 create mode 100644 configs/nanopi_neo4_defconfig
.gitlab-ci.yml +1 -0
index 5ed1b8f4d5..2f41bcf7c6 100644
@@ -181,6 +181,7 @@ nanopi_m1_defconfig: { extends: .defconfig }
 nanopi_m1_plus_defconfig: { extends: .defconfig }
 nanopi_m4_defconfig: { extends: .defconfig }
 nanopi_neo_defconfig: { extends: .defconfig }
+nanopi_neo4_defconfig: { extends: .defconfig }
 nexbox_a95x_defconfig: { extends: .defconfig }
 nitrogen6sx_defconfig: { extends: .defconfig }
 nitrogen6x_defconfig: { extends: .defconfig }
DEVELOPERS +2 -0
index e2ea103d83..55fb022218 100644
@@ -2044,10 +2044,12 @@ F:	package/wolfssl/
 N:     Shyam Saini <[email protected]>
 F:	board/friendlyarm/nanopc-t4/
 F:	board/friendlyarm/nanopi-m4/
+F:	board/friendlyarm/nanopi-neo4/
 F:	board/olimex/a33_olinuxino/
 F:	board/orangepi/orangepi-rk3399/
 F:	configs/nanopc_t4_defconfig
 F:	configs/nanopi_m4_defconfig
+F:	configs/nanopi_neo4_defconfig
 F:	configs/olimex_a33_olinuxino_defconfig
 F:	configs/orangepi_rk3399_defconfig
 
board/friendlyarm/nanopi-neo4/extlinux.conf new file +4 -0
new file mode 100644
index 0000000000..91eef67fb9
@@ -0,0 +1,4 @@
+label NanoPi Neo4 linux
+  kernel /boot/Image
+  devicetree /boot/rk3399-nanopi-neo4.dtb
+  append earlycon=uart8250,mmio32,0xff1a0000 root=/dev/mmcblk1p1 rootwait
board/friendlyarm/nanopi-neo4/genimage.cfg new file +22 -0
new file mode 100644
index 0000000000..b8c1cd5220
@@ -0,0 +1,22 @@
+image sdcard.img {
+	hdimage {
+	}
+
+	partition u-boot-tpl-spl-dtb {
+		in-partition-table = "no"
+		image = "u-boot-tpl-spl-dtb.img"
+		offset = 32K
+	}
+
+	partition u-boot-dtb {
+		in-partition-table = "no"
+		image = "u-boot.itb"
+		offset = 8M
+		size = 30M
+	}
+
+	partition rootfs {
+		partition-type = 0x83
+		image = "rootfs.ext4"
+	}
+}
board/friendlyarm/nanopi-neo4/post-build.sh new file +9 -0
new file mode 100755
index 0000000000..e852ba6adf
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+MKIMAGE=$HOST_DIR/bin/mkimage
+BOARD_DIR="$(dirname $0)"
+
+$MKIMAGE -n rk3399 -T rksd -d $BINARIES_DIR/u-boot-tpl-dtb.bin $BINARIES_DIR/u-boot-tpl-dtb.img
+cat $BINARIES_DIR/u-boot-tpl-dtb.img $BINARIES_DIR/u-boot-spl-dtb.bin > $BINARIES_DIR/u-boot-tpl-spl-dtb.img
+
+install -m 0644 -D $BOARD_DIR/extlinux.conf $TARGET_DIR/boot/extlinux/extlinux.conf
board/friendlyarm/nanopi-neo4/readme.txt new file +53 -0

53 lines not on this page · raw message

configs/nanopi_neo4_defconfig new file +55 -0

55 lines not on this page · raw message

Signature · 1 line
2.11.0
#1 lore raw

PATCH 2/3 board/radxa: Add support for Radxa Rock Pi4 board

This initial support includes:
Linux 5.1
Custom U-Boot
Arm Trusted Firmware v2.0
Buildroot default packages

---
 .gitlab-ci.yml                     |  1 +
 DEVELOPERS                         |  2 ++
 board/radxa/rock-pi4/extlinux.conf |  4 +++
 board/radxa/rock-pi4/genimage.cfg  | 22 +++++++++++++++
 board/radxa/rock-pi4/post-build.sh |  9 +++++++
 board/radxa/rock-pi4/readme.txt    | 51 +++++++++++++++++++++++++++++++++++
 configs/radxa_rock_pi4_defconfig   | 55 ++++++++++++++++++++++++++++++++++++++
 7 files changed, 144 insertions(+)
 create mode 100644 board/radxa/rock-pi4/extlinux.conf
 create mode 100644 board/radxa/rock-pi4/genimage.cfg
 create mode 100755 board/radxa/rock-pi4/post-build.sh
 create mode 100644 board/radxa/rock-pi4/readme.txt
 create mode 100644 configs/radxa_rock_pi4_defconfig
.gitlab-ci.yml +1 -0
index 2f41bcf7c6..e290d602ad 100644
@@ -250,6 +250,7 @@ qemu_x86_64_defconfig: { extends: .defconfig }
 qemu_x86_defconfig: { extends: .defconfig }
 qemu_xtensa_lx60_defconfig: { extends: .defconfig }
 qemu_xtensa_lx60_nommu_defconfig: { extends: .defconfig }
+radxa_rock_pi4_defconfig: { extends: .defconfig }
 raspberrypi0_defconfig: { extends: .defconfig }
 raspberrypi0w_defconfig: { extends: .defconfig }
 raspberrypi2_defconfig: { extends: .defconfig }
DEVELOPERS +2 -0
index 55fb022218..5cbf19fb1f 100644
@@ -2047,11 +2047,13 @@ F:	board/friendlyarm/nanopi-m4/
 F:	board/friendlyarm/nanopi-neo4/
 F:	board/olimex/a33_olinuxino/
 F:	board/orangepi/orangepi-rk3399/
+F:	board/radxa/
 F:	configs/nanopc_t4_defconfig
 F:	configs/nanopi_m4_defconfig
 F:	configs/nanopi_neo4_defconfig
 F:	configs/olimex_a33_olinuxino_defconfig
 F:	configs/orangepi_rk3399_defconfig
+F:	configs/radxa_rock_pi4_defconfig
 
 N:	Simon Dawson <[email protected]>
 F:	boot/at91bootstrap3/
board/radxa/rock-pi4/extlinux.conf new file +4 -0
new file mode 100644
index 0000000000..f939cf5c56
@@ -0,0 +1,4 @@
+label Radxa Rock pi4 linux
+  kernel /boot/Image
+  devicetree /boot/rk3399-rock-pi-4.dtb
+  append earlycon=uart8250,mmio32,0xff1a0000 root=/dev/mmcblk0p1 rootwait
board/radxa/rock-pi4/genimage.cfg new file +22 -0
new file mode 100644
index 0000000000..b8c1cd5220
@@ -0,0 +1,22 @@
+image sdcard.img {
+	hdimage {
+	}
+
+	partition u-boot-tpl-spl-dtb {
+		in-partition-table = "no"
+		image = "u-boot-tpl-spl-dtb.img"
+		offset = 32K
+	}
+
+	partition u-boot-dtb {
+		in-partition-table = "no"
+		image = "u-boot.itb"
+		offset = 8M
+		size = 30M
+	}
+
+	partition rootfs {
+		partition-type = 0x83
+		image = "rootfs.ext4"
+	}
+}
board/radxa/rock-pi4/post-build.sh new file +9 -0
new file mode 100755
index 0000000000..e852ba6adf
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+MKIMAGE=$HOST_DIR/bin/mkimage
+BOARD_DIR="$(dirname $0)"
+
+$MKIMAGE -n rk3399 -T rksd -d $BINARIES_DIR/u-boot-tpl-dtb.bin $BINARIES_DIR/u-boot-tpl-dtb.img
+cat $BINARIES_DIR/u-boot-tpl-dtb.img $BINARIES_DIR/u-boot-spl-dtb.bin > $BINARIES_DIR/u-boot-tpl-spl-dtb.img
+
+install -m 0644 -D $BOARD_DIR/extlinux.conf $TARGET_DIR/boot/extlinux/extlinux.conf
board/radxa/rock-pi4/readme.txt new file +51 -0

51 lines not on this page · raw message

configs/radxa_rock_pi4_defconfig new file +55 -0

55 lines not on this page · raw message

Signature · 1 line
2.11.0
#2 lore raw

PATCH 3/3 board/pine64: Add support for Pine64 RockPro64 board

In reply to Shyam Saini

This initial support includes:
Linux 5.1
Custom U-Boot
Arm Trusted Firmware v2.0
Buildroot default packages

---
 .gitlab-ci.yml                       |  1 +
 DEVELOPERS                           |  2 ++
 board/pine64/rockpro64/extlinux.conf |  4 +++
 board/pine64/rockpro64/genimage.cfg  | 22 +++++++++++++++
 board/pine64/rockpro64/post-build.sh |  9 ++++++
 board/pine64/rockpro64/readme.txt    | 51 +++++++++++++++++++++++++++++++++
 configs/pine64_rockpro64_defconfig   | 55 ++++++++++++++++++++++++++++++++++++
 7 files changed, 144 insertions(+)
 create mode 100644 board/pine64/rockpro64/extlinux.conf
 create mode 100644 board/pine64/rockpro64/genimage.cfg
 create mode 100755 board/pine64/rockpro64/post-build.sh
 create mode 100644 board/pine64/rockpro64/readme.txt
 create mode 100644 configs/pine64_rockpro64_defconfig
.gitlab-ci.yml +1 -0
index e290d602ad..5c9e344f8c 100644
@@ -215,6 +215,7 @@ pandaboard_defconfig: { extends: .defconfig }
 pc_x86_64_bios_defconfig: { extends: .defconfig }
 pc_x86_64_efi_defconfig: { extends: .defconfig }
 pine64_defconfig: { extends: .defconfig }
+pine64_rockpro64_defconfig: { extends: .defconfig }
 pine64_sopine_defconfig: { extends: .defconfig }
 qemu_aarch64_virt_defconfig: { extends: .defconfig }
 qemu_arm_versatile_defconfig: { extends: .defconfig }
DEVELOPERS +2 -0
index 5cbf19fb1f..64b84a06a5 100644
@@ -2047,12 +2047,14 @@ F:	board/friendlyarm/nanopi-m4/
 F:	board/friendlyarm/nanopi-neo4/
 F:	board/olimex/a33_olinuxino/
 F:	board/orangepi/orangepi-rk3399/
+F:	board/pine64/rockpro64
 F:	board/radxa/
 F:	configs/nanopc_t4_defconfig
 F:	configs/nanopi_m4_defconfig
 F:	configs/nanopi_neo4_defconfig
 F:	configs/olimex_a33_olinuxino_defconfig
 F:	configs/orangepi_rk3399_defconfig
+F:	configs/pine64_rockpro64_defconfig
 F:	configs/radxa_rock_pi4_defconfig
 
 N:	Simon Dawson <[email protected]>
board/pine64/rockpro64/extlinux.conf new file +4 -0
new file mode 100644
index 0000000000..ff196499b0
@@ -0,0 +1,4 @@
+label RockPro64 linux
+  kernel /boot/Image
+  devicetree /boot/rk3399-rockpro64.dtb
+  append earlycon=uart8250,mmio32,0xff1a0000 root=/dev/mmcblk0p1 rootwait
board/pine64/rockpro64/genimage.cfg new file +22 -0
new file mode 100644
index 0000000000..b8c1cd5220
@@ -0,0 +1,22 @@
+image sdcard.img {
+	hdimage {
+	}
+
+	partition u-boot-tpl-spl-dtb {
+		in-partition-table = "no"
+		image = "u-boot-tpl-spl-dtb.img"
+		offset = 32K
+	}
+
+	partition u-boot-dtb {
+		in-partition-table = "no"
+		image = "u-boot.itb"
+		offset = 8M
+		size = 30M
+	}
+
+	partition rootfs {
+		partition-type = 0x83
+		image = "rootfs.ext4"
+	}
+}
board/pine64/rockpro64/post-build.sh new file +9 -0
new file mode 100755
index 0000000000..e852ba6adf
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+MKIMAGE=$HOST_DIR/bin/mkimage
+BOARD_DIR="$(dirname $0)"
+
+$MKIMAGE -n rk3399 -T rksd -d $BINARIES_DIR/u-boot-tpl-dtb.bin $BINARIES_DIR/u-boot-tpl-dtb.img
+cat $BINARIES_DIR/u-boot-tpl-dtb.img $BINARIES_DIR/u-boot-spl-dtb.bin > $BINARIES_DIR/u-boot-tpl-spl-dtb.img
+
+install -m 0644 -D $BOARD_DIR/extlinux.conf $TARGET_DIR/boot/extlinux/extlinux.conf
board/pine64/rockpro64/readme.txt new file +51 -0

51 lines not on this page · raw message

configs/pine64_rockpro64_defconfig new file +55 -0

55 lines not on this page · raw message

Signature · 1 line
2.11.0
#3 lore raw

PATCH 1/3 board/friendlyarm: Add support for friendlyarm nanopi neo4 board

In reply to Shyam Saini

Hello Shyam,

Quoted 7 lines · On Tue, 4 Jun 2019 14:23:05 +0530 Shyam Saini…

This initial support includes:
Linux v5.2-rc1
Custom U-Boot
Arm Trusted Firmware v2.0
Buildroot default packages

I have finally applied this series. There were a few things to adjust though, which were identical in all three patches, so I'll only comment on this one, but it also applied to the 2 other patches in this series.

First, the commit title should be:

configs/nanopi_neo4: new defconfig

configs/nanopi_neo4_defconfig line 6

Quoted 12 lines
configs/nanopi_neo4_defconfig new file +6 -0
new file mode 100644
index 0000000000..f75f4367a9
@@ -0,0 +1,55 @@
+# Architecture
+BR2_aarch64=y
+BR2_cortex_a72_a53=y
+
+# Linux headers 5.1 series
+BR2_KERNEL_HEADERS_5_1=y

All defconfigs that build their own kernel should use the "Same as kernel" mechanism for kernel headers. So this should have been:

# Linux headers same as kernel, a 5.2 series
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_2=y

configs/nanopi_neo4_defconfig line 36

Quoted 4 lines
configs/nanopi_neo4_defconfig new file +4 -0
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="v5.2-rc1"

I switched to using the final 5.2 kernel.

configs/nanopi_neo4_defconfig line 48

Quoted 1 line
configs/nanopi_neo4_defconfig new file +1 -0
+BR2_TARGET_ROOTFS_EXT2_SIZE="512M"

And dropped this one, to simply use the default ext4 filesystem size.

As I said, I fixed those details on all three defconfigs, and applied all of them.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#4 lore raw

PATCH 1/3 board/friendlyarm: Add support for friendlyarm nanopi neo4 board

Hi Thomas,

Sorry for the late reply.

Quoted 13 lines

Hello Shyam,

Quoted 7 lines · On Tue, 4 Jun 2019 14:23:05 +0530 Shyam Saini…

This initial support includes:
Linux v5.2-rc1
Custom U-Boot
Arm Trusted Firmware v2.0
Buildroot default packages

Quoted 7 lines

I have finally applied this series. There were a few things to adjust though, which were identical in all three patches, so I'll only comment on this one, but it also applied to the 2 other patches in this series.

First, the commit title should be:

configs/nanopi_neo4: new defconfig

Will take care of these things next time for sure.

Quoted 31 lines
Quoted 9 lines
configs/nanopi_neo4_defconfig new file +0 -0
new file mode 100644
index 0000000000..f75f4367a9

configs/nanopi_neo4_defconfig line 6

Quoted 6 lines
configs/nanopi_neo4_defconfig new file +6 -0
@@ -0,0 +1,55 @@
+# Architecture
+BR2_aarch64=y
+BR2_cortex_a72_a53=y
+
+# Linux headers 5.1 series
+BR2_KERNEL_HEADERS_5_1=y

All defconfigs that build their own kernel should use the "Same as kernel" mechanism for kernel headers. So this should have been:

# Linux headers same as kernel, a 5.2 series
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_2=y

configs/nanopi_neo4_defconfig line 36

Quoted 4 lines
configs/nanopi_neo4_defconfig new file +4 -0
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="v5.2-rc1"

I switched to using the final 5.2 kernel.

Quoted 7 lines

configs/nanopi_neo4_defconfig line 48

Quoted 1 line
configs/nanopi_neo4_defconfig new file +1 -0
+BR2_TARGET_ROOTFS_EXT2_SIZE="512M"

And dropped this one, to simply use the default ext4 filesystem size.

As I said, I fixed those details on all three defconfigs, and applied all of them.

I have noted all your feedback for the future patches.

Thanks a lot for making these changes on your own and the feedback.