[LEDE-DEV] [PATCH v5 2/3] ipq806x: Add support for new device: tew827dru
Mathias Kresin
dev at kresin.me
Sun Dec 11 06:15:25 PST 2016
05.12.2016 03:43, J Mo:
> On 12/01/2016 11:18 PM, Mathias Kresin wrote:
>> 02.12.2016 06:28, J Mo:
>>> On 11/27/2016 02:29 AM, Mathias Kresin wrote:
>>> Can you please clarify what of my previous reply it is that you don't
>>> understand so that I can do a better job of explaining it?
>>
>> The problem is quite simple, I don't get how the signature created by
>> Build/cameo-sig should look like. And the way the signature is created
>> looks way to complex to me.
>>
>> Mentioning that it's a cameo signature does not help at all, as long
>> as you don't provide a link to some kind of specification how this
>> signature format should look like.
>>
>> I expect to see a human readable explantation of what the code should
>> do. Hence I asked you back in the days:
>>
>> > Do you want to add the signature to a 64 byte padded image or should
>> > the image + signature padded to a multiple of 64byte? Where does the
>> > 64 byte does come from? It doesn't seam to be related to the 128k
>> > blocksize of the flash
>>
>> With the new image build code, we have a lot of helper for doing
>> padding without the need of a single line of custom code. But as long
>> as I don't understand how the resulting signature should look
>> like/should be padded, I can not point you to the correct helper for
>> the job.
>
> My requirements are the same as the Image/Build/Cameo target in
> target/linux/ar71xx/image/legacy.mk.
>
> There are two devices in particular which require a similar signature
> method: TEW-632BRP (CameoAP81) and TEW-823DRU (CameoAP135). Both are
> already in LEDE.
>
> The TEW-632BRP (CameoAP81) is an ancient device from 2004. I just
> happened to have two of them, so I was vaguely familiar with this
> requirement before I acquired my new device.
>
> The TEW-823DRU (CameoAP135) is both very recent and architecturally
> similar to the tew827dru. It's also based on the same upstream source
> (QSDK).
>
> The makefile portion that I wrote was intended to duplicate the same
> image generation functionality so that it would be useful for future
> devices. I looked at existing tools prior to making my own and didn't
> find anything that would do what I needed.
>
> The image needs to be byte-aligned with the signature inside. The 64 was
> backwards compatible with the old default from the old makefiles, but it
> works for this device too. The actual blocksize is not relevant to my
> device because of it being a FIT image.
Still not the answer I expected, but I got it.
target/linux/ar71xx/image/legacy.mk is for boards using the old image
build code (as indicated by the term legacy).
Board support patches creating images the old way or duplicating any
legacy stuff will not be accepted any more.
Please find a way to do the padding using the pad* helpers in
include/image-commands.mk. If patches still using the old image build
code were accepted in the past, it was a mistake.
>> You are aware that tools/firmware-utils has a mkcameofw? Not sure if
>> it's the same format you need.
>
> Not applicable here and I'm not sure why you would bring it up.
Well that one is obvious to me. You are talking about an cameo signature
and I found a tool that creates a cameo firmware. But I even wrote that
I'm not sure if mkcameofw is related to the cameo signature or used for
something different.
Mathias
More information about the Lede-dev
mailing list