diff mbox series

[LEDE-DEV,RFC,2/3] ipq: Don't force selection of the IPQ4019 firmware.

Message ID 1509753940-29058-2-git-send-email-greearb@candelatech.com
State RFC
Headers show
Series [LEDE-DEV,RFC,1/3] Update to latest ath10k-ct driver, enable AHB. | expand

Commit Message

Ben Greear Nov. 4, 2017, 12:05 a.m. UTC
From: Ben Greear <greearb@candelatech.com>

This will allow us to select the CT IPQ4019 firmware instead if
desired.

Signed-off-by: Ben Greear <greearb@candelatech.com>
---
 package/firmware/ipq-wifi/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Christian Lamparter Nov. 4, 2017, 12:58 a.m. UTC | #1
On Friday, November 3, 2017 5:05:39 PM CET greearb@candelatech.com wrote:
> From: Ben Greear <greearb@candelatech.com>
> 
> This will allow us to select the CT IPQ4019 firmware instead if
> desired.
> 
> Signed-off-by: Ben Greear <greearb@candelatech.com>
> ---
>  package/firmware/ipq-wifi/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile
> index aec8bf2..31d0fbf 100644
> --- a/package/firmware/ipq-wifi/Makefile
> +++ b/package/firmware/ipq-wifi/Makefile
> @@ -20,7 +20,7 @@ define Package/ipq-wifi-default
>    SUBMENU:=ath10k IPQ4019 Boarddata
>    SECTION:=firmware
>    CATEGORY:=Firmware
> -  DEPENDS:=@TARGET_ipq806x +ath10k-firmware-qca4019
> +  DEPENDS:=@TARGET_ipq806x
Hm, this would break the WIFI in the default configuration for the 
FritzBox 4040 image. Currently it only has a dependency on the 
ipq-wifi-fritz4040. (So it will end up without a firmware-5.bin)

Please also note that the ipq-wifi boards need to overwrite the 
board-2.bin provided by the ath10k-firmware-qca4019(-ct) packages.
So switching (or up-/downgrading) these wifi-firmwares will always
require the (manual) reinstallation of the ipq-wifi board
(if available).
Ben Greear Nov. 4, 2017, 3:15 a.m. UTC | #2
On 11/03/2017 05:58 PM, Christian Lamparter wrote:
> On Friday, November 3, 2017 5:05:39 PM CET greearb@candelatech.com wrote:
>> From: Ben Greear <greearb@candelatech.com>
>>
>> This will allow us to select the CT IPQ4019 firmware instead if
>> desired.
>>
>> Signed-off-by: Ben Greear <greearb@candelatech.com>
>> ---
>>  package/firmware/ipq-wifi/Makefile | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile
>> index aec8bf2..31d0fbf 100644
>> --- a/package/firmware/ipq-wifi/Makefile
>> +++ b/package/firmware/ipq-wifi/Makefile
>> @@ -20,7 +20,7 @@ define Package/ipq-wifi-default
>>    SUBMENU:=ath10k IPQ4019 Boarddata
>>    SECTION:=firmware
>>    CATEGORY:=Firmware
>> -  DEPENDS:=@TARGET_ipq806x +ath10k-firmware-qca4019
>> +  DEPENDS:=@TARGET_ipq806x
> Hm, this would break the WIFI in the default configuration for the
> FritzBox 4040 image. Currently it only has a dependency on the
> ipq-wifi-fritz4040. (So it will end up without a firmware-5.bin)
>
> Please also note that the ipq-wifi boards need to overwrite the
> board-2.bin provided by the ath10k-firmware-qca4019(-ct) packages.
> So switching (or up-/downgrading) these wifi-firmwares will always
> require the (manual) reinstallation of the ipq-wifi board
> (if available).

Maybe have the custom board.data file named slightly differently
and then have an early fixup script to copy it into the proper place
on first boot?  And, we could hack the driver to look for a custom
board-2.bin first and just install both board-x.bin images.

And, can we have the IPQ boards select the stock 4019 firmware by default
but still allow it to be de-selected so CT firmware can be selected?

Or if not, then I can call my firmware something different, and have my
driver look for it before the firmware-5.bin.

Thanks,
Ben
Christian Lamparter Nov. 4, 2017, 3:14 p.m. UTC | #3
On Friday, November 3, 2017 8:15:00 PM CET Ben Greear wrote:
> 
> On 11/03/2017 05:58 PM, Christian Lamparter wrote:
> > On Friday, November 3, 2017 5:05:39 PM CET greearb@candelatech.com wrote:
> >> From: Ben Greear <greearb@candelatech.com>
> >>
> >> This will allow us to select the CT IPQ4019 firmware instead if
> >> desired.
> >>
> >> Signed-off-by: Ben Greear <greearb@candelatech.com>
> >> ---
> >>  package/firmware/ipq-wifi/Makefile | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile
> >> index aec8bf2..31d0fbf 100644
> >> --- a/package/firmware/ipq-wifi/Makefile
> >> +++ b/package/firmware/ipq-wifi/Makefile
> >> @@ -20,7 +20,7 @@ define Package/ipq-wifi-default
> >>    SUBMENU:=ath10k IPQ4019 Boarddata
> >>    SECTION:=firmware
> >>    CATEGORY:=Firmware
> >> -  DEPENDS:=@TARGET_ipq806x +ath10k-firmware-qca4019
> >> +  DEPENDS:=@TARGET_ipq806x
> > Hm, this would break the WIFI in the default configuration for the
> > FritzBox 4040 image. Currently it only has a dependency on the
> > ipq-wifi-fritz4040. (So it will end up without a firmware-5.bin)
> >
> > Please also note that the ipq-wifi boards need to overwrite the
> > board-2.bin provided by the ath10k-firmware-qca4019(-ct) packages.
> > So switching (or up-/downgrading) these wifi-firmwares will always
> > require the (manual) reinstallation of the ipq-wifi board
> > (if available).
> 
> Maybe have the custom board.data file named slightly differently
> and then have an early fixup script to copy it into the proper place
> on first boot?  And, we could hack the driver to look for a custom
> board-2.bin first and just install both board-x.bin images.
Depends, can you convince the ath10k upstream to do that?
> 
> And, can we have the IPQ boards select the stock 4019 firmware by default
> but still allow it to be de-selected so CT firmware can be selected?
>
> Or if not, then I can call my firmware something different, and have my
> driver look for it before the firmware-5.bin.

I think there's a another way to do this. But it will require to break with
the existing convention of adding the board-2.bin that comes with the
firmware repository to the ath10k-firmware-qca4019 file.

This way, the custom board-2.bin will stay in place when you switch/update
the firmware-5.bin. 

(The board-2.bin for the reference boards can simply be packaged just like
one of the ipq-wifi board firmwares). And furhtermore, you could provide a
"easy to use/install" custom ipq-wifi.ipk for the board-2.bin you currently
host on your webside.

Regards,
Christian
Ben Greear Nov. 4, 2017, 4:38 p.m. UTC | #4
On 11/04/2017 08:14 AM, Christian Lamparter wrote:
> On Friday, November 3, 2017 8:15:00 PM CET Ben Greear wrote:
>>
>> On 11/03/2017 05:58 PM, Christian Lamparter wrote:
>>> On Friday, November 3, 2017 5:05:39 PM CET greearb@candelatech.com wrote:
>>>> From: Ben Greear <greearb@candelatech.com>
>>>>
>>>> This will allow us to select the CT IPQ4019 firmware instead if
>>>> desired.
>>>>
>>>> Signed-off-by: Ben Greear <greearb@candelatech.com>
>>>> ---
>>>>  package/firmware/ipq-wifi/Makefile | 2 +-
>>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile
>>>> index aec8bf2..31d0fbf 100644
>>>> --- a/package/firmware/ipq-wifi/Makefile
>>>> +++ b/package/firmware/ipq-wifi/Makefile
>>>> @@ -20,7 +20,7 @@ define Package/ipq-wifi-default
>>>>    SUBMENU:=ath10k IPQ4019 Boarddata
>>>>    SECTION:=firmware
>>>>    CATEGORY:=Firmware
>>>> -  DEPENDS:=@TARGET_ipq806x +ath10k-firmware-qca4019
>>>> +  DEPENDS:=@TARGET_ipq806x
>>> Hm, this would break the WIFI in the default configuration for the
>>> FritzBox 4040 image. Currently it only has a dependency on the
>>> ipq-wifi-fritz4040. (So it will end up without a firmware-5.bin)
>>>
>>> Please also note that the ipq-wifi boards need to overwrite the
>>> board-2.bin provided by the ath10k-firmware-qca4019(-ct) packages.
>>> So switching (or up-/downgrading) these wifi-firmwares will always
>>> require the (manual) reinstallation of the ipq-wifi board
>>> (if available).
>>
>> Maybe have the custom board.data file named slightly differently
>> and then have an early fixup script to copy it into the proper place
>> on first boot?  And, we could hack the driver to look for a custom
>> board-2.bin first and just install both board-x.bin images.
> Depends, can you convince the ath10k upstream to do that?

Upstream is unlikely to accept such a patch, but I can at least
patch my driver, and we can patch lede's 'upstream' driver too if
we need to.

We can also have a ath10k-pre-startup.sh that copies a custom board
file into place when starting LEDE, with no driver modifications needed
at all.  I think several targets do something like this already by grabbing the board file
from a flash location on the AP, for instance.

>>
>> And, can we have the IPQ boards select the stock 4019 firmware by default
>> but still allow it to be de-selected so CT firmware can be selected?
>>
>> Or if not, then I can call my firmware something different, and have my
>> driver look for it before the firmware-5.bin.
>
> I think there's a another way to do this. But it will require to break with
> the existing convention of adding the board-2.bin that comes with the
> firmware repository to the ath10k-firmware-qca4019 file.
>
> This way, the custom board-2.bin will stay in place when you switch/update
> the firmware-5.bin.

That seems fine to me.  Then targets could select a custom board file or
a stock board file, independent of the firmware and driver.

>
> (The board-2.bin for the reference boards can simply be packaged just like
> one of the ipq-wifi board firmwares). And furhtermore, you could provide a
> "easy to use/install" custom ipq-wifi.ipk for the board-2.bin you currently
> host on your webside.

The only board-2.bin that I (might?) have on my web site is one modified for
some newer 9984 NICs from Compex.  The 'ath10k-ct' firmware target just uses the
default board-2.bin file from upstream.

I guess someone could host/build ath10k-ct firmware ipks, but I think that might
be more useful for some more standard LEDE build-farm to host since the goal is to
have all of this in LEDE anyway.

Thanks,
Ben
Matthew McClintock Nov. 15, 2017, 12:35 a.m. UTC | #5
What ever came of this? Did something upstream or in LEDE/OpenWrt
resolve what files should be loaded from where?

-M

On Sat, Nov 4, 2017 at 11:38 AM, Ben Greear <greearb@candelatech.com> wrote:
>
>
> On 11/04/2017 08:14 AM, Christian Lamparter wrote:
>>
>> On Friday, November 3, 2017 8:15:00 PM CET Ben Greear wrote:
>>>
>>>
>>> On 11/03/2017 05:58 PM, Christian Lamparter wrote:
>>>>
>>>> On Friday, November 3, 2017 5:05:39 PM CET greearb@candelatech.com
>>>> wrote:
>>>>>
>>>>> From: Ben Greear <greearb@candelatech.com>
>>>>>
>>>>> This will allow us to select the CT IPQ4019 firmware instead if
>>>>> desired.
>>>>>
>>>>> Signed-off-by: Ben Greear <greearb@candelatech.com>
>>>>> ---
>>>>>  package/firmware/ipq-wifi/Makefile | 2 +-
>>>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/package/firmware/ipq-wifi/Makefile
>>>>> b/package/firmware/ipq-wifi/Makefile
>>>>> index aec8bf2..31d0fbf 100644
>>>>> --- a/package/firmware/ipq-wifi/Makefile
>>>>> +++ b/package/firmware/ipq-wifi/Makefile
>>>>> @@ -20,7 +20,7 @@ define Package/ipq-wifi-default
>>>>>    SUBMENU:=ath10k IPQ4019 Boarddata
>>>>>    SECTION:=firmware
>>>>>    CATEGORY:=Firmware
>>>>> -  DEPENDS:=@TARGET_ipq806x +ath10k-firmware-qca4019
>>>>> +  DEPENDS:=@TARGET_ipq806x
>>>>
>>>> Hm, this would break the WIFI in the default configuration for the
>>>> FritzBox 4040 image. Currently it only has a dependency on the
>>>> ipq-wifi-fritz4040. (So it will end up without a firmware-5.bin)
>>>>
>>>> Please also note that the ipq-wifi boards need to overwrite the
>>>> board-2.bin provided by the ath10k-firmware-qca4019(-ct) packages.
>>>> So switching (or up-/downgrading) these wifi-firmwares will always
>>>> require the (manual) reinstallation of the ipq-wifi board
>>>> (if available).
>>>
>>>
>>> Maybe have the custom board.data file named slightly differently
>>> and then have an early fixup script to copy it into the proper place
>>> on first boot?  And, we could hack the driver to look for a custom
>>> board-2.bin first and just install both board-x.bin images.
>>
>> Depends, can you convince the ath10k upstream to do that?
>
>
> Upstream is unlikely to accept such a patch, but I can at least
> patch my driver, and we can patch lede's 'upstream' driver too if
> we need to.
>
> We can also have a ath10k-pre-startup.sh that copies a custom board
> file into place when starting LEDE, with no driver modifications needed
> at all.  I think several targets do something like this already by grabbing
> the board file
> from a flash location on the AP, for instance.
>
>>>
>>> And, can we have the IPQ boards select the stock 4019 firmware by default
>>> but still allow it to be de-selected so CT firmware can be selected?
>>>
>>> Or if not, then I can call my firmware something different, and have my
>>> driver look for it before the firmware-5.bin.
>>
>>
>> I think there's a another way to do this. But it will require to break
>> with
>> the existing convention of adding the board-2.bin that comes with the
>> firmware repository to the ath10k-firmware-qca4019 file.
>>
>> This way, the custom board-2.bin will stay in place when you switch/update
>> the firmware-5.bin.
>
>
> That seems fine to me.  Then targets could select a custom board file or
> a stock board file, independent of the firmware and driver.
>
>>
>> (The board-2.bin for the reference boards can simply be packaged just like
>> one of the ipq-wifi board firmwares). And furhtermore, you could provide a
>> "easy to use/install" custom ipq-wifi.ipk for the board-2.bin you
>> currently
>> host on your webside.
>
>
> The only board-2.bin that I (might?) have on my web site is one modified for
> some newer 9984 NICs from Compex.  The 'ath10k-ct' firmware target just uses
> the
> default board-2.bin file from upstream.
>
> I guess someone could host/build ath10k-ct firmware ipks, but I think that
> might
> be more useful for some more standard LEDE build-farm to host since the goal
> is to
> have all of this in LEDE anyway.
>
> Thanks,
> Ben
>
> --
> Ben Greear <greearb@candelatech.com>
> Candela Technologies Inc  http://www.candelatech.com
>
> _______________________________________________
> Lede-dev mailing list
> Lede-dev@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev
Ben Greear Nov. 16, 2017, 6:53 p.m. UTC | #6
I don't have the energy to try to push something like this to the upstream kernel,
and little hope it would be accepted if I were to try.

I think modifying LEDE is more possible, but I have not made any
effort on this.  My interest is mainly with the firmware and
driver, and I hope that someone else can deal with the infrastructure
in LEDE to load the proper board file.

Thanks,
Ben

