Hello,

> How I can see what's wrong with the test?

Your output that you posted in your message tells you the path to the log file:

> Full log written to /home/pcmagas/flashrom/builddir/meson-logs/testlog.txt

Inspect the full log carefully and you are likely to find the reason
why tests failed. You can also debug tests with gdb debugger.

Also I noticed your flashchip definition has no eraseblocks defined.
This may cause troubles.
You added a comment "MX35LF1GE4AB is a flash chip but I could test
only the reading" -> you still need to add full definition from the
datasheet, but in the test status you can say that only read operation
has been tested.

You might have read this doc already, but just in case you haven't, we
have a doc: https://flashrom.org/contrib_howtos/how_to_add_new_chip.html

On Sat, Dec 13, 2025 at 6:37 PM pc_magas via flashrom
<[email protected]> wrote:
>
> Hello I am trying to add Macronix `MX35LF1GE4AB` support upon flashrom.
> I am using a raspberrypi Zero W and its SPi driver to dump it. So far
> upon `flashchips/macronix.c` I placed:
>
> ```
>      {
>          .vendor         = "Macronix",
>          .name           = "MX35LF1GE4AB",
>          .bustype        = BUS_SPI,
>          .manufacture_id = MACRONIX_ID,
>          .model_id       = MACRONIX_MX35LF1GE4AB,
>          .total_size     = 1024,
>          .page_size      = 256,
>          .tested         = {.probe = NT, .read = NT, .erase = NA, .write
> = NA, .wp = NA},
>          .probe          = PROBE_SPI_RDID,
>          .probe_timing   = TIMING_ZERO,
>          .write          = 0, /* MX35LF1GE4AB is a flash chip but I
> could test only the reading */
>          .read           = SPI_CHIP_READ, /* Fast read (0x0B) supported */
>          .voltage        = {3000, 3600},
>      },
> ```
>
> Whilst on `include/flashchips.h` I set:
>
> ```
> #define MACRONIX_MX35LF1GE4AB   0xC212
>
> ```
>
> And I compile it as:
>
> ```
> meson setup builddir --wipe
> meson compile -C builddir
> meson test -C builddir
> meson install -C builddir
> ```
>
> But `meson test -C builddir` throws error:
>
> ```
> meson test -C builddir
> ninja: Entering directory `/home/pcmagas/flashrom/builddir'
> ninja: no work to do.
> 1/2 cmocka test flashrom         FAIL            7.01s   (exit status
> 255 or signal 127 SIGinvalid)
>  >>> ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1
> MALLOC_PERTURB_=86
> MSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1
> UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1
> MESON_TEST_ITERATION=1
> /home/pcmagas/flashrom/builddir/tests/flashrom_unit_tests
>
> 2/2 flashrom client tests        OK              0.67s
>
> Ok:                 1
> Expected Fail:      0
> Fail:               1
> Unexpected Pass:    0
> Skipped:            0
> Timeout:            0
>
> Full log written to /home/pcmagas/flashrom/builddir/meson-logs/testlog.txt
>
> ```
>
> How I can see what's wrong with the test?
>
> Also if I ingore the error of the test and proceed with the installation
> it is installed normaly.
>
> But once I try to dump the flash I get:
>
> ```
> sudo flashrom -p linux_spi:dev=/dev/spidev0.0,spispeed=512
> flashrom v1.7.0-devel (git:v1.6.0-49-gf5bcb6d1) on Linux
> 6.12.47+rpt-rpi-v6 (armv6l)
> flashrom is free software, get the source code at https://flashrom.org
>
> No EEPROM/flash device found.
> Note: flashrom can never write if the flash chip isn't found automatically.
> ```
>
> The chip datasheet is upon:
> https://www.mxic.com.tw/Lists/Datasheet/Attachments/9075/MX35LF1GE4AB,%203V,%201Gb,%20v2.0.pdf
>
> Can you guide me what I am doing wrong?
>
> _______________________________________________
> flashrom mailing list -- [email protected]
> To unsubscribe send an email to [email protected]



-- 
Anastasia.
_______________________________________________
flashrom mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to