Skip to contentSkip to conversation

board/orangepi/orangepi-zero:extlinux, refactoring

PATCH Superseded Sergey Kuzminov 2 participants 8 messages Jan 16, 2022 – Jan 17, 2022 4 messages not in the archive

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 board/orangepi/orangepi-zero:extlinux, refactoring

Changes:
- common scenarios for multiple boards to create the SD image: board/orangepi/common;
- extlinux.conf instead of boot.scr;
- exclude FAT partition;
- defconfig refactoring;
- kernel: bump to version 5.12.19, if newer then BR2_PACKAGE_XR819_XRADIO will not compile;
- u-boot: bump to version 2022.01

---
 board/orangepi/common/extlinux.conf       |  5 ++
 board/orangepi/common/genimage.cfg        | 19 +++++++
 board/orangepi/common/post-build.sh       | 34 ++++++++++++
 board/orangepi/common/uboot-extras.config |  3 +
 board/orangepi/orangepi-zero/boot.cmd     |  9 ---
 board/orangepi/orangepi-zero/genimage.cfg | 36 ------------
 configs/orangepi_zero_defconfig           | 67 ++++++++++++++---------
 7 files changed, 102 insertions(+), 71 deletions(-)
 create mode 100644 board/orangepi/common/extlinux.conf
 create mode 100644 board/orangepi/common/genimage.cfg
 create mode 100755 board/orangepi/common/post-build.sh
 create mode 100644 board/orangepi/common/uboot-extras.config
 delete mode 100644 board/orangepi/orangepi-zero/boot.cmd
 delete mode 100644 board/orangepi/orangepi-zero/genimage.cfg
board/orangepi/common/extlinux.conf new file +5 -0
new file mode 100644
index 0000000000..015f29270e
@@ -0,0 +1,5 @@
+LABEL default
+  kernel /boot/%LINUXIMAGE%
+  devicetreedir /boot
+  append root=PARTUUID=%PARTUUID% rootwait console=${console}
+# append root=PARTUUID=%PARTUUID% rootwait console=${console} rootfstype=ext4 quiet panic=10
board/orangepi/common/genimage.cfg new file +19 -0
new file mode 100644
index 0000000000..fd250ef05d
@@ -0,0 +1,19 @@
+image sdcard.img {
+	hdimage {
+		partition-table-type = gpt
+		gpt-no-backup = true
+		gpt-location = 1008K # 1MB - 16KB
+	}
+
+	partition u-boot {
+		in-partition-table = false
+		image = "u-boot-sunxi-with-spl.bin"
+		offset = 8K
+		size = 1000K # 1MB - 8KB - 16KB
+	}
+
+	partition rootfs {
+		image = "rootfs.ext4"
+		partition-uuid = %PARTUUID%
+	}
+}
board/orangepi/common/post-build.sh new file +34 -0
new file mode 100755
index 0000000000..296f94b174
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+linux_image()
+{
+	if grep -Eq "^BR2_LINUX_KERNEL_UIMAGE=y$" ${BR2_CONFIG}; then
+		echo "uImage"
+	elif grep -Eq "^BR2_LINUX_KERNEL_IMAGE=y$" ${BR2_CONFIG}; then
+		echo "Image"
+	elif grep -Eq "^BR2_LINUX_KERNEL_IMAGEGZ=y$" ${BR2_CONFIG}; then
+		echo "Image.gz"
+	else
+		echo "zImage"
+	fi
+}
+
+generic_getty()
+{
+	if grep -Eq "^BR2_TARGET_GENERIC_GETTY=y$" ${BR2_CONFIG}; then
+		echo ""
+	else
+		echo "s/\s*console=\S*//"
+	fi
+}
+
+PARTUUID="$($HOST_DIR/bin/uuidgen)"
+
+install -d "$TARGET_DIR/boot/extlinux/"
+
+sed -e "$(generic_getty)" \
+	-e "s/%LINUXIMAGE%/$(linux_image)/g" \
+	-e "s/%PARTUUID%/$PARTUUID/g" \
+	"board/orangepi/common/extlinux.conf" > "$TARGET_DIR/boot/extlinux/extlinux.conf"
+
+sed "s/%PARTUUID%/$PARTUUID/g" "board/orangepi/common/genimage.cfg" > "$BINARIES_DIR/genimage.cfg"
board/orangepi/common/uboot-extras.config new file +3 -0
new file mode 100644
index 0000000000..5aa97523d9
@@ -0,0 +1,3 @@
+CONFIG_BOOTDELAY=0
+CONFIG_USE_PREBOOT=y
+CONFIG_PREBOOT="setenv preboot;"
board/orangepi/orangepi-zero/boot.cmd deleted +0 -9
deleted file mode 100644
index d094a64fe5..0000000000
@@ -1,9 +0,0 @@
-setenv fdt_high ffffffff
-
-part uuid mmc 0:2 uuid
-setenv bootargs console=ttyS0,115200 root=PARTUUID=${uuid} rootwait
-
-fatload mmc 0 $kernel_addr_r zImage
-fatload mmc 0 $fdt_addr_r sun8i-h2-plus-orangepi-zero.dtb
-
-bootz $kernel_addr_r - $fdt_addr_r
board/orangepi/orangepi-zero/genimage.cfg deleted +0 -36
deleted file mode 100644
index 32f5454ae6..0000000000
@@ -1,36 +0,0 @@
-# Minimal SD card image for the OrangePi Zero
-#
-image boot.vfat {
-	vfat {
-		files = {
-			"zImage",
-			"sun8i-h2-plus-orangepi-zero.dtb",
-			"boot.scr"
-		}
-	}
-	size = 10M
-}
-
-image sdcard.img {
-	hdimage {
-	}
-
-	partition u-boot {
-		in-partition-table = "no"
-		image = "u-boot-sunxi-with-spl.bin"
-		offset = 8K
-		size = 1016K # 1MB - 8KB
-	}
-
-	partition boot {
-		partition-type = 0xC
-		bootable = "true"
-		image = "boot.vfat"
-	}
-
-	partition rootfs {
-		partition-type = 0x83
-		image = "rootfs.ext4"
-		size = 512M
-	}
-}
configs/orangepi_zero_defconfig +41 -26

