Post Go back to editing

Change Size of QSPI Partition / Bad FIT Image Format

Category: Software
Product Number: Sidekiq Z2 / ADALM PLUTO
Software Version: 2019.1
Hello everyone,
I'm working with a Sidekiq Z2 (similar architecture as the Pluto) and I'm having some troubles with the following error message: "Bad FIT Image Format".
I wanted to ask for some guidelines on how to solve this error, which looks like from the serial console when booting:

Booting from QSPI
Booting silently
SF: Detected N25Q1024A with page size 256 Bytes, erase size 4 KiB, total 128 MiB
device 0 offset 0x200000, size 0x900000
SF: 9437184 bytes @ 0x200000 Read: OK

## Checking Image at 02080000 ...
   FIT image found
Bad FIT image format!
device 0 offset 0x200000, size 0x1e00000
SF: 31457280 bytes @ 0x200000 Read: OK
libfdt fdt_path_offset() returned FDT_ERR_BADSTRUCTURE
## Loading kernel from FIT Image at 02080000 ...
Bad FIT kernel image format!
ERROR: can't get kernel image!
BOOT failed entering DFU mode ...
gpio: pin 15 (gpio 15) value is 1
Entering DFU SF mode ...


I think the problem might be that I'm adding too many kernel modules, which results in a >30MB 'firmware.dfu' file.

I tried to change the size of the "qspi-linux" partition from its original 30MB to a larger size, as the Sidekiq Z2 comes with a 120MB QSPI flash memory, but the manual states: "Note: to take advantage of the size change the user will need to create their own file system".
I modified the " zynq-pluto-sdr.dtsi" value from "0x1E00000" to
   

partition@qspi-linux {
         label = "qspi-linux";
         reg = <0x200000 0x3C00000>; /* 60M */
      };

and I did the same thing for the "/u-boot-xlnx/arch/arm/dts/zynq-sidekiqz2.dts"
I also replaced the value (1E00000) with (3C00000) in the /u-boot-xlnx/include/configs/zynq-common.h file. When I build the firmware the u-boot.cfg updates properly.
and run make clean and built the firmware as always.
In the boot message keep getting the above mentioned error message.
Which is weird, is that if I delete some kernel modules, resulting in a >30MB firmware.frm file, I can boot correctly, and the message still is:
device 0 offset 0x200000, size 0x1e00000
SF: 31457280 bytes @ 0x200000 Read: OK

Which boggles me is that when I run 'mtdinfo -a' or 'cat /proc/mtd' I do see the 60MB QSPI partition.

The main trouble that I'm having is that I don't know why or how the 'size'  at boot-time keeps being 0x1E0000 and why the function is returning "turned FDT_ERR_BADSTRUCTU" when trying to boot (I know that is due to a allegedly incorrect dts but I didn't make any changes besides the size).

Could anyone give me some kind guidance in order to find out what I'm missing?
Thanks in advance!
Lautaro.


Correction of typo.
[edited by: zoqueton99 at 3:03 PM (GMT -4) on 6 Oct 2023]
Parents
  • , and the message still is:
    device 0 offset 0x200000, size 0x1e00000

    You may have updated the u-boot default environment.

    However the environment in the SPI flash is old.

    You may need to do something like

    Pluto> env default -a
    ## Resetting to default environment

    Pluto> env save
    Saving Environment to SPI Flash...
    SF: Detected N25Q256A with page size 256 Bytes, erase size 4 KiB, total 32 MiB
    Erasing SPI flash...Writing to SPI flash...done
    Pluto>

    This will write the default environment from your u-boot into SPI.

    -Michael 

Reply
  • , and the message still is:
    device 0 offset 0x200000, size 0x1e00000

    You may have updated the u-boot default environment.

    However the environment in the SPI flash is old.

    You may need to do something like

    Pluto> env default -a
    ## Resetting to default environment

    Pluto> env save
    Saving Environment to SPI Flash...
    SF: Detected N25Q256A with page size 256 Bytes, erase size 4 KiB, total 32 MiB
    Erasing SPI flash...Writing to SPI flash...done
    Pluto>

    This will write the default environment from your u-boot into SPI.

    -Michael 

Children