嵌入式Linux启动过程中的问题积累

嵌入式Linux启动过程中的问题积累

Dongas 07-12-19

1.Bad Magic Number

## Booting image at 33000000 ...

Bad Magic Number

OMAP5912 OSK # (tftp下载好kernel的uImage后就停止在这,不能启动kernel)

问题原因:启动参数设置错误,0x30000000处不可以执行。

有的开发板sdram不是在0x33000000,所以不能把kernel uImage下载到0x33000000中运行。如我之前的bootcmd参数为:setenv bootcmd tftpboot 33000000 uImage/; bootm 33000000。但板子Omap5912的sdram地址在0x100000000,将参数改为setenv bootcmd tftpboot 10000000 uImage/; bootm 10000000后便可以启动kernel了。

2.启动停止在"Starting kernel ..."

TFTP from server 192.168.167.170; our IP address is 192.168.167.15

Filename 'uImage'

Load address: 0x10000000

Loading: #################################################################

#################################################################

done

Bytes transferred = 2025908 (1ee9b4 hex)

## Booting image at 10000000 ...

Image Name: Linux-2.6.18-mh8_pro500-versatil

Image Type: ARM Linux Kernel Image (uncompressed)

Data Size: 2025844 Bytes = 1.9 MB

Load Address: 30008000

Entry Point: 30008000

Verifying Checksum ... OK

OK

Starting kernel ... (卡在这里)

问题原因:多半是kernel没编译成功。

确认configure参数是否配置正确,是否选择了正确的目标编译平台,如smdk2410等。

3.不能启动kernel

Starting kernel ...

Uncompressing Linux.........................................................

.................... done, booting the kernel.

问题原因:可能是Bootargs参数设置错误,确认bootargs设置是否正确。

4.不能挂载nfs

eth0: link up

IP-Config: Complete:

device=eth0, addr=192.168.167.15, mask=255.255.255.0, gw=192.168.167.254,

host=192.168.167.15, domain=, nis-domain=(none),

bootserver=192.168.167.170, rootserver=192.168.167.170, rootpath=

Looking up port of RPC 100003/2 on 192.168.167.170

Root-NFS: Unable to get nfsd port number from server, using default

Looking up port of RPC 100005/1 on 192.168.167.170

Root-NFS: Unable to get mountd port number from server, using default

mount: server 192.168.167.170 not responding, timed out

Root-NFS: Server returned error -5 while mounting /work/nfs/rootfs_bluetooth_omap

VFS: Unable to mount root fs via NFS, trying floppy.

VFS: Cannot open root device "nfs" or unknown-block(2,0)

Please append a correct "root=" boot option

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)

问题原因:这种情况通常是nfs配置问题。

确认uboot的bootargs参数里和nfs相关的ip地址信息设置是否正确,以及Host机/etc/exports配置无误,重起nfs服务,重新尝试连接。另外还需要注意bootargs内console和mem两个参数的设置。kernel2.6后console最好设置为ttySAC0,mem也要根据开发板实际情况设置正确。

5.文件系统不能启动问题

eth0: link up

IP-Config: Complete:

device=eth0, addr=192.168.167.15, mask=255.255.255.0, gw=192.168.167.254,

host=192.168.167.15, domain=, nis-domain=(none),

bootserver=192.168.167.170, rootserver=192.168.167.170, rootpath=

Looking up port of RPC 100003/2 on 192.168.167.170

Looking up port of RPC 100005/1 on 192.168.167.170

VFS: Mounted root (nfs filesystem).

Freeing init memory: 128K

/sbin/initKernel panic - not syncing: Attempted to kill init!

问题原因:制作的文件系统缺少运行busybox所需的libcrypt.so库,新版本会有缺库提示,老版本(1.60)没有。

注:运行一个busybox文件系统至少需要如下几个库:

ld-linux.so.x

libc.so.6

libcrypt.so.x

较新版本的busybox可能还需要

libm.so.6

libgcc_s.so.x

(x为版本号)

6.文件系统不能启动问题2

eth0: link up

IP-Config: Complete:

device=eth0, addr=192.168.167.15, mask=255.255.255.0, gw=192.168.167.254,

host=192.168.167.15, domain=, nis-domain=(none),

bootserver=192.168.167.170, rootserver=192.168.167.170, rootpath=

Looking up port of RPC 100003/2 on 192.168.167.170

Looking up port of RPC 100005/1 on 192.168.167.170

VFS: Mounted root (nfs filesystem).

Freeing init memory: 128K

Kernel panic - not syncing: No init found. Try passing init= option to kernel.

问题原因:对比一个可用的文件系统后发现,缺少了ld-linux.so.x库,文件系统里只有ld-linux.so.x的连接文件,少拷了库文件。

8.不能获得帐户UID信息

Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

Unknown username "root" in message bus configuration file

Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

Failed to start message bus: Could not get UID and GID for username "root"

问题原因:

情况一:系统帐户验证出现问题.怀疑是调用getuid、getguid时并没有返回正确值,可能是缺少帐户验证相关库,实际排查后发现,缺少libnss_files库。拷贝交叉编译器的libnss_files库到文件系统后,启动文件系统成功。

情况二:系统没有root帐号。可以由whoami命令看出。

手动创建帐号。

#vi /etc/passwd

root:x:0:0:root:/root:/bin/sh

kyo:x:500:500:kyo:/home/kyo:/bin/bash

添加组

#vi group

root:x:0:root

9.

Freeing init memory: 128K

init started: BusyBox v1.6.1 (2007-08-27 14:33:15 CST) multi-call binary

starting pid 834, tty '': '/etc/init.d/rcS'

Cannot run '/etc/init.d/rcS': No such file or directory

Please press Enter to activate this console.

发现没有/etc/init.d/rcS文件系统一样能正常启动。看来rcS只是用来设置一些随机启动的参数,对文件能否正常运行关系不大。

注:这个不是错误,是偶然发现! :)

转载于:https://www.cnblogs.com/Charles-Zhang-Blog/p/3380827.html

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/401577.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

使用BusyBox制作嵌入式Linux根文件系统

STEP 1:构建目录结构 创建根文件系统目录,主要包括以下目录/dev /etc /lib /usr /var /proc /tmp /home /root /mnt /bin /sbin /sys #mkdir /home/rootfs#cd /home/rootfs #mkdir dev etc lib usr var proc tmp home root …

Linux串口c_cc[VTIME]和c_cc[VMIN]属性设置的作用

Linux串口c_cc[VTIME]和c_cc[VMIN]属性设置的作用 在串口编程模式下,open未设置O_NONBLOCK或O_NDELAY的情况下。 c_cc[VTIME]和c_cc[VMIN]映像read函数的返回。 VTIME定义等待的时间,单位是百毫秒(通常是一个8位的unsigned char变量,取值不能…

Linux_2.6字符设备驱动实例

第一步&#xff1a;my74hc595.c #include <linux/module.h> //模块所需的大量符号和函数定义#include <linux/init.h> //指定初始化和清除函数#include <linux/fs.h> //文件系统相关的函数和头文件#include <linux/cdev.h> //cdev结构的头文件#include…

移植mysql到嵌入式ARM平台

移植MySQL到嵌入式ARM平台 MySQL没有专门针对ARM的版本&#xff0c;移植到ARM没有官方文档可参考&#xff0c;因此&#xff0c;暂时参考这样一篇文档&#xff1a; http://blog.chinaunix.net/space.php?uid9701860&doblog&id285428&#xff0c;因为MySQL5.5之后&…

'./mysql-bin.index' not found (Errcode: 13) 的解决方法

将文件系统复制到PC机上&#xff0c;然后再拷贝到别的SD卡后&#xff0c;发现mysql无法启动了&#xff0c;首先检查了一下mysql的错误日志&#xff0c;发现最后出现以下错误&#xff1a;/usr/local/mysql/libexec/mysqld: File ./mysql-bin.index not found (Errcode: 13)提示.…

Unity Hub安装Android Build Support报错:Failed to delete old Unity Android Supprtinstallation files

安装失败&#xff1a; 解决方法&#xff1a; 需要先安装 Android Build Support &#xff0c;再安装 Android SDK & NDK Tools 和 OpenJDK 其他情况&#xff1a; 如果已经安装了Android SDK & NDK Tools 和 OpenJDK&#xff0c;只剩Android Build Support 未安装成功…

红米5 Plus刷开发版/小米手机刷开发版

到官网选择对应手机型号下载Rom包&#xff1a;MIUI下载 下载完成后手机打开&#xff1a;设置→我的设备→MIUI版本→右上角选择【手动选择安装包】&#xff0c;找到下载的包等待手机重启就行了。 PS&#xff1a;如果是像下面这样 小米手机找不到手动选择安装包 选项的话&#…

小米手机开启Root权限

1.开启权限前手机先要刷成开发版&#xff0c;可以看 → 小米手机刷开发版 2.设备解锁&#xff0c;先在 设置→我的设备→全部参数→开启开发者模式→多击MIUI版本 开启开发者模式&#xff0c;然后进入 设置→更多设置→开发者选项→设备解锁状态 &#xff0c;根据操作提示解锁…

小米手机Linux Deploy安装Ubuntu

1.Linux Deploy 2.4版本之后无需再安装Busy Box&#xff0c;所以BusyBox安装报错失败的不需要再安装了。直接GooglePlay下载inux Deploy最新版进行安装即可&#xff0c;或 点击此处下载。 2.下载安装Linux Deploy之后进行Ubuntu的安装。 我的配置如下&#xff1a; 引导设置&a…

Linux Deploy Ubuntu安装samba服务

1.更新软件源&#xff1a;sudo apt-get update 2.安装samba服务&#xff1a;sudo apt-get install samba 3.备份原配置文件&#xff1a;sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bak 4.创建共享目录&#xff1a;sudo mkdir -p /共享文件夹路径 5.更新目录权限&…

摄像头监控录像保存到手机(旧手机/废弃手机)本文使用手机为红米Note5 Plus

本文为使用旧手机安装linux Ubuntu系统之后安装samba服务&#xff0c;用作NAS网络存储&#xff0c;需要摄像头软件可以将录像保存至NAS。 1.手机需要先开启 Root权限&#xff0c;小米手机可参考&#xff1a;小米手机开启Root权限-CSDN博客 2.小米手机正常开启的Root权限不是完整…

通过Blender将PMX模型转为FBX导入Unity

一、下载Blender&#xff08;建议2.83版本不要太高的&#xff09; 官网下载网址&#xff1a;Blender 2.83 LTS — blender.org 二、之后安装Blender&#xff0c;安装后下载插件 下载地址&#xff1a;https://codeload.github.com/GiveMeAllYourCats/cats-blender-plugin/zip/…

Git理论、原理、操作

Git理论、原理、操作 Git简介&#xff1a; 一个开源的分布式版本控制系统。用于处理任何大大小小的项目&#xff0c;是一个开放源码的版本控制软件。Git与SVG的区别&#xff1a; 1、git是分布式的 2、git把内容按元数据方式存储&#xff0c;svg按文件 3、git分支和svg分支不同…

我在Facebook的十点经验分享[转载]

转载自 http://blog.sina.com.cn/s/blog_70c9335b010144kc.html 我是2007年初加入Facebook, 那时大概150人; 2011年9月底离开, 当时3200多人. 经历了很多稀奇古怪但影响很大的项目, 像Application Platform, Social Ads, News Feed, Gift Shop, Facebook Credits等等. 碰到的很…

Android中让Service被关闭后再重新启动

2019独角兽企业重金招聘Python工程师标准>>> --------------------------------------------------------------------------- 转载&#xff1a;http://blog.csdn.net/arui319 --------------------------------------------------------------------------- 如何做…

CloudStack学习-3

此次试验主要是CloudStack结合openvswitch 背景介绍 之所以引入openswitch&#xff0c;是因为如果按照之前的方式&#xff0c;一个网桥占用一个vlan&#xff0c;假如一个zone有20个vlan&#xff0c;那么岂不是每个vlan都要创建一个桥&#xff0c;维护很麻烦 openvswitch是由Nic…

JavaScript将负数转换为正数

负负得正 .vue里的写法&#xff1a; <div v-if"num < 0">{{-(num)}}<div> <div v-if"num > 0">{{num}}<div> 使用过滤器&#xff1a; <div >{{num | absNum}}<div> filters: {absNum(value) {if(a < 0)…

EIGRP中非等价负载均衡的实现

Eigrp为思科私有协议&#xff0c;其协议号为88&#xff0c;采用组播&#xff08;224.0.0.10&#xff09;和单播的方式发送路由更新&#xff0c;并且支持等价和非等价负载均衡。首先来看下Eigrp选择路由的过程&#xff1a;Eigrp中有三张表&#xff0c;分别为Eigrp邻居表、Eigrp拓…

方法覆盖(方法重写)

package com.qingfeng;/** * * author win7 * 功能&#xff1a;方法覆盖(方法重写):子类的某个方法覆盖父类的某个方法 */public class Demo3_8 { public static void main(String[] args) { // TODO Auto-generated method stub Animal animal1 new Animal…

webpack+vue实现项目

webpackvue实现TODO慕课网课程笔记 课程目的&#xff1a; 前端工程&#xff1a;讲明一些前端基础的概念&#xff1b;如何搭建一个工程&#xff0c;一个工程解决了哪些问题 webpack&#xff1a;预计未来前端开发必备的基础 vue&#xff1a;相对于react使用比较简单方便&#xf…