diff mbox series

[4/4] package/rpi-firmware: improve installation of dtb files

Message ID 1521120291-15781-4-git-send-email-martin@barkynet.com
State Superseded
Headers show
Series [1/4] package/rpi-firmware: bump version | expand

Commit Message

Martin Bark March 15, 2018, 1:24 p.m. UTC
Don't list specific dtb files, instead install all dtb files in the same
way as dtbo files are currently done.

Signed-off-by: Martin Bark <martin@barkynet.com>
---
 package/rpi-firmware/rpi-firmware.mk | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

Comments

Peter Seiderer March 15, 2018, 7:40 p.m. UTC | #1
Hello Martin,

On Thu, 15 Mar 2018 13:24:51 +0000, Martin Bark <martin@barkynet.com> wrote:

> Don't list specific dtb files, instead install all dtb files in the same
> way as dtbo files are currently done.
> 
> Signed-off-by: Martin Bark <martin@barkynet.com>
> ---
>  package/rpi-firmware/rpi-firmware.mk | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/package/rpi-firmware/rpi-firmware.mk b/package/rpi-firmware/rpi-firmware.mk
> index 1ebdd96..9cc3d4a 100644
> --- a/package/rpi-firmware/rpi-firmware.mk
> +++ b/package/rpi-firmware/rpi-firmware.mk
> @@ -12,10 +12,9 @@ RPI_FIRMWARE_INSTALL_IMAGES = YES
>  
>  ifeq ($(BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTBS),y)
>  define RPI_FIRMWARE_INSTALL_DTB
> -	$(INSTALL) -D -m 0644 $(@D)/boot/bcm2708-rpi-b.dtb $(BINARIES_DIR)/rpi-firmware/bcm2708-rpi-b.dtb
> -	$(INSTALL) -D -m 0644 $(@D)/boot/bcm2708-rpi-b-plus.dtb $(BINARIES_DIR)/rpi-firmware/bcm2708-rpi-b-plus.dtb
> -	$(INSTALL) -D -m 0644 $(@D)/boot/bcm2709-rpi-2-b.dtb $(BINARIES_DIR)/rpi-firmware/bcm2709-rpi-2-b.dtb
> -	$(INSTALL) -D -m 0644 $(@D)/boot/bcm2710-rpi-3-b.dtb $(BINARIES_DIR)/rpi-firmware/bcm2710-rpi-3-b.dtb
> +	for dtb in  $(@D)/boot/*.dtb; do \
> +		$(INSTALL) -D -m 0644 $${dtb} $(BINARIES_DIR)/rpi-firmware/$${dtb##*/} || exit 1; \
> +	done

Which will install three additional dtb files (bcm2708-rpi-0-w.dtb,
bcm2708-rpi-cm.dtb and bcm2710-rpi-cm3.dtb), not a downside of the
patch, but worth mentioning....

Regards,
Peter

>  endef
>  endif
>
Martin Bark March 15, 2018, 7:58 p.m. UTC | #2
Hi Peter,

On 15 March 2018 at 19:40, Peter Seiderer <ps.report@gmx.net> wrote:
> Hello Martin,
>
> On Thu, 15 Mar 2018 13:24:51 +0000, Martin Bark <martin@barkynet.com> wrote:
>
>> Don't list specific dtb files, instead install all dtb files in the same
>> way as dtbo files are currently done.
>>
>> Signed-off-by: Martin Bark <martin@barkynet.com>
>> ---
>>  package/rpi-firmware/rpi-firmware.mk | 7 +++----
>>  1 file changed, 3 insertions(+), 4 deletions(-)
>>
>> diff --git a/package/rpi-firmware/rpi-firmware.mk b/package/rpi-firmware/rpi-firmware.mk
>> index 1ebdd96..9cc3d4a 100644
>> --- a/package/rpi-firmware/rpi-firmware.mk
>> +++ b/package/rpi-firmware/rpi-firmware.mk
>> @@ -12,10 +12,9 @@ RPI_FIRMWARE_INSTALL_IMAGES = YES
>>
>>  ifeq ($(BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTBS),y)
>>  define RPI_FIRMWARE_INSTALL_DTB
>> -     $(INSTALL) -D -m 0644 $(@D)/boot/bcm2708-rpi-b.dtb $(BINARIES_DIR)/rpi-firmware/bcm2708-rpi-b.dtb
>> -     $(INSTALL) -D -m 0644 $(@D)/boot/bcm2708-rpi-b-plus.dtb $(BINARIES_DIR)/rpi-firmware/bcm2708-rpi-b-plus.dtb
>> -     $(INSTALL) -D -m 0644 $(@D)/boot/bcm2709-rpi-2-b.dtb $(BINARIES_DIR)/rpi-firmware/bcm2709-rpi-2-b.dtb
>> -     $(INSTALL) -D -m 0644 $(@D)/boot/bcm2710-rpi-3-b.dtb $(BINARIES_DIR)/rpi-firmware/bcm2710-rpi-3-b.dtb
>> +     for dtb in  $(@D)/boot/*.dtb; do \
>> +             $(INSTALL) -D -m 0644 $${dtb} $(BINARIES_DIR)/rpi-firmware/$${dtb##*/} || exit 1; \
>> +     done
>
> Which will install three additional dtb files (bcm2708-rpi-0-w.dtb,
> bcm2708-rpi-cm.dtb and bcm2710-rpi-cm3.dtb), not a downside of the
> patch, but worth mentioning....

Yes, it will also install the new bcm2710-rpi-3-b-plus.dtb. This code
does not seem to have been kept updated, it's missing several dtb
files as you mention.  I think it's better to just install all dtb
files as we do for the dtbo files.

Thanks

Martin

>
> Regards,
> Peter
>
>>  endef
>>  endif
>>
>
Yann E. MORIN March 15, 2018, 9:59 p.m. UTC | #3
Martin, All,

On 2018-03-15 19:58 +0000, Martin Bark spake thusly:
> On 15 March 2018 at 19:40, Peter Seiderer <ps.report@gmx.net> wrote:
> > On Thu, 15 Mar 2018 13:24:51 +0000, Martin Bark <martin@barkynet.com> wrote:
> >> Don't list specific dtb files, instead install all dtb files in the same
> >> way as dtbo files are currently done.
> >>
> >> Signed-off-by: Martin Bark <martin@barkynet.com>
> >> ---
> >>  package/rpi-firmware/rpi-firmware.mk | 7 +++----
> >>  1 file changed, 3 insertions(+), 4 deletions(-)
> >>
> >> diff --git a/package/rpi-firmware/rpi-firmware.mk b/package/rpi-firmware/rpi-firmware.mk
> >> index 1ebdd96..9cc3d4a 100644
> >> --- a/package/rpi-firmware/rpi-firmware.mk
> >> +++ b/package/rpi-firmware/rpi-firmware.mk
> >> @@ -12,10 +12,9 @@ RPI_FIRMWARE_INSTALL_IMAGES = YES
> >>
> >>  ifeq ($(BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTBS),y)
> >>  define RPI_FIRMWARE_INSTALL_DTB
> >> -     $(INSTALL) -D -m 0644 $(@D)/boot/bcm2708-rpi-b.dtb $(BINARIES_DIR)/rpi-firmware/bcm2708-rpi-b.dtb
> >> -     $(INSTALL) -D -m 0644 $(@D)/boot/bcm2708-rpi-b-plus.dtb $(BINARIES_DIR)/rpi-firmware/bcm2708-rpi-b-plus.dtb
> >> -     $(INSTALL) -D -m 0644 $(@D)/boot/bcm2709-rpi-2-b.dtb $(BINARIES_DIR)/rpi-firmware/bcm2709-rpi-2-b.dtb
> >> -     $(INSTALL) -D -m 0644 $(@D)/boot/bcm2710-rpi-3-b.dtb $(BINARIES_DIR)/rpi-firmware/bcm2710-rpi-3-b.dtb
> >> +     for dtb in  $(@D)/boot/*.dtb; do \
> >> +             $(INSTALL) -D -m 0644 $${dtb} $(BINARIES_DIR)/rpi-firmware/$${dtb##*/} || exit 1; \
> >> +     done
> >
> > Which will install three additional dtb files (bcm2708-rpi-0-w.dtb,
> > bcm2708-rpi-cm.dtb and bcm2710-rpi-cm3.dtb), not a downside of the
> > patch, but worth mentioning....
> 
> Yes, it will also install the new bcm2710-rpi-3-b-plus.dtb. This code
> does not seem to have been kept updated, it's missing several dtb
> files as you mention.  I think it's better to just install all dtb
> files as we do for the dtbo files.

I wonder if we should not just drop BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTBS
now the rpi dtbs are now supposed to be in the kernel snce at least 3.19.

Besids, all our rpi defconfig are using the DT from the kernel, which is
another good indication that we don't need those from rpi-firmware
anymore...

If it is not yet in the kernel, it is just a matter of time before it is
available there...

Regards,
Yann E. MORIN.
Martin Bark March 15, 2018, 10:40 p.m. UTC | #4
Yann,

On 15 March 2018 at 21:59, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> Martin, All,
>
> On 2018-03-15 19:58 +0000, Martin Bark spake thusly:
>> On 15 March 2018 at 19:40, Peter Seiderer <ps.report@gmx.net> wrote:
>> > On Thu, 15 Mar 2018 13:24:51 +0000, Martin Bark <martin@barkynet.com> wrote:
>> >> Don't list specific dtb files, instead install all dtb files in the same
>> >> way as dtbo files are currently done.
>> >>
>> >> Signed-off-by: Martin Bark <martin@barkynet.com>
>> >> ---
>> >>  package/rpi-firmware/rpi-firmware.mk | 7 +++----
>> >>  1 file changed, 3 insertions(+), 4 deletions(-)
>> >>
>> >> diff --git a/package/rpi-firmware/rpi-firmware.mk b/package/rpi-firmware/rpi-firmware.mk
>> >> index 1ebdd96..9cc3d4a 100644
>> >> --- a/package/rpi-firmware/rpi-firmware.mk
>> >> +++ b/package/rpi-firmware/rpi-firmware.mk
>> >> @@ -12,10 +12,9 @@ RPI_FIRMWARE_INSTALL_IMAGES = YES
>> >>
>> >>  ifeq ($(BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTBS),y)
>> >>  define RPI_FIRMWARE_INSTALL_DTB
>> >> -     $(INSTALL) -D -m 0644 $(@D)/boot/bcm2708-rpi-b.dtb $(BINARIES_DIR)/rpi-firmware/bcm2708-rpi-b.dtb
>> >> -     $(INSTALL) -D -m 0644 $(@D)/boot/bcm2708-rpi-b-plus.dtb $(BINARIES_DIR)/rpi-firmware/bcm2708-rpi-b-plus.dtb
>> >> -     $(INSTALL) -D -m 0644 $(@D)/boot/bcm2709-rpi-2-b.dtb $(BINARIES_DIR)/rpi-firmware/bcm2709-rpi-2-b.dtb
>> >> -     $(INSTALL) -D -m 0644 $(@D)/boot/bcm2710-rpi-3-b.dtb $(BINARIES_DIR)/rpi-firmware/bcm2710-rpi-3-b.dtb
>> >> +     for dtb in  $(@D)/boot/*.dtb; do \
>> >> +             $(INSTALL) -D -m 0644 $${dtb} $(BINARIES_DIR)/rpi-firmware/$${dtb##*/} || exit 1; \
>> >> +     done
>> >
>> > Which will install three additional dtb files (bcm2708-rpi-0-w.dtb,
>> > bcm2708-rpi-cm.dtb and bcm2710-rpi-cm3.dtb), not a downside of the
>> > patch, but worth mentioning....
>>
>> Yes, it will also install the new bcm2710-rpi-3-b-plus.dtb. This code
>> does not seem to have been kept updated, it's missing several dtb
>> files as you mention.  I think it's better to just install all dtb
>> files as we do for the dtbo files.
>
> I wonder if we should not just drop BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTBS
> now the rpi dtbs are now supposed to be in the kernel snce at least 3.19.

Yes it would be good to remove this.  It would also be good to remove
BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTB_OVERLAYS and have them built as
part of the kernel.  Really only the booloader and /op/vc code is
needed from rpi-firmware.

Thanks

Martin

>
> Besids, all our rpi defconfig are using the DT from the kernel, which is
> another good indication that we don't need those from rpi-firmware
> anymore...
>
> If it is not yet in the kernel, it is just a matter of time before it is
> available there...
>
> Regards,
> Yann E. MORIN.
>
> --
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> | +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> '------------------------------^-------^------------------^--------------------'
Jens Maus March 16, 2018, 9:32 a.m. UTC | #5
BTW: As you seem to push updates regarding Pi3+ I have some more patches at hand for you :)

https://github.com/jens-maus/RaspberryMatic/blob/master/buildroot-patches/0003-rpi-wifi-firmware.patch
https://github.com/jens-maus/RaspberryMatic/blob/master/buildroot-patches/0004-wiringpi.patch

The first is to actually get WiFi working again because the NVRAM settings file is different for the new WiFi chip of the Pi3+. The second updates the wiringpi package to the latest master version which fixes compatibility to the Pi3+.

Sorry that I am not able to submit these patches myself via patchwork to buildroot, but my time is unfortunately limited these days. However, feel free to submit these patches yourself.

Regards,
Jens

> Am 15.03.2018 um 23:40 schrieb Martin Bark <martin@barkynet.com>:
> 
> Yann,
> 
> On 15 March 2018 at 21:59, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
>> Martin, All,
>> 
>> On 2018-03-15 19:58 +0000, Martin Bark spake thusly:
>>> On 15 March 2018 at 19:40, Peter Seiderer <ps.report@gmx.net> wrote:
>>>> On Thu, 15 Mar 2018 13:24:51 +0000, Martin Bark <martin@barkynet.com> wrote:
>>>>> Don't list specific dtb files, instead install all dtb files in the same
>>>>> way as dtbo files are currently done.
>>>>> 
>>>>> Signed-off-by: Martin Bark <martin@barkynet.com>
>>>>> ---
>>>>> package/rpi-firmware/rpi-firmware.mk | 7 +++----
>>>>> 1 file changed, 3 insertions(+), 4 deletions(-)
>>>>> 
>>>>> diff --git a/package/rpi-firmware/rpi-firmware.mk b/package/rpi-firmware/rpi-firmware.mk
>>>>> index 1ebdd96..9cc3d4a 100644
>>>>> --- a/package/rpi-firmware/rpi-firmware.mk
>>>>> +++ b/package/rpi-firmware/rpi-firmware.mk
>>>>> @@ -12,10 +12,9 @@ RPI_FIRMWARE_INSTALL_IMAGES = YES
>>>>> 
>>>>> ifeq ($(BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTBS),y)
>>>>> define RPI_FIRMWARE_INSTALL_DTB
>>>>> -     $(INSTALL) -D -m 0644 $(@D)/boot/bcm2708-rpi-b.dtb $(BINARIES_DIR)/rpi-firmware/bcm2708-rpi-b.dtb
>>>>> -     $(INSTALL) -D -m 0644 $(@D)/boot/bcm2708-rpi-b-plus.dtb $(BINARIES_DIR)/rpi-firmware/bcm2708-rpi-b-plus.dtb
>>>>> -     $(INSTALL) -D -m 0644 $(@D)/boot/bcm2709-rpi-2-b.dtb $(BINARIES_DIR)/rpi-firmware/bcm2709-rpi-2-b.dtb
>>>>> -     $(INSTALL) -D -m 0644 $(@D)/boot/bcm2710-rpi-3-b.dtb $(BINARIES_DIR)/rpi-firmware/bcm2710-rpi-3-b.dtb
>>>>> +     for dtb in  $(@D)/boot/*.dtb; do \
>>>>> +             $(INSTALL) -D -m 0644 $${dtb} $(BINARIES_DIR)/rpi-firmware/$${dtb##*/} || exit 1; \
>>>>> +     done
>>>> 
>>>> Which will install three additional dtb files (bcm2708-rpi-0-w.dtb,
>>>> bcm2708-rpi-cm.dtb and bcm2710-rpi-cm3.dtb), not a downside of the
>>>> patch, but worth mentioning....
>>> 
>>> Yes, it will also install the new bcm2710-rpi-3-b-plus.dtb. This code
>>> does not seem to have been kept updated, it's missing several dtb
>>> files as you mention.  I think it's better to just install all dtb
>>> files as we do for the dtbo files.
>> 
>> I wonder if we should not just drop BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTBS
>> now the rpi dtbs are now supposed to be in the kernel snce at least 3.19.
> 
> Yes it would be good to remove this.  It would also be good to remove
> BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTB_OVERLAYS and have them built as
> part of the kernel.  Really only the booloader and /op/vc code is
> needed from rpi-firmware.
> 
> Thanks
> 
> Martin
> 
>> 
>> Besids, all our rpi defconfig are using the DT from the kernel, which is
>> another good indication that we don't need those from rpi-firmware
>> anymore...
>> 
>> If it is not yet in the kernel, it is just a matter of time before it is
>> available there...
>> 
>> Regards,
>> Yann E. MORIN.
>> 
>> --
>> .-----------------.--------------------.------------------.--------------------.
>> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
>> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
>> | +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
>> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
>> '------------------------------^-------^------------------^--------------------'
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
Martin Bark March 16, 2018, 10:52 a.m. UTC | #6
Jenus,

On 16 March 2018 at 09:32, Jens Maus <mail@jens-maus.de> wrote:
> BTW: As you seem to push updates regarding Pi3+ I have some more patches at hand for you :)
>
> https://github.com/jens-maus/RaspberryMatic/blob/master/buildroot-patches/0003-rpi-wifi-firmware.patch
> https://github.com/jens-maus/RaspberryMatic/blob/master/buildroot-patches/0004-wiringpi.patch
>
> The first is to actually get WiFi working again because the NVRAM settings file is different for the new WiFi chip of the Pi3+. The second updates the wiringpi package to the latest master version which fixes compatibility to the Pi3+.
>
> Sorry that I am not able to submit these patches myself via patchwork to buildroot, but my time is unfortunately limited these days. However, feel free to submit these patches yourself.

