* [Buildroot] [PATCH] configs/bananapi_m2_berry: new defconfig
@ 2023-08-06 22:18 Giulio Benetti
2023-09-30 9:36 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 4+ messages in thread
From: Giulio Benetti @ 2023-08-06 22:18 UTC (permalink / raw)
To: buildroot; +Cc: Giulio Benetti, Jagan Teki
Add support for Bananapi M2 Berry board based on the Allwinner V40/A40i
SoC.
- U-Boot 2023.07
- Linux 6.1.38
Board specifications: https://wiki.banana-pi.org/Banana_Pi_BPI-M2_Berry
Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
DEVELOPERS | 1 +
board/bananapi/bananapi-m2-berry/boot.cmd | 7 ++++
board/bananapi/bananapi-m2-berry/genimage.cfg | 34 +++++++++++++++++
board/bananapi/bananapi-m2-berry/readme.txt | 35 ++++++++++++++++++
configs/bananapi_m2_berry_defconfig | 37 +++++++++++++++++++
5 files changed, 114 insertions(+)
create mode 100644 board/bananapi/bananapi-m2-berry/boot.cmd
create mode 100644 board/bananapi/bananapi-m2-berry/genimage.cfg
create mode 100644 board/bananapi/bananapi-m2-berry/readme.txt
create mode 100644 configs/bananapi_m2_berry_defconfig
diff --git a/DEVELOPERS b/DEVELOPERS
index 0f6cb75e0e..a24ceeb742 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1166,6 +1166,7 @@ F: board/freescale/imx6ullevk/
F: board/olimex/a*
F: configs/amarula_vyasa_rk3288_defconfig
F: configs/asus_tinker_rk3288_defconfig
+F: configs/bananapi_m2_berry_defconfig
F: configs/bananapi_m2_ultra_defconfig
F: configs/freescale_imx6ullevk_defconfig
F: configs/imx6ullevk_defconfig
diff --git a/board/bananapi/bananapi-m2-berry/boot.cmd b/board/bananapi/bananapi-m2-berry/boot.cmd
new file mode 100644
index 0000000000..a808fa0407
--- /dev/null
+++ b/board/bananapi/bananapi-m2-berry/boot.cmd
@@ -0,0 +1,7 @@
+setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait drm.debug=0xff
+
+mmc dev 0
+fatload mmc 0 $kernel_addr_r zImage
+fatload mmc 0 $fdt_addr_r sun8i-v40-bananapi-m2-berry.dtb
+
+bootz $kernel_addr_r - $fdt_addr_r
diff --git a/board/bananapi/bananapi-m2-berry/genimage.cfg b/board/bananapi/bananapi-m2-berry/genimage.cfg
new file mode 100644
index 0000000000..535f3dffee
--- /dev/null
+++ b/board/bananapi/bananapi-m2-berry/genimage.cfg
@@ -0,0 +1,34 @@
+image boot.vfat {
+ vfat {
+ files = {
+ "zImage",
+ "sun8i-v40-bananapi-m2-berry.dtb",
+ "boot.scr"
+ }
+ }
+
+ size = 64M
+}
+
+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"
+ }
+}
diff --git a/board/bananapi/bananapi-m2-berry/readme.txt b/board/bananapi/bananapi-m2-berry/readme.txt
new file mode 100644
index 0000000000..838675ed94
--- /dev/null
+++ b/board/bananapi/bananapi-m2-berry/readme.txt
@@ -0,0 +1,35 @@
+Intro
+=====
+
+This default configuration will allow you to start experimenting with the
+buildroot environment for the Bananapi M2 Berry. With the current
+configuration it will bring-up the board, and allow access through the
+serial console.
+
+Bananapi M2 Berry link:
+https://wiki.banana-pi.org/Banana_Pi_BPI-M2_Berry
+
+This configuration uses U-Boot mainline and kernel mainline.
+
+How to build
+============
+
+ $ make bananapi_m2_berry_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 Bananapi M2 Berry and power it up. The console
+is on the serial line, 115200 8N1.
diff --git a/configs/bananapi_m2_berry_defconfig b/configs/bananapi_m2_berry_defconfig
new file mode 100644
index 0000000000..95652e7939
--- /dev/null
+++ b/configs/bananapi_m2_berry_defconfig
@@ -0,0 +1,37 @@
+BR2_arm=y
+BR2_cortex_a7=y
+BR2_TOOLCHAIN_EXTERNAL=y
+BR2_TARGET_GENERIC_ISSUE="Welcome to Bananapi M2 Berry"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/bananapi/bananapi-m2-berry/genimage.cfg"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.1.38"
+BR2_LINUX_KERNEL_DEFCONFIG="sunxi"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun8i-v40-bananapi-m2-berry"
+BR2_PACKAGE_KMSCUBE=y
+BR2_PACKAGE_MESA3D=y
+BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_LIMA=y
+BR2_PACKAGE_MESA3D_OPENGL_EGL=y
+BR2_PACKAGE_MESA3D_OPENGL_ES=y
+BR2_PACKAGE_HTOP=y
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+# BR2_TARGET_ROOTFS_TAR is not set
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2023.07"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="bananapi_m2_berry"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y
+BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
+BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
+BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-sunxi-with-spl.bin"
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
+BR2_PACKAGE_HOST_UBOOT_TOOLS=y
+BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT=y
+BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE="board/bananapi/bananapi-m2-berry/boot.cmd"
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [Buildroot] [PATCH] configs/bananapi_m2_berry: new defconfig
2023-08-06 22:18 [Buildroot] [PATCH] configs/bananapi_m2_berry: new defconfig Giulio Benetti
@ 2023-09-30 9:36 ` Thomas Petazzoni via buildroot
2023-09-30 15:31 ` Giulio Benetti
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-09-30 9:36 UTC (permalink / raw)
To: Giulio Benetti; +Cc: Jagan Teki, buildroot
Hello,
On Mon, 7 Aug 2023 00:18:21 +0200
Giulio Benetti <giulio.benetti@benettiengineering.com> wrote:
> diff --git a/board/bananapi/bananapi-m2-berry/boot.cmd b/board/bananapi/bananapi-m2-berry/boot.cmd
> new file mode 100644
> index 0000000000..a808fa0407
> --- /dev/null
> +++ b/board/bananapi/bananapi-m2-berry/boot.cmd
> @@ -0,0 +1,7 @@
> +setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait drm.debug=0xff
I dropped earlyprintk and drm.debug=0xff from there, as it's really a
bit too much debugging oriented.
In any case, it'd be great to use extlinux.conf instead of this.
> diff --git a/configs/bananapi_m2_berry_defconfig b/configs/bananapi_m2_berry_defconfig
> new file mode 100644
> index 0000000000..95652e7939
> --- /dev/null
> +++ b/configs/bananapi_m2_berry_defconfig
> @@ -0,0 +1,37 @@
> +BR2_arm=y
> +BR2_cortex_a7=y
> +BR2_TOOLCHAIN_EXTERNAL=y
> +BR2_TARGET_GENERIC_ISSUE="Welcome to Bananapi M2 Berry"
> +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
> +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/bananapi/bananapi-m2-berry/genimage.cfg"
> +BR2_LINUX_KERNEL=y
> +BR2_LINUX_KERNEL_CUSTOM_VERSION=y
> +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.1.38"
> +BR2_LINUX_KERNEL_DEFCONFIG="sunxi"
> +BR2_LINUX_KERNEL_DTS_SUPPORT=y
> +BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun8i-v40-bananapi-m2-berry"
> +BR2_PACKAGE_KMSCUBE=y
> +BR2_PACKAGE_MESA3D=y
> +BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_LIMA=y
> +BR2_PACKAGE_MESA3D_OPENGL_EGL=y
> +BR2_PACKAGE_MESA3D_OPENGL_ES=y
> +BR2_PACKAGE_HTOP=y
I dropped kmscube, mesa3d and htop, because they don't qualify for a
minimal configuration.
Applied with those changes.
Best regards,
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Buildroot] [PATCH] configs/bananapi_m2_berry: new defconfig
2023-09-30 9:36 ` Thomas Petazzoni via buildroot
@ 2023-09-30 15:31 ` Giulio Benetti
2023-09-30 20:29 ` Giulio Benetti
0 siblings, 1 reply; 4+ messages in thread
From: Giulio Benetti @ 2023-09-30 15:31 UTC (permalink / raw)
To: Thomas Petazzoni; +Cc: Jagan Teki, buildroot
> Il giorno 30 set 2023, alle ore 11:37, Thomas Petazzoni <thomas.petazzoni@bootlin.com> ha scritto:
>
> Hello,
>
>> On Mon, 7 Aug 2023 00:18:21 +0200
>> Giulio Benetti <giulio.benetti@benettiengineering.com> wrote:
>>
>>
>> diff --git a/board/bananapi/bananapi-m2-berry/boot.cmd b/board/bananapi/bananapi-m2-berry/boot.cmd
>> new file mode 100644
>> index 0000000000..a808fa0407
>> --- /dev/null
>> +++ b/board/bananapi/bananapi-m2-berry/boot.cmd
>> @@ -0,0 +1,7 @@
>> +setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait drm.debug=0xff
>
> I dropped earlyprintk and drm.debug=0xff from there, as it's really a
> bit too much debugging oriented.
>
> In any case, it'd be great to use extlinux.conf instead of this.
>
>> diff --git a/configs/bananapi_m2_berry_defconfig b/configs/bananapi_m2_berry_defconfig
>> new file mode 100644
>> index 0000000000..95652e7939
>> --- /dev/null
>> +++ b/configs/bananapi_m2_berry_defconfig
>> @@ -0,0 +1,37 @@
>> +BR2_arm=y
>> +BR2_cortex_a7=y
>> +BR2_TOOLCHAIN_EXTERNAL=y
>> +BR2_TARGET_GENERIC_ISSUE="Welcome to Bananapi M2 Berry"
>> +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
>> +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/bananapi/bananapi-m2-berry/genimage.cfg"
>> +BR2_LINUX_KERNEL=y
>> +BR2_LINUX_KERNEL_CUSTOM_VERSION=y
>> +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.1.38"
>> +BR2_LINUX_KERNEL_DEFCONFIG="sunxi"
>> +BR2_LINUX_KERNEL_DTS_SUPPORT=y
>> +BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun8i-v40-bananapi-m2-berry"
>> +BR2_PACKAGE_KMSCUBE=y
>> +BR2_PACKAGE_MESA3D=y
>> +BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_LIMA=y
>> +BR2_PACKAGE_MESA3D_OPENGL_EGL=y
>> +BR2_PACKAGE_MESA3D_OPENGL_ES=y
>> +BR2_PACKAGE_HTOP=y
>
> I dropped kmscube, mesa3d and htop, because they don't qualify for a
> minimal configuration.
>
> Applied with those changes.
Thank you Thomas, I’ve forgotten all those points because I was debugging Lima on V40.
Best regards
Giulio
>
> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, co-owner and CEO, Bootlin
> Embedded Linux and Kernel engineering and training
> https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Buildroot] [PATCH] configs/bananapi_m2_berry: new defconfig
2023-09-30 15:31 ` Giulio Benetti
@ 2023-09-30 20:29 ` Giulio Benetti
0 siblings, 0 replies; 4+ messages in thread
From: Giulio Benetti @ 2023-09-30 20:29 UTC (permalink / raw)
To: Thomas Petazzoni; +Cc: Jagan Teki, buildroot
On 30/09/23 17:31, Giulio Benetti wrote:
>
>> Il giorno 30 set 2023, alle ore 11:37, Thomas Petazzoni <thomas.petazzoni@bootlin.com> ha scritto:
>>
>> Hello,
>>
>>> On Mon, 7 Aug 2023 00:18:21 +0200
>>> Giulio Benetti <giulio.benetti@benettiengineering.com> wrote:
>>>
>>>
>>> diff --git a/board/bananapi/bananapi-m2-berry/boot.cmd b/board/bananapi/bananapi-m2-berry/boot.cmd
>>> new file mode 100644
>>> index 0000000000..a808fa0407
>>> --- /dev/null
>>> +++ b/board/bananapi/bananapi-m2-berry/boot.cmd
>>> @@ -0,0 +1,7 @@
>>> +setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait drm.debug=0xff
>>
>> I dropped earlyprintk and drm.debug=0xff from there, as it's really a
>> bit too much debugging oriented.
>>
>> In any case, it'd be great to use extlinux.conf instead of this.
and yes, I will substitute with extlinux.conf, it's very useful for
developing/modifying at runtime/reboot.
--
Giulio Benetti
CEO&CTO@Benetti Engineering sas
>>> diff --git a/configs/bananapi_m2_berry_defconfig b/configs/bananapi_m2_berry_defconfig
>>> new file mode 100644
>>> index 0000000000..95652e7939
>>> --- /dev/null
>>> +++ b/configs/bananapi_m2_berry_defconfig
>>> @@ -0,0 +1,37 @@
>>> +BR2_arm=y
>>> +BR2_cortex_a7=y
>>> +BR2_TOOLCHAIN_EXTERNAL=y
>>> +BR2_TARGET_GENERIC_ISSUE="Welcome to Bananapi M2 Berry"
>>> +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
>>> +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/bananapi/bananapi-m2-berry/genimage.cfg"
>>> +BR2_LINUX_KERNEL=y
>>> +BR2_LINUX_KERNEL_CUSTOM_VERSION=y
>>> +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.1.38"
>>> +BR2_LINUX_KERNEL_DEFCONFIG="sunxi"
>>> +BR2_LINUX_KERNEL_DTS_SUPPORT=y
>>> +BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun8i-v40-bananapi-m2-berry"
>>> +BR2_PACKAGE_KMSCUBE=y
>>> +BR2_PACKAGE_MESA3D=y
>>> +BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_LIMA=y
>>> +BR2_PACKAGE_MESA3D_OPENGL_EGL=y
>>> +BR2_PACKAGE_MESA3D_OPENGL_ES=y
>>> +BR2_PACKAGE_HTOP=y
>>
>> I dropped kmscube, mesa3d and htop, because they don't qualify for a
>> minimal configuration.
>>
>> Applied with those changes.
>
> Thank you Thomas, I’ve forgotten all those points because I was debugging Lima on V40.
>
> Best regards
> Giulio
>
>>
>> Best regards,
>>
>> Thomas
>> --
>> Thomas Petazzoni, co-owner and CEO, Bootlin
>> Embedded Linux and Kernel engineering and training
>> https://bootlin.com
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-09-30 20:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-06 22:18 [Buildroot] [PATCH] configs/bananapi_m2_berry: new defconfig Giulio Benetti
2023-09-30 9:36 ` Thomas Petazzoni via buildroot
2023-09-30 15:31 ` Giulio Benetti
2023-09-30 20:29 ` Giulio Benetti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox