Helo, I am trying to compile the Raspberry Pi's linux 3.10 kernel following the instructions from here . I have got the kernel from https://github.com/raspberrypi/linux and I am using this compiler.
Everything goes well until I have to run
make ARCH=arm CROSS_COMPILE=${CCPREFIX}
This is the output with the errors I get:
$ make ARCH=arm CROSS_COMPILE=${CCPREFIX}
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' está actualizado.
CALL scripts/checksyscalls.sh
CC scripts/mod/devicetable-offsets.s
GEN scripts/mod/devicetable-offsets.h
HOSTCC scripts/mod/file2alias.o
HOSTLD scripts/mod/modpost
CHK include/generated/compile.h
GZIP kernel/config_data.gz
CHK kernel/config_data.h
CC [M] drivers/net/wireless/rtl8192cu/core/rtw_cmd.o
In file included from drivers/net/wireless/rtl8192cu/include/osdep_service.h:1233:0,
from drivers/net/wireless/rtl8192cu/core/rtw_cmd.c:23:
drivers/net/wireless/rtl8192cu/include/rtw_byteorder.h:36:2: error: #error "Must be LITTLE/BIG Endian Host"
In file included from drivers/net/wireless/rtl8192cu/include/drv_types.h:83:0,
from drivers/net/wireless/rtl8192cu/core/rtw_cmd.c:24:
drivers/net/wireless/rtl8192cu/include/rtw_mlme_ext.h:886:2: error: #error "Must be LITTLE or BIG Endian"
make[4]: *** [drivers/net/wireless/rtl8192cu/core/rtw_cmd.o] Error 1
make[3]: *** [drivers/net/wireless/rtl8192cu] Error 2
make[2]: *** [drivers/net/wireless] Error 2
make[1]: *** [drivers/net] Error 2
make: *** [drivers] Error 2
How can I solve this? Thank you!
I've been digging around Google for weeks to solve the exact problem that you faced.
Not that I've got the direct answer, but at least by following the exact steps shown in the link below, I've been able to compiled an image that is able to boot up Raspbian (with errors left to be solved, still) on the RPI.
http://helloraspberrypi.blogspot.tw/2014/01/cross-compile-raspberry-pi-kernel-from.html
The steps are as follows:
Create our working directory, raspberrypi:
$ mkdir raspberrypi
$ cd raspberrypi
Before start our works, install the necessary tools and source code of Raspberry Pi linux:
$ git clone https: //github.com/raspberrypi/tools.git
$ git clone https: //github.com/raspberrypi/linux.git
Prepare the .config file from pre-packaged config, bcmrpi_cutdown_defconfig:
$ cd linux
$ make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- bcmrpi_cutdown_defconfig
========== Take Note ==========
For the sake of readability, I won't be including the details of how I solve my problem with mouse and keyboard not working after the "startx" command.
However,
$ make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- menuconfig
was used rather than
$ make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- bcmrpi_cutdown_defconfig
I can provide more details if required.
========== Take Note ==========
Build kernel:
$ make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi-
$ mkdir ../modules
$ make modules_install ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- INSTALL_MOD_PATH=../modules/
$ cd ../tools/mkimage/
$ ./imagetool-uncompressed.py ../../linux/arch/arm/boot/Image
Now insert a Raspbian installed SD Card, and run the command:
$ sudo rm /media//kernel.img
$ sudo mv kernel.img /media//
$ sudo rm -rf /media//lib/modules/
$ sudo rm -rf /media//lib/firmware/
$ cd ../../modules/
$ sudo cp -a lib/modules/ /media//lib/
$ sudo cp -a lib/firmware/ /media//lib/
$ sync
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.