OK335xS U-boot 编译问题&无Linux shell 问题
/************************************************************************** * OK335xS U-boot 编译问题&无Linux shell 问题 * 声明: * 主要是因为系统之前是由本人师傅做的,他去掉了一些信息,同时由于他本人 * 目前不在旁边,在参考一些文件的时候出现以下情况。 * * 2015-7-17 阴 深圳 南山平山村 曾剑锋 *************************************************************************/ 一、采用官方的制作U-boot(make CROSS_COMPILE=arm-linux-gnueabihf- ARCH=arm O=am335x am335x_evm)出现如下错误: 1. 问题:make: *** No rule to make target am335x_evm_config 1. cat Makefile: ...... MKCONFIG := $(srctree)/mkconfig export MKCONFIG ...... %_config:: outputmakefile @$(MKCONFIG) -A $(@:_config=) ...... 2. cat mkconfig if [ \( $# -eq 2 \) -a \( "$1" = "-A" \) ] ; then # Automatic mode line=`awk '($0 !~ /^#/ && $7 ~ /^'"$2"'$/) { print $1, $2, $3, $4, $5, $6, $7, $8 }' $srctree/boards.cfg` if [ -z "$line" ] ; then echo "make: *** No rule to make target \`$2_config'. Stop." >&2 exit 1 fi set ${line} # add default board name if needed [ $# = 3 ] && set ${line} ${1} fi 2. 问题:生成u-boot.bin error: bad value (armv5) for -march= switch http://arm9home.net/read.php?tid-82914.html 3. 解决方法: cat > remake.sh << EOF export CROSS_COMPILE=arm-linux-gnueabihf- export ARCH=arm make am335x_evm_config make EOF 二、文件系统跑起来之后无法得到Linux shell终端: # # The "id" field MUST be the same as the last # characters of the device (after "tty"). # # Format: # <id>:<runlevels>:<action>:<process> # #S:2345:respawn:/sbin/getty 115200 ttyO0 0:2345:respawn:/sbin/getty 115200 ttyO0 三、重新生成.config文件: 1. 出错现象: Qt@aplex:~/kernel/linux-3.2.0$ make uImage scripts/kconfig/conf --silentoldconfig Kconfig * * Restart config... * * * General setup * Prompt for development and/or incomplete code/drivers (EXPERIMENTAL) [Y/n/?] y Cross-compiler tool prefix (CROSS_COMPILE) [] Local version - append to kernel release (LOCALVERSION) [] Automatically append version information to the version string (LOCALVERSION_AUTO) [Y/n/?] y Kernel compression mode > 1. Gzip (KERNEL_GZIP) 2. Bzip2 (KERNEL_BZIP2) (NEW) 3. LZMA (KERNEL_LZMA) 4. XZ (KERNEL_XZ) (NEW) 5. LZO (KERNEL_LZO) choice[1-5?]: 2. 出现问题原因: cat ~/.bashrc ...... CROSS_COMPILE=arm-linux-gnueabihf- ARCH=arm ...... 3. 解决方法: cat ~/.bashrc ...... export CROSS_COMPILE=arm-linux-gnueabihf- export ARCH=arm ...... 四、tslib编译问题: 1. 出错现象: In function ‘open’, inlined from ‘main’ at ts_calibrate.c:227:11: /usr/include/x86_64-linux-gnu/bits/fcntl2.h:51:24: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT in second argument needs 3 arguments In function ‘open’, inlined from ‘main’ at ts_calibrate.c:229:11: /usr/include/x86_64-linux-gnu/bits/fcntl2.h:51:24: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT in second argument needs 3 arguments make[1]: *** [ts_calibrate.o] Error 1 make[1]: Leaving directory `/home/Qt/tslib/tslib/tests' make: *** [install-recursive] Error 1 2. 解决方法: http://www.gossamer-threads.com/lists/qmail/users/138200