Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: installboot(8) changes for installing u-boot directly to SPI flash (or other raw flash devices)



Ah, I had only been building as a host tool so far.  I’ll fix it up today.

-- thorpej
Sent from my iPhone.

> On Sep 16, 2019, at 3:15 AM, Manuel Bouyer <bouyer%antioche.eu.org@localhost> wrote:
> 
>> On Mon, Sep 16, 2019 at 12:04:38PM +0200, Manuel Bouyer wrote:
>>> On Sun, Sep 15, 2019 at 02:44:42PM -0700, Jason Thorpe wrote:
>>> 
>>>> On Sep 14, 2019, at 9:59 AM, Jason Thorpe <thorpej%me.com@localhost> wrote:
>>>> 
>>>> 
>>>>> On Sep 14, 2019, at 3:07 AM, Tobias Nygren <tnn%NetBSD.org@localhost> wrote:
>>>>> 
>>>>> Hi,
>>>>> 
>>>>> It's a good addition.  A feature that might be useful is ability to
>>>>> have a different input and output block size with option to insert
>>>>> padding. The Rockchip SPI stage 1 loader has to have input block size
>>>>> of 2kB and output block size of 4kB, i.e. 2kB blocks are interleaved
>>>>> with 2kB of NUL bytes. In the U-Boot package I created a special file
>>>>> with the padding built in, but if we can handle the padding from the
>>>>> tool we can use the same image for both SD-card and SPI.
>>>> 
>>>> Oh, interesting.  This seems different even than the output block size that makes the flash happiest (my interpretation of the previous dd examples you and bouyer@ posted is that the obs you used was intended to line up with he flash erase unit size).
>>> 
>>> Ok, I've updated the diff:
>>> 
>>>    https://github.com/thorpej/netbsd-src/pull/30/files
>> 
>> It does't build for me:
>> --- dependall-installboot ---
>> /dsk/l1/misc/bouyer/HEAD/clean/src/usr.sbin/installboot/evboards.c: In function 
>> 'evb_uboot_setboot':
>> /dsk/l1/misc/bouyer/HEAD/clean/src/usr.sbin/installboot/evboards.c:1869:5: error
>> : 'blockbuf' may be used uninitialized in this function [-Werror=maybe-uninitial
>> ized]
>>  if (blockbuf)
>>     ^
>> /dsk/l1/misc/bouyer/HEAD/clean/src/usr.sbin/installboot/evboards.c:1677:8: note:
>> 'blockbuf' was declared here
>>  char *blockbuf;
>>        ^~~~~~~~
>> 
>> But note that I don't know how to get a diff from a github pull request;
>> I just downloaded evboards.c. Maybe I missed something ...
> 
> Looks like it needs
>    char *blockbuf = NULL;
> 
> But even after fixing this I get other errors (missing prototypes,
> comparison between signed and unsigned, ...)
> 
> -- 
> Manuel Bouyer <bouyer%antioche.eu.org@localhost>
>     NetBSD: 26 ans d'experience feront toujours la difference
> --



Home | Main Index | Thread Index | Old Index