How to recompile when using ltib for compiling u-boot and kernel

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to recompile when using ltib for compiling u-boot and kernel

2,313 Views
jayakumar2
Contributor V

Hi,

I'm using L3.0.35_4.1.0_130816_source ltib to build for the MX6SL evaluation kit. I noticed that each time I make a change to u-boot takes quite a bit of time. Eg: I just made a change to a printf in board/freescale/mx6sl_evk/mx6sl_evk.c , and I recompiled by doing:

lucid@ubuntu:~/6sl/ltib/rpm/BUILD/u-boot-2009.08$ ( cd /home/lucid/6sl/ltib/ ; ./ltib -m scbuild -p u-boot )

and that kicks off a full rebuild as shown below part A. That takes a lot longer than desirable. I tried to escape this by doing:

( echo makeuboot ; cd /home/lucid/6sl/ltib/rpm/BUILD/u-boot-2009.08/ && PATH=/home/lucid/6sl/ltib/bin:/opt/freescale/ltib/usr/spoof:/home/lucid/6sl/ltib/bin:/opt/freescale/ltib/usr/bin:/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin make CROSS_COMPILE=arm-none-linux-gnueabi- )

but this seems to work only the first few times. After that, it gets this weird error:

Generating include/autoconf.mk

fatal: cannot describe '9b3adb2c5d3015ff4d14b56623b9edbc4c698105'

for dir in tools examples/standalone examples/api ; do make -C $dir _depend ; done

Use of uninitialized value in concatenation (.) or string at /opt/freescale/ltib/usr/spoof/gcc line 34.

/opt/freescale/ltib/usr/spoof/gcc: cannot spoof, '/' (dev_image) does not exist at /opt/freescale/ltib/usr/spoof/gcc line 34.

make[1]: Entering directory `/home/lucid/6sl/ltib/rpm/BUILD/u-boot-2009.08/tools'

make[1]: Nothing to be done for `_depend'.

make[1]: Leaving directory `/home/lucid/6sl/ltib/rpm/BUILD/u-boot-2009.08/tools'

make[1]: Entering directory `/home/lucid/6sl/ltib/rpm/BUILD/u-boot-2009.08/examples/standalone'

make[1]: Nothing to be done for `_depend'.

make[1]: Leaving directory `/home/lucid/6sl/ltib/rpm/BUILD/u-boot-2009.08/examples/standalone'

make[1]: Entering directory `/home/lucid/6sl/ltib/rpm/BUILD/u-boot-2009.08/examples/api'

make[1]: Nothing to be done for `_depend'.

make[1]: Leaving directory `/home/lucid/6sl/ltib/rpm/BUILD/u-boot-2009.08/examples/api'

make -C tools all

Use of uninitialized value in concatenation (.) or string at /opt/freescale/ltib/usr/spoof/gcc line 34.

/opt/freescale/ltib/usr/spoof/gcc: cannot spoof, '/' (dev_image) does not exist at /opt/freescale/ltib/usr/spoof/gcc line 34.

make[1]: Entering directory `/home/lucid/6sl/ltib/rpm/BUILD/u-boot-2009.08/tools'

gcc -g -Wall -idirafter /home/lucid/6sl/ltib/rpm/BUILD/u-boot-2009.08/include -idirafter /home/lucid/6sl/ltib/rpm/BUILD/u-boot-2009.08/include2 -idirafter /home/lucid/6sl/ltib/rpm/BUILD/u-boot-2009.08/include -I /home/lucid/6sl/ltib/rpm/BUILD/u-boot-2009.08/libfdt -I /home/lucid/6sl/ltib/rpm/BUILD/u-boot-2009.08/tools -DTEXT_BASE=0x87800000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -O -c -o mkimage.o /home/lucid/6sl/ltib/rpm/BUILD/u-boot-2009.08/tools/mkimage.c

Use of uninitialized value in concatenation (.) or string at /opt/freescale/ltib/usr/spoof/gcc line 34.

/opt/freescale/ltib/usr/spoof/gcc: cannot spoof, '/' (dev_image) does not exist at /opt/freescale/ltib/usr/spoof/gcc line 34.

make[1]: *** [mkimage.o] Error 255

make[1]: Leaving directory `/home/lucid/6sl/ltib/rpm/BUILD/u-boot-2009.08/tools'

make: *** [tools] Error 2

It is much worse for rebuilding the kernel. Every time I build it recompiles everything even though I changed just a single line in board/freescale/mx6sl_evk/mx6sl_evk.c . Eg:

lucid@ubuntu:~/6sl/ltib/rpm/BUILD/linux-3.0.35$ make ARCH=arm CONFIG_DEBUG_SECTION_MISMATCH=y CROSS_COMPILE=/opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/arm-none-linux-gnueabi- uImage && make ARCH=arm CROSS_COMPILE=/opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/arm-none-linux-gnueabi- modules && echo done && sudo make ARCH=arm CROSS_COMPILE=/opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/arm-none-linux-gnueabi- modules_install INSTALL_MOD_PATH=~/ltib/rootfs/

  HOSTCC  scripts/kconfig/conf.o

  HOSTCC  scripts/kconfig/zconf.tab.o

  HOSTLD  scripts/kconfig/conf

scripts/kconfig/conf --silentoldconfig Kconfig

  CHK     include/linux/version.h

  CHK     include/generated/utsrelease.h

  UPD     include/generated/utsrelease.h

make[1]: `include/generated/mach-types.h' is up to date.

  CC      kernel/bounds.s

  GEN     include/generated/bounds.h

  CC      arch/arm/kernel/asm-offsets.s

  GEN     include/generated/asm-offsets.h

  CALL    scripts/checksyscalls.sh

  CC      scripts/mod/empty.o

  MKELF   scripts/mod/elfconfig.h

  HOSTCC  scripts/mod/file2alias.o

  HOSTCC  scripts/mod/modpost.o

  HOSTCC  scripts/mod/sumversion.o

  HOSTLD  scripts/mod/modpost

  CC      init/main.o

  CHK     include/generated/compile.h

  CC      init/version.o

  CC      init/do_mounts.o

  CC      init/do_mounts_initrd.o

  LD      init/mounts.o

  CC      init/initramfs.o

  CC      init/calibrate.o

  LD      init/built-in.o

  CC      arch/arm/vfp/vfpmodule.o

  AS      arch/arm/vfp/entry.o

  AS      arch/arm/vfp/vfphw.o

  LD      arch/arm/vfp/vfp.o

  LD      arch/arm/vfp/built-in.o

  CC      arch/arm/kernel/elf.o

  AS      arch/arm/kernel/entry-armv.o

  AS      arch/arm/kernel/entry-common.o

  CC      arch/arm/kernel/irq.o

  CC      arch/arm/kernel/process.o

  CC      arch/arm/kernel/ptrace.o

  CC      arch/arm/kernel/return_address.o

arch/arm/kernel/return_address.c:62:2: warning: #warning "TODO: return_address should use unwind tables"

arch/arm/kernel/return_address.c:62:2: warning: #warning "TODO: return_address should use unwind tables"

  CC      arch/arm/kernel/setup.o

  CC      arch/arm/kernel/signal.o

  CC      arch/arm/kernel/sys_arm.o

  CC      arch/arm/kernel/stacktrace.o

  CC      arch/arm/kernel/time.o

  CC      arch/arm/kernel/traps.o

  CC      arch/arm/kernel/etm.o

  CC      arch/arm/kernel/fiq.o

  CC      arch/arm/kernel/armksyms.o

  CC      arch/arm/kernel/module.o

  AS      arch/arm/kernel/sleep.o

  CC      arch/arm/kernel/sched_clock.o

  CC      arch/arm/kernel/unwind.o

  CC      arch/arm/kernel/hw_breakpoint.o