On 11/14/2017 04:35 PM, Matthew McClintock wrote:
> What ever came of this? Did something upstream or in LEDE/OpenWrt
> resolve what files should be loaded from where?
>
> -M
>
> On Sat, Nov 4, 2017 at 11:38 AM, Ben Greear <greearb@candelatech.com> wrote:
>>
>>
>> On 11/04/2017 08:14 AM, Christian Lamparter wrote:
>>>
>>> On Friday, November 3, 2017 8:15:00 PM CET Ben Greear wrote:
>>>>
>>>>
>>>> On 11/03/2017 05:58 PM, Christian Lamparter wrote:
>>>>>
>>>>> On Friday, November 3, 2017 5:05:39 PM CET greearb@candelatech.com
>>>>> wrote:
>>>>>>
>>>>>> From: Ben Greear <greearb@candelatech.com>
>>>>>>
>>>>>> This will allow us to select the CT IPQ4019 firmware instead if
>>>>>> desired.
>>>>>>
>>>>>> Signed-off-by: Ben Greear <greearb@candelatech.com>
>>>>>> ---
>>>>>>  package/firmware/ipq-wifi/Makefile | 2 +-
>>>>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>>>>
>>>>>> diff --git a/package/firmware/ipq-wifi/Makefile
>>>>>> b/package/firmware/ipq-wifi/Makefile
>>>>>> index aec8bf2..31d0fbf 100644
>>>>>> --- a/package/firmware/ipq-wifi/Makefile
>>>>>> +++ b/package/firmware/ipq-wifi/Makefile
>>>>>> @@ -20,7 +20,7 @@ define Package/ipq-wifi-default
>>>>>>    SUBMENU:=ath10k IPQ4019 Boarddata
>>>>>>    SECTION:=firmware
>>>>>>    CATEGORY:=Firmware
>>>>>> -  DEPENDS:=@TARGET_ipq806x +ath10k-firmware-qca4019
>>>>>> +  DEPENDS:=@TARGET_ipq806x
>>>>>
>>>>> Hm, this would break the WIFI in the default configuration for the
>>>>> FritzBox 4040 image. Currently it only has a dependency on the
>>>>> ipq-wifi-fritz4040. (So it will end up without a firmware-5.bin)
>>>>>
>>>>> Please also note that the ipq-wifi boards need to overwrite the
>>>>> board-2.bin provided by the ath10k-firmware-qca4019(-ct) packages.
>>>>> So switching (or up-/downgrading) these wifi-firmwares will always
>>>>> require the (manual) reinstallation of the ipq-wifi board
>>>>> (if available).
>>>>
>>>>
>>>> Maybe have the custom board.data file named slightly differently
>>>> and then have an early fixup script to copy it into the proper place
>>>> on first boot?  And, we could hack the driver to look for a custom
>>>> board-2.bin first and just install both board-x.bin images.
>>>
>>> Depends, can you convince the ath10k upstream to do that?
>>
>>
>> Upstream is unlikely to accept such a patch, but I can at least
>> patch my driver, and we can patch lede's 'upstream' driver too if
>> we need to.
>>
>> We can also have a ath10k-pre-startup.sh that copies a custom board
>> file into place when starting LEDE, with no driver modifications needed
>> at all.  I think several targets do something like this already by grabbing
>> the board file
>> from a flash location on the AP, for instance.
>>
>>>>
>>>> And, can we have the IPQ boards select the stock 4019 firmware by default
>>>> but still allow it to be de-selected so CT firmware can be selected?
>>>>
>>>> Or if not, then I can call my firmware something different, and have my
>>>> driver look for it before the firmware-5.bin.
>>>
>>>
>>> I think there's a another way to do this. But it will require to break
>>> with
>>> the existing convention of adding the board-2.bin that comes with the
>>> firmware repository to the ath10k-firmware-qca4019 file.
>>>
>>> This way, the custom board-2.bin will stay in place when you switch/update
>>> the firmware-5.bin.
>>
>>
>> That seems fine to me.  Then targets could select a custom board file or
>> a stock board file, independent of the firmware and driver.
>>
>>>
>>> (The board-2.bin for the reference boards can simply be packaged just like
>>> one of the ipq-wifi board firmwares). And furhtermore, you could provide a
>>> "easy to use/install" custom ipq-wifi.ipk for the board-2.bin you
>>> currently
>>> host on your webside.
>>
>>
>> The only board-2.bin that I (might?) have on my web site is one modified for
>> some newer 9984 NICs from Compex.  The 'ath10k-ct' firmware target just uses
>> the
>> default board-2.bin file from upstream.
>>
>> I guess someone could host/build ath10k-ct firmware ipks, but I think that
>> might
>> be more useful for some more standard LEDE build-farm to host since the goal
>> is to
>> have all of this in LEDE anyway.
>>
>> Thanks,
>> Ben
>>
>> --
>> Ben Greear <greearb@candelatech.com>
>> Candela Technologies Inc  http://www.candelatech.com
>>
>> _______________________________________________
>> Lede-dev mailing list
>> Lede-dev@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/lede-dev
>
diff mbox series

Patch

diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile
index aec8bf2..31d0fbf 100644
--- a/package/firmware/ipq-wifi/Makefile
+++ b/package/firmware/ipq-wifi/Makefile
@@ -20,7 +20,7 @@  define Package/ipq-wifi-default
   SUBMENU:=ath10k IPQ4019 Boarddata
   SECTION:=firmware
   CATEGORY:=Firmware
-  DEPENDS:=@TARGET_ipq806x +ath10k-firmware-qca4019
+  DEPENDS:=@TARGET_ipq806x
   TITLE:=Custom Board
 endef