尝试在Ubuntu 16.04上为嵌入式板编译linux内核,并且在make时遇到此错误:
fatal error: mach/cputype.h: No such file or directory
compilation terminated.
我使用的板是集成了OMAPL138的TMDSLCDK138。我从此处http://software-dl.ti.com/sdoemb/sdoemb_public_sw/mcsdk/latest1/index_FDS.html安装了TI SDK,在安装文件夹中有一个自定义的linux SDK,名为“linux-3.3-psp03.22.00.06.sdk”。这是我到目前为止所做的:
sudo make O=/home/BOB/omapbuild/omap_linux/ menuconfig
为我的开发板配置内核。下一个:sudo make O=/home/BOB/omapbuild/omap_linux/
这是我收到错误的地方。我的所有 header 都是最新的。
最佳答案
多亏了这些注释,我可以通过设置良好的环境来编译内核:
export ARCH=arm
export PATH=/home/bob/ti/mcsdk_1_01_00_02/linux-devkit/sysroots/i686-arago-linux/usr/bin/:$PATH
export CROSS_COMPILE=arm-arago-linux-gnueabi-
然后对于TMDSLCDK138板:
make tisdk_omapl138-lcdk_defconfig
make uImage
关于compiler-errors - 错误编译内核,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42696662/