Clean/Rebuild target using bitbake

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

Clean/Rebuild target using bitbake

22,675 Views
dhavalvadhar
Contributor IV

Hi,

I want to clean the binaries generated using 'bitbake' command and rebuild the following two targets:

1. I ran command 'bitbake core-image-minimal'. And at the end it will generate few images which will be deployed at "<build dir>/tmp/deploy/images/<target device>/" path. Now next when I run this command it will generate all new images and create appropriate sym-links. But it also kept older images. How can clean this?

2. I ran command 'bitbake imx-test'. It will build the unit tests and then generate the binaries at "<build dir>/tmp/work/<target device>-poky-arm-gnueabi/imx-test/<version>/..." path. Now, after changing one of the source file, I again ran the command 'bitbake imx-test'. But it didn't compile the updated source file and thus didn't generate the binary. How can I achieve this?

I would appreciate if someone can help me understand and resolve this.

Thanks,

Dhaval

Labels (1)
7 Replies

12,276 Views
saurabh206
Senior Contributor III

Hi

Use following command sequence.

bitbake -f -c compile imx-test

bitbake imx-test

Thanks

Saurabh

12,277 Views
dhavalvadhar
Contributor IV

Hi Saurabh,

Thanks for your quick reply!

1. What about the first question of my post.

2. I have tried the command you have suggested and that works fine. Now I want to add a customized capture application within imx-test and want to build it. For that I put that application in mxc_v4l2_test directory and updated the mxc_v4l2_test/Makefile as follows:

ifeq ($(PLATFORM),$(findstring $(PLATFORM),$(CSI_LIST)))

OBJS += $(OBJDIR)/csi_v4l2_overlay.out \

               $(OBJDIR)/mx6s_v4l2_capture.out \

               $(OBJDIR)/sampleCapture.out

Then I rebuild the imx-test using same commands. But it is not generating the .out file!! Am I doing something wrong?

Also, how can I build the imx-test using 'make' command i.e. without using 'bitbake'.

Thanks,

Dhaval

0 Kudos

12,277 Views
saurabh206
Senior Contributor III

For  your first post  check following.

YOCTO project clean

For your second post.

Use attached folder , put you file as "mxc_test_out.c"

12,277 Views
dhavalvadhar
Contributor IV

Hi Saurabh,

Thanks for your reply! I was able to build the *.out file using the Makefile, after removing linking of '-lvpu -lipu as I didn't get these libraries. After that I try to run the compiled *.out file on i.MX6. And it is giving me strange error.

Compilation logs:

$ make clean;make

rm -f /mx6s_v4l2_capture.out mx6s_v4l2_capture.o

arm-poky-linux-gnueabi-gcc  -march=armv7-a -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a9 --sysroot=/opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi  -Wall -O2 -c mx6s_v4l2_capture.c -o mx6s_v4l2_capture.o

mx6s_v4l2_capture.c: In function 'v4l_capture_test':

mx6s_v4l2_capture.c:501:29: warning: 'fb0' may be used uninitialized in this function [-Wmaybe-uninitialized]

      memcpy(fb0 + bufoffset + j * var.xres * 2,

                             ^

mx6s_v4l2_capture.c:541:3: warning: 'fb0_size' may be used uninitialized in this function [-Wmaybe-uninitialized]

   munmap((void *)fd_fb, fb0_size);

   ^

arm-poky-linux-gnueabi-gcc -o mx6s_v4l2_capture.out mx6s_v4l2_capture.o  -lrt -lpthread

Error  while running on i.MX6:

# ls -la

total 36

drwxrwx--- 4 root disk  4096 Aug 20 06:55 .

drwxr-xr-x 4 root root    80 Aug 20 06:34 ..

drwxrwx--- 2 root disk  4096 Aug 19 18:35 System Volume Information

-rwxrwx--- 1 root disk 19869 Aug 20  2015 mx6s_v4l2_capture.out

drwxrwx--- 2 root disk  8192 Jul 12 13:43 unit_tests

root@varsomimx6:/run/media/mmcblk0p1# ./mx6s_v4l2_capture.out

-sh: ./mx6s_v4l2_capture.out: No such file or directory

Though this file is exist, it is giving the error 'No such file or direcory'. Not able to understand why?

Please help me here.

Thanks,

Dhaval

0 Kudos

12,277 Views
dhavalvadhar
Contributor IV

Has anybody face this kind of issue?

Appreciate quick reply.

0 Kudos

12,277 Views
dhavalvadhar
Contributor IV

Can someone please help me here?

0 Kudos

12,277 Views
jamesbone
NXP TechSupport
NXP TechSupport

Excellent aport!!

0 Kudos