95 lines not on this page · raw message

Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Hi Sergey, Peter, All,

Quoted 5 lines

Il giorno 16 gen 2022, alle ore 12:26, Sergey Kuzminov <[email protected]> ha scritto:

Changes:
- common scenarios for multiple boards to create the SD image: board/orangepi/common;
- extlinux.conf instead of boot.scr;

I’ve seen other boards switching to extlinux.conf instead of boot.scr, but extlinux.conf doesn’t have any checksum while boot.scr does as I remember. I’ve missed previous discussion about this.

@Peter as I recall you’ve suggested this. Sorry but I don’t remember the reason and I would still keep boot.scr. I’d prefer the system not booting than a system booting with partial bootlegs honestly.

What about that?

And…

Quoted 170 lines

- exclude FAT partition;
- defconfig refactoring;
- kernel: bump to version 5.12.19, if newer then BR2_PACKAGE_XR819_XRADIO will not compile;
- u-boot: bump to version 2022.01

---

board/orangepi/common/extlinux.conf       |  5 ++
board/orangepi/common/genimage.cfg        | 19 +++++++
board/orangepi/common/post-build.sh       | 34 ++++++++++++
board/orangepi/common/uboot-extras.config |  3 +
board/orangepi/orangepi-zero/boot.cmd     |  9 ---
board/orangepi/orangepi-zero/genimage.cfg | 36 ------------
configs/orangepi_zero_defconfig           | 67 ++++++++++++++---------
7 files changed, 102 insertions(+), 71 deletions(-)

create mode 100644 board/orangepi/common/extlinux.conf create mode 100644 board/orangepi/common/genimage.cfg create mode 100755 board/orangepi/common/post-build.sh create mode 100644 board/orangepi/common/uboot-extras.config delete mode 100644 board/orangepi/orangepi-zero/boot.cmd delete mode 100644 board/orangepi/orangepi-zero/genimage.cfg

board/orangepi/common/extlinux.conf new file +5 -0
new file mode 100644
index 0000000000..015f29270e
@@ -0,0 +1,5 @@
+LABEL default
+  kernel /boot/%LINUXIMAGE%
+  devicetreedir /boot
+  append root=PARTUUID=%PARTUUID% rootwait console=${console}
+# append root=PARTUUID=%PARTUUID% rootwait console=${console} rootfstype=ext4 quiet panic=10
board/orangepi/common/genimage.cfg new file +19 -0
new file mode 100644
index 0000000000..fd250ef05d
@@ -0,0 +1,19 @@
+image sdcard.img {
+    hdimage {
+        partition-table-type = gpt
+        gpt-no-backup = true
+        gpt-location = 1008K # 1MB - 16KB
+    }
+
+    partition u-boot {
+        in-partition-table = false
+        image = "u-boot-sunxi-with-spl.bin"
+        offset = 8K
+        size = 1000K # 1MB - 8KB - 16KB
+    }
+
+    partition rootfs {
+        image = "rootfs.ext4"
+        partition-uuid = %PARTUUID%
+    }
+}
board/orangepi/common/post-build.sh new file +34 -0
new file mode 100755
index 0000000000..296f94b174
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+linux_image()
+{
+    if grep -Eq "^BR2_LINUX_KERNEL_UIMAGE=y$" ${BR2_CONFIG}; then
+        echo "uImage"
+    elif grep -Eq "^BR2_LINUX_KERNEL_IMAGE=y$" ${BR2_CONFIG}; then
+        echo "Image"
+    elif grep -Eq "^BR2_LINUX_KERNEL_IMAGEGZ=y$" ${BR2_CONFIG}; then
+        echo "Image.gz"
+    else
+        echo "zImage"
+    fi
+}
+
+generic_getty()
+{
+    if grep -Eq "^BR2_TARGET_GENERIC_GETTY=y$" ${BR2_CONFIG}; then
+        echo ""
+    else
+        echo "s/\s*console=\S*//"
+    fi
+}
+
+PARTUUID="$($HOST_DIR/bin/uuidgen)"
+
+install -d "$TARGET_DIR/boot/extlinux/"
+
+sed -e "$(generic_getty)" \
+    -e "s/%LINUXIMAGE%/$(linux_image)/g" \
+    -e "s/%PARTUUID%/$PARTUUID/g" \
+    "board/orangepi/common/extlinux.conf" > "$TARGET_DIR/boot/extlinux/extlinux.conf"
+
+sed "s/%PARTUUID%/$PARTUUID/g" "board/orangepi/common/genimage.cfg" > "$BINARIES_DIR/genimage.cfg"
board/orangepi/common/uboot-extras.config new file +3 -0
new file mode 100644
index 0000000000..5aa97523d9
@@ -0,0 +1,3 @@
+CONFIG_BOOTDELAY=0
+CONFIG_USE_PREBOOT=y
+CONFIG_PREBOOT="setenv preboot;"
board/orangepi/orangepi-zero/boot.cmd deleted +0 -9
deleted file mode 100644
index d094a64fe5..0000000000
@@ -1,9 +0,0 @@
-setenv fdt_high ffffffff
-
-part uuid mmc 0:2 uuid
-setenv bootargs console=ttyS0,115200 root=PARTUUID=${uuid} rootwait
-
-fatload mmc 0 $kernel_addr_r zImage
-fatload mmc 0 $fdt_addr_r sun8i-h2-plus-orangepi-zero.dtb
-
-bootz $kernel_addr_r - $fdt_addr_r
board/orangepi/orangepi-zero/genimage.cfg deleted +0 -36
deleted file mode 100644
index 32f5454ae6..0000000000
@@ -1,36 +0,0 @@
-# Minimal SD card image for the OrangePi Zero
-#
-image boot.vfat {
-    vfat {
-        files = {
-            "zImage",
-            "sun8i-h2-plus-orangepi-zero.dtb",
-            "boot.scr"
-        }
-    }
-    size = 10M
-}
-
-image sdcard.img {
-    hdimage {
-    }
-
-    partition u-boot {
-        in-partition-table = "no"
-        image = "u-boot-sunxi-with-spl.bin"
-        offset = 8K
-        size = 1016K # 1MB - 8KB
-    }
-
-    partition boot {
-        partition-type = 0xC
-        bootable = "true"
-        image = "boot.vfat"
-    }
-
-    partition rootfs {
-        partition-type = 0x83
-        image = "rootfs.ext4"
-        size = 512M
-    }
-}
configs/orangepi_zero_defconfig +1 -0
index 1c107b10e6..908bcea893 100644
@@ -1,49 +1,64 @@
+# Architecture
Quoted 3 lines

