All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCHv2 1/2] configs/raspberrypi: change deprecated pi3-miniuart-bt option to miniuart-bt
@ 2019-12-03 13:26 Arthur Courtel
  2019-12-03 13:26 ` [Buildroot] [PATCHv2 2/2] configs: add raspberrypi4 64bits defconfig Arthur Courtel
  2019-12-03 20:12 ` [Buildroot] [PATCHv2 1/2] configs/raspberrypi: change deprecated pi3-miniuart-bt option to miniuart-bt Peter Seiderer
  0 siblings, 2 replies; 6+ messages in thread
From: Arthur Courtel @ 2019-12-03 13:26 UTC (permalink / raw)
  To: buildroot

This option will be used in RPI4 config in order to have a working serial port on gpios.
This change makes this option not only RPI3 specific.

Signed-off-by: Arthur Courtel <arthur.courtel@smile.fr>
---
 board/raspberrypi/post-image.sh      | 8 ++++----
 board/raspberrypi/readme.txt         | 2 +-
 configs/raspberrypi3_64_defconfig    | 2 +-
 configs/raspberrypi3_defconfig       | 2 +-
 configs/raspberrypi3_qt5we_defconfig | 2 +-
 configs/raspberrypi4_defconfig       | 2 +-
 6 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/board/raspberrypi/post-image.sh b/board/raspberrypi/post-image.sh
index bbeb0bc721..9dbd98ef9b 100755
--- a/board/raspberrypi/post-image.sh
+++ b/board/raspberrypi/post-image.sh
@@ -10,13 +10,13 @@ GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
 for arg in "$@"
 do
 	case "${arg}" in
-		--add-pi3-miniuart-bt-overlay)
+		--add-miniuart-bt-overlay)
 		if ! grep -qE '^dtoverlay=' "${BINARIES_DIR}/rpi-firmware/config.txt"; then
-			echo "Adding 'dtoverlay=pi3-miniuart-bt' to config.txt (fixes ttyAMA0 serial console)."
+			echo "Adding 'dtoverlay=miniuart-bt' to config.txt (fixes ttyAMA0 serial console)."
 			cat << __EOF__ >> "${BINARIES_DIR}/rpi-firmware/config.txt"
 
-# fixes rpi3 ttyAMA0 serial console
-dtoverlay=pi3-miniuart-bt
+# fixes rpi (3B, 3B+, 3A+, 4B and Zero W) ttyAMA0 serial console
+dtoverlay=miniuart-bt
 __EOF__
 		fi
 		;;
diff --git a/board/raspberrypi/readme.txt b/board/raspberrypi/readme.txt
index 69c9f9b20a..8b3de6d251 100644
--- a/board/raspberrypi/readme.txt
+++ b/board/raspberrypi/readme.txt
@@ -78,7 +78,7 @@ After building, you should obtain this tree:
 [1] Not all of them will be present, depending on the RaspberryPi
     model you are using.
 
-[2] Only for the Raspberry Pi 3/4 Models (overlay pi3-miniuart-bt is needed
+[2] Only for the Raspberry Pi 3/4 Models (overlay miniuart-bt is needed
     to enable the RPi3 serial console otherwise occupied by the bluetooth
     chip). Alternative would be to disable the serial console in cmdline.txt
     and /etc/inittab.
diff --git a/configs/raspberrypi3_64_defconfig b/configs/raspberrypi3_64_defconfig
index 27141f364e..b9a070fb82 100644
--- a/configs/raspberrypi3_64_defconfig
+++ b/configs/raspberrypi3_64_defconfig
@@ -35,4 +35,4 @@ BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
 # BR2_TARGET_ROOTFS_TAR is not set
 BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi3-64/post-build.sh"
 BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi3-64/post-image.sh"
-BR2_ROOTFS_POST_SCRIPT_ARGS="--aarch64 --add-pi3-miniuart-bt-overlay"
+BR2_ROOTFS_POST_SCRIPT_ARGS="--aarch64 --add-miniuart-bt-overlay"
diff --git a/configs/raspberrypi3_defconfig b/configs/raspberrypi3_defconfig
index 01aa239805..530eb0ab3f 100644
--- a/configs/raspberrypi3_defconfig
+++ b/configs/raspberrypi3_defconfig
@@ -34,4 +34,4 @@ BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
 # BR2_TARGET_ROOTFS_TAR is not set
 BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi3/post-build.sh"
 BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi3/post-image.sh"
-BR2_ROOTFS_POST_SCRIPT_ARGS="--add-pi3-miniuart-bt-overlay"
+BR2_ROOTFS_POST_SCRIPT_ARGS="--add-miniuart-bt-overlay"
diff --git a/configs/raspberrypi3_qt5we_defconfig b/configs/raspberrypi3_qt5we_defconfig
index 775eb9114e..21c5d1dc4c 100644
--- a/configs/raspberrypi3_qt5we_defconfig
+++ b/configs/raspberrypi3_qt5we_defconfig
@@ -48,4 +48,4 @@ BR2_TARGET_ROOTFS_EXT2_SIZE="360M"
 BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
 BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi3/post-build.sh"
 BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi3/post-image.sh"
-BR2_ROOTFS_POST_SCRIPT_ARGS="--add-pi3-miniuart-bt-overlay --gpu_mem_1024=200"
+BR2_ROOTFS_POST_SCRIPT_ARGS="--add-miniuart-bt-overlay --gpu_mem_1024=200"
diff --git a/configs/raspberrypi4_defconfig b/configs/raspberrypi4_defconfig
index 6eea0ca816..a216463e28 100644
--- a/configs/raspberrypi4_defconfig
+++ b/configs/raspberrypi4_defconfig
@@ -35,4 +35,4 @@ BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
 # BR2_TARGET_ROOTFS_TAR is not set
 BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi4/post-build.sh"
 BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi4/post-image.sh"
-BR2_ROOTFS_POST_SCRIPT_ARGS="--add-pi3-miniuart-bt-overlay"
+BR2_ROOTFS_POST_SCRIPT_ARGS="--add-miniuart-bt-overlay"
-- 
2.23.0

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

* [Buildroot] [PATCHv2 2/2] configs: add raspberrypi4 64bits defconfig
  2019-12-03 13:26 [Buildroot] [PATCHv2 1/2] configs/raspberrypi: change deprecated pi3-miniuart-bt option to miniuart-bt Arthur Courtel
@ 2019-12-03 13:26 ` Arthur Courtel
  2019-12-03 20:16   ` Peter Seiderer
  2019-12-03 20:12 ` [Buildroot] [PATCHv2 1/2] configs/raspberrypi: change deprecated pi3-miniuart-bt option to miniuart-bt Peter Seiderer
  1 sibling, 1 reply; 6+ messages in thread
From: Arthur Courtel @ 2019-12-03 13:26 UTC (permalink / raw)
  To: buildroot

This configuration builds a 64bit image for RaspberryPi 4.

Signed-off-by: Arthur Courtel <arthur.courtel@smile.fr>
---
 .../raspberrypi/genimage-raspberrypi4-64.cfg  | 30 +++++++++++++++
 board/raspberrypi4-64                         |  1 +
 configs/raspberrypi4_64_defconfig             | 37 +++++++++++++++++++
 3 files changed, 68 insertions(+)
 create mode 100644 board/raspberrypi/genimage-raspberrypi4-64.cfg
 create mode 120000 board/raspberrypi4-64
 create mode 100644 configs/raspberrypi4_64_defconfig

diff --git a/board/raspberrypi/genimage-raspberrypi4-64.cfg b/board/raspberrypi/genimage-raspberrypi4-64.cfg
new file mode 100644
index 0000000000..3c480e98f0
--- /dev/null
+++ b/board/raspberrypi/genimage-raspberrypi4-64.cfg
@@ -0,0 +1,30 @@
+image boot.vfat {
+  vfat {
+    files = {
+      "bcm2711-rpi-4-b.dtb",
+      "rpi-firmware/cmdline.txt",
+      "rpi-firmware/config.txt",
+      "rpi-firmware/fixup4.dat",
+      "rpi-firmware/start4.elf",
+      "rpi-firmware/overlays",
+      "Image"
+    }
+  }
+  size = 32M
+}
+
+image sdcard.img {
+  hdimage {
+  }
+
+  partition boot {
+    partition-type = 0xC
+    bootable = "true"
+    image = "boot.vfat"
+  }
+
+  partition rootfs {
+    partition-type = 0x83
+    image = "rootfs.ext4"
+  }
+}
diff --git a/board/raspberrypi4-64 b/board/raspberrypi4-64
new file mode 120000
index 0000000000..fcdafc81ed
--- /dev/null
+++ b/board/raspberrypi4-64
@@ -0,0 +1 @@
+raspberrypi
\ No newline at end of file
diff --git a/configs/raspberrypi4_64_defconfig b/configs/raspberrypi4_64_defconfig
new file mode 100644
index 0000000000..c88923d507
--- /dev/null
+++ b/configs/raspberrypi4_64_defconfig
@@ -0,0 +1,37 @@
+BR2_aarch64=y
+BR2_cortex_a72=y
+
+BR2_TOOLCHAIN_BUILDROOT_CXX=y
+
+BR2_SYSTEM_DHCP="eth0"
+
+# Linux headers same as kernel, a 4.19 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y
+
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
+BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,raspberrypi-kernel_1.20190819-1)/linux-raspberrypi-kernel_1.20190819-1.tar.gz"
+BR2_LINUX_KERNEL_DEFCONFIG="bcm2711"
+
+# Build the DTB from the kernel sources
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="broadcom/bcm2711-rpi-4-b"
+
+BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
+
+BR2_PACKAGE_RPI_FIRMWARE=y
+BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4=y
+
+# Required tools to create the SD image
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
+
+# Filesystem / image
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
+# BR2_TARGET_ROOTFS_TAR is not set
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi4-64/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi4-64/post-image.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="--add-miniuart-bt-overlay --aarch64"
-- 
2.23.0

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

* [Buildroot] [PATCHv2 1/2] configs/raspberrypi: change deprecated pi3-miniuart-bt option to miniuart-bt
  2019-12-03 13:26 [Buildroot] [PATCHv2 1/2] configs/raspberrypi: change deprecated pi3-miniuart-bt option to miniuart-bt Arthur Courtel
  2019-12-03 13:26 ` [Buildroot] [PATCHv2 2/2] configs: add raspberrypi4 64bits defconfig Arthur Courtel
@ 2019-12-03 20:12 ` Peter Seiderer
  2019-12-03 20:46   ` Arnout Vandecappelle
  1 sibling, 1 reply; 6+ messages in thread
From: Peter Seiderer @ 2019-12-03 20:12 UTC (permalink / raw)
  To: buildroot

Hello Arthur,

thanks for the patch, one nitpick below...

On Tue,  3 Dec 2019 14:26:57 +0100, Arthur Courtel <arthur.courtel@smile.fr> wrote:

> This option will be used in RPI4 config in order to have a working serial port on gpios.
> This change makes this option not only RPI3 specific.
>
> Signed-off-by: Arthur Courtel <arthur.courtel@smile.fr>
> ---
>  board/raspberrypi/post-image.sh      | 8 ++++----
>  board/raspberrypi/readme.txt         | 2 +-
>  configs/raspberrypi3_64_defconfig    | 2 +-
>  configs/raspberrypi3_defconfig       | 2 +-
>  configs/raspberrypi3_qt5we_defconfig | 2 +-
>  configs/raspberrypi4_defconfig       | 2 +-
>  6 files changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/board/raspberrypi/post-image.sh b/board/raspberrypi/post-image.sh
> index bbeb0bc721..9dbd98ef9b 100755
> --- a/board/raspberrypi/post-image.sh
> +++ b/board/raspberrypi/post-image.sh
> @@ -10,13 +10,13 @@ GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
>  for arg in "$@"
>  do
>  	case "${arg}" in
> -		--add-pi3-miniuart-bt-overlay)
> +		--add-miniuart-bt-overlay)

Maybe keep additional the legacy '--add-pi3-miniuart-bt-overlay' option for people
using old custom config files?

Will do a short (pi3 only) test the next days...

Regards,
Peter

>  		if ! grep -qE '^dtoverlay=' "${BINARIES_DIR}/rpi-firmware/config.txt"; then
> -			echo "Adding 'dtoverlay=pi3-miniuart-bt' to config.txt (fixes ttyAMA0 serial console)."
> +			echo "Adding 'dtoverlay=miniuart-bt' to config.txt (fixes ttyAMA0 serial console)."
>  			cat << __EOF__ >> "${BINARIES_DIR}/rpi-firmware/config.txt"
>
> -# fixes rpi3 ttyAMA0 serial console
> -dtoverlay=pi3-miniuart-bt
> +# fixes rpi (3B, 3B+, 3A+, 4B and Zero W) ttyAMA0 serial console
> +dtoverlay=miniuart-bt
>  __EOF__
>  		fi
>  		;;
> diff --git a/board/raspberrypi/readme.txt b/board/raspberrypi/readme.txt
> index 69c9f9b20a..8b3de6d251 100644
> --- a/board/raspberrypi/readme.txt
> +++ b/board/raspberrypi/readme.txt
> @@ -78,7 +78,7 @@ After building, you should obtain this tree:
>  [1] Not all of them will be present, depending on the RaspberryPi
>      model you are using.
>
> -[2] Only for the Raspberry Pi 3/4 Models (overlay pi3-miniuart-bt is needed
> +[2] Only for the Raspberry Pi 3/4 Models (overlay miniuart-bt is needed
>      to enable the RPi3 serial console otherwise occupied by the bluetooth
>      chip). Alternative would be to disable the serial console in cmdline.txt
>      and /etc/inittab.
> diff --git a/configs/raspberrypi3_64_defconfig b/configs/raspberrypi3_64_defconfig
> index 27141f364e..b9a070fb82 100644
> --- a/configs/raspberrypi3_64_defconfig
> +++ b/configs/raspberrypi3_64_defconfig
> @@ -35,4 +35,4 @@ BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
>  # BR2_TARGET_ROOTFS_TAR is not set
>  BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi3-64/post-build.sh"
>  BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi3-64/post-image.sh"
> -BR2_ROOTFS_POST_SCRIPT_ARGS="--aarch64 --add-pi3-miniuart-bt-overlay"
> +BR2_ROOTFS_POST_SCRIPT_ARGS="--aarch64 --add-miniuart-bt-overlay"
> diff --git a/configs/raspberrypi3_defconfig b/configs/raspberrypi3_defconfig
> index 01aa239805..530eb0ab3f 100644
> --- a/configs/raspberrypi3_defconfig
> +++ b/configs/raspberrypi3_defconfig
> @@ -34,4 +34,4 @@ BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
>  # BR2_TARGET_ROOTFS_TAR is not set
>  BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi3/post-build.sh"
>  BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi3/post-image.sh"
> -BR2_ROOTFS_POST_SCRIPT_ARGS="--add-pi3-miniuart-bt-overlay"
> +BR2_ROOTFS_POST_SCRIPT_ARGS="--add-miniuart-bt-overlay"
> diff --git a/configs/raspberrypi3_qt5we_defconfig b/configs/raspberrypi3_qt5we_defconfig
> index 775eb9114e..21c5d1dc4c 100644
> --- a/configs/raspberrypi3_qt5we_defconfig
> +++ b/configs/raspberrypi3_qt5we_defconfig
> @@ -48,4 +48,4 @@ BR2_TARGET_ROOTFS_EXT2_SIZE="360M"
>  BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
>  BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi3/post-build.sh"
>  BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi3/post-image.sh"
> -BR2_ROOTFS_POST_SCRIPT_ARGS="--add-pi3-miniuart-bt-overlay --gpu_mem_1024=200"
> +BR2_ROOTFS_POST_SCRIPT_ARGS="--add-miniuart-bt-overlay --gpu_mem_1024=200"
> diff --git a/configs/raspberrypi4_defconfig b/configs/raspberrypi4_defconfig
> index 6eea0ca816..a216463e28 100644
> --- a/configs/raspberrypi4_defconfig
> +++ b/configs/raspberrypi4_defconfig
> @@ -35,4 +35,4 @@ BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
>  # BR2_TARGET_ROOTFS_TAR is not set
>  BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi4/post-build.sh"
>  BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi4/post-image.sh"
> -BR2_ROOTFS_POST_SCRIPT_ARGS="--add-pi3-miniuart-bt-overlay"
> +BR2_ROOTFS_POST_SCRIPT_ARGS="--add-miniuart-bt-overlay"

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

* [Buildroot] [PATCHv2 2/2] configs: add raspberrypi4 64bits defconfig
  2019-12-03 13:26 ` [Buildroot] [PATCHv2 2/2] configs: add raspberrypi4 64bits defconfig Arthur Courtel
@ 2019-12-03 20:16   ` Peter Seiderer
  2019-12-04  9:55     ` Arthur COURTEL
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Seiderer @ 2019-12-03 20:16 UTC (permalink / raw)
  To: buildroot

Hello Arthur,

On Tue,  3 Dec 2019 14:26:58 +0100, Arthur Courtel <arthur.courtel@smile.fr> wrote:

> This configuration builds a 64bit image for RaspberryPi 4.
>
> Signed-off-by: Arthur Courtel <arthur.courtel@smile.fr>
> ---
>  .../raspberrypi/genimage-raspberrypi4-64.cfg  | 30 +++++++++++++++
>  board/raspberrypi4-64                         |  1 +
>  configs/raspberrypi4_64_defconfig             | 37 +++++++++++++++++++
>  3 files changed, 68 insertions(+)
>  create mode 100644 board/raspberrypi/genimage-raspberrypi4-64.cfg
>  create mode 120000 board/raspberrypi4-64
>  create mode 100644 configs/raspberrypi4_64_defconfig
>
> diff --git a/board/raspberrypi/genimage-raspberrypi4-64.cfg b/board/raspberrypi/genimage-raspberrypi4-64.cfg
> new file mode 100644
> index 0000000000..3c480e98f0
> --- /dev/null
> +++ b/board/raspberrypi/genimage-raspberrypi4-64.cfg
> @@ -0,0 +1,30 @@
> +image boot.vfat {
> +  vfat {
> +    files = {
> +      "bcm2711-rpi-4-b.dtb",
> +      "rpi-firmware/cmdline.txt",
> +      "rpi-firmware/config.txt",
> +      "rpi-firmware/fixup4.dat",
> +      "rpi-firmware/start4.elf",
> +      "rpi-firmware/overlays",
> +      "Image"
> +    }
> +  }
> +  size = 32M
> +}
> +
> +image sdcard.img {
> +  hdimage {
> +  }
> +
> +  partition boot {
> +    partition-type = 0xC
> +    bootable = "true"
> +    image = "boot.vfat"
> +  }
> +
> +  partition rootfs {
> +    partition-type = 0x83
> +    image = "rootfs.ext4"
> +  }
> +}
> diff --git a/board/raspberrypi4-64 b/board/raspberrypi4-64
> new file mode 120000
> index 0000000000..fcdafc81ed
> --- /dev/null
> +++ b/board/raspberrypi4-64
> @@ -0,0 +1 @@
> +raspberrypi
> \ No newline at end of file
> diff --git a/configs/raspberrypi4_64_defconfig b/configs/raspberrypi4_64_defconfig
> new file mode 100644
> index 0000000000..c88923d507
> --- /dev/null
> +++ b/configs/raspberrypi4_64_defconfig
> @@ -0,0 +1,37 @@
> +BR2_aarch64=y
> +BR2_cortex_a72=y
> +
> +BR2_TOOLCHAIN_BUILDROOT_CXX=y
> +
> +BR2_SYSTEM_DHCP="eth0"
> +
> +# Linux headers same as kernel, a 4.19 series
> +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y
> +
> +BR2_LINUX_KERNEL=y
> +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
> +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,raspberrypi-kernel_1.20190819-1)/linux-raspberrypi-kernel_1.20190819-1.tar.gz"
> +BR2_LINUX_KERNEL_DEFCONFIG="bcm2711"
> +
> +# Build the DTB from the kernel sources
> +BR2_LINUX_KERNEL_DTS_SUPPORT=y
> +BR2_LINUX_KERNEL_INTREE_DTS_NAME="broadcom/bcm2711-rpi-4-b"

No chance to test myself for pi4 (because of lack of hardware yet), but I believe
BR2_LINUX_KERNEL_DTB_OVERLAY_SUPPORT=y is needed for an 64-bit kernel, see
[1] and [2] for pi3...

Regards,
Peter

[1] https://git.buildroot.net/buildroot/commit/?id=2aa92335cdc5f71c2d09391dc49fcf3c7627d6f0
[2] https://git.buildroot.net/buildroot/commit/?id=e747d33bd9d319481a67a376c97e5100dd93f62a

> +
> +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
> +
> +BR2_PACKAGE_RPI_FIRMWARE=y
> +BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4=y
> +
> +# Required tools to create the SD image
> +BR2_PACKAGE_HOST_DOSFSTOOLS=y
> +BR2_PACKAGE_HOST_GENIMAGE=y
> +BR2_PACKAGE_HOST_MTOOLS=y
> +
> +# Filesystem / image
> +BR2_TARGET_ROOTFS_EXT2=y
> +BR2_TARGET_ROOTFS_EXT2_4=y
> +BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
> +# BR2_TARGET_ROOTFS_TAR is not set
> +BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi4-64/post-build.sh"
> +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi4-64/post-image.sh"
> +BR2_ROOTFS_POST_SCRIPT_ARGS="--add-miniuart-bt-overlay --aarch64"

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

* [Buildroot] [PATCHv2 1/2] configs/raspberrypi: change deprecated pi3-miniuart-bt option to miniuart-bt
  2019-12-03 20:12 ` [Buildroot] [PATCHv2 1/2] configs/raspberrypi: change deprecated pi3-miniuart-bt option to miniuart-bt Peter Seiderer
@ 2019-12-03 20:46   ` Arnout Vandecappelle
  0 siblings, 0 replies; 6+ messages in thread
From: Arnout Vandecappelle @ 2019-12-03 20:46 UTC (permalink / raw)
  To: buildroot



On 03/12/2019 21:12, Peter Seiderer wrote:
> Hello Arthur,
> 
> thanks for the patch, one nitpick below...
> 
> On Tue,  3 Dec 2019 14:26:57 +0100, Arthur Courtel <arthur.courtel@smile.fr> wrote:
> 
>> This option will be used in RPI4 config in order to have a working serial port on gpios.
>> This change makes this option not only RPI3 specific.
>>
>> Signed-off-by: Arthur Courtel <arthur.courtel@smile.fr>
>> ---
>>  board/raspberrypi/post-image.sh      | 8 ++++----
>>  board/raspberrypi/readme.txt         | 2 +-
>>  configs/raspberrypi3_64_defconfig    | 2 +-
>>  configs/raspberrypi3_defconfig       | 2 +-
>>  configs/raspberrypi3_qt5we_defconfig | 2 +-
>>  configs/raspberrypi4_defconfig       | 2 +-
>>  6 files changed, 9 insertions(+), 9 deletions(-)
>>
>> diff --git a/board/raspberrypi/post-image.sh b/board/raspberrypi/post-image.sh
>> index bbeb0bc721..9dbd98ef9b 100755
>> --- a/board/raspberrypi/post-image.sh
>> +++ b/board/raspberrypi/post-image.sh
>> @@ -10,13 +10,13 @@ GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
>>  for arg in "$@"
>>  do
>>  	case "${arg}" in
>> -		--add-pi3-miniuart-bt-overlay)
>> +		--add-miniuart-bt-overlay)
> Maybe keep additional the legacy '--add-pi3-miniuart-bt-overlay' option for people
> using old custom config files?

 I don't think we need to do that. Everything in board/ is supposed to be
internal. If you use one of our defconfigs as inspiration for your own custom
config, you should copy all the support stuff as well.

 Regards,
 Arnout

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

* [Buildroot] [PATCHv2 2/2] configs: add raspberrypi4 64bits defconfig
  2019-12-03 20:16   ` Peter Seiderer
@ 2019-12-04  9:55     ` Arthur COURTEL
  0 siblings, 0 replies; 6+ messages in thread
From: Arthur COURTEL @ 2019-12-04  9:55 UTC (permalink / raw)
  To: buildroot

Hello Peter,

Indeed it is needed.
I don't know how i got a working serial on rpi4 without it...
Thanks for the feedback, I will propose a V3 to fix that.

Regards,
Arthur

On Tue, Dec 3, 2019 at 9:16 PM Peter Seiderer <ps.report@gmx.net> wrote:

> Hello Arthur,
>
> On Tue,  3 Dec 2019 14:26:58 +0100, Arthur Courtel <
> arthur.courtel at smile.fr> wrote:
>
> > This configuration builds a 64bit image for RaspberryPi 4.
> >
> > Signed-off-by: Arthur Courtel <arthur.courtel@smile.fr>
> > ---
> >  .../raspberrypi/genimage-raspberrypi4-64.cfg  | 30 +++++++++++++++
> >  board/raspberrypi4-64                         |  1 +
> >  configs/raspberrypi4_64_defconfig             | 37 +++++++++++++++++++
> >  3 files changed, 68 insertions(+)
> >  create mode 100644 board/raspberrypi/genimage-raspberrypi4-64.cfg
> >  create mode 120000 board/raspberrypi4-64
> >  create mode 100644 configs/raspberrypi4_64_defconfig
> >
> > diff --git a/board/raspberrypi/genimage-raspberrypi4-64.cfg
> b/board/raspberrypi/genimage-raspberrypi4-64.cfg
> > new file mode 100644
> > index 0000000000..3c480e98f0
> > --- /dev/null
> > +++ b/board/raspberrypi/genimage-raspberrypi4-64.cfg
> > @@ -0,0 +1,30 @@
> > +image boot.vfat {
> > +  vfat {
> > +    files = {
> > +      "bcm2711-rpi-4-b.dtb",
> > +      "rpi-firmware/cmdline.txt",
> > +      "rpi-firmware/config.txt",
> > +      "rpi-firmware/fixup4.dat",
> > +      "rpi-firmware/start4.elf",
> > +      "rpi-firmware/overlays",
> > +      "Image"
> > +    }
> > +  }
> > +  size = 32M
> > +}
> > +
> > +image sdcard.img {
> > +  hdimage {
> > +  }
> > +
> > +  partition boot {
> > +    partition-type = 0xC
> > +    bootable = "true"
> > +    image = "boot.vfat"
> > +  }
> > +
> > +  partition rootfs {
> > +    partition-type = 0x83
> > +    image = "rootfs.ext4"
> > +  }
> > +}
> > diff --git a/board/raspberrypi4-64 b/board/raspberrypi4-64
> > new file mode 120000
> > index 0000000000..fcdafc81ed
> > --- /dev/null
> > +++ b/board/raspberrypi4-64
> > @@ -0,0 +1 @@
> > +raspberrypi
> > \ No newline at end of file
> > diff --git a/configs/raspberrypi4_64_defconfig
> b/configs/raspberrypi4_64_defconfig
> > new file mode 100644
> > index 0000000000..c88923d507
> > --- /dev/null
> > +++ b/configs/raspberrypi4_64_defconfig
> > @@ -0,0 +1,37 @@
> > +BR2_aarch64=y
> > +BR2_cortex_a72=y
> > +
> > +BR2_TOOLCHAIN_BUILDROOT_CXX=y
> > +
> > +BR2_SYSTEM_DHCP="eth0"
> > +
> > +# Linux headers same as kernel, a 4.19 series
> > +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y
> > +
> > +BR2_LINUX_KERNEL=y
> > +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
> > +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call
> github,raspberrypi,linux,raspberrypi-kernel_1.20190819-1)/linux-raspberrypi-kernel_1.20190819-1.tar.gz"
> > +BR2_LINUX_KERNEL_DEFCONFIG="bcm2711"
> > +
> > +# Build the DTB from the kernel sources
> > +BR2_LINUX_KERNEL_DTS_SUPPORT=y
> > +BR2_LINUX_KERNEL_INTREE_DTS_NAME="broadcom/bcm2711-rpi-4-b"
>
> No chance to test myself for pi4 (because of lack of hardware yet), but I
> believe
> BR2_LINUX_KERNEL_DTB_OVERLAY_SUPPORT=y is needed for an 64-bit kernel, see
> [1] and [2] for pi3...
>
> Regards,
> Peter
>
> [1]
> https://git.buildroot.net/buildroot/commit/?id=2aa92335cdc5f71c2d09391dc49fcf3c7627d6f0
> [2]
> https://git.buildroot.net/buildroot/commit/?id=e747d33bd9d319481a67a376c97e5100dd93f62a
>
> > +
> > +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
> > +
> > +BR2_PACKAGE_RPI_FIRMWARE=y
> > +BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4=y
> > +
> > +# Required tools to create the SD image
> > +BR2_PACKAGE_HOST_DOSFSTOOLS=y
> > +BR2_PACKAGE_HOST_GENIMAGE=y
> > +BR2_PACKAGE_HOST_MTOOLS=y
> > +
> > +# Filesystem / image
> > +BR2_TARGET_ROOTFS_EXT2=y
> > +BR2_TARGET_ROOTFS_EXT2_4=y
> > +BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
> > +# BR2_TARGET_ROOTFS_TAR is not set
> > +BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi4-64/post-build.sh"
> > +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi4-64/post-image.sh"
> > +BR2_ROOTFS_POST_SCRIPT_ARGS="--add-miniuart-bt-overlay --aarch64"
>
>

-- 
<http://www.smile.eu/>
*Arthur COURTEL*
Ing?nieur Etude et D?veloppement

[image: email] arthur.courtel at smile.fr

[image: eco] Pour la plan?te, n'imprimez ce mail que si c'est n?cessaire
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20191204/1d902fdf/attachment.html>

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

end of thread, other threads:[~2019-12-04  9:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-03 13:26 [Buildroot] [PATCHv2 1/2] configs/raspberrypi: change deprecated pi3-miniuart-bt option to miniuart-bt Arthur Courtel
2019-12-03 13:26 ` [Buildroot] [PATCHv2 2/2] configs: add raspberrypi4 64bits defconfig Arthur Courtel
2019-12-03 20:16   ` Peter Seiderer
2019-12-04  9:55     ` Arthur COURTEL
2019-12-03 20:12 ` [Buildroot] [PATCHv2 1/2] configs/raspberrypi: change deprecated pi3-miniuart-bt option to miniuart-bt Peter Seiderer
2019-12-03 20:46   ` Arnout Vandecappelle

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.