I am attempting to enable UBIFS support into u-boot but have encountered several undefined reference errors when compiling. In my board configuration, I have enabled the following:
#define CONFIG_MTD_DEVICE
#define CONFIG_MTD_PARTITIONS
#define CONFIG_CMD_MTDPARTS
#define CONFIG_CMD_UBI
#define CONFIG_RBTREE
#define CONFIG_CMD_UBIFS
#define CONFIG_LZO
And get the following undefined reference errors when compiling:
uboot/fs/ubifs/lpt_commit.c:1232: undefined reference to dbg_chk_lpt_free_spc
uboot/fs/ubifs/lpt_commit.c:1235: undefined reference to `dbg_check_ltab'
fs/built-in.o: In function `layout_cnodes':
uboot/fs/ubifs/lpt_commit.c:322: undefined reference to `ubifs_dump_lpt_lebs'
fs/built-in.o: In function `ubifs_add_bud_to_log':
uboot/fs/ubifs/log.c:194: undefined reference to `ubifs_commit_required'
uboot/fs/ubifs/log.c:225: undefined reference to `ubifs_request_bg_commit'
uboot/fs/ubifs/log.c:265: undefined reference to `ubifs_write_node'
fs/built-in.o: In function `ubifs_log_end_commit':
uboot/fs/ubifs/log.c:479: undefined reference to `ubifs_write_master'
fs/built-in.o: In function `do_write_orph_node':
uboot/fs/ubifs/orphan.c:248: undefined reference to `ubifs_write_node'
dbg_chk_lpt_free_spc
, db_check-ltab
, ubifs_dump_lpt_lebs
, ubifs_write_node
, and ubifs_write_master
are"ifdef'd" out (#ifndef __UBOOT__
but...obviously __UBOOT__
is defined).
With a quick grep, ubifs_commit_required
, ubifs_request_bg_commit
are completely missing implementations.
Does u-boot not support UBIFS entirely, or is it currently broken? (Using 2016.07 release). Or am I perhaps missing a step...
UBIFS was indeed broken in the mainline for several architectures. A proposed patch can be found in the pipemail at http://lists.denx.de/pipermail/u-boot/2016-September/265474.html, but it hasn't been approved yet. The patch applied without issues and I can now compile, though whether the filesystem works with it remains to be seen...