[U-Boot] UBIFS status in the mainline

Hello,
I'm getting the following build errors when I'm trying to build U-Boot for a board with UBIFS in its config from the current U-Boot mainline:
fs/built-in.o: In function `do_fs_type': (.text+0x6a0): undefined reference to `dbg_chk_lpt_free_spc' fs/built-in.o: In function `do_fs_type': (.text+0x6a4): undefined reference to `dbg_check_ltab' fs/built-in.o: In function `do_fs_type': (.text+0x6a8): undefined reference to `dbg_chk_lpt_sz' fs/built-in.o: In function `do_fs_type': (.text+0x6ac): undefined reference to `ubifs_dump_lpt_lebs' fs/built-in.o: In function `do_fs_type': (.text+0x71c): undefined reference to `ubifs_commit_required' fs/built-in.o: In function `do_fs_type': (.text+0x720): undefined reference to `ubifs_request_bg_commit' fs/built-in.o: In function `do_fs_type': (.text+0x724): undefined reference to `ubifs_write_node' fs/built-in.o: In function `do_fs_type': (.text+0x728): undefined reference to `ubifs_write_master'
Do I do something wrong or is it broken?

On 2016-07-02 19:27, Max Filippov wrote:
Hello,
I'm getting the following build errors when I'm trying to build U-Boot for a board with UBIFS in its config from the current U-Boot mainline:
fs/built-in.o: In function `do_fs_type': (.text+0x6a0): undefined reference to `dbg_chk_lpt_free_spc' fs/built-in.o: In function `do_fs_type': (.text+0x6a4): undefined reference to `dbg_check_ltab' fs/built-in.o: In function `do_fs_type': (.text+0x6a8): undefined reference to `dbg_chk_lpt_sz' fs/built-in.o: In function `do_fs_type': (.text+0x6ac): undefined reference to `ubifs_dump_lpt_lebs' fs/built-in.o: In function `do_fs_type': (.text+0x71c): undefined reference to `ubifs_commit_required' fs/built-in.o: In function `do_fs_type': (.text+0x720): undefined reference to `ubifs_request_bg_commit' fs/built-in.o: In function `do_fs_type': (.text+0x724): undefined reference to `ubifs_write_node' fs/built-in.o: In function `do_fs_type': (.text+0x728): undefined reference to `ubifs_write_master'
Do I do something wrong or is it broken?
What board configuration do you use? I just compiled successfully v2016.07-rc3 for a i.MX 7 board with UBI...
-- Stefan

On Sun, Jul 3, 2016 at 9:53 PM, Stefan Agner stefan@agner.ch wrote:
On 2016-07-02 19:27, Max Filippov wrote:
I'm getting the following build errors when I'm trying to build U-Boot for a board with UBIFS in its config from the current U-Boot mainline:
fs/built-in.o: In function `do_fs_type': (.text+0x6a0): undefined reference to `dbg_chk_lpt_free_spc' fs/built-in.o: In function `do_fs_type': (.text+0x6a4): undefined reference to `dbg_check_ltab' fs/built-in.o: In function `do_fs_type': (.text+0x6a8): undefined reference to `dbg_chk_lpt_sz' fs/built-in.o: In function `do_fs_type': (.text+0x6ac): undefined reference to `ubifs_dump_lpt_lebs' fs/built-in.o: In function `do_fs_type': (.text+0x71c): undefined reference to `ubifs_commit_required' fs/built-in.o: In function `do_fs_type': (.text+0x720): undefined reference to `ubifs_request_bg_commit' fs/built-in.o: In function `do_fs_type': (.text+0x724): undefined reference to `ubifs_write_node' fs/built-in.o: In function `do_fs_type': (.text+0x728): undefined reference to `ubifs_write_master'
Do I do something wrong or is it broken?
What board configuration do you use? I just compiled successfully v2016.07-rc3 for a i.MX 7 board with UBI...
Ok, thanks. I used an xtfpga board that's not in the mainline, for the xtensa architecture that's not in the mainline as well. I've tried to build nokia_rx51 board (ARM) with enabled UBIFS and indeed it got linked without errors. But then I've noticed that the resulting u-boot image is dynamic executable and it has unresolved external links to the same functions as listed above. The difference between linking steps for ARM and xtensa is that ARM image gets linked with -pie while xtensa u-boot is not and the resulting u-boot image for xtensa is static. I'm curious about how that's supposed to work.

On 2016-07-03 20:21, Max Filippov wrote:
On Sun, Jul 3, 2016 at 9:53 PM, Stefan Agner stefan@agner.ch wrote:
On 2016-07-02 19:27, Max Filippov wrote:
I'm getting the following build errors when I'm trying to build U-Boot for a board with UBIFS in its config from the current U-Boot mainline:
fs/built-in.o: In function `do_fs_type': (.text+0x6a0): undefined reference to `dbg_chk_lpt_free_spc' fs/built-in.o: In function `do_fs_type': (.text+0x6a4): undefined reference to `dbg_check_ltab' fs/built-in.o: In function `do_fs_type': (.text+0x6a8): undefined reference to `dbg_chk_lpt_sz' fs/built-in.o: In function `do_fs_type': (.text+0x6ac): undefined reference to `ubifs_dump_lpt_lebs' fs/built-in.o: In function `do_fs_type': (.text+0x71c): undefined reference to `ubifs_commit_required' fs/built-in.o: In function `do_fs_type': (.text+0x720): undefined reference to `ubifs_request_bg_commit' fs/built-in.o: In function `do_fs_type': (.text+0x724): undefined reference to `ubifs_write_node' fs/built-in.o: In function `do_fs_type': (.text+0x728): undefined reference to `ubifs_write_master'
Do I do something wrong or is it broken?
What board configuration do you use? I just compiled successfully v2016.07-rc3 for a i.MX 7 board with UBI...
Ok, thanks. I used an xtfpga board that's not in the mainline, for the xtensa architecture that's not in the mainline as well. I've tried to build nokia_rx51 board (ARM) with enabled UBIFS and indeed it got linked without errors. But then I've noticed that the resulting u-boot image is dynamic executable and it has unresolved external links to the same functions as listed above. The difference between linking steps for ARM and xtensa is that ARM image gets linked with -pie while xtensa u-boot is not and the resulting u-boot image for xtensa is static. I'm curious about how that's supposed to work.
I can't reproduce linker errors using v2016.07-rc3. I added a UBIFS_SUPPORT define to nokia_rx51.h and compiled using:
make nokia_rx51_defconfig make -j 4
It worked for me. What toolchain do you use? I used a Linaro 2015.11-2 (gcc 5.2).
-- Stefan

On Tue, Jul 5, 2016 at 11:55 PM, Stefan Agner stefan@agner.ch wrote:
On 2016-07-03 20:21, Max Filippov wrote:
On Sun, Jul 3, 2016 at 9:53 PM, Stefan Agner stefan@agner.ch wrote:
On 2016-07-02 19:27, Max Filippov wrote:
I'm getting the following build errors when I'm trying to build U-Boot for a board with UBIFS in its config from the current U-Boot mainline:
fs/built-in.o: In function `do_fs_type': (.text+0x6a0): undefined reference to `dbg_chk_lpt_free_spc' fs/built-in.o: In function `do_fs_type': (.text+0x6a4): undefined reference to `dbg_check_ltab' fs/built-in.o: In function `do_fs_type': (.text+0x6a8): undefined reference to `dbg_chk_lpt_sz' fs/built-in.o: In function `do_fs_type': (.text+0x6ac): undefined reference to `ubifs_dump_lpt_lebs' fs/built-in.o: In function `do_fs_type': (.text+0x71c): undefined reference to `ubifs_commit_required' fs/built-in.o: In function `do_fs_type': (.text+0x720): undefined reference to `ubifs_request_bg_commit' fs/built-in.o: In function `do_fs_type': (.text+0x724): undefined reference to `ubifs_write_node' fs/built-in.o: In function `do_fs_type': (.text+0x728): undefined reference to `ubifs_write_master'
Do I do something wrong or is it broken?
What board configuration do you use? I just compiled successfully v2016.07-rc3 for a i.MX 7 board with UBI...
Ok, thanks. I used an xtfpga board that's not in the mainline, for the xtensa architecture that's not in the mainline as well. I've tried to build nokia_rx51 board (ARM) with enabled UBIFS and indeed it got linked without errors. But then I've noticed that the resulting u-boot image is dynamic executable and it has unresolved external links to the same functions as listed above. The difference between linking steps for ARM and xtensa is that ARM image gets linked with -pie while xtensa u-boot is not and the resulting u-boot image for xtensa is static. I'm curious about how that's supposed to work.
I can't reproduce linker errors using v2016.07-rc3. I added a UBIFS_SUPPORT define to nokia_rx51.h and compiled using:
It actually needs two macro definitions to enable UBIFS: +#define ONENAND_SUPPORT +#define UBIFS_SUPPORT
And as I said link step does not break on ARM indeed, but the resulting image looks strange to me:
arm-unknown-eabi-objdump -x build-nokia-rx51/u-boot | grep UND 00000000 l *UND* 00000000 dbg_chk_lpt_sz 00000000 l *UND* 00000000 dbg_check_ltab 00000000 l *UND* 00000000 dbg_chk_lpt_free_spc 00000000 l *UND* 00000000 ubifs_dump_lpt_lebs 00000000 l *UND* 00000000 ubifs_write_master 00000000 l *UND* 00000000 ubifs_commit_required 00000000 l *UND* 00000000 ubifs_write_node 00000000 l *UND* 00000000 ubifs_request_bg_commit 00000000 l *UND* 00000000 eth_setenv_enetaddr 00000000 l *UND* 00000000 timer_read_counter
It worked for me. What toolchain do you use? I used a Linaro 2015.11-2 (gcc 5.2).
I used crosstool-NG to build preconfigured arm-unknown-eabi toolchain.
participants (2)
-
Max Filippov
-
Stefan Agner