<snip>

Is there a way I can avoid all of this?

Thanks,

jayakumar

Part A

Processing: u-boot-v2009.08

=============================

Build path taken because: directory build, build key set, no prebuilt rpm,

rpmbuild --dbpath /home/lucid/6sl/ltib/rootfs//var/lib/rpm --target arm --define '_unpackaged_files_terminate_build 0' --define '_target_cpu arm' --define '__strip strip' --define '_topdir /home/lucid/6sl/ltib/rpm' --define '_prefix /usr' --define '_tmppath /home/lucid/6sl/ltib/tmp' --define '_rpmdir /home/lucid/6sl/ltib/rpm/RPMS'  --define '_mandir /usr/share/man' --define '_sysconfdir /etc' --define '_localstatedir /var' -bc --short-circuit  /home/lucid/6sl/ltib/tmp/u-boot-v2009.08.spec

Building target platforms: arm

Building for target arm

Executing(%build): /bin/sh -e /home/lucid/6sl/ltib/tmp/rpm-tmp.23152

+ umask 022

+ cd /home/lucid/6sl/ltib/rpm/BUILD

+ cd u-boot-2009.08

+ : mx6sl_evk_mfg_config

+ eval echo

+ echo

+ PKG_U_BOOT_PATH_PRECONFIG=

+ SRC_DIR=/home/lucid/6sl/ltib/rpm/BUILD/u-boot-2009.08

+ BUILD_DIR=/home/lucid/6sl/ltib/rpm/BUILD/u-boot-2009.08

+ [ /home/lucid/6sl/ltib/rpm/BUILD/u-boot-2009.08 != /home/lucid/6sl/ltib/rpm/BUILD/u-boot-2009.08 ]

+ cd /home/lucid/6sl/ltib/rpm/BUILD/u-boot-2009.08

+ [ -n  ]

+ make HOSTCC=ccache /usr/bin/gcc -B/usr/bin/ CROSS_COMPILE=arm-none-linux-gnueabi- O=/home/lucid/6sl/ltib/rpm/BUILD/u-boot-2009.08 mx6sl_evk_mfg_config

Generating include/autoconf.mk

Configuring for mx6sl_evk_mfg board...

+ make HOSTCC=ccache /usr/bin/gcc -B/usr/bin/ HOSTSTRIP=/usr/bin/strip CROSS_COMPILE=arm-none-linux-gnueabi- OPTFLAGS=-Os O=/home/lucid/6sl/ltib/rpm/BUILD/u-boot-2009.08 all -j8

Generating include/autoconf.mk

Generating include/autoconf.mk.dep

fatal: cannot describe '22822ccf6106695f695fe91997ed6a6dd137240f'

for dir in tools examples/standalone examples/api ; do make -C $dir _depend ; done

make[1]: Entering directory `/home/lucid/6sl/ltib/rpm/BUILD/u-boot-2009.08/tools'

make[1]: Nothing to be done for `_depend'.

make[1]: Leaving directory `/home/lucid/6sl/ltib/rpm/BUILD/u-boot-2009.08/tools'

make[1]: Entering directory `/home/lucid/6sl/ltib/rpm/BUILD/u-boot-2009.08/examples/standalone'

make[1]: Nothing to be done for `_depend'.

make[1]: Leaving directory `/home/lucid/6sl/ltib/rpm/BUILD/u-boot-2009.08/examples/standalone'

make[1]: Entering directory `/home/lucid/6sl/ltib/rpm/BUILD/u-boot-2009.08/examples/api'

make[1]: Nothing to be done for `_depend'.

make[1]: Leaving directory `/home/lucid/6sl/ltib/rpm/BUILD/u-boot-2009.08/examples/api'

make -C tools all

make -C examples/standalone all

make -C examples/api all

make[1]: Entering directory `/home/lucid/6sl/ltib/rpm/BUILD/u-boot-2009.08/tools'

ccache /usr/bin/gcc -B/usr/bin/ -g -Wall -idirafter /home/lucid/6sl/ltib/rpm/BUILD/u-boot-2009.08/include -idirafter /home/lucid/6sl/ltib/rpm/BUILD/u-boot-2009.08/include2 -idirafter /home/lucid/6sl/ltib/rpm/BUILD/u-boot-2009.08/include -I /home/lucid/6sl/ltib/rpm/BUILD/u-boot-2009.08/libfdt -I /home/lucid/6sl/ltib/rpm/BUILD/u-boot-2009.08/tools -DTEXT_BASE=0x87800000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -O -c -o mkimage.o /home/lucid/6sl/ltib/rpm/BUILD/u-boot-2009.08/tools/mkimage.c

...

make[1]: Leaving directory `/home/lucid/6sl/ltib/rpm/BUILD/u-boot-2009.08/common'

make -C board/freescale/mx6sl_evk/

make[1]: Entering directory `/home/lucid/6sl/ltib/rpm/BUILD/u-boot-2009.08/board/freescale/mx6sl_evk'

arm-none-linux-gnueabi-gcc  -g  -Os  -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DTEXT_BASE=0x87800000 -I/home/lucid/6sl/ltib/rpm/BUILD/u-boot-2009.08/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/../lib/gcc/arm-fsl-linux-gnueabi/4.6.2/include -pipe  -DCONFIG_ARM -D__ARM__ -marm  -mabi=aapcs-linux -mno-thumb-interwork -march=armv5   -Wall -Wstrict-prototypes -fno-stack-protector   -o mx6sl_evk.o mx6sl_evk.c -c

arm-none-linux-gnueabi-gcc   -D__ASSEMBLY__ -g  -Os  -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DTEXT_BASE=0x87800000 -I/home/lucid/6sl/ltib/rpm/BUILD/u-boot-2009.08/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/../lib/gcc/arm-fsl-linux-gnueabi/4.6.2/include -pipe  -DCONFIG_ARM -D__ARM__ -marm  -mabi=aapcs-linux -mno-thumb-interwork -march=armv5     -o lowlevel_init.o lowlevel_init.S -c

arm-none-linux-gnueabi-gcc   -D__ASSEMBLY__ -g  -Os  -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DTEXT_BASE=0x87800000 -I/home/lucid/6sl/ltib/rpm/BUILD/u-boot-2009.08/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/../lib/gcc/arm-fsl-linux-gnueabi/4.6.2/include -pipe  -DCONFIG_ARM -D__ARM__ -marm  -mabi=aapcs-linux -mno-thumb-interwork -march=armv5     -o flash_header.o flash_header.S -c

arm-none-linux-gnueabi-ar crv libmx6sl_evk.a mx6sl_evk.o lowlevel_init.o flash_header.o

r - mx6sl_evk.o

r - lowlevel_init.o

r - flash_header.o

