[PATCH v2 00/14] Support SPI NAND in fastboot protocol
Dario Binacchi
dario.binacchi at amarulasolutions.com
Mon Jan 15 11:17:10 CET 2024
Hi Alexey,
On Tue, Jan 9, 2024 at 6:32 PM Alexey Romanov
<avromanov at salutedevices.com> wrote:
>
> Currently, fastboot in U-Boot doens't support SPI NAND
> devices. This patchset adds support for SPI NAND in fastboot
> nand subsystem.
>
> Changes V1 -> V2:
>
> - Rebase patchset over u-boot/next.
> - Move nand_unregister(), nand_reinit() and nang_page_size() functions
> to NAND core folder too.
> - Move changes about CMD_RET_FAILURE/SUCCESS into separate patches.
>
> Alexey Romanov (14):
> nand: move NAND initialization API to nand/core.c
> nand: don't overwrite mtd name in nand_register()
> nand: move nand_util.c to NAND core folder
> nand: move nand_erase_opts() to core NAND folder
> spi: add board_nand_init() function
> spi: use nand_register() instead of add_mtd_device()
> mtdparts: use negative error codes
> mtdparts: use CMD_RET_FAILURE define
> jffs2: use negative error codes
> jffs2: use CMD_RET_FAILURE/SUCCESS defines
> cmd: allow to enable CMD_NAND for SPI NAND devices
> fastboot: check device type for SPI NAND too
> fastboot: enable FASTBOOT_FLASH option for SPI NAND devices
> fastboot: fb_nand: add missing newlines in pr_err() macro
>
> cmd/Kconfig | 2 +-
> cmd/jffs2.c | 45 +-
> cmd/mtdparts.c | 154 +++----
> drivers/fastboot/Kconfig | 4 +-
> drivers/fastboot/fb_nand.c | 12 +-
> drivers/mtd/Kconfig | 2 +-
> drivers/mtd/nand/Kconfig | 10 +
> drivers/mtd/nand/Makefile | 2 +-
> drivers/mtd/nand/core.c | 193 +++++++++
> drivers/mtd/nand/raw/Kconfig | 10 -
> drivers/mtd/nand/raw/nand.c | 182 --------
> drivers/mtd/nand/raw/nand_util.c | 664 -----------------------------
> drivers/mtd/nand/spi/Kconfig | 1 +
> drivers/mtd/nand/spi/core.c | 17 +-
> drivers/mtd/nand/util.c | 709 +++++++++++++++++++++++++++++++
> include/nand.h | 2 +
> 16 files changed, 1042 insertions(+), 967 deletions(-)
> create mode 100644 drivers/mtd/nand/util.c
>
> --
> 2.30.1
>
The series doesn't pass te CI tests.
Following an example of errors :
Building current source for 1 boards (1 thread, 64 jobs per thread)
59 sandbox: + sandbox
60+/usr/bin/ld: /tmp/ccyLvZ90.ltrans5.ltrans.o: in function `set_dev':
61+cmd/nand.c:239: undefined reference to `get_nand_dev_by_index'
62+/usr/bin/ld: cmd/nand.c:244: undefined reference to `nand_curr_device'
63+/usr/bin/ld: /tmp/ccyLvZ90.ltrans5.ltrans.o: in function
`nand_print_and_set_info':
64+cmd/nand.c:411: undefined reference to `get_nand_dev_by_index'
65+/usr/bin/ld: /tmp/ccyLvZ90.ltrans5.ltrans.o: in function `nand_load_image':
66+cmd/nand.c:1002: undefined reference to `nand_read_skip_bad'
67+/usr/bin/ld: cmd/nand.c:1037: undefined reference to `nand_read_skip_bad'
68+/usr/bin/ld: /tmp/ccyLvZ90.ltrans5.ltrans.o: in function `do_nand':
69+cmd/nand.c:511: undefined reference to `nand_curr_device'
70+/usr/bin/ld: cmd/nand.c:563: undefined reference to `get_nand_dev_by_index'
71+/usr/bin/ld: cmd/nand.c:635: undefined reference to `get_nand_dev_by_index'
72+/usr/bin/ld: cmd/nand.c:657: undefined reference to `nand_erase_opts'
73+/usr/bin/ld: cmd/nand.c:705: undefined reference to `get_nand_dev_by_index'
74+/usr/bin/ld: cmd/nand.c:480: undefined reference to `get_nand_dev_by_index'
75+/usr/bin/ld: cmd/nand.c:734: undefined reference to `get_nand_dev_by_index'
76+/usr/bin/ld: cmd/nand.c:740: undefined reference to `nand_read_skip_bad'
77+/usr/bin/ld: cmd/nand.c:743: undefined reference to `nand_write_skip_bad'
78+/usr/bin/ld: cmd/nand.c:456: undefined reference to `nand_verify_page_oob'
79+/usr/bin/ld: /tmp/ccyLvZ90.ltrans5.ltrans.o: in function `do_nandboot':
80+cmd/nand.c:1093: undefined reference to `get_nand_dev_by_index'
81+/usr/bin/ld: cmd/nand.c:1137: undefined reference to `get_nand_dev_by_index'
82+/usr/bin/ld: /tmp/ccyLvZ90.ltrans8.ltrans.o: in function
`initr_nand.lto_priv.0':
83+common/board_r.c:370: undefined reference to `nand_init'
84+/usr/bin/ld: common/board_r.c:371: undefined reference to `nand_size'
85+/usr/bin/ld: /tmp/ccyLvZ90.ltrans14.ltrans.o: in function `sand_nand_remove':
86+drivers/mtd/nand/raw/sand_nand.c:462: undefined reference to
`nand_unregister'
87+/usr/bin/ld: /tmp/ccyLvZ90.ltrans14.ltrans.o: in function `sand_nand_probe':
88+drivers/mtd/nand/raw/sand_nand.c:628: undefined reference to `nand_register'
89+/usr/bin/ld: /tmp/ccyLvZ90.ltrans41.ltrans.o: in function `dm_test_nand':
90+test/dm/nand.c:31: undefined reference to `get_nand_dev_by_index'
91+/usr/bin/ld: test/dm/nand.c:51: undefined reference to `nand_erase_opts'
92+/usr/bin/ld: test/dm/nand.c:55: undefined reference to `nand_read_skip_bad'
93+/usr/bin/ld: test/dm/nand.c:68: undefined reference to `nand_write_skip_bad'
94+/usr/bin/ld: test/dm/nand.c:73: undefined reference to `nand_read_skip_bad'
95+/usr/bin/ld: test/dm/nand.c:81: undefined reference to `nand_erase_opts'
96+/usr/bin/ld: test/dm/nand.c:84: undefined reference to `nand_read_skip_bad'
97+collect2: error: ld returned 1 exit status
98+make[1]: *** [Makefile:1766: u-boot] Error 1
99+make: *** [Makefile:177: sub-make] Error 2
100 0 0 1 /1 sandbox
Please fix the errors.
Thanks and regards,
Dario
--
Dario Binacchi
Senior Embedded Linux Developer
dario.binacchi at amarulasolutions.com
__________________________________
Amarula Solutions SRL
Via Le Canevare 30, 31100 Treviso, Veneto, IT
T. +39 042 243 5310
info at amarulasolutions.com
www.amarulasolutions.com
More information about the U-Boot
mailing list