build vmlinux without using LTIB?

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

build vmlinux without using LTIB?

2,792 Views
Durian
Contributor I
Hello, I have a 5208evb board. I downloaded the 5208evb BSP ISO image from the Freescale website and got it to install properly on my Linux laptop. I also successfully built the vmlinux using the LTIB scripts.

I will be modifying this BSP for our 5208 board, which is based on the evb board. So I will be changing the BSP code a bit. I like to be able to rebuild the BSP without using the LTIB scripts which heavily relys on the RPM packages, but by just using the Makefile at the kernel top level directory. I tried doing a 'make' there, but it does not work. It seems to be missing some environment variables that the LTIB passes to it.

By the way, I had run LTIB with the options so that the LTIB script does not delete the kernel source code after it builds the kernel. So I have the source for the entire kernel tree.

Has anyone rebuilt the BSP without using the LTIB, and just used the normal command line make at the kernel top level directory?

Thanks
Labels (1)
0 Kudos
7 Replies

640 Views
mwaddel
Contributor I
Hi Durian,

Once ltib has successfully completely a build and created a romfs image, you
can use 3 commands in the kernel directory to do kernel development:

make ARCH=m68knommu CROSS_COMPILE=m68k-uclinux-
m68k-uclinux-objcopy -O binary vmlinux vmlinux.bin
cat vmlinux.bin ~/ltib/tmp/romfs.img > image.bin

You need to make sure the toochain directory is included in your PATH or
specify m68k-uclinux- with a complete path to the toolchain. 

Copy image.bin to the tftpboot directory and it's ready to go.

Regards,
Matt
0 Kudos

640 Views
Durian
Contributor I
Thanks Matt for your reply. I will give it a shot...

To do a make clean, I assume I will use the same make command line as you specified, but add clean at the end?

Thanks
0 Kudos

640 Views
mwaddel
Contributor I
I believe when your doing a "make clean" either way will give
the same results.

make clean (or)
make ARCH=m68knommu CROSS_COMPILE=m68k-uclinux- clean

--Matt
0 Kudos

640 Views
Durian
Contributor I
Matt, when I tried the steps you suggested to make without using ltib, it works. The make runs all the way to the end when it says:

LD   vmlinux
SYSMAP System.map
Building modules, stage 2.
MODPOST
WARNING: vmlinux: 'strcat' export twice. Previous export was in vmlinux
WARNING: vmlinux: 'strcmp' export twice. Previous export was in vmlinux
WARNING: vmlinux: 'strncmp' export twice. Previous export was in vmlinux
WARNING: vmlinux: 'strchr' export twice. Previous export was in vmlinux
and a lot more other warnings of the same nature..

Do you know what may be causing this?

Thanks

0 Kudos

640 Views
mwaddel
Contributor I
Hi Durian,

I'm not sure what's causing those warnings, but they are only warnings and
don't affect functionality.  You can ignore them.

Best regards,
Matt
0 Kudos

640 Views
Durian
Contributor I
I have run ltib and built a zImage and vmlinux. But I now forgot how I got my linux built so that ltib does not delete the sources.

Does anyone have the ltib command to build and not delete the sources?

I tried to find my kernel package name, but I don't know where it is. Can someone help?
0 Kudos

640 Views
kmahan
Contributor I
You can build the kernel (or any other ltib package) manually by doing the following:

    ltib -p kernel -m prep          (sets up the kernel source in rpm/BUILD/linux-xyz
    ltib -p kernel -m scbuild      (builds it)
    ltib -p kernel -m scdeploy   (copies it over)

--Kurt
0 Kudos