BR2_arm=y
BR2_cortex_a7=y
BR2_ARM_FPU_VFPV4=y

…Here ^^^ you can enable VFP+NEON. It’s working on all Olimex boards with sunxi A7 and can speed things up.

Quoted 76 lines
configs/orangepi_zero_defconfig +4 -0
+
+# System
+BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for the Orange Pi Zero"
+BR2_TARGET_GENERIC_HOSTNAME="OrangePi_Zero"

BR2_GLOBAL_PATCH_DIR="board/orangepi/orangepi-zero/patches" BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y

configs/orangepi_zero_defconfig +0 -3
-BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_12=y
-BR2_TARGET_GENERIC_HOSTNAME="OrangePi_Zero"
-BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for the Orange Pi Zero"

BR2_SYSTEM_DHCP="eth0"

configs/orangepi_zero_defconfig +3 -11
-BR2_LINUX_KERNEL=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.12.2"
-BR2_LINUX_KERNEL_DEFCONFIG="sunxi"
-BR2_LINUX_KERNEL_DTS_SUPPORT=y
-BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun8i-h2-plus-orangepi-zero"
-BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/orangepi/orangepi-zero/linux-extras.config"
-BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
-BR2_TARGET_ROOTFS_EXT2=y
-BR2_TARGET_ROOTFS_EXT2_4=y
-# BR2_TARGET_ROOTFS_TAR is not set
+BR2_GCC_ENABLE_LTO=y
+
+# Bootloader

BR2_TARGET_UBOOT=y
BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
BR2_TARGET_UBOOT_CUSTOM_VERSION=y

configs/orangepi_zero_defconfig +1 -1
-BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2021.04"
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2022.01"

BR2_TARGET_UBOOT_BOARD_DEFCONFIG="orangepi_zero" BR2_TARGET_UBOOT_NEEDS_DTC=y BR2_TARGET_UBOOT_NEEDS_PYTHON3=y BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y BR2_TARGET_UBOOT_SPL=y BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin"

configs/orangepi_zero_defconfig +24 -7
-BR2_PACKAGE_HOST_UBOOT_TOOLS=y
-BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT=y
-BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE="board/orangepi/orangepi-zero/boot.cmd"
-BR2_PACKAGE_HOST_DOSFSTOOLS=y
-BR2_PACKAGE_HOST_GENIMAGE=y
-BR2_PACKAGE_HOST_MTOOLS=y
-BR2_PACKAGE_HOST_UBOOT_TOOLS=y
+BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="board/orangepi/common/uboot-extras.config"
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_DEFCONFIG="sunxi"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun8i-h2-plus-orangepi-zero"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/orangepi/orangepi-zero/linux-extras.config"
+BR2_LINUX_KERNEL_INSTALL_TARGET=y
+BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.12.19"
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_12=y
+
+# Filesystem
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_SIZE="63M"
+BR2_TARGET_ROOTFS_EXT2_MKFS_OPTIONS="-O ^64bit,fast_commit"
+BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW=y
+BR2_TARGET_ROOTFS_TAR=n
+
+# Image
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/orangepi/common/post-build.sh"

BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"

configs/orangepi_zero_defconfig +6 -2
-BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/orangepi/orangepi-zero/genimage.cfg"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c $(BINARIES_DIR)/genimage.cfg"
+
+# Required tools to create the SD image
+BR2_PACKAGE_HOST_GENIMAGE=y
 
-# wireless driver and firmware
+# Wireless driver and firmware
+# [16.01.2022] Doesn't compile with newer kernels > 5.12.x
Quoted 3 lines

BR2_PACKAGE_XR819_XRADIO=y
BR2_PACKAGE_ARMBIAN_FIRMWARE=y
BR2_PACKAGE_ARMBIAN_FIRMWARE_XR819=y

Can you point a test case? This way I could try to fix building and you could test if it works.

Thank you
Best regards
—-
Giulio Benetti
Benetti Engineering sas

Quoted 12 lines
configs/orangepi_zero_defconfig +1 -1
-# wireless support
+# Wireless support

BR2_PACKAGE_IW=y
BR2_PACKAGE_WIRELESS_TOOLS=y
BR2_PACKAGE_WIRELESS_TOOLS_LIB=y

configs/orangepi_zero_defconfig +0 -0
@@ -51,5 +66,5 @@ BR2_PACKAGE_WPA_SUPPLICANT=y

BR2_PACKAGE_WPA_SUPPLICANT_NL80211=y
BR2_PACKAGE_WPA_SUPPLICANT_CLI=y

configs/orangepi_zero_defconfig +1 -1
-# spi flash support
+# Spi flash support
Quoted 8 lines

BR2_PACKAGE_MTD=y

Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

Hi Sergey,

+Cc buildroot ML,

Quoted 5 lines

Il giorno 16 gen 2022, alle ore 19:19, Sergey Kuzminov <[email protected]> ha scritto:

16.01.2022 18:29, Giulio Benetti:

Quoted 2 lines

Hi Sergey, Peter, All,

Quoted 7 lines
Quoted 6 lines

+# Architecture
BR2_arm=y
BR2_cortex_a7=y
BR2_ARM_FPU_VFPV4=y
…Here ^^^ you can enable VFP+NEON. It’s working on all Olimex boards with sunxi A7 and can speed things up.

Hi, Giulio. I will test, thanks.

+1

Quoted 15 lines
Quoted 9 lines
Quoted 7 lines
configs/orangepi_zero_defconfig +2 -0
+# Wireless driver and firmware
+# [16.01.2022] Doesn't compile with newer kernels > 5.12.x

BR2_PACKAGE_XR819_XRADIO=y
BR2_PACKAGE_ARMBIAN_FIRMWARE=y
BR2_PACKAGE_ARMBIAN_FIRMWARE_XR819=y

Can you point a test case? This way I could try to fix building and you could test if it works.

Quoted 6 lines

Thank you
Best regards
—-
Giulio Benetti
Benetti Engineering sas

Quoted 4 lines

To check, set the parameters in the current version of Buildroot BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_15=y BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.15.15"
in the configs/orangepi_zero_defconfig file

Ok, thank you.

Best regards
Giulio

Quoted 5 lines

make orangepi_zero_defconfig
make

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#6 lore raw

Forgotten again to Cc ML.

Sorry!

Signature · 2 lines
Giulio Benetti
Benetti Engineering sas
Quoted 46 lines · Giulio Benetti
Quoted 39 lines

Il giorno 17 gen 2022, alle ore 12:38, Giulio Benetti <[email protected]> ha scritto:

Hi Sergey,

Quoted 24 lines · Sergey Kuzminov

16.01.2022 18:29, Giulio Benetti:

Quoted 8 lines

Hi Sergey, Peter, All,

+# Architecture
BR2_arm=y
BR2_cortex_a7=y
BR2_ARM_FPU_VFPV4=y
…Here ^^^ you can enable VFP+NEON. It’s working on all Olimex boards with sunxi A7 and can speed things up.

Hi, Giulio. I will test, thanks.

Quoted 7 lines
Quoted 5 lines
configs/orangepi_zero_defconfig +2 -0
+# Wireless driver and firmware
+# [16.01.2022] Doesn't compile with newer kernels > 5.12.x

BR2_PACKAGE_XR819_XRADIO=y
BR2_PACKAGE_ARMBIAN_FIRMWARE=y
BR2_PACKAGE_ARMBIAN_FIRMWARE_XR819=y

Can you point a test case? This way I could try to fix building and you could test if it works.

Quoted 6 lines

Thank you
Best regards
—-
Giulio Benetti
Benetti Engineering sas

Quoted 6 lines

To check, set the parameters in the current version of Buildroot BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_15=y BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.15.15"
in the configs/orangepi_zero_defconfig file
make orangepi_zero_defconfig
make

I've fixed the building of this ^^^:
https://github.com/giuliobenetti/buildroot/commit/5e8a422b231f395d6674a2310ef0ffbf64ab38dc

Quoted 6 lines

Can you test if it works runtime?

This way your actual patch can change using latest Linux(5.16.1).

I've already opened a PR for that patch:
https://github.com/fifteenhex/xradio/pull/15

Quoted 17 lines

I haven’t checked there was already a pending PR for this:
https://github.com/fifteenhex/xradio/pull/14

Anyway they do the same the thing with 2 different approaches.

Best regards
Giulio Benetti
Benetti Engineering sas

Quoted 8 lines

Once my patch will be merged I will bump xradio version to latest in Buildroot.

Thank you
Best regards

Signature · 2 lines
Giulio Benetti
Benetti Engineering sas

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

A message that is not in the archive (sent off-list or not yet received): [email protected]

#8 lore raw

Hi Sergey,

please keep ML in Cc(reply to all), thank you
I follow with another e-mail

Signature · 2 lines
Giulio Benetti
Benetti Engineering sas
Quoted 115 lines · Sergey Kuzminov

Hi, Giulio. Wifi is working, thanks.

# uname -a
Linux OrangePi_Zero 5.16.1 #1 SMP Mon Jan 17 21:46:45 MSK 2022 armv7l
GNU/Linux
# iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

wlan0     IEEE 802.11  ESSID:"AFD7DF"
          Mode:Managed  Frequency:2.452 GHz  Access Point:
2C:C8:1B:4C:E1:F3
          Bit Rate=26 Mb/s   Tx-Power=20 dBm
          Retry short limit:7   RTS thr:off   Fragment thr:off Encryption key:off
          Power Management:on
          Link Quality=28/70  Signal level=-82 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0 Tx excessive retries:4  Invalid misc:0   Missed beacon:0

# ifconfig
eth0      Link encap:Ethernet  HWaddr 02:42:FD:46:1D:D3
            UP BROADCAST MULTICAST  MTU:1500  Metric:1
            RX packets:0 errors:0 dropped:0 overruns:0 frame:0
            TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:1000
            RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
            Interrupt:43

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan0     Link encap:Ethernet  HWaddr 12:42:FD:46:1D:D3
          inet addr:192.168.10.240  Bcast:192.168.10.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:88 errors:0 dropped:34 overruns:0 frame:0 TX packets:14 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
          RX bytes:13516 (13.1 KiB)  TX bytes:1927 (1.8 KiB)

# ping google.com
PING google.com (216.239.38.120): 56 data bytes
64 bytes from 216.239.38.120: seq=0 ttl=102 time=54.890 ms
64 bytes from 216.239.38.120: seq=1 ttl=102 time=54.102 ms
64 bytes from 216.239.38.120: seq=2 ttl=102 time=51.583 ms
^C
--- google.com ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 51.583/53.525/54.890 ms

17.01.2022 14:38, Giulio Benetti пишет:

Quoted 54 lines

Hi Sergey,

Quoted 27 lines · Sergey Kuzminov

16.01.2022 18:29, Giulio Benetti:

Quoted 9 lines

Hi Sergey, Peter, All,

+# Architecture
BR2_arm=y
BR2_cortex_a7=y
BR2_ARM_FPU_VFPV4=y
…Here ^^^ you can enable VFP+NEON. It’s working on all Olimex boards with sunxi A7 and can speed things up.

Hi, Giulio. I will test, thanks.

Quoted 8 lines
Quoted 5 lines
configs/orangepi_zero_defconfig +2 -0
+# Wireless driver and firmware
+# [16.01.2022] Doesn't compile with newer kernels > 5.12.x

BR2_PACKAGE_XR819_XRADIO=y
BR2_PACKAGE_ARMBIAN_FIRMWARE=y
BR2_PACKAGE_ARMBIAN_FIRMWARE_XR819=y

Can you point a test case? This way I could try to fix building and you could test if it works.

Quoted 6 lines

Thank you
Best regards
—-
Giulio Benetti
Benetti Engineering sas

Quoted 7 lines

To check, set the parameters in the current version of Buildroot BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_15=y BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.15.15"
in the configs/orangepi_zero_defconfig file

make orangepi_zero_defconfig
make

I've fixed the building of this ^^^:
https://github.com/giuliobenetti/buildroot/commit/5e8a422b231f395d6674a2310ef0ffbf64ab38dc

Can you test if it works runtime?

This way your actual patch can change using latest Linux(5.16.1).

I've already opened a PR for that patch:
https://github.com/fifteenhex/xradio/pull/15

Once my patch will be merged I will bump xradio version to latest in Buildroot.

Thank you
Best regards

Signature · 6 lines
Giulio Benetti
Benetti Engineering sas
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#9 lore raw
In reply to a message not in the archive

Hi Sergey,

please keep ML in Cc,

Quoted 46 lines · Sergey Kuzminov

Hi, Giulio. Wifi is working, thanks.

# uname -a
Linux OrangePi_Zero 5.16.1 #1 SMP Mon Jan 17 21:46:45 MSK 2022 armv7l
GNU/Linux
# iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

wlan0     IEEE 802.11  ESSID:"AFD7DF"
          Mode:Managed  Frequency:2.452 GHz  Access Point:
2C:C8:1B:4C:E1:F3
          Bit Rate=26 Mb/s   Tx-Power=20 dBm
          Retry short limit:7   RTS thr:off   Fragment thr:off Encryption key:off
          Power Management:on
          Link Quality=28/70  Signal level=-82 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0 Tx excessive retries:4  Invalid misc:0   Missed beacon:0

# ifconfig
eth0      Link encap:Ethernet  HWaddr 02:42:FD:46:1D:D3
            UP BROADCAST MULTICAST  MTU:1500  Metric:1
            RX packets:0 errors:0 dropped:0 overruns:0 frame:0
            TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:1000
            RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
            Interrupt:43

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan0     Link encap:Ethernet  HWaddr 12:42:FD:46:1D:D3
          inet addr:192.168.10.240  Bcast:192.168.10.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:88 errors:0 dropped:34 overruns:0 frame:0 TX packets:14 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
          RX bytes:13516 (13.1 KiB)  TX bytes:1927 (1.8 KiB)

Quoted 10 lines
# ping google.com
PING google.com (216.239.38.120): 56 data bytes
64 bytes from 216.239.38.120: seq=0 ttl=102 time=54.890 ms
64 bytes from 216.239.38.120: seq=1 ttl=102 time=54.102 ms
64 bytes from 216.239.38.120: seq=2 ttl=102 time=51.583 ms
^C
--- google.com ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 51.583/53.525/54.890 ms

Thanks a lot for trying. So please bump linux version to latest(5.16.1) and send V2 patch. In the meanwhile I've just sent a patch for rx819-radio:
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/

So when you send V2, please create a cover-letter where you state my patch for rx819-radio is needed to work.

Thank you!
Best regards

Signature · 2 lines
Giulio Benetti
Benetti Engineering sas
Quoted 58 lines

17.01.2022 14:38, Giulio Benetti пишет:

Quoted 54 lines

Hi Sergey,

Quoted 27 lines · Sergey Kuzminov

16.01.2022 18:29, Giulio Benetti:

Quoted 9 lines

Hi Sergey, Peter, All,

+# Architecture
BR2_arm=y
BR2_cortex_a7=y
BR2_ARM_FPU_VFPV4=y
…Here ^^^ you can enable VFP+NEON. It’s working on all Olimex boards with sunxi A7 and can speed things up.

Hi, Giulio. I will test, thanks.

Quoted 8 lines
Quoted 5 lines
configs/orangepi_zero_defconfig +2 -0
+# Wireless driver and firmware
+# [16.01.2022] Doesn't compile with newer kernels > 5.12.x

BR2_PACKAGE_XR819_XRADIO=y
BR2_PACKAGE_ARMBIAN_FIRMWARE=y
BR2_PACKAGE_ARMBIAN_FIRMWARE_XR819=y

Can you point a test case? This way I could try to fix building and you could test if it works.

Quoted 6 lines

Thank you
Best regards
—-
Giulio Benetti
Benetti Engineering sas

Quoted 7 lines

To check, set the parameters in the current version of Buildroot BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_15=y BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.15.15"
in the configs/orangepi_zero_defconfig file

make orangepi_zero_defconfig
make

I've fixed the building of this ^^^:
https://github.com/giuliobenetti/buildroot/commit/5e8a422b231f395d6674a2310ef0ffbf64ab38dc

Can you test if it works runtime?

This way your actual patch can change using latest Linux(5.16.1).

I've already opened a PR for that patch:
https://github.com/fifteenhex/xradio/pull/15

Once my patch will be merged I will bump xradio version to latest in Buildroot.

Thank you
Best regards

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#10 lore raw

Ok. I'll make a v2 patch tomorrow, I want to check something else (BR2_ARM_EABIHF, BR2_ARM_FPU_NEON_VFPV4).

18.01.2022 00:08, Giulio Benetti пишет:

Quoted 62 lines

Hi Sergey,

please keep ML in Cc,

Quoted 46 lines · Sergey Kuzminov

Hi, Giulio. Wifi is working, thanks.

# uname -a
Linux OrangePi_Zero 5.16.1 #1 SMP Mon Jan 17 21:46:45 MSK 2022 armv7l
GNU/Linux
# iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

wlan0     IEEE 802.11  ESSID:"AFD7DF"
            Mode:Managed  Frequency:2.452 GHz  Access Point:
2C:C8:1B:4C:E1:F3
            Bit Rate=26 Mb/s   Tx-Power=20 dBm
            Retry short limit:7   RTS thr:off   Fragment thr:off Encryption key:off
            Power Management:on
            Link Quality=28/70  Signal level=-82 dBm
            Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0 Tx excessive retries:4  Invalid misc:0   Missed beacon:0

# ifconfig
eth0      Link encap:Ethernet  HWaddr 02:42:FD:46:1D:D3
            UP BROADCAST MULTICAST  MTU:1500  Metric:1
            RX packets:0 errors:0 dropped:0 overruns:0 frame:0
            TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:1000
            RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
            Interrupt:43

lo        Link encap:Local Loopback
            inet addr:127.0.0.1  Mask:255.0.0.0
            UP LOOPBACK RUNNING  MTU:65536  Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
            RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan0     Link encap:Ethernet  HWaddr 12:42:FD:46:1D:D3
            inet addr:192.168.10.240  Bcast:192.168.10.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
            RX packets:88 errors:0 dropped:34 overruns:0 frame:0 TX packets:14 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
            RX bytes:13516 (13.1 KiB)  TX bytes:1927 (1.8 KiB)

Quoted 10 lines
# ping google.com
PING google.com (216.239.38.120): 56 data bytes
64 bytes from 216.239.38.120: seq=0 ttl=102 time=54.890 ms
64 bytes from 216.239.38.120: seq=1 ttl=102 time=54.102 ms
64 bytes from 216.239.38.120: seq=2 ttl=102 time=51.583 ms
^C
--- google.com ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 51.583/53.525/54.890 ms
Quoted 8 lines

Thanks a lot for trying. So please bump linux version to latest(5.16.1) and send V2 patch. In the meanwhile I've just sent a patch for rx819-radio:
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/

So when you send V2, please create a cover-letter where you state my patch for rx819-radio is needed to work.

Thank you!
Best regards

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#11 lore raw
In reply to Giulio Benetti

Add Peter in Cc.

Can you please check below about extlinux?

Giulio

Quoted 299 lines

Il giorno 16 gen 2022, alle ore 16:30, Giulio Benetti <[email protected]> ha scritto:

Hi Sergey, Peter, All,

Quoted 5 lines

Il giorno 16 gen 2022, alle ore 12:26, Sergey Kuzminov <[email protected]> ha scritto:

Changes:
- common scenarios for multiple boards to create the SD image: board/orangepi/common;
- extlinux.conf instead of boot.scr;