make[1]: Leaving directory `/home/lucid/6sl/ltib/rpm/BUILD/u-boot-2009.08/board/freescale/mx6sl_evk'

UNDEF_SYM=`arm-none-linux-gnueabi-objdump -x board/freescale/mx6sl_evk/libmx6sl_evk.a lib_generic/libgeneric.a lib_generic/lzma/liblzma.a lib_generic/lzo/liblzo.a board/freescale/common/libfreescale.a cpu/arm_cortexa8/libarm_cortexa8.a cpu/arm_cortexa8/mx6/libmx6.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 fs/ubifs/libubifs.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/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/power/libpower.a drivers/spi/libspi.a drivers/fastboot/libfastboot.a drivers/rtc/librtc.a drivers/serial/libserial.a drivers/twserial/libtws.a drivers/usb/gadget/libusb_gadget.a drivers/usb/host/libusb_host.a drivers/usb/musb/libusb_musb.a drivers/video/libvideo.a drivers/watchdog/libwatchdog.a common/libcommon.a libfdt/libfdt.a api/libapi.a post/libpost.a | sed  -n -e 's/.*\(__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`; cd /home/lucid/6sl/ltib/rpm/BUILD/u-boot-2009.08 && arm-none-linux-gnueabi-ld -Bstatic -T u-boot.lds  -Ttext 0x87800000 $UNDEF_SYM cpu/arm_cortexa8/start.o --start-group lib_generic/libgeneric.a lib_generic/lzma/liblzma.a lib_generic/lzo/liblzo.a board/freescale/common/libfreescale.a cpu/arm_cortexa8/libarm_cortexa8.a cpu/arm_cortexa8/mx6/libmx6.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 fs/ubifs/libubifs.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/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/power/libpower.a drivers/spi/libspi.a drivers/fastboot/libfastboot.a drivers/rtc/librtc.a drivers/serial/libserial.a drivers/twserial/libtws.a drivers/usb/gadget/libusb_gadget.a drivers/usb/host/libusb_host.a drivers/usb/musb/libusb_musb.a drivers/video/libvideo.a drivers/watchdog/libwatchdog.a common/libcommon.a libfdt/libfdt.a api/libapi.a post/libpost.a board/freescale/mx6sl_evk/libmx6sl_evk.a --end-group /home/lucid/6sl/ltib/rpm/BUILD/u-boot-2009.08/lib_arm/eabi_compat.o -L /opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/../lib/gcc/arm-fsl-linux-gnueabi/4.6.2/default -lgcc -Map u-boot.map -o u-boot

arm-none-linux-gnueabi-objcopy -O srec u-boot u-boot.srec

arm-none-linux-gnueabi-objcopy --gap-fill=0xff -O binary u-boot u-boot.bin

+ exit 0

Labels (1)
0 Kudos
Reply
4 Replies

1,034 Views
GraceH
Senior Contributor II

Jaya,

The simple way to go to the source directory and use "make" command. Before run "make" just set the CROSS_COMPILE

export ARCH=arm

export CROSS_COMPILE=/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi-

L3.0.35_4.1.0_130816/ltib/rpm/BUILD/u-boot-2009.08$ make distclean  //if you have configured already, skip it

L3.0.35_4.1.0_130816/ltib/rpm/BUILD/u-boot-2009.08$ make mx6sl_evk_config //if you have configured already, skip it

L3.0.35_4.1.0_130816/ltib/rpm/BUILD/u-boot-2009.08$ make

L3.0.35_4.1.0_130816/ltib/rpm/BUILD/linux$ make distclean //if you have configured already, skip it

L3.0.35_4.1.0_130816/ltib/rpm/BUILD/linux$ make imx6s_defconfig //if you have configured already, skip it

L3.0.35_4.1.0_130816/ltib/rpm/BUILD/linux$ make uImage


Grace

0 Kudos
Reply

1,034 Views
OtavioSalvador
Senior Contributor II

If you are open to migrate to Yocto Project, you can use the FSL Community BSP as it provides support for i.MX6SL EVK board and provides a newer version of U-Boot (2013.04-fsl and 2013.10).

0 Kudos
Reply

1,034 Views
jayakumar2
Contributor V

Thanks Otavio. Yes, I like Yocto/OE based recipes and intend to migrate to it in the longer term. I'm glad to hear that there's a community behind it. However, in the short term, looks like I have to stay with ltib. Hopefully I'll find a way to recompile faster than doing scbuild each time. Thanks.

0 Kudos
Reply

1,034 Views
OtavioSalvador
Senior Contributor II

Jaya, alright.

Just bear on mind that 3.0.35-4.1.0 was the last LTIB release and 3.10.17-1.0.0 (for Yocto Project) is in beta already.

Anyway... good luck with the project.

0 Kudos
Reply