Skip to contentSkip to conversation

Revert "configs/rock64_defconfig: remove defconfig"

PATCH New Min Xu 3 participants 7 messages Dec 14, 2020 – Dec 15, 2020

lore
Share & tools
lore

Min Xu

author
#0 lore raw

PATCH 1/2 Revert "configs/rock64_defconfig: remove defconfig"

This reverts commit a5fa2469e6506ea4f5a91739aa099f63a10e45ce.

---
 DEVELOPERS                                    |  2 +
 board/pine64/rock64/extlinux.conf             |  4 +
 board/pine64/rock64/genimage.cfg              | 23 +++++
 ...328-needs-itb-image-to-boot-properly.patch | 32 +++++++
 board/pine64/rock64/post-build.sh             |  9 ++
 board/pine64/rock64/readme.txt                | 95 +++++++++++++++++++
 configs/rock64_defconfig                      | 38 ++++++++
 7 files changed, 203 insertions(+)
 create mode 100644 board/pine64/rock64/extlinux.conf
 create mode 100644 board/pine64/rock64/genimage.cfg
 create mode 100644 board/pine64/rock64/patches/uboot/0001-Makefile-rk3328-needs-itb-image-to-boot-properly.patch
 create mode 100755 board/pine64/rock64/post-build.sh
 create mode 100644 board/pine64/rock64/readme.txt
 create mode 100644 configs/rock64_defconfig
DEVELOPERS +2 -0
index a2c7f7f34a..1944cbb02b 100644
@@ -1858,6 +1858,8 @@ F:	package/libavl/
 
 N:	Micha? ?yszczek <[email protected]>
 F:	board/altera/socrates_cyclone5/
+F:	board/pine64/rock64
+F:	configs/rock64_defconfig
 F:	configs/socrates_cyclone5_defconfig
 F:	package/netifrc/
 F:	package/openrc/
board/pine64/rock64/extlinux.conf new file +4 -0
new file mode 100644
index 0000000000..bf71982a9f
@@ -0,0 +1,4 @@
+label rock64-buildroot
+  kernel /boot/Image
+  devicetree /boot/rk3328-rock64.dtb
+  append console=ttyS2,1500000n8 root=/dev/mmcblk0p1 ro rootwait
board/pine64/rock64/genimage.cfg new file +23 -0
new file mode 100644
index 0000000000..0b5a0d8804
@@ -0,0 +1,23 @@
+image sdcard.img {
+    hdimage {
+    }
+
+    partition uboot-spl {
+        in-partition-table = "no"
+        image = "u-boot-tpl-spl.img"
+        offset = 32768 # 512 * 0x40 from start of sd card
+    }
+
+    partition uboot {
+        in-partition-table = "no"
+        image = "u-boot.itb"
+        offset = 262144 # 512 * 0x200 from start of sd card
+    }
+
+    partition rootfs {
+        partition-type = 0x83
+        bootable = "yes"
+        image = "rootfs.ext2"
+        size = 500M
+    }
+}
board/pine64/rock64/patches/uboot/0001-Makefile-rk3328-needs-itb-image-to-boot-properly.patch new file +32 -0
new file mode 100644
index 0000000000..2d35b78daa
@@ -0,0 +1,32 @@
+From 211bf049084e6e374dac253138fa813682910146 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20=C5=81yszczek?= <[email protected]>
+Date: Tue, 5 Feb 2019 22:08:54 +0100
+Subject: [PATCH] Makefile: rk3328 needs itb image to boot properly
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Micha? ?yszczek <[email protected]>
+---
+ Makefile | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/Makefile b/Makefile
+index 8086f3c93e..a6425b5b03 100644
+--- a/Makefile
++++ b/Makefile
+@@ -799,6 +799,11 @@ ifneq ($(BUILD_ROM),)
+ ALL-$(CONFIG_X86_RESET_VECTOR) += u-boot.rom
+ endif
+ 
++# rk3328 needs itb image to boot properly
++ifeq ($(CONFIG_ROCKCHIP_RK3328),y)
++ALL-y += u-boot.itb
++endif
++
+ # enable combined SPL/u-boot/dtb rules for tegra
+ ifeq ($(CONFIG_TEGRA)$(CONFIG_SPL),yy)
+ ALL-y += u-boot-tegra.bin u-boot-nodtb-tegra.bin
+-- 
+2.18.1
+
board/pine64/rock64/post-build.sh new file +9 -0
new file mode 100755
index 0000000000..26b53cba8e
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+MKIMAGE=$HOST_DIR/bin/mkimage
+BOARD_DIR="$(dirname $0)"
+
+$MKIMAGE -n rk3328 -T rksd -d $BINARIES_DIR/u-boot-tpl.bin $BINARIES_DIR/u-boot-tpl.img
+cat $BINARIES_DIR/u-boot-tpl.img $BINARIES_DIR/u-boot-spl.bin > $BINARIES_DIR/u-boot-tpl-spl.img
+
+install -m 0644 -D $BOARD_DIR/extlinux.conf $TARGET_DIR/boot/extlinux/extlinux.conf
board/pine64/rock64/readme.txt new file +95 -0

95 lines not on this page · raw message

configs/rock64_defconfig new file +38 -0
new file mode 100644
index 0000000000..30bf12c061
@@ -0,0 +1,38 @@
+BR2_aarch64=y
+BR2_GLOBAL_PATCH_DIR="board/pine64/rock64/patches"
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttyS2"
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/pine64/rock64/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/pine64/rock64/genimage.cfg"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.19"
+BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="rockchip/rk3328-rock64"
+BR2_LINUX_KERNEL_INSTALL_TARGET=y
+BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_SIZE="128M"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v1.4"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="rk3328"
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_GIT=y
+BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://github.com/ayufan-rock64/linux-u-boot.git"
+BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="2017.09-rockchip-ayufan-1035-gd646df03ac"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="rock64-rk3328"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=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="spl/u-boot-spl.bin tpl/u-boot-tpl.bin"
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_UBOOT_TOOLS=y
Signature · 1 line
2.20.1
author
#1 lore raw

PATCH 2/2 Defconfigs: fix rock64_defconfig

---
 configs/rock64_defconfig | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
configs/rock64_defconfig +4 -4
index 30bf12c061..df03e357e2 100644
@@ -17,16 +17,16 @@ BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
 BR2_TARGET_ROOTFS_EXT2_SIZE="128M"
 BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
-BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y
-BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v1.4"
 BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="rk3328"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES="bl31/*.elf"
 BR2_TARGET_UBOOT=y
 BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
 BR2_TARGET_UBOOT_CUSTOM_GIT=y
-BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://github.com/ayufan-rock64/linux-u-boot.git"
-BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="2017.09-rockchip-ayufan-1035-gd646df03ac"
+BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://github.com/ayufan-rock64/linux-mainline-u-boot.git"
+BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="release-2020-07"
 BR2_TARGET_UBOOT_BOARD_DEFCONFIG="rock64-rk3328"
 BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_NEEDS_PYTHON3=y
 BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y
 BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y
 BR2_TARGET_UBOOT_NEEDS_ATF_BL31_ELF=y
Signature · 1 line
2.20.1
#2 lore raw

PATCH 2/2 Defconfigs: fix rock64_defconfig

Hello Min,

Adding Michal in Cc.

Le 14/12/2020 ? 20:23, Min Xu a ?crit?:

Quoted 1 line

Please squash your two patches since you add again this defconfig with an updated BSP. As explained in the commit log [1] the rock64 defconfig was removed since it was broken for a long time due to a too old uboot version (2017.09).

Also this is not really a fix since you bump uboot from 2017.09 to 2020.07 from ayufan-rock64 fork.

[1] a5fa2469e6506ea4f5a91739aa099f63a10e45ce

Best regards,
Romain

Quoted 30 lines
---
 configs/rock64_defconfig | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
configs/rock64_defconfig +4 -4
index 30bf12c061..df03e357e2 100644
@@ -17,16 +17,16 @@ BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
 BR2_TARGET_ROOTFS_EXT2_SIZE="128M"
 BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
-BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y
-BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v1.4"
 BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="rk3328"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES="bl31/*.elf"
 BR2_TARGET_UBOOT=y
 BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
 BR2_TARGET_UBOOT_CUSTOM_GIT=y
-BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://github.com/ayufan-rock64/linux-u-boot.git"
-BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="2017.09-rockchip-ayufan-1035-gd646df03ac"
+BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://github.com/ayufan-rock64/linux-mainline-u-boot.git"
+BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="release-2020-07"
 BR2_TARGET_UBOOT_BOARD_DEFCONFIG="rock64-rk3328"
 BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_NEEDS_PYTHON3=y
 BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y
 BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y
 BR2_TARGET_UBOOT_NEEDS_ATF_BL31_ELF=y
author
#3 lore raw

PATCH 2/2 Defconfigs: fix rock64_defconfig

Hi Romain,

Thank you. I just submit another patch configs/rock64: update defconfig
<https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/>
to
replace these two patches.

The original u-boot is also from ayufan-rock64. I tested
the ayufan-rock64/linux-mainline-u-boot. No compile error, and it works on my Rock64 board.

Thanks
Min

Quoted 58 lines · Romain Naour

Hello Min,

Adding Michal in Cc.

Le 14/12/2020 ? 20:23, Min Xu a ?crit :

Quoted 1 line

Please squash your two patches since you add again this defconfig with an updated BSP. As explained in the commit log [1] the rock64 defconfig was removed
since it was broken for a long time due to a too old uboot version (2017.09).

Also this is not really a fix since you bump uboot from 2017.09 to 2020.07 from
ayufan-rock64 fork.

[1] a5fa2469e6506ea4f5a91739aa099f63a10e45ce

Best regards,
Romain

Quoted 10 lines
---
 configs/rock64_defconfig | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
configs/rock64_defconfig +0 -0
index 30bf12c061..df03e357e2 100644
@@ -17,16 +17,16 @@ BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y

configs/rock64_defconfig BR2_TARGET_ROOTFS_EXT2=y · line 26

Quoted 10 lines
configs/rock64_defconfig +1 -3
 BR2_TARGET_ROOTFS_EXT2_SIZE="128M"
 BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
-BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y
-BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v1.4"
 BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="rk3328"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES="bl31/*.elf"
 BR2_TARGET_UBOOT=y
 BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
 BR2_TARGET_UBOOT_CUSTOM_GIT=y
-BR2_TARGET_UBOOT_CUSTOM_REPO_URL="

https://github.com/ayufan-rock64/linux-u-boot.git"

Quoted 1 line

-BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="2017.09-rockchip-ayufan-1035-gd646df03ac"

Quoted 1 line

+BR2_TARGET_UBOOT_CUSTOM_REPO_URL="

https://github.com/ayufan-rock64/linux-mainline-u-boot.git"

Quoted 8 lines
configs/rock64_defconfig +2 -0
+BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="release-2020-07"
 BR2_TARGET_UBOOT_BOARD_DEFCONFIG="rock64-rk3328"
 BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_NEEDS_PYTHON3=y
 BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y
 BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y
 BR2_TARGET_UBOOT_NEEDS_ATF_BL31_ELF=y
Signature · 6 lines
*Best Regards*

*XuMin's Ready?*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20201214/b4f66137/attachment.html>
#4 lore raw

PATCH 2/2 Defconfigs: fix rock64_defconfig

Quoted 4 lines · xu min

Hi Romain,
The original u-boot is also from ayufan-rock64. I tested
the ayufan-rock64/linux-mainline-u-boot. No compile error, and it works on my Rock64 board.

I confirm, it built with no errors but I am in the middle of moving out and
I just packed my boards like 3 hours ago, so I cannot really test it today.
I will try to test it in the next couple of days.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20201215/a6284312/attachment.asc>

#5 lore raw

PATCH 2/2 Defconfigs: fix rock64_defconfig

Hello,

Le 15/12/2020 ? 02:08, michal.lyszczek at bofc.pl a ?crit?:

Quoted 10 lines · xu min
Quoted 4 lines

Hi Romain,
The original u-boot is also from ayufan-rock64. I tested
the ayufan-rock64/linux-mainline-u-boot. No compile error, and it works on my Rock64 board.

I confirm, it built with no errors but I am in the middle of moving out and I just packed my boards like 3 hours ago, so I cannot really test it today. I will try to test it in the next couple of days.

I guess we can wait for your runtime testing, don't forget to send your tested-by tag to:

http://patchwork.ozlabs.org/project/buildroot/patch/20201215004903.8829-1-xuminready at gmail.com/

Thanks!

Best regards,
Romain

#6 lore raw

PATCH 2/2 Defconfigs: fix rock64_defconfig

Quoted 2 lines · Romain Naour

I guess we can wait for your runtime testing, don't forget to send your tested-by tag to:

# uname -a
Linux buildroot 4.19.19 #1 SMP PREEMPT Tue Dec 15 01:51:16 CET 2020 aarch64 GNU/Linux

I can confirm that clean rock64_defconfig builds and runs on the board. -------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20201215/51b7b39c/attachment.asc>