<div dir="ltr"><div>Hi Romain,</div><div>I took the --add-pi3-miniuart-bt-overlay option from the RPI 4 defconfig. I don't know well enough DTS mechanism to tell if this overlay is needed by the rpi4 DTS.</div><div>If someone can look at it ?</div><div>I don't have the board to test without today but I'll test test as soon as I can.</div><div>i will send proper defconfig as soon as we know about bt overlay option.</div><div><br></div><div>Best regards,</div><div>Arthur<br></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Nov 29, 2019 at 6:43 PM Romain Naour <<a href="mailto:romain.naour@smile.fr">romain.naour@smile.fr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Arthur,<br>
<br>
Le 29/11/2019 à 17:02, Arthur Courtel a écrit :<br>
> This configuration builds a 64bit image for RaspberryPi 4.<br>
> <br>
> Signed-off-by: Arthur Courtel <<a href="mailto:arthur.courtel@smile.fr" target="_blank">arthur.courtel@smile.fr</a>><br>
> ---<br>
>  .../raspberrypi/genimage-raspberrypi4-64.cfg  | 30 +++++++++++++++++++<br>
>  board/raspberrypi/post-image.sh               |  4 +--<br>
>  board/raspberrypi4-64                         |  1 +<br>
>  configs/raspberrypi4_64_defconfig             | 24 +++++++++++++++<br>
>  4 files changed, 57 insertions(+), 2 deletions(-)<br>
>  create mode 100644 board/raspberrypi/genimage-raspberrypi4-64.cfg<br>
>  create mode 120000 board/raspberrypi4-64<br>
>  create mode 100644 configs/raspberrypi4_64_defconfig<br>
> <br>
> diff --git a/board/raspberrypi/genimage-raspberrypi4-64.cfg b/board/raspberrypi/genimage-raspberrypi4-64.cfg<br>
> new file mode 100644<br>
> index 0000000000..3c480e98f0<br>
> --- /dev/null<br>
> +++ b/board/raspberrypi/genimage-raspberrypi4-64.cfg<br>
> @@ -0,0 +1,30 @@<br>
> +image boot.vfat {<br>
> +  vfat {<br>
> +    files = {<br>
> +      "bcm2711-rpi-4-b.dtb",<br>
> +      "rpi-firmware/cmdline.txt",<br>
> +      "rpi-firmware/config.txt",<br>
> +      "rpi-firmware/fixup4.dat",<br>
> +      "rpi-firmware/start4.elf",<br>
> +      "rpi-firmware/overlays",<br>
> +      "Image"<br>
<br>
Not related to your patch but the raspberry-pi3 defconfig use zImage but the<br>
64bit version use Image.<br>
<br>
Any reason for this?<br>
<br>
> +    }<br>
> +  }<br>
> +  size = 32M<br>
> +}<br>
> +<br>
> +image sdcard.img {<br>
> +  hdimage {<br>
> +  }<br>
> +<br>
> +  partition boot {<br>
> +    partition-type = 0xC<br>
> +    bootable = "true"<br>
> +    image = "boot.vfat"<br>
> +  }<br>
> +<br>
> +  partition rootfs {<br>
> +    partition-type = 0x83<br>
> +    image = "rootfs.ext4"<br>
> +  }<br>
> +}<br>
> diff --git a/board/raspberrypi/post-image.sh b/board/raspberrypi/post-image.sh<br>
> index bf9af5dc60..e79141f142 100755<br>
> --- a/board/raspberrypi/post-image.sh<br>
> +++ b/board/raspberrypi/post-image.sh<br>
> @@ -15,7 +15,7 @@ do<br>
>                       echo "Adding 'dtoverlay=pi3-miniuart-bt' to config.txt (fixes ttyAMA0 serial console)."<br>
>                       cat << __EOF__ >> "${BINARIES_DIR}/rpi-firmware/config.txt"<br>
>  <br>
> -# fixes rpi3 ttyAMA0 serial console<br>
> +# fixes rpi3/4 ttyAMA0 serial console<br>
<br>
Are you sure that is the same devicetree overlay for rpi3 and rpi4 ?<br>
<br>
The option is rpi3 specific (--add-pi3-miniuart-bt-overlay).<br>
<br>
>  dtoverlay=pi3-miniuart-bt<br>
>  __EOF__<br>
>               fi<br>
> @@ -35,7 +35,7 @@ __EOF__<br>
>               if ! grep -qE '^enable_uart=1' "${BINARIES_DIR}/rpi-firmware/config.txt"; then<br>
>                       cat << __EOF__ >> "${BINARIES_DIR}/rpi-firmware/config.txt"<br>
>  <br>
> -# enable rpi3 ttyS0 serial console<br>
> +# enable rpi3/4 ttyS0 serial console<br>
>  enable_uart=1<br>
>  __EOF__<br>
>               fi<br>
> diff --git a/board/raspberrypi4-64 b/board/raspberrypi4-64<br>
> new file mode 120000<br>
> index 0000000000..fcdafc81ed<br>
> --- /dev/null<br>
> +++ b/board/raspberrypi4-64<br>
> @@ -0,0 +1 @@<br>
> +raspberrypi<br>
> \ No newline at end of file<br>
> diff --git a/configs/raspberrypi4_64_defconfig b/configs/raspberrypi4_64_defconfig<br>
> new file mode 100644<br>
> index 0000000000..3d30fb05f5<br>
> --- /dev/null<br>
> +++ b/configs/raspberrypi4_64_defconfig<br>
> @@ -0,0 +1,24 @@<br>
> +BR2_aarch64=y<br>
> +BR2_cortex_a72=y<br>
> +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y<br>
> +BR2_TOOLCHAIN_BUILDROOT_CXX=y<br>
> +BR2_SYSTEM_DHCP="eth0"<br>
> +BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi4-64/post-build.sh"<br>
> +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi4-64/post-image.sh"<br>
> +BR2_ROOTFS_POST_SCRIPT_ARGS="--add-pi3-miniuart-bt-overlay --aarch64"<br>
> +BR2_LINUX_KERNEL=y<br>
> +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y<br>
> +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,raspberrypi-kernel_1.20190819-1)/linux-raspberrypi-kernel_1.20190819-1.tar.gz"<br>
> +BR2_LINUX_KERNEL_DEFCONFIG="bcm2711"<br>
> +BR2_LINUX_KERNEL_DTS_SUPPORT=y<br>
> +BR2_LINUX_KERNEL_INTREE_DTS_NAME="broadcom/bcm2711-rpi-4-b"<br>
> +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y<br>
> +BR2_PACKAGE_RPI_FIRMWARE=y<br>
> +BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4=y<br>
> +BR2_TARGET_ROOTFS_EXT2=y<br>
> +BR2_TARGET_ROOTFS_EXT2_4=y<br>
> +BR2_TARGET_ROOTFS_EXT2_SIZE="120M"<br>
> +# BR2_TARGET_ROOTFS_TAR is not set<br>
> +BR2_PACKAGE_HOST_DOSFSTOOLS=y<br>
> +BR2_PACKAGE_HOST_GENIMAGE=y<br>
> +BR2_PACKAGE_HOST_MTOOLS=y<br>
<br>
We use generally a hand written defconfig file to add some comments, see [1].<br>
<br>
[1] <a href="https://git.buildroot.net/buildroot/tree/configs/raspberrypi4_defconfig" rel="noreferrer" target="_blank">https://git.buildroot.net/buildroot/tree/configs/raspberrypi4_defconfig</a><br>
<br>
Best regards,<br>
Romain<br>
<br>
<br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><a href="http://www.smile.eu/" target="_blank">
                    </a><div style="color:rgb(255,128,84);font-size:14px">
                    <b>Arthur COURTEL</b>
                </div>
                <div style="color:rgb(59,127,254);font-size:13px">
                    Ingénieur Etude et Développement<br>
                    
                </div><br>
                <div style="color:rgb(59,127,254);font-size:13px">
                    <span style="white-space:nowrap"><img style="margin-right: 5px;" src="http://ftp.smile.fr/client/Communication/signature/img/mail.png" alt="email" width="12" height="10">
                        <a href="mailto:arthur.courtel@smile.fr" style="color:rgb(59,127,254);font-size:13px;text-decoration:none" target="_blank">arthur.courtel@smile.fr</a>
                    </span>
                     <span style="white-space:nowrap"></span><br></div>
    
    <br>
    <div style="color:rgb(163,172,181);font-size:10px">
        <img src="http://ftp.smile.fr/client/Communication/signature/img/eco.png" alt="eco" width="13" height="11">
            Pour la planète, n'imprimez ce mail que si c'est nécessaire
    </div></div></div></div></div>