* [Buildroot] [PATCH 1/1] board/pine64/pinecube: new board @ 2022-04-08 17:39 Jan Havran 2022-07-28 22:28 ` Giulio Benetti 0 siblings, 1 reply; 6+ messages in thread From: Jan Havran @ 2022-04-08 17:39 UTC (permalink / raw) To: buildroot; +Cc: Jan Havran, Jagan Teki Add support for PineCube with: - U-Boot 2022.01 - Linux 5.15 Signed-off-by: Jan Havran <havran.jan@email.cz> --- DEVELOPERS | 4 +++ board/pine64/pinecube/boot.cmd | 6 ++++ board/pine64/pinecube/genimage.cfg | 34 +++++++++++++++++++++ board/pine64/pinecube/readme.txt | 31 ++++++++++++++++++++ configs/pinecube_defconfig | 47 ++++++++++++++++++++++++++++++ 5 files changed, 122 insertions(+) create mode 100644 board/pine64/pinecube/boot.cmd create mode 100644 board/pine64/pinecube/genimage.cfg create mode 100644 board/pine64/pinecube/readme.txt create mode 100644 configs/pinecube_defconfig diff --git a/DEVELOPERS b/DEVELOPERS index a66b9d7eee..d418a1af99 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -1356,6 +1356,10 @@ F: package/pangomm/ F: package/rpm/ F: package/yad/ +N: Jan Havran <havran.jan@email.cz> +F: board/pine64/pinecube/ +F: configs/pinecube_defconfig + N: Jan Heylen <jan.heylen@nokia.com> F: package/opentracing-cpp/ diff --git a/board/pine64/pinecube/boot.cmd b/board/pine64/pinecube/boot.cmd new file mode 100644 index 0000000000..d8b62e0b4a --- /dev/null +++ b/board/pine64/pinecube/boot.cmd @@ -0,0 +1,6 @@ +setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait rw + +fatload mmc 0 $kernel_addr_r zImage +fatload mmc 0 $fdt_addr_r sun8i-s3-pinecube.dtb + +bootz $kernel_addr_r - $fdt_addr_r diff --git a/board/pine64/pinecube/genimage.cfg b/board/pine64/pinecube/genimage.cfg new file mode 100644 index 0000000000..af175811ad --- /dev/null +++ b/board/pine64/pinecube/genimage.cfg @@ -0,0 +1,34 @@ +image boot.vfat { + vfat { + files = { + "zImage", + "sun8i-s3-pinecube.dtb", + "boot.scr" + } + } + + size = 8M +} + +image sdcard.img { + hdimage { + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot-sunxi-with-spl.bin" + offset = 8K + size = 504K # 512KB - 8KB + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/board/pine64/pinecube/readme.txt b/board/pine64/pinecube/readme.txt new file mode 100644 index 0000000000..7770bbfe42 --- /dev/null +++ b/board/pine64/pinecube/readme.txt @@ -0,0 +1,31 @@ +Intro +===== + +This directory contains a Buildroot configuration for building a +Pine64 PineCube. + +Board homepage: https://www.pine64.org/cube/ +Board wiki: https://wiki.pine64.org/wiki/PineCube + +How to build it +=============== + + $ make pinecube_defconfig + $ make + +Note: you will need access to the internet to download the required +sources. + +How to write the SD card +======================== + +Once the build process is finished you will have an image called "sdcard.img" +in the output/images/ directory. + +Copy the bootable "sdcard.img" onto an SD card with "dd": + + $ sudo dd if=output/images/sdcard.img of=/dev/sdX + $ sudo sync + +Insert the micro SDcard in your PineCube and power it up. The console +is on the serial port 2, 115200 8N1 (check Wiki for board pinout). diff --git a/configs/pinecube_defconfig b/configs/pinecube_defconfig new file mode 100644 index 0000000000..1064167d8e --- /dev/null +++ b/configs/pinecube_defconfig @@ -0,0 +1,47 @@ +# Target options +BR2_arm=y +BR2_cortex_a7=y +BR2_ARM_FPU_NEON_VFPV4=y + +# Toolchain options +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_15=y + +# System configuration +BR2_TARGET_GENERIC_HOSTNAME="pinecube" +BR2_TARGET_GENERIC_ISSUE="Welcome to PINECUBE" +BR2_SYSTEM_DHCP="eth0" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/pine64/pinecube/genimage.cfg" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.15" +BR2_LINUX_KERNEL_DEFCONFIG="sunxi" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun8i-s3-pinecube" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2022.01" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="pinecube" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y +BR2_TARGET_UBOOT_NEEDS_OPENSSL=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" +BR2_PACKAGE_HOST_UBOOT_TOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT=y +BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE="board/pine64/pinecube/boot.cmd" + +# Required host utilities for building an SDCard image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y -- 2.35.1 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH 1/1] board/pine64/pinecube: new board 2022-04-08 17:39 [Buildroot] [PATCH 1/1] board/pine64/pinecube: new board Jan Havran @ 2022-07-28 22:28 ` Giulio Benetti 2022-08-14 9:22 ` Jan Havran 0 siblings, 1 reply; 6+ messages in thread From: Giulio Benetti @ 2022-07-28 22:28 UTC (permalink / raw) To: Jan Havran, buildroot; +Cc: Jagan Teki Hi Jan, On 08/04/22 19:39, Jan Havran wrote: > Add support for PineCube with: > - U-Boot 2022.01 > - Linux 5.15 Here I would briefly describe the board(various I/Os) and add a https URL to the board official webpage if it exists. > Signed-off-by: Jan Havran <havran.jan@email.cz> > --- > DEVELOPERS | 4 +++ > board/pine64/pinecube/boot.cmd | 6 ++++ > board/pine64/pinecube/genimage.cfg | 34 +++++++++++++++++++++ > board/pine64/pinecube/readme.txt | 31 ++++++++++++++++++++ > configs/pinecube_defconfig | 47 ++++++++++++++++++++++++++++++ > 5 files changed, 122 insertions(+) > create mode 100644 board/pine64/pinecube/boot.cmd > create mode 100644 board/pine64/pinecube/genimage.cfg > create mode 100644 board/pine64/pinecube/readme.txt > create mode 100644 configs/pinecube_defconfig > > diff --git a/DEVELOPERS b/DEVELOPERS > index a66b9d7eee..d418a1af99 100644 > --- a/DEVELOPERS > +++ b/DEVELOPERS > @@ -1356,6 +1356,10 @@ F: package/pangomm/ > F: package/rpm/ > F: package/yad/ > > +N: Jan Havran <havran.jan@email.cz> > +F: board/pine64/pinecube/ > +F: configs/pinecube_defconfig > + > N: Jan Heylen <jan.heylen@nokia.com> > F: package/opentracing-cpp/ > > diff --git a/board/pine64/pinecube/boot.cmd b/board/pine64/pinecube/boot.cmd > new file mode 100644 > index 0000000000..d8b62e0b4a > --- /dev/null > +++ b/board/pine64/pinecube/boot.cmd > @@ -0,0 +1,6 @@ > +setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait rw > + > +fatload mmc 0 $kernel_addr_r zImage > +fatload mmc 0 $fdt_addr_r sun8i-s3-pinecube.dtb > + > +bootz $kernel_addr_r - $fdt_addr_r The lastest boards use extlinux.conf instead of boot.cmd since it's pretty easier to use it during debugging. So it's better to have extlinux.conf here and when one finalize the project then it can create the corresponding boot.cmd > diff --git a/board/pine64/pinecube/genimage.cfg b/board/pine64/pinecube/genimage.cfg > new file mode 100644 > index 0000000000..af175811ad > --- /dev/null > +++ b/board/pine64/pinecube/genimage.cfg > @@ -0,0 +1,34 @@ > +image boot.vfat { > + vfat { > + files = { > + "zImage", > + "sun8i-s3-pinecube.dtb", > + "boot.scr" > + } > + } > + > + size = 8M > +} > + > +image sdcard.img { > + hdimage { > + } > + > + partition u-boot { > + in-partition-table = "no" > + image = "u-boot-sunxi-with-spl.bin" > + offset = 8K > + size = 504K # 512KB - 8KB > + } > + > + partition boot { > + partition-type = 0xC > + bootable = "true" > + image = "boot.vfat" > + } > + > + partition rootfs { > + partition-type = 0x83 > + image = "rootfs.ext4" > + } > +} > diff --git a/board/pine64/pinecube/readme.txt b/board/pine64/pinecube/readme.txt > new file mode 100644 > index 0000000000..7770bbfe42 > --- /dev/null > +++ b/board/pine64/pinecube/readme.txt > @@ -0,0 +1,31 @@ > +Intro > +===== > + > +This directory contains a Buildroot configuration for building a > +Pine64 PineCube. > + > +Board homepage: https://www.pine64.org/cube/ > +Board wiki: https://wiki.pine64.org/wiki/PineCube These ^^^ are the URLs I ask you for in commit log > + > +How to build it > +=============== > + > + $ make pinecube_defconfig > + $ make > + > +Note: you will need access to the internet to download the required > +sources. > + > +How to write the SD card > +======================== > + > +Once the build process is finished you will have an image called "sdcard.img" > +in the output/images/ directory. > + > +Copy the bootable "sdcard.img" onto an SD card with "dd": > + > + $ sudo dd if=output/images/sdcard.img of=/dev/sdX > + $ sudo sync > + > +Insert the micro SDcard in your PineCube and power it up. The console > +is on the serial port 2, 115200 8N1 (check Wiki for board pinout). > diff --git a/configs/pinecube_defconfig b/configs/pinecube_defconfig Since this is a Pine64 board and you also use board/pine64/pinecube it's better to rename pinecube_defconfig to pine64_pinecube_defconfig like pine64_sopine_defconfig > new file mode 100644 > index 0000000000..1064167d8e > --- /dev/null > +++ b/configs/pinecube_defconfig > @@ -0,0 +1,47 @@ > +# Target options > +BR2_arm=y > +BR2_cortex_a7=y > +BR2_ARM_FPU_NEON_VFPV4=y This ^^^ should be removed since NEON doesn't support complete FPU standard API, so it's better to keep the default for BR2_cortex_a7 > + > +# Toolchain options > +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_15=y > + > +# System configuration > +BR2_TARGET_GENERIC_HOSTNAME="pinecube" > +BR2_TARGET_GENERIC_ISSUE="Welcome to PINECUBE" "Welcome to Pine64 Pinecube" ^^^ > +BR2_SYSTEM_DHCP="eth0" > +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" > +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/pine64/pinecube/genimage.cfg" > + > +# Kernel > +BR2_LINUX_KERNEL=y > +BR2_LINUX_KERNEL_CUSTOM_VERSION=y > +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.15" Here ^^^ please use latest stable 5.15.x version, now it's 5.15.57: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ and re-test it > +BR2_LINUX_KERNEL_DEFCONFIG="sunxi" > +BR2_LINUX_KERNEL_DTS_SUPPORT=y > +BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun8i-s3-pinecube" > +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y > + > +# Filesystem > +BR2_TARGET_ROOTFS_EXT2=y > +BR2_TARGET_ROOTFS_EXT2_4=y > + > +# Bootloader > +BR2_TARGET_UBOOT=y > +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y > +BR2_TARGET_UBOOT_CUSTOM_VERSION=y > +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2022.01" > +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="pinecube" > +BR2_TARGET_UBOOT_NEEDS_DTC=y > +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y > +BR2_TARGET_UBOOT_NEEDS_OPENSSL=y > +BR2_TARGET_UBOOT_SPL=y > +BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" > +BR2_PACKAGE_HOST_UBOOT_TOOLS=y > +BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT=y > +BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE="board/pine64/pinecube/boot.cmd" > + > +# Required host utilities for building an SDCard image > +BR2_PACKAGE_HOST_DOSFSTOOLS=y > +BR2_PACKAGE_HOST_GENIMAGE=y > +BR2_PACKAGE_HOST_MTOOLS=y Here ^^^ remember to check which Host tool is needed after changing to extlinux.conf Anyway I've built it successfully with Buildroot's utils/docker-run. Waiting for V2 patch then. Thank you! Best regards -- Giulio Benetti Benetti Engineering sas _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH 1/1] board/pine64/pinecube: new board 2022-07-28 22:28 ` Giulio Benetti @ 2022-08-14 9:22 ` Jan Havran 2022-08-14 11:56 ` Giulio Benetti 0 siblings, 1 reply; 6+ messages in thread From: Jan Havran @ 2022-08-14 9:22 UTC (permalink / raw) To: Giulio Benetti, buildroot; +Cc: Jagan Teki Hello Giulio, > > new file mode 100644 > > index 0000000000..1064167d8e > > --- /dev/null > > +++ b/configs/pinecube_defconfig > > @@ -0,0 +1,47 @@ > > +# Target options > > +BR2_arm=y > > +BR2_cortex_a7=y > > +BR2_ARM_FPU_NEON_VFPV4=y > > This ^^^ should be removed since NEON doesn't support complete FPU > standard API, so it's better to keep the default for BR2_cortex_a7 I will fix everything and post V2, but one thing I do not understand much is this one. For example both licheepi zero (v3s) and bananapi m2 plus (h3) should support NEON and VFP4 [1][2], but one has selected option BR2_ARM_FPU_VFPV4=y, while the other has default. Also pinecube (s3) supports both NEON/VFP4 [3]. Could you please give me a hint why some boards have this or other option enabled, while some keep default settings? Thank you for your time and patch review, Jan [1] https://linux-sunxi.org/V3s [2] https://linux-sunxi.org/H3 [3] https://linux-sunxi.org/S3 V Fri, Jul 29, 2022 at 12:28:53AM +0200, Giulio Benetti napsal(a): > Hi Jan, > > On 08/04/22 19:39, Jan Havran wrote: > > Add support for PineCube with: > > - U-Boot 2022.01 > > - Linux 5.15 > > Here I would briefly describe the board(various I/Os) and add a https > URL to the board official webpage if it exists. > > > Signed-off-by: Jan Havran <havran.jan@email.cz> > > --- > > DEVELOPERS | 4 +++ > > board/pine64/pinecube/boot.cmd | 6 ++++ > > board/pine64/pinecube/genimage.cfg | 34 +++++++++++++++++++++ > > board/pine64/pinecube/readme.txt | 31 ++++++++++++++++++++ > > configs/pinecube_defconfig | 47 ++++++++++++++++++++++++++++++ > > 5 files changed, 122 insertions(+) > > create mode 100644 board/pine64/pinecube/boot.cmd > > create mode 100644 board/pine64/pinecube/genimage.cfg > > create mode 100644 board/pine64/pinecube/readme.txt > > create mode 100644 configs/pinecube_defconfig > > > > diff --git a/DEVELOPERS b/DEVELOPERS > > index a66b9d7eee..d418a1af99 100644 > > --- a/DEVELOPERS > > +++ b/DEVELOPERS > > @@ -1356,6 +1356,10 @@ F: package/pangomm/ > > F: package/rpm/ > > F: package/yad/ > > +N: Jan Havran <havran.jan@email.cz> > > +F: board/pine64/pinecube/ > > +F: configs/pinecube_defconfig > > + > > N: Jan Heylen <jan.heylen@nokia.com> > > F: package/opentracing-cpp/ > > diff --git a/board/pine64/pinecube/boot.cmd b/board/pine64/pinecube/boot.cmd > > new file mode 100644 > > index 0000000000..d8b62e0b4a > > --- /dev/null > > +++ b/board/pine64/pinecube/boot.cmd > > @@ -0,0 +1,6 @@ > > +setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait rw > > + > > +fatload mmc 0 $kernel_addr_r zImage > > +fatload mmc 0 $fdt_addr_r sun8i-s3-pinecube.dtb > > + > > +bootz $kernel_addr_r - $fdt_addr_r > > The lastest boards use extlinux.conf instead of boot.cmd since it's > pretty easier to use it during debugging. So it's better to have > extlinux.conf here and when one finalize the project then it can create > the corresponding boot.cmd > > > diff --git a/board/pine64/pinecube/genimage.cfg b/board/pine64/pinecube/genimage.cfg > > new file mode 100644 > > index 0000000000..af175811ad > > --- /dev/null > > +++ b/board/pine64/pinecube/genimage.cfg > > @@ -0,0 +1,34 @@ > > +image boot.vfat { > > + vfat { > > + files = { > > + "zImage", > > + "sun8i-s3-pinecube.dtb", > > + "boot.scr" > > + } > > + } > > + > > + size = 8M > > +} > > + > > +image sdcard.img { > > + hdimage { > > + } > > + > > + partition u-boot { > > + in-partition-table = "no" > > + image = "u-boot-sunxi-with-spl.bin" > > + offset = 8K > > + size = 504K # 512KB - 8KB > > + } > > + > > + partition boot { > > + partition-type = 0xC > > + bootable = "true" > > + image = "boot.vfat" > > + } > > + > > + partition rootfs { > > + partition-type = 0x83 > > + image = "rootfs.ext4" > > + } > > +} > > diff --git a/board/pine64/pinecube/readme.txt b/board/pine64/pinecube/readme.txt > > new file mode 100644 > > index 0000000000..7770bbfe42 > > --- /dev/null > > +++ b/board/pine64/pinecube/readme.txt > > @@ -0,0 +1,31 @@ > > +Intro > > +===== > > + > > +This directory contains a Buildroot configuration for building a > > +Pine64 PineCube. > > + > > +Board homepage: https://www.pine64.org/cube/ > > +Board wiki: https://wiki.pine64.org/wiki/PineCube > > These ^^^ are the URLs I ask you for in commit log > > > + > > +How to build it > > +=============== > > + > > + $ make pinecube_defconfig > > + $ make > > + > > +Note: you will need access to the internet to download the required > > +sources. > > + > > +How to write the SD card > > +======================== > > + > > +Once the build process is finished you will have an image called "sdcard.img" > > +in the output/images/ directory. > > + > > +Copy the bootable "sdcard.img" onto an SD card with "dd": > > + > > + $ sudo dd if=output/images/sdcard.img of=/dev/sdX > > + $ sudo sync > > + > > +Insert the micro SDcard in your PineCube and power it up. The console > > +is on the serial port 2, 115200 8N1 (check Wiki for board pinout). > > diff --git a/configs/pinecube_defconfig b/configs/pinecube_defconfig > > Since this is a Pine64 board and you also use board/pine64/pinecube it's > better to rename pinecube_defconfig to pine64_pinecube_defconfig like > pine64_sopine_defconfig > > > new file mode 100644 > > index 0000000000..1064167d8e > > --- /dev/null > > +++ b/configs/pinecube_defconfig > > @@ -0,0 +1,47 @@ > > +# Target options > > +BR2_arm=y > > +BR2_cortex_a7=y > > +BR2_ARM_FPU_NEON_VFPV4=y > > This ^^^ should be removed since NEON doesn't support complete FPU > standard API, so it's better to keep the default for BR2_cortex_a7 > > > + > > +# Toolchain options > > +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_15=y > > + > > +# System configuration > > +BR2_TARGET_GENERIC_HOSTNAME="pinecube" > > +BR2_TARGET_GENERIC_ISSUE="Welcome to PINECUBE" > > "Welcome to Pine64 Pinecube" ^^^ > > > +BR2_SYSTEM_DHCP="eth0" > > +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" > > +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/pine64/pinecube/genimage.cfg" > > + > > +# Kernel > > +BR2_LINUX_KERNEL=y > > +BR2_LINUX_KERNEL_CUSTOM_VERSION=y > > +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.15" > > Here ^^^ please use latest stable 5.15.x version, now it's 5.15.57: > https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ > > and re-test it > > > +BR2_LINUX_KERNEL_DEFCONFIG="sunxi" > > +BR2_LINUX_KERNEL_DTS_SUPPORT=y > > +BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun8i-s3-pinecube" > > +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y > > + > > +# Filesystem > > +BR2_TARGET_ROOTFS_EXT2=y > > +BR2_TARGET_ROOTFS_EXT2_4=y > > + > > +# Bootloader > > +BR2_TARGET_UBOOT=y > > +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y > > +BR2_TARGET_UBOOT_CUSTOM_VERSION=y > > +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2022.01" > > +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="pinecube" > > +BR2_TARGET_UBOOT_NEEDS_DTC=y > > +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y > > +BR2_TARGET_UBOOT_NEEDS_OPENSSL=y > > +BR2_TARGET_UBOOT_SPL=y > > +BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" > > +BR2_PACKAGE_HOST_UBOOT_TOOLS=y > > +BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT=y > > +BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE="board/pine64/pinecube/boot.cmd" > > + > > +# Required host utilities for building an SDCard image > > +BR2_PACKAGE_HOST_DOSFSTOOLS=y > > +BR2_PACKAGE_HOST_GENIMAGE=y > > +BR2_PACKAGE_HOST_MTOOLS=y > > Here ^^^ remember to check which Host tool is needed after changing to > extlinux.conf > > Anyway I've built it successfully with Buildroot's utils/docker-run. > > Waiting for V2 patch then. > > Thank you! > > Best regards > -- > Giulio Benetti > Benetti Engineering sas > _______________________________________________ > buildroot mailing list > buildroot@buildroot.org > https://lists.buildroot.org/mailman/listinfo/buildroot _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH 1/1] board/pine64/pinecube: new board 2022-08-14 9:22 ` Jan Havran @ 2022-08-14 11:56 ` Giulio Benetti 2022-08-15 14:53 ` Yann E. MORIN 0 siblings, 1 reply; 6+ messages in thread From: Giulio Benetti @ 2022-08-14 11:56 UTC (permalink / raw) To: Jan Havran, buildroot; +Cc: Jagan Teki, Yann E . MORIN Hi Jan, Yann, On 14/08/22 11:22, Jan Havran wrote: > Hello Giulio, > >>> new file mode 100644 >>> index 0000000000..1064167d8e >>> --- /dev/null >>> +++ b/configs/pinecube_defconfig >>> @@ -0,0 +1,47 @@ >>> +# Target options >>> +BR2_arm=y >>> +BR2_cortex_a7=y >>> +BR2_ARM_FPU_NEON_VFPV4=y >> >> This ^^^ should be removed since NEON doesn't support complete FPU >> standard API, so it's better to keep the default for BR2_cortex_a7 > > I will fix everything and post V2, but one thing I do not understand much is > this one. Here there is a very good explanation on why not adding by default BR2_ARM_FPU_NEON_VFPV4: https://lists.buildroot.org/pipermail/buildroot/2022-January/634728.html > For example both licheepi zero (v3s) and bananapi m2 plus (h3) > should support NEON and VFP4 [1][2], but one has selected option > BR2_ARM_FPU_VFPV4=y, while the other has default. Also pinecube (s3) > supports both NEON/VFP4 [3]. Because of the explanation above no. NEON/VFPV4 is not compliant with IEEE 754 and unless you specify compiler's flag: -funsafe-math-optimizations NEON won't be used, but then VFPV4 neither from my understanding. But yes, if VFPV4 is supported then yes, it makes sense to enable it instead of keeping the default. So since this board is S3 based and it supports VFPV4 then you can enable: BR2_ARM_FPU_VFPV4 and same can go with H3 based boards I think. @Yann, what do you think about enabling VFPV4 on boards with SoCs that support VFPV4? (not NEON/VFPV4 of course) Best regards -- Giulio Benetti Benetti Engineering sas > > Could you please give me a hint why some boards have this or other option > enabled, while some keep default settings? > > Thank you for your time and patch review, > Jan > > [1] https://linux-sunxi.org/V3s > [2] https://linux-sunxi.org/H3 > [3] https://linux-sunxi.org/S3 > > V Fri, Jul 29, 2022 at 12:28:53AM +0200, Giulio Benetti napsal(a): >> Hi Jan, >> >> On 08/04/22 19:39, Jan Havran wrote: >>> Add support for PineCube with: >>> - U-Boot 2022.01 >>> - Linux 5.15 >> >> Here I would briefly describe the board(various I/Os) and add a https >> URL to the board official webpage if it exists. >> >>> Signed-off-by: Jan Havran <havran.jan@email.cz> >>> --- >>> DEVELOPERS | 4 +++ >>> board/pine64/pinecube/boot.cmd | 6 ++++ >>> board/pine64/pinecube/genimage.cfg | 34 +++++++++++++++++++++ >>> board/pine64/pinecube/readme.txt | 31 ++++++++++++++++++++ >>> configs/pinecube_defconfig | 47 ++++++++++++++++++++++++++++++ >>> 5 files changed, 122 insertions(+) >>> create mode 100644 board/pine64/pinecube/boot.cmd >>> create mode 100644 board/pine64/pinecube/genimage.cfg >>> create mode 100644 board/pine64/pinecube/readme.txt >>> create mode 100644 configs/pinecube_defconfig >>> >>> diff --git a/DEVELOPERS b/DEVELOPERS >>> index a66b9d7eee..d418a1af99 100644 >>> --- a/DEVELOPERS >>> +++ b/DEVELOPERS >>> @@ -1356,6 +1356,10 @@ F: package/pangomm/ >>> F: package/rpm/ >>> F: package/yad/ >>> +N: Jan Havran <havran.jan@email.cz> >>> +F: board/pine64/pinecube/ >>> +F: configs/pinecube_defconfig >>> + >>> N: Jan Heylen <jan.heylen@nokia.com> >>> F: package/opentracing-cpp/ >>> diff --git a/board/pine64/pinecube/boot.cmd b/board/pine64/pinecube/boot.cmd >>> new file mode 100644 >>> index 0000000000..d8b62e0b4a >>> --- /dev/null >>> +++ b/board/pine64/pinecube/boot.cmd >>> @@ -0,0 +1,6 @@ >>> +setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait rw >>> + >>> +fatload mmc 0 $kernel_addr_r zImage >>> +fatload mmc 0 $fdt_addr_r sun8i-s3-pinecube.dtb >>> + >>> +bootz $kernel_addr_r - $fdt_addr_r >> >> The lastest boards use extlinux.conf instead of boot.cmd since it's >> pretty easier to use it during debugging. So it's better to have >> extlinux.conf here and when one finalize the project then it can create >> the corresponding boot.cmd >> >>> diff --git a/board/pine64/pinecube/genimage.cfg b/board/pine64/pinecube/genimage.cfg >>> new file mode 100644 >>> index 0000000000..af175811ad >>> --- /dev/null >>> +++ b/board/pine64/pinecube/genimage.cfg >>> @@ -0,0 +1,34 @@ >>> +image boot.vfat { >>> + vfat { >>> + files = { >>> + "zImage", >>> + "sun8i-s3-pinecube.dtb", >>> + "boot.scr" >>> + } >>> + } >>> + >>> + size = 8M >>> +} >>> + >>> +image sdcard.img { >>> + hdimage { >>> + } >>> + >>> + partition u-boot { >>> + in-partition-table = "no" >>> + image = "u-boot-sunxi-with-spl.bin" >>> + offset = 8K >>> + size = 504K # 512KB - 8KB >>> + } >>> + >>> + partition boot { >>> + partition-type = 0xC >>> + bootable = "true" >>> + image = "boot.vfat" >>> + } >>> + >>> + partition rootfs { >>> + partition-type = 0x83 >>> + image = "rootfs.ext4" >>> + } >>> +} >>> diff --git a/board/pine64/pinecube/readme.txt b/board/pine64/pinecube/readme.txt >>> new file mode 100644 >>> index 0000000000..7770bbfe42 >>> --- /dev/null >>> +++ b/board/pine64/pinecube/readme.txt >>> @@ -0,0 +1,31 @@ >>> +Intro >>> +===== >>> + >>> +This directory contains a Buildroot configuration for building a >>> +Pine64 PineCube. >>> + >>> +Board homepage: https://www.pine64.org/cube/ >>> +Board wiki: https://wiki.pine64.org/wiki/PineCube >> >> These ^^^ are the URLs I ask you for in commit log >> >>> + >>> +How to build it >>> +=============== >>> + >>> + $ make pinecube_defconfig >>> + $ make >>> + >>> +Note: you will need access to the internet to download the required >>> +sources. >>> + >>> +How to write the SD card >>> +======================== >>> + >>> +Once the build process is finished you will have an image called "sdcard.img" >>> +in the output/images/ directory. >>> + >>> +Copy the bootable "sdcard.img" onto an SD card with "dd": >>> + >>> + $ sudo dd if=output/images/sdcard.img of=/dev/sdX >>> + $ sudo sync >>> + >>> +Insert the micro SDcard in your PineCube and power it up. The console >>> +is on the serial port 2, 115200 8N1 (check Wiki for board pinout). >>> diff --git a/configs/pinecube_defconfig b/configs/pinecube_defconfig >> >> Since this is a Pine64 board and you also use board/pine64/pinecube it's >> better to rename pinecube_defconfig to pine64_pinecube_defconfig like >> pine64_sopine_defconfig >> >>> new file mode 100644 >>> index 0000000000..1064167d8e >>> --- /dev/null >>> +++ b/configs/pinecube_defconfig >>> @@ -0,0 +1,47 @@ >>> +# Target options >>> +BR2_arm=y >>> +BR2_cortex_a7=y >>> +BR2_ARM_FPU_NEON_VFPV4=y >> >> This ^^^ should be removed since NEON doesn't support complete FPU >> standard API, so it's better to keep the default for BR2_cortex_a7 >> >>> + >>> +# Toolchain options >>> +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_15=y >>> + >>> +# System configuration >>> +BR2_TARGET_GENERIC_HOSTNAME="pinecube" >>> +BR2_TARGET_GENERIC_ISSUE="Welcome to PINECUBE" >> >> "Welcome to Pine64 Pinecube" ^^^ >> >>> +BR2_SYSTEM_DHCP="eth0" >>> +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" >>> +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/pine64/pinecube/genimage.cfg" >>> + >>> +# Kernel >>> +BR2_LINUX_KERNEL=y >>> +BR2_LINUX_KERNEL_CUSTOM_VERSION=y >>> +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.15" >> >> Here ^^^ please use latest stable 5.15.x version, now it's 5.15.57: >> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ >> >> and re-test it >> >>> +BR2_LINUX_KERNEL_DEFCONFIG="sunxi" >>> +BR2_LINUX_KERNEL_DTS_SUPPORT=y >>> +BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun8i-s3-pinecube" >>> +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y >>> + >>> +# Filesystem >>> +BR2_TARGET_ROOTFS_EXT2=y >>> +BR2_TARGET_ROOTFS_EXT2_4=y >>> + >>> +# Bootloader >>> +BR2_TARGET_UBOOT=y >>> +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y >>> +BR2_TARGET_UBOOT_CUSTOM_VERSION=y >>> +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2022.01" >>> +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="pinecube" >>> +BR2_TARGET_UBOOT_NEEDS_DTC=y >>> +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y >>> +BR2_TARGET_UBOOT_NEEDS_OPENSSL=y >>> +BR2_TARGET_UBOOT_SPL=y >>> +BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" >>> +BR2_PACKAGE_HOST_UBOOT_TOOLS=y >>> +BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT=y >>> +BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE="board/pine64/pinecube/boot.cmd" >>> + >>> +# Required host utilities for building an SDCard image >>> +BR2_PACKAGE_HOST_DOSFSTOOLS=y >>> +BR2_PACKAGE_HOST_GENIMAGE=y >>> +BR2_PACKAGE_HOST_MTOOLS=y >> >> Here ^^^ remember to check which Host tool is needed after changing to >> extlinux.conf >> >> Anyway I've built it successfully with Buildroot's utils/docker-run. >> >> Waiting for V2 patch then. >> >> Thank you! >> >> Best regards >> -- >> Giulio Benetti >> Benetti Engineering sas >> _______________________________________________ >> buildroot mailing list >> buildroot@buildroot.org >> https://lists.buildroot.org/mailman/listinfo/buildroot > _______________________________________________ > buildroot mailing list > buildroot@buildroot.org > https://lists.buildroot.org/mailman/listinfo/buildroot _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH 1/1] board/pine64/pinecube: new board 2022-08-14 11:56 ` Giulio Benetti @ 2022-08-15 14:53 ` Yann E. MORIN 2022-08-15 14:57 ` Giulio Benetti 0 siblings, 1 reply; 6+ messages in thread From: Yann E. MORIN @ 2022-08-15 14:53 UTC (permalink / raw) To: Giulio Benetti; +Cc: Jagan Teki, Jan Havran, buildroot Giulio, Jan, All, On 2022-08-14 13:56 +0200, Giulio Benetti spake thusly: > On 14/08/22 11:22, Jan Havran wrote: > >>>+++ b/configs/pinecube_defconfig > >>>+BR2_ARM_FPU_NEON_VFPV4=y > >>This ^^^ should be removed since NEON doesn't support complete FPU > >>standard API, so it's better to keep the default for BR2_cortex_a7 > >I will fix everything and post V2, but one thing I do not understand much is > >this one. > Here there is a very good explanation on why not adding by default > BR2_ARM_FPU_NEON_VFPV4: > https://lists.buildroot.org/pipermail/buildroot/2022-January/634728.html I even tink that, ultimately, we should just remove FPU options that also enable NEON, like BR2_ARM_FPU_NEON_VFPV4, because they do not make sense. Using NEON for floating-point arithmetics should probably left to a per-pacakge setting, where and when t makes sense for that package (e.g. math-intensive packages that can cope with incorrect results (like real-time audio stuff that favour an occasional glitch rather than a packet loss). [--SNIP--] > But yes, if VFPV4 is supported then yes, it makes sense to enable it > instead of keeping the default. So since this board is S3 based and > it supports VFPV4 then you can enable: > BR2_ARM_FPU_VFPV4 > > and same can go with H3 based boards I think. > > @Yann, what do you think about enabling VFPV4 on boards with SoCs > that support VFPV4? (not NEON/VFPV4 of course) Usually, defconfigs are very limited, and what we guarantee is very basic: a booting kernel with basic drivers, and busybox' login and shell. That does not use much floating-point instructions, so that would not benefit much from using a "better" FPU. I previously rejected the big series that bulk-converted all defconfigs in one go, because that was not tested on real hardware. But for a defconfig that was actually tested against real hardware, I think it is OK that it uses a "better" FPU. So, if the pinecube has a VFPv4, BR2_ARM_FPU_VFPV4 or BR2_ARM_FPU_VFPV4_D16 is OK. Also nte that BR2_ARM_FPU_VFPV4 will make use of all the 32 flaoting point registers, i.e. the full range, while BR2_ARM_FPU_VFPV4_D16 will only make use of 16 registers. Not all VFPv4 implementation have 32 registers, so carefully enable the appropriate one (_D16 is safe to use in either case, though). Regards, Yann E. MORIN. -- .-----------------.--------------------.------------------.--------------------. | 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@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH 1/1] board/pine64/pinecube: new board 2022-08-15 14:53 ` Yann E. MORIN @ 2022-08-15 14:57 ` Giulio Benetti 0 siblings, 0 replies; 6+ messages in thread From: Giulio Benetti @ 2022-08-15 14:57 UTC (permalink / raw) To: Yann E. MORIN; +Cc: buildroot, Jagan Teki, Jan Havran Hi Yann, > Il giorno 15 ago 2022, alle ore 16:53, Yann E. MORIN <yann.morin.1998@free.fr> ha scritto: > > Giulio, Jan, All, > > On 2022-08-14 13:56 +0200, Giulio Benetti spake thusly: >> On 14/08/22 11:22, Jan Havran wrote: >>>>> +++ b/configs/pinecube_defconfig >>>>> +BR2_ARM_FPU_NEON_VFPV4=y >>>> This ^^^ should be removed since NEON doesn't support complete FPU >>>> standard API, so it's better to keep the default for BR2_cortex_a7 >>> I will fix everything and post V2, but one thing I do not understand much is >>> this one. >> Here there is a very good explanation on why not adding by default >> BR2_ARM_FPU_NEON_VFPV4: >> https://lists.buildroot.org/pipermail/buildroot/2022-January/634728.html > > I even tink that, ultimately, we should just remove FPU options that > also enable NEON, like BR2_ARM_FPU_NEON_VFPV4, because they do not make > sense. I was wondering if sending a patchset for this, so I’m going to. Thank you Best regards Giulio > > Using NEON for floating-point arithmetics should probably left to a > per-pacakge setting, where and when t makes sense for that package (e.g. > math-intensive packages that can cope with incorrect results (like > real-time audio stuff that favour an occasional glitch rather than a > packet loss). > > [--SNIP--] >> But yes, if VFPV4 is supported then yes, it makes sense to enable it >> instead of keeping the default. So since this board is S3 based and >> it supports VFPV4 then you can enable: >> BR2_ARM_FPU_VFPV4 >> >> and same can go with H3 based boards I think. >> >> @Yann, what do you think about enabling VFPV4 on boards with SoCs >> that support VFPV4? (not NEON/VFPV4 of course) > > Usually, defconfigs are very limited, and what we guarantee is very > basic: a booting kernel with basic drivers, and busybox' login and > shell. That does not use much floating-point instructions, so that would > not benefit much from using a "better" FPU. > > I previously rejected the big series that bulk-converted all defconfigs > in one go, because that was not tested on real hardware. > > But for a defconfig that was actually tested against real hardware, I > think it is OK that it uses a "better" FPU. So, if the pinecube has a > VFPv4, BR2_ARM_FPU_VFPV4 or BR2_ARM_FPU_VFPV4_D16 is OK. > > Also nte that BR2_ARM_FPU_VFPV4 will make use of all the 32 flaoting > point registers, i.e. the full range, while BR2_ARM_FPU_VFPV4_D16 will > only make use of 16 registers. Not all VFPv4 implementation have 32 > registers, so carefully enable the appropriate one (_D16 is safe to use > in either case, though). > > Regards, > Yann E. MORIN. > > -- > .-----------------.--------------------.------------------.--------------------. > | 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@buildroot.org > https://lists.buildroot.org/mailman/listinfo/buildroot _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-08-15 14:57 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-04-08 17:39 [Buildroot] [PATCH 1/1] board/pine64/pinecube: new board Jan Havran 2022-07-28 22:28 ` Giulio Benetti 2022-08-14 9:22 ` Jan Havran 2022-08-14 11:56 ` Giulio Benetti 2022-08-15 14:53 ` Yann E. MORIN 2022-08-15 14:57 ` Giulio Benetti
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.