From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C3899C4332F for ; Sat, 4 Nov 2023 19:23:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 4657060BBA; Sat, 4 Nov 2023 19:23:58 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 4657060BBA X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Xs4YbfXjAIKq; Sat, 4 Nov 2023 19:23:57 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 71B9C60BAC; Sat, 4 Nov 2023 19:23:56 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 71B9C60BAC Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 51D1B1BF372 for ; Sat, 4 Nov 2023 19:23:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 3772A41806 for ; Sat, 4 Nov 2023 19:23:54 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 3772A41806 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qtp0eW8LIcdD for ; Sat, 4 Nov 2023 19:23:52 +0000 (UTC) Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) by smtp4.osuosl.org (Postfix) with ESMTPS id D38C7417C7 for ; Sat, 4 Nov 2023 19:23:52 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org D38C7417C7 Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-6b497c8575aso3398008b3a.1 for ; Sat, 04 Nov 2023 12:23:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699125831; x=1699730631; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=q6etnRIaQLUdiETZxzUERHWeJH7mBfj19qXyIguj908=; b=WmMj5ca3oA72NcwsMdJehLuZNiyu7/UGg/GGaX0UOlZroD61QnSJrsF78HduM6hOZC S5WtK755XRXNbhA48jw2vBc86sW5norcmLmdpstxBGJP9HumiopUoPdeA7swFmzzFDz8 P/+GyiWt3yHUGJYK+p0J/VTRqZ9Y1foBbat3me2kQDfpnjaVSqti6mi0IkK5L3PdkMKe kxzdKgl9S2nNNMrurOTIuuN77QVMET3QMEwfIp95X6bqHn6MSpGNSQN+tN4Kq7pFrK1Q opRfZy9P840pwMV/EP5gDVF0aMTt9N5I8tlygndrGLyUpURF/fUbq15+OUB2Ah2vx9q+ 5CKw== X-Gm-Message-State: AOJu0YyIQ+qBtpm6BH1P+EXfdKbUfKBwkLvIhjI9udQHchJ0D30Iaupy dg/CtxDHfg4XaDeYLWn95T/8P5+1N4Y= X-Google-Smtp-Source: AGHT+IFwRx6o7p+ZQpV+oT/r8MAV2eNq0u7JMIVEjFLsMfCon3io3m8H3DB5T/uupBs2KBg9KRGKEQ== X-Received: by 2002:a05:6a20:7483:b0:16b:e46e:1246 with SMTP id p3-20020a056a20748300b0016be46e1246mr27598404pzd.30.1699125831144; Sat, 04 Nov 2023 12:23:51 -0700 (PDT) Received: from localhost ([142.171.12.18]) by smtp.gmail.com with ESMTPSA id x184-20020a6363c1000000b0057412d84d25sm3181309pgb.4.2023.11.04.12.23.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Nov 2023 12:23:50 -0700 (PDT) From: Scott Fan To: buildroot@buildroot.org Date: Sun, 5 Nov 2023 03:23:33 +0800 Message-Id: <20231104192335.2920640-1-fancp2007@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699125831; x=1699730631; darn=buildroot.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=q6etnRIaQLUdiETZxzUERHWeJH7mBfj19qXyIguj908=; b=OnSM2oUfeyGHFBAzhPFqfifEkx9owCSMd8dYOv6PpJPpJ1BmotiPNnudOmcz/JyzJJ GEXdcvqZSRBnDhpFmcArwHXKLzav2cmrrOWz1ZKvIC/jV0YmXtZLDj3wMyyJFSCnMlOL lkgGyxPCkr5mHUY8VW2pC0REsf8MfsLaDyUg6zsLF11+4mvFNJ3iiVXLb013SrVEM8mz mYggPEgo3ugivD3+Gp9pq7nwPiQXyI7dY2FZRP2NWGi3qL4SuXxEi/z7pTpWgngT87Gt eZWQrf7idjnSooUNd6frxhZq9jDxELxlQV44OGEyp8OiRhRqEOvsDZ4n+VdgKQLJd3wN OI9A== X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=OnSM2oUf Subject: [Buildroot] [PATCH v4] configs/friendlyarm_nanopi_neo2_defconfig: new board X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Scott Fan Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Add support for the FriendlyARM NanoPi NEO2 with mainline components: - U-Boot 2023.10 - Linux 6.1.61 Board's wiki page: - https://wiki.friendlyelec.com/wiki/index.php/NanoPi_NEO2 Signed-off-by: Scott Fan --- Changes v1 -> v2: - Fix issues from 'utils/docker-run make check-package' - Add atf custom version in the defconfig - No need for sudo to run sync Changes v2 -> v3: - Update patch file, add the upstream tag Changes v3 -> v4: - Use a single integrated image file (u-boot-sunxi-with-spl.bin) - Remove patch file for uboot, switch to binman - Merge boot partition into rootfs partition - Bump kernel version to 6.1.61 Signed-off-by: Scott Fan --- board/friendlyarm/nanopi-neo2/extlinux.conf | 4 ++ board/friendlyarm/nanopi-neo2/genimage.cfg | 16 +++++++ board/friendlyarm/nanopi-neo2/post-build.sh | 5 +++ board/friendlyarm/nanopi-neo2/readme.txt | 34 +++++++++++++++ configs/friendlyarm_nanopi_neo2_defconfig | 48 +++++++++++++++++++++ 5 files changed, 107 insertions(+) create mode 100644 board/friendlyarm/nanopi-neo2/extlinux.conf create mode 100644 board/friendlyarm/nanopi-neo2/genimage.cfg create mode 100755 board/friendlyarm/nanopi-neo2/post-build.sh create mode 100644 board/friendlyarm/nanopi-neo2/readme.txt create mode 100644 configs/friendlyarm_nanopi_neo2_defconfig diff --git a/board/friendlyarm/nanopi-neo2/extlinux.conf b/board/friendlyarm/nanopi-neo2/extlinux.conf new file mode 100644 index 0000000000..482a069f74 --- /dev/null +++ b/board/friendlyarm/nanopi-neo2/extlinux.conf @@ -0,0 +1,4 @@ +label friendlyarm-nanopi-buildroot + kernel /boot/Image + devicetree /boot/sun50i-h5-nanopi-neo2.dtb + append console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p1 rootwait diff --git a/board/friendlyarm/nanopi-neo2/genimage.cfg b/board/friendlyarm/nanopi-neo2/genimage.cfg new file mode 100644 index 0000000000..67e4e5efdb --- /dev/null +++ b/board/friendlyarm/nanopi-neo2/genimage.cfg @@ -0,0 +1,16 @@ +image sdcard.img { + hdimage { + } + + partition u-boot-tpl-spl-dtb { + in-partition-table = "no" + image = "u-boot-sunxi-with-spl.bin" + offset = 8K + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + offset = 1M + } +} diff --git a/board/friendlyarm/nanopi-neo2/post-build.sh b/board/friendlyarm/nanopi-neo2/post-build.sh new file mode 100755 index 0000000000..c7ec875068 --- /dev/null +++ b/board/friendlyarm/nanopi-neo2/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" diff --git a/board/friendlyarm/nanopi-neo2/readme.txt b/board/friendlyarm/nanopi-neo2/readme.txt new file mode 100644 index 0000000000..c896a57525 --- /dev/null +++ b/board/friendlyarm/nanopi-neo2/readme.txt @@ -0,0 +1,34 @@ +Intro +===== + +This default configuration will allow you to start experimenting with the +buildroot environment for the NanoPi NEO2. With the current configuration +it will bring-up the board, and allow access through the serial console. + +Wiki link: +https://wiki.friendlyelec.com/wiki/index.php/NanoPi_NEO2 + +This configuration uses U-Boot mainline and kernel mainline. + +How to build +============ + + $ make friendlyarm_nanopi_neo2_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 + $ sync + +Insert the micro SDcard in your NanoPi NEO2 and power it up. The console +is on the serial line, 115200 8N1. diff --git a/configs/friendlyarm_nanopi_neo2_defconfig b/configs/friendlyarm_nanopi_neo2_defconfig new file mode 100644 index 0000000000..9eaacbb192 --- /dev/null +++ b/configs/friendlyarm_nanopi_neo2_defconfig @@ -0,0 +1,48 @@ +BR2_aarch64=y +BR2_cortex_a53=y +BR2_ARM_FPU_VFPV4=y + +# Linux headers same as kernel, a 6.1 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_1=y + +# Firmware +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.7" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="sun50i_a64" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=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="2023.10" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="nanopi_neo2" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y +BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" +BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="SCP=/dev/null" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.1.61" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun50i-h5-nanopi-neo2" +BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Filesystem +BR2_TARGET_GENERIC_ISSUE="Welcome to FriendlyARM NanoPi NEO2" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="120M" +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_ROOTFS_POST_BUILD_SCRIPT="board/friendlyarm/nanopi-neo2/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/friendlyarm/nanopi-neo2/genimage.cfg" -- 2.25.1 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot