Fix rasberry Pi 64bit firmware overlay inclusion
PATCH 1/1 Fix rasberry Pi 64bit firmware overlay inclusion
This patch enables the inclusion of the Pi's overlays. Previously the overlays were not included in the genimage configuration. This patch ensures overlays are included in the sdcard (when enabled) by defaulting to the inclusion of an empty output/images/rpi-firmware/overlays directory in genimage cfg.
The Pi's overlays are built with the following config variables:
BR2_PACKAGE_RPI_FIRMWARE=y BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTBS=y BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTB_OVERLAYS=y BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y BR2_LINUX_KERNEL_IMAGE_NAME="Image" BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="Image modules dtbs"
After building, the dtbo files are present in the output/images/rpi-firmware/overlays directory but not added to the sdcard because they are missing from the genimage cfg file.
--- board/raspberrypi/genimage-raspberrypi3-64.cfg | 1 + package/rpi-firmware/rpi-firmware.mk | 4 ++++ 2 files changed, 5 insertions(+)
board/raspberrypi/genimage-raspberrypi3-64.cfg +1 -0
@@ -9,6 +9,7 @@ image boot.vfat { "rpi-firmware/config.txt", "rpi-firmware/fixup.dat", "rpi-firmware/start.elf", + "rpi-firmware/overlays", "Image" } }
package/rpi-firmware/rpi-firmware.mk +4 -0
@@ -24,6 +24,10 @@ define RPI_FIRMWARE_INSTALL_DTB_OVERLAYS $(INSTALL) -D -m 0644 $${ovldtb} $(BINARIES_DIR)/rpi-firmware/overlays/$${ovldtb##*/} || exit 1; \ done endef +else +define RPI_FIRMWARE_INSTALL_DTB_OVERLAYS + $(INSTALL) -d $(BINARIES_DIR)/rpi-firmware/overlays || exit 1; +endef endif ifeq ($(BR2_PACKAGE_RPI_FIRMWARE_INSTALL_VCDBG),y)
Signature · 1 line
2.19.1
PATCH 1/1 Fix rasberry Pi 64bit firmware overlay inclusion
Hello Max,
Quoted 15 lines · Matt Flax
This patch enables the inclusion of the Pi's overlays. Previously the overlays were not included in the genimage configuration. This patch ensures overlays are included in the sdcard (when enabled) by defaulting to the inclusion of an empty output/images/rpi-firmware/overlays directory in genimage cfg.
The Pi's overlays are built with the following config variables:
BR2_PACKAGE_RPI_FIRMWARE=y BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTBS=y BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTB_OVERLAYS=y BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y BR2_LINUX_KERNEL_IMAGE_NAME="Image" BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="Image modules dtbs"
Quoted 4 lines
After building, the dtbo files are present in the output/images/rpi-firmware/overlays directory but not added to the sdcard because they are missing from the genimage cfg file.
Thanks for suggested patch, the reasoning for genimage-raspberrypi3-64.cfg not containing a overlays entry is it is not needed for the raspberrypi3_64_defconfig use case (mind the buildroot minimalistic defconfig approach) in contrast to the raspberrypi3_defconfig where the overlay is needed for the pi3-miniuart-bt one...
Adding a (maybe) empty overlays directory to the sdcard image would violate the minimalistic approach...
Regards,
Peter
[Skipped CC to 'Matt Flax <[email protected]>' - mail server answers with 'mailbox unavailable']
Quoted 34 lines
Signed-off-by Matt Flax <[email protected]>--- board/raspberrypi/genimage-raspberrypi3-64.cfg | 1 + package/rpi-firmware/rpi-firmware.mk | 4 ++++ 2 files changed, 5 insertions(+)board/raspberrypi/genimage-raspberrypi3-64.cfg +1
-0@@ -9,6 +9,7 @@ image boot.vfat { "rpi-firmware/config.txt", "rpi-firmware/fixup.dat", "rpi-firmware/start.elf", + "rpi-firmware/overlays", "Image" } }package/rpi-firmware/rpi-firmware.mk +4
-0@@ -24,6 +24,10 @@ define RPI_FIRMWARE_INSTALL_DTB_OVERLAYS $(INSTALL) -D -m 0644 $${ovldtb} $(BINARIES_DIR)/rpi-firmware/overlays/$${ovldtb##*/} || exit 1; \ done endef +else +define RPI_FIRMWARE_INSTALL_DTB_OVERLAYS + $(INSTALL) -d $(BINARIES_DIR)/rpi-firmware/overlays || exit 1; +endef endif ifeq ($(BR2_PACKAGE_RPI_FIRMWARE_INSTALL_VCDBG),y)
PATCH 1/1 Fix rasberry Pi 64bit firmware overlay inclusion
Quoted 23 lines · Peter Seiderer
Hello Max,
Quoted 15 lines · Matt Flax
This patch enables the inclusion of the Pi's overlays. Previously the overlays were not included in the genimage configuration. This patch ensures overlays are included in the sdcard (when enabled) by defaulting to the inclusion of an empty output/images/rpi-firmware/overlays directory in genimage cfg.
The Pi's overlays are built with the following config variables:
BR2_PACKAGE_RPI_FIRMWARE=y BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTBS=y BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTB_OVERLAYS=y BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y BR2_LINUX_KERNEL_IMAGE_NAME="Image" BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="Image modules dtbs"Quoted 4 lines
After building, the dtbo files are present in the output/images/rpi-firmware/overlays directory but not added to the sdcard because they are missing from the genimage cfg file.
Quoted 7 lines
Thanks for suggested patch, the reasoning for genimage-raspberrypi3-64.cfg not containing a overlays entry is it is not needed for the
raspberrypi3_64_defconfiguse case (mind the buildroot minimalistic defconfig approach) in contrast to theraspberrypi3_defconfigwhere the overlay is needed for the pi3-miniuart-bt one...Adding a (maybe) empty overlays directory to the sdcard image would violate the minimalistic approach...
With or without this patch, I see no viable way to update the device tree. Is there a method ?
What is a Raspberry Pi without a method to support the addons and hats ?
Do you have a method for supporting any of the various addons/hats which would normally work with an overlay line added to /boot/config.txt ?
Matt
Quoted 42 lines
Regards,
Peter[Skipped CC to 'Matt Flax <[email protected]>' - mail server answers with 'mailbox unavailable']
Quoted 23 lines
Signed-off-by Matt Flax <[email protected]>--- board/raspberrypi/genimage-raspberrypi3-64.cfg | 1 + package/rpi-firmware/rpi-firmware.mk | 4 ++++ 2 files changed, 5 insertions(+)board/raspberrypi/genimage-raspberrypi3-64.cfg +1
-0@@ -9,6 +9,7 @@ image boot.vfat { "rpi-firmware/config.txt", "rpi-firmware/fixup.dat", "rpi-firmware/start.elf", + "rpi-firmware/overlays", "Image" } }package/rpi-firmware/rpi-firmware.mk +0
-0package/rpi-firmware/rpi-firmware.mk define RPI_FIRMWARE_INSTALL_DTB_OVERLAYS · line 33
Quoted 10 lines
package/rpi-firmware/rpi-firmware.mk +4
-0@@ -24,6 +24,10 @@ define RPI_FIRMWARE_INSTALL_DTB_OVERLAYS $(INSTALL) -D -m 0644 $${ovldtb} $(BINARIES_DIR)/rpi-firmware/overlays/$${ovldtb##*/} || exit 1; \ done endef +else +define RPI_FIRMWARE_INSTALL_DTB_OVERLAYS + $(INSTALL) -d $(BINARIES_DIR)/rpi-firmware/overlays || exit 1; +endef endif ifeq ($(BR2_PACKAGE_RPI_FIRMWARE_INSTALL_VCDBG),y)_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH 1/1 Fix rasberry Pi 64bit firmware overlay inclusion
Hello Matt,
Quoted 29 lines · Matt Flax
Quoted 28 lines · Peter Seiderer
Hello Max,
Quoted 15 lines · Matt Flax
This patch enables the inclusion of the Pi's overlays. Previously the overlays were not included in the genimage configuration. This patch ensures overlays are included in the sdcard (when enabled) by defaulting to the inclusion of an empty output/images/rpi-firmware/overlays directory in genimage cfg.
The Pi's overlays are built with the following config variables:
BR2_PACKAGE_RPI_FIRMWARE=y BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTBS=y BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTB_OVERLAYS=y BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y BR2_LINUX_KERNEL_IMAGE_NAME="Image" BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="Image modules dtbs"Quoted 4 lines
After building, the dtbo files are present in the output/images/rpi-firmware/overlays directory but not added to the sdcard because they are missing from the genimage cfg file.
Thanks for suggested patch, the reasoning for genimage-raspberrypi3-64.cfg not containing a overlays entry is it is not needed for the
raspberrypi3_64_defconfiguse case (mind the buildroot minimalistic defconfig approach) in contrast to theraspberrypi3_defconfigwhere the overlay is needed for the pi3-miniuart-bt one...
Quoted 6 lines
Quoted 2 lines
Adding a (maybe) empty overlays directory to the sdcard image would violate the minimalistic approach...
With or without this patch, I see no viable way to update the device tree. Is there a method ?
See e.g. configs/raspberrypi3_defconfig for a specialized case:
BR2_ROOTFS_POST_SCRIPT_ARGS="--add-pi3-miniuart-bt-overlay"
Quoted 2 lines
What is a Raspberry Pi without a method to support the addons and hats ?
A minimalistic starting point for a minimal system, each add-on/hat would surely need additional packages/software, each customized system needs a customized configuration....
Quoted 4 lines
Do you have a method for supporting any of the various addons/hats which would normally work with an overlay line added to
/boot/config.txt?
Or take a look at '[RFC] raspberrypi: post-image.sh arguments as config.txt properties ' [1] for a more general approach...
Regards,
Peter
[1] https://patchwork.ozlabs.org/patch/1007728/
Quoted 49 lines
Matt
Quoted 37 lines
Regards,
Peter[Skipped CC to 'Matt Flax <[email protected]>' - mail server answers with 'mailbox unavailable']
Quoted 32 lines
Signed-off-by Matt Flax <[email protected]>--- board/raspberrypi/genimage-raspberrypi3-64.cfg | 1 + package/rpi-firmware/rpi-firmware.mk | 4 ++++ 2 files changed, 5 insertions(+)board/raspberrypi/genimage-raspberrypi3-64.cfg +1
-0@@ -9,6 +9,7 @@ image boot.vfat { "rpi-firmware/config.txt", "rpi-firmware/fixup.dat", "rpi-firmware/start.elf", + "rpi-firmware/overlays", "Image" } }package/rpi-firmware/rpi-firmware.mk +4
-0@@ -24,6 +24,10 @@ define RPI_FIRMWARE_INSTALL_DTB_OVERLAYS $(INSTALL) -D -m 0644 $${ovldtb} $(BINARIES_DIR)/rpi-firmware/overlays/$${ovldtb##*/} || exit 1; \ done endef +else +define RPI_FIRMWARE_INSTALL_DTB_OVERLAYS + $(INSTALL) -d $(BINARIES_DIR)/rpi-firmware/overlays || exit 1; +endef endifQuoted 5 lines
package/rpi-firmware/rpi-firmware.mk define RPI_FIRMWARE_INSTALL_DTB_OVERLAYS · line 33
Quoted 1 line
package/rpi-firmware/rpi-firmware.mk +0
-0ifeq ($(BR2_PACKAGE_RPI_FIRMWARE_INSTALL_VCDBG),y)_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH 1/1 Fix rasberry Pi 64bit firmware overlay inclusion
Quoted 50 lines · Peter Seiderer
Hello Matt,
Quoted 29 lines · Matt Flax
Quoted 28 lines · Peter Seiderer
Hello Max,
Quoted 15 lines · Matt Flax
This patch enables the inclusion of the Pi's overlays. Previously the overlays were not included in the genimage configuration. This patch ensures overlays are included in the sdcard (when enabled) by defaulting to the inclusion of an empty output/images/rpi-firmware/overlays directory in genimage cfg.
The Pi's overlays are built with the following config variables:
BR2_PACKAGE_RPI_FIRMWARE=y BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTBS=y BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTB_OVERLAYS=y BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y BR2_LINUX_KERNEL_IMAGE_NAME="Image" BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="Image modules dtbs"Quoted 4 lines
After building, the dtbo files are present in the output/images/rpi-firmware/overlays directory but not added to the sdcard because they are missing from the genimage cfg file.
Thanks for suggested patch, the reasoning for genimage-raspberrypi3-64.cfg not containing a overlays entry is it is not needed for the
raspberrypi3_64_defconfiguse case (mind the buildroot minimalistic defconfig approach) in contrast to theraspberrypi3_defconfigwhere the overlay is needed for the pi3-miniuart-bt one...Quoted 5 lines
Quoted 2 lines
Adding a (maybe) empty overlays directory to the sdcard image would violate the minimalistic approach...
With or without this patch, I see no viable way to update the device tree. Is there a method ?
See e.g. configs/raspberrypi3_defconfig for a specialized case:
BR2_ROOTFS_POST_SCRIPT_ARGS="--add-pi3-miniuart-bt-overlay"Quoted 1 line
What is a Raspberry Pi without a method to support the addons and hats ?
A minimalistic starting point for a minimal system, each add-on/hat would surely need additional packages/software, each customized system needs a customized configuration....
Quoted 3 lines
Do you have a method for supporting any of the various addons/hats which would normally work with an overlay line added to
/boot/config.txt?
Quoted 7 lines
Or take a look at '[RFC] raspberrypi:
post-image.sharguments as config.txt properties ' [1] for a more general approach...Regards,
Peter
Thanks for the pointer. It is pretty clear that support for the RPi requires a lot more work and blocking revisions doesn't really help. Despite adding post_script_args, there simply isn't any way to include overlays in the current setup.
For example :
If I add the variable BR2_ROOTFS_POST_SCRIPT_ARGS="--add-pi3-miniuart-bt-overlay"
It will put the following into boot/config.txt :
dtoverlay=pi3-miniuart-bt
But - now here is the clincher - THERE IS NO WAY TO GET OVERLAYS INTO THE BOOT PARTITION !
Can you please be more helpful ? I see specifically the following problems :
1] Can you suggest a better method to include overlays in the sdcard? during a build process ?
2] For a 64 bit system, does overlay loading even work ? I tried to load an overlay by putting dtoverlay into config.txt but it seemed to not even be aware of its presence !
3] Because of 2] is there a particular place to put overlays rather then boot/overlays ?
thanks
Matt
Quoted 53 lines
Quoted 45 lines
Matt
Quoted 37 lines
Regards,
Peter[Skipped CC to 'Matt Flax <[email protected]>' - mail server answers with 'mailbox unavailable']
Quoted 32 lines
Signed-off-by Matt Flax <[email protected]>--- board/raspberrypi/genimage-raspberrypi3-64.cfg | 1 + package/rpi-firmware/rpi-firmware.mk | 4 ++++ 2 files changed, 5 insertions(+)board/raspberrypi/genimage-raspberrypi3-64.cfg +1
-0@@ -9,6 +9,7 @@ image boot.vfat { "rpi-firmware/config.txt", "rpi-firmware/fixup.dat", "rpi-firmware/start.elf", + "rpi-firmware/overlays", "Image" } }package/rpi-firmware/rpi-firmware.mk +4
-0@@ -24,6 +24,10 @@ define RPI_FIRMWARE_INSTALL_DTB_OVERLAYS $(INSTALL) -D -m 0644 $${ovldtb} $(BINARIES_DIR)/rpi-firmware/overlays/$${ovldtb##*/} || exit 1; \ done endef +else +define RPI_FIRMWARE_INSTALL_DTB_OVERLAYS + $(INSTALL) -d $(BINARIES_DIR)/rpi-firmware/overlays || exit 1; +endef endifQuoted 5 lines
package/rpi-firmware/rpi-firmware.mk define RPI_FIRMWARE_INSTALL_DTB_OVERLAYS · line 33
Quoted 1 line
package/rpi-firmware/rpi-firmware.mk +0
-0ifeq ($(BR2_PACKAGE_RPI_FIRMWARE_INSTALL_VCDBG),y)_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildrootQuoted 4 lines
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH 1/1 Fix rasberry Pi 64bit firmware overlay inclusion
Hello Matt,
Quoted 54 lines · Matt Flax
Quoted 53 lines · Peter Seiderer
Hello Matt,
Quoted 29 lines · Matt Flax
Quoted 28 lines · Peter Seiderer
Hello Max,
Quoted 15 lines · Matt Flax
This patch enables the inclusion of the Pi's overlays. Previously the overlays were not included in the genimage configuration. This patch ensures overlays are included in the sdcard (when enabled) by defaulting to the inclusion of an empty output/images/rpi-firmware/overlays directory in genimage cfg.
The Pi's overlays are built with the following config variables:
BR2_PACKAGE_RPI_FIRMWARE=y BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTBS=y BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTB_OVERLAYS=y BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y BR2_LINUX_KERNEL_IMAGE_NAME="Image" BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="Image modules dtbs"Quoted 4 lines
After building, the dtbo files are present in the output/images/rpi-firmware/overlays directory but not added to the sdcard because they are missing from the genimage cfg file.
Thanks for suggested patch, the reasoning for genimage-raspberrypi3-64.cfg not containing a overlays entry is it is not needed for the
raspberrypi3_64_defconfiguse case (mind the buildroot minimalistic defconfig approach) in contrast to theraspberrypi3_defconfigwhere the overlay is needed for the pi3-miniuart-bt one...Quoted 5 lines
Quoted 2 lines
Adding a (maybe) empty overlays directory to the sdcard image would violate the minimalistic approach...
With or without this patch, I see no viable way to update the device tree. Is there a method ?
See e.g. configs/raspberrypi3_defconfig for a specialized case:
BR2_ROOTFS_POST_SCRIPT_ARGS="--add-pi3-miniuart-bt-overlay"Quoted 1 line
What is a Raspberry Pi without a method to support the addons and hats ?
A minimalistic starting point for a minimal system, each add-on/hat would surely need additional packages/software, each customized system needs a customized configuration....
Quoted 3 lines
Do you have a method for supporting any of the various addons/hats which would normally work with an overlay line added to
/boot/config.txt?Or take a look at '[RFC] raspberrypi:
post-image.sharguments as config.txt properties ' [1] for a more general approach...
Quoted 8 lines
Quoted 4 lines
Regards,
PeterThanks for the pointer. It is pretty clear that support for the RPi requires a lot more work and blocking revisions doesn't really help.
Don`t know what your mean by 'blocking revisions'?
Quoted 2 lines
Despite adding
post_script_args, there simply isn't any way to include overlays in the current setup.
Your initial suggested patch shows the way to do it:
- enable BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTB_OVERLAYS=y
- use a customized genimage config file with overlay directory enabled
- use a customized genimage config file pointing to a customized config.txt file
Quoted 10 lines
For example :
If I add the variable BR2_ROOTFS_POST_SCRIPT_ARGS="--add-pi3-miniuart-bt-overlay"
It will put the following into
boot/config.txt:dtoverlay=pi3-miniuart-bt
Quoted 7 lines
But - now here is the clincher - THERE IS NO WAY TO GET OVERLAYS INTO THE BOOT PARTITION !
Can you please be more helpful ? I see specifically the following problems :
1] Can you suggest a better method to include overlays in the sdcard? during a build process ?
See above...
Quoted 4 lines
2] For a 64 bit system, does overlay loading even work ? I tried to load an overlay by putting dtoverlay into config.txt but it seemed to not even be aware of its presence !
Should work the same way as 32 bit, but did not test it recently...how do you determine 'not even be aware of its presence'?
Quoted 3 lines
3] Because of 2] is there a particular place to put overlays rather then boot/overlays ?
Not a buildroot specific question, more for a raspberry forum..., but according to [2] the right place for the overlays is the boot partition overlays directory...
Regards,
Peter
[2] https://www.raspberrypi.org/documentation/configuration/device-tree.md
Quoted 66 lines
thanks
Matt
Quoted 45 lines
Quoted 45 lines
Matt
Quoted 42 lines
Regards,
Peter[Skipped CC to 'Matt Flax <[email protected]>' - mail server answers with 'mailbox unavailable']
Quoted 23 lines
Signed-off-by Matt Flax <[email protected]>--- board/raspberrypi/genimage-raspberrypi3-64.cfg | 1 + package/rpi-firmware/rpi-firmware.mk | 4 ++++ 2 files changed, 5 insertions(+)board/raspberrypi/genimage-raspberrypi3-64.cfg +1
-0@@ -9,6 +9,7 @@ image boot.vfat { "rpi-firmware/config.txt", "rpi-firmware/fixup.dat", "rpi-firmware/start.elf", + "rpi-firmware/overlays", "Image" } }package/rpi-firmware/rpi-firmware.mk +0
-0package/rpi-firmware/rpi-firmware.mk define RPI_FIRMWARE_INSTALL_DTB_OVERLAYS · line 33
Quoted 10 lines
package/rpi-firmware/rpi-firmware.mk +4
-0@@ -24,6 +24,10 @@ define RPI_FIRMWARE_INSTALL_DTB_OVERLAYS $(INSTALL) -D -m 0644 $${ovldtb} $(BINARIES_DIR)/rpi-firmware/overlays/$${ovldtb##*/} || exit 1; \ done endef +else +define RPI_FIRMWARE_INSTALL_DTB_OVERLAYS + $(INSTALL) -d $(BINARIES_DIR)/rpi-firmware/overlays || exit 1; +endef endif ifeq ($(BR2_PACKAGE_RPI_FIRMWARE_INSTALL_VCDBG),y)_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildrootQuoted 8 lines
Quoted 4 lines
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH 1/1 Fix rasberry Pi 64bit firmware overlay inclusion
Quoted 66 lines · Peter Seiderer
Hello Matt,
Quoted 53 lines · Matt Flax
Quoted 52 lines · Peter Seiderer
Hello Matt,
Quoted 29 lines · Matt Flax
Quoted 28 lines · Peter Seiderer
Hello Max,
Quoted 15 lines · Matt Flax
This patch enables the inclusion of the Pi's overlays. Previously the overlays were not included in the genimage configuration. This patch ensures overlays are included in the sdcard (when enabled) by defaulting to the inclusion of an empty output/images/rpi-firmware/overlays directory in genimage cfg.
The Pi's overlays are built with the following config variables:
BR2_PACKAGE_RPI_FIRMWARE=y BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTBS=y BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTB_OVERLAYS=y BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y BR2_LINUX_KERNEL_IMAGE_NAME="Image" BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="Image modules dtbs"Quoted 4 lines
After building, the dtbo files are present in the output/images/rpi-firmware/overlays directory but not added to the sdcard because they are missing from the genimage cfg file.
Thanks for suggested patch, the reasoning for genimage-raspberrypi3-64.cfg not containing a overlays entry is it is not needed for the
raspberrypi3_64_defconfiguse case (mind the buildroot minimalistic defconfig approach) in contrast to theraspberrypi3_defconfigwhere the overlay is needed for the pi3-miniuart-bt one...Quoted 4 lines
Quoted 2 lines
Adding a (maybe) empty overlays directory to the sdcard image would violate the minimalistic approach...
With or without this patch, I see no viable way to update the device tree. Is there a method ?
See e.g. configs/raspberrypi3_defconfig for a specialized case:
BR2_ROOTFS_POST_SCRIPT_ARGS="--add-pi3-miniuart-bt-overlay"Quoted 1 line
What is a Raspberry Pi without a method to support the addons and hats ?
A minimalistic starting point for a minimal system, each add-on/hat would surely need additional packages/software, each customized system needs a customized configuration....
Quoted 3 lines
Do you have a method for supporting any of the various addons/hats which would normally work with an overlay line added to
/boot/config.txt?Or take a look at '[RFC] raspberrypi:
post-image.sharguments as config.txt properties ' [1] for a more general approach...Quoted 7 lines
Quoted 4 lines
Regards,
PeterThanks for the pointer. It is pretty clear that support for the RPi requires a lot more work and blocking revisions doesn't really help.
Don`t know what your mean by 'blocking revisions'?
Quoted 7 lines
Quoted 2 lines
Despite adding
post_script_args, there simply isn't any way to include overlays in the current setup.Your initial suggested patch shows the way to do it:
- enable BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTB_OVERLAYS=y
- use a customized genimage config file with overlay directory enabled
- use a customized genimage config file pointing to a customized config.txt file
Yes - exactly, you can't install overlays with stock buildroot period. The system here is completely dysfunctional as far as the Raspberry Pi is concerned. There has to be a balance between your desired minimalism and functionality.
Are you aware that the start.elf binary in the boot partition EXPECTS the overlays directory to be present ? It has functions which search this directory. You previously stated :
"Adding a (maybe) empty overlays directory to the sdcard image would violate the minimalistic approach..."
The trade off for this "minimalistic approach", is to have a dysfunctional buildroot system. It is dysfunctional because parts of the Pi's software can never execute successfully, i.e. start.elf. To correctly honor your "minimalistic approach" the start.elf binary should be correctly modified and minimised.
I personally am in favour of being able to create functionally working versions of Pi boot partitions - which is why my patch includes the possibly empty overlays directory on the boot partition - as the file start.elf expects.
As my "initial suggested patch shows the way to do it" why not support it ?
Quoted 105 lines
Quoted 10 lines
For example :
If I add the variable BR2_ROOTFS_POST_SCRIPT_ARGS="--add-pi3-miniuart-bt-overlay"
It will put the following into
boot/config.txt:dtoverlay=pi3-miniuart-bt
Quoted 7 lines
But - now here is the clincher - THERE IS NO WAY TO GET OVERLAYS INTO THE BOOT PARTITION !
Can you please be more helpful ? I see specifically the following problems :
1] Can you suggest a better method to include overlays in the sdcard during a build process ?
See above...
Quoted 3 lines
2] For a 64 bit system, does overlay loading even work ? I tried to load an overlay by putting dtoverlay into config.txt but it seemed to not even be aware of its presence !
Should work the same way as 32 bit, but did not test it recently...how do you determine 'not even be aware of its presence'?
Quoted 2 lines
3] Because of 2] is there a particular place to put overlays rather then boot/overlays ?
Not a buildroot specific question, more for a raspberry forum..., but according to [2] the right place for the overlays is the boot partition overlays directory...
Regards,
Peter[2] https://www.raspberrypi.org/documentation/configuration/device-tree.md
Quoted 57 lines
thanks
Matt
Quoted 49 lines
Quoted 49 lines
Matt
Quoted 37 lines
Regards,
Peter[Skipped CC to 'Matt Flax <[email protected]>' - mail server answers with 'mailbox unavailable']
Quoted 32 lines
Signed-off-by Matt Flax <[email protected]>--- board/raspberrypi/genimage-raspberrypi3-64.cfg | 1 + package/rpi-firmware/rpi-firmware.mk | 4 ++++ 2 files changed, 5 insertions(+)board/raspberrypi/genimage-raspberrypi3-64.cfg +1
-0@@ -9,6 +9,7 @@ image boot.vfat { "rpi-firmware/config.txt", "rpi-firmware/fixup.dat", "rpi-firmware/start.elf", + "rpi-firmware/overlays", "Image" } }package/rpi-firmware/rpi-firmware.mk +4
-0@@ -24,6 +24,10 @@ define RPI_FIRMWARE_INSTALL_DTB_OVERLAYS $(INSTALL) -D -m 0644 $${ovldtb} $(BINARIES_DIR)/rpi-firmware/overlays/$${ovldtb##*/} || exit 1; \ done endef +else +define RPI_FIRMWARE_INSTALL_DTB_OVERLAYS + $(INSTALL) -d $(BINARIES_DIR)/rpi-firmware/overlays || exit 1; +endef endifQuoted 5 lines
package/rpi-firmware/rpi-firmware.mk define RPI_FIRMWARE_INSTALL_DTB_OVERLAYS · line 33
Quoted 1 line
package/rpi-firmware/rpi-firmware.mk +0
-0ifeq ($(BR2_PACKAGE_RPI_FIRMWARE_INSTALL_VCDBG),y)_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildrootQuoted 8 lines
Quoted 4 lines
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH 1/1 Fix rasberry Pi 64bit firmware overlay inclusion
In reply to Matt FlaxMatt, All,
On 2019-01-03 22:00 +1100, Matt Flax spake thusly:
Quoted 15 lines
This patch enables the inclusion of the Pi's overlays. Previously the overlays were not included in the genimage configuration. This patch ensures overlays are included in the sdcard (when enabled) by defaulting to the inclusion of an empty output/images/rpi-firmware/overlays directory in genimage cfg.
The Pi's overlays are built with the following config variables:
BR2_PACKAGE_RPI_FIRMWARE=y BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTBS=y BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTB_OVERLAYS=y BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y BR2_LINUX_KERNEL_IMAGE_NAME="Image" BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="Image modules dtbs"
Quoted 6 lines
After building, the dtbo files are present in the output/images/rpi-firmware/overlays directory but not added to the sdcard because they are missing from the genimage cfg file.
Signed-off-by Matt Flax <[email protected]>
After a quick discussion on IRC woth Thomas, we find that this patch is indeed acceptable.
However, I have a minor comment about it, see below...
Quoted 22 lines
--- board/raspberrypi/genimage-raspberrypi3-64.cfg | 1 + package/rpi-firmware/rpi-firmware.mk | 4 ++++ 2 files changed, 5 insertions(+)board/raspberrypi/genimage-raspberrypi3-64.cfg +1
-0@@ -9,6 +9,7 @@ image boot.vfat { "rpi-firmware/config.txt", "rpi-firmware/fixup.dat", "rpi-firmware/start.elf", + "rpi-firmware/overlays", "Image" } }package/rpi-firmware/rpi-firmware.mk +0
-0
package/rpi-firmware/rpi-firmware.mk define RPI_FIRMWARE_INSTALL_DTB_OVERLAYS · line 29
Quoted 6 lines
package/rpi-firmware/rpi-firmware.mk +3
-0@@ -24,6 +24,10 @@ define RPI_FIRMWARE_INSTALL_DTB_OVERLAYS $(INSTALL) -D -m 0644 $${ovldtb} $(BINARIES_DIR)/rpi-firmware/overlays/$${ovldtb##*/} || exit 1; \ done endef +else +define RPI_FIRMWARE_INSTALL_DTB_OVERLAYS + $(INSTALL) -d $(BINARIES_DIR)/rpi-firmware/overlays || exit 1;
No need for the '|| exit 1' part in this case.
It is important to use it ion the loop, above, because it is a shell loop, so an error in the commands would not be noticed. Here however, this is a single command, so it will return in error if it fils and make will notice.
Barring that, which can be fixed when applying:
Quoted 11 lines
package/rpi-firmware/rpi-firmware.mk +1
-0+endef endif ifeq ($(BR2_PACKAGE_RPI_FIRMWARE_INSTALL_VCDBG),y)Signature · 6 lines
2.19.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH 1/1 Fix rasberry Pi 64bit firmware overlay inclusion
Quoted 52 lines · Yann E. MORIN
Matt, All,
On 2019-01-03 22:00 +1100, Matt Flax spake thusly:
Quoted 15 lines
This patch enables the inclusion of the Pi's overlays. Previously the overlays were not included in the genimage configuration. This patch ensures overlays are included in the sdcard (when enabled) by defaulting to the inclusion of an empty output/images/rpi-firmware/overlays directory in genimage cfg.
The Pi's overlays are built with the following config variables:
BR2_PACKAGE_RPI_FIRMWARE=y BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTBS=y BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTB_OVERLAYS=y BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y BR2_LINUX_KERNEL_IMAGE_NAME="Image" BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="Image modules dtbs"Quoted 6 lines
After building, the dtbo files are present in the output/images/rpi-firmware/overlays directory but not added to the sdcard because they are missing from the genimage cfg file.
Signed-off-by Matt Flax <[email protected]>After a quick discussion on IRC woth Thomas, we find that this patch is indeed acceptable.
However, I have a minor comment about it, see below...
Quoted 22 lines
--- board/raspberrypi/genimage-raspberrypi3-64.cfg | 1 + package/rpi-firmware/rpi-firmware.mk | 4 ++++ 2 files changed, 5 insertions(+)board/raspberrypi/genimage-raspberrypi3-64.cfg +1
-0@@ -9,6 +9,7 @@ image boot.vfat { "rpi-firmware/config.txt", "rpi-firmware/fixup.dat", "rpi-firmware/start.elf", + "rpi-firmware/overlays", "Image" } }package/rpi-firmware/rpi-firmware.mk +0
-0@@ -24,6 +24,10 @@ define RPI_FIRMWARE_INSTALL_DTB_OVERLAYS
Quoted 8 lines
package/rpi-firmware/rpi-firmware.mk define RPI_FIRMWARE_INSTALL_DTB_OVERLAYS · line 29
Quoted 6 lines
package/rpi-firmware/rpi-firmware.mk +3
-0$(INSTALL) -D -m 0644 $${ovldtb} $(BINARIES_DIR)/rpi-firmware/overlays/$${ovldtb##*/} || exit 1; \ done endef +else +define RPI_FIRMWARE_INSTALL_DTB_OVERLAYS + $(INSTALL) -d $(BINARIES_DIR)/rpi-firmware/overlays || exit 1;No need for the '|| exit 1' part in this case.
Also it was indented too much, and the trailing semicolon was not needed.
Also, I've added a brief comment explaining why we create this empty directory.
Peter, we discussed this on IRC and we feel that one empty directory doesn't
violate the minimalistic principle too much, because it does make life a lot easier when you start from the existing defconfig.
So, I've applied to master with the changes mentioned above.
Regards,
Arnout
Quoted 22 lines
It is important to use it ion the loop, above, because it is a shell loop, so an error in the commands would not be noticed. Here however, this is a single command, so it will return in error if it fils and make will notice.
Barring that, which can be fixed when applying:
Reviewed-by "Yann E. MORIN" <[email protected]>Quoted 11 lines
package/rpi-firmware/rpi-firmware.mk +1
-0+endef endif ifeq ($(BR2_PACKAGE_RPI_FIRMWARE_INSTALL_VCDBG),y)Signature · 6 lines
2.19.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
PATCH 1/1 Fix rasberry Pi 64bit firmware overlay inclusion
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Arnout" == Arnout Vandecappelle <[email protected]> writes:
Hi,
Quoted 27 lines · Yann E. MORIN
Quoted 25 lines
Matt, All,
On 2019-01-03 22:00 +1100, Matt Flax spake thusly:
Quoted 21 lines
This patch enables the inclusion of the Pi's overlays. Previously the overlays were not included in the genimage configuration. This patch ensures overlays are included in the sdcard (when enabled) by defaulting to the inclusion of an empty output/images/rpi-firmware/overlays directory in genimage cfg.
The Pi's overlays are built with the following config variables:
BR2_PACKAGE_RPI_FIRMWARE=y BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTBS=y BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTB_OVERLAYS=y BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y BR2_LINUX_KERNEL_IMAGE_NAME="Image" BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="Image modules dtbs"After building, the dtbo files are present in the output/images/rpi-firmware/overlays directory but not added to the sdcard because they are missing from the genimage cfg file.
Signed-off-by Matt Flax <[email protected]>
Quoted 7 lines
Also, I've added a brief comment explaining why we create this empty directory.
Peter, we discussed this on IRC and we feel that one empty directory doesn't
violate the minimalistic principle too much, because it does make life a lot easier when you start from the existing defconfig.So, I've applied to master with the changes mentioned above.
Committed to 2019.02.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard