how to cross compile the kernel without script

131 views
Skip to first unread message

vaira...@gmail.com

unread,
Oct 9, 2014, 2:52:16 PM10/9/14
to beagl...@googlegroups.com

Hi,

I compile and install the new kernel(3.16.2) image for my PC. And, I have installed the ARM Cross Compiler for  BeagleBone Black (Rev C). Now how can i cross compile the kernel for BeagleBone Black

Thanks in Advance,
Vairamani V

Robert Nelson

unread,
Oct 9, 2014, 3:39:50 PM10/9/14
to Beagle Board
On Thu, Oct 9, 2014 at 1:52 PM, <vaira...@gmail.com> wrote:
>
> Hi,
>
> I compile and install the new kernel(3.16.2) image for my PC. And, I have
> installed the ARM Cross Compiler for BeagleBone Black (Rev C). Now how can
> i cross compile the kernel for BeagleBone Black

make ARCH=arm CROSS_COMPILE=<your arm cross compiler> zImage modules dtbs

Regards,

--
Robert Nelson
http://www.rcn-ee.com/

vaira...@gmail.com

unread,
Oct 10, 2014, 1:04:06 PM10/10/14
to beagl...@googlegroups.com

Robert Nelson,
1) I have installed the ARM Cross Compiler as per your instruction given in

http://eewiki.net/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-ARMCrossCompiler:GCC

2) I have compiled and installed the kernel 3.16.2. then copied the "vmlinuz-3.16.2.bin" to folder where the makefile for linux_kernel_3.16.2 contain(linux3.16.2). Now i cross compiled the kernel as you given above post. But it is return error, Is any steps i missed?

root@vairamani-pc:/home/vairamani/linux/linux-3.16.2# make ARCH=arm CROSS_COMPILE=${CC} vmlinuz-3.16.2 modules dtbs
scripts/kconfig/conf --silentoldconfig Kconfig
***
*** Configuration file ".config" not found!
***
*** Please run some configurator (e.g. "make oldconfig" or
*** "make menuconfig" or "make xconfig").
***
make[2]: *** [silentoldconfig] Error 1
make[1]: *** [silentoldconfig] Error 2
make: Nothing to be done for `vmlinuz-3.16.2'.

The present kernel configuration has modules disabled.
Type 'make config' and enable loadable module support.
Then build a kernel with module support enabled.

make: *** [modules] Error 1
root@vairamani-pc:/home/vairamani/linux/linux-3.16.2# make ARCH=arm CROSS_COMPILE=${CC} menuconfig
scripts/kconfig/mconf Kconfig
#
# using defaults found in /boot/config-3.16.2
#
/boot/config-3.16.2:7663:warning: symbol value 'm' invalid for KVM
configuration written to .config

*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.

root@vairamani-pc:/home/vairamani/linux/linux-3.16.2#

Robert Nelson

unread,
Oct 10, 2014, 1:41:33 PM10/10/14
to Beagle Board
On Fri, Oct 10, 2014 at 12:04 PM, <vaira...@gmail.com> wrote:
>
> Robert Nelson,
> 1) I have installed the ARM Cross Compiler as per your instruction given in
>
> http://eewiki.net/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-ARMCrossCompiler:GCC
>
> 2) I have compiled and installed the kernel 3.16.2. then copied the
> "vmlinuz-3.16.2.bin" to folder where the makefile for linux_kernel_3.16.2
> contain(linux3.16.2). Now i cross compiled the kernel as you given above
> post. But it is return error, Is any steps i missed?
>
> root@vairamani-pc:/home/vairamani/linux/linux-3.16.2# make ARCH=arm
> CROSS_COMPILE=${CC} vmlinuz-3.16.2 modules dtbs
> scripts/kconfig/conf --silentoldconfig Kconfig
> ***
> *** Configuration file ".config" not found!
> ***

Really?

make ARCH=arm yourcustom_defconfig

or:

make ARCH=arm omap2plus_defconfig
make ARCH=arm menuconfig

But, that's kind of an obvious step, for a kernel developer... Maybe
you should just use the "script" as that does everything for you...
Reply all
Reply to author
Forward
0 new messages