From patchwork Sat Jun 13 18:32:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Suniel Mahesh X-Patchwork-Id: 1308733 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.a=rsa-sha256 header.s=google header.b=b7D7BVHx; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49kmS00Mtxz9sRN for ; Sun, 14 Jun 2020 04:33:02 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 293F189352; Sat, 13 Jun 2020 18:32:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VYAutdXS0ySf; Sat, 13 Jun 2020 18:32:57 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id E6BB488171; Sat, 13 Jun 2020 18:32:56 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id B19D61BF2FC for ; Sat, 13 Jun 2020 18:32:55 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 977D820471 for ; Sat, 13 Jun 2020 18:32:55 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yBtrFjxxCXfA for ; Sat, 13 Jun 2020 18:32:54 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pl1-f196.google.com (mail-pl1-f196.google.com [209.85.214.196]) by silver.osuosl.org (Postfix) with ESMTPS id D79252041C for ; Sat, 13 Jun 2020 18:32:53 +0000 (UTC) Received: by mail-pl1-f196.google.com with SMTP id d8so5059363plo.12 for ; Sat, 13 Jun 2020 11:32:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=d6M1TNOtNGpH/DFcmzi1ge1cMurZR105YdoQALC1ZtY=; b=b7D7BVHxk37OsWF2DN/+7qUXFUrfH1KTfM+O8ZOVBAKjf+kK364C6Fxb0v5ITiFLII I80QXgxj9JdBJm+WuAdtinBjbozsrO22vJNLWyd46PC1BgvCZIVZsGTwTReXI2YTd0UT 3VVU8oT6SwIjLQHxCaAhUvqIW/VX+nECYjdd4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=d6M1TNOtNGpH/DFcmzi1ge1cMurZR105YdoQALC1ZtY=; b=E9S5qBFDJkZxcYlEAYY4zNLb5pa4tmECEOwf73f2B1IV26I+Ckox5qX3GGNXdfn8vp QYi52h9wGinDW1EJvux+jTQGkNJoG/lNZr8QwEfRBUNxIvR2XUy5L78BQmKJmM34THBe 7ALfhetQJZuYMCD4YGh9oyhJA2koRT2m2kiPPwSnlMWbvbjUWlDzoYg7xSjR6TrPtdMv 4B7b4YHi7UHBv9OJxxItjjQB0YuNok3FZyBvUiiCIVYjkYhYKz3Uw71NH2OD7G+0/FRC Pt/Vye0CvPDWAtk3qseUdkBJFBki61uPcDozUcjgyp9vOLWTBYyxd0gEXnbpeXdMOhYB XQDQ== X-Gm-Message-State: AOAM533I3UpYqQvFyKtKhcyBT+JJPA5CEnoZvDzeQAi3KkrkFdEZhTBF R0gNSUYhWDxpX1jCVWKAzYRZ/XIwLKctYA== X-Google-Smtp-Source: ABdhPJxLqGjcygtPCCmbMcrjXtph2GsS1FZ9VKHjUEaGWwspk1qVKT5jQ/rmBBjGxtjxBbrBfsTnyQ== X-Received: by 2002:a17:902:6804:: with SMTP id h4mr15896759plk.135.1592073172895; Sat, 13 Jun 2020 11:32:52 -0700 (PDT) Received: from localhost.localdomain ([42.111.144.111]) by smtp.gmail.com with ESMTPSA id 191sm9556217pfy.161.2020.06.13.11.32.50 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 Jun 2020 11:32:52 -0700 (PDT) From: sunil@amarulasolutions.com To: buildroot@buildroot.org, thomas.petazzoni@bootlin.com Date: Sun, 14 Jun 2020 00:02:31 +0530 Message-Id: <1592073154-13731-2-git-send-email-sunil@amarulasolutions.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1592073154-13731-1-git-send-email-sunil@amarulasolutions.com> References: <1592073154-13731-1-git-send-email-sunil@amarulasolutions.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/4] configs/rockpro64: new defconfig X-BeenThere: buildroot@busybox.net 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: peter@korsgaard.com, jagan@amarulasolutions.com, Suniel Mahesh Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Suniel Mahesh A defconfig for the rockpro64 was added in 59e1077b4ebe79622a454b0a8a840e4349a0440d, but then removed in 10f49213b7e2837ae6ed63fc16fbdaa954ecd87f because an ARM32 compiler was needed to build ATF, and this was not supported back then. Now, since package/arm-gnu-a-toolchain/ has been added, this defconfig can be re-introduced. Following new changes are introduced in comparision with the older changeset: - renamed defconfig from pine64_rockpro64 to rockpro64 - updated readme - using a GPT partition layout - update defconfig to build ATF - bump u-boot to 2020.04 - bump linux to 5.4.35 Signed-off-by: Suniel Mahesh Reviewed-by: Jagan Teki --- NOTE: - This patch is a resend. Earlier patch is at: https://patchwork.ozlabs.org/project/buildroot/list/?series=174279 - bumped linux version from 5.4.36 to 5.4.46 - Changes have been done based on comments by Thomas Pettazzoni on the mailing list. --- .gitlab-ci.yml | 1 + DEVELOPERS | 2 ++ board/pine64/rockpro64/extlinux.conf | 4 +++ board/pine64/rockpro64/genimage.cfg | 39 +++++++++++++++++++++++ board/pine64/rockpro64/post-build.sh | 5 +++ board/pine64/rockpro64/readme.txt | 60 ++++++++++++++++++++++++++++++++++++ configs/rockpro64_defconfig | 56 +++++++++++++++++++++++++++++++++ 7 files changed, 167 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/rockpro64_defconfig diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 951f843..6825862 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -319,6 +319,7 @@ raspberrypi_defconfig: { extends: .defconfig } riotboard_defconfig: { extends: .defconfig } roc_pc_rk3399_defconfig: { extends: .defconfig } rock64_defconfig: { extends: .defconfig } +rockpro64_defconfig: { extends: .defconfig } roseapplepi_defconfig: { extends: .defconfig } s6lx9_microboard_defconfig: { extends: .defconfig } sheevaplug_defconfig: { extends: .defconfig } diff --git a/DEVELOPERS b/DEVELOPERS index 9a94307..337135b 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -2392,7 +2392,9 @@ F: package/powertop/ N: Suniel Mahesh F: board/firefly/ +F: board/pine64/rockpro64 F: configs/roc_pc_rk3399_defconfig +F: configs/rockpro64_defconfig F: package/arm-gnu-a-toolchain/ N: Sven Haardiek diff --git a/board/pine64/rockpro64/extlinux.conf b/board/pine64/rockpro64/extlinux.conf new file mode 100644 index 0000000..ea081a1 --- /dev/null +++ b/board/pine64/rockpro64/extlinux.conf @@ -0,0 +1,4 @@ +label RK3399_ROCKPRO64 linux + kernel /Image + devicetree /rk3399-rockpro64.dtb + append earlycon=uart8250,mmio32,0xff1a0000 root=/dev/mmcblk0p4 rw rootwait diff --git a/board/pine64/rockpro64/genimage.cfg b/board/pine64/rockpro64/genimage.cfg new file mode 100644 index 0000000..41358ed --- /dev/null +++ b/board/pine64/rockpro64/genimage.cfg @@ -0,0 +1,39 @@ +image boot.vfat { + vfat { + files = { + "Image", + "rk3399-rockpro64.dtb", + "extlinux" + } + } + size = 112M +} + +image sdcard.img { + + hdimage { + gpt = true + } + + partition loader1 { + image = "idbloader.img" + offset = 32K + } + + partition loader2 { + image = "u-boot.itb" + offset = 8M + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + offset = 16M + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/board/pine64/rockpro64/post-build.sh b/board/pine64/rockpro64/post-build.sh new file mode 100755 index 0000000..ba29375 --- /dev/null +++ b/board/pine64/rockpro64/post-build.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +BOARD_DIR="$(dirname $0)" + +install -m 0644 -D $BOARD_DIR/extlinux.conf $BINARIES_DIR/extlinux/extlinux.conf diff --git a/board/pine64/rockpro64/readme.txt b/board/pine64/rockpro64/readme.txt new file mode 100644 index 0000000..de86970 --- /dev/null +++ b/board/pine64/rockpro64/readme.txt @@ -0,0 +1,60 @@ +PINE64 ROCKPro64 +================ +https://www.pine64.org/rockpro64/ + +Build: +====== + $ make rockpro64_defconfig + $ make + +Files created in output directory +================================= + +output/images + +├── bl31.elf +├── boot.vfat +├── extlinux +├── idbloader.img +├── Image +├── rk3399-rockpro64.dtb +├── rootfs.ext2 +├── rootfs.ext4 -> rootfs.ext2 +├── rootfs.tar +├── sdcard.img +├── u-boot.bin +└── u-boot.itb + +Creating bootable SD card: +========================== + +Simply invoke (as root) + +sudo dd if=output/images/sdcard.img of=/dev/sdX && sync + +Where X is your SD card device. + +Booting: +======== +RockPro64 has a 40-pin PI-2 GPIO Bus. + +Connect a jumper between pin 23 and pin 25 for SD card boot. + +Serial console: +--------------- +The pin layout for serial console on PI-2 GPIO Bus is as follows: + +pin 6: gnd +pin 8: tx +pin 10: rx + +Initially connect pin 6 and pin 8(transmit). Apply power to RockPro64, once the +power is on then connect pin 10(receive). + +Baudrate for this board is 1500000. + +Login: +------ +Enter 'root' as login user, and the prompt is ready. + +https://wiki.amarulasolutions.com/bsp/rockchip/rk3399/rockpro64.html diff --git a/configs/rockpro64_defconfig b/configs/rockpro64_defconfig new file mode 100644 index 0000000..7fff436 --- /dev/null +++ b/configs/rockpro64_defconfig @@ -0,0 +1,56 @@ +# Architecture +BR2_aarch64=y +BR2_cortex_a72_a53=y + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +# Firmware +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="11a0a46a899fcc3b1fdb214b382f3d7495d88eca" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="rk3399" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_ARM32_TOOLCHAIN=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES="" + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.04" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="rockpro64-rk3399" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYTHON=y +BR2_TARGET_UBOOT_NEEDS_PYTHON3=y +BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y +BR2_TARGET_UBOOT_NEEDS_ATF_BL31_ELF=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.itb" +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="idbloader.img" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.46" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="rockchip/rk3399-rockpro64" +BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Filesystem +BR2_TARGET_GENERIC_HOSTNAME="rockpro64" +BR2_TARGET_GENERIC_ISSUE="Welcome to ROCKPRO64..!!" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="96M" +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/pine64/rockpro64/genimage.cfg" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/pine64/rockpro64/post-build.sh" From patchwork Sat Jun 13 18:32:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Suniel Mahesh X-Patchwork-Id: 1308735 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.a=rsa-sha256 header.s=google header.b=kaWMWGYZ; dkim-atps=neutral Received: from silver.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 ozlabs.org (Postfix) with ESMTPS id 49kmS14hsdz9sR4 for ; Sun, 14 Jun 2020 04:33:05 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 961A52041C; Sat, 13 Jun 2020 18:33:02 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kEOsnez7fchI; Sat, 13 Jun 2020 18:33:00 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 8C36E20471; Sat, 13 Jun 2020 18:32:59 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id D78701BF2FC for ; Sat, 13 Jun 2020 18:32:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id D361187849 for ; Sat, 13 Jun 2020 18:32:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ox3BjtIJSY9q for ; Sat, 13 Jun 2020 18:32:57 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pf1-f195.google.com (mail-pf1-f195.google.com [209.85.210.195]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 74D768752D for ; Sat, 13 Jun 2020 18:32:56 +0000 (UTC) Received: by mail-pf1-f195.google.com with SMTP id d66so5892064pfd.6 for ; Sat, 13 Jun 2020 11:32:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OLozSow3eHBz/wgSq+jSe9bXBac4ayiGSghlCC0kxgo=; b=kaWMWGYZqzSgjAhMdYU4sikT2yN6iuv1pZpVzxRWuSiGLuU32zluN+OW10VOp3JAmK nOWuBq6fxGEQvCJvWUOUEynS1L4MQ8uc7OqCUVKuz/cp8GHoNaftZvlDjc09y/kvZJSh IQxtfi5rfHtUoub21nK5xyWPDCzdaFdT2hFw8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OLozSow3eHBz/wgSq+jSe9bXBac4ayiGSghlCC0kxgo=; b=PUWafBrLVFoPTuYhaqlXEBe2hKymRM961jH4KGtu5Dv+Yx9FGH8XHW48+oJPaSPWWZ whjk7fPUfhObG7nV/Sr7QnoVAAe9zse0Af4dOywM79NWiT6OPqjtlJ95EjBtUGAHKE0H Cq5NBjgTay6pOccCdM45+yE4w3iyOrpu8TeowUqfeuXhSBV59ZCxqvACOZmFAN0QtHcb 8clA15hhss/VM7FCuRTacE5/altJP04RVyRV8fBB2lpNfEq77j6knuE7yfQPr4mTWpCl bcclMtghSXTxt8Avn39K+oUZy9YazsRf/eiI7Lfa7XkCA8OUPzCj1fzTRmbrGCcV4XuC Ke8g== X-Gm-Message-State: AOAM532Wz7RkIytC/JnHVtASCernEiNHYNsCYynzEx84CO4CUPzn9Yas fMe/WRX5GF4rOYq3be14OKq60SJmPvSIWA== X-Google-Smtp-Source: ABdhPJxdW8jdQTD105ulalDf1yHDG3J+ieDtD+reA04K65DEuG93fOfCasiOL1zTGzO9asgMtOcyVg== X-Received: by 2002:aa7:8f25:: with SMTP id y5mr16890773pfr.82.1592073176080; Sat, 13 Jun 2020 11:32:56 -0700 (PDT) Received: from localhost.localdomain ([42.111.144.111]) by smtp.gmail.com with ESMTPSA id 191sm9556217pfy.161.2020.06.13.11.32.53 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 Jun 2020 11:32:55 -0700 (PDT) From: sunil@amarulasolutions.com To: buildroot@buildroot.org, thomas.petazzoni@bootlin.com Date: Sun, 14 Jun 2020 00:02:32 +0530 Message-Id: <1592073154-13731-3-git-send-email-sunil@amarulasolutions.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1592073154-13731-1-git-send-email-sunil@amarulasolutions.com> References: <1592073154-13731-1-git-send-email-sunil@amarulasolutions.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 2/4] configs/orangepi_rk3399: new defconfig X-BeenThere: buildroot@busybox.net 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: peter@korsgaard.com, jagan@amarulasolutions.com, Suniel Mahesh Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Suniel Mahesh Add initial support for Orangepi RK3399 target with below features: - U-Boot 2020.04 - Linux 5.4.46 - Default packages from buildroot Signed-off-by: Suniel Mahesh Reviewed-by: Jagan Teki --- NOTE: - This patch is a resend. earlier patch is at: https://patchwork.ozlabs.org/project/buildroot/list/?series=174279 - bumped linux version from 5.4.36 to 5.4.46 - As suggested by Thomas Pettazzoni, rk3399 targets does not need pylibfdt or pyelftools, but only a host Python interpreter. Remove them and add python, python3 in defconfig. --- .gitlab-ci.yml | 1 + DEVELOPERS | 2 + board/orangepi/orangepi-rk3399/extlinux.conf | 4 ++ board/orangepi/orangepi-rk3399/genimage.cfg | 39 +++++++++++++++++++ board/orangepi/orangepi-rk3399/post-build.sh | 5 +++ board/orangepi/orangepi-rk3399/readme.txt | 56 ++++++++++++++++++++++++++++ configs/orangepi_rk3399_defconfig | 56 ++++++++++++++++++++++++++++ 7 files changed, 163 insertions(+) create mode 100644 board/orangepi/orangepi-rk3399/extlinux.conf create mode 100644 board/orangepi/orangepi-rk3399/genimage.cfg create mode 100755 board/orangepi/orangepi-rk3399/post-build.sh create mode 100644 board/orangepi/orangepi-rk3399/readme.txt create mode 100644 configs/orangepi_rk3399_defconfig diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6825862..66c7b72 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -259,6 +259,7 @@ orangepi_pc_plus_defconfig: { extends: .defconfig } orangepi_plus_defconfig: { extends: .defconfig } orangepi_prime_defconfig: { extends: .defconfig } orangepi_r1_defconfig: { extends: .defconfig } +orangepi_rk3399_defconfig: { extends: .defconfig } orangepi_win_defconfig: { extends: .defconfig } orangepi_zero_defconfig: { extends: .defconfig } orangepi_zero_plus2_defconfig: { extends: .defconfig } diff --git a/DEVELOPERS b/DEVELOPERS index 337135b..6b7421a 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -2392,7 +2392,9 @@ F: package/powertop/ N: Suniel Mahesh F: board/firefly/ +F: board/orangepi/orangepi-rk3399 F: board/pine64/rockpro64 +F: configs/orangepi_rk3399_defconfig F: configs/roc_pc_rk3399_defconfig F: configs/rockpro64_defconfig F: package/arm-gnu-a-toolchain/ diff --git a/board/orangepi/orangepi-rk3399/extlinux.conf b/board/orangepi/orangepi-rk3399/extlinux.conf new file mode 100644 index 0000000..5109625 --- /dev/null +++ b/board/orangepi/orangepi-rk3399/extlinux.conf @@ -0,0 +1,4 @@ +label RK3399_ROCKPRO64 linux + kernel /Image + devicetree /rk3399-orangepi.dtb + append earlycon=uart8250,mmio32,0xff1a0000 root=/dev/mmcblk1p4 rw rootwait diff --git a/board/orangepi/orangepi-rk3399/genimage.cfg b/board/orangepi/orangepi-rk3399/genimage.cfg new file mode 100644 index 0000000..9d63e30 --- /dev/null +++ b/board/orangepi/orangepi-rk3399/genimage.cfg @@ -0,0 +1,39 @@ +image boot.vfat { + vfat { + files = { + "Image", + "rk3399-orangepi.dtb", + "extlinux" + } + } + size = 112M +} + +image sdcard.img { + + hdimage { + gpt = true + } + + partition loader1 { + image = "idbloader.img" + offset = 32K + } + + partition loader2 { + image = "u-boot.itb" + offset = 8M + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + offset = 16M + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/board/orangepi/orangepi-rk3399/post-build.sh b/board/orangepi/orangepi-rk3399/post-build.sh new file mode 100755 index 0000000..ba29375 --- /dev/null +++ b/board/orangepi/orangepi-rk3399/post-build.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +BOARD_DIR="$(dirname $0)" + +install -m 0644 -D $BOARD_DIR/extlinux.conf $BINARIES_DIR/extlinux/extlinux.conf diff --git a/board/orangepi/orangepi-rk3399/readme.txt b/board/orangepi/orangepi-rk3399/readme.txt new file mode 100644 index 0000000..197e1fb --- /dev/null +++ b/board/orangepi/orangepi-rk3399/readme.txt @@ -0,0 +1,56 @@ +Orangepi Rk3399 +================ +http://www.orangepi.org/Orange%20Pi%20RK3399/ + +Build: +====== + $ make orangepi_rk3399_defconfig + $ make + +Files created in output directory +================================= + +output/images + +├── bl31.elf +├── boot.vfat +├── extlinux +├── idbloader.img +├── Image +├── rk3399-orangepi.dtb +├── rootfs.ext2 +├── rootfs.ext4 -> rootfs.ext2 +├── rootfs.tar +├── sdcard.img +├── u-boot.bin +└── u-boot.itb + +Creating bootable SD card: +========================== + +Simply invoke (as root) + +sudo dd if=output/images/sdcard.img of=/dev/sdX && sync + +Where X is your SD card device. + +Booting: +======== +Orangepi-RK3399 by default boots from emmc. For SD card boot to +happen, emmc should be empty. If emmc happens to have any bootable +image then erase emmc so that bootrom will look for a proper image in SD. + +emmc can be erased once after booted into linux as shown in below link. + +https://wiki.amarulasolutions.com/bsp/setup/rockchip/rk3399_emmc.html + +Serial console: +--------------- + +Baudrate for this board is 1500000. + +Login: +------ +Enter 'root' as login user, and the prompt is ready. + +https://wiki.amarulasolutions.com/bsp/rockchip/rk3399/orangepi.html diff --git a/configs/orangepi_rk3399_defconfig b/configs/orangepi_rk3399_defconfig new file mode 100644 index 0000000..5b9ce2f --- /dev/null +++ b/configs/orangepi_rk3399_defconfig @@ -0,0 +1,56 @@ +# Architecture +BR2_aarch64=y +BR2_cortex_a72_a53=y + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +# Firmware +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="11a0a46a899fcc3b1fdb214b382f3d7495d88eca" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="rk3399" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_ARM32_TOOLCHAIN=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES="" + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.04" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="orangepi-rk3399" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYTHON=y +BR2_TARGET_UBOOT_NEEDS_PYTHON3=y +BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y +BR2_TARGET_UBOOT_NEEDS_ATF_BL31_ELF=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.itb" +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="idbloader.img" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.46" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="rockchip/rk3399-orangepi" +BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Filesystem +BR2_TARGET_GENERIC_HOSTNAME="orangepi-rk3399" +BR2_TARGET_GENERIC_ISSUE="Welcome to ORANGEPI-RK3399..!!" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="96M" +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/orangepi/orangepi-rk3399/genimage.cfg" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/orangepi/orangepi-rk3399/post-build.sh" From patchwork Sat Jun 13 18:32:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Suniel Mahesh X-Patchwork-Id: 1308739 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.a=rsa-sha256 header.s=google header.b=BqubcC5v; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49kmZd4MmWz9sR4 for ; Sun, 14 Jun 2020 04:38:49 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id BD6D987A1A; Sat, 13 Jun 2020 18:38:45 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rG2MamMNARNU; Sat, 13 Jun 2020 18:38:42 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id B37BB87A58; Sat, 13 Jun 2020 18:38:42 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id CEEAF1BF2FC for ; Sat, 13 Jun 2020 18:38:40 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id BBDA1204ED for ; Sat, 13 Jun 2020 18:38:40 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eDZc0APFK7mE for ; Sat, 13 Jun 2020 18:38:39 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by silver.osuosl.org (Postfix) with ESMTPS id 199E6203F3 for ; Sat, 13 Jun 2020 18:38:39 +0000 (UTC) Received: by mail-pg1-f194.google.com with SMTP id e18so5691490pgn.7 for ; Sat, 13 Jun 2020 11:38:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=swbtygIXyfmfa+UYV7dpl5ArsmW0uCvDEvWB5vQmSxk=; b=BqubcC5vujED3sFYyFKcG/Pk5vNHD14FglXd1j6sgqE+aqNFx9xACU0GCIgw0nNcfm 3fB+yTyP11EMO6VKZsrYyGhKyXnQytoKXTzs4FYOsf7mBiFmaupXVNn2V4J9mpNCamFX RUYBaCs9xDE2Fy1fEgsDuUKBOQApAiegDBjdU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=swbtygIXyfmfa+UYV7dpl5ArsmW0uCvDEvWB5vQmSxk=; b=nEEGrdQo+PtEuGMIZBY3jY5e9TThEYcBqQDrM7FymbGeoZWqxHfYYlkwDVetlMGjWU hUIo1aamqAc9K7dpQ370S+Ei8Rtmz3LDh/mW1XDjIoQouT2MT93mM161CJ1xsP9XmbsU vzQ+csYCr4apbtHlDtGuqCUv+C9CJSNzcXLxZjaFG9Y24U+n+Um+3evrHCFtC4GqZKup aic3c6FjSaYfQleGlHPjLt151eR90aXz//sbDoWtqp0G713xL/d6ceTf50u5LEO1hKJP 7uHJXVFT/5nc2eNwCYqktJ1XKC6W/OrLzCvLa2nLyoKzllEDrlnXzXTIuGKVAI6HFz4G mzyg== X-Gm-Message-State: AOAM530SQLMkNznrwNDdRo61LyYYH1RrWXeNVCUSHcyFUoLtwjYmp7bM S5VtEwKxFXmq4sXVgk83TNDyfrBU5VzCpg== X-Google-Smtp-Source: ABdhPJzWvWEkpkiHtxhNQMSjygXA/UM05XsO1PqDgzslKEFmoUYOy12gejbJSzTWOR3/7W4DY+1VdA== X-Received: by 2002:a17:902:c411:: with SMTP id k17mr15127834plk.165.1592073179201; Sat, 13 Jun 2020 11:32:59 -0700 (PDT) Received: from localhost.localdomain ([42.111.144.111]) by smtp.gmail.com with ESMTPSA id 191sm9556217pfy.161.2020.06.13.11.32.56 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 Jun 2020 11:32:58 -0700 (PDT) From: sunil@amarulasolutions.com To: buildroot@buildroot.org, thomas.petazzoni@bootlin.com Date: Sun, 14 Jun 2020 00:02:33 +0530 Message-Id: <1592073154-13731-4-git-send-email-sunil@amarulasolutions.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1592073154-13731-1-git-send-email-sunil@amarulasolutions.com> References: <1592073154-13731-1-git-send-email-sunil@amarulasolutions.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 3/4] configs/nanopi_m4: new defconfig X-BeenThere: buildroot@busybox.net 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: peter@korsgaard.com, jagan@amarulasolutions.com, Suniel Mahesh Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Suniel Mahesh A defconfig for the friendlyarm nanopi-m4 was added in 493c3979a4def978a1137cf8543bf0de50d2615e, but then removed in a24bd8936f57a590f810e14d7828cf1bddce580e because an ARM32 compiler was needed to build ATF, and this was not supported back then. Now, since package/arm-gnu-a-toolchain/ has been added, this defconfig can be re-introduced. Following new changes are introduced in comparision with the older changeset: - readme updated - GPT partition layout - update defconfig to build ATF - bump u-boot to 2020.04 - bump linux to 5.4.46 Signed-off-by: Suniel Mahesh Reviewed-by: Jagan Teki --- NOTE: - new patch --- .gitlab-ci.yml | 1 + DEVELOPERS | 2 ++ board/friendlyarm/nanopi-m4/extlinux.conf | 4 +++ board/friendlyarm/nanopi-m4/genimage.cfg | 39 +++++++++++++++++++++ board/friendlyarm/nanopi-m4/post-build.sh | 5 +++ board/friendlyarm/nanopi-m4/readme.txt | 45 +++++++++++++++++++++++++ configs/nanopi_m4_defconfig | 56 +++++++++++++++++++++++++++++++ 7 files changed, 152 insertions(+) create mode 100644 board/friendlyarm/nanopi-m4/extlinux.conf create mode 100644 board/friendlyarm/nanopi-m4/genimage.cfg create mode 100755 board/friendlyarm/nanopi-m4/post-build.sh create mode 100644 board/friendlyarm/nanopi-m4/readme.txt create mode 100644 configs/nanopi_m4_defconfig diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 66c7b72..4ff0b4b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -227,6 +227,7 @@ mx6sx_udoo_neo_defconfig: { extends: .defconfig } mx6udoo_defconfig: { extends: .defconfig } nanopi_m1_defconfig: { extends: .defconfig } nanopi_m1_plus_defconfig: { extends: .defconfig } +nanopi_m4_defconfig: { extends: .defconfig } nanopi_neo4_defconfig: { extends: .defconfig } nanopi_neo_defconfig: { extends: .defconfig } nanopi_r1_defconfig: { extends: .defconfig } diff --git a/DEVELOPERS b/DEVELOPERS index 6b7421a..220bb34 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -2392,8 +2392,10 @@ F: package/powertop/ N: Suniel Mahesh F: board/firefly/ +F: board/friendlyarm/nanopi-m4 F: board/orangepi/orangepi-rk3399 F: board/pine64/rockpro64 +F: configs/nanopi_m4_defconfig F: configs/orangepi_rk3399_defconfig F: configs/roc_pc_rk3399_defconfig F: configs/rockpro64_defconfig diff --git a/board/friendlyarm/nanopi-m4/extlinux.conf b/board/friendlyarm/nanopi-m4/extlinux.conf new file mode 100644 index 0000000..fb24f09 --- /dev/null +++ b/board/friendlyarm/nanopi-m4/extlinux.conf @@ -0,0 +1,4 @@ +label RK3399_NANOPI_M4 linux + kernel /Image + devicetree /rk3399-nanopi-m4.dtb + append earlycon=uart8250,mmio32,0xff1a0000 root=/dev/mmcblk1p4 rw rootwait diff --git a/board/friendlyarm/nanopi-m4/genimage.cfg b/board/friendlyarm/nanopi-m4/genimage.cfg new file mode 100644 index 0000000..8a2e981 --- /dev/null +++ b/board/friendlyarm/nanopi-m4/genimage.cfg @@ -0,0 +1,39 @@ +image boot.vfat { + vfat { + files = { + "Image", + "rk3399-nanopi-m4.dtb", + "extlinux" + } + } + size = 112M +} + +image sdcard.img { + + hdimage { + gpt = true + } + + partition loader1 { + image = "idbloader.img" + offset = 32K + } + + partition loader2 { + image = "u-boot.itb" + offset = 8M + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + offset = 16M + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/board/friendlyarm/nanopi-m4/post-build.sh b/board/friendlyarm/nanopi-m4/post-build.sh new file mode 100755 index 0000000..ba29375 --- /dev/null +++ b/board/friendlyarm/nanopi-m4/post-build.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +BOARD_DIR="$(dirname $0)" + +install -m 0644 -D $BOARD_DIR/extlinux.conf $BINARIES_DIR/extlinux/extlinux.conf diff --git a/board/friendlyarm/nanopi-m4/readme.txt b/board/friendlyarm/nanopi-m4/readme.txt new file mode 100644 index 0000000..4a606cf --- /dev/null +++ b/board/friendlyarm/nanopi-m4/readme.txt @@ -0,0 +1,45 @@ +FriendlyARM NANOPI-M4 +===================== + +Build: + + $ make nanopi_m4_defconfig + $ make + +Files created in output directory +================================= + +output/images + +├── bl31.elf +├── boot.vfat +├── extlinux +├── idbloader.img +├── Image +├── rk3399-nanopi-m4.dtb +├── rootfs.ext2 +├── rootfs.ext4 -> rootfs.ext2 +├── rootfs.tar +├── sdcard.img +├── u-boot.bin +└── u-boot.itb + +Creating bootable SD card: +========================== + +Simply invoke (as root) + +sudo dd if=output/images/sdcard.img of=/dev/sdX && sync + +Where X is your SD card device + +Serial console +-------------- + +Baudrate for this board is 1500000 + +Login: +------ +Enter 'root' as login user, and the prompt is ready. + +https://wiki.amarulasolutions.com/bsp/rockchip/rk3399/nanopi_m4.html diff --git a/configs/nanopi_m4_defconfig b/configs/nanopi_m4_defconfig new file mode 100644 index 0000000..c824b15 --- /dev/null +++ b/configs/nanopi_m4_defconfig @@ -0,0 +1,56 @@ +# Architecture +BR2_aarch64=y +BR2_cortex_a72_a53=y + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +# Firmware +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="11a0a46a899fcc3b1fdb214b382f3d7495d88eca" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="rk3399" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_ARM32_TOOLCHAIN=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES="" + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.04" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="nanopi-m4-rk3399" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYTHON=y +BR2_TARGET_UBOOT_NEEDS_PYTHON3=y +BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y +BR2_TARGET_UBOOT_NEEDS_ATF_BL31_ELF=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.itb" +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="idbloader.img" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.46" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="rockchip/rk3399-nanopi-m4" +BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Filesystem +BR2_TARGET_GENERIC_HOSTNAME="nanopi-m4" +BR2_TARGET_GENERIC_ISSUE="Welcome to NANOPI-M4" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="96M" +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/friendlyarm/nanopi-m4/genimage.cfg" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/friendlyarm/nanopi-m4/post-build.sh" From patchwork Sat Jun 13 18:32:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Suniel Mahesh X-Patchwork-Id: 1308736 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.a=rsa-sha256 header.s=google header.b=EKGVUcGV; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49kmS74llbz9sR4 for ; Sun, 14 Jun 2020 04:33:11 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id B662A894D3; Sat, 13 Jun 2020 18:33:07 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BFXiyjOSUL-6; Sat, 13 Jun 2020 18:33:06 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 1278189473; Sat, 13 Jun 2020 18:33:06 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id CDF5D1BF2FC for ; Sat, 13 Jun 2020 18:33:04 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id C87CF8879C for ; Sat, 13 Jun 2020 18:33:04 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id p79h0+O-s32q for ; Sat, 13 Jun 2020 18:33:03 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) by whitealder.osuosl.org (Postfix) with ESMTPS id 46A70879FD for ; Sat, 13 Jun 2020 18:33:03 +0000 (UTC) Received: by mail-pf1-f196.google.com with SMTP id x207so5895677pfc.5 for ; Sat, 13 Jun 2020 11:33:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MGMo7OfvhDwgUbu2ffpYxIT+819DjYlQEfeqn9rHiCo=; b=EKGVUcGVySSVsnUtu+ALQARR0QwE3F+NBjB60yJRy5WN125aOuNdQeqZfR0fDXFXua +rFHDddndjkj0Scq86DwvQmsI/JVCXRZhfaQ51NP5CYGp9SpQrMDGqlTiRnxZW1C68Je wFN6f/z8uYoljv13ieainARJudHFV7RsLTJA8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=MGMo7OfvhDwgUbu2ffpYxIT+819DjYlQEfeqn9rHiCo=; b=Kl+1K4shKV+bdxZQZPE6wY0+ggfpaQKyAZS6LYMkUp9mqgMEpLPsCTRcpbwbxjNZXM taqYD+ODuO4rbUq6ruDA5oiXi4eppm+V6gyr5kkrDvDFgLjaymTpb25fJWQFA8E75D25 BpB/LnnIaMlesiWvLmu1pOfQ1e/+tsdwjI36nMRgzKyCt8i5yOagXq2X0zGMp0WWmCZY uwDUtvngKM4ilLrW2ra408RhvD3/0hE/IGCv9RpmfkiVWwvakRVd9Gc9VMVxwqxjtZX8 fMarLHQHsILhaidSZI1PtI6vjGqUIC0Q1FplJ0fxkWbyB/oJcflWCHg4vw7mJbVKeD7H x7OA== X-Gm-Message-State: AOAM532iRhvabhgYMpk6B5mq8v5uACgLJt0JcbJnrYQXr1z4lKGPlfsI tUHOnI9D2L39mhrOzNdcBjBIgWSCqO6EHg== X-Google-Smtp-Source: ABdhPJwq65JRE4ykL1mlX6s8K/woo+xjD2rx6h4FEsT9p9Z2tB6Uw906ptEr0TxXfpc5XcQPMlg+5w== X-Received: by 2002:a63:521e:: with SMTP id g30mr11654368pgb.163.1592073182379; Sat, 13 Jun 2020 11:33:02 -0700 (PDT) Received: from localhost.localdomain ([42.111.144.111]) by smtp.gmail.com with ESMTPSA id 191sm9556217pfy.161.2020.06.13.11.32.59 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 Jun 2020 11:33:01 -0700 (PDT) From: sunil@amarulasolutions.com To: buildroot@buildroot.org, thomas.petazzoni@bootlin.com Date: Sun, 14 Jun 2020 00:02:34 +0530 Message-Id: <1592073154-13731-5-git-send-email-sunil@amarulasolutions.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1592073154-13731-1-git-send-email-sunil@amarulasolutions.com> References: <1592073154-13731-1-git-send-email-sunil@amarulasolutions.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 4/4] configs/nanopc_t4: new defconfig X-BeenThere: buildroot@busybox.net 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: peter@korsgaard.com, jagan@amarulasolutions.com, Suniel Mahesh Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Suniel Mahesh A defconfig for the friendlyarm nanopc-t4 was added in c23895f06e0988319a1959764a402b57bc21ffaf, but then removed in 8efd4463f78fd68c85b45cc0da347dfb805abb7e because an ARM32 compiler was needed to build ATF, and this was not supported back then. Now, since package/arm-gnu-a-toolchain/ has been added, this defconfig can be re-introduced. Following new changes are introduced in comparision with the older changeset: - updated readme - GPT partition layout is being used - update defconfig to build ATF - bump u-boot to 2020.04 - bump linux to 5.4.46 Signed-off-by: Suniel Mahesh Reviewed-by: Jagan Teki --- NOTE: - new patch --- .gitlab-ci.yml | 1 + DEVELOPERS | 2 ++ board/friendlyarm/nanopc-t4/extlinux.conf | 4 +++ board/friendlyarm/nanopc-t4/genimage.cfg | 39 +++++++++++++++++++++ board/friendlyarm/nanopc-t4/post-build.sh | 5 +++ board/friendlyarm/nanopc-t4/readme.txt | 45 +++++++++++++++++++++++++ configs/nanopc_t4_defconfig | 56 +++++++++++++++++++++++++++++++ 7 files changed, 152 insertions(+) create mode 100644 board/friendlyarm/nanopc-t4/extlinux.conf create mode 100644 board/friendlyarm/nanopc-t4/genimage.cfg create mode 100755 board/friendlyarm/nanopc-t4/post-build.sh create mode 100644 board/friendlyarm/nanopc-t4/readme.txt create mode 100644 configs/nanopc_t4_defconfig diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4ff0b4b..a3b268d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -225,6 +225,7 @@ mx53loco_defconfig: { extends: .defconfig } mx6cubox_defconfig: { extends: .defconfig } mx6sx_udoo_neo_defconfig: { extends: .defconfig } mx6udoo_defconfig: { extends: .defconfig } +nanopc_t4_defconfig: { extends: .defconfig } nanopi_m1_defconfig: { extends: .defconfig } nanopi_m1_plus_defconfig: { extends: .defconfig } nanopi_m4_defconfig: { extends: .defconfig } diff --git a/DEVELOPERS b/DEVELOPERS index 220bb34..4a1cab4 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -2392,9 +2392,11 @@ F: package/powertop/ N: Suniel Mahesh F: board/firefly/ +F: board/friendlyarm/nanopc-t4 F: board/friendlyarm/nanopi-m4 F: board/orangepi/orangepi-rk3399 F: board/pine64/rockpro64 +F: configs/nanopc_t4_defconfig F: configs/nanopi_m4_defconfig F: configs/orangepi_rk3399_defconfig F: configs/roc_pc_rk3399_defconfig diff --git a/board/friendlyarm/nanopc-t4/extlinux.conf b/board/friendlyarm/nanopc-t4/extlinux.conf new file mode 100644 index 0000000..31c6b30 --- /dev/null +++ b/board/friendlyarm/nanopc-t4/extlinux.conf @@ -0,0 +1,4 @@ +label RK3399_NanoPC_T4 linux + kernel /Image + devicetree /rk3399-nanopc-t4.dtb + append earlycon=uart8250,mmio32,0xff1a0000 root=/dev/mmcblk1p4 rootwait diff --git a/board/friendlyarm/nanopc-t4/genimage.cfg b/board/friendlyarm/nanopc-t4/genimage.cfg new file mode 100644 index 0000000..7508c7d --- /dev/null +++ b/board/friendlyarm/nanopc-t4/genimage.cfg @@ -0,0 +1,39 @@ +image boot.vfat { + vfat { + files = { + "Image", + "rk3399-nanopc-t4.dtb", + "extlinux" + } + } + size = 112M +} + +image sdcard.img { + + hdimage { + gpt = true + } + + partition loader1 { + image = "idbloader.img" + offset = 32K + } + + partition loader2 { + image = "u-boot.itb" + offset = 8M + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + offset = 16M + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/board/friendlyarm/nanopc-t4/post-build.sh b/board/friendlyarm/nanopc-t4/post-build.sh new file mode 100755 index 0000000..ba29375 --- /dev/null +++ b/board/friendlyarm/nanopc-t4/post-build.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +BOARD_DIR="$(dirname $0)" + +install -m 0644 -D $BOARD_DIR/extlinux.conf $BINARIES_DIR/extlinux/extlinux.conf diff --git a/board/friendlyarm/nanopc-t4/readme.txt b/board/friendlyarm/nanopc-t4/readme.txt new file mode 100644 index 0000000..6259c9e --- /dev/null +++ b/board/friendlyarm/nanopc-t4/readme.txt @@ -0,0 +1,45 @@ +FriendlyARM NANOPC-T4 +===================== + +Build: + + $ make nanopc_t4_defconfig + $ make + +Files created in output directory +================================= + +output/images + +├── bl31.elf +├── boot.vfat +├── extlinux +├── idbloader.img +├── Image +├── rk3399-nanopc-t4.dtb +├── rootfs.ext2 +├── rootfs.ext4 -> rootfs.ext2 +├── rootfs.tar +├── sdcard.img +├── u-boot.bin +└── u-boot.itb + +Creating bootable SD card: +========================== + +Simply invoke (as root) + +sudo dd if=output/images/sdcard.img of=/dev/sdX && sync + +Where X is your SD card device + +Serial console +-------------- + +Baudrate for this board is 1500000 + +Login: +------ +Apply power and press the PWR button for 3 sec. Enter 'root' as login user, and the prompt is ready. + +https://wiki.amarulasolutions.com/bsp/rockchip/rk3399/npc_t4.html diff --git a/configs/nanopc_t4_defconfig b/configs/nanopc_t4_defconfig new file mode 100644 index 0000000..a936f07 --- /dev/null +++ b/configs/nanopc_t4_defconfig @@ -0,0 +1,56 @@ +# Architecture +BR2_aarch64=y +BR2_cortex_a72_a53=y + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +# Firmware +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="11a0a46a899fcc3b1fdb214b382f3d7495d88eca" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="rk3399" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_ARM32_TOOLCHAIN=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES="" + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.04" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="nanopc-t4-rk3399" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYTHON=y +BR2_TARGET_UBOOT_NEEDS_PYTHON3=y +BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y +BR2_TARGET_UBOOT_NEEDS_ATF_BL31_ELF=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.itb" +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="idbloader.img" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.46" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="rockchip/rk3399-nanopc-t4" +BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Filesystem +BR2_TARGET_GENERIC_HOSTNAME="nanopc-t4" +BR2_TARGET_GENERIC_ISSUE="Welcome to NanoPC-T4" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="96M" +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/friendlyarm/nanopc-t4/genimage.cfg" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/friendlyarm/nanopc-t4/post-build.sh"