Skip to contentSkip to conversation

Support for the BeagleV platform

PATCH New Thomas Petazzoni 7 participants 38 messages May 4, 2021 – May 14, 2021 RISC-V

lore
Share & tools
lore
#0 lore raw

v3 cover Support for the BeagleV platform

Hello,

Here is a third iteration of the BeagleV patch series, which brings a few fixes:

* The post-build script of v1 calling "make printvars" was working only for in-tree builds. Following a comment from Frank Hunleth on the v1, it was changed in v2 to use "make -C ${O} printvars", which made out-of-tree builds work, but broke in-tree builds. So in this new version, we introduced a preliminary patch that exposes $(CONFIG_DIR) to post-build/post-image scripts, to make such "make printvars" invocations possible.

* The beaglev_defconfig is updated to take into account the rename of the Git repositories by Starfive for Linux, U-Boot and OpenSBI.

* Reviewed-by tags from Bin Meng are added on beaglev-ddrinit, beaglev-secondboot and the corresponding beaglev_defconfig update. Thanks Bin!

As usual, the whole thing is also available at:

https://github.com/tpetazzoni/buildroot/commits/beaglev

Best regards,

Thomas Petazzoni

Thomas Petazzoni (7):
package/Makefile.in: expose CONFIG_DIR to post-build/post-image
scripts
boot/opensbi: add options to enable/disable image installation configs/beaglev_defconfig: new defconfig package/riscv64-elf-toolchain: new package boot/beaglev-ddrinit: new package boot/beaglev-secondboot: new package
configs/beaglev: enable building of low-level firmware

 DEVELOPERS                                    |   5 +
 board/beaglev/extlinux.conf                   |   4 +
 board/beaglev/genimage.cfg                    |  12 ++
 ...s-starfive-vic7100-adjust-fdt_addr_r.patch |  39 ++++++
 board/beaglev/post-build.sh                   |  17 +++
 board/beaglev/readme.txt                      | 122 ++++++++++++++++++
 boot/Config.in                                |   2 +
 boot/beaglev-ddrinit/Config.in                |   9 ++
 boot/beaglev-ddrinit/beaglev-ddrinit.mk       |  29 +++++
 boot/beaglev-secondboot/Config.in             |   9 ++
 boot/beaglev-secondboot/beaglev-secondboot.mk |  29 +++++
 boot/opensbi/Config.in                        |  20 +++
 boot/opensbi/opensbi.mk                       |  16 ++-
 configs/beaglev_defconfig                     |  37 ++++++
 docs/manual/customize-post-image.txt          |   3 +-
 docs/manual/customize-rootfs.txt              |   3 +
 package/Makefile.in                           |   1 +
 .../riscv64-elf-toolchain.mk                  |  25 ++++
 18 files changed, 375 insertions(+), 7 deletions(-)
 create mode 100644 board/beaglev/extlinux.conf
 create mode 100644 board/beaglev/genimage.cfg
 create mode 100644 board/beaglev/patches/uboot/0001-include-configs-starfive-vic7100-adjust-fdt_addr_r.patch
 create mode 100755 board/beaglev/post-build.sh
 create mode 100644 board/beaglev/readme.txt
 create mode 100644 boot/beaglev-ddrinit/Config.in
 create mode 100644 boot/beaglev-ddrinit/beaglev-ddrinit.mk
 create mode 100644 boot/beaglev-secondboot/Config.in
 create mode 100644 boot/beaglev-secondboot/beaglev-secondboot.mk
 create mode 100644 configs/beaglev_defconfig
 create mode 100644 package/riscv64-elf-toolchain/riscv64-elf-toolchain.mk
Signature · 1 line
2.30.2
#1 lore raw

PATCH v3 1/7 package/Makefile.in: expose CONFIG_DIR to post-build/post-image scripts

Sometimes, post-build or post-image scripts need to reinvoke Buildroot's make, for example to execute "make printvars".

However, so far none of the variables exposed to post-build/post-image scripts allowed to do that in a way that worked for both in-tree and out-of-tree builds. Indeed:

* "make printvars" would work for in-tree builds, but not out of tree builds

* "make -C ${O} printvars" would work for out-of-tree builds, but not in-tree builds

In order to solve this, this commit exposes $(CONFIG_DIR) to post-build/post-image scripts, through the EXTRA_ENV variable.

The documentation is updated accordingly.

---
 docs/manual/customize-post-image.txt | 3 ++-
 docs/manual/customize-rootfs.txt     | 3 +++
 package/Makefile.in                  | 1 +
 3 files changed, 6 insertions(+), 1 deletion(-)
docs/manual/customize-post-image.txt +2 -1
index 90ea2b9328..5308093d06 100644
@@ -28,7 +28,8 @@ different sets of arguments to each script.
 
 Again just like for the post-build scripts, the scripts have access to
 the environment variables +BR2_CONFIG+, +HOST_DIR+, +STAGING_DIR+,
-+TARGET_DIR+, +BUILD_DIR+, +BINARIES_DIR+ and +BASE_DIR+.
++TARGET_DIR+, +BUILD_DIR+, +BINARIES_DIR+, +CONFIG_DIR+ and
++BASE_DIR+.
 
 The post-image scripts will be executed as the user that executes
 Buildroot, which should normally _not_ be the root user. Therefore, any
docs/manual/customize-rootfs.txt +3 -0
index e1dbadda5b..8b361f8621 100644
@@ -65,6 +65,9 @@ In addition, you may also use these environment variables:
   - +BUILD_DIR+: the directory where packages are extracted and built
   - +BINARIES_DIR+: the place where all binary files (aka images) are
     stored
+  - +CONFIG_DIR+: the directory containing the .config file, and
+    therefore the top-level Buildroot Makefile to use (which is
+    correct for both in-tree and out-of-tree builds)
   - +BASE_DIR+: the base output directory
 
 Below three more methods of customizing the target filesystem are
package/Makefile.in +1 -0
index 51f5cbce4f..f4028bc67c 100644
@@ -318,6 +318,7 @@ EXTRA_ENV = \
 	PATH=$(BR_PATH) \
 	BR2_DL_DIR=$(BR2_DL_DIR) \
 	BUILD_DIR=$(BUILD_DIR) \
+	CONFIG_DIR=$(CONFIG_DIR) \
 	O=$(CANONICAL_O)
 
 ################################################################################
Signature · 1 line
2.30.2
#2 lore raw

PATCH v3 1/7 package/Makefile.in: expose CONFIG_DIR to post-build/post-image scripts

Thomas, All,

On 2021-05-04 22:51 +0200, Thomas Petazzoni spake thusly:

Quoted 6 lines

Sometimes, post-build or post-image scripts need to reinvoke Buildroot's make, for example to execute "make printvars".

However, so far none of the variables exposed to post-build/post-image scripts allowed to do that in a way that worked for both in-tree and out-of-tree builds. Indeed:

As we discussed on IRC, there is in fact one possibility to do that:

    make -C ${BR2_CONFIG%/*} printvars

Indeed, BR2_CONFIG points to the full path of the .config file, so by removing the last path component of BR2_CONFIG, we end up with the directory that is CONFIG_DIR.

However, it is not ver convenient to extract info from Br2_CONFIG, so exposing CONFIG_DIR is a godd adition.

Applied to master, after referencing BR2_CONFIG, thanks.

Regards,
Yann E. MORIN.

Quoted 65 lines

* "make printvars" would work for in-tree builds, but not out of tree builds

* "make -C ${O} printvars" would work for out-of-tree builds, but not in-tree builds

In order to solve this, this commit exposes $(CONFIG_DIR) to post-build/post-image scripts, through the EXTRA_ENV variable.

The documentation is updated accordingly.

---
 docs/manual/customize-post-image.txt | 3 ++-
 docs/manual/customize-rootfs.txt     | 3 +++
 package/Makefile.in                  | 1 +
 3 files changed, 6 insertions(+), 1 deletion(-)
docs/manual/customize-post-image.txt +2 -1
index 90ea2b9328..5308093d06 100644
@@ -28,7 +28,8 @@ different sets of arguments to each script.
 
 Again just like for the post-build scripts, the scripts have access to
 the environment variables +BR2_CONFIG+, +HOST_DIR+, +STAGING_DIR+,
-+TARGET_DIR+, +BUILD_DIR+, +BINARIES_DIR+ and +BASE_DIR+.
++TARGET_DIR+, +BUILD_DIR+, +BINARIES_DIR+, +CONFIG_DIR+ and
++BASE_DIR+.
 
 The post-image scripts will be executed as the user that executes
 Buildroot, which should normally _not_ be the root user. Therefore, any
docs/manual/customize-rootfs.txt +3 -0
index e1dbadda5b..8b361f8621 100644
@@ -65,6 +65,9 @@ In addition, you may also use these environment variables:
   - +BUILD_DIR+: the directory where packages are extracted and built
   - +BINARIES_DIR+: the place where all binary files (aka images) are
     stored
+  - +CONFIG_DIR+: the directory containing the .config file, and
+    therefore the top-level Buildroot Makefile to use (which is
+    correct for both in-tree and out-of-tree builds)
   - +BASE_DIR+: the base output directory
 
 Below three more methods of customizing the target filesystem are
package/Makefile.in +1 -0
index 51f5cbce4f..f4028bc67c 100644
@@ -318,6 +318,7 @@ EXTRA_ENV = \
 	PATH=$(BR_PATH) \
 	BR2_DL_DIR=$(BR2_DL_DIR) \
 	BUILD_DIR=$(BUILD_DIR) \
+	CONFIG_DIR=$(CONFIG_DIR) \
 	O=$(CANONICAL_O)
 
 ################################################################################
Signature · 6 lines
2.30.2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw

PATCH v3 1/7 package/Makefile.in: expose CONFIG_DIR to post-build/post-image scripts

In reply to Thomas Petazzoni
Quoted 15 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Sometimes, post-build or post-image scripts need to reinvoke Buildroot's make, for example to execute "make printvars".

However, so far none of the variables exposed to post-build/post-image scripts allowed to do that in a way that worked for both in-tree and out-of-tree builds. Indeed:

* "make printvars" would work for in-tree builds, but not out of tree builds

* "make -C ${O} printvars" would work for out-of-tree builds, but not in-tree builds

Quoted 6 lines

In order to solve this, this commit exposes $(CONFIG_DIR) to post-build/post-image scripts, through the EXTRA_ENV variable.

The documentation is updated accordingly.

While this is a new feature, it is arguably something we should have fixed a long time ago and it seems fairly low risk, so committed to 2021.02.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#4 lore raw

PATCH v3 2/7 boot/opensbi: add options to enable/disable image installation

In reply to Thomas Petazzoni

Until now, whenever a BR2_TARGET_OPENSBI_PLAT value was specified, opensbi.mk was assuming that both fw_jump and fw_dynamic would be produced. However, this is not the case: the OpenSBI per-platform config.mk can decide which image to build.

As an example, the config.mk for VIC7100-based BeagleV only enables producing the fw_payload image.

This commit adds three options to enable the installation of images:
one for fw_jump, one for fw_dynamic, one for fw_payload.

The options for fw_jump and fw_dynamic are "default y" when BR2_TARGET_OPENSBI_PLAT is not empty, to preserve existing behavior.

The option for fw_payload is forcefully selected when either Linux or U-Boot are selected as payloads.

---
 boot/opensbi/Config.in  | 20 ++++++++++++++++++++
 boot/opensbi/opensbi.mk | 16 ++++++++++------
 2 files changed, 30 insertions(+), 6 deletions(-)
boot/opensbi/Config.in +20 -0
index 236bf74a90..55a644506f 100644
@@ -74,11 +74,30 @@ config BR2_TARGET_OPENSBI_PLAT
 	  the platform specific static library libplatsbi.a and firmware
 	  examples are built.
 
+config BR2_TARGET_OPENSBI_INSTALL_DYNAMIC_IMG
+	bool "Install fw_dynamic image"
+	default y if BR2_TARGET_OPENSBI_PLAT != ""
+	help
+	  This installs the fw_dynamic image.
+
+config BR2_TARGET_OPENSBI_INSTALL_JUMP_IMG
+	bool "Install fw_jump image"
+	default y if BR2_TARGET_OPENSBI_PLAT != ""
+	help
+	  This installs the fw_jump image.
+
+config BR2_TARGET_OPENSBI_INSTALL_PAYLOAD_IMG
+	bool "Install fw_payload image"
+	help
+	  This option enables the installation of the fw_paylaod
+	  image.
+
 config BR2_TARGET_OPENSBI_LINUX_PAYLOAD
 	bool "Include Linux as OpenSBI Payload"
 	depends on BR2_TARGET_OPENSBI_PLAT != ""
 	depends on BR2_LINUX_KERNEL
 	depends on BR2_LINUX_KERNEL_IMAGE
+	select BR2_TARGET_OPENSBI_INSTALL_PAYLOAD_IMG
 	help
 	  Build OpenSBI with the Linux kernel as a Payload.
 
@@ -86,6 +105,7 @@ config BR2_TARGET_OPENSBI_UBOOT_PAYLOAD
 	bool "Include U-Boot as OpenSBI Payload"
 	depends on BR2_TARGET_OPENSBI_PLAT != ""
 	depends on BR2_TARGET_UBOOT
+	select BR2_TARGET_OPENSBI_INSTALL_PAYLOAD_IMG
 	help
 	  Build OpenSBI with the U-Boot as a Payload.
 
boot/opensbi/opensbi.mk +10 -6
index 8ebe4566fd..f8cbbb8fcc 100644
@@ -50,15 +50,19 @@ define OPENSBI_BUILD_CMDS
 	$(TARGET_MAKE_ENV) $(OPENSBI_MAKE_ENV) $(MAKE) -C $(@D)
 endef
 
-ifneq ($(OPENSBI_PLAT),)
+ifeq ($(BR2_TARGET_OPENSBI_INSTALL_DYNAMIC_IMG),y)
 OPENSBI_INSTALL_IMAGES = YES
-OPENSBI_FW_IMAGES += jump dynamic
-ifeq ($(BR2_TARGET_OPENSBI_LINUX_PAYLOAD),y)
-OPENSBI_FW_IMAGES += payload
+OPENSBI_FW_IMAGES += dynamic
 endif
-ifeq ($(BR2_TARGET_OPENSBI_UBOOT_PAYLOAD),y)
-OPENSBI_FW_IMAGES = payload
+
+ifeq ($(BR2_TARGET_OPENSBI_INSTALL_JUMP_IMG),y)
+OPENSBI_INSTALL_IMAGES = YES
+OPENSBI_FW_IMAGES += jump
 endif
+
+ifeq ($(BR2_TARGET_OPENSBI_INSTALL_PAYLOAD_IMG),y)
+OPENSBI_INSTALL_IMAGES = YES
+OPENSBI_FW_IMAGES += payload
 endif
 
 define OPENSBI_INSTALL_IMAGES_CMDS
Signature · 1 line
2.30.2
#5 lore raw

PATCH v3 2/7 boot/opensbi: add options to enable/disable image installation

Quoted 12 lines · Thomas Petazzoni

Until now, whenever a BR2_TARGET_OPENSBI_PLAT value was specified, opensbi.mk was assuming that both fw_jump and fw_dynamic would be produced. However, this is not the case: the OpenSBI per-platform config.mk can decide which image to build.

As an example, the config.mk for VIC7100-based BeagleV only enables producing the fw_payload image.

This commit adds three options to enable the installation of images:
one for fw_jump, one for fw_dynamic, one for fw_payload.

Quoted 7 lines

The options for fw_jump and fw_dynamic are "default y" when BR2_TARGET_OPENSBI_PLAT is not empty, to preserve existing behavior.

The option for fw_payload is forcefully selected when either Linux or U-Boot are selected as payloads.

Alistair

Quoted 85 lines
---
 boot/opensbi/Config.in  | 20 ++++++++++++++++++++
 boot/opensbi/opensbi.mk | 16 ++++++++++------
 2 files changed, 30 insertions(+), 6 deletions(-)
boot/opensbi/Config.in +20 -0
index 236bf74a90..55a644506f 100644
@@ -74,11 +74,30 @@ config BR2_TARGET_OPENSBI_PLAT
          the platform specific static library libplatsbi.a and firmware
          examples are built.
 
+config BR2_TARGET_OPENSBI_INSTALL_DYNAMIC_IMG
+       bool "Install fw_dynamic image"
+       default y if BR2_TARGET_OPENSBI_PLAT != ""
+       help
+         This installs the fw_dynamic image.
+
+config BR2_TARGET_OPENSBI_INSTALL_JUMP_IMG
+       bool "Install fw_jump image"
+       default y if BR2_TARGET_OPENSBI_PLAT != ""
+       help
+         This installs the fw_jump image.
+
+config BR2_TARGET_OPENSBI_INSTALL_PAYLOAD_IMG
+       bool "Install fw_payload image"
+       help
+         This option enables the installation of the fw_paylaod
+         image.
+
 config BR2_TARGET_OPENSBI_LINUX_PAYLOAD
        bool "Include Linux as OpenSBI Payload"
        depends on BR2_TARGET_OPENSBI_PLAT != ""
        depends on BR2_LINUX_KERNEL
        depends on BR2_LINUX_KERNEL_IMAGE
+       select BR2_TARGET_OPENSBI_INSTALL_PAYLOAD_IMG
        help
          Build OpenSBI with the Linux kernel as a Payload.
 
@@ -86,6 +105,7 @@ config BR2_TARGET_OPENSBI_UBOOT_PAYLOAD
        bool "Include U-Boot as OpenSBI Payload"
        depends on BR2_TARGET_OPENSBI_PLAT != ""
        depends on BR2_TARGET_UBOOT
+       select BR2_TARGET_OPENSBI_INSTALL_PAYLOAD_IMG
        help
          Build OpenSBI with the U-Boot as a Payload.
 
boot/opensbi/opensbi.mk +10 -7
index 8ebe4566fd..f8cbbb8fcc 100644
@@ -50,15 +50,19 @@ define OPENSBI_BUILD_CMDS
        $(TARGET_MAKE_ENV) $(OPENSBI_MAKE_ENV) $(MAKE) -C $(@D)
 endef
 
-ifneq ($(OPENSBI_PLAT),)
+ifeq ($(BR2_TARGET_OPENSBI_INSTALL_DYNAMIC_IMG),y)
 OPENSBI_INSTALL_IMAGES = YES
-OPENSBI_FW_IMAGES += jump dynamic
-ifeq ($(BR2_TARGET_OPENSBI_LINUX_PAYLOAD),y)
-OPENSBI_FW_IMAGES += payload
+OPENSBI_FW_IMAGES += dynamic
 endif
-ifeq ($(BR2_TARGET_OPENSBI_UBOOT_PAYLOAD),y)
-OPENSBI_FW_IMAGES = payload
+
+ifeq ($(BR2_TARGET_OPENSBI_INSTALL_JUMP_IMG),y)
+OPENSBI_INSTALL_IMAGES = YES
+OPENSBI_FW_IMAGES += jump
 endif
+
+ifeq ($(BR2_TARGET_OPENSBI_INSTALL_PAYLOAD_IMG),y)
+OPENSBI_INSTALL_IMAGES = YES
+OPENSBI_FW_IMAGES += payload
 endif
 
 define OPENSBI_INSTALL_IMAGES_CMDS
--

2.30.2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#6 lore raw

PATCH v3 3/7 configs/beaglev_defconfig: new defconfig

In reply to Thomas Petazzoni

This commit introduces support for the RISC-V based BeagleV platform, which uses a Starfive JH7100.

---
 DEVELOPERS                                    |  2 +
 board/beaglev/extlinux.conf                   |  4 +
 board/beaglev/genimage.cfg                    | 12 +++
 ...s-starfive-vic7100-adjust-fdt_addr_r.patch | 39 ++++++++
 board/beaglev/post-build.sh                   | 17 ++++
 board/beaglev/readme.txt                      | 88 +++++++++++++++++++
 configs/beaglev_defconfig                     | 35 ++++++++
 7 files changed, 197 insertions(+)
 create mode 100644 board/beaglev/extlinux.conf
 create mode 100644 board/beaglev/genimage.cfg
 create mode 100644 board/beaglev/patches/uboot/0001-include-configs-starfive-vic7100-adjust-fdt_addr_r.patch
 create mode 100755 board/beaglev/post-build.sh
 create mode 100644 board/beaglev/readme.txt
 create mode 100644 configs/beaglev_defconfig
DEVELOPERS +2 -0
index 573d8d84de..cec63a3715 100644
@@ -2602,10 +2602,12 @@ F:	package/xorcurses/
 
 N:	Thomas Petazzoni <[email protected]>
 F:	arch/Config.in.arm
+F:	board/beaglev/
 F:	board/stmicroelectronics/stm32mp157c-dk2/
 F:	boot/boot-wrapper-aarch64/
 F:	boot/grub2/
 F:	boot/gummiboot/
+F:	configs/beaglev_defconfig
 F:	configs/stm32mp157c_dk2_defconfig
 F:	package/android-tools/
 F:	package/b43-firmware/
board/beaglev/extlinux.conf new file +4 -0
new file mode 100644
index 0000000000..c5444d094c
@@ -0,0 +1,4 @@
+label linux
+  kernel /boot/Image
+  devicetree /boot/starfive_vic7100_beagle_v.dtb
+  append console=ttyS0,115200 earlyprintk root=PARTUUID=0fef845a-c6e1-45bc-82f7-002fa720f958 rootwait
board/beaglev/genimage.cfg new file +12 -0
new file mode 100644
index 0000000000..f38bb7f86c
@@ -0,0 +1,12 @@
+image sdcard.img {
+  hdimage {
+    gpt = true
+  }
+
+  partition rootfs {
+    partition-type-uuid = 72ec70a6-cf74-40e6-bd49-4bda08e8f224
+    partition-uuid = 0fef845a-c6e1-45bc-82f7-002fa720f958
+    bootable = "true"
+    image = "rootfs.ext4"
+  }
+}
board/beaglev/patches/uboot/0001-include-configs-starfive-vic7100-adjust-fdt_addr_r.patch new file +39 -0
new file mode 100644
index 0000000000..74d70f2721
@@ -0,0 +1,39 @@
+From 2c4c813940c577590f3352cef0c49a8def17905d Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <[email protected]>
+Date: Wed, 28 Apr 2021 22:58:45 +0200
+Subject: [PATCH] include/configs/starfive-vic7100: adjust fdt_addr_r
+
+The default fdt_addr_r of 0x88000000 doesn't work, the kernel never
+boots. Using 0x90000000 works fine.
+
+Since it would overlap with the kernel_comp_addr_r area, this one is
+moved 16 MB further, at 0x91000000.
+
+Signed-off-by: Thomas Petazzoni <[email protected]>
+---
+ include/configs/starfive-vic7100.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/include/configs/starfive-vic7100.h b/include/configs/starfive-vic7100.h
+index 8c5915a73c..7150a23873 100644
+--- a/include/configs/starfive-vic7100.h
++++ b/include/configs/starfive-vic7100.h
+@@ -111,13 +111,13 @@
+ 	"fdt_high=0xffffffffffffffff\0" \
+ 	"initrd_high=0xffffffffffffffff\0" \
+ 	"kernel_addr_r=0x84000000\0" \
+-	"fdt_addr_r=0x88000000\0" \
++	"fdt_addr_r=0x90000000\0" \
+ 	"scriptaddr=0x88100000\0" \
+ 	"script_offset_f=0x1fff000\0" \
+ 	"script_size_f=0x1000\0" \
+ 	"pxefile_addr_r=0x88200000\0" \
+ 	"ramdisk_addr_r=0x88300000\0" \
+-	"kernel_comp_addr_r=0x90000000\0" \
++	"kernel_comp_addr_r=0x91000000\0" \
+ 	"kernel_comp_size=0x10000000\0" \
+ 	"type_guid_gpt_loader1=" TYPE_GUID_LOADER1 "\0" \
+ 	"type_guid_gpt_loader2=" TYPE_GUID_LOADER2 "\0" \
+-- 
+2.30.2
+
board/beaglev/post-build.sh new file +17 -0
new file mode 100755
index 0000000000..e303d4b8d9
@@ -0,0 +1,17 @@
+#!/bin/sh
+BOARD_DIR=$(dirname $0)
+
+# The DTB to use is provided within the U-Boot source tree, so we grab
+# it from there, and install it to TARGET_DIR/boot/.
+UBOOT_DIR=$(make -C ${CONFIG_DIR} --no-print-directory VARS=UBOOT_DIR printvars | cut -f2 -d'=')
+install -D -m0644 ${UBOOT_DIR}/arch/riscv/dts/starfive_vic7100_beagle_v.dtb \
+	${TARGET_DIR}/boot/starfive_vic7100_beagle_v.dtb
+
+# Bring the extlinux.conf file in.
+install -D -m 0644 ${BOARD_DIR}/extlinux.conf \
+	${TARGET_DIR}/boot/extlinux/extlinux.conf
+
+# To be reflashed through Xmodem, the bootloader needs to be prepended
+# with a 4-byte header that contains the total size of the file.
+perl -e 'print pack("l", (stat @ARGV[0])[7])' ${BINARIES_DIR}/fw_payload.bin > ${BINARIES_DIR}/fw_payload.bin.out
+cat ${BINARIES_DIR}/fw_payload.bin >> ${BINARIES_DIR}/fw_payload.bin.out
board/beaglev/readme.txt new file +88 -0

88 lines not on this page · raw message

configs/beaglev_defconfig new file +35 -0
new file mode 100644
index 0000000000..e94c4ab639
@@ -0,0 +1,35 @@
+BR2_riscv=y
+BR2_riscv_custom=y
+BR2_RISCV_ISA_CUSTOM_RVM=y
+BR2_RISCV_ISA_CUSTOM_RVF=y
+BR2_RISCV_ISA_CUSTOM_RVD=y
+BR2_RISCV_ISA_CUSTOM_RVC=y
+BR2_GLOBAL_PATCH_DIR="board/beaglev/patches/"
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_10=y
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/beaglev/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/beaglev/genimage.cfg"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
+# HEAD of the Fedora branch
+BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,starfive-tech,linux,710cf052d6abda73584481d920b4b6befc7240ea)/linux-710cf052d6abda73584481d920b4b6befc7240ea.tar.gz"
+BR2_LINUX_KERNEL_DEFCONFIG="starfive_vic7100_evb_sd_net"
+BR2_LINUX_KERNEL_INSTALL_TARGET=y
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+# BR2_TARGET_ROOTFS_TAR is not set
+BR2_TARGET_OPENSBI=y
+BR2_TARGET_OPENSBI_CUSTOM_TARBALL=y
+# HEAD of the Fedora branch
+BR2_TARGET_OPENSBI_CUSTOM_TARBALL_LOCATION="$(call github,starfive-tech,opensbi,2524b0ecd8684b42bc7a4c69794f40f11cbbe2a5)/opensbi-2524b0ecd8684b42bc7a4c69794f40f11cbbe2a5.tar.gz"
+BR2_TARGET_OPENSBI_PLAT="starfive/vic7100"
+# BR2_TARGET_OPENSBI_INSTALL_DYNAMIC_IMG is not set
+# BR2_TARGET_OPENSBI_INSTALL_JUMP_IMG is not set
+BR2_TARGET_OPENSBI_UBOOT_PAYLOAD=y
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_TARBALL=y
+# HEAD of the Fedora branch
+BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,starfive-tech,u-boot,3f3ac01a29ad1cd5fa519d86f81daead2447f1d4)/uboot-3f3ac01a29ad1cd5fa519d86f81daead2447f1d4.tar.gz"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="starfive_vic7100_beagle_v_smode"
+BR2_PACKAGE_HOST_GENIMAGE=y
Signature · 1 line
2.30.2
#7 lore raw

PATCH v3 3/7 configs/beaglev_defconfig: new defconfig

Quoted 5 lines · Thomas Petazzoni

This commit introduces support for the RISC-V based BeagleV platform, which uses a Starfive JH7100.

Alistair

Quoted 271 lines
---
 DEVELOPERS                                    |  2 +
 board/beaglev/extlinux.conf                   |  4 +
 board/beaglev/genimage.cfg                    | 12 +++
 ...s-starfive-vic7100-adjust-fdt_addr_r.patch | 39 ++++++++
 board/beaglev/post-build.sh                   | 17 ++++
 board/beaglev/readme.txt                      | 88 +++++++++++++++++++
 configs/beaglev_defconfig                     | 35 ++++++++
 7 files changed, 197 insertions(+)
 create mode 100644 board/beaglev/extlinux.conf
 create mode 100644 board/beaglev/genimage.cfg
 create mode 100644 board/beaglev/patches/uboot/0001-include-configs-starfive-vic7100-adjust-fdt_addr_r.patch
 create mode 100755 board/beaglev/post-build.sh
 create mode 100644 board/beaglev/readme.txt
 create mode 100644 configs/beaglev_defconfig
DEVELOPERS +2 -0
index 573d8d84de..cec63a3715 100644
@@ -2602,10 +2602,12 @@ F:      package/xorcurses/
 
 N:     Thomas Petazzoni <[email protected]>
 F:     arch/Config.in.arm
+F:     board/beaglev/
 F:     board/stmicroelectronics/stm32mp157c-dk2/
 F:     boot/boot-wrapper-aarch64/
 F:     boot/grub2/
 F:     boot/gummiboot/
+F:     configs/beaglev_defconfig
 F:     configs/stm32mp157c_dk2_defconfig
 F:     package/android-tools/
 F:     package/b43-firmware/
board/beaglev/extlinux.conf new file +4 -0
new file mode 100644
index 0000000000..c5444d094c
@@ -0,0 +1,4 @@
+label linux
+  kernel /boot/Image
+  devicetree /boot/starfive_vic7100_beagle_v.dtb
+  append console=ttyS0,115200 earlyprintk root=PARTUUID=0fef845a-c6e1-45bc-82f7-002fa720f958 rootwait
board/beaglev/genimage.cfg new file +12 -0
new file mode 100644
index 0000000000..f38bb7f86c
@@ -0,0 +1,12 @@
+image sdcard.img {
+  hdimage {
+    gpt = true
+  }
+
+  partition rootfs {
+    partition-type-uuid = 72ec70a6-cf74-40e6-bd49-4bda08e8f224
+    partition-uuid = 0fef845a-c6e1-45bc-82f7-002fa720f958
+    bootable = "true"
+    image = "rootfs.ext4"
+  }
+}
board/beaglev/patches/uboot/0001-include-configs-starfive-vic7100-adjust-fdt_addr_r.patch new file +39 -0
new file mode 100644
index 0000000000..74d70f2721
@@ -0,0 +1,39 @@
+From 2c4c813940c577590f3352cef0c49a8def17905d Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <[email protected]>
+Date: Wed, 28 Apr 2021 22:58:45 +0200
+Subject: [PATCH] include/configs/starfive-vic7100: adjust fdt_addr_r
+
+The default fdt_addr_r of 0x88000000 doesn't work, the kernel never
+boots. Using 0x90000000 works fine.
+
+Since it would overlap with the kernel_comp_addr_r area, this one is
+moved 16 MB further, at 0x91000000.
+
+Signed-off-by: Thomas Petazzoni <[email protected]>
+---
+ include/configs/starfive-vic7100.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/include/configs/starfive-vic7100.h b/include/configs/starfive-vic7100.h
+index 8c5915a73c..7150a23873 100644
+--- a/include/configs/starfive-vic7100.h
++++ b/include/configs/starfive-vic7100.h
+@@ -111,13 +111,13 @@
+       "fdt_high=0xffffffffffffffff\0" \
+       "initrd_high=0xffffffffffffffff\0" \
+       "kernel_addr_r=0x84000000\0" \
+-      "fdt_addr_r=0x88000000\0" \
++      "fdt_addr_r=0x90000000\0" \
+       "scriptaddr=0x88100000\0" \
+       "script_offset_f=0x1fff000\0" \
+       "script_size_f=0x1000\0" \
+       "pxefile_addr_r=0x88200000\0" \
+       "ramdisk_addr_r=0x88300000\0" \
+-      "kernel_comp_addr_r=0x90000000\0" \
++      "kernel_comp_addr_r=0x91000000\0" \
+       "kernel_comp_size=0x10000000\0" \
+       "type_guid_gpt_loader1=" TYPE_GUID_LOADER1 "\0" \
+       "type_guid_gpt_loader2=" TYPE_GUID_LOADER2 "\0" \
+--
+2.30.2
+
board/beaglev/post-build.sh new file +17 -0
new file mode 100755
index 0000000000..e303d4b8d9
@@ -0,0 +1,17 @@
+#!/bin/sh
+BOARD_DIR=$(dirname $0)
+
+# The DTB to use is provided within the U-Boot source tree, so we grab
+# it from there, and install it to TARGET_DIR/boot/.
+UBOOT_DIR=$(make -C ${CONFIG_DIR} --no-print-directory VARS=UBOOT_DIR printvars | cut -f2 -d'=')
+install -D -m0644 ${UBOOT_DIR}/arch/riscv/dts/starfive_vic7100_beagle_v.dtb \
+       ${TARGET_DIR}/boot/starfive_vic7100_beagle_v.dtb
+
+# Bring the extlinux.conf file in.
+install -D -m 0644 ${BOARD_DIR}/extlinux.conf \
+       ${TARGET_DIR}/boot/extlinux/extlinux.conf
+
+# To be reflashed through Xmodem, the bootloader needs to be prepended
+# with a 4-byte header that contains the total size of the file.
+perl -e 'print pack("l", (stat @ARGV[0])[7])' ${BINARIES_DIR}/fw_payload.bin > ${BINARIES_DIR}/fw_payload.bin.out
+cat ${BINARIES_DIR}/fw_payload.bin >> ${BINARIES_DIR}/fw_payload.bin.out
board/beaglev/readme.txt new file +88 -0
new file mode 100644
index 0000000000..d8511d3fd1
@@ -0,0 +1,88 @@
+BeagleV
+=======
+
+BeagleV is a low-cost RISC-V 64-bit based platform, powered by a
+Starfive JH7100 processor. The current defconfig in Buildroot has been
+tested with the JH7100 chip used on the beta version of the BeagleV
+board.
+
+How to build
+============
+
+$ make beaglev_defconfig
+$ make
+
+Build results
+=============
+
+After building, output/images contains:
+
++ Image
++ fw_payload.bin
++ fw_payload.bin.out
++ fw_payload.elf
++ rootfs.ext2
++ rootfs.ext4
++ sdcard.img
++ u-boot.bin
+
+The two important files are:
+
+ - fw_payload.bin.out, which is the bootloader image, containing
+   both OpenSBI and U-Boot.
+
+ - sdcard.img, the SD card image, which contains the root filesystem,
+   kernel image and Device Tree.
+
+Flashing the SD card image
+==========================
+
+$ sudo dd if=output/images/sdcard.img of=/dev/sdX
+
+Preparing the board
+===================
+
+Connect the Beagle-V fan to the 5V supply (pin 2 or 4 of the GPIO
+connector) and GND (pin 6 of the GPIO connector).
+
+Connect a TTL UART cable to pin 8 (TX), 10 (RX) and 14 (GND).
+
+Insert your SD card.
+
+Power-up the board using an USB-C cable.
+
+Flashing the bootloader
+=======================
+
+The bootloader pre-flashed on the Beagle-V has a non-working
+fdt_addr_r environment variable value, so it won't work
+as-is. Reflashing the bootloader with the bootloader image produced by
+Buildroot is necessary.
+
+When the board starts up, a pre-loader shows a count down of 2
+seconds, interrupt by pressing any key. You should reach a menu like
+this:
+
+--------8<----------
+
+bootloader version:210209-4547a8d
+ddr 0x00000000, 1M test
+ddr 0x00100000, 2M test
+DDR clk 2133M,Version: 210302-5aea32f
+0
+***************************************************
+*************** FLASH PROGRAMMING *****************
+***************************************************
+
+0:update uboot
+1:quit
+select the function:
+
+--------8<----------
+
+Press 0 and Enter. You will now see "C" characters being
+displayed. Ask your serial port communication program to send
+fw_payload.bin.out using the Xmodem protocol.
+
+After reflashing is complete, restart the board, it will automatically
+start the system from the SD card, and reach the login prompt.
configs/beaglev_defconfig new file +35 -1
new file mode 100644
index 0000000000..e94c4ab639
@@ -0,0 +1,35 @@
+BR2_riscv=y
+BR2_riscv_custom=y
+BR2_RISCV_ISA_CUSTOM_RVM=y
+BR2_RISCV_ISA_CUSTOM_RVF=y
+BR2_RISCV_ISA_CUSTOM_RVD=y
+BR2_RISCV_ISA_CUSTOM_RVC=y
+BR2_GLOBAL_PATCH_DIR="board/beaglev/patches/"
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_10=y
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/beaglev/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/beaglev/genimage.cfg"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
+# HEAD of the Fedora branch
+BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,starfive-tech,linux,710cf052d6abda73584481d920b4b6befc7240ea)/linux-710cf052d6abda73584481d920b4b6befc7240ea.tar.gz"
+BR2_LINUX_KERNEL_DEFCONFIG="starfive_vic7100_evb_sd_net"
+BR2_LINUX_KERNEL_INSTALL_TARGET=y
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+# BR2_TARGET_ROOTFS_TAR is not set
+BR2_TARGET_OPENSBI=y
+BR2_TARGET_OPENSBI_CUSTOM_TARBALL=y
+# HEAD of the Fedora branch
+BR2_TARGET_OPENSBI_CUSTOM_TARBALL_LOCATION="$(call github,starfive-tech,opensbi,2524b0ecd8684b42bc7a4c69794f40f11cbbe2a5)/opensbi-2524b0ecd8684b42bc7a4c69794f40f11cbbe2a5.tar.gz"
+BR2_TARGET_OPENSBI_PLAT="starfive/vic7100"
+# BR2_TARGET_OPENSBI_INSTALL_DYNAMIC_IMG is not set
+# BR2_TARGET_OPENSBI_INSTALL_JUMP_IMG is not set
+BR2_TARGET_OPENSBI_UBOOT_PAYLOAD=y
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_TARBALL=y
+# HEAD of the Fedora branch
+BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,starfive-tech,u-boot,3f3ac01a29ad1cd5fa519d86f81daead2447f1d4)/uboot-3f3ac01a29ad1cd5fa519d86f81daead2447f1d4.tar.gz"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="starfive_vic7100_beagle_v_smode"
+BR2_PACKAGE_HOST_GENIMAGE=y
--

2.30.2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#8 lore raw

PATCH v3 3/7 configs/beaglev_defconfig: new defconfig

In reply to Thomas Petazzoni

Thomas, All,

On 2021-05-04 22:51 +0200, Thomas Petazzoni spake thusly:

Quoted 5 lines

This commit introduces support for the RISC-V based BeagleV platform, which uses a Starfive JH7100.

---

[--SNIP--]

Quoted 6 lines
board/beaglev/patches/uboot/0001-include-configs-starfive-vic7100-adjust-fdt_addr_r.patch new file +0 -0
new file mode 100644
index 0000000000..74d70f2721

board/beaglev/patches/uboot/0001-include-configs-starfive-vic7100-adjust-fdt_addr_r.patch line 10

Quoted 10 lines
board/beaglev/patches/uboot/0001-include-configs-starfive-vic7100-adjust-fdt_addr_r.patch new file +10 -0
@@ -0,0 +1,39 @@
+From 2c4c813940c577590f3352cef0c49a8def17905d Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <[email protected]>
+Date: Wed, 28 Apr 2021 22:58:45 +0200
+Subject: [PATCH] include/configs/starfive-vic7100: adjust fdt_addr_r
+
+The default fdt_addr_r of 0x88000000 doesn't work, the kernel never
+boots. Using 0x90000000 works fine.
+
+Since it would overlap with the kernel_comp_addr_r area, this one is
+moved 16 MB further, at 0x91000000.

Is this something that is so board specific that we can't upstream it?

[--SNIP--]

board/beaglev/post-build.sh line 6

Quoted 12 lines
board/beaglev/post-build.sh new file +6 -0
new file mode 100755
index 0000000000..e303d4b8d9
@@ -0,0 +1,17 @@
+#!/bin/sh
+BOARD_DIR=$(dirname $0)
+
+# The DTB to use is provided within the U-Boot source tree, so we grab
+# it from there, and install it to TARGET_DIR/boot/.
+UBOOT_DIR=$(make -C ${CONFIG_DIR} --no-print-directory VARS=UBOOT_DIR printvars | cut -f2 -d'=')

Here, I've used eval, as suggested in the manual:

    eval $(make -C ${CONFIG_DIR} --no-print-directory QUOTED_VARS=YES VARS=UBOOT_DIR printvars)

Applied to master, thanks.

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#9 lore raw

PATCH v3 3/7 configs/beaglev_defconfig: new defconfig

Quoted 10 lines · On Sat, 8 May 2021 00:02:32 +0200 "Yann E. MORIN" <[email protected]>…
Quoted 10 lines
board/beaglev/patches/uboot/0001-include-configs-starfive-vic7100-adjust-fdt_addr_r.patch new file +4 -0
new file mode 100644
index 0000000000..74d70f2721
@@ -0,0 +1,39 @@
+From 2c4c813940c577590f3352cef0c49a8def17905d Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <[email protected]>
+Date: Wed, 28 Apr 2021 22:58:45 +0200
+Subject: [PATCH] include/configs/starfive-vic7100: adjust fdt_addr_r
Quoted 8 lines

board/beaglev/patches/uboot/0001-include-configs-starfive-vic7100-adjust-fdt_addr_r.patch line 10

Quoted 6 lines
board/beaglev/patches/uboot/0001-include-configs-starfive-vic7100-adjust-fdt_addr_r.patch new file +6 -0
+
+The default fdt_addr_r of 0x88000000 doesn't work, the kernel never
+boots. Using 0x90000000 works fine.
+
+Since it would overlap with the kernel_comp_addr_r area, this one is
+moved 16 MB further, at 0x91000000.  

Is this something that is so board specific that we can't upstream it?

It's not so much that is it board specific or not, but rather than it's odd that the default value used in the BeagleV repo doesn't work for us. So at this point I don't have a very convincing argument for upstream other than "it doesn't work for me without this change".

Quoted 3 lines

Here, I've used eval, as suggested in the manual:

    eval $(make -C ${CONFIG_DIR} --no-print-directory QUOTED_VARS=YES VARS=UBOOT_DIR printvars)

Sounds good, thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#10 lore raw

PATCH v3 4/7 package/riscv64-elf-toolchain: new package

In reply to Thomas Petazzoni

This commit adds a new package for a prebuilt bare-metal toolchain for RISC-V 64-bit. Indeed, some bootloader/firmware for the BeagleV (and potentially later for other platforms?) do not build with a Linux-capable toolchain.

This uses a pre-built toolchain from SiFive, precompiled for x86-64, so all packages using this toolchain must have the appropriate BR2_HOSTARCH dependency.

This package is modeled after package/arm-gnu-a-toolchain/, which package a pre-built ARM32 bare-metal toolchain.

---
 DEVELOPERS                                    |  1 +
 .../riscv64-elf-toolchain.mk                  | 25 +++++++++++++++++++
 2 files changed, 26 insertions(+)
 create mode 100644 package/riscv64-elf-toolchain/riscv64-elf-toolchain.mk
DEVELOPERS +1 -0
index cec63a3715..7ce78742fc 100644
@@ -2651,6 +2651,7 @@ F:	package/python3/
 F:	package/python-mad/
 F:	package/python-serial/
 F:	package/qextserialport/
+F:	package/riscv64-elf-toolchain/
 F:	package/rpcbind/
 F:	package/rt-tests/
 F:	package/rtc-tools/
package/riscv64-elf-toolchain/riscv64-elf-toolchain.mk new file +25 -0
new file mode 100644
index 0000000000..9b08ee0fec
@@ -0,0 +1,25 @@
+################################################################################
+#
+# riscv64-elf-toolchain
+#
+################################################################################
+
+RISCV64_ELF_TOOLCHAIN_VERSION = 2020.12.8
+RISCV64_ELF_TOOLCHAIN_SITE = https://static.dev.sifive.com/dev-tools/freedom-tools/v2020.12
+RISCV64_ELF_TOOLCHAIN_SOURCE = riscv64-unknown-elf-toolchain-10.2.0-$(RISCV64_ELF_TOOLCHAIN_VERSION)-x86_64-linux-centos6.tar.gz
+
+HOST_RISCV64_ELF_TOOLCHAIN_INSTALL_DIR = $(HOST_DIR)/opt/riscv64-elf
+
+define HOST_RISCV64_ELF_TOOLCHAIN_INSTALL_CMDS
+	rm -rf $(HOST_RISCV64_ELF_TOOLCHAIN_INSTALL_DIR)
+	mkdir -p $(HOST_RISCV64_ELF_TOOLCHAIN_INSTALL_DIR)
+	cp -rf $(@D)/* $(HOST_RISCV64_ELF_TOOLCHAIN_INSTALL_DIR)/
+
+	mkdir -p $(HOST_DIR)/bin
+	cd $(HOST_DIR)/bin && \
+	for i in ../opt/riscv64-elf/bin/*; do \
+		ln -sf $$i; \
+	done
+endef
+
+$(eval $(host-generic-package))
Signature · 1 line
2.30.2
#11 lore raw

PATCH v3 5/7 boot/beaglev-ddrinit: new package

In reply to Thomas Petazzoni

This commit adds a package for the DDR initialization code used on the BeagleV platform.

---
 DEVELOPERS                              |  1 +
 boot/Config.in                          |  1 +
 boot/beaglev-ddrinit/Config.in          |  9 ++++++++
 boot/beaglev-ddrinit/beaglev-ddrinit.mk | 29 +++++++++++++++++++++++++
 4 files changed, 40 insertions(+)
 create mode 100644 boot/beaglev-ddrinit/Config.in
 create mode 100644 boot/beaglev-ddrinit/beaglev-ddrinit.mk
DEVELOPERS +1 -0
index 7ce78742fc..39bc71ea34 100644
@@ -2604,6 +2604,7 @@ N:	Thomas Petazzoni <[email protected]>
 F:	arch/Config.in.arm
 F:	board/beaglev/
 F:	board/stmicroelectronics/stm32mp157c-dk2/
+F:	boot/beaglev-ddrinit/
 F:	boot/boot-wrapper-aarch64/
 F:	boot/grub2/
 F:	boot/gummiboot/
boot/Config.in +1 -0
index b3adbfc8bc..f581205c6c 100644
@@ -6,6 +6,7 @@ source "boot/at91bootstrap3/Config.in"
 source "boot/at91dataflashboot/Config.in"
 source "boot/arm-trusted-firmware/Config.in"
 source "boot/barebox/Config.in"
+source "boot/beaglev-ddrinit/Config.in"
 source "boot/binaries-marvell/Config.in"
 source "boot/boot-wrapper-aarch64/Config.in"
 source "boot/grub2/Config.in"
boot/beaglev-ddrinit/Config.in new file +9 -0
new file mode 100644
index 0000000000..5392f49088
@@ -0,0 +1,9 @@
+config BR2_TARGET_BEAGLEV_DDRINIT
+	bool "beaglev-ddrinit"
+	depends on BR2_riscv
+	depends on BR2_HOSTARCH = "x86_64" # host-riscv64-elf-toolchain
+	help
+	  This package builds the DDRinit firmware used on the BeagleV
+	  platform.
+
+	  https://github.com/starfive-tech/beagle_ddrlnit
boot/beaglev-ddrinit/beaglev-ddrinit.mk new file +29 -0
new file mode 100644
index 0000000000..72e6aea965
@@ -0,0 +1,29 @@
+################################################################################
+#
+# beaglev-ddrinit
+#
+################################################################################
+
+# HEAD of the starfive branch
+BEAGLEV_DDRINIT_VERSION = 15b80de81263996affb2a29332aa681925709983
+BEAGLEV_DDRINIT_SITE = $(call github,starfive-tech,beagle_ddrlnit,$(BEAGLEV_DDRINIT_VERSION))
+BEAGLEV_DDRINIT_INSTALL_TARGET = NO
+BEAGLEV_DDRINIT_INSTALL_IMAGES = YES
+BEAGLEV_DDRINIT_DEPENDENCIES = host-riscv64-elf-toolchain
+# unfortunately, no real license file, but several sources files are
+# under GPL-2.0+, making the whole work GPL-2.0+
+BEAGLEV_DDRINIT_LICENSE = GPL-2.0+
+
+define BEAGLEV_DDRINIT_BUILD_CMDS
+	$(MAKE) -C $(@D)/build \
+		CROSSCOMPILE=$(HOST_DIR)/bin/riscv64-unknown-elf- \
+		SUFFIX=buildroot \
+		GIT_VERSION=$(BEAGLEV_DDRINIT_VERSION)
+endef
+
+define BEAGLEV_DDRINIT_INSTALL_IMAGES_CMDS
+	$(INSTALL) -D -m 0644 $(@D)/build/ddrinit-2133-buildroot.bin.out \
+		$(BINARIES_DIR)/ddrinit-2133-buildroot.bin.out
+endef
+
+$(eval $(generic-package))
Signature · 1 line
2.30.2
#12 lore raw

PATCH v3 5/7 boot/beaglev-ddrinit: new package

On 2021-05-04 22:51 +0200, Thomas Petazzoni spake thusly:

Quoted 2 lines

This commit adds a package for the DDR initialization code used on the BeagleV platform.

The upstream package name is beaglev-ddrlnit, yes, with an 'l' instead of an 'i'. I've renamed the package to match upstream name, so that users that look for it can actually find it.

Applied to master, thanks.

Regards,
Yann E. MORIN.

Quoted 92 lines
---
 DEVELOPERS                              |  1 +
 boot/Config.in                          |  1 +
 boot/beaglev-ddrinit/Config.in          |  9 ++++++++
 boot/beaglev-ddrinit/beaglev-ddrinit.mk | 29 +++++++++++++++++++++++++
 4 files changed, 40 insertions(+)
 create mode 100644 boot/beaglev-ddrinit/Config.in
 create mode 100644 boot/beaglev-ddrinit/beaglev-ddrinit.mk
DEVELOPERS +1 -0
index 7ce78742fc..39bc71ea34 100644
@@ -2604,6 +2604,7 @@ N:	Thomas Petazzoni <[email protected]>
 F:	arch/Config.in.arm
 F:	board/beaglev/
 F:	board/stmicroelectronics/stm32mp157c-dk2/
+F:	boot/beaglev-ddrinit/
 F:	boot/boot-wrapper-aarch64/
 F:	boot/grub2/
 F:	boot/gummiboot/
boot/Config.in +1 -0
index b3adbfc8bc..f581205c6c 100644
@@ -6,6 +6,7 @@ source "boot/at91bootstrap3/Config.in"
 source "boot/at91dataflashboot/Config.in"
 source "boot/arm-trusted-firmware/Config.in"
 source "boot/barebox/Config.in"
+source "boot/beaglev-ddrinit/Config.in"
 source "boot/binaries-marvell/Config.in"
 source "boot/boot-wrapper-aarch64/Config.in"
 source "boot/grub2/Config.in"
boot/beaglev-ddrinit/Config.in new file +9 -0
new file mode 100644
index 0000000000..5392f49088
@@ -0,0 +1,9 @@
+config BR2_TARGET_BEAGLEV_DDRINIT
+	bool "beaglev-ddrinit"
+	depends on BR2_riscv
+	depends on BR2_HOSTARCH = "x86_64" # host-riscv64-elf-toolchain
+	help
+	  This package builds the DDRinit firmware used on the BeagleV
+	  platform.
+
+	  https://github.com/starfive-tech/beagle_ddrlnit
boot/beaglev-ddrinit/beaglev-ddrinit.mk new file +29 -0
new file mode 100644
index 0000000000..72e6aea965
@@ -0,0 +1,29 @@
+################################################################################
+#
+# beaglev-ddrinit
+#
+################################################################################
+
+# HEAD of the starfive branch
+BEAGLEV_DDRINIT_VERSION = 15b80de81263996affb2a29332aa681925709983
+BEAGLEV_DDRINIT_SITE = $(call github,starfive-tech,beagle_ddrlnit,$(BEAGLEV_DDRINIT_VERSION))
+BEAGLEV_DDRINIT_INSTALL_TARGET = NO
+BEAGLEV_DDRINIT_INSTALL_IMAGES = YES
+BEAGLEV_DDRINIT_DEPENDENCIES = host-riscv64-elf-toolchain
+# unfortunately, no real license file, but several sources files are
+# under GPL-2.0+, making the whole work GPL-2.0+
+BEAGLEV_DDRINIT_LICENSE = GPL-2.0+
+
+define BEAGLEV_DDRINIT_BUILD_CMDS
+	$(MAKE) -C $(@D)/build \
+		CROSSCOMPILE=$(HOST_DIR)/bin/riscv64-unknown-elf- \
+		SUFFIX=buildroot \
+		GIT_VERSION=$(BEAGLEV_DDRINIT_VERSION)
+endef
+
+define BEAGLEV_DDRINIT_INSTALL_IMAGES_CMDS
+	$(INSTALL) -D -m 0644 $(@D)/build/ddrinit-2133-buildroot.bin.out \
+		$(BINARIES_DIR)/ddrinit-2133-buildroot.bin.out
+endef
+
+$(eval $(generic-package))
Signature · 6 lines
2.30.2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#13 lore raw

PATCH v3 5/7 boot/beaglev-ddrinit: new package

Thomas, All,

On 2021-05-08 00:04 +0200, Yann E. MORIN spake thusly:

Quoted 7 lines

On 2021-05-04 22:51 +0200, Thomas Petazzoni spake thusly:

Quoted 2 lines

This commit adds a package for the DDR initialization code used on the BeagleV platform.

The upstream package name is beaglev-ddrlnit, yes, with an 'l' instead of an 'i'. I've renamed the package to match upstream name, so that users that look for it can actually find it.

I've also added a hash file.

Also, the comment was stating "HEAD of the starfive branch", but it was HEAD only at the time you wrote it. It already is no longer HEAD.

So I changed the comment, but kept the hash as-is, since that what you tested. Feel free to send a bump if it makes sense.

Quoted 109 lines

Applied to master, thanks.

Regards,
Yann E. MORIN.

Quoted 92 lines
---
 DEVELOPERS                              |  1 +
 boot/Config.in                          |  1 +
 boot/beaglev-ddrinit/Config.in          |  9 ++++++++
 boot/beaglev-ddrinit/beaglev-ddrinit.mk | 29 +++++++++++++++++++++++++
 4 files changed, 40 insertions(+)
 create mode 100644 boot/beaglev-ddrinit/Config.in
 create mode 100644 boot/beaglev-ddrinit/beaglev-ddrinit.mk
DEVELOPERS +1 -0
index 7ce78742fc..39bc71ea34 100644
@@ -2604,6 +2604,7 @@ N:	Thomas Petazzoni <[email protected]>
 F:	arch/Config.in.arm
 F:	board/beaglev/
 F:	board/stmicroelectronics/stm32mp157c-dk2/
+F:	boot/beaglev-ddrinit/
 F:	boot/boot-wrapper-aarch64/
 F:	boot/grub2/
 F:	boot/gummiboot/
boot/Config.in +1 -0
index b3adbfc8bc..f581205c6c 100644
@@ -6,6 +6,7 @@ source "boot/at91bootstrap3/Config.in"
 source "boot/at91dataflashboot/Config.in"
 source "boot/arm-trusted-firmware/Config.in"
 source "boot/barebox/Config.in"
+source "boot/beaglev-ddrinit/Config.in"
 source "boot/binaries-marvell/Config.in"
 source "boot/boot-wrapper-aarch64/Config.in"
 source "boot/grub2/Config.in"
boot/beaglev-ddrinit/Config.in new file +9 -0
new file mode 100644
index 0000000000..5392f49088
@@ -0,0 +1,9 @@
+config BR2_TARGET_BEAGLEV_DDRINIT
+	bool "beaglev-ddrinit"
+	depends on BR2_riscv
+	depends on BR2_HOSTARCH = "x86_64" # host-riscv64-elf-toolchain
+	help
+	  This package builds the DDRinit firmware used on the BeagleV
+	  platform.
+
+	  https://github.com/starfive-tech/beagle_ddrlnit
boot/beaglev-ddrinit/beaglev-ddrinit.mk new file +29 -0
new file mode 100644
index 0000000000..72e6aea965
@@ -0,0 +1,29 @@
+################################################################################
+#
+# beaglev-ddrinit
+#
+################################################################################
+
+# HEAD of the starfive branch
+BEAGLEV_DDRINIT_VERSION = 15b80de81263996affb2a29332aa681925709983
+BEAGLEV_DDRINIT_SITE = $(call github,starfive-tech,beagle_ddrlnit,$(BEAGLEV_DDRINIT_VERSION))
+BEAGLEV_DDRINIT_INSTALL_TARGET = NO
+BEAGLEV_DDRINIT_INSTALL_IMAGES = YES
+BEAGLEV_DDRINIT_DEPENDENCIES = host-riscv64-elf-toolchain
+# unfortunately, no real license file, but several sources files are
+# under GPL-2.0+, making the whole work GPL-2.0+
+BEAGLEV_DDRINIT_LICENSE = GPL-2.0+
+
+define BEAGLEV_DDRINIT_BUILD_CMDS
+	$(MAKE) -C $(@D)/build \
+		CROSSCOMPILE=$(HOST_DIR)/bin/riscv64-unknown-elf- \
+		SUFFIX=buildroot \
+		GIT_VERSION=$(BEAGLEV_DDRINIT_VERSION)
+endef
+
+define BEAGLEV_DDRINIT_INSTALL_IMAGES_CMDS
+	$(INSTALL) -D -m 0644 $(@D)/build/ddrinit-2133-buildroot.bin.out \
+		$(BINARIES_DIR)/ddrinit-2133-buildroot.bin.out
+endef
+
+$(eval $(generic-package))
Signature · 6 lines
2.30.2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#14 lore raw

PATCH v3 5/7 boot/beaglev-ddrinit: new package

In reply to Yann E. MORIN
Quoted 4 lines · On Fri, May 7, 2021, 15:04 Yann E. MORIN <[email protected]> wrote:

On 2021-05-04 22:51 +0200, Thomas Petazzoni spake thusly:

Quoted 2 lines

This commit adds a package for the DDR initialization code used on the BeagleV platform.

Quoted 8 lines

The upstream package name is beaglev-ddrlnit, yes, with an 'l' instead of an 'i'. I've renamed the package to match upstream name, so that users that look for it can actually find it.

Applied to master, thanks.

Regards,
Yann E. MORIN.

Would it be helpful if I get StarFive to fix the typo and rename it to ddrinit?

I am thinking that would probably be good to have happen before other
projects start pointing to it. Thomas was so fast with the buildroot patches I think it is the first to notice this.

Thank you,
Drew

Quoted 1 line

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20210507/84b66ae4/attachment.html>

#15 lore raw

PATCH v3 5/7 boot/beaglev-ddrinit: new package

Drew, All,

On 2021-05-07 16:30 -0700, Drew Fustini spake thusly:

Quoted 5 lines · On Fri, May 7, 2021, 15:04 Yann E. MORIN < [1][email protected]> wrote:

On 2021-05-04 22:51 +0200, Thomas Petazzoni spake thusly:

Quoted 2 lines

This commit adds a package for the DDR initialization code used on the BeagleV platform.

Quoted 7 lines

The upstream package name is beaglev-ddrlnit, yes, with an 'l' instead of an 'i'. I've renamed the package to match upstream name, so that users that look for it can actually find it.
Would it be helpful if I get StarFive to fix the typo and rename it to ddrinit? I am thinking that would probably be good to have happen before other projects start pointing to it. Thomas was so fast with the buildroot patches I think it is the first to notice this.

It is not so important that the upstream name gets fixed; in fact quite the opposite: we are now already referencing it. Granted, it's brand new, and we can fix it quick before the release. But note that our 2021.05-rc1 is due this WE, for example; we can still fix this kind of thing post rc1, of course, but we can't fix a release...

But as you mention, once other projects start referencing it, it will be too late. For example, Khem Raj already has started such support:

https://github.com/riscv/meta-riscv/blob/master/beaglev.yml
https://github.com/YoeDistro/yoe-distro/blob/master/beaglev-starlight-jh7100-envsetup.sh

So even if it is still very early, I think it is already too late to rename the repository...

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#16 lore raw

PATCH v3 5/7 boot/beaglev-ddrinit: new package

Quoted 23 lines · Yann E. MORIN

Drew, All,

On 2021-05-07 16:30 -0700, Drew Fustini spake thusly:

Quoted 5 lines · On Fri, May 7, 2021, 15:04 Yann E. MORIN < [1][email protected]> wrote:

On 2021-05-04 22:51 +0200, Thomas Petazzoni spake thusly:

Quoted 2 lines

This commit adds a package for the DDR initialization code used on the BeagleV platform.

Quoted 7 lines

The upstream package name is beaglev-ddrlnit, yes, with an 'l' instead of an 'i'. I've renamed the package to match upstream name, so that users that look for it can actually find it.
Would it be helpful if I get StarFive to fix the typo and rename it to ddrinit? I am thinking that would probably be good to have happen before other projects start pointing to it. Thomas was so fast with the buildroot patches I think it is the first to notice this.

It is not so important that the upstream name gets fixed; in fact quite the opposite: we are now already referencing it. Granted, it's brand new, and we can fix it quick before the release. But note that our 2021.05-rc1 is due this WE, for example; we can still fix this kind of thing post rc1, of course, but we can't fix a release...

Quoted 8 lines

But as you mention, once other projects start referencing it, it will be too late. For example, Khem Raj already has started such support:

https://github.com/riscv/meta-riscv/blob/master/beaglev.yml
https://github.com/YoeDistro/yoe-distro/blob/master/beaglev-starlight-jh7100-envsetup.sh

So even if it is still very early, I think it is already too late to rename the repository...

Ok, thank you for the insights. I agree more important to have the
release go forward and not risk breaking references. My goal is that
ddrinit will eventually be replaced with u-boot SPL anyways. Bin Meng is actively looking into this right now.

Thank you,
Drew

#17 lore raw

PATCH v3 5/7 boot/beaglev-ddrinit: new package

Quoted 25 lines · Drew Fustini
Quoted 23 lines · Yann E. MORIN

Drew, All,

On 2021-05-07 16:30 -0700, Drew Fustini spake thusly:

Quoted 5 lines · On Fri, May 7, 2021, 15:04 Yann E. MORIN < [1][email protected]> wrote:

On 2021-05-04 22:51 +0200, Thomas Petazzoni spake thusly:

Quoted 2 lines

This commit adds a package for the DDR initialization code used on the BeagleV platform.

Quoted 7 lines

The upstream package name is beaglev-ddrlnit, yes, with an 'l' instead of an 'i'. I've renamed the package to match upstream name, so that users that look for it can actually find it.
Would it be helpful if I get StarFive to fix the typo and rename it to ddrinit? I am thinking that would probably be good to have happen before other projects start pointing to it. Thomas was so fast with the buildroot patches I think it is the first to notice this.

It is not so important that the upstream name gets fixed; in fact quite the opposite: we are now already referencing it. Granted, it's brand new, and we can fix it quick before the release. But note that our 2021.05-rc1 is due this WE, for example; we can still fix this kind of thing post rc1, of course, but we can't fix a release...

Quoted 8 lines
Quoted 8 lines

But as you mention, once other projects start referencing it, it will be too late. For example, Khem Raj already has started such support:

https://github.com/riscv/meta-riscv/blob/master/beaglev.yml
https://github.com/YoeDistro/yoe-distro/blob/master/beaglev-starlight-jh7100-envsetup.sh

So even if it is still very early, I think it is already too late to rename the repository...

Is there general consensus on what it should be called ?
I am happy to remove references to SOC name, if we have clear naming convention and strategy to also name future iterations of beagleV based on RISCV

Quoted 8 lines

Ok, thank you for the insights. I agree more important to have the
release go forward and not risk breaking references. My goal is that
ddrinit will eventually be replaced with u-boot SPL anyways. Bin Meng is actively looking into this right now.

Thank you,
Drew

#18 lore raw

PATCH v3 5/7 boot/beaglev-ddrinit: new package

Khem, All,

On 2021-05-08 09:01 -0700, Khem Raj spake thusly:

Quoted 11 lines · Drew Fustini
Quoted 7 lines · Yann E. MORIN
Quoted 6 lines

On 2021-05-07 16:30 -0700, Drew Fustini spake thusly:

Quoted 4 lines · On Fri, May 7, 2021, 15:04 Yann E. MORIN < [1][email protected]> wrote:

The upstream package name is beaglev-ddrlnit, yes, with an 'l' instead of an 'i'. [...]
Would it be helpful if I get StarFive to fix the typo and rename it to ddrinit?

It is not so important that the upstream name gets fixed; [...]

Is there general consensus on what it should be called ?
I am happy to remove references to SOC name, if we have clear naming convention and strategy to also name future iterations of beagleV based on RISCV

Khem: note that we were speaking about a typo in one of the upstream
repositories: beaglev-ddrlnit (dee-dee-are-ell-hen-eye-tee) instead of ddrinit (dee-dee-are-eye-hen-eye-tee).

But Drew said this should be a short-term repository, which will eventually get phased out in favour of uboot spl.

I am not sure what kind of level support OE so far has for BeagleV, and whether it uses that repository or not, but I used your layers just as a hint that it is too late (IMHO) to rename repositories upstream...

And as far as I understand, BeagleV is named BeagleV, and the SoC is JH7100. So your layers/scripts seemed to be aptly named. ;-)

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#19 lore raw

PATCH v3 5/7 boot/beaglev-ddrinit: new package

Quoted 5 lines · Yann E. MORIN

Khem, All,

On 2021-05-08 09:01 -0700, Khem Raj spake thusly:

Quoted 1 line

On Sat, May 8, 2021 at 12:48 AM Drew Fustini <[email protected]>

Quoted 1 line · wrote:
Quoted 1 line
Quoted 1 line

On Sat, May 8, 2021 at 12:37 AM Yann E. MORIN <[email protected]>

Quoted 2 lines · wrote:
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

On 2021-05-07 16:30 -0700, Drew Fustini spake thusly:

Quoted 1 line

On Fri, May 7, 2021, 15:04 Yann E. MORIN < [1]

Quoted 1 line · [email protected]> wrote:
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

The upstream package name is beaglev-ddrlnit, yes, with an 'l'

instead

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

of an 'i'. [...]
Would it be helpful if I get StarFive to fix the typo and rename

it to ddrinit?

Quoted 4 lines
Quoted 4 lines
Quoted 1 line
Quoted 1 line

It is not so important that the upstream name gets fixed; [...]

Is there general consensus on what it should be called ?
I am happy to remove references to SOC name, if we have clear naming convention and strategy to also name future iterations of beagleV based

on RISCV

Quoted 7 lines

Khem: note that we were speaking about a typo in one of the upstream
repositories: beaglev-ddrlnit (dee-dee-are-ell-hen-eye-tee) instead of ddrinit (dee-dee-are-eye-hen-eye-tee).

But Drew said this should be a short-term repository, which will eventually get phased out in favour of uboot spl.

Bin Meng is trying to get u-boot SPL working on the StarFive JH7100 SoC and that could replace ddrinit. Although I am not sure exactly when that goal will be accomplished.

StarFive will fix the 'l' typo in the ddrinit repo if I ask them to, but they probably would not get that done until Monday or Tuesday. It seemed like from your previous email it would be best to avoid that churn of renaming the repository as the patch already went into buildroot.

I am happy to do whatever is best for buildroot and also Khem's meta-riscv OE layer.

Thank you,
Drew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20210508/f4ea970a/attachment.html>

#20 lore raw

PATCH v3 5/7 boot/beaglev-ddrinit: new package

In reply to Khem Raj
Quoted 33 lines · Khem Raj
Quoted 31 lines · Drew Fustini
Quoted 29 lines · Yann E. MORIN

Drew, All,

On 2021-05-07 16:30 -0700, Drew Fustini spake thusly:

Quoted 5 lines · On Fri, May 7, 2021, 15:04 Yann E. MORIN < [1][email protected]> wrote:

On 2021-05-04 22:51 +0200, Thomas Petazzoni spake thusly:

Quoted 2 lines

This commit adds a package for the DDR initialization code used on the BeagleV platform.

Quoted 7 lines

The upstream package name is beaglev-ddrlnit, yes, with an 'l' instead of an 'i'. I've renamed the package to match upstream name, so that users that look for it can actually find it.
Would it be helpful if I get StarFive to fix the typo and rename it to ddrinit? I am thinking that would probably be good to have happen before other projects start pointing to it. Thomas was so fast with the buildroot patches I think it is the first to notice this.

It is not so important that the upstream name gets fixed; in fact quite the opposite: we are now already referencing it. Granted, it's brand new, and we can fix it quick before the release. But note that our 2021.05-rc1 is due this WE, for example; we can still fix this kind of thing post rc1, of course, but we can't fix a release...

But as you mention, once other projects start referencing it, it will be too late. For example, Khem Raj already has started such support:

https://github.com/riscv/meta-riscv/blob/master/beaglev.yml
https://github.com/YoeDistro/yoe-distro/blob/master/beaglev-starlight-jh7100-envsetup.sh

Quoted 6 lines
Quoted 2 lines
Quoted 2 lines

So even if it is still very early, I think it is already too late to rename the repository...

Is there general consensus on what it should be called ?
I am happy to remove references to SOC name, if we have clear naming convention and strategy to also name future iterations of beagleV based on RISCV

The board that Thomas and you received is the beta prototype version of BeagleV Starlight board with the StarFive JH7100 SoC, which is a low quantity test SoC. BeagleV is BeagleBoard.org Foundation's name for RISC-V boards. BeagleV Starlight is a BeagleBoard.org board with a StarFive RISC-V SoC.

The production BeagleV Starlight will have the StarFive JH7110, the mass production SoC. Due to the different SoC models, BeagleV Starlight JH7100 would refer to the beta prototype, and BeagleV Starlight JH7110 would be the product that will be launched later this year.

That README is the best public URL to reference in documentation and patches and it includes guidance on naming conventions:
https://github.com/beagleboard/beaglev-starlight#guidance-on-naming-conventions

Thanks.
Drew

#21 lore raw

PATCH v3 5/7 boot/beaglev-ddrinit: new package

Hi Drew

Quoted 54 lines · Drew Fustini
Quoted 33 lines · Khem Raj
Quoted 31 lines · Drew Fustini
Quoted 29 lines · Yann E. MORIN

Drew, All,

On 2021-05-07 16:30 -0700, Drew Fustini spake thusly:

Quoted 5 lines · On Fri, May 7, 2021, 15:04 Yann E. MORIN < [1][email protected]> wrote:

On 2021-05-04 22:51 +0200, Thomas Petazzoni spake thusly:

Quoted 2 lines

This commit adds a package for the DDR initialization code used on the BeagleV platform.

Quoted 7 lines

The upstream package name is beaglev-ddrlnit, yes, with an 'l' instead of an 'i'. I've renamed the package to match upstream name, so that users that look for it can actually find it.
Would it be helpful if I get StarFive to fix the typo and rename it to ddrinit? I am thinking that would probably be good to have happen before other projects start pointing to it. Thomas was so fast with the buildroot patches I think it is the first to notice this.

It is not so important that the upstream name gets fixed; in fact quite the opposite: we are now already referencing it. Granted, it's brand new, and we can fix it quick before the release. But note that our 2021.05-rc1 is due this WE, for example; we can still fix this kind of thing post rc1, of course, but we can't fix a release...

But as you mention, once other projects start referencing it, it will be too late. For example, Khem Raj already has started such support:

https://github.com/riscv/meta-riscv/blob/master/beaglev.yml
https://github.com/YoeDistro/yoe-distro/blob/master/beaglev-starlight-jh7100-envsetup.sh

Quoted 6 lines
Quoted 2 lines
Quoted 2 lines

So even if it is still very early, I think it is already too late to rename the repository...

Is there general consensus on what it should be called ?
I am happy to remove references to SOC name, if we have clear naming convention and strategy to also name future iterations of beagleV based on RISCV

The board that Thomas and you received is the beta prototype version of BeagleV Starlight board with the StarFive JH7100 SoC, which is a low quantity test SoC. BeagleV is BeagleBoard.org Foundation's name for RISC-V boards. BeagleV Starlight is a BeagleBoard.org board with a StarFive RISC-V SoC.

The production BeagleV Starlight will have the StarFive JH7110, the mass production SoC. Due to the different SoC models, BeagleV Starlight JH7100 would refer to the beta prototype, and BeagleV Starlight JH7110 would be the product that will be launched later this year.

Quoted 3 lines

That README is the best public URL to reference in documentation and patches and it includes guidance on naming conventions:
https://github.com/beagleboard/beaglev-starlight#guidance-on-naming-conventions

So perhaps we could call this machine as beaglev-beta ? and the final one beaglev in Yocto machine names ?
I am not sure adding SOC info adds some meaningful information, unless you plan to have other SOCs also in
beagleV boards variants

Quoted 3 lines

Thanks.
Drew

#22 lore raw

PATCH v3 5/7 boot/beaglev-ddrinit: new package

Quoted 62 lines · On Sat, May 8, 2021, 15:10 Khem Raj <[email protected]> wrote:

Hi Drew

Quoted 54 lines · Drew Fustini
Quoted 33 lines · Khem Raj
Quoted 31 lines · Drew Fustini
Quoted 29 lines · Yann E. MORIN

Drew, All,

On 2021-05-07 16:30 -0700, Drew Fustini spake thusly:

Quoted 5 lines · On Fri, May 7, 2021, 15:04 Yann E. MORIN < [1][email protected]> wrote:

On 2021-05-04 22:51 +0200, Thomas Petazzoni spake thusly:

Quoted 2 lines

This commit adds a package for the DDR initialization code used on the BeagleV platform.

Quoted 7 lines

The upstream package name is beaglev-ddrlnit, yes, with an 'l' instead of an 'i'. I've renamed the package to match upstream name, so that users that look for it can actually find it.
Would it be helpful if I get StarFive to fix the typo and rename it to ddrinit? I am thinking that would probably be good to have happen before other projects start pointing to it. Thomas was so fast with the buildroot patches I think it is the first to notice this.

It is not so important that the upstream name gets fixed; in fact quite the opposite: we are now already referencing it. Granted, it's brand new, and we can fix it quick before the release. But note that our 2021.05-rc1 is due this WE, for example; we can still fix this kind of thing post rc1, of course, but we can't fix a release...

But as you mention, once other projects start referencing it, it will be too late. For example, Khem Raj already has started such support:

https://github.com/riscv/meta-riscv/blob/master/beaglev.yml
https://github.com/YoeDistro/yoe-distro/blob/master/beaglev-starlight-jh7100-envsetup.sh

Quoted 6 lines
Quoted 2 lines
Quoted 2 lines

So even if it is still very early, I think it is already too late to rename the repository...

Is there general consensus on what it should be called ?
I am happy to remove references to SOC name, if we have clear naming convention and strategy to also name future iterations of beagleV based on RISCV

The board that Thomas and you received is the beta prototype version of BeagleV Starlight board with the StarFive JH7100 SoC, which is a low quantity test SoC. BeagleV is BeagleBoard.org Foundation's name for RISC-V boards. BeagleV Starlight is a BeagleBoard.org board with a StarFive RISC-V SoC.

The production BeagleV Starlight will have the StarFive JH7110, the mass production SoC. Due to the different SoC models, BeagleV Starlight JH7100 would refer to the beta prototype, and BeagleV Starlight JH7110 would be the product that will be launched later this year.

Quoted 3 lines

That README is the best public URL to reference in documentation and patches and it includes guidance on naming conventions:
https://github.com/beagleboard/beaglev-starlight#guidance-on-naming-conventions

Quoted 5 lines

So perhaps we could call this machine as beaglev-beta ? and the final one beaglev in Yocto machine names ?
I am not sure adding SOC info adds some meaningful information, unless you plan to have other SOCs also in
beagleV boards variants

BeagleV is a name that will exist for long into the future for any BeagleBoard.org board with a RISC-V processor. Therefore I think beaglev-starlight-beta would be a good machine name which would represent the beta version of BeagleV Starlight with StarFive JH7100 SoC. Machine beagle-starlight could then represent the production BeagleV Starlight with StarFive JH7110 SoC.

Thank you,
Drew

#23 lore raw

PATCH v3 5/7 boot/beaglev-ddrinit: new package

Quoted 70 lines · Drew Fustini
Quoted 62 lines · On Sat, May 8, 2021, 15:10 Khem Raj <[email protected]> wrote:

Hi Drew

Quoted 54 lines · Drew Fustini
Quoted 33 lines · Khem Raj
Quoted 31 lines · Drew Fustini
Quoted 29 lines · Yann E. MORIN

Drew, All,

On 2021-05-07 16:30 -0700, Drew Fustini spake thusly:

Quoted 5 lines · On Fri, May 7, 2021, 15:04 Yann E. MORIN < [1][email protected]> wrote:

On 2021-05-04 22:51 +0200, Thomas Petazzoni spake thusly:

Quoted 2 lines

This commit adds a package for the DDR initialization code used on the BeagleV platform.

Quoted 7 lines

The upstream package name is beaglev-ddrlnit, yes, with an 'l' instead of an 'i'. I've renamed the package to match upstream name, so that users that look for it can actually find it.
Would it be helpful if I get StarFive to fix the typo and rename it to ddrinit? I am thinking that would probably be good to have happen before other projects start pointing to it. Thomas was so fast with the buildroot patches I think it is the first to notice this.

It is not so important that the upstream name gets fixed; in fact quite the opposite: we are now already referencing it. Granted, it's brand new, and we can fix it quick before the release. But note that our 2021.05-rc1 is due this WE, for example; we can still fix this kind of thing post rc1, of course, but we can't fix a release...

But as you mention, once other projects start referencing it, it will be too late. For example, Khem Raj already has started such support:

https://github.com/riscv/meta-riscv/blob/master/beaglev.yml
https://github.com/YoeDistro/yoe-distro/blob/master/beaglev-starlight-jh7100-envsetup.sh

Quoted 6 lines
Quoted 2 lines
Quoted 2 lines

So even if it is still very early, I think it is already too late to rename the repository...

Is there general consensus on what it should be called ?
I am happy to remove references to SOC name, if we have clear naming convention and strategy to also name future iterations of beagleV based on RISCV

The board that Thomas and you received is the beta prototype version of BeagleV Starlight board with the StarFive JH7100 SoC, which is a low quantity test SoC. BeagleV is BeagleBoard.org Foundation's name for RISC-V boards. BeagleV Starlight is a BeagleBoard.org board with a StarFive RISC-V SoC.

The production BeagleV Starlight will have the StarFive JH7110, the mass production SoC. Due to the different SoC models, BeagleV Starlight JH7100 would refer to the beta prototype, and BeagleV Starlight JH7110 would be the product that will be launched later this year.

Quoted 3 lines

That README is the best public URL to reference in documentation and patches and it includes guidance on naming conventions:
https://github.com/beagleboard/beaglev-starlight#guidance-on-naming-conventions

Quoted 5 lines

So perhaps we could call this machine as beaglev-beta ? and the final one beaglev in Yocto machine names ?
I am not sure adding SOC info adds some meaningful information, unless you plan to have other SOCs also in
beagleV boards variants

Quoted 6 lines

BeagleV is a name that will exist for long into the future for any BeagleBoard.org board with a RISC-V processor. Therefore I think beaglev-starlight-beta would be a good machine name which would represent the beta version of BeagleV Starlight with StarFive JH7100 SoC. Machine beagle-starlight could then represent the production BeagleV Starlight with StarFive JH7110 SoC.

OK, but I was also thinking that tomorrow there might be a different starlight soc
in beagleV next version in future so perhal beaglev-<SOC-Vendor>-<SOC-name> might be future proof

Quoted 3 lines

Thank you,
Drew

#24 lore raw

PATCH v3 5/7 boot/beaglev-ddrinit: new package

Quoted 79 lines · Khem Raj
Quoted 70 lines · Drew Fustini
Quoted 62 lines · On Sat, May 8, 2021, 15:10 Khem Raj <[email protected]> wrote:

Hi Drew

Quoted 54 lines · Drew Fustini
Quoted 33 lines · Khem Raj
Quoted 31 lines · Drew Fustini
Quoted 29 lines · Yann E. MORIN

Drew, All,

On 2021-05-07 16:30 -0700, Drew Fustini spake thusly:

Quoted 5 lines · On Fri, May 7, 2021, 15:04 Yann E. MORIN < [1][email protected]> wrote:

On 2021-05-04 22:51 +0200, Thomas Petazzoni spake thusly:

Quoted 2 lines

This commit adds a package for the DDR initialization code used on the BeagleV platform.

Quoted 7 lines

The upstream package name is beaglev-ddrlnit, yes, with an 'l' instead of an 'i'. I've renamed the package to match upstream name, so that users that look for it can actually find it.
Would it be helpful if I get StarFive to fix the typo and rename it to ddrinit? I am thinking that would probably be good to have happen before other projects start pointing to it. Thomas was so fast with the buildroot patches I think it is the first to notice this.

It is not so important that the upstream name gets fixed; in fact quite the opposite: we are now already referencing it. Granted, it's brand new, and we can fix it quick before the release. But note that our 2021.05-rc1 is due this WE, for example; we can still fix this kind of thing post rc1, of course, but we can't fix a release...

But as you mention, once other projects start referencing it, it will be too late. For example, Khem Raj already has started such support:

https://github.com/riscv/meta-riscv/blob/master/beaglev.yml
https://github.com/YoeDistro/yoe-distro/blob/master/beaglev-starlight-jh7100-envsetup.sh

Quoted 6 lines
Quoted 2 lines
Quoted 2 lines

So even if it is still very early, I think it is already too late to rename the repository...

Is there general consensus on what it should be called ?
I am happy to remove references to SOC name, if we have clear naming convention and strategy to also name future iterations of beagleV based on RISCV

The board that Thomas and you received is the beta prototype version of BeagleV Starlight board with the StarFive JH7100 SoC, which is a low quantity test SoC. BeagleV is BeagleBoard.org Foundation's name for RISC-V boards. BeagleV Starlight is a BeagleBoard.org board with a StarFive RISC-V SoC.

The production BeagleV Starlight will have the StarFive JH7110, the mass production SoC. Due to the different SoC models, BeagleV Starlight JH7100 would refer to the beta prototype, and BeagleV Starlight JH7110 would be the product that will be launched later this year.

Quoted 3 lines

That README is the best public URL to reference in documentation and patches and it includes guidance on naming conventions:
https://github.com/beagleboard/beaglev-starlight#guidance-on-naming-conventions

Quoted 5 lines

So perhaps we could call this machine as beaglev-beta ? and the final one beaglev in Yocto machine names ?
I am not sure adding SOC info adds some meaningful information, unless you plan to have other SOCs also in
beagleV boards variants

Quoted 6 lines

BeagleV is a name that will exist for long into the future for any BeagleBoard.org board with a RISC-V processor. Therefore I think beaglev-starlight-beta would be a good machine name which would represent the beta version of BeagleV Starlight with StarFive JH7100 SoC. Machine beagle-starlight could then represent the production BeagleV Starlight with StarFive JH7110 SoC.

Quoted 4 lines

OK, but I was also thinking that tomorrow there might be a different starlight soc
in beagleV next version in future so perhal beaglev-<SOC-Vendor>-<SOC-name> might be future proof

yes, this is a good idea. thus we would have:

beaglev-starfive-jh7100: beta BeagleV Starlight board with StarFive JH7100 SoC
beaglev-starfive-jh7110: production BeagleV Starlight board with StarFive JH7110 SoC

I do like using the SoC model instead of words like beta and production. The name 'Starlight' in the context of the BeagleV Starlight board is the result of StarFive believing it would have a positive meaning in Chinese. Starlight does not really mean anything in a technical sense so I think that "starfive" is more useful to have in the machine name such as 'beaglev-starfive-jh7100'.

thanks,
drew

#25 lore raw

PATCH v3 5/7 boot/beaglev-ddrinit: new package

In reply to Yann E. MORIN

Hello,

Quoted 7 lines · On Sat, 8 May 2021 00:04:01 +0200 "Yann E. MORIN" <[email protected]>…

On 2021-05-04 22:51 +0200, Thomas Petazzoni spake thusly:

Quoted 2 lines

This commit adds a package for the DDR initialization code used on the BeagleV platform.

The upstream package name is beaglev-ddrlnit, yes, with an 'l' instead of an 'i'. I've renamed the package to match upstream name, so that users that look for it can actually find it.

Ah, in fact I had only seen the package name on github with a font where the l and I are pretty much the same, so I thought it was named ddrInit (with a capital 'I') and I normalized that to 'ddrinit' was we like lower-case name in Buildroot packages.

But indeed, I see that the repository is named ddrlnit. I'm wondering if this isn't just a mistake, because then everywhere it is referred to as ddrinit. ddrlnit doesn't make much sense to me.

But fair enough, for now it's named beaglev-ddrlnit so our Buildroot package should follow that naming.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#26 lore raw

PATCH v3 5/7 boot/beaglev-ddrinit: new package

In reply to Yann E. MORIN
Quoted 7 lines · Yann E. MORIN

On 2021-05-04 22:51 +0200, Thomas Petazzoni spake thusly:

Quoted 2 lines

This commit adds a package for the DDR initialization code used on the BeagleV platform.

The upstream package name is beaglev-ddrlnit, yes, with an 'l' instead of an 'i'. I've renamed the package to match upstream name, so that users that look for it can actually find it.

What's done is done of course, but in this case, I think we should have stuck
to ddrinit with an eye. That name makes much more sense, and in fact when people search for it (with / in menuconfig) they're IMHO much more likely to search for it with an eye than with an el. The el you'd probably only use when you copy and paste the name from github, but who does that?

@Drew/Bing, on github, when you rename a repository, the old name will still
redirect to the new one (at least until you create a new repo with that name). So I'd go ahead and to the rename to ddrinit, it should break anything.

Regards,
Arnout

Quoted 99 lines

Applied to master, thanks.

Regards,
Yann E. MORIN.

Quoted 92 lines
---
 DEVELOPERS                              |  1 +
 boot/Config.in                          |  1 +
 boot/beaglev-ddrinit/Config.in          |  9 ++++++++
 boot/beaglev-ddrinit/beaglev-ddrinit.mk | 29 +++++++++++++++++++++++++
 4 files changed, 40 insertions(+)
 create mode 100644 boot/beaglev-ddrinit/Config.in
 create mode 100644 boot/beaglev-ddrinit/beaglev-ddrinit.mk
DEVELOPERS +1 -0
index 7ce78742fc..39bc71ea34 100644
@@ -2604,6 +2604,7 @@ N:	Thomas Petazzoni <[email protected]>
 F:	arch/Config.in.arm
 F:	board/beaglev/
 F:	board/stmicroelectronics/stm32mp157c-dk2/
+F:	boot/beaglev-ddrinit/
 F:	boot/boot-wrapper-aarch64/
 F:	boot/grub2/
 F:	boot/gummiboot/
boot/Config.in +1 -0
index b3adbfc8bc..f581205c6c 100644
@@ -6,6 +6,7 @@ source "boot/at91bootstrap3/Config.in"
 source "boot/at91dataflashboot/Config.in"
 source "boot/arm-trusted-firmware/Config.in"
 source "boot/barebox/Config.in"
+source "boot/beaglev-ddrinit/Config.in"
 source "boot/binaries-marvell/Config.in"
 source "boot/boot-wrapper-aarch64/Config.in"
 source "boot/grub2/Config.in"
boot/beaglev-ddrinit/Config.in new file +9 -0
new file mode 100644
index 0000000000..5392f49088
@@ -0,0 +1,9 @@
+config BR2_TARGET_BEAGLEV_DDRINIT
+	bool "beaglev-ddrinit"
+	depends on BR2_riscv
+	depends on BR2_HOSTARCH = "x86_64" # host-riscv64-elf-toolchain
+	help
+	  This package builds the DDRinit firmware used on the BeagleV
+	  platform.
+
+	  https://github.com/starfive-tech/beagle_ddrlnit
boot/beaglev-ddrinit/beaglev-ddrinit.mk new file +29 -0
new file mode 100644
index 0000000000..72e6aea965
@@ -0,0 +1,29 @@
+################################################################################
+#
+# beaglev-ddrinit
+#
+################################################################################
+
+# HEAD of the starfive branch
+BEAGLEV_DDRINIT_VERSION = 15b80de81263996affb2a29332aa681925709983
+BEAGLEV_DDRINIT_SITE = $(call github,starfive-tech,beagle_ddrlnit,$(BEAGLEV_DDRINIT_VERSION))
+BEAGLEV_DDRINIT_INSTALL_TARGET = NO
+BEAGLEV_DDRINIT_INSTALL_IMAGES = YES
+BEAGLEV_DDRINIT_DEPENDENCIES = host-riscv64-elf-toolchain
+# unfortunately, no real license file, but several sources files are
+# under GPL-2.0+, making the whole work GPL-2.0+
+BEAGLEV_DDRINIT_LICENSE = GPL-2.0+
+
+define BEAGLEV_DDRINIT_BUILD_CMDS
+	$(MAKE) -C $(@D)/build \
+		CROSSCOMPILE=$(HOST_DIR)/bin/riscv64-unknown-elf- \
+		SUFFIX=buildroot \
+		GIT_VERSION=$(BEAGLEV_DDRINIT_VERSION)
+endef
+
+define BEAGLEV_DDRINIT_INSTALL_IMAGES_CMDS
+	$(INSTALL) -D -m 0644 $(@D)/build/ddrinit-2133-buildroot.bin.out \
+		$(BINARIES_DIR)/ddrinit-2133-buildroot.bin.out
+endef
+
+$(eval $(generic-package))
Signature · 6 lines
2.30.2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
#27 lore raw

PATCH v3 5/7 boot/beaglev-ddrinit: new package

Quoted 18 lines · Arnout Vandecappelle
Quoted 7 lines · Yann E. MORIN

On 2021-05-04 22:51 +0200, Thomas Petazzoni spake thusly:

Quoted 2 lines

This commit adds a package for the DDR initialization code used on the BeagleV platform.

The upstream package name is beaglev-ddrlnit, yes, with an 'l' instead of an 'i'. I've renamed the package to match upstream name, so that users that look for it can actually find it.

What's done is done of course, but in this case, I think we should have stuck
to ddrinit with an eye. That name makes much more sense, and in fact when people search for it (with / in menuconfig) they're IMHO much more likely to search for it with an eye than with an el. The el you'd probably only use when you copy and paste the name from github, but who does that?

Quoted 3 lines

@Drew/Bing, on github, when you rename a repository, the old name will still
redirect to the new one (at least until you create a new repo with that name). So I'd go ahead and to the rename to ddrinit, it should break anything.

I forgot the reference:

https://docs.github.com/en/github/administering-a-repository/renaming-a-repository

Regards,
Arnout

#28 lore raw

PATCH v3 5/7 boot/beaglev-ddrinit: new package

Quoted 22 lines · Arnout Vandecappelle
Quoted 18 lines · Arnout Vandecappelle
Quoted 7 lines · Yann E. MORIN

On 2021-05-04 22:51 +0200, Thomas Petazzoni spake thusly:

Quoted 2 lines

This commit adds a package for the DDR initialization code used on the BeagleV platform.

The upstream package name is beaglev-ddrlnit, yes, with an 'l' instead of an 'i'. I've renamed the package to match upstream name, so that users that look for it can actually find it.

What's done is done of course, but in this case, I think we should have stuck
to ddrinit with an eye. That name makes much more sense, and in fact when people search for it (with / in menuconfig) they're IMHO much more likely to search for it with an eye than with an el. The el you'd probably only use when you copy and paste the name from github, but who does that?

Quoted 7 lines
Quoted 3 lines

@Drew/Bing, on github, when you rename a repository, the old name will still
redirect to the new one (at least until you create a new repo with that name). So I'd go ahead and to the rename to ddrinit, it should break anything.

I forgot the reference:

https://docs.github.com/en/github/administering-a-repository/renaming-a-repository

Thank you. I knew that the redirect worked on the website, but this clarifies that it also works for git clone as well. Therefore, it seems like I should ask starfive to fix the typo as the old repo url with the typo will still work.

-Drew

#29 lore raw

PATCH v3 5/7 boot/beaglev-ddrinit: new package

Quoted 28 lines · Drew Fustini
Quoted 26 lines · Arnout Vandecappelle
Quoted 21 lines · Arnout Vandecappelle
Quoted 7 lines · Yann E. MORIN

On 2021-05-04 22:51 +0200, Thomas Petazzoni spake thusly:

Quoted 2 lines

This commit adds a package for the DDR initialization code used on the BeagleV platform.

The upstream package name is beaglev-ddrlnit, yes, with an 'l' instead of an 'i'. I've renamed the package to match upstream name, so that users that look for it can actually find it.

What's done is done of course, but in this case, I think we should have stuck
to ddrinit with an eye. That name makes much more sense, and in fact when people search for it (with / in menuconfig) they're IMHO much more likely to search for it with an eye than with an el. The el you'd probably only use when you copy and paste the name from github, but who does that?

@Drew/Bing, on github, when you rename a repository, the old name will still
redirect to the new one (at least until you create a new repo with that name). So I'd go ahead and to the rename to ddrinit, it should break anything.

Quoted 8 lines
Quoted 3 lines

I forgot the reference:

https://docs.github.com/en/github/administering-a-repository/renaming-a-repository

Thank you. I knew that the redirect worked on the website, but this clarifies that it also works for git clone as well. Therefore, it seems like I should ask starfive to fix the typo as the old repo url with the typo will still work.

yes renaming in github repos should be painless w.r.t. redirects IIRC

Quoted 2 lines

-Drew

#30 lore raw

PATCH v3 5/7 boot/beaglev-ddrinit: new package

In reply to Drew Fustini
Quoted 28 lines · Drew Fustini
Quoted 26 lines · Arnout Vandecappelle
Quoted 21 lines · Arnout Vandecappelle
Quoted 7 lines · Yann E. MORIN

On 2021-05-04 22:51 +0200, Thomas Petazzoni spake thusly:

Quoted 2 lines

This commit adds a package for the DDR initialization code used on the BeagleV platform.

The upstream package name is beaglev-ddrlnit, yes, with an 'l' instead of an 'i'. I've renamed the package to match upstream name, so that users that look for it can actually find it.

What's done is done of course, but in this case, I think we should have stuck
to ddrinit with an eye. That name makes much more sense, and in fact when people search for it (with / in menuconfig) they're IMHO much more likely to search for it with an eye than with an el. The el you'd probably only use when you copy and paste the name from github, but who does that?

@Drew/Bing, on github, when you rename a repository, the old name will still
redirect to the new one (at least until you create a new repo with that name). So I'd go ahead and to the rename to ddrinit, it should break anything.

Quoted 8 lines
Quoted 3 lines

I forgot the reference:

https://docs.github.com/en/github/administering-a-repository/renaming-a-repository

Thank you. I knew that the redirect worked on the website, but this clarifies that it also works for git clone as well. Therefore, it seems like I should ask starfive to fix the typo as the old repo url with the typo will still work.

The typo has now been fixed by Michael Zhu at StarFive:
https://github.com/starfive-tech/beagle_ddrinit/issues/6

The typo name (with "l") does still work:
https://github.com/starfive-tech/beagle_ddrlnit

but it will redirect to the correct name (with "i"):
https://github.com/starfive-tech/beagle_ddrinit

thank you,
drew

#31 lore raw

PATCH v3 5/7 boot/beaglev-ddrinit: new package

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Drew" == Drew Fustini <[email protected]> writes:

Hi,

Quoted 8 lines

The typo has now been fixed by Michael Zhu at StarFive:
https://github.com/starfive-tech/beagle_ddrinit/issues/6

The typo name (with "l") does still work:
https://github.com/starfive-tech/beagle_ddrlnit

but it will redirect to the correct name (with "i"):
https://github.com/starfive-tech/beagle_ddrinit

Great, thanks. I've sent a patch to rename the corresponding package:

https://patchwork.ozlabs.org/project/buildroot/patch/20210510090658.24276-1-peter at korsgaard.com/

Signature · 1 line
Bye, Peter Korsgaard
#32 lore raw

PATCH v3 6/7 boot/beaglev-secondboot: new package

In reply to Thomas Petazzoni

This packages allows to build the first stage bootloader used on the BeagleV, which is used even before the DDR initialization and OpenSBI/U-Boot. Yes, "secondboot" is strange for what is the first stage bootloader, but that's the upstream name.

---
 DEVELOPERS                                    |  1 +
 boot/Config.in                                |  1 +
 boot/beaglev-secondboot/Config.in             |  9 ++++++
 boot/beaglev-secondboot/beaglev-secondboot.mk | 29 +++++++++++++++++++
 4 files changed, 40 insertions(+)
 create mode 100644 boot/beaglev-secondboot/Config.in
 create mode 100644 boot/beaglev-secondboot/beaglev-secondboot.mk
DEVELOPERS +1 -0
index 39bc71ea34..1d786b6ffa 100644
@@ -2605,6 +2605,7 @@ F:	arch/Config.in.arm
 F:	board/beaglev/
 F:	board/stmicroelectronics/stm32mp157c-dk2/
 F:	boot/beaglev-ddrinit/
+F:	boot/beaglev-secondboot/
 F:	boot/boot-wrapper-aarch64/
 F:	boot/grub2/
 F:	boot/gummiboot/
boot/Config.in +1 -0
index f581205c6c..08d9ac06b2 100644
@@ -7,6 +7,7 @@ source "boot/at91dataflashboot/Config.in"
 source "boot/arm-trusted-firmware/Config.in"
 source "boot/barebox/Config.in"
 source "boot/beaglev-ddrinit/Config.in"
+source "boot/beaglev-secondboot/Config.in"
 source "boot/binaries-marvell/Config.in"
 source "boot/boot-wrapper-aarch64/Config.in"
 source "boot/grub2/Config.in"
boot/beaglev-secondboot/Config.in new file +9 -0
new file mode 100644
index 0000000000..a9695fc138
@@ -0,0 +1,9 @@
+config BR2_TARGET_BEAGLEV_SECONDBOOT
+	bool "beaglev-secondboot"
+	depends on BR2_riscv
+	depends on BR2_HOSTARCH = "x86_64" # host-riscv64-elf-toolchain
+	help
+	  This package builds the SecondBoot firmware used on the
+	  BeagleV platform.
+
+	  https://github.com/starfive-tech/beagle_secondBoot
boot/beaglev-secondboot/beaglev-secondboot.mk new file +29 -0
new file mode 100644
index 0000000000..f3b255fb0c
@@ -0,0 +1,29 @@
+################################################################################
+#
+# beaglev-secondboot
+#
+################################################################################
+
+# HEAD of the starfive branch
+BEAGLEV_SECONDBOOT_VERSION = a4f0b4307f877890f998b3216cffcc9f27a5f993
+BEAGLEV_SECONDBOOT_SITE = $(call github,starfive-tech,beagle_secondBoot,$(BEAGLEV_SECONDBOOT_VERSION))
+BEAGLEV_SECONDBOOT_INSTALL_TARGET = NO
+BEAGLEV_SECONDBOOT_INSTALL_IMAGES = YES
+BEAGLEV_SECONDBOOT_DEPENDENCIES = host-riscv64-elf-toolchain
+# unfortunately, no real license file, but several sources files are
+# under GPL-2.0+, making the whole work GPL-2.0+
+BEAGLEV_SECONDBOOT_LICENSE = GPL-2.0+
+
+define BEAGLEV_SECONDBOOT_BUILD_CMDS
+	$(MAKE) -C $(@D)/build \
+		CROSSCOMPILE=$(HOST_DIR)/bin/riscv64-unknown-elf- \
+		SUFFIX=buildroot \
+		GIT_VERSION=$(BEAGLEV_SECONDBOOT_VERSION)
+endef
+
+define BEAGLEV_SECONDBOOT_INSTALL_IMAGES_CMDS
+	$(INSTALL) -D -m 0644 $(@D)/build/bootloader-BEAGLEV-buildroot.bin.out \
+		$(BINARIES_DIR)/bootloader-BEAGLEV-buildroot.bin.out
+endef
+
+$(eval $(generic-package))
Signature · 1 line
2.30.2
#33 lore raw

PATCH v3 6/7 boot/beaglev-secondboot: new package

On 2021-05-04 22:51 +0200, Thomas Petazzoni spake thusly:

Quoted 4 lines

This packages allows to build the first stage bootloader used on the BeagleV, which is used even before the DDR initialization and OpenSBI/U-Boot. Yes, "secondboot" is strange for what is the first stage bootloader, but that's the upstream name.

I've added a hash file.

I also changed the comment to not mention 'HEAD' since this will no longer be the case when upstream pushes a new commit.

Applied to master, thanks.

Regards,
Yann E. MORIN.

Quoted 92 lines
---
 DEVELOPERS                                    |  1 +
 boot/Config.in                                |  1 +
 boot/beaglev-secondboot/Config.in             |  9 ++++++
 boot/beaglev-secondboot/beaglev-secondboot.mk | 29 +++++++++++++++++++
 4 files changed, 40 insertions(+)
 create mode 100644 boot/beaglev-secondboot/Config.in
 create mode 100644 boot/beaglev-secondboot/beaglev-secondboot.mk
DEVELOPERS +1 -0
index 39bc71ea34..1d786b6ffa 100644
@@ -2605,6 +2605,7 @@ F:	arch/Config.in.arm
 F:	board/beaglev/
 F:	board/stmicroelectronics/stm32mp157c-dk2/
 F:	boot/beaglev-ddrinit/
+F:	boot/beaglev-secondboot/
 F:	boot/boot-wrapper-aarch64/
 F:	boot/grub2/
 F:	boot/gummiboot/
boot/Config.in +1 -0
index f581205c6c..08d9ac06b2 100644
@@ -7,6 +7,7 @@ source "boot/at91dataflashboot/Config.in"
 source "boot/arm-trusted-firmware/Config.in"
 source "boot/barebox/Config.in"
 source "boot/beaglev-ddrinit/Config.in"
+source "boot/beaglev-secondboot/Config.in"
 source "boot/binaries-marvell/Config.in"
 source "boot/boot-wrapper-aarch64/Config.in"
 source "boot/grub2/Config.in"
boot/beaglev-secondboot/Config.in new file +9 -0
new file mode 100644
index 0000000000..a9695fc138
@@ -0,0 +1,9 @@
+config BR2_TARGET_BEAGLEV_SECONDBOOT
+	bool "beaglev-secondboot"
+	depends on BR2_riscv
+	depends on BR2_HOSTARCH = "x86_64" # host-riscv64-elf-toolchain
+	help
+	  This package builds the SecondBoot firmware used on the
+	  BeagleV platform.
+
+	  https://github.com/starfive-tech/beagle_secondBoot
boot/beaglev-secondboot/beaglev-secondboot.mk new file +29 -0
new file mode 100644
index 0000000000..f3b255fb0c
@@ -0,0 +1,29 @@
+################################################################################
+#
+# beaglev-secondboot
+#
+################################################################################
+
+# HEAD of the starfive branch
+BEAGLEV_SECONDBOOT_VERSION = a4f0b4307f877890f998b3216cffcc9f27a5f993
+BEAGLEV_SECONDBOOT_SITE = $(call github,starfive-tech,beagle_secondBoot,$(BEAGLEV_SECONDBOOT_VERSION))
+BEAGLEV_SECONDBOOT_INSTALL_TARGET = NO
+BEAGLEV_SECONDBOOT_INSTALL_IMAGES = YES
+BEAGLEV_SECONDBOOT_DEPENDENCIES = host-riscv64-elf-toolchain
+# unfortunately, no real license file, but several sources files are
+# under GPL-2.0+, making the whole work GPL-2.0+
+BEAGLEV_SECONDBOOT_LICENSE = GPL-2.0+
+
+define BEAGLEV_SECONDBOOT_BUILD_CMDS
+	$(MAKE) -C $(@D)/build \
+		CROSSCOMPILE=$(HOST_DIR)/bin/riscv64-unknown-elf- \
+		SUFFIX=buildroot \
+		GIT_VERSION=$(BEAGLEV_SECONDBOOT_VERSION)
+endef
+
+define BEAGLEV_SECONDBOOT_INSTALL_IMAGES_CMDS
+	$(INSTALL) -D -m 0644 $(@D)/build/bootloader-BEAGLEV-buildroot.bin.out \
+		$(BINARIES_DIR)/bootloader-BEAGLEV-buildroot.bin.out
+endef
+
+$(eval $(generic-package))
Signature · 6 lines
2.30.2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#34 lore raw

PATCH v3 7/7 configs/beaglev: enable building of low-level firmware

In reply to Thomas Petazzoni

This commit extends the beaglev_defconfig and its documentation to build the low-level firmware, and explain how to reflash it.

---
 board/beaglev/readme.txt  | 38 ++++++++++++++++++++++++++++++++++++--
 configs/beaglev_defconfig |  2 ++
 2 files changed, 38 insertions(+), 2 deletions(-)
board/beaglev/readme.txt +36 -2
index d8511d3fd1..a3adaba3ae 100644
@@ -17,6 +17,8 @@ Build results
 
 After building, output/images contains:
 
++ bootloader-BEAGLEV-buildroot.bin.out
++ ddrinit-2133-buildroot.bin.out
 + Image
 + fw_payload.bin
 + fw_payload.bin.out
@@ -26,7 +28,11 @@ After building, output/images contains:
 + sdcard.img
 + u-boot.bin
 
-The two important files are:
+The four important files are:
+
+ - bootloader-BEAGLEV-buildroot.bin.out, the first stage bootloader
+
+ - ddrinit-2133-buildroot.bin.out, the DDR initialization firmware
 
  - fw_payload.bin.out, which is the bootloader image, containing
    both OpenSBI and U-Boot.
@@ -51,7 +57,7 @@ Insert your SD card.
 
 Power-up the board using an USB-C cable.
 
-Flashing the bootloader
+Flashing OpenSBI/U-Boot
 =======================
 
 The bootloader pre-flashed on the Beagle-V has a non-working
@@ -86,3 +92,31 @@ fw_payload.bin.out using the Xmodem protocol.
 
 After reflashing is complete, restart the board, it will automatically
 start the system from the SD card, and reach the login prompt.
+
+Flashing low-level bootloaders
+==============================
+
+The BeagleV comes pre-flashed with functional low-level bootloaders
+(called "secondboot" and "ddrinit"). Re-flashing them is not necessary
+to use this Buildroot defconfig. However, for the sake of
+completeness, Buildroot builds and provides those low-level bootloader
+images.
+
+You can flash them as follows:
+
+ - In the same "pre-loader" menu as the one used above, instead of
+   entering 0 or 1, enter the magic "root at s5t" string. This enters the
+   "expert" features.
+
+ - Then, press 0 and send over X-modem the
+   bootloader-BEAGLEV-buildroot.bin.out file.
+
+ - Then, press 1 and send over X-modem the
+   ddrinit-2133-buildroot.bin.out.
+
+Note that the reflashing mechanism itself relies on those low-level
+bootloaders, so if you flash non-working versions, you'll have to go
+through a recovery process. This requires wiring up to a separate
+debug UART, whose pins are located near the HDMI connector. See
+https://wiki.seeedstudio.com/BeagleV-Update-bootloader-ddr-init-boot-uboot-Recover-bootloader/
+section "Recover the bootloader" for more details.
configs/beaglev_defconfig +2 -0
index e94c4ab639..8943ce9c34 100644
@@ -18,6 +18,8 @@ BR2_LINUX_KERNEL_INSTALL_TARGET=y
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
 # BR2_TARGET_ROOTFS_TAR is not set
+BR2_TARGET_BEAGLEV_DDRINIT=y
+BR2_TARGET_BEAGLEV_SECONDBOOT=y
 BR2_TARGET_OPENSBI=y
 BR2_TARGET_OPENSBI_CUSTOM_TARBALL=y
 # HEAD of the Fedora branch
Signature · 1 line
2.30.2
#35 lore raw

PATCH v3 7/7 configs/beaglev: enable building of low-level firmware

Thomas, All,

On 2021-05-04 22:51 +0200, Thomas Petazzoni spake thusly:

Quoted 2 lines

This commit extends the beaglev_defconfig and its documentation to build the low-level firmware, and explain how to reflash it.

I just had to adapt thedefconfig to use the real beagle_ddrlnit package name, since I renamed it.

Applied to master, thanks.

Regards,
Yann E. MORIN.

Quoted 94 lines
---
 board/beaglev/readme.txt  | 38 ++++++++++++++++++++++++++++++++++++--
 configs/beaglev_defconfig |  2 ++
 2 files changed, 38 insertions(+), 2 deletions(-)
board/beaglev/readme.txt +36 -2
index d8511d3fd1..a3adaba3ae 100644
@@ -17,6 +17,8 @@ Build results
 
 After building, output/images contains:
 
++ bootloader-BEAGLEV-buildroot.bin.out
++ ddrinit-2133-buildroot.bin.out
 + Image
 + fw_payload.bin
 + fw_payload.bin.out
@@ -26,7 +28,11 @@ After building, output/images contains:
 + sdcard.img
 + u-boot.bin
 
-The two important files are:
+The four important files are:
+
+ - bootloader-BEAGLEV-buildroot.bin.out, the first stage bootloader
+
+ - ddrinit-2133-buildroot.bin.out, the DDR initialization firmware
 
  - fw_payload.bin.out, which is the bootloader image, containing
    both OpenSBI and U-Boot.
@@ -51,7 +57,7 @@ Insert your SD card.
 
 Power-up the board using an USB-C cable.
 
-Flashing the bootloader
+Flashing OpenSBI/U-Boot
 =======================
 
 The bootloader pre-flashed on the Beagle-V has a non-working
@@ -86,3 +92,31 @@ fw_payload.bin.out using the Xmodem protocol.
 
 After reflashing is complete, restart the board, it will automatically
 start the system from the SD card, and reach the login prompt.
+
+Flashing low-level bootloaders
+==============================
+
+The BeagleV comes pre-flashed with functional low-level bootloaders
+(called "secondboot" and "ddrinit"). Re-flashing them is not necessary
+to use this Buildroot defconfig. However, for the sake of
+completeness, Buildroot builds and provides those low-level bootloader
+images.
+
+You can flash them as follows:
+
+ - In the same "pre-loader" menu as the one used above, instead of
+   entering 0 or 1, enter the magic "root at s5t" string. This enters the
+   "expert" features.
+
+ - Then, press 0 and send over X-modem the
+   bootloader-BEAGLEV-buildroot.bin.out file.
+
+ - Then, press 1 and send over X-modem the
+   ddrinit-2133-buildroot.bin.out.
+
+Note that the reflashing mechanism itself relies on those low-level
+bootloaders, so if you flash non-working versions, you'll have to go
+through a recovery process. This requires wiring up to a separate
+debug UART, whose pins are located near the HDMI connector. See
+https://wiki.seeedstudio.com/BeagleV-Update-bootloader-ddr-init-boot-uboot-Recover-bootloader/
+section "Recover the bootloader" for more details.
configs/beaglev_defconfig +2 -0
index e94c4ab639..8943ce9c34 100644
@@ -18,6 +18,8 @@ BR2_LINUX_KERNEL_INSTALL_TARGET=y
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
 # BR2_TARGET_ROOTFS_TAR is not set
+BR2_TARGET_BEAGLEV_DDRINIT=y
+BR2_TARGET_BEAGLEV_SECONDBOOT=y
 BR2_TARGET_OPENSBI=y
 BR2_TARGET_OPENSBI_CUSTOM_TARBALL=y
 # HEAD of the Fedora branch
Signature · 6 lines
2.30.2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#36 lore raw

v3 cover Support for the BeagleV platform

In reply to Thomas Petazzoni

Thomas, All,

On 2021-05-04 22:51 +0200, Thomas Petazzoni spake thusly:

Quoted 13 lines

Hello,

Here is a third iteration of the BeagleV patch series, which brings a few fixes:

* The post-build script of v1 calling "make printvars" was working only for in-tree builds. Following a comment from Frank Hunleth on the v1, it was changed in v2 to use "make -C ${O} printvars", which made out-of-tree builds work, but broke in-tree builds. So in this new version, we introduced a preliminary patch that exposes $(CONFIG_DIR) to post-build/post-image scripts, to make such "make printvars" invocations possible.

Quoted 6 lines

* The beaglev_defconfig is updated to take into account the rename of the Git repositories by Starfive for Linux, U-Boot and OpenSBI.

* Reviewed-by tags from Bin Meng are added on beaglev-ddrinit, beaglev-secondboot and the corresponding beaglev_defconfig update. Thanks Bin!

Series applied to master, thanks.

I'll reply to each individual patches where I did some changes.

Regards,
Yann E. MORIN.

Quoted 56 lines

As usual, the whole thing is also available at:

https://github.com/tpetazzoni/buildroot/commits/beaglev

Best regards,

Thomas Petazzoni

Thomas Petazzoni (7):
package/Makefile.in: expose CONFIG_DIR to post-build/post-image
scripts
boot/opensbi: add options to enable/disable image installation configs/beaglev_defconfig: new defconfig package/riscv64-elf-toolchain: new package boot/beaglev-ddrinit: new package boot/beaglev-secondboot: new package
configs/beaglev: enable building of low-level firmware

 DEVELOPERS                                    |   5 +
 board/beaglev/extlinux.conf                   |   4 +
 board/beaglev/genimage.cfg                    |  12 ++
 ...s-starfive-vic7100-adjust-fdt_addr_r.patch |  39 ++++++
 board/beaglev/post-build.sh                   |  17 +++
 board/beaglev/readme.txt                      | 122 ++++++++++++++++++
 boot/Config.in                                |   2 +
 boot/beaglev-ddrinit/Config.in                |   9 ++
 boot/beaglev-ddrinit/beaglev-ddrinit.mk       |  29 +++++
 boot/beaglev-secondboot/Config.in             |   9 ++
 boot/beaglev-secondboot/beaglev-secondboot.mk |  29 +++++
 boot/opensbi/Config.in                        |  20 +++
 boot/opensbi/opensbi.mk                       |  16 ++-
 configs/beaglev_defconfig                     |  37 ++++++
 docs/manual/customize-post-image.txt          |   3 +-
 docs/manual/customize-rootfs.txt              |   3 +
 package/Makefile.in                           |   1 +
 .../riscv64-elf-toolchain.mk                  |  25 ++++
 18 files changed, 375 insertions(+), 7 deletions(-)
 create mode 100644 board/beaglev/extlinux.conf
 create mode 100644 board/beaglev/genimage.cfg
 create mode 100644 board/beaglev/patches/uboot/0001-include-configs-starfive-vic7100-adjust-fdt_addr_r.patch
 create mode 100755 board/beaglev/post-build.sh
 create mode 100644 board/beaglev/readme.txt
 create mode 100644 boot/beaglev-ddrinit/Config.in
 create mode 100644 boot/beaglev-ddrinit/beaglev-ddrinit.mk
 create mode 100644 boot/beaglev-secondboot/Config.in
 create mode 100644 boot/beaglev-secondboot/beaglev-secondboot.mk
 create mode 100644 configs/beaglev_defconfig
 create mode 100644 package/riscv64-elf-toolchain/riscv64-elf-toolchain.mk
Signature · 6 lines
2.30.2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#37 lore raw

v3 cover Support for the BeagleV platform

In reply to Thomas Petazzoni
Quoted 70 lines · Thomas Petazzoni

Hello,

Here is a third iteration of the BeagleV patch series, which brings a few fixes:

* The post-build script of v1 calling "make printvars" was working only for in-tree builds. Following a comment from Frank Hunleth on the v1, it was changed in v2 to use "make -C ${O} printvars", which made out-of-tree builds work, but broke in-tree builds. So in this new version, we introduced a preliminary patch that exposes $(CONFIG_DIR) to post-build/post-image scripts, to make such "make printvars" invocations possible.

* The beaglev_defconfig is updated to take into account the rename of the Git repositories by Starfive for Linux, U-Boot and OpenSBI.

* Reviewed-by tags from Bin Meng are added on beaglev-ddrinit, beaglev-secondboot and the corresponding beaglev_defconfig update. Thanks Bin!

As usual, the whole thing is also available at:

https://github.com/tpetazzoni/buildroot/commits/beaglev

Best regards,

Thomas Petazzoni

Thomas Petazzoni (7):
package/Makefile.in: expose CONFIG_DIR to post-build/post-image
scripts
boot/opensbi: add options to enable/disable image installation configs/beaglev_defconfig: new defconfig package/riscv64-elf-toolchain: new package boot/beaglev-ddrinit: new package boot/beaglev-secondboot: new package
configs/beaglev: enable building of low-level firmware

 DEVELOPERS                                    |   5 +
 board/beaglev/extlinux.conf                   |   4 +
 board/beaglev/genimage.cfg                    |  12 ++
 ...s-starfive-vic7100-adjust-fdt_addr_r.patch |  39 ++++++
 board/beaglev/post-build.sh                   |  17 +++
 board/beaglev/readme.txt                      | 122 ++++++++++++++++++
 boot/Config.in                                |   2 +
 boot/beaglev-ddrinit/Config.in                |   9 ++
 boot/beaglev-ddrinit/beaglev-ddrinit.mk       |  29 +++++
 boot/beaglev-secondboot/Config.in             |   9 ++
 boot/beaglev-secondboot/beaglev-secondboot.mk |  29 +++++
 boot/opensbi/Config.in                        |  20 +++
 boot/opensbi/opensbi.mk                       |  16 ++-
 configs/beaglev_defconfig                     |  37 ++++++
 docs/manual/customize-post-image.txt          |   3 +-
 docs/manual/customize-rootfs.txt              |   3 +
 package/Makefile.in                           |   1 +
 .../riscv64-elf-toolchain.mk                  |  25 ++++
 18 files changed, 375 insertions(+), 7 deletions(-)
 create mode 100644 board/beaglev/extlinux.conf
 create mode 100644 board/beaglev/genimage.cfg
 create mode 100644 board/beaglev/patches/uboot/0001-include-configs-starfive-vic7100-adjust-fdt_addr_r.patch
 create mode 100755 board/beaglev/post-build.sh
 create mode 100644 board/beaglev/readme.txt
 create mode 100644 boot/beaglev-ddrinit/Config.in
 create mode 100644 boot/beaglev-ddrinit/beaglev-ddrinit.mk
 create mode 100644 boot/beaglev-secondboot/Config.in
 create mode 100644 boot/beaglev-secondboot/beaglev-secondboot.mk
 create mode 100644 configs/beaglev_defconfig
 create mode 100644 package/riscv64-elf-toolchain/riscv64-elf-toolchain.mk
Quoted 3 lines

--
2.30.2

Thank you so much again for getting support added to buildroot.

I wanted to note that Kali Prasad (cc'd) has developed a very helpful bootloader recovery tool [1] that is a simple C program and would probably be useful to include in the beaglev buildroot config. This works around the problem that the BootROM in the StarFive JH7100 has a buggy xmodem crc implementation that did not work with any of the existing open source terminal emulators.

-Drew

[1] https://github.com/kprasadvnsi/JH71xx-tools