[LEDE-DEV] mkimage producing FIT images without data files
J Mo
jmomo at jmomo.net
Sat Aug 6 20:06:30 PDT 2016
It looks like the "data =" field was not what mkimage wanted it to be.
Unfortunately, the extent of documentation on this is:
"data : Path to the external file which contains this node's binary data."
Which is not helpful given that the format is peculiar.
The following are examples I found while searching:
data = /incbin/("${2}");
data = /incbin/("./vmlinux.bin.gz");
data = /incbin/("path/to/data/file.bin")
data = /incbin/(\"${KERNEL}\");
I am guessing the first portion is a path and the second is the file
name relative to that path. Why that format is needed is unexplained.
I don't have anything good to say about u-boot/denx documentation.
On 08/06/2016 04:05 PM, J Mo wrote:
>
> Sorry, I forgot to include this stdout from running mkimage manually:
>
> FIT description: LEDE FIT image for TEW827DRU
> Created: Sat Aug 6 16:01:44 2016
> Image 0 (script at 0)
> Description: u-boot-HTTP firmware update script
> Created: Sat Aug 6 16:01:44 2016
> Type: Script
> Compression: uncompressed
> Data Size: 93 Bytes = 0.09 kB = 0.00 MB
> Hash algo: crc32
> Hash value: 9641b1ca
> Image 1 (ubi-image at 1)
> Description: UBI rootfs image
> Created: Sat Aug 6 16:01:44 2016
> Type: Firmware
> Compression: uncompressed
> Data Size: 168 Bytes = 0.16 kB = 0.00 MB
> Architecture: ARM
> Load Address: unavailable
> Hash algo: crc32
> Hash value: 374daf15
>
>
> Note the "Data Size: " fields being wrong. The real Image 0 file is
> 200KB and Image 1 is 5.7MB.
>
>
>
>
> On 08/06/2016 03:59 PM, J Mo wrote:
>> Hello
>>
>> I am trying to get LEDE to build for a new device, and my device
>> needs a FIT image.
>>
>> However, mkimage appears to be putting out a FIT file without the
>> actual data files being included. All the rest of the FIT file
>> formatting looks right on cursory inspection, but the data files
>> which were to be included are missing.
>>
>> Any ideas?
>>
>> My .its looks like this:
>>
>>
>> /dts-v1/;
>> / {
>> description = "LEDE FIT image for TEW827DRU";
>> #address-cells = <1>;
>> images {
>> script at 0 {
>> data =
>> "/home/user/proj/lede/newrouter-ledeproj-try6/target/linux/ipq806x/image/flash-tew827dru.scr";
>> description = "u-boot-HTTP firmware update script";
>> type = "script";
>> compression = "none";
>> arch = "arm";
>> hash at 0 {
>> algo = "crc32";
>> };
>> };
>> ubi-image at 1 {
>> data =
>> "/home/user/proj/lede/newrouter-ledeproj-try6/build_dir/target-arm_cortex-a15+neon-vfpv4_musl-1.1.15_eabi/linux-ipq806x/tmp/lede-ipq806x-TEW827DRU-squashfs-factory.bin";
>> description = "UBI rootfs image";
>> type = "firmware";
>> compression = "none";
>> arch = "arm";
>> hash at 0 {
>> algo = "crc32";
>> };
>> };
>> };
>> };
>>
>>
>
More information about the Lede-dev
mailing list