Yes I'm happy to submit a patch to update rpi-wifi-firmware.  I have a
rpi3b+ now so i can test this.  I don't use wiringpi so i think it
might be better if someone else more familiar with the package updates
it.

For some reason my v2 patch set disappeared into /dev/null in
patchwork.   I'll include the updates to rpi-wifi-firmware and submit
a v3 patchset.

Thanks

Martin

>
> Regards,
> Jens

[--SNIP--]

>
> --
> Jens Maus, Dresden/Germany
> http://jens-maus.de/
>
> *** Content is authentic only with digital signature  ***
>
Peter Korsgaard March 16, 2018, 1:07 p.m. UTC | #7
>>>>> "Martin" == Martin Bark <martin@barkynet.com> writes:

Hi,

 > For some reason my v2 patch set disappeared into /dev/null in
 > patchwork.   I'll include the updates to rpi-wifi-firmware and submit
 > a v3 patchset.

We unfortunately have some reliability issues with patchwork at the
moment - Thanks for sending v3.
Jens Maus March 16, 2018, 1:12 p.m. UTC | #8
Hi,

> Am 16.03.2018 um 11:52 schrieb Martin Bark <martin@barkynet.com>:
> 
> Yes I'm happy to submit a patch to update rpi-wifi-firmware.  I have a
> rpi3b+ now so i can test this.  I don't use wiringpi so i think it
> might be better if someone else more familiar with the package updates
> it.

My patch for wiringpi is quite straight forward and „just“ updates to the latest 2.46 version recently released including necessary patches to the build process patch. IMHO they are quite a no-brainer and can be integrated without any bigger hassle. Thus, it would be great if someone could generate the necessary patchwork stuff accordingly.

Regards,
Jens
Martin Bark March 16, 2018, 6:08 p.m. UTC | #9
Jens,

On 16 March 2018 at 13:12, Jens Maus <mail@jens-maus.de> wrote:
> Hi,
>
>> Am 16.03.2018 um 11:52 schrieb Martin Bark <martin@barkynet.com>:
>>
>> Yes I'm happy to submit a patch to update rpi-wifi-firmware.  I have a
>> rpi3b+ now so i can test this.  I don't use wiringpi so i think it
>> might be better if someone else more familiar with the package updates
>> it.
>
> My patch for wiringpi is quite straight forward and „just“ updates to the latest 2.46 version recently released including necessary patches to the build process patch. IMHO they are quite a no-brainer and can be integrated without any bigger hassle. Thus, it would be great if someone could generate the necessary patchwork stuff accordingly.

I've just submitted a v3 patchset that additionally includes the wifi
and bt firmware updates.  Once this patchset is in buildroot i'll try
and have a look at wiringpi

Thanks

Martin

>
> Regards,
> Jens
> --
> Jens Maus, Dresden/Germany
> http://jens-maus.de/
>
> *** Content is authentic only with digital signature  ***
>
diff mbox series

Patch

diff --git a/package/rpi-firmware/rpi-firmware.mk b/package/rpi-firmware/rpi-firmware.mk
index 1ebdd96..9cc3d4a 100644
--- a/package/rpi-firmware/rpi-firmware.mk
+++ b/package/rpi-firmware/rpi-firmware.mk
@@ -12,10 +12,9 @@  RPI_FIRMWARE_INSTALL_IMAGES = YES
 
 ifeq ($(BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTBS),y)
 define RPI_FIRMWARE_INSTALL_DTB
-	$(INSTALL) -D -m 0644 $(@D)/boot/bcm2708-rpi-b.dtb $(BINARIES_DIR)/rpi-firmware/bcm2708-rpi-b.dtb
-	$(INSTALL) -D -m 0644 $(@D)/boot/bcm2708-rpi-b-plus.dtb $(BINARIES_DIR)/rpi-firmware/bcm2708-rpi-b-plus.dtb
-	$(INSTALL) -D -m 0644 $(@D)/boot/bcm2709-rpi-2-b.dtb $(BINARIES_DIR)/rpi-firmware/bcm2709-rpi-2-b.dtb
-	$(INSTALL) -D -m 0644 $(@D)/boot/bcm2710-rpi-3-b.dtb $(BINARIES_DIR)/rpi-firmware/bcm2710-rpi-3-b.dtb
+	for dtb in  $(@D)/boot/*.dtb; do \
+		$(INSTALL) -D -m 0644 $${dtb} $(BINARIES_DIR)/rpi-firmware/$${dtb##*/} || exit 1; \
+	done
 endef
 endif