All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 0/2] Add board support for the BeagleV-Ahead
@ 2023-12-04 23:12 kilian.zinnecker--- via buildroot
  2023-12-04 23:12 ` [Buildroot] [PATCH v2 1/2] package/xuantie-bins: new package kilian.zinnecker--- via buildroot
  2023-12-04 23:12 ` [Buildroot] [PATCH v2 2/2] configs/beaglev_ahead: new defconfig kilian.zinnecker--- via buildroot
  0 siblings, 2 replies; 11+ messages in thread
From: kilian.zinnecker--- via buildroot @ 2023-12-04 23:12 UTC (permalink / raw)
  To: buildroot; +Cc: Robert Nelson, Kilian Zinnecker, Thomas Petazzoni

From: Kilian Zinnecker <kilian.zinnecker@mail.de>

This patch series adds board support for the BeagleV-Ahead.

This patch series introduces a package which fetches binaries for the
SoC, i.e., one binary blob for an on-chip FPGA and one binary blob for
audio. Currently they are not used, but are intended to be used in the
future.

This board support generates an image suitable for SD card. The boot
command for uboot to boot the kernel could not easily be changed. It
seemed that a default boot command was persisent and any change to it
by normal means (e.g., uboot config parameters like
CONFIG_BOOT_COMMAND) did not have any effect. Hence a patch for the
custom u-boot is introduced for now, to insert the proper boot
command.

v1 -> v2:

  - Added hash file for xuantie-bins package
  - Now uses uEnv.txt for actual boot commands
  - Removed extlinux.conf
  - Removed superflous comments inside config files

Kilian Zinnecker (2):
  package/xuantie-bins: new package
  configs/beaglev_ahead: new defconfig

 DEVELOPERS                                    |  7 +-
 board/beaglev-ahead/genimage.cfg              | 62 ++++++++++++++++
 board/beaglev-ahead/linux.fragment            |  2 +
 .../0001-Overwrite-bootcmd-by-force.patch     | 30 ++++++++
 board/beaglev-ahead/post-image.sh             |  6 ++
 board/beaglev-ahead/readme.txt                | 70 +++++++++++++++++++
 board/beaglev-ahead/uEnv.txt                  |  4 ++
 board/beaglev-ahead/uboot.fragment            |  2 +
 configs/beaglev_ahead_defconfig               | 44 ++++++++++++
 package/Config.in                             |  1 +
 package/xuantie-bins/Config.in                |  6 ++
 package/xuantie-bins/xuantie-bins.hash        |  1 +
 package/xuantie-bins/xuantie-bins.mk          | 27 +++++++
 13 files changed, 260 insertions(+), 2 deletions(-)
 create mode 100644 board/beaglev-ahead/genimage.cfg
 create mode 100644 board/beaglev-ahead/linux.fragment
 create mode 100644 board/beaglev-ahead/patches/uboot/0001-Overwrite-bootcmd-by-force.patch
 create mode 100755 board/beaglev-ahead/post-image.sh
 create mode 100644 board/beaglev-ahead/readme.txt
 create mode 100644 board/beaglev-ahead/uEnv.txt
 create mode 100644 board/beaglev-ahead/uboot.fragment
 create mode 100644 configs/beaglev_ahead_defconfig
 create mode 100644 package/xuantie-bins/Config.in
 create mode 100644 package/xuantie-bins/xuantie-bins.hash
 create mode 100644 package/xuantie-bins/xuantie-bins.mk

-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH v2 1/2] package/xuantie-bins: new package
  2023-12-04 23:12 [Buildroot] [PATCH v2 0/2] Add board support for the BeagleV-Ahead kilian.zinnecker--- via buildroot
@ 2023-12-04 23:12 ` kilian.zinnecker--- via buildroot
  2024-02-06 16:56   ` Giulio Benetti
  2023-12-04 23:12 ` [Buildroot] [PATCH v2 2/2] configs/beaglev_ahead: new defconfig kilian.zinnecker--- via buildroot
  1 sibling, 1 reply; 11+ messages in thread
From: kilian.zinnecker--- via buildroot @ 2023-12-04 23:12 UTC (permalink / raw)
  To: buildroot; +Cc: Robert Nelson, Kilian Zinnecker, Thomas Petazzoni

From: Kilian Zinnecker <kilian.zinnecker@mail.de>

This patch adds a package for Xuantie binary blobs. These binaries
are needed for the BeagleV-Ahead.

Signed-off-by: Kilian Zinnecker <kilian.zinnecker@mail.de>
---
 DEVELOPERS                             |  5 +++--
 package/Config.in                      |  1 +
 package/xuantie-bins/Config.in         |  6 ++++++
 package/xuantie-bins/xuantie-bins.hash |  1 +
 package/xuantie-bins/xuantie-bins.mk   | 27 ++++++++++++++++++++++++++
 5 files changed, 38 insertions(+), 2 deletions(-)
 create mode 100644 package/xuantie-bins/Config.in
 create mode 100644 package/xuantie-bins/xuantie-bins.hash
 create mode 100644 package/xuantie-bins/xuantie-bins.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index f504ca8d36..4d18bc49d4 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1839,9 +1839,10 @@ N:	Kieran Bingham <kieran.bingham@ideasonboard.com>
 F:	package/libcamera/
 
 N:	Kilian Zinnecker <kilian.zinnecker@mail.de>
-F:	package/rockchip-rkbin/
-F:	configs/rock5b_defconfig
 F:	board/radxa/rock5b/
+F:	configs/rock5b_defconfig
+F:	package/rockchip-rkbin/
+F:	package/xuantie-bins/
 
 N:	Klaus Heinrich Kiwi <klaus@linux.vnet.ibm.com>
 F:	package/wqy-zenhei/
diff --git a/package/Config.in b/package/Config.in
index fcc09b07c4..3772e2ac81 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -653,6 +653,7 @@ endmenu
 	source "package/wipe/Config.in"
 	source "package/xorriso/Config.in"
 	source "package/xr819-xradio/Config.in"
+	source "package/xuantie-bins/Config.in"
 endmenu
 
 menu "Interpreter languages and scripting"
diff --git a/package/xuantie-bins/Config.in b/package/xuantie-bins/Config.in
new file mode 100644
index 0000000000..a04497ce6b
--- /dev/null
+++ b/package/xuantie-bins/Config.in
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_XUANTIE_BINS
+	bool "xuantie-bins"
+	depends on BR2_riscv
+	help
+	  This package provides binary blobs, needed for the
+	  BeagleV-Ahead's SoC (TH1520).
diff --git a/package/xuantie-bins/xuantie-bins.hash b/package/xuantie-bins/xuantie-bins.hash
new file mode 100644
index 0000000000..4d1ec297c9
--- /dev/null
+++ b/package/xuantie-bins/xuantie-bins.hash
@@ -0,0 +1 @@
+sha256  608e9fec79823996004f65ba692a76d741307b0de23552d147ad1b567e7054dc  xuantie-bins-0a2e02bb53758cc12448d8670e65c854528a96b4-br1.tar.gz
diff --git a/package/xuantie-bins/xuantie-bins.mk b/package/xuantie-bins/xuantie-bins.mk
new file mode 100644
index 0000000000..3a5611cf36
--- /dev/null
+++ b/package/xuantie-bins/xuantie-bins.mk
@@ -0,0 +1,27 @@
+################################################################################
+#
+# xuantie-bins
+#
+################################################################################
+
+XUANTIE_BINS_VERSION = 0a2e02bb53758cc12448d8670e65c854528a96b4
+XUANTIE_BINS_SITE = https://github.com/beagleboard/xuantie-ubuntu.git
+XUANTIE_BINS_SITE_METHOD = git
+XUANTIE_BINS_LICENSE = PROPRIETARY
+
+XUANTIE_BINS_INSTALL_IMAGES = YES
+XUANTIE_BINS_INSTALL_TARGET = NO
+
+XUANTIE_BINS_FPGA_BIN_FILENAME = "bins/light_aon_fpga.bin"
+XUANTIE_BINS_AUDIO_BIN_FILENAME = "bins/light_c906_audio.bin"
+
+define XUANTIE_BINS_INSTALL_IMAGES_CMDS
+	$(foreach f, \
+		$(XUANTIE_BINS_FPGA_BIN_FILENAME) \
+		$(XUANTIE_BINS_AUDIO_BIN_FILENAME) \
+		, \
+		$(INSTALL) -D -m 0644 -t $(BINARIES_DIR) $(@D)/$(f)
+	)
+endef
+
+$(eval $(generic-package))
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH v2 2/2] configs/beaglev_ahead: new defconfig
  2023-12-04 23:12 [Buildroot] [PATCH v2 0/2] Add board support for the BeagleV-Ahead kilian.zinnecker--- via buildroot
  2023-12-04 23:12 ` [Buildroot] [PATCH v2 1/2] package/xuantie-bins: new package kilian.zinnecker--- via buildroot
@ 2023-12-04 23:12 ` kilian.zinnecker--- via buildroot
  2024-02-06 16:31   ` Giulio Benetti
  1 sibling, 1 reply; 11+ messages in thread
From: kilian.zinnecker--- via buildroot @ 2023-12-04 23:12 UTC (permalink / raw)
  To: buildroot; +Cc: Robert Nelson, Kilian Zinnecker, Thomas Petazzoni

From: Kilian Zinnecker <kilian.zinnecker@mail.de>

This patch adds board support for the BeagleV-Ahead. It uses a
custom kernel for the board's SoC. As the SoC has an outdated and
currently not supported version of the RISC-V vector extension, the
vector extension is disabled.

Signed-off-by: Kilian Zinnecker <kilian.zinnecker@mail.de>
---
 DEVELOPERS                                    |  2 +
 board/beaglev-ahead/genimage.cfg              | 62 ++++++++++++++++
 board/beaglev-ahead/linux.fragment            |  2 +
 .../0001-Overwrite-bootcmd-by-force.patch     | 30 ++++++++
 board/beaglev-ahead/post-image.sh             |  6 ++
 board/beaglev-ahead/readme.txt                | 70 +++++++++++++++++++
 board/beaglev-ahead/uEnv.txt                  |  4 ++
 board/beaglev-ahead/uboot.fragment            |  2 +
 configs/beaglev_ahead_defconfig               | 44 ++++++++++++
 9 files changed, 222 insertions(+)
 create mode 100644 board/beaglev-ahead/genimage.cfg
 create mode 100644 board/beaglev-ahead/linux.fragment
 create mode 100644 board/beaglev-ahead/patches/uboot/0001-Overwrite-bootcmd-by-force.patch
 create mode 100755 board/beaglev-ahead/post-image.sh
 create mode 100644 board/beaglev-ahead/readme.txt
 create mode 100644 board/beaglev-ahead/uEnv.txt
 create mode 100644 board/beaglev-ahead/uboot.fragment
 create mode 100644 configs/beaglev_ahead_defconfig

diff --git a/DEVELOPERS b/DEVELOPERS
index 4d18bc49d4..71f672f9e6 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1839,7 +1839,9 @@ N:	Kieran Bingham <kieran.bingham@ideasonboard.com>
 F:	package/libcamera/
 
 N:	Kilian Zinnecker <kilian.zinnecker@mail.de>
+F:	board/beaglev-ahead/
 F:	board/radxa/rock5b/
+F:	configs/beaglev_ahead_defconfig
 F:	configs/rock5b_defconfig
 F:	package/rockchip-rkbin/
 F:	package/xuantie-bins/
diff --git a/board/beaglev-ahead/genimage.cfg b/board/beaglev-ahead/genimage.cfg
new file mode 100644
index 0000000000..080b169527
--- /dev/null
+++ b/board/beaglev-ahead/genimage.cfg
@@ -0,0 +1,62 @@
+# SD card image for BeagleV-Ahead
+
+image boot.vfat {
+	vfat {
+		files = {
+			"fw_dynamic.bin",
+			"Image",
+			"light_aon_fpga.bin",
+			"light-beagle.dtb",
+			"light_c906_audio.bin",
+		}
+
+		file uEnv.txt {
+			image = "uEnv.txt"
+		}
+
+		file overlays/BBORG_LOAD-00A2.dtbo {
+			image = "overlays/BBORG_LOAD-00A2.dtbo"
+		}
+
+		file overlays/BBORG_RELAY-00A2.dtbo {
+			image = "overlays/BBORG_RELAY-00A2.dtbo"
+		}
+
+		file overlays/BONE-LED_P8_03.dtbo {
+			image = "overlays/BONE-LED_P8_03.dtbo"
+		}
+
+		file overlays/BONE-LED_P9_11.dtbo {
+			image = "overlays/BONE-LED_P9_11.dtbo"
+		}
+
+		file overlays/BVA-MIKROBUS-0.dtbo {
+			image = "overlays/BVA-MIKROBUS-0.dtbo"
+		}
+	}
+	size = 48M
+}
+
+image sdcard.img {
+	hdimage {
+		partition-table-type = "gpt"
+		gpt-location = 2M
+	}
+
+	partition uboot {
+		in-partition-table = "false"
+		image = "u-boot-with-spl.bin"
+		offset = 0
+		holes = {"(440; 1048576)"}
+	}
+
+	partition boot {
+		bootable = "true"
+		image = "boot.vfat"
+	}
+
+	partition rootfs {
+		image = "rootfs.ext2"
+	}
+}
+
diff --git a/board/beaglev-ahead/linux.fragment b/board/beaglev-ahead/linux.fragment
new file mode 100644
index 0000000000..00f93f39a4
--- /dev/null
+++ b/board/beaglev-ahead/linux.fragment
@@ -0,0 +1,2 @@
+# CONFIG_VECTOR is not set
+# CONFIG_VECTOR_0_7 is not set
diff --git a/board/beaglev-ahead/patches/uboot/0001-Overwrite-bootcmd-by-force.patch b/board/beaglev-ahead/patches/uboot/0001-Overwrite-bootcmd-by-force.patch
new file mode 100644
index 0000000000..32cd6fa975
--- /dev/null
+++ b/board/beaglev-ahead/patches/uboot/0001-Overwrite-bootcmd-by-force.patch
@@ -0,0 +1,30 @@
+From 81db2d155db74192e127ae1d98dd4ec415f53dd3 Mon Sep 17 00:00:00 2001
+From: Kilian Zinnecker <kilian.zinnecker@mail.de>
+Date: Mon, 21 Aug 2023 23:51:59 +0200
+Subject: [PATCH] Overwrite bootcmd by force
+
+This patch is a dirty hack: Trying to overwrite the bootcmd via the
+usual BOOT_COMMAND had no effect: Upon boot the bootcmd defaulted
+to some preset value and could not be changed easily. Therefore a
+hook is used to force the bootcmd to be overwritten.
+
+Signed-off-by: Kilian Zinnecker <kilian.zinnecker@mail.de>
+---
+ board/thead/light-c910/light.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/board/thead/light-c910/light.c b/board/thead/light-c910/light.c
+index 8d5478e916..1448db974e 100644
+--- a/board/thead/light-c910/light.c
++++ b/board/thead/light-c910/light.c
+@@ -2282,6 +2282,7 @@ int board_late_init(void)
+ 	light_usb_boot_check();
+ 	do_firmware_load();
+ 	ap_peri_clk_disable();
++	run_command("load mmc 1:1 $ramdisk_addr_r uEnv.txt; env import -t $ramdisk_addr_r $filesize; run uenvcmd", 0);
+ 	return 0;
+ }
+ 
+-- 
+2.34.1
+
diff --git a/board/beaglev-ahead/post-image.sh b/board/beaglev-ahead/post-image.sh
new file mode 100755
index 0000000000..9e16eeff3f
--- /dev/null
+++ b/board/beaglev-ahead/post-image.sh
@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+set -e
+
+cp -r ${BUILD_DIR}/linux-custom/arch/riscv/boot/dts/thead/overlays/ ${BINARIES_DIR}
+cp board/beaglev-ahead/uEnv.txt ${BINARIES_DIR}/
+support/scripts/genimage.sh -c board/beaglev-ahead/genimage.cfg
diff --git a/board/beaglev-ahead/readme.txt b/board/beaglev-ahead/readme.txt
new file mode 100644
index 0000000000..21aceb23c9
--- /dev/null
+++ b/board/beaglev-ahead/readme.txt
@@ -0,0 +1,70 @@
+BeagleV-Ahead
+==============
+https://forum.beagleboard.org/c/beaglev/
+
+Build:
+======
+  $ make beaglev_ahead_defconfig
+  $ make
+
+Files created in output directory
+=================================
+
+output/images
+.
+├── Image
+├── boot.vfat
+├── bootloader-JH7100-buildroot.bin.out
+├── ddrinit-2133-buildroot.bin.out
+├── fw_dynamic.bin
+├── fw_dynamic.elf
+├── fw_jump.bin
+├── fw_jump.elf
+├── fw_payload.bin
+├── fw_payload.elf
+├── light-beagle.dtb
+├── light_aon_fpga.bin
+├── light_c906_audio.bin
+├── overlays
+├── rootfs.ext2
+├── rootfs.ext4
+├── rootfs.tar
+├── sdcard.img
+├── u-boot-with-spl.bin
+├── u-boot.bin
+└── uEnv.txt
+
+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:
+========
+
+SD card boot button:
+--------------------
+To let the board boot from SD card, keep the "SD button" pressed during power
+up / power cycle. The button is near the SD card slot.
+
+Serial console:
+---------------
+The BeagleV-Ahead has a "Debug" GPIO header. Its layout can be seen here:
+https://docs.beagleboard.org/latest/boards/beaglev/ahead/02-quick-start.html#access-uart-debug-console
+
+Note, that there are reported issues with some uart interface cables/dongles:
+https://forum.beagleboard.org/t/beaglev-ahead-debug-terminal-problems/35331
+
+Baudrate for this board is 115200.
+
+Login:
+------
+Enter 'root' as login user, and the prompt is ready.
+
+wiki link:
+----------
+https://docs.beagleboard.org/latest/boards/beaglev/ahead/index.html
diff --git a/board/beaglev-ahead/uEnv.txt b/board/beaglev-ahead/uEnv.txt
new file mode 100644
index 0000000000..7e98ae5f81
--- /dev/null
+++ b/board/beaglev-ahead/uEnv.txt
@@ -0,0 +1,4 @@
+bootcmd=booti ${kernel_addr_r} - ${fdt_addr_r}
+uenvcmd=fatload mmc 1:1 ${kernel_addr_r} Image; fatload mmc 1:1 ${fdt_addr_r} light-beagle.dtb
+bootargs=root=/dev/mmcblk1p2 rootfstype=ext4 rootwait ro console=ttyS0,115200 earlycon clk_ignore_unused net.ifnames=0
+
diff --git a/board/beaglev-ahead/uboot.fragment b/board/beaglev-ahead/uboot.fragment
new file mode 100644
index 0000000000..1f51cef106
--- /dev/null
+++ b/board/beaglev-ahead/uboot.fragment
@@ -0,0 +1,2 @@
+CONFIG_LEGACY_IMAGE_FORMAT=y
+CONFIG_AUTOBOOT=y
diff --git a/configs/beaglev_ahead_defconfig b/configs/beaglev_ahead_defconfig
new file mode 100644
index 0000000000..4b349cc6f9
--- /dev/null
+++ b/configs/beaglev_ahead_defconfig
@@ -0,0 +1,44 @@
+BR2_riscv=y
+BR2_riscv_custom=y
+BR2_RISCV_ISA_CUSTOM_RVM=y
+BR2_RISCV_ISA_CUSTOM_RVA=y
+BR2_RISCV_ISA_CUSTOM_RVF=y
+BR2_RISCV_ISA_CUSTOM_RVD=y
+BR2_RISCV_ISA_CUSTOM_RVC=y
+BR2_GCC_VERSION_13_X=y
+BR2_GLOBAL_PATCH_DIR="board/beaglev-ahead/patches"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/beaglev-ahead/post-image.sh"
+BR2_TARGET_GENERIC_HOSTNAME="BeagleV-Ahead"
+BR2_TARGET_GENERIC_ISSUE="Welcome to the BeagleV-Ahead"
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_10=y
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_GIT=y
+BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
+BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/beagleboard/linux/archive/refs/heads/beaglev-v5.10.113-1.1.2-ubuntu.tar.gz"
+BR2_LINUX_KERNEL_DEFCONFIG="beaglev"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="thead/light-beagle"
+BR2_LINUX_KERNEL_INSTALL_TARGET=y
+BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/beaglev-ahead/linux.fragment"
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_BEAGLEV_DDRINIT=y
+BR2_TARGET_BEAGLEV_SECONDBOOT=y
+BR2_TARGET_OPENSBI=y
+BR2_TARGET_OPENSBI_CUSTOM_TARBALL=y
+BR2_TARGET_OPENSBI_CUSTOM_TARBALL_LOCATION="https://github.com/beagleboard/beaglev-ahead-opensbi/archive/refs/heads/0.9-1.1.2-ubuntu.tar.gz"
+BR2_TARGET_OPENSBI_PLAT="generic"
+BR2_TARGET_OPENSBI_UBOOT_PAYLOAD=y
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_TARBALL=y
+BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="https://github.com/beagleboard/beaglev-ahead-u-boot/archive/refs/heads/beaglev-v2020.01-1.1.2-ubuntu.tar.gz"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="light_beagle"
+BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="board/beaglev-ahead/uboot.fragment"
+BR2_TARGET_UBOOT_FORMAT_BIN=y
+BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
+BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-with-spl.bin"
+BR2_PACKAGE_HOST_MTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_XUANTIE_BINS=y
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [Buildroot] [PATCH v2 2/2] configs/beaglev_ahead: new defconfig
  2023-12-04 23:12 ` [Buildroot] [PATCH v2 2/2] configs/beaglev_ahead: new defconfig kilian.zinnecker--- via buildroot
@ 2024-02-06 16:31   ` Giulio Benetti
  2024-02-11 12:24     ` kilian.zinnecker--- via buildroot
  0 siblings, 1 reply; 11+ messages in thread
From: Giulio Benetti @ 2024-02-06 16:31 UTC (permalink / raw)
  To: kilian.zinnecker, buildroot; +Cc: Robert Nelson, Thomas Petazzoni

Hi Yegor, Kilian,

On 05/12/23 00:12, yegorslists--- via buildroot wrote:
> From: Kilian Zinnecker <kilian.zinnecker@mail.de>
> 
> This patch adds board support for the BeagleV-Ahead. It uses a
> custom kernel for the board's SoC. As the SoC has an outdated and
> currently not supported version of the RISC-V vector extension, the
> vector extension is disabled.

can you please provide an URL to the product page?

> Signed-off-by: Kilian Zinnecker <kilian.zinnecker@mail.de>
> ---
>   DEVELOPERS                                    |  2 +
>   board/beaglev-ahead/genimage.cfg              | 62 ++++++++++++++++
>   board/beaglev-ahead/linux.fragment            |  2 +
>   .../0001-Overwrite-bootcmd-by-force.patch     | 30 ++++++++
>   board/beaglev-ahead/post-image.sh             |  6 ++
>   board/beaglev-ahead/readme.txt                | 70 +++++++++++++++++++
>   board/beaglev-ahead/uEnv.txt                  |  4 ++
>   board/beaglev-ahead/uboot.fragment            |  2 +
>   configs/beaglev_ahead_defconfig               | 44 ++++++++++++
>   9 files changed, 222 insertions(+)
>   create mode 100644 board/beaglev-ahead/genimage.cfg
>   create mode 100644 board/beaglev-ahead/linux.fragment
>   create mode 100644 board/beaglev-ahead/patches/uboot/0001-Overwrite-bootcmd-by-force.patch
>   create mode 100755 board/beaglev-ahead/post-image.sh
>   create mode 100644 board/beaglev-ahead/readme.txt
>   create mode 100644 board/beaglev-ahead/uEnv.txt
>   create mode 100644 board/beaglev-ahead/uboot.fragment
>   create mode 100644 configs/beaglev_ahead_defconfig
> 
> diff --git a/DEVELOPERS b/DEVELOPERS
> index 4d18bc49d4..71f672f9e6 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -1839,7 +1839,9 @@ N:	Kieran Bingham <kieran.bingham@ideasonboard.com>
>   F:	package/libcamera/
>   
>   N:	Kilian Zinnecker <kilian.zinnecker@mail.de>
> +F:	board/beaglev-ahead/
>   F:	board/radxa/rock5b/
> +F:	configs/beaglev_ahead_defconfig
>   F:	configs/rock5b_defconfig
>   F:	package/rockchip-rkbin/
>   F:	package/xuantie-bins/
> diff --git a/board/beaglev-ahead/genimage.cfg b/board/beaglev-ahead/genimage.cfg
> new file mode 100644
> index 0000000000..080b169527
> --- /dev/null
> +++ b/board/beaglev-ahead/genimage.cfg
> @@ -0,0 +1,62 @@
> +# SD card image for BeagleV-Ahead
> +
> +image boot.vfat {
> +	vfat {
> +		files = {
> +			"fw_dynamic.bin",
> +			"Image",
> +			"light_aon_fpga.bin",
> +			"light-beagle.dtb",
> +			"light_c906_audio.bin",
> +		}
> +
> +		file uEnv.txt {
> +			image = "uEnv.txt"
> +		}
> +
> +		file overlays/BBORG_LOAD-00A2.dtbo {
> +			image = "overlays/BBORG_LOAD-00A2.dtbo"
> +		}
> +
> +		file overlays/BBORG_RELAY-00A2.dtbo {
> +			image = "overlays/BBORG_RELAY-00A2.dtbo"
> +		}
> +
> +		file overlays/BONE-LED_P8_03.dtbo {
> +			image = "overlays/BONE-LED_P8_03.dtbo"
> +		}
> +
> +		file overlays/BONE-LED_P9_11.dtbo {
> +			image = "overlays/BONE-LED_P9_11.dtbo"
> +		}
> +
> +		file overlays/BVA-MIKROBUS-0.dtbo {
> +			image = "overlays/BVA-MIKROBUS-0.dtbo"
> +		}
> +	}
> +	size = 48M
> +}
> +
> +image sdcard.img {
> +	hdimage {
> +		partition-table-type = "gpt"
> +		gpt-location = 2M
> +	}
> +
> +	partition uboot {
> +		in-partition-table = "false"
> +		image = "u-boot-with-spl.bin"
> +		offset = 0
> +		holes = {"(440; 1048576)"}
> +	}
> +
> +	partition boot {
> +		bootable = "true"
> +		image = "boot.vfat"
> +	}
> +
> +	partition rootfs {
> +		image = "rootfs.ext2"
> +	}
> +}
> +
> diff --git a/board/beaglev-ahead/linux.fragment b/board/beaglev-ahead/linux.fragment
> new file mode 100644
> index 0000000000..00f93f39a4
> --- /dev/null
> +++ b/board/beaglev-ahead/linux.fragment
> @@ -0,0 +1,2 @@
> +# CONFIG_VECTOR is not set
> +# CONFIG_VECTOR_0_7 is not set
> diff --git a/board/beaglev-ahead/patches/uboot/0001-Overwrite-bootcmd-by-force.patch b/board/beaglev-ahead/patches/uboot/0001-Overwrite-bootcmd-by-force.patch
> new file mode 100644
> index 0000000000..32cd6fa975
> --- /dev/null
> +++ b/board/beaglev-ahead/patches/uboot/0001-Overwrite-bootcmd-by-force.patch
> @@ -0,0 +1,30 @@
> +From 81db2d155db74192e127ae1d98dd4ec415f53dd3 Mon Sep 17 00:00:00 2001
> +From: Kilian Zinnecker <kilian.zinnecker@mail.de>
> +Date: Mon, 21 Aug 2023 23:51:59 +0200
> +Subject: [PATCH] Overwrite bootcmd by force
> +
> +This patch is a dirty hack: Trying to overwrite the bootcmd via the
> +usual BOOT_COMMAND had no effect: Upon boot the bootcmd defaulted
> +to some preset value and could not be changed easily. Therefore a
> +hook is used to force the bootcmd to be overwritten.
> +
> +Signed-off-by: Kilian Zinnecker <kilian.zinnecker@mail.de>
> +---
> + board/thead/light-c910/light.c | 1 +
> + 1 file changed, 1 insertion(+)
> +
> +diff --git a/board/thead/light-c910/light.c b/board/thead/light-c910/light.c
> +index 8d5478e916..1448db974e 100644
> +--- a/board/thead/light-c910/light.c
> ++++ b/board/thead/light-c910/light.c
> +@@ -2282,6 +2282,7 @@ int board_late_init(void)
> + 	light_usb_boot_check();
> + 	do_firmware_load();
> + 	ap_peri_clk_disable();
> ++	run_command("load mmc 1:1 $ramdisk_addr_r uEnv.txt; env import -t $ramdisk_addr_r $filesize; run uenvcmd", 0);
> + 	return 0;
> + }
> +
> +--
> +2.34.1
> +
> diff --git a/board/beaglev-ahead/post-image.sh b/board/beaglev-ahead/post-image.sh
> new file mode 100755
> index 0000000000..9e16eeff3f
> --- /dev/null
> +++ b/board/beaglev-ahead/post-image.sh
> @@ -0,0 +1,6 @@
> +#!/usr/bin/env bash
> +set -e
> +
> +cp -r ${BUILD_DIR}/linux-custom/arch/riscv/boot/dts/thead/overlays/ ${BINARIES_DIR}

linux-custom should substituted with $(LINUX_DIR)

> +cp board/beaglev-ahead/uEnv.txt ${BINARIES_DIR}/
> +support/scripts/genimage.sh -c board/beaglev-ahead/genimage.cfg
> diff --git a/board/beaglev-ahead/readme.txt b/board/beaglev-ahead/readme.txt
> new file mode 100644
> index 0000000000..21aceb23c9
> --- /dev/null
> +++ b/board/beaglev-ahead/readme.txt
> @@ -0,0 +1,70 @@
> +BeagleV-Ahead
> +==============
> +https://forum.beagleboard.org/c/beaglev/
> +
> +Build:
> +======
> +  $ make beaglev_ahead_defconfig
> +  $ make
> +
> +Files created in output directory
> +=================================
> +
> +output/images
> +.
> +├── Image
> +├── boot.vfat
> +├── bootloader-JH7100-buildroot.bin.out
> +├── ddrinit-2133-buildroot.bin.out
> +├── fw_dynamic.bin
> +├── fw_dynamic.elf
> +├── fw_jump.bin
> +├── fw_jump.elf
> +├── fw_payload.bin
> +├── fw_payload.elf
> +├── light-beagle.dtb
> +├── light_aon_fpga.bin
> +├── light_c906_audio.bin
> +├── overlays
> +├── rootfs.ext2
> +├── rootfs.ext4
> +├── rootfs.tar
> +├── sdcard.img
> +├── u-boot-with-spl.bin
> +├── u-boot.bin
> +└── uEnv.txt
> +
> +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:
> +========
> +
> +SD card boot button:
> +--------------------
> +To let the board boot from SD card, keep the "SD button" pressed during power
> +up / power cycle. The button is near the SD card slot.
> +
> +Serial console:
> +---------------
> +The BeagleV-Ahead has a "Debug" GPIO header. Its layout can be seen here:
> +https://docs.beagleboard.org/latest/boards/beaglev/ahead/02-quick-start.html#access-uart-debug-console
> +
> +Note, that there are reported issues with some uart interface cables/dongles:
> +https://forum.beagleboard.org/t/beaglev-ahead-debug-terminal-problems/35331
> +
> +Baudrate for this board is 115200.
> +
> +Login:
> +------
> +Enter 'root' as login user, and the prompt is ready.
> +
> +wiki link:
> +----------
> +https://docs.beagleboard.org/latest/boards/beaglev/ahead/index.html
> diff --git a/board/beaglev-ahead/uEnv.txt b/board/beaglev-ahead/uEnv.txt
> new file mode 100644
> index 0000000000..7e98ae5f81
> --- /dev/null
> +++ b/board/beaglev-ahead/uEnv.txt
> @@ -0,0 +1,4 @@
> +bootcmd=booti ${kernel_addr_r} - ${fdt_addr_r}
> +uenvcmd=fatload mmc 1:1 ${kernel_addr_r} Image; fatload mmc 1:1 ${fdt_addr_r} light-beagle.dtb
> +bootargs=root=/dev/mmcblk1p2 rootfstype=ext4 rootwait ro console=ttyS0,115200 earlycon clk_ignore_unused net.ifnames=0
> +
> diff --git a/board/beaglev-ahead/uboot.fragment b/board/beaglev-ahead/uboot.fragment
> new file mode 100644
> index 0000000000..1f51cef106
> --- /dev/null
> +++ b/board/beaglev-ahead/uboot.fragment
> @@ -0,0 +1,2 @@
> +CONFIG_LEGACY_IMAGE_FORMAT=y
> +CONFIG_AUTOBOOT=y
> diff --git a/configs/beaglev_ahead_defconfig b/configs/beaglev_ahead_defconfig
> new file mode 100644
> index 0000000000..4b349cc6f9
> --- /dev/null
> +++ b/configs/beaglev_ahead_defconfig
> @@ -0,0 +1,44 @@
> +BR2_riscv=y
> +BR2_riscv_custom=y
> +BR2_RISCV_ISA_CUSTOM_RVM=y
> +BR2_RISCV_ISA_CUSTOM_RVA=y
> +BR2_RISCV_ISA_CUSTOM_RVF=y
> +BR2_RISCV_ISA_CUSTOM_RVD=y
> +BR2_RISCV_ISA_CUSTOM_RVC=y

With commit cbd91e89e43d600172c62fd1cbd33aa74d0a851a all "_CUSTOM" have
been dropped, so can you please replace all the:
BR2_RISCV_ISA_CUSTOM_*
occurences with:
BR2_RISCV_ISA_*
?

> +BR2_GCC_VERSION_13_X=y

I think there is a reason you force using gcc 13, can you describe it in
the commit log and here?

> +BR2_GLOBAL_PATCH_DIR="board/beaglev-ahead/patches"
> +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/beaglev-ahead/post-image.sh"
> +BR2_TARGET_GENERIC_HOSTNAME="BeagleV-Ahead"
> +BR2_TARGET_GENERIC_ISSUE="Welcome to the BeagleV-Ahead"
> +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_10=y
> +BR2_LINUX_KERNEL=y
> +BR2_LINUX_KERNEL_CUSTOM_GIT=y
> +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
> +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/beagleboard/linux/archive/refs/heads/beaglev-v5.10.113-1.1.2-ubuntu.tar.gz"
> +BR2_LINUX_KERNEL_DEFCONFIG="beaglev"
> +BR2_LINUX_KERNEL_DTS_SUPPORT=y
> +BR2_LINUX_KERNEL_INTREE_DTS_NAME="thead/light-beagle"
> +BR2_LINUX_KERNEL_INSTALL_TARGET=y
> +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
> +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/beaglev-ahead/linux.fragment"
> +BR2_TARGET_ROOTFS_EXT2=y
> +BR2_TARGET_ROOTFS_EXT2_4=y
> +BR2_TARGET_BEAGLEV_DDRINIT=y
> +BR2_TARGET_BEAGLEV_SECONDBOOT=y
> +BR2_TARGET_OPENSBI=y
> +BR2_TARGET_OPENSBI_CUSTOM_TARBALL=y
> +BR2_TARGET_OPENSBI_CUSTOM_TARBALL_LOCATION="https://github.com/beagleboard/beaglev-ahead-opensbi/archive/refs/heads/0.9-1.1.2-ubuntu.tar.gz"
> +BR2_TARGET_OPENSBI_PLAT="generic"
> +BR2_TARGET_OPENSBI_UBOOT_PAYLOAD=y
> +BR2_TARGET_UBOOT=y
> +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
> +BR2_TARGET_UBOOT_CUSTOM_TARBALL=y
> +BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="https://github.com/beagleboard/beaglev-ahead-u-boot/archive/refs/heads/beaglev-v2020.01-1.1.2-ubuntu.tar.gz"
> +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="light_beagle"
> +BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="board/beaglev-ahead/uboot.fragment"
> +BR2_TARGET_UBOOT_FORMAT_BIN=y
> +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
> +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-with-spl.bin"

Here you need to add:
BR2_PACKAGE_HOST_DOSFSTOOLS=y
otherwise it fails to build under buildroot/utils/docker-run

> +BR2_PACKAGE_HOST_MTOOLS=y
> +BR2_PACKAGE_HOST_GENIMAGE=y
> +BR2_PACKAGE_XUANTIE_BINS=y

After enabling BR2_RISCV_ISA_ options it builds successfully using
buildroot/utils/docker-run

Best regards
-- 
Giulio Benetti
CEO&CTO@Benetti Engineering sas
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Buildroot] [PATCH v2 1/2] package/xuantie-bins: new package
  2023-12-04 23:12 ` [Buildroot] [PATCH v2 1/2] package/xuantie-bins: new package kilian.zinnecker--- via buildroot
@ 2024-02-06 16:56   ` Giulio Benetti
  2024-02-10 15:22     ` kilian.zinnecker--- via buildroot
  2024-02-11 12:15     ` kilian.zinnecker--- via buildroot
  0 siblings, 2 replies; 11+ messages in thread
From: Giulio Benetti @ 2024-02-06 16:56 UTC (permalink / raw)
  To: kilian.zinnecker, buildroot; +Cc: Robert Nelson, Thomas Petazzoni

Hi Yegor, Kilian,

On 05/12/23 00:12, yegorslists--- via buildroot wrote:
> From: Kilian Zinnecker <kilian.zinnecker@mail.de>
> 
> This patch adds a package for Xuantie binary blobs. These binaries
> are needed for the BeagleV-Ahead.
> 
> Signed-off-by: Kilian Zinnecker <kilian.zinnecker@mail.de>
> ---
>   DEVELOPERS                             |  5 +++--
>   package/Config.in                      |  1 +
>   package/xuantie-bins/Config.in         |  6 ++++++
>   package/xuantie-bins/xuantie-bins.hash |  1 +
>   package/xuantie-bins/xuantie-bins.mk   | 27 ++++++++++++++++++++++++++
>   5 files changed, 38 insertions(+), 2 deletions(-)
>   create mode 100644 package/xuantie-bins/Config.in
>   create mode 100644 package/xuantie-bins/xuantie-bins.hash
>   create mode 100644 package/xuantie-bins/xuantie-bins.mk
> 
> diff --git a/DEVELOPERS b/DEVELOPERS
> index f504ca8d36..4d18bc49d4 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -1839,9 +1839,10 @@ N:	Kieran Bingham <kieran.bingham@ideasonboard.com>
>   F:	package/libcamera/
>   
>   N:	Kilian Zinnecker <kilian.zinnecker@mail.de>
> -F:	package/rockchip-rkbin/
> -F:	configs/rock5b_defconfig
>   F:	board/radxa/rock5b/
> +F:	configs/rock5b_defconfig

can you please provide a separate patch to alphabetize?

> +F:	package/rockchip-rkbin/
> +F:	package/xuantie-bins/
>   
>   N:	Klaus Heinrich Kiwi <klaus@linux.vnet.ibm.com>
>   F:	package/wqy-zenhei/
> diff --git a/package/Config.in b/package/Config.in
> index fcc09b07c4..3772e2ac81 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -653,6 +653,7 @@ endmenu
>   	source "package/wipe/Config.in"
>   	source "package/xorriso/Config.in"
>   	source "package/xr819-xradio/Config.in"
> +	source "package/xuantie-bins/Config.in"
>   endmenu
>   
>   menu "Interpreter languages and scripting"
> diff --git a/package/xuantie-bins/Config.in b/package/xuantie-bins/Config.in
> new file mode 100644
> index 0000000000..a04497ce6b
> --- /dev/null
> +++ b/package/xuantie-bins/Config.in
> @@ -0,0 +1,6 @@
> +config BR2_PACKAGE_XUANTIE_BINS
> +	bool "xuantie-bins"
> +	depends on BR2_riscv
> +	help
> +	  This package provides binary blobs, needed for the
> +	  BeagleV-Ahead's SoC (TH1520).

Can you please describe a bit what those binaries are meant for?

> diff --git a/package/xuantie-bins/xuantie-bins.hash b/package/xuantie-bins/xuantie-bins.hash
> new file mode 100644
> index 0000000000..4d1ec297c9
> --- /dev/null
> +++ b/package/xuantie-bins/xuantie-bins.hash
> @@ -0,0 +1 @@
> +sha256  608e9fec79823996004f65ba692a76d741307b0de23552d147ad1b567e7054dc  xuantie-bins-0a2e02bb53758cc12448d8670e65c854528a96b4-br1.tar.gz
> diff --git a/package/xuantie-bins/xuantie-bins.mk b/package/xuantie-bins/xuantie-bins.mk
> new file mode 100644
> index 0000000000..3a5611cf36
> --- /dev/null
> +++ b/package/xuantie-bins/xuantie-bins.mk
> @@ -0,0 +1,27 @@
> +################################################################################
> +#
> +# xuantie-bins
> +#
> +################################################################################
> +
> +XUANTIE_BINS_VERSION = 0a2e02bb53758cc12448d8670e65c854528a96b4
> +XUANTIE_BINS_SITE = https://github.com/beagleboard/xuantie-ubuntu.git
> +XUANTIE_BINS_SITE_METHOD = git
> +XUANTIE_BINS_LICENSE = PROPRIETARY
> +
> +XUANTIE_BINS_INSTALL_IMAGES = YES
> +XUANTIE_BINS_INSTALL_TARGET = NO
> +
> +XUANTIE_BINS_FPGA_BIN_FILENAME = "bins/light_aon_fpga.bin"
> +XUANTIE_BINS_AUDIO_BIN_FILENAME = "bins/light_c906_audio.bin"
> +
> +define XUANTIE_BINS_INSTALL_IMAGES_CMDS
> +	$(foreach f, \
> +		$(XUANTIE_BINS_FPGA_BIN_FILENAME) \
> +		$(XUANTIE_BINS_AUDIO_BIN_FILENAME) \
> +		, \
> +		$(INSTALL) -D -m 0644 -t $(BINARIES_DIR) $(@D)/$(f)
> +	)
> +endef

Being only 2 files to be installed I'd prefer to see 2 lines instead of
foreach loop. Can you please change it accordingly?

Thank you
Best regards
-- 
Giulio Benetti
CEO&CTO@Benetti Engineering sas
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Buildroot] [PATCH v2 1/2] package/xuantie-bins: new package
  2024-02-06 16:56   ` Giulio Benetti
@ 2024-02-10 15:22     ` kilian.zinnecker--- via buildroot
  2024-02-11 12:38       ` Thomas Petazzoni via buildroot
  2024-02-11 12:15     ` kilian.zinnecker--- via buildroot
  1 sibling, 1 reply; 11+ messages in thread
From: kilian.zinnecker--- via buildroot @ 2024-02-10 15:22 UTC (permalink / raw)
  To: kilian.zinnecker, buildroot
  Cc: Giulio Benetti, Robert Nelson, Thomas Petazzoni

Hello Giulio, all,

> Hi Yegor, Kilian,

This is strange, maybe someone can have a look here: On ozlabs, there are a 
lot of patches, which have the submitter "kilian.zinnecker--- via buildroot". 
However, most of them are NOT from me. E.g., one from Yegor Yefremov [1] is 
marked with submitter "kilian.zinnecker--- via buildroot" - However, I am 
definitively not Yegor, and none of his patches is from me. There are even more 
patches marked with "kilian.zinnecker--- via buildroot" [2], some of them even 
from before I ever submitted my first patch (the Rock5B board support) to 
buildroot. Does anyone have any idea what this is about, or can have a deeper 
look at this? (The BeagleV-Ahead patches are from me.)

[1] https://patchwork.ozlabs.org/project/buildroot/patch/
20240206132051.2838897-1-yegorslists@googlemail.com/

[2] https://patchwork.ozlabs.org/project/buildroot/list/?
submitter=82609&archive=both&state=*

[--SNIP--]

Thanks for your review Giulio. I will try to address the issues and prepare a 
new version of the patches.

Best regards,
Kilian





_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Buildroot] [PATCH v2 1/2] package/xuantie-bins: new package
  2024-02-06 16:56   ` Giulio Benetti
  2024-02-10 15:22     ` kilian.zinnecker--- via buildroot
@ 2024-02-11 12:15     ` kilian.zinnecker--- via buildroot
  2024-02-13 18:19       ` Giulio Benetti
  1 sibling, 1 reply; 11+ messages in thread
From: kilian.zinnecker--- via buildroot @ 2024-02-11 12:15 UTC (permalink / raw)
  To: kilian.zinnecker, buildroot, Giulio Benetti
  Cc: Robert Nelson, Thomas Petazzoni

Hello Giulio, all,

[--SNIP--]
> can you please provide a separate patch to alphabetize?

I did so: https://gitlab.com/buildroot.org/buildroot/-/commit/
53fad3242d74b9fad11978429d6cc2879f783f4b

However, unfortunately Thomas de-alphabetized it again when he applied my 
RZBoard V2L patches: https://gitlab.com/buildroot.org/buildroot/-/commit/
f003675119c9ca503afa19c04074e81c49538baf

I just send a v3 of the BeagleV-Ahead patches. After we get this series 
applied, I will then again send a single patch to alphabetize.

[--SNIP--]
> > --- /dev/null
> > +++ b/package/xuantie-bins/Config.in
> > @@ -0,0 +1,6 @@
> > +config BR2_PACKAGE_XUANTIE_BINS
> > +	bool "xuantie-bins"
> > +	depends on BR2_riscv
> > +	help
> > +	  This package provides binary blobs, needed for the
> > +	  BeagleV-Ahead's SoC (TH1520).
> 
> Can you please describe a bit what those binaries are meant for?


I gave a brief description, but I don't know much about these. Maybe Robert 
can give even more information, if more is needed?

[--SNIP--]
> > +XUANTIE_BINS_FPGA_BIN_FILENAME = "bins/light_aon_fpga.bin"
> > +XUANTIE_BINS_AUDIO_BIN_FILENAME = "bins/light_c906_audio.bin"
> > +
> > +define XUANTIE_BINS_INSTALL_IMAGES_CMDS
> > +	$(foreach f, \
> > +		$(XUANTIE_BINS_FPGA_BIN_FILENAME) \
> > +		$(XUANTIE_BINS_AUDIO_BIN_FILENAME) \
> > +		, \
> > +		$(INSTALL) -D -m 0644 -t $(BINARIES_DIR) $(@D)/$(f)
> > +	)
> > +endef
> 
> Being only 2 files to be installed I'd prefer to see 2 lines instead of
> foreach loop. Can you please change it accordingly?

I unrolled the loop in my v3 of the patches.

Thanks for reviewing and best regards,
Kilian



_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Buildroot] [PATCH v2 2/2] configs/beaglev_ahead: new defconfig
  2024-02-06 16:31   ` Giulio Benetti
@ 2024-02-11 12:24     ` kilian.zinnecker--- via buildroot
  2024-02-13 18:17       ` Giulio Benetti
  0 siblings, 1 reply; 11+ messages in thread
From: kilian.zinnecker--- via buildroot @ 2024-02-11 12:24 UTC (permalink / raw)
  To: kilian.zinnecker, buildroot
  Cc: Giulio Benetti, Robert Nelson, Thomas Petazzoni

Hello Giulio, all,

> > This patch adds board support for the BeagleV-Ahead. It uses a
> > custom kernel for the board's SoC. As the SoC has an outdated and
> > currently not supported version of the RISC-V vector extension, the
> > vector extension is disabled.
> 
> can you please provide an URL to the product page?

Yes, I added an URL into the commit message of v3.

[--SNIP--]
> > --- /dev/null
> > +++ b/board/beaglev-ahead/post-image.sh
> > @@ -0,0 +1,6 @@
> > +#!/usr/bin/env bash
> > +set -e
> > +
> > +cp -r ${BUILD_DIR}/linux-custom/arch/riscv/boot/dts/thead/overlays/
> > ${BINARIES_DIR}
> linux-custom should substituted with $(LINUX_DIR)

I tried $(LINUX_DIR) and ${LINUX_DIR}, but both resulted in an empty string 
and as a consequence in a wrong path and broke the build. So in my v3 I kept 
it as it is for now. Should I try something else?

