简体   繁体   English

尝试编译Raspberry Pi 3.10内核时出错

[英]Error trying to compile Raspberry Pi 3.10 kernel

Helo, I am trying to compile the Raspberry Pi's linux 3.10 kernel following the instructions from here . 嗨,我正在尝试按照此处的说明编译Raspberry Pi的linux 3.10内核。 I have got the kernel from https://github.com/raspberrypi/linux and I am using this compiler. 我已经从https://github.com/raspberrypi/linux获得了内核,并且正在使用编译器。

Everything goes well until I have to run 一切顺利,直到我必须跑步

make ARCH=arm CROSS_COMPILE=${CCPREFIX} 使ARCH =手臂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. 我已经在Google周围搜寻了数周,以解决您遇到的确切问题。

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. 并不是我得到了直接的答案,但是至少通过按照下面链接中所示的确切步骤,我已经能够编译能够启动Raspbian的映像(仍然有待解决的错误)在RPI上。

http://helloraspberrypi.blogspot.tw/2014/01/cross-compile-raspberry-pi-kernel-from.html http://helloraspberrypi.blogspot.tw/2014/01/cross-compile-raspberry-pi-kernel-from.html

The steps are as follows: 步骤如下:

Create our working directory, raspberrypi: 创建我们的工作目录raspberrypi:

$ mkdir raspberrypi $ mkdir raspberrypi
$ cd raspberrypi $ cd raspberrypi

Before start our works, install the necessary tools and source code of Raspberry Pi linux: 在开始我们的工作之前,请安装Raspberry Pi linux的必要工具和源代码:

$ git clone https: //github.com/raspberrypi/tools.git $ git clone https://github.com/raspberrypi/tools.git
$ git clone https: //github.com/raspberrypi/linux.git $ git clone https://github.com/raspberrypi/linux.git

Prepare the .config file from pre-packaged config, bcmrpi_cutdown_defconfig: 从预打包的配置bcmrpi_cutdown_defconfig准备.config文件:

$ cd linux $ cd Linux
$ make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- bcmrpi_cutdown_defconfig $ 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. 出于可读性考虑,在“ startx”命令后,我将不包括如何解决鼠标和键盘不起作用的问题的详细信息。

However, 然而,

$ make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- menuconfig $ 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 $ 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- $ make ARCH = arm CROSS_COMPILE = / usr / bin / arm-linux-gnueabi-
$ mkdir ../modules $ mkdir ../模块
$ make modules_install ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- INSTALL_MOD_PATH=../modules/ $ make modules_install ARCH = arm CROSS_COMPILE = / usr / bin / arm-linux-gnueabi- INSTALL_MOD_PATH = .. / modules /
$ cd ../tools/mkimage/ $ cd ../tools/mkimage/
$ ./imagetool-uncompressed.py ../../linux/arch/arm/boot/Image $ ./imagetool-uncompressed.py ../../linux/arch/arm/boot/Image

Now insert a Raspbian installed SD Card, and run the command: 现在插入已安装Raspbian的SD卡,然后运行以下命令:

$ sudo rm /media//kernel.img $ sudo rm /media//kernel.img
$ sudo mv kernel.img /media// $ sudo mv kernel.img / media //
$ sudo rm -rf /media//lib/modules/ $ sudo rm -rf / media // lib / modules /
$ sudo rm -rf /media//lib/firmware/ $ sudo rm -rf / media // lib / firmware /
$ cd ../../modules/ $ cd ../../modules/
$ sudo cp -a lib/modules/ /media//lib/ $ sudo cp -a lib / modules / / media // lib /
$ sudo cp -a lib/firmware/ /media//lib/ $ sudo cp -a lib / firmware / / media // lib /
$ sync $同步

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM