Przeglądaj źródła

configs/friendlyarm_nanopi_neo_defconfig: new defconfig

This patch adds a new defconfig for the NanoPi NEO board made by
FriendlyARM. This board is based on the Allwinner H3 SoC.

See: https://wiki.friendlyelec.com/wiki/index.php/NanoPi_NEO

This patch uses the mainline kernel and u-boot for the board.

The configurations are based on the previously dropped defconfig
maintained by Yann E. MORIN <yann.morin.1998@free.fr>.

Signed-off-by: Dong Wang <wangdong115@foxmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Dong Wang 11 miesięcy temu
rodzic
commit
4265790541

+ 4 - 0
DEVELOPERS

@@ -868,6 +868,10 @@ F:	package/logsurfer/
 N:	Dominik Michael Rauh <dmrauh@posteo.de>
 N:	Dominik Michael Rauh <dmrauh@posteo.de>
 F:	package/gdal/
 F:	package/gdal/
 
 
+N:	Dong Wang <wangdong115@foxmail.com>
+F:	board/friendlyarm/nanopi-neo/
+F:	configs/friendlyarm_nanopi_neo_defconfig
+
 N:	Doug Kehn <rdkehn@gmail.com>
 N:	Doug Kehn <rdkehn@gmail.com>
 F:	package/nss-pam-ldapd/
 F:	package/nss-pam-ldapd/
 F:	package/sp-oops-extract/
 F:	package/sp-oops-extract/

+ 4 - 0
board/friendlyarm/nanopi-neo/extlinux.conf

@@ -0,0 +1,4 @@
+label NanoPi NEO linux
+  kernel /boot/zImage
+  devicetree /boot/sun8i-h3-nanopi-neo.dtb
+  append console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p1 rootwait panic=10

+ 17 - 0
board/friendlyarm/nanopi-neo/genimage.cfg

@@ -0,0 +1,17 @@
+# Minimal SD card image for the NanoPi NEO.
+image sdcard.img {
+	hdimage {
+	}
+
+	partition u-boot {
+		in-partition-table = false
+		image = "u-boot-sunxi-with-spl.bin"
+		offset = 8K
+		size = 1000K # 1MB - 8KB(offset) - 16KB(GPT)
+	}
+
+	partition rootfs {
+		partition-type = 0x83
+		image = "rootfs.ext4"
+	}
+}

+ 1 - 0
board/friendlyarm/nanopi-neo/patches/linux-headers/linux-headers.hash

@@ -0,0 +1 @@
+../linux/linux.hash

+ 2 - 0
board/friendlyarm/nanopi-neo/patches/linux/linux.hash

@@ -0,0 +1,2 @@
+# Locally calculated
+sha256  93218296934915636fe6ba08e125948424cc270fd8948502c0ab91087a9fccd8  linux-6.6.44.tar.xz

+ 2 - 0
board/friendlyarm/nanopi-neo/patches/uboot/uboot.hash

@@ -0,0 +1,2 @@
+# Locally calculated
+sha256  f591da9ab90ef3d6b3d173766d0ddff90c4ed7330680897486117df390d83c8f  u-boot-2024.07.tar.bz2

+ 5 - 0
board/friendlyarm/nanopi-neo/post-build.sh

@@ -0,0 +1,5 @@
+#!/bin/sh
+
+BOARD_DIR="$(dirname "$0")"
+
+install -m 0644 -D "$BOARD_DIR"/extlinux.conf "$TARGET_DIR"/boot/extlinux/extlinux.conf

+ 41 - 0
board/friendlyarm/nanopi-neo/readme.txt

@@ -0,0 +1,41 @@
+Nanopi NEO
+
+Intro
+=====
+
+This default configuration will allow you to start experimenting with the
+buildroot environment for the NanoPi NEO. With the current configuration
+it will bring-up the board, and allow access through the serial console.
+
+FriendlyARM Nanopi NEO link:
+https://wiki.friendlyelec.com/wiki/index.php/NanoPi_NEO
+
+How to build
+============
+
+    $ make friendlyarm_nanopi_neo_defconfig
+    $ make
+
+Note: you will need access to the internet to download the required
+sources.
+
+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
+  $ sudo sync
+
+Insert the micro SD card in your Nanopi NEO and power it up. The console
+is on the debug TTL UART, 115200 8N1.
+
+Ethernet
+==========
+
+  # udhcpc -i eth0
+
+Enjoy!

+ 48 - 0
configs/friendlyarm_nanopi_neo_defconfig

@@ -0,0 +1,48 @@
+# Architecture
+BR2_arm=y
+BR2_cortex_a7=y
+BR2_ARM_FPU_VFPV4=y
+
+# Linux headers same as kernel, a 6.6 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y
+
+# Hashes
+BR2_GLOBAL_PATCH_DIR="board/friendlyarm/nanopi-neo/patches"
+BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
+
+# System
+BR2_TARGET_GENERIC_HOSTNAME="nanopi-neo"
+BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for the NanoPi NEO"
+
+# Image
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/friendlyarm/nanopi-neo/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/friendlyarm/nanopi-neo/genimage.cfg"
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.44"
+BR2_LINUX_KERNEL_DEFCONFIG="sunxi"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun8i-h3-nanopi-neo"
+BR2_LINUX_KERNEL_INSTALL_TARGET=y
+
+# Filesystem
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+
+# Bootloader
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2024.07"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="nanopi_neo"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y
+BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
+BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
+BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-sunxi-with-spl.bin"
+
+# Host utilities
+BR2_PACKAGE_HOST_GENIMAGE=y