> > --- /dev/null
> > +++ b/configs/beaglev_ahead_defconfig
> > @@ -0,0 +1,44 @@
> > +BR2_riscv=y
> > +BR2_riscv_custom=y
> > +BR2_RISCV_ISA_CUSTOM_RVM=y
> > +BR2_RISCV_ISA_CUSTOM_RVA=y
> > +BR2_RISCV_ISA_CUSTOM_RVF=y
> > +BR2_RISCV_ISA_CUSTOM_RVD=y
> > +BR2_RISCV_ISA_CUSTOM_RVC=y
> 
> With commit cbd91e89e43d600172c62fd1cbd33aa74d0a851a all "_CUSTOM" have
> been dropped, so can you please replace all the:
> BR2_RISCV_ISA_CUSTOM_*
> occurences with:
> BR2_RISCV_ISA_*
> ?

I fixed it, thanks.

> > +BR2_GCC_VERSION_13_X=y
> 
> I think there is a reason you force using gcc 13, can you describe it in
> the commit log and here?

Yes, there were problems. I am not 100% sure, but as I remember it: the 
OpenSBI used has an old version and in its build, it does not define certain 
flags, which are needed by GCC 12 to activate the needed zifencei and zicsr 
extension. Those extension where redefined to be in some other extension pack 
of RiscV (or something like that, I don't remeber this exactly). Anyway it 
threw an error in GCC 12, and I thinkt to fix that, one would have to touch the 
old OpenSBI version. Switching to GCC 13 (where it works out of the box) seems 
then to be cleaner for me.

[--SNIP--]
> > +BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="board/beaglev-ahead/uboot.fragmen
> > t" +BR2_TARGET_UBOOT_FORMAT_BIN=y
> > +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
> > +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-with-spl.bin"
> 
> Here you need to add:
> BR2_PACKAGE_HOST_DOSFSTOOLS=y
> otherwise it fails to build under buildroot/utils/docker-run

Added dosfstools to the defconfig, thanks!

> > +BR2_PACKAGE_HOST_MTOOLS=y
> > +BR2_PACKAGE_HOST_GENIMAGE=y
> > +BR2_PACKAGE_XUANTIE_BINS=y
> 
> After enabling BR2_RISCV_ISA_ options it builds successfully using
> buildroot/utils/docker-run

I build the image with buildroot/utils/docker-run and it boots. Thanks for the 
hint, I will use buildroot/utils/docker-run in the future as well!

Thanks for your review and best regards,
Kilian




_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Buildroot] [PATCH v2 1/2] package/xuantie-bins: new package
  2024-02-10 15:22     ` kilian.zinnecker--- via buildroot
@ 2024-02-11 12:38       ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 11+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-02-11 12:38 UTC (permalink / raw)
  To: kilian.zinnecker; +Cc: Giulio Benetti, Robert Nelson, buildroot

On Sat, 10 Feb 2024 16:22:10 +0100
kilian.zinnecker@mail.de wrote:

> This is strange, maybe someone can have a look here: On ozlabs, there are a 
> lot of patches, which have the submitter "kilian.zinnecker--- via buildroot". 
> However, most of them are NOT from me. E.g., one from Yegor Yefremov [1] is 
> marked with submitter "kilian.zinnecker--- via buildroot" - However, I am 
> definitively not Yegor, and none of his patches is from me. There are even more 
> patches marked with "kilian.zinnecker--- via buildroot" [2], some of them even 
> from before I ever submitted my first patch (the Rock5B board support) to 
> buildroot. Does anyone have any idea what this is about, or can have a deeper 
> look at this? (The BeagleV-Ahead patches are from me.)

Yes, this is a known issue, caused by an interaction between the From:
rewriting by mailman (needed due to strict DMARC policies by some SMTP
servers) and a bug in patchwork.

Sadly, the patchwork instance we are using (ozlabs.org) is using an
ancient version of patchwork, which is no longer updated. We have asked
the kernel.org people if we could migrate to the patchwork.kernel.org,
but we still haven't heard back a definitive answer.

Best regards,

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Buildroot] [PATCH v2 2/2] configs/beaglev_ahead: new defconfig
  2024-02-11 12:24     ` kilian.zinnecker--- via buildroot
@ 2024-02-13 18:17       ` Giulio Benetti
  0 siblings, 0 replies; 11+ messages in thread
From: Giulio Benetti @ 2024-02-13 18:17 UTC (permalink / raw)
  To: kilian.zinnecker, buildroot; +Cc: Robert Nelson, Thomas Petazzoni

Hi Kilian,

On 11/02/24 13:24, kilian.zinnecker--- via buildroot wrote:
> Hello Giulio, all,
> 
>>> This patch adds board support for the BeagleV-Ahead. It uses a
>>> custom kernel for the board's SoC. As the SoC has an outdated and
>>> currently not supported version of the RISC-V vector extension, the
>>> vector extension is disabled.
>>
>> can you please provide an URL to the product page?
> 
> Yes, I added an URL into the commit message of v3.
> 
> [--SNIP--]
>>> --- /dev/null
>>> +++ b/board/beaglev-ahead/post-image.sh
>>> @@ -0,0 +1,6 @@
>>> +#!/usr/bin/env bash
>>> +set -e
>>> +
>>> +cp -r ${BUILD_DIR}/linux-custom/arch/riscv/boot/dts/thead/overlays/
>>> ${BINARIES_DIR}
>> linux-custom should substituted with $(LINUX_DIR)
> 
> I tried $(LINUX_DIR) and ${LINUX_DIR}, but both resulted in an empty string
> and as a consequence in a wrong path and broke the build. 

You're right, LINUX_DIR is not exported in Makefile, that's why it can't
be found in scripts.

Best regards
-- 
Giulio Benetti
CEO&CTO@Benetti Engineering sas

> So in my v3 I kept it as it is for now. Should I try something else?
> 
>>> --- /dev/null
>>> +++ b/configs/beaglev_ahead_defconfig
>>> @@ -0,0 +1,44 @@
>>> +BR2_riscv=y
>>> +BR2_riscv_custom=y
>>> +BR2_RISCV_ISA_CUSTOM_RVM=y
>>> +BR2_RISCV_ISA_CUSTOM_RVA=y
>>> +BR2_RISCV_ISA_CUSTOM_RVF=y
>>> +BR2_RISCV_ISA_CUSTOM_RVD=y
>>> +BR2_RISCV_ISA_CUSTOM_RVC=y
>>
>> With commit cbd91e89e43d600172c62fd1cbd33aa74d0a851a all "_CUSTOM" have
>> been dropped, so can you please replace all the:
>> BR2_RISCV_ISA_CUSTOM_*
>> occurences with:
>> BR2_RISCV_ISA_*
>> ?
> 
> I fixed it, thanks.
> 
>>> +BR2_GCC_VERSION_13_X=y
>>
>> I think there is a reason you force using gcc 13, can you describe it in
>> the commit log and here?
> 
> Yes, there were problems. I am not 100% sure, but as I remember it: the
> OpenSBI used has an old version and in its build, it does not define certain
> flags, which are needed by GCC 12 to activate the needed zifencei and zicsr
> extension. Those extension where redefined to be in some other extension pack
> of RiscV (or something like that, I don't remeber this exactly). Anyway it
> threw an error in GCC 12, and I thinkt to fix that, one would have to touch the
> old OpenSBI version. Switching to GCC 13 (where it works out of the box) seems
> then to be cleaner for me.
> 
> [--SNIP--]
>>> +BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="board/beaglev-ahead/uboot.fragmen
>>> t" +BR2_TARGET_UBOOT_FORMAT_BIN=y
>>> +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
>>> +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-with-spl.bin"
>>
>> Here you need to add:
>> BR2_PACKAGE_HOST_DOSFSTOOLS=y
>> otherwise it fails to build under buildroot/utils/docker-run
> 
> Added dosfstools to the defconfig, thanks!
> 
>>> +BR2_PACKAGE_HOST_MTOOLS=y
>>> +BR2_PACKAGE_HOST_GENIMAGE=y
>>> +BR2_PACKAGE_XUANTIE_BINS=y
>>
>> After enabling BR2_RISCV_ISA_ options it builds successfully using
>> buildroot/utils/docker-run
> 
> I build the image with buildroot/utils/docker-run and it boots. Thanks for the
> hint, I will use buildroot/utils/docker-run in the future as well!
> 
> Thanks for your review and best regards,
> Kilian
> 
> 
> 
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Buildroot] [PATCH v2 1/2] package/xuantie-bins: new package
  2024-02-11 12:15     ` kilian.zinnecker--- via buildroot
@ 2024-02-13 18:19       ` Giulio Benetti
  0 siblings, 0 replies; 11+ messages in thread
From: Giulio Benetti @ 2024-02-13 18:19 UTC (permalink / raw)
  To: kilian.zinnecker, buildroot; +Cc: Robert Nelson, Thomas Petazzoni

Hi Kilian,

On 11/02/24 13:15, kilian.zinnecker--- via buildroot wrote:
> Hello Giulio, all,
> 
> [--SNIP--]
>> can you please provide a separate patch to alphabetize?
> 
> I did so: https://gitlab.com/buildroot.org/buildroot/-/commit/
> 53fad3242d74b9fad11978429d6cc2879f783f4b
> 
> However, unfortunately Thomas de-alphabetized it again when he applied my
> RZBoard V2L patches: https://gitlab.com/buildroot.org/buildroot/-/commit/
> f003675119c9ca503afa19c04074e81c49538baf
> 
> I just send a v3 of the BeagleV-Ahead patches. After we get this series
> applied, I will then again send a single patch to alphabetize.

Please send the alphabetize patch along with the V4 patchset,

> 
> [--SNIP--]
>>> --- /dev/null
>>> +++ b/package/xuantie-bins/Config.in
>>> @@ -0,0 +1,6 @@
>>> +config BR2_PACKAGE_XUANTIE_BINS
>>> +	bool "xuantie-bins"
>>> +	depends on BR2_riscv
>>> +	help
>>> +	  This package provides binary blobs, needed for the
>>> +	  BeagleV-Ahead's SoC (TH1520).
>>
>> Can you please describe a bit what those binaries are meant for?
> 
> 
> I gave a brief description, but I don't know much about these. Maybe Robert
> can give even more information, if more is needed?

I see sufficient explanation in V3

> 
> [--SNIP--]
>>> +XUANTIE_BINS_FPGA_BIN_FILENAME = "bins/light_aon_fpga.bin"
>>> +XUANTIE_BINS_AUDIO_BIN_FILENAME = "bins/light_c906_audio.bin"
>>> +
>>> +define XUANTIE_BINS_INSTALL_IMAGES_CMDS
>>> +	$(foreach f, \
>>> +		$(XUANTIE_BINS_FPGA_BIN_FILENAME) \
>>> +		$(XUANTIE_BINS_AUDIO_BIN_FILENAME) \
>>> +		, \
>>> +		$(INSTALL) -D -m 0644 -t $(BINARIES_DIR) $(@D)/$(f)
>>> +	)
>>> +endef
>>
>> Being only 2 files to be installed I'd prefer to see 2 lines instead of
>> foreach loop. Can you please change it accordingly?
> 
> I unrolled the loop in my v3 of the patches.

Fine, see V3 comments.

Thank you!

Best regards
-- 
Giulio Benetti
CEO&CTO@Benetti Engineering sas
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-02-13 18:19 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-04 23:12 [Buildroot] [PATCH v2 0/2] Add board support for the BeagleV-Ahead kilian.zinnecker--- via buildroot
2023-12-04 23:12 ` [Buildroot] [PATCH v2 1/2] package/xuantie-bins: new package kilian.zinnecker--- via buildroot
2024-02-06 16:56   ` Giulio Benetti
2024-02-10 15:22     ` kilian.zinnecker--- via buildroot
2024-02-11 12:38       ` Thomas Petazzoni via buildroot
2024-02-11 12:15     ` kilian.zinnecker--- via buildroot
2024-02-13 18:19       ` Giulio Benetti
2023-12-04 23:12 ` [Buildroot] [PATCH v2 2/2] configs/beaglev_ahead: new defconfig kilian.zinnecker--- via buildroot
2024-02-06 16:31   ` Giulio Benetti
2024-02-11 12:24     ` kilian.zinnecker--- via buildroot
2024-02-13 18:17       ` Giulio Benetti

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.