全志 R16 Tina SDK V2.1 单独编译U-Boot

前言

Tina SDK并不会在编译时同时编译U-Boot,需要单独编译。

编译

$cd lichee/brandy/

两种编译方法:

$./build.sh -p sun8iw5p1

$cd u-boot-2011.09
$make distclean
$make sun8iw5p1_config
$make -j1

问题

打印错误信息

make[1]: Leaving directory `/home/mrzhen/work/AllWinner/Tina_R16/lichee/brandy/u-boot-2011.09/board/sunxi'
UNDEF_SYM=`/home/mrzhen/work/AllWinner/Tina_R16/lichee/brandy/u-boot-2011.09/../gcc-linaro/bin/arm-linux-gnueabi-objdump -x board/sunxi/sun8iw5/libsun8iw5.o board/sunxi/libsunxi.o api/libapi.o arch/arm/cpu/armv7/libarmv7.o arch/arm/cpu/armv7/sun8iw5/libsun8iw5.o arch/arm/lib/libarm.o common/libcommon.o disk/libdisk.o drivers/audio/libaudio.o drivers/bios_emulator/libatibiosemu.o drivers/block/libblock.o drivers/dma/libdma.o drivers/efuse/libsunxi_efuse.o drivers/fpga/libfpga.o drivers/gpio/libgpio.o drivers/hwmon/libhwmon.o drivers/i2c/libi2c.o drivers/input/libinput.o drivers/misc/libmisc.o drivers/mmc/libmmc.o drivers/mtd/nand/libnand.o drivers/mtd/onenand/libonenand.o drivers/mtd/spi/libspi_flash.o drivers/mtd/ubi/libubi.o drivers/net/libnet.o drivers/net/phy/libphy.o drivers/p2wi/libp2wi.o drivers/pci/libpci.o drivers/pcmcia/libpcmcia.o drivers/power/libpower.o drivers/pwm/libsunxi_pwm.o drivers/rsb/librsb.o drivers/rtc/librtc.o drivers/serial/libserial.o drivers/smc/libsmc.o drivers/spi/libspi.o drivers/spinor/libspinor.o drivers/storage_type/libstorage_type.o drivers/twserial/libtws.o drivers/usb/eth/libusb_eth.o drivers/usb/gadget/libusb_gadget.o drivers/usb/host/libusb_host.o drivers/usb/musb/libusb_musb.o drivers/usb/phy/libusb_phy.o drivers/usb/sunxi_usb/libusb_sunxi_usb.o drivers/video_sunxi/libvideo_sunxi.o drivers/watchdog/libwatchdog.o fs/aw_fs/libawfat.o fs/cramfs/libcramfs.o fs/ext2/libext2fs.o fs/fat/libfat.o fs/fdos/libfdos.o fs/jffs2/libjffs2.o fs/reiserfs/libreiserfs.o fs/ubifs/libubifs.o fs/yaffs2/libyaffs2.o lib/libfdt/libfdt.o lib/libgeneric.o lib/lzma/liblzma.o lib/lzo/liblzo.o lib/zlib/libz.o memtest/libsunxi_memtest.o nand_sunxi/sun8iw5/libnand-sun8iw5 nand_sunxi/sun8iw5/nand_interface/libnand_interface.o nand_sunxi/sun8iw5/osal/libnand_osal.o net/libnet.o post/libpost.o sprite/libsprite.o usb_sunxi/libsunxi_usb.o | sed  -n -e 's/.*\(__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`; cd /home/mrzhen/work/AllWinner/Tina_R16/lichee/brandy/u-boot-2011.09 && /home/mrzhen/work/AllWinner/Tina_R16/lichee/brandy/u-boot-2011.09/../gcc-linaro/bin/arm-linux-gnueabi-ld  -pie -T u-boot.lds -Bstatic $UNDEF_SYM arch/arm/cpu/armv7/start.o --start-group api/libapi.o arch/arm/cpu/armv7/libarmv7.o arch/arm/cpu/armv7/sun8iw5/libsun8iw5.o arch/arm/lib/libarm.o common/libcommon.o disk/libdisk.o drivers/audio/libaudio.o drivers/bios_emulator/libatibiosemu.o drivers/block/libblock.o drivers/dma/libdma.o drivers/efuse/libsunxi_efuse.o drivers/fpga/libfpga.o drivers/gpio/libgpio.o drivers/hwmon/libhwmon.o drivers/i2c/libi2c.o drivers/input/libinput.o drivers/misc/libmisc.o drivers/mmc/libmmc.o drivers/mtd/nand/libnand.o drivers/mtd/onenand/libonenand.o drivers/mtd/spi/libspi_flash.o drivers/mtd/ubi/libubi.o drivers/net/libnet.o drivers/net/phy/libphy.o drivers/p2wi/libp2wi.o drivers/pci/libpci.o drivers/pcmcia/libpcmcia.o drivers/power/libpower.o drivers/pwm/libsunxi_pwm.o drivers/rsb/librsb.o drivers/rtc/librtc.o drivers/serial/libserial.o drivers/smc/libsmc.o drivers/spi/libspi.o drivers/spinor/libspinor.o drivers/storage_type/libstorage_type.o drivers/twserial/libtws.o drivers/usb/eth/libusb_eth.o drivers/usb/gadget/libusb_gadget.o drivers/usb/host/libusb_host.o drivers/usb/musb/libusb_musb.o drivers/usb/phy/libusb_phy.o drivers/usb/sunxi_usb/libusb_sunxi_usb.o drivers/video_sunxi/libvideo_sunxi.o drivers/watchdog/libwatchdog.o fs/aw_fs/libawfat.o fs/cramfs/libcramfs.o fs/ext2/libext2fs.o fs/fat/libfat.o fs/fdos/libfdos.o fs/jffs2/libjffs2.o fs/reiserfs/libreiserfs.o fs/ubifs/libubifs.o fs/yaffs2/libyaffs2.o lib/libfdt/libfdt.o lib/libgeneric.o lib/lzma/liblzma.o lib/lzo/liblzo.o lib/zlib/libz.o memtest/libsunxi_memtest.o nand_sunxi/sun8iw5/libnand-sun8iw5 nand_sunxi/sun8iw5/nand_interface/libnand_interface.o nand_sunxi/sun8iw5/osal/libnand_osal.o net/libnet.o post/libpost.o sprite/libsprite.o usb_sunxi/libsunxi_usb.o board/sunxi/sun8iw5/libsun8iw5.o board/sunxi/libsunxi.o --end-group /home/mrzhen/work/AllWinner/Tina_R16/lichee/brandy/u-boot-2011.09/arch/arm/lib/eabi_compat.o  -L./openssl -lssl -lcrypto -L /home/mrzhen/work/AllWinner/Tina_R16/lichee/brandy/gcc-linaro/bin/../lib/gcc/arm-linux-gnueabi/4.6.3 -lgcc -Map u-boot.map -o u-boot
/home/mrzhen/work/AllWinner/Tina_R16/lichee/brandy/u-boot-2011.09/../gcc-linaro/bin/arm-linux-gnueabi-ld: cannot find -lssl
/home/mrzhen/work/AllWinner/Tina_R16/lichee/brandy/u-boot-2011.09/../gcc-linaro/bin/arm-linux-gnueabi-ld: cannot find -lcrypto
make: *** [u-boot] Error 1

#### make failed to build some targets (31 seconds) ####

解决

缺少库文件。

$cd lichee/brandy/extern-libs/

$tar -jxvf openssl-secure-system.tar.bz2
$cd openssl-1.0.1g-for-secure-system/openssl-1.0.1g
$vi Makefile

修改Makefile中目标“build_libs”下的路径信息至正确的路径下,如SDK编译环境下的“lichee/brandy/gcc-linaro/lib/gcc/arm-linux-gnueabi/4.6.3/”目录,之后编译该库文件:

$make build_libs -j

编译成功后,重新编译u-boot可以通过,并生成 u-boot-sun8iw5p1.bin文件。

你可能感兴趣的:(BSP)