I’ve seen other boards switching to extlinux.conf instead of boot.scr, but extlinux.conf doesn’t have any checksum while boot.scr does as I remember. I’ve missed previous discussion about this.

@Peter as I recall you’ve suggested this. Sorry but I don’t remember the reason and I would still keep boot.scr. I’d prefer the system not booting than a system booting with partial bootlegs honestly.

What about that?

And…

Quoted 170 lines

- exclude FAT partition;
- defconfig refactoring;
- kernel: bump to version 5.12.19, if newer then BR2_PACKAGE_XR819_XRADIO will not compile;
- u-boot: bump to version 2022.01

---

board/orangepi/common/extlinux.conf       |  5 ++
board/orangepi/common/genimage.cfg        | 19 +++++++
board/orangepi/common/post-build.sh       | 34 ++++++++++++
board/orangepi/common/uboot-extras.config |  3 +
board/orangepi/orangepi-zero/boot.cmd     |  9 ---
board/orangepi/orangepi-zero/genimage.cfg | 36 ------------
configs/orangepi_zero_defconfig           | 67 ++++++++++++++---------
7 files changed, 102 insertions(+), 71 deletions(-)

create mode 100644 board/orangepi/common/extlinux.conf create mode 100644 board/orangepi/common/genimage.cfg create mode 100755 board/orangepi/common/post-build.sh create mode 100644 board/orangepi/common/uboot-extras.config delete mode 100644 board/orangepi/orangepi-zero/boot.cmd delete mode 100644 board/orangepi/orangepi-zero/genimage.cfg

board/orangepi/common/extlinux.conf new file +5 -0
new file mode 100644
index 0000000000..015f29270e
@@ -0,0 +1,5 @@
+LABEL default
+  kernel /boot/%LINUXIMAGE%
+  devicetreedir /boot
+  append root=PARTUUID=%PARTUUID% rootwait console=${console}
+# append root=PARTUUID=%PARTUUID% rootwait console=${console} rootfstype=ext4 quiet panic=10
board/orangepi/common/genimage.cfg new file +19 -0
new file mode 100644
index 0000000000..fd250ef05d
@@ -0,0 +1,19 @@
+image sdcard.img {
+    hdimage {
+        partition-table-type = gpt
+        gpt-no-backup = true
+        gpt-location = 1008K # 1MB - 16KB
+    }
+
+    partition u-boot {
+        in-partition-table = false
+        image = "u-boot-sunxi-with-spl.bin"
+        offset = 8K
+        size = 1000K # 1MB - 8KB - 16KB
+    }
+
+    partition rootfs {
+        image = "rootfs.ext4"
+        partition-uuid = %PARTUUID%
+    }
+}
board/orangepi/common/post-build.sh new file +34 -0
new file mode 100755
index 0000000000..296f94b174
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+linux_image()
+{
+    if grep -Eq "^BR2_LINUX_KERNEL_UIMAGE=y$" ${BR2_CONFIG}; then
+        echo "uImage"
+    elif grep -Eq "^BR2_LINUX_KERNEL_IMAGE=y$" ${BR2_CONFIG}; then
+        echo "Image"
+    elif grep -Eq "^BR2_LINUX_KERNEL_IMAGEGZ=y$" ${BR2_CONFIG}; then
+        echo "Image.gz"
+    else
+        echo "zImage"
+    fi
+}
+
+generic_getty()
+{
+    if grep -Eq "^BR2_TARGET_GENERIC_GETTY=y$" ${BR2_CONFIG}; then
+        echo ""
+    else
+        echo "s/\s*console=\S*//"
+    fi
+}
+
+PARTUUID="$($HOST_DIR/bin/uuidgen)"
+
+install -d "$TARGET_DIR/boot/extlinux/"
+
+sed -e "$(generic_getty)" \
+    -e "s/%LINUXIMAGE%/$(linux_image)/g" \
+    -e "s/%PARTUUID%/$PARTUUID/g" \
+    "board/orangepi/common/extlinux.conf" > "$TARGET_DIR/boot/extlinux/extlinux.conf"
+
+sed "s/%PARTUUID%/$PARTUUID/g" "board/orangepi/common/genimage.cfg" > "$BINARIES_DIR/genimage.cfg"
board/orangepi/common/uboot-extras.config new file +3 -0
new file mode 100644
index 0000000000..5aa97523d9
@@ -0,0 +1,3 @@
+CONFIG_BOOTDELAY=0
+CONFIG_USE_PREBOOT=y
+CONFIG_PREBOOT="setenv preboot;"
board/orangepi/orangepi-zero/boot.cmd deleted +0 -9
deleted file mode 100644
index d094a64fe5..0000000000
@@ -1,9 +0,0 @@
-setenv fdt_high ffffffff
-
-part uuid mmc 0:2 uuid
-setenv bootargs console=ttyS0,115200 root=PARTUUID=${uuid} rootwait
-
-fatload mmc 0 $kernel_addr_r zImage
-fatload mmc 0 $fdt_addr_r sun8i-h2-plus-orangepi-zero.dtb
-
-bootz $kernel_addr_r - $fdt_addr_r
board/orangepi/orangepi-zero/genimage.cfg deleted +0 -36
deleted file mode 100644
index 32f5454ae6..0000000000
@@ -1,36 +0,0 @@
-# Minimal SD card image for the OrangePi Zero
-#
-image boot.vfat {
-    vfat {
-        files = {
-            "zImage",
-            "sun8i-h2-plus-orangepi-zero.dtb",
-            "boot.scr"
-        }
-    }
-    size = 10M
-}
-
-image sdcard.img {
-    hdimage {
-    }
-
-    partition u-boot {
-        in-partition-table = "no"
-        image = "u-boot-sunxi-with-spl.bin"
-        offset = 8K
-        size = 1016K # 1MB - 8KB
-    }
-
-    partition boot {
-        partition-type = 0xC
-        bootable = "true"
-        image = "boot.vfat"
-    }
-
-    partition rootfs {
-        partition-type = 0x83
-        image = "rootfs.ext4"
-        size = 512M
-    }
-}
configs/orangepi_zero_defconfig +1 -0
index 1c107b10e6..908bcea893 100644
@@ -1,49 +1,64 @@
+# Architecture
Quoted 3 lines

BR2_arm=y
BR2_cortex_a7=y
BR2_ARM_FPU_VFPV4=y

…Here ^^^ you can enable VFP+NEON. It’s working on all Olimex boards with sunxi A7 and can speed things up.

Quoted 76 lines
configs/orangepi_zero_defconfig +4 -0
+
+# System
+BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for the Orange Pi Zero"
+BR2_TARGET_GENERIC_HOSTNAME="OrangePi_Zero"

BR2_GLOBAL_PATCH_DIR="board/orangepi/orangepi-zero/patches" BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y

configs/orangepi_zero_defconfig +0 -3
-BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_12=y
-BR2_TARGET_GENERIC_HOSTNAME="OrangePi_Zero"
-BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for the Orange Pi Zero"

BR2_SYSTEM_DHCP="eth0"

configs/orangepi_zero_defconfig +3 -11
-BR2_LINUX_KERNEL=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.12.2"
-BR2_LINUX_KERNEL_DEFCONFIG="sunxi"
-BR2_LINUX_KERNEL_DTS_SUPPORT=y
-BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun8i-h2-plus-orangepi-zero"
-BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/orangepi/orangepi-zero/linux-extras.config"
-BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
-BR2_TARGET_ROOTFS_EXT2=y
-BR2_TARGET_ROOTFS_EXT2_4=y
-# BR2_TARGET_ROOTFS_TAR is not set
+BR2_GCC_ENABLE_LTO=y
+
+# Bootloader

BR2_TARGET_UBOOT=y
BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
BR2_TARGET_UBOOT_CUSTOM_VERSION=y

configs/orangepi_zero_defconfig +1 -1
-BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2021.04"
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2022.01"

BR2_TARGET_UBOOT_BOARD_DEFCONFIG="orangepi_zero" BR2_TARGET_UBOOT_NEEDS_DTC=y BR2_TARGET_UBOOT_NEEDS_PYTHON3=y BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y BR2_TARGET_UBOOT_SPL=y BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin"

configs/orangepi_zero_defconfig +24 -7
-BR2_PACKAGE_HOST_UBOOT_TOOLS=y
-BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT=y
-BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE="board/orangepi/orangepi-zero/boot.cmd"
-BR2_PACKAGE_HOST_DOSFSTOOLS=y
-BR2_PACKAGE_HOST_GENIMAGE=y
-BR2_PACKAGE_HOST_MTOOLS=y
-BR2_PACKAGE_HOST_UBOOT_TOOLS=y
+BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="board/orangepi/common/uboot-extras.config"
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_DEFCONFIG="sunxi"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun8i-h2-plus-orangepi-zero"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/orangepi/orangepi-zero/linux-extras.config"
+BR2_LINUX_KERNEL_INSTALL_TARGET=y
+BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.12.19"
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_12=y
+
+# Filesystem
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_SIZE="63M"
+BR2_TARGET_ROOTFS_EXT2_MKFS_OPTIONS="-O ^64bit,fast_commit"
+BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW=y
+BR2_TARGET_ROOTFS_TAR=n
+
+# Image
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/orangepi/common/post-build.sh"

BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"

configs/orangepi_zero_defconfig +6 -2
-BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/orangepi/orangepi-zero/genimage.cfg"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c $(BINARIES_DIR)/genimage.cfg"
+
+# Required tools to create the SD image
+BR2_PACKAGE_HOST_GENIMAGE=y
 
-# wireless driver and firmware
+# Wireless driver and firmware
+# [16.01.2022] Doesn't compile with newer kernels > 5.12.x
Quoted 3 lines

BR2_PACKAGE_XR819_XRADIO=y
BR2_PACKAGE_ARMBIAN_FIRMWARE=y
BR2_PACKAGE_ARMBIAN_FIRMWARE_XR819=y

Can you point a test case? This way I could try to fix building and you could test if it works.

Thank you
Best regards
—-
Giulio Benetti
Benetti Engineering sas

Quoted 16 lines
configs/orangepi_zero_defconfig +1 -1
-# wireless support
+# Wireless support

BR2_PACKAGE_IW=y
BR2_PACKAGE_WIRELESS_TOOLS=y
BR2_PACKAGE_WIRELESS_TOOLS_LIB=y

configs/orangepi_zero_defconfig +0 -0
@@ -51,5 +66,5 @@ BR2_PACKAGE_WPA_SUPPLICANT=y

BR2_PACKAGE_WPA_SUPPLICANT_NL80211=y
BR2_PACKAGE_WPA_SUPPLICANT_CLI=y

configs/orangepi_zero_defconfig +1 -1
-# spi flash support
+# Spi flash support

BR2_PACKAGE_MTD=y

Signature · 1 line
2.34.1
Quoted 9 lines
Quoted 4 lines

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot