您的位置:首页 > 运维架构 > Linux

[置顶] 【总结】嵌入式Linux学习中遇到的问题及解决方法

2017-06-01 19:34 525 查看
持续更新。。。

(1)uboot中执行nfs 32000000  192.168.1.101:/work/nfs_root/uImage_new

下载新内核时出现:TTT***ERROR:Cannot
umount。如下图:



解决方法:

在linux虚拟机下输入:sudo vi  /etc/hosts。在里面加上一行:

192.168.1.17  /work/nfs_root/

192.168.1.17  是单板uboot设置的IP



(2)Freeing init memory: 164K Kernel
panic - not syncing: No init found.  Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.



解决方法:

如果你刚移植了内核,设置了分区,制作了文件系统,那么八成是:文件系统烧错地方,或者分区不对,内核根本没找到文件系统。请检查uboot分区和内核中的分区是否一致。

(3)warning
implicit declaration of function 'exit'

Add:
#include <stdlib.h>

(4)ubuntu 14 中安装arm-linux-gcc-4.4.3,装好后设置环境变量,然后arm-linux-gcc -v是出现:
/opt/FriendlyARM/toolschain/4.4.3/bin/arm-linux-gcc: 15: exec: /opt/FriendlyARM/toolschain/4.4.3/bin/.arm-none-linux-gnueabi-gcc: not found

解决方法:
执行:apt-get install lsb-core   

(5)git commit -m "first_base_root"的时候出现:

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"

  git config --global user.name "Your Name"

to set your account's default identity.

Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'root@yangfei-virtual-machine.(none)')

解决方法:

vi .git/config

在下面加上:

[user]
 email=your email
 name=your name

(6)ubuntu 编译内核出现 

recipe for target 'menuconfig' failed

No command 'recipe' found, did you mean:

 Command 'recite' from package 'recite' (universe)

recipe: command not found

解决方法:

sudo apt-get install libncurses5-dev   

(7)ubuntu出现:

error while loading shared libraries: libstdc++.so.6: cannot open shared obj

解决方法:

apt-get install lib32stdc++6

(8)内核启动过程中,打印: can't run '/etc/init.d/rcS': Permission denied

是制作文件系统的时候,没有加上缺陷,导致脚本文件无法被正常执行。

解决方法:

 chomd +x /etc/init.d/rcS。。。
(9)ls  /dev 目录下只有console 和 null
正常情况下,单板内核启动并加载文件系统后,在/dev下会看到一些设备节点。
原因是mdev没有正常被文件系统加载,文件系统脚本文件没有正常执行,或者busybox中没有配置mdex(默认是配置了的)
解决方法:

 chomd +x /etc/init.d/rcS。

(10)Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at kernel/timeconst.pl line 373
解决方法:

打开 kernel/timeconst.pl

@val = @{$canned_values{$hz}};

if (!defined(@val)) {

@val = compute_values($hz);

}

output($hz, @val);

将if (defined(@val)) 改为if (!@val),再次编译就可以通过了。

(11)安装ssl时:POD document had syntax errors at /usr/bin/pod2man line 68.

解决方法:执行

sudo rm /usr/bin/pod2man

(12)单板 passwd root时出现
unknown uid 0

解决方法:



13、makefile中的反斜杠\

反斜杠\:换行符的意思,不用写到一行了,这样增加makefile可读性。

OBJS := main.o \
                        display/disp_manager.o        \
                        display/fb.o                  \
                        encoding/ascii.o              \
                        encoding/utf-16be.o           
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: