Menu

#29 Cannot compile U-Boot source (Linux Mint 18 x86)

Alpha
open
nobody
None
bug
software
2019-06-10
2019-06-08
No

I want to compile the U-Boot source tree, so installed Linux Mint 18 on a x86 laptop with all the utils, the ARM toolchain and every dependency for the compile process.
Tried to compile first time, it thrown some code errors on board.c (LED control related), commented out and progressed a little. Now, it throws a lot of undefined errors.
I've also modified the compile parameters in config.mk to work with newest compilers (-march=armv5te and -mtune=xscale now looks deprecated, replaced those with -marm).
What can I do? Here is the console output:

        --start-group lib_generic/libgeneric.a lib_generic/lzma/liblzma.a cpu/pxa/libpxa.a lib_arm/libarm.a fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.a fs/yaffs2/libyaffs2.a net/libnet.a disk/libdisk.a drivers/bios_emulator/libatibiosemu.a drivers/block/libblock.a drivers/dma/libdma.a drivers/fpga/libfpga.a drivers/gpio/libgpio.a drivers/hwmon/libhwmon.a drivers/i2c/libi2c.a drivers/input/libinput.a drivers/misc/libmisc.a drivers/mmc/libmmc.a drivers/mtd/libmtd.a drivers/mtd/nand/libnand.a drivers/mtd/nand_legacy/libnand_legacy.a drivers/mtd/onenand/libonenand.a drivers/mtd/ubi/libubi.a drivers/mtd/spi/libspi_flash.a drivers/net/libnet.a drivers/net/phy/libphy.a drivers/net/sk98lin/libsk98lin.a drivers/pci/libpci.a drivers/pcmcia/libpcmcia.a drivers/spi/libspi.a drivers/rtc/librtc.a drivers/serial/libserial.a drivers/usb/libusb.a drivers/video/libvideo.a common/libcommon.a libfdt/libfdt.a api/libapi.a post/libpost.a board/ipaq214/libipaq214.a --end-group -L /usr/lib/gcc-cross/arm-linux-gnueabihf/7 -lgcc \
        -Map u-boot.map -o u-boot
board/ipaq214/libipaq214.a(ipaq214.o): In function `board_init':
/home/mlx/Desktop/ipaq214-u-boot/board/ipaq214/ipaq214.c:53: undefined reference to `ipaq214_setLED'
board/ipaq214/libipaq214.a(ipaq214.o): In function `board_late_init':
/home/mlx/Desktop/ipaq214-u-boot/board/ipaq214/ipaq214.c:72: undefined reference to `ipaq214_setLED'
board/ipaq214/libipaq214.a(cmd_ipaq214.o): In function `do_led':
/home/mlx/Desktop/ipaq214-u-boot/board/ipaq214/cmd_ipaq214.c:53: undefined reference to `ipaq214_setLED'
fs/jffs2/libjffs2.a(mini_inflate.o): In function `read_symbol':
/home/mlx/Desktop/ipaq214-u-boot/fs/jffs2/mini_inflate.c:143: undefined reference to `pull_bit'
fs/jffs2/libjffs2.a(mini_inflate.o): In function `decompress_huffman':
/home/mlx/Desktop/ipaq214-u-boot/fs/jffs2/mini_inflate.c:173: undefined reference to `pull_bits'
/home/mlx/Desktop/ipaq214-u-boot/fs/jffs2/mini_inflate.c:184: undefined reference to `pull_bits'
fs/jffs2/libjffs2.a(mini_inflate.o): In function `init_code_tables':
/home/mlx/Desktop/ipaq214-u-boot/fs/jffs2/mini_inflate.c:222: undefined reference to `cramfs_memset'
/home/mlx/Desktop/ipaq214-u-boot/fs/jffs2/mini_inflate.c:223: undefined reference to `cramfs_memset'
/home/mlx/Desktop/ipaq214-u-boot/fs/jffs2/mini_inflate.c:224: undefined reference to `cramfs_memset'
fs/jffs2/libjffs2.a(mini_inflate.o): In function `decompress_block':
/home/mlx/Desktop/ipaq214-u-boot/fs/jffs2/mini_inflate.c:374: undefined reference to `pull_bit'
/home/mlx/Desktop/ipaq214-u-boot/fs/jffs2/mini_inflate.c:375: undefined reference to `pull_bits'
fs/jffs2/libjffs2.a(mini_inflate.o): In function `decompress_none':
/home/mlx/Desktop/ipaq214-u-boot/fs/jffs2/mini_inflate.c:129: undefined reference to `pull_bits'
fs/jffs2/libjffs2.a(mini_inflate.o): In function `decompress_dynamic':
/home/mlx/Desktop/ipaq214-u-boot/fs/jffs2/mini_inflate.c:244: undefined reference to `pull_bits'
/home/mlx/Desktop/ipaq214-u-boot/fs/jffs2/mini_inflate.c:245: undefined reference to `pull_bits'
/home/mlx/Desktop/ipaq214-u-boot/fs/jffs2/mini_inflate.c:246: undefined reference to `pull_bits'
fs/jffs2/libjffs2.a(mini_inflate.o):/home/mlx/Desktop/ipaq214-u-boot/fs/jffs2/mini_inflate.c:258: more undefined references to `pull_bits' follow
fs/jffs2/libjffs2.a(mini_inflate.o): In function `decompress_fixed':
/home/mlx/Desktop/ipaq214-u-boot/fs/jffs2/mini_inflate.c:340: undefined reference to `cramfs_memset'
/home/mlx/Desktop/ipaq214-u-boot/fs/jffs2/mini_inflate.c:341: undefined reference to `cramfs_memset'
/home/mlx/Desktop/ipaq214-u-boot/fs/jffs2/mini_inflate.c:342: undefined reference to `cramfs_memset'
/home/mlx/Desktop/ipaq214-u-boot/fs/jffs2/mini_inflate.c:343: undefined reference to `cramfs_memset'
/home/mlx/Desktop/ipaq214-u-boot/fs/jffs2/mini_inflate.c:344: undefined reference to `cramfs_memset'
fs/jffs2/libjffs2.a(mini_inflate.o):/home/mlx/Desktop/ipaq214-u-boot/fs/jffs2/mini_inflate.c:345: more undefined references to `cramfs_memset' follow
Makefile:342: recipe for target 'u-boot' failed
make: *** [u-boot] Error 1

Related

U-Boot: u-boot

Discussion

  • Alvin Wong

    Alvin Wong - 2019-06-09

    I've also modified the compile parameters in config.mk to work with newest compilers (-march=armv5te and -mtune=xscale now looks deprecated, replaced those with -marm).

    I don't think that's correct. -marm pairs with -mthumb and are used with switching between generating ARM code and THUMB code (two different instructions set for ARM architectures). I believe you should keep the -march=armv5te -mtune=xscale parameters as they specify the microarchitecture and available instructions of the target processor, which is the PXA310. If gcc has deprecated them, it means the target is probably going to be unsupported in future gcc versions since these chips are so old, and thus you will have to keep using older gcc versions.

    arm-linux-gnueabihf

    Although you haven't stated the gcc version you're using, this looks like the cross compiler target you have. This probably wouldn't work because 1) it's targetting Linux ABI but U-Boot is bare metal, and 2) it's targetting armhf (hard-float) but the PXA310 does not have a hardware floating point unit (IIRC).

    You need a cross compiler that targets arm-none-eabi.

     
    • Alvin Wong

      Alvin Wong - 2019-06-09

      Actually, a cross-compiler targetting the Linux ABI might still work, but I don't really remember the details on this.

       
      • Michael Jauregui

        If i use the -march=armv5te and -mtune=xscale the compiling process fails earlier, looks like it's discontinued.
        Also, do you have a mail/social network where I can contact you?

         
        • Alvin Wong

          Alvin Wong - 2019-06-10

          If i use the -march=armv5te and -mtune=xscale the compiling process fails earlier, looks like it's discontinued.

          Yes, you'll need to find the last gcc version that supportd this architecture.

          Also, do you have a mail/social network where I can contact you?

          I believe I've included my email address in the mail reply I sent you via the sourceforge mail form, but if you haven't got it you should be able to find my email address from my commits in the git repo (just check git log).

           

Log in to post a comment.

MongoDB Logo MongoDB