Linux 启动详解2

本文详细介绍了Linux系统的启动过程,从BIOS自检开始,到grub加载器的选择,再到内核的加载及初始化过程,直至最终系统初始化和服务的启动。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

机器加电启动后,BIOS开始检测参数,如内存的大小,日期和时间,磁盘设备以及这些磁盘设备用来引导的顺序,通常情况下,BIOS都是被配置成首先检查
软驱或者光驱(或两者都检查),然后再尝试从硬盘引导。如果在这些可移动的设
备中,没有找到可引导的介质,那么BIOS通常是转向第一块硬盘最初的几个扇区,
寻找用于装载操作系统的指令。装载操作系统的这个程序就是boot loader.
里面的boot loader通常是lilo或者grub,从RedHatLinux 7.2起,GRUB(
GRand Unified Bootloader)取代LILO成为了默认的启动装载程序。那么启动的时候
grub是如何被载入的呢
grub有几个重要的文件,stage1,stage2,有的时候需要stage1.5.这些文件一般都
在/boot/grub文件夹下面.grub被载入通常包括以下几个步骤:
1. 装载基本的引导装载程序(stage1),stage1很小,网上说是512字节,但是在我的系统上
   用 du   -b   /boot/grub/stage1 显示的是1024个字节,不知道是不是grub版本不同的
   缘故还是我理解有误.stage1通常位于主引导扇区里面,对于硬盘就是MBR了,stage1的
   主要功能就是装载第二引导程序(stage2).这主要是归结于在主引导扇区中没有足够的
   空间用于其他东西了,我用的是grub 0.93,stage2文件的大小是 107520 bit.
2. 装载第二引导装载程序(stage2),这第二引导装载程序实际上是引出更高级的功能, 
   以允许用户装载入一个特定的操作系统。在GRUB中,这步是让用户显示一个菜单或
   是输入。由于stage2很大,所以它一般位于文件系统之中(通常是boot所在的根
   分区).
   上面还提到了stage1.5这个文件,它的作用是什么呢   你到/boot/grub目录下看看,
fat_stage_1.5   e2fs_stage_1.5 xfs_stage_1.5等等,很容易猜想stage1.5和文件系统
有关系.有时候基本引导装载程序(stage1)不能识别stage2所在的文件系统分区,那么这
时候就需要stage1.5来连接stage1和stage2了.因此对于不同的文件系统就会有不同的
stage1.5.但是对于grub 0.93好像stage1.5并不是很重要,因为我试过了,在没有stage1.5
的情况下, 我把stage1安装在软盘的引导扇区内,然后把stage2放在格式化成ext2或者
fat格式的软盘内,启动的时候照常引导,并不需要e2fs_stage_1.5或者fat_stage_1.5.
下面是我的试验:
#mkfs.ext2   /dev/fd0
#mount -t ext2   /dev/fd0   /mnt/floppy
#cd   /mnt/floppy
#mkdir boot
#cd   boot
#mkdir grub   (以上三步可用mkdir -p   boot/grub命令完成)
#cd grub
#cp   /boot/grub/{stage1,stage2,grub.conf}   ./
#cd; umount /mnt/floppy
以上几步把软盘格式化成ext2格式,然后把stage1,stage2,grub.conf这几个启动的
时候必须的文件拷贝到软盘的指定目录下.下面安装grub到软盘上.
#grub   (进入grub环境)
grub> install (fd0)/boot/grub/stage1 (fd0)   (fd0)/boot/grub/stage2
p (fd0)/boot/grub/grub.conf
以上这条命令也可以用下面的两句代替
grub>root (fd0) #grub的根目录所在的分区
grub>setup (fd0) #这一步就相当于上面的install命令
我在这里解释一下
install (fd0)/boot/grub/stage1 (fd0)   (fd0)/boot/grub/stage2 p
(fd0)/boot/grub/grub.conf 这条命令.
install
告诉GRUB将(fd0)/boot/grub/grub/stage1
安装到软驱的引导扇区(fd0).
(fd0)/boot/grub/stage2
告诉grub stage2这个文件所在的位置.
p 参数后面跟着(fd0)/boot/grub/grub.conf 告诉grub的配置文件所在的位置.
好了,让BIOS从软驱启动,试一下,没有e2fs_stage_1.5文件照样能够进入系统.
其实这就是一个小小的启动盘啊.(了解了grub的运行,就简单多了^_^)


   3. 现在我们已经到grub的开机选单这一步了,接下来grub所需要做的就是装载在一个特
定分区上的操作系统,如linux内核。一旦GRUB从它的命令行或者配置文件中,接到开始
操作系统的正确指令,它就寻找必要的引导文件,然后把机器的控制权移交给操作系统.
    由于篇幅有限,避免冗长,grub的命令我就不多说了,网上很有多的资料,一个典型
完整的引导linux的命令如下:
    title 51base
          root(hd0,0)
          kernel /bzImage   ro   root=/dev/ram0
          initrd /initrd.img
    这里有必要注意一下几个问题:
    (1)grub的磁盘以及分区的命名方式和linux有所区别,第一个磁盘是从0开始,第一
个分区也是从0开始.譬如第一个硬盘的第5分区在linux下面是/dev/hda5 ,而在grub里面
是(hd0,4).再如/dev/fd0在grub里面是(fd0,0).(最后一句如有错误望提醒)
    (2)不管是IDE硬盘hda,hdb还是SCSI硬盘sda,sdb在grub里面都是以hd方式命名.
譬如虚拟机里面的/dev/sda2在grub里面是(hd0,1),再如/dev/hdb7在grub里面以(hd1,6)
命名.
    (3)要搞清楚上面两个root的关系,root (hd0,0)中的root是grub命令,它用来指定
boot所在的分区作为grub的根目录.而root=/dev/ram0是kernel的参数,它告诉操作系统
内核加载完毕之后,真实的文件系统所在的设备.要注意grub的根目录和文件系统的根
目录的区别.
    再回到上面的几行命令.
    kernel命令用来指定内核所在的位置,"/"代表(hd0,0),也就是grub的根目录
    initrd命令用来指定初始化ram的img文件所在位置.


grub载入内核bzImage并展开到指定位置(应该是0x100000这个地方),同时载入
initrd.img到内存(不知道是什么地方).
ps:
grub的任务至此就结束了,下面grub将机器的控制权转交给操作系统(linux).
操作系统接到控制权之后,开始start_kernel,接着内核将initrd.img展开到/dev/ram0
为临时根文件系统,执行里面的linuxrc文件.
P.这里有必要说一下initrd的作用特别是它里面的核心文件linuxrc的作用.
initrd是inital ram disk的宿写.
当存在initrd的时候,机器启动的过程大概是以下几个步骤(当initrd这一行用
noinitrd 命令代替后,就不存在initrd了)
1)boot loader(grub)加载内核和initrd.img
2)内核将压缩的initrd.img解压成正常的ram disk并且释放initrd所占的内存空间
3)initrd作为根目录以读写方式被挂载
4)initrd里面的文件linuxrc被执行
5)linuxrc挂载新的文件系统
6)linuxrc使用pivot_root系统调用指定新的根目录并将现有的根目录place到指定
位置.
7)在新的文件系统下正式init
8)initrd被卸载.
为了便于理解,我将red hat linnux9 里面的initrd-2.4.20-8.img拿出来分析一下.
这其实是一个压缩了的文件,是以gz结尾的.
[root@localhost root]#cp   /boot/initrd-2.4.20-8.img   /mnt/initrd-2.4.20-8.gz
[root@localhost root]#gunzip /mnt/initrd-2.4.20-8.gz
[root@localhost root]#mount -o loop /mnt/initrd-2.4.20-8   /mnt/ram
[root@localhost root]#cd   /mnt/ram
[root@localhost ram]#ls
bin dev etc lib linuxrc loopfs   proc sbin sysroot
[root@localhost ram]#ls bin
insmod modprobe nash
[root@localhost ram]#ls lib
Buslogic.o   ext3.o   jbd.o   scsi_mod.o sd_mod.o
[root@localhost ram]ls   dev
console   null   ram   systty   tty1   tty2   tty3   tty4
sbin目录是指向bin目录的一个连接,其他目录是空的.
[root@localhost ram]cat   linuxrc
#!/bin/nash
1.echo "Loading scsi_mod.o module"
2.insmod /lib/scsi_mod.o
3.echo "Loading sd_mod.o module"
4.insmod /lib/sd_mod.o
5.echo "Loading BusLogic.o module"
6.insmod /lib/BusLogic.o
7.echo "Loading jbd.o module"
8.insmod /lib/jbd.o
9.echo "Loading ext3.o module"
10.insmod /lib/ext3.o
11.echo Mounting /proc filesystem
12.mount -t proc /proc /proc
13.echo Creating block devices
14.mkdevices /dev
15.echo Creating root device
16.mkrootdev /dev/root
17.echo 0x0100 > /proc/sys/kernel/real-root-dev
18.echo Mounting root filesystem
19.mount -o defaults --ro -t ext3 /dev/root /sysroot
20.pivot_root /sysroot /sysroot/initrd
21.umount /initrd/proc
上面的编号是我为了下面好说明加上去的.
首先我们必须注意的是这里使用的shell是nash而不是bash,nash是专门为linuxrc可执行
脚本设计的,因此你有必要看一看nash的man文档.
1-10行是加载一些必要的模快.11-12行加载proc内核文件系统,13-14行利用nash内建的
命令mkdevices创建块设备,mkdevices是根据/proc/partitions文件创建里面列出的所有
块设备.15-16行利用nash内建的命令mkrootdev,mkrootdev使它后面的参数/dev/root成
为一个块节点从而使得根分区设备被挂载,其中根分区设备由grub.conf里面的kernel命
令后面所带的参数root=决定,如果root=参数没有被指定,/proc/sys/kernel/real-root-
dev文件将提供根分区设备号.17行将数字256写入到后面的文件里面去.18-19行挂载根文
件系统到/sysroot目录下,/dev/root里面的内容就是root=参数所指定的设备里面的内容
20行调用pivot_root改变根目录所在地并place旧的根目录到指定的位置.21行卸载旧的
根目录里面的proc内核文件系统.
从这里面我们总结一下linuxrc的作用:   (参考/usr/src/linux-2.4/Documenta
tion/initrd.txt文档)
2)/linuxrc文件决定在挂载真正的文件系统之前所需完成的事情(譬如加载必要的网
络驱动或者加载ext3文件系统).
3)/linuxrc加载必要的模块.
4)/linuxrc挂载根文件系统
5)/linuxrc调用pivot_root来改变根目录
关于initrd的用途可以查考上面提到的文档,想知道linux系统是如何安装的吗 那里
面由答案.
既然linuxrc的主要目的是加载模快用的,那如果我们的内核没有动态的模块而所需
的功能都是静态编译进内核的,那么是不是可以不用linuxrc文件呢
答案是可以不用,在普通的linux操作系统里面可以加入noinitrd选项以告知boot
loader 不使用initrd.如果我们做网关,因为ram是我们的文件系统的载体,所以initrd
一行当然不能去掉,但是我们可以不用linuxrc文件,sysroot文件夹和initrd文件夹.
不信的话,试试看吧.
好了,initrd(linuxrc)已经介绍完了.
linuxrc执行完毕之后,系统就会以真正的根目录正式init.
系统在/bin/或者/sbin目录下找到init程式,然后根据它的配置文件/etc/fstab进行
初始化,最后调用mingetty程式启动login完成引导.
    ps:init这一部分网上有很多的详细资料所以我在这里并没有展开来说.
关于linux的启动流程的笔记


一、从哪里到哪里
本文旨在描述linux中内核如何调用启动,然后如何从img的文件系统切换到硬盘的过程。
描述起于:linux-2.6.11/init/main.c中函数 static int init(void * unused)
描述止于:/etc/rc.d/rc.sysinit文件的被调用


二、描写流程
在linux代码linux-2.6.11/init/main.c中init这个函数被调用时,初始启动的文件
系统镜像:/boot/initrd-2.6.11.12.img(以2.6.11.12内核为例)已被grub加载到
内存中,并已挂载到根目录上("/")。




1、我们先来看看initrd-2.6.11.12.img到底是个什么东西:
[root@wj-server1 tmp]# cd /tmp
[root@wj-server1 tmp]# cp /boot/initrd-2.6.11.12.img /tmp/initrd-2.6.11.12.gz
[root@wj-server1 tmp]# gunzip initrd-2.6.11.12.gz
解压缩后的文件为:
[root@wj-server1 tmp]# ls -l initrd-2.6.11.12
-rw-r--r--   1 root root 846848   7月 31 17:01 initrd-2.6.11.12
是一个CPIO格式的文件,该文件格式是种文件镜像让我们将它解开到一个目录中看看
其中的具体内容:
[root@wj-server1 tmp]# mkdir initrd
[root@wj-server1 tmp]# cd initrd
[root@wj-server1 initrd]# cpio -i < ../initrd-2.6.11.12
1654 blocks
[root@wj-server1 initrd]# ls
bin   bootsplash   dev   etc   init   lib   loopfs   proc   sbin   sys   sysroot
[root@wj-server1 initrd]# find .
.
./lib
./bin
./bin/nash
./bin/insmod
./bin/modprobe
./bin/hotplug
./etc
./dev
./dev/console
./dev/null
./dev/ram
./dev/systty
./dev/tty1
./dev/tty2
./dev/tty3
./dev/tty4
./loopfs
./proc
./sys
./sysroot
./sbin
./init
./bootsplash


可见该镜像文件目录中包括:


/bin 目录下的四个用于启动和切换到硬盘上的程序:
nash(用于处理根目录下的/init脚本)、insmod和modprobe来加载内核驱动、hotplug用
于外设的拔插处理。


/dev 目录下的八个设备文件


/init 是个nash的启动脚本文件


/bootsplash 是内核打了bootsplash补丁后,会在对该文件进行读取操作,然后将该文件
中包含的图片文件在启动时显示。
[root@wj-server1 initrd]# dmesg | grep -i bootsplash
bootsplash 3.1.6-2004/03/31: looking for picture... silentjpeg size 36270 bytes,
...found (1024x768, 19600 bytes, v3).
内核的这个装载信息就是在处理该文件。(具体的bootsplash的使用和创建这里不细说)。


附:CPIO文件的打包
[root@wj-server1 initrd]# cd /tmp/initrd
[root@wj-server1 initrd]# rm ../initrd-2.6.11.12
[root@wj-server1 initrd]# find . | cpio -c -o > ../initrd-2.6.11.12
1654 blocks
[root@wj-server1 initrd]# gzip ../initrd-2.6.11.12
[root@wj-server1 initrd]# mv ../initrd-2.6.11.12.gz ../initrd-2.6.11.12.img




2、回到内核init函数中,看看如何调用/boot/initrd-2.6.11.12.img中/init脚本的
....
// 这里判断在grub装载的/boot/initrd-2.6.11.12.img中是否有"/init"这个文件?
if (sys_access((const char __user *) "/init", 0) == 0)
execute_command = "/init"
else
....
// 如果有"/init"这个文件就先运行它。
if (execute_command)
run_init_process(execute_command);


run_init_process("/sbin/init");
run_init_process("/etc/init");
run_init_process("/bin/init");
run_init_process("/bin/sh");


panic("No init found. Try passing init= option to kernel");


由代码我们看到kernel会先判断并运行/boot/initrd-2.6.11.12.img中的/init文件,我们
来看看该/boot/initrd-2.6.11.12.img/init文件的内容,我们上面已将该文件展开到目录
/tmp/initrd中:
[root@wj-server1 initrd]# cat ./init
#!/bin/nash     # 该文件是个nash的脚本文件


# 挂接proc文件系统
mount -t proc /proc /proc


# 不输出nash调试信息,由/proc/cmdline决定,cat /proc/cmdline我的启动参数
# 输出ro root=/dev/hda3 vga=791 splash=silent,如果该命令行中带了quiet参
# 数,则不输出nash提示信息。
setquiet


# 提示信息(这里提示因该放到上面去,mkinitrd-4.2.17-2mgc.rpm包中原来如是,
# 笔误?为什么这里牵涉到mkinitrd这个包类?因为:/boot/initrd-2.6.11.12.img
# 文件由下面命令生成:mkinitrd /boot/initrd-2.6.11.12.img 2.6.11.12)
echo Mounted /proc filesystem


# 挂接sys文件系统
echo Mounting sysfs
mount -t sysfs /sys /sys


# 创建/dev临时目录
echo Creating /dev
mount -o mode=0755 -t tmpfs /dev /dev


# 创建设备文件(这些设备文件在切换到硬盘后,由/etc/rc.sysinit中start_udev
# 重新创建)
mknod /dev/console c 5 1
mknod /dev/null c 1 3
mknod /dev/zero c 1 5


# 新建伪终端目录
mkdir /dev/pts
# 新建共享内存目录
mkdir /dev/shm


# 这里是调用的nash中的makedevs指令装载硬盘等块设备,不装载其他设备只装载
# 硬盘等块设备
echo Starting udev
# 告诉内核当发现新拔插设备时用"/sbin/hotplug"程序来处理
echo -n "/sbin/hotplug" > /proc/sys/kernel/hotplug
makedevs
makedevs # 这里多搞一次没必要


echo Creating root device
# 由grub启动命令行root=/dev/hda3来联接设备/dev/root到root变量所指定的启动
# 设备,见下面我的grub启动参数:
# kernel /boot/vmlinuz-2.6.11.12   ro root=/dev/hda3 vga=791 splash=silent
mkrootdev /dev/root


# 挂接/dev/root目录
echo Mounting root filesystem
mount -o defaults --ro -t ext3 /dev/root /sysroot


echo Switching to new root
# 切换根目录到设备/dev/root目录,运行完该命令根目录"/"->"/dev/hda3"
switchroot --movedev /sysroot






由上面的注释我们大概能够明白./init脚本的基本运行流程:
a、装载基本的内核系统文件和设备文件
b、根据grub的启动命令行参数,判断root根文件设备,参看/boot/grub/grub.conf文件中制定
的参数,该参数在内核启动后可有cat /proc/cmdline显示出来,nash和其他的一些程序也是通
过读该系统文件来去内核启动参数的。
c、在将从grub启动参数中获得根设备并将其与/dev/root设备联接以后,通过nash的switchroot
指令将/dev/root设备挂接到根目录上("/")


看看这样操作后,留下的痕迹:
[root@wj-server1 initrd]# ls -l /dev/root
lrwxrwxrwx   1 root root 9   7月 31 12:06 /dev/root -> /dev/hda3
[root@wj-server1 initrd]# mount
/dev/hda3 on / type ext3 (rw)


到此为止,已将硬盘设备装载到根目录下了,从而取代了原来有initrd.img文件的根位置。






3、再回头看看内核中main.c中init函数,看看如何调用/sbin/init处理/etc/inittab文件
....
// 如果有"/init"这个文件就先运行它。
if (execute_command)
run_init_process(execute_command);


run_init_process("/sbin/init");
run_init_process("/etc/init");
run_init_process("/bin/init");
run_init_process("/bin/sh");


panic("No init found. Try passing init= option to kernel");


我们已经运行完run_init_process(execute_command);这里了,然后继续运行:
run_init_process("/sbin/init");
run_init_process("/etc/init");
run_init_process("/bin/init");
run_init_process("/bin/sh");


/sbin/init这个文件在SysVinit-2.85-34mgc.rpm这个包中,该程序的主要处理代码在文件:
sysvinit-2.85/src/init.c中,该文件主要查找和处理/etc/inittab文件,按照该文件的内容
依次做处理。


[root@wj-server1 initrd]# cat /etc/inittab
#
# inittab    This file describes how the INIT process should set up
#             the system in a certain run-level.
#
# Author:    Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
#             Modified for RHS Linux by Marc Ewing and Donnie Barnes
#


# Default runlevel. The runlevels used by RHS are:
# 0 - halt (Do NOT set initdefault to this)
# 1 - Single user mode
# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)
# 3 - Full multiuser mode
# 4 - unused
# 5 - X11
# 6 - reboot (Do NOT set initdefault to this)
#
id:5:initdefault:                         # /sbin/init 根据这里判断启动的级别


# System initialization.
si::sysinit:/etc/rc.d/rc.sysinit          # /sbin/init 会最先运行这个系统配置文件


l0:0:wait:/etc/rc.d/rc 0                    # /sbin/init 根据上面取得的级别运行相应
l1:1:wait:/etc/rc.d/rc 1                    # 目录下的启动脚本
l2:2:wait:/etc/rc.d/rc 2
l3:3:wait:/etc/rc.d/rc 3
l4:4:wait:/etc/rc.d/rc 4
l5:5:wait:/etc/rc.d/rc 5
l6:6:wait:/etc/rc.d/rc 6


# Trap CTRL-ALT-DELETE
ca::ctrlaltdel:/sbin/shutdown -t3 -r now # 设置关机热键


# When our UPS tells us power has failed, assume we have a few minutes
# of power left.   Schedule a shutdown for 2 minutes from now.
# This does, of course, assume you have powerd installed and your
# UPS connected and working correctly.
pf::powerfail:/sbin/shutdown -f -h +2 "Power Failure; System Shutting Down"


# If power was restored before the shutdown kicked in, cancel it.
pr:12345:powerokwait:/sbin/shutdown -c "Power Restored; Shutdown Cancelled"




# Run gettys in standard runlevels
1:2345:respawn:/sbin/mingetty tty1       # 建立6个登陆控制终端可以通过CTRL-ALT-F?
2:2345:respawn:/sbin/mingetty tty2       # 切换,'?'表示第几个登陆控制台,比如第1
3:2345:respawn:/sbin/mingetty tty3       # 个为F1,第2个为F2依次类推。F7为X11控制
4:2345:respawn:/sbin/mingetty tty4       # 台,后面就没有了,所以在X下可以很灵活
5:2345:respawn:/sbin/mingetty tty5       # 的切换到控制台下面操作。
6:2345:respawn:/sbin/mingetty tty6


# Run xdm in runlevel 5
x:5nce:/etc/X11/prefdm -nodaemon


通过内核中对/sbin/init的调用现在已经执行/etc/rc.d/rc.sysinit操作了。
3#大中小发表于 2005-7-31 19:07只看该作者
又记当magiclinux中initscripts因为hal升级后bootsplash无法显示滚动条,
将[ -x /sbin/start_udev ] && /sbin/start_udev提到startanimate之前,
就可以了,向这样:
[ -x /sbin/start_udev ] && /sbin/start_udev


# Graphical bootup...
if [ "$BOOTUP" = "graphical" ]; then
if [ -w /proc/splash -a -e /proc/fb ]; then
   # Initialize bootsplash
   # TODO: Find out runlevel (-> number of startup scripts -> number of steps)
   runlevel=5
   export kscripts=`/bin/ls /etc/rc.d/rc$runlevel.d/K* |/usr/bin/wc |/bin/awk '{ print $1 }'`
   export sscripts=`/bin/ls /etc/rc.d/rc$runlevel.d/S* |/usr/bin/wc |/bin/awk '{ print $1 }'`
   export progress=1
   # HACK: count rc.sysinit stuff as startup scripts...
   sscripts=$(( $sscripts + 19 ))
   startanimate # start the animate
else
   # Kernel doesn't have bootsplash support --> switch to text
   export BOOTUP=color
fi
fi
一直以来,都认为nash仅仅是作为initrd.img当中加载驱动所使用的命令解释器而已,并没有对initrd.img当中的linuxrc脚本作一个深入的了解。例如,Redhat ES3当中的initrd.img内容(各系统略有不同)如下:
#!/bin/nash
echo "Loading scsi_mod.o module"
insmod /lib/scsi_mod.o
echo "Loading sd_mod.o module"
insmod /lib/sd_mod.o
echo "Loading libata.o module"
insmod /lib/libata.o
echo "Loading ata_piix.o module"
insmod /lib/ata_piix.o
echo "Loading jbd.o module"
insmod /lib/jbd.o
echo "Loading ext3.o module"
insmod /lib/ext3.o
echo Mounting /proc filesystem
mount -t proc /proc /proc
echo Creating block devices
mkdevices /dev
echo Creating root device
mkrootdev /dev/root
echo 0x0100 > /proc/sys/kernel/real-root-dev
echo Mounting root filesystem
mount -o defaults --ro -t ext3 /dev/root /sysroot
pivot_root /sysroot /sysroot/initrd
umount /initrd/proc
    前面是加载驱动部分,而后面是什么用处,就没有深究了。而我自己用的虚拟机里通常会把驱动和文件系统支持编译到内核,也压根用不着initrd.img,所以把这个宝矿放了过去。今天几个学生在Redhat 9的基础上升级内核到2.6.19,并且是驱动、文件系统用模块方式支持,终于出了问题。该来的还是要来的,应了那句话“出来混,迟早都是要还的”。学生们把前面的硬盘驱动、文件系统驱动都替换成2.6的模块,后半部分在我的误导下删除(当然没有删除的也多半没有成功),结果死活不能进入系统,报无法挂载根文件系统的kernel panic错误。查了半天,发现所有的驱动都加载正常,即便是在linuxrc当中加入bash获得一个shell,检查设备和文件系统的状况也都是正常,可就是提示找不到根文件系统。
    开始引起我注意的是,通常在硬盘驱动和文件系统支持都完备的情况下它并没有提示说VFS的root=xxxx错误,而直接提示的“VFS: Unable to mount root fs on (0, 0)”。这意味着它并未识别在grub.conf当中传递给kernel的root=/dev/xxx参数,因为Linux的设备主设备号是不会为0的。我曾怀疑root=参数没有被接受,但却注意到“Please append a correct "root=" boot option”的提示。
    为了找出问题,我在linuxrc中用bash取得了一个shell,然后挂载proc文件系统后检查/proc/sys/kernel/real_root_dev,发现其值为0。这说明kernel得到的真实root文件系统的设备号不正确(当然有例外,注意后面的解释)。我试着把正确的设备值(例如/dev/sda2用0x802)写入,退出bash之后启动果然正常了。这说明kernel解析参数root=/dev/xxx出现了错误。
    经过核对内核代码,发现kernel确实从root=这个参数传递中获得真实的根文件系统的位置,但是这些/dev/xxx会被转换成内核可识别的设备表示形式。转换的过程中内核会试图检查传递进来的/dev/xxx设备是否存在,而这一步是kernel初始化过程中完成的。当我们把硬盘驱动编译为模块时,kernel初始化过程中硬盘尚不能被识别(要等到kernel初始化完,使用initrd.img才能加载硬盘驱动),于是真实根文件系统的设备号就不能被正确转换,使得其保留为初始值0。
    那对于使用硬盘驱动的情况下如何解决这个问题呢?那就是initrd.img后半部分的工作。在加载完硬盘驱动后,脚本会用mkrootdev生成设备/dev/root,通过man nash你会发现这个命令的作用是根据内核传递参数当中的root=来创建对应该设备的节点,节点名就是/dev/root。之后它会把这个设备挂载到/sysroot这个位置,然后用pivot_root这个根交换的命令把真正运行的根文件系统切换到/sysroot之下,而运行linuxrc的initrd的文件系统将被挂载到真正的根系统下的initrd目录。至于“echo 0x0100 > /proc/sys/kernel/real-root-dev”这个命令,看起来是告诉内核真正的文件系统是/dev/ram0,其实是利用内核判断使用/dev/ram0为根文件系统时不再mount其他设备作为根文件系统的分支,作了一个小小的技巧骗过内核。
    整个脚本的关键在于mkrootdev这个命令。它不仅能够根据root=/dev/xxx来生成对应的设备节点,还能够在碰到root=LABEL=/的情况下探测所有的硬盘分区,以便找到对应着卷标为/的分区。这也解开了我一直没弄清楚的为什么root=LABEL=xxx的参数有些环境可以用而有些却不行的谜团。这个LABEL=/的解析根本不是内核完成的,而是initrd.img当中linuxrc脚本的mkrootdev命令来完成的。脚本的第二个关键在于它负责完成了本是由内核做的挂载真实根文件系统的动作,并对当前根(即initrd使用的内存文件系统)和真实根文件系统进行根切换,又利用欺骗让内核误认为当前使用/dev/ram0作为根文件系统可以不再挂载真实的根文件系统,可谓用心良苦啊 ^_^
    当然,如果完全不用initrd.img的机制,你会发现/proc/sys/kernel/real_root_dev的值也是0。这并不是内核也弄错了,而是只有在使用initrd.img机制时,real_root_dev才反映了内核中记录的真实根文件系统的值,虽然它不一定准确。
    最后,总结一下:
1、当硬盘驱动以模块形式提供时root=xxx传递给内核的参数可能不会直接起作用,内核在检查这个参数时可能会发现这个设备(因为没有加载驱动而)不存在,因此导致内核没有接受root=xxx的参数。
2、在这种情况下,initrd.img机制的作用不单单是加载驱动这么简单,还肩负着把正确的真实根的设备位置告知内核的艰巨任务。不过实现的方法有两种:
2.1 把正确的根设备号写入/proc/sys/kernel/real_root_dev,或者
2.2 自己挂载真正的根设备,并进行根交换把根系统切换到真实的根系统上,还要阻止内核去挂载它认为的真实根系统
对于2.2,挂载真正的根系统用nash解释器的内置命令mkrootdev完成,它可以根据传递给kernel的参数(估计读了/proc/cmdline)获得/dev/xxx的字符串,或者得到LABEL=xxx的字符串后查询各个分区的卷标来得到对应的真实根设备号。
3、如果没有使用initrd.img的机制,/proc/sys/kernel/real_root_dev的值没有任何处理,因为它只有在调用initrd.img的时候才会被同步于内核中的操作对象。
    另外,redhat 9所带的nash解释器(版本3.4.42)在处理mkrootdev的流程上是有bug的。如果传给kernel的参数使用root=/dev/xxx的形式,那么nash会从/proc/sys/kernel/real_root_dev里获取用户想使用的真实根文件系统位置,显然这在我们上面的分析当中是0,也就是错误的;而如果参数传递是root=LABEL=/的形式,那么nash的处理走的另外一个分支,它会通过解析所有分区的卷标来查找所要的真实根文件系统,并不再查询/proc/sys/kernel/real_root_dev,这倒让我们可以得到正确的结果。bug呀bug。
    不过FC6所带的nash 5.1.19已经完全不是这个流程了,应当不存在这样的bug。
本人,听网上视频的简单笔记:
Linux 启动详解
1. BIOS 自检,根据BIOS的设置顺序,如以什么方式硬盘引导,软驱引导看系统是以什么方式引导,内存地
址是从oxfff0开始
对硬件设备进行初妈始化。
如果是硬盘引导,MBR(512字节的一扇区),是磁盘的在0柱面的第一个扇区。


2.启动grub, 或lilo,都属于引导加载程序,都是在linux下的。
主要区别:
lilo,没有交互命令界面,grub有。
lilo,不支持网络引导,grub支持。
    加密grub:
1)用加密工具:
   /sbin/grub-md5-crypt 用来给grub加密
2)修改/etc/grub.conf 文件
title前加入一行 password: --md5 +已经MD5的字符串
3.加载内核,linux内核影像会被加载到内存
加载特定的内核,可以用kernel / +tab键
kernel /initrd/initrd+tab键自动补齐
4.执行init 进程,是所有进程的发起者与控制者,pid号为1,第一个运行的进程。
  作用:
1). 是所有进程父进程
2). 进入运行某个特定级别的进程程序,对某个进程级别进行管理。
  ---- ps -ef 列出所有在执行的进程
   PPID 指进程的父进程
  
5. 通过inittab文件进行系统的初始化
1)id:3:initdefault:
运行级别:0:关闭;
         1:单用户模式;
    2:多用户模式,但不允许使用网络
    3:多用户模式,允许使用网络 
    4:用户可以自定义级别 
    5:图形界面,允许使用网络
    6:重新启动
2)si:sysinit:/etc/rc.d/rc.sysinit 作用很多,如下一博客 /etc/rc.d/rc.sysinit的作用
 
    cd /etc/rc.d/rc3.d
  
   首先结束k开头的K(ill),然后开始s(tart)开头的,并是按s后接的数字大小来决定哪个先开启
3) 执行/etc/rc.d/rc.local文件
4)执行login程序

linux启动详解1:http://blog.youkuaiyun.com/hepeng597/article/details/10033149

rootroot@cm-System-Product-Name:/home/wwt/linux_r16$ tar zxvf lichee_parrotv1.1_20161202.tar.gz rootroot@cm-System-Product-Name:/home/wwt/linux_r16$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16$ ll 总用量 10786992 drwx------ 4 rootroot rootroot 4096 5月 2 14:48 ./ drwxrwxrwx 18 rootroot rootroot 4096 5月 2 13:50 ../ -rwx------ 1 rootroot rootroot 8557328646 122 16:08 android_parrotv1.1_20161202.tar.gz* drwxrwxr-x 7 rootroot rootroot 4096 122 15:52 lichee/ -rwx------ 1 rootroot rootroot 2488523424 122 16:15 lichee_parrotv1.1_20161202.tar.gz* drwxrwxr-x 8 rootroot rootroot 4096 5月 2 14:40 parrotv1p1_lichee/ rootroot@cm-System-Product-Name:/home/wwt/linux_r16$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16$ cd lichee/ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ ll 总用量 36 drwxrwxr-x 7 rootroot rootroot 4096 122 15:52 ./ drwx------ 4 rootroot rootroot 4096 5月 2 14:48 ../ drwxrwxr-x 8 rootroot rootroot 4096 122 15:51 brandy/ drwxrwxr-x 15 rootroot rootroot 4096 122 15:52 buildroot/ -r-xr-xr-x 1 rootroot rootroot 55 122 15:52 build.sh* drwxrwxr-x 26 rootroot rootroot 4096 122 15:52 linux-3.4/ -r--r--r-- 1 rootroot rootroot 232 122 15:52 README drwxrwxr-x 6 rootroot rootroot 4096 122 15:51 .repo/ drwxrwxr-x 7 rootroot rootroot 4096 122 15:52 tools/ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ ./build.sh config Welcome to mkscript setup progress All available chips: 0. sun8iw5p1 Choice: 0 All available platforms: 0. android 1. dragonboard 2. linux 3. tina Choice: 2 All available kernel: 0. linux-3.4 Choice: 0 All available boards: 0. bell-one 1. evb 2. evb-20 3. evb-30 4. evb-rtl8723bs 5. sc3813r Choice: 3 rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ ./build.sh KCONFIG_AUTOCONFIG=/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/buildroot-config/auto.conf KCONFIG_AUTOHEADER=/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/buildroot-config/autoconf.h KCONFIG_TRISTATE=/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/buildroot-config/tristate.config BUILDROOT_CONFIG=/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/.config /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/buildroot-config/conf --silentoldconfig Config.in # # make dependencies written to .auto.deps # ATTENTION buildroot devels! # See top of this file before playing with this auto-preprequisites! # make[1]:正在离开目录 `/home/wwt/linux_r16/lichee/buildroot' You must install 'makeinfo' on your build machine makeinfo is usually part of the texinfo package in your distribution make: *** [dependencies] 错误 1 make:离开目录“/home/wwt/linux_r16/lichee/buildroot” ERROR: build buildroot Failed rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ d/buildroot-config/conf.o /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/buildroot-config/zconf.tab.o -o /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/buildroot-config/conf rm /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/buildroot-config/zconf.tab.c make[1]:正在离开目录 `/home/wwt/linux_r16/lichee/buildroot/package/config' # # configuration written to /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/.config # make:离开目录“/home/wwt/linux_r16/lichee/buildroot” make:进入目录'/home/wwt/linux_r16/lichee/buildroot' /usr/bin/make -j6 O=/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot silentoldconfig make[1]: 正在进入目录 `/home/wwt/linux_r16/lichee/buildroot' GEN /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/Makefile KCONFIG_AUTOCONFIG=/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/buildroot-config/auto.conf KCONFIG_AUTOHEADER=/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/buildroot-config/autoconf.h KCONFIG_TRISTATE=/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/buildroot-config/tristate.config BUILDROOT_CONFIG=/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/.config /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/buildroot-config/conf --silentoldconfig Config.in # # make dependencies written to .auto.deps # ATTENTION buildroot devels! # See top of this file before playing with this auto-preprequisites! # make[1]:正在离开目录 `/home/wwt/linux_r16/lichee/buildroot' You must install 'makeinfo' on your build machine makeinfo is usually part of the texinfo package in your distribution make: *** [dependencies] 错误 1 make:离开目录“/home/wwt/linux_r16/lichee/buildroot” ERROR: build buildroot Failed rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ sudo apt-get install texinfo [sudo] password for rootroot: 正在读取软件包列表... 完成 正在分析软件包的依赖关系树 正在读取状态信息... 完成 下列软件包是自动安装的并且现在不需要了: fakeroot libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libfakeroot Use 'apt-get autoremove' to remove them. 将会安装下列额外的软件包: libencode-locale-perl libfile-listing-perl libfont-afm-perl libhtml-form-perl libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl libintl-perl libio-html-perl liblwp-mediatypes-perl liblwp-protocol-https-perl libnet-http-perl libtext-unidecode-perl libwww-perl libwww-robotrules-perl libxml-libxml-perl libxml-namespacesupport-perl libxml-parser-perl libxml-sax-base-perl libxml-sax-expat-perl libxml-sax-perl 建议安装的软件包: libdata-dump-perl libintl-xs-perl libcrypt-ssleay-perl libauthen-ntlm-perl texinfo-doc-nonfree 下列【新】软件包将被安装: libencode-locale-perl libfile-listing-perl libfont-afm-perl libhtml-form-perl libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl libintl-perl libio-html-perl liblwp-mediatypes-perl liblwp-protocol-https-perl libnet-http-perl libtext-unidecode-perl libwww-perl libwww-robotrules-perl libxml-libxml-perl libxml-namespacesupport-perl libxml-parser-perl libxml-sax-base-perl libxml-sax-expat-perl libxml-sax-perl texinfo 升级了 0 个软件包,新安装了 28 个软件包,要卸载 0 个软件包,有 737 个软件包未被升级。 需要下载 3,425 kB 的软件包。 解压缩后会消耗掉 13.0 MB 的额外空间。 您希望继续执行吗? [Y/n] y 获取:1 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libencode-locale-perl all 1.03-1 [12.4 kB] 获取:2 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libhttp-date-perl all 6.02-1 [10.4 kB] 获取:3 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libfile-listing-perl all 6.04-1 [9,774 B] 获取:4 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libfont-afm-perl all 1.20-1 [14.3 kB] 获取:5 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libhtml-tagset-perl all 3.20-2 [13.5 kB] 获取:6 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libhtml-parser-perl amd64 3.71-1build1 [98.2 kB] 获取:7 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libio-html-perl all 1.00-1 [15.7 kB] 获取:8 http://cn.archive.ubuntu.com/ubuntu/ trusty/main liblwp-mediatypes-perl all 6.02-1 [21.7 kB] 获取:9 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libhttp-message-perl all 6.06-1 [78.7 kB] 获取:10 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libhtml-form-perl all 6.03-1 [23.5 kB] 获取:11 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libhtml-tree-perl all 5.03-1 [215 kB] 获取:12 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libhtml-format-perl all 2.11-1 [44.7 kB] 获取:13 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libhttp-cookies-perl all 6.00-2 [23.3 kB] 获取:14 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libhttp-daemon-perl all 6.01-1 [17.0 kB] 获取:15 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libhttp-negotiate-perl all 6.00-2 [13.4 kB] 获取:16 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libintl-perl all 1.23-1build1 [1,204 kB] 获取:17 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libnet-http-perl all 6.06-1 [24.2 kB] 获取:18 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libwww-robotrules-perl all 6.01-1 [14.1 kB] 获取:19 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libwww-perl all 6.05-2 [146 kB] 获取:20 http://cn.archive.ubuntu.com/ubuntu/ trusty-updates/main liblwp-protocol-https-perl all 6.04-2ubuntu0.1 [7,644 B] 获取:21 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libtext-unidecode-perl all 0.04-2 [115 kB] 获取:22 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libxml-namespacesupport-perl all 1.11-1 [13.2 kB] 获取:23 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libxml-sax-base-perl all 1.07-1 [21.5 kB] 获取:24 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libxml-sax-perl all 0.99+dfsg-2ubuntu1 [64.6 kB] 获取:25 http://cn.archive.ubuntu.com/ubuntu/ trusty-updates/main libxml-libxml-perl amd64 2.0108+dfsg-1ubuntu0.1 [337 kB] 获取:26 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libxml-parser-perl amd64 2.41-1build3 [294 kB] 获取:27 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libxml-sax-expat-perl all 0.40-2 [11.5 kB] 获取:28 http://cn.archive.ubuntu.com/ubuntu/ trusty/main texinfo amd64 5.2.0.dfsg.1-2 [561 kB] 下载 3,425 kB,耗时 2秒 (1,303 kB/s) Selecting previously unselected package libencode-locale-perl. (正在读取数据库 ... 系统当前共安装有 213805 个文件和目录。) Preparing to unpack .../libencode-locale-perl_1.03-1_all.deb ... Unpacking libencode-locale-perl (1.03-1) ... Selecting previously unselected package libhttp-date-perl. Preparing to unpack .../libhttp-date-perl_6.02-1_all.deb ... Unpacking libhttp-date-perl (6.02-1) ... Selecting previously unselected package libfile-listing-perl. Preparing to unpack .../libfile-listing-perl_6.04-1_all.deb ... Unpacking libfile-listing-perl (6.04-1) ... Selecting previously unselected package libfont-afm-perl. Preparing to unpack .../libfont-afm-perl_1.20-1_all.deb ... Unpacking libfont-afm-perl (1.20-1) ... Selecting previously unselected package libhtml-tagset-perl. Preparing to unpack .../libhtml-tagset-perl_3.20-2_all.deb ... Unpacking libhtml-tagset-perl (3.20-2) ... Selecting previously unselected package libhtml-parser-perl. Preparing to unpack .../libhtml-parser-perl_3.71-1build1_amd64.deb ... Unpacking libhtml-parser-perl (3.71-1build1) ... Selecting previously unselected package libio-html-perl. Preparing to unpack .../libio-html-perl_1.00-1_all.deb ... Unpacking libio-html-perl (1.00-1) ... Selecting previously unselected package liblwp-mediatypes-perl. Preparing to unpack .../liblwp-mediatypes-perl_6.02-1_all.deb ... Unpacking liblwp-mediatypes-perl (6.02-1) ... Selecting previously unselected package libhttp-message-perl. Preparing to unpack .../libhttp-message-perl_6.06-1_all.deb ... Unpacking libhttp-message-perl (6.06-1) ... Selecting previously unselected package libhtml-form-perl. Preparing to unpack .../libhtml-form-perl_6.03-1_all.deb ... Unpacking libhtml-form-perl (6.03-1) ... Selecting previously unselected package libhtml-tree-perl. Preparing to unpack .../libhtml-tree-perl_5.03-1_all.deb ... Unpacking libhtml-tree-perl (5.03-1) ... Selecting previously unselected package libhtml-format-perl. Preparing to unpack .../libhtml-format-perl_2.11-1_all.deb ... Unpacking libhtml-format-perl (2.11-1) ... Selecting previously unselected package libhttp-cookies-perl. Preparing to unpack .../libhttp-cookies-perl_6.00-2_all.deb ... Unpacking libhttp-cookies-perl (6.00-2) ... Selecting previously unselected package libhttp-daemon-perl. Preparing to unpack .../libhttp-daemon-perl_6.01-1_all.deb ... Unpacking libhttp-daemon-perl (6.01-1) ... Selecting previously unselected package libhttp-negotiate-perl. Preparing to unpack .../libhttp-negotiate-perl_6.00-2_all.deb ... Unpacking libhttp-negotiate-perl (6.00-2) ... Selecting previously unselected package libintl-perl. Preparing to unpack .../libintl-perl_1.23-1build1_all.deb ... Unpacking libintl-perl (1.23-1build1) ... Selecting previously unselected package libnet-http-perl. Preparing to unpack .../libnet-http-perl_6.06-1_all.deb ... Unpacking libnet-http-perl (6.06-1) ... Selecting previously unselected package libwww-robotrules-perl. Preparing to unpack .../libwww-robotrules-perl_6.01-1_all.deb ... Unpacking libwww-robotrules-perl (6.01-1) ... Selecting previously unselected package libwww-perl. Preparing to unpack .../libwww-perl_6.05-2_all.deb ... Unpacking libwww-perl (6.05-2) ... Selecting previously unselected package liblwp-protocol-https-perl. Preparing to unpack .../liblwp-protocol-https-perl_6.04-2ubuntu0.1_all.deb ... Unpacking liblwp-protocol-https-perl (6.04-2ubuntu0.1) ... Selecting previously unselected package libtext-unidecode-perl. Preparing to unpack .../libtext-unidecode-perl_0.04-2_all.deb ... Unpacking libtext-unidecode-perl (0.04-2) ... Selecting previously unselected package libxml-namespacesupport-perl. Preparing to unpack .../libxml-namespacesupport-perl_1.11-1_all.deb ... Unpacking libxml-namespacesupport-perl (1.11-1) ... Selecting previously unselected package libxml-sax-base-perl. Preparing to unpack .../libxml-sax-base-perl_1.07-1_all.deb ... Unpacking libxml-sax-base-perl (1.07-1) ... Selecting previously unselected package libxml-sax-perl. Preparing to unpack .../libxml-sax-perl_0.99+dfsg-2ubuntu1_all.deb ... Unpacking libxml-sax-perl (0.99+dfsg-2ubuntu1) ... Selecting previously unselected package libxml-libxml-perl. Preparing to unpack .../libxml-libxml-perl_2.0108+dfsg-1ubuntu0.1_amd64.deb ... Unpacking libxml-libxml-perl (2.0108+dfsg-1ubuntu0.1) ... Selecting previously unselected package libxml-parser-perl. Preparing to unpack .../libxml-parser-perl_2.41-1build3_amd64.deb ... Unpacking libxml-parser-perl (2.41-1build3) ... Selecting previously unselected package libxml-sax-expat-perl. Preparing to unpack .../libxml-sax-expat-perl_0.40-2_all.deb ... Unpacking libxml-sax-expat-perl (0.40-2) ... Selecting previously unselected package texinfo. Preparing to unpack .../texinfo_5.2.0.dfsg.1-2_amd64.deb ... Unpacking texinfo (5.2.0.dfsg.1-2) ... Processing triggers for man-db (2.6.7.1-1) ... Processing triggers for doc-base (0.10.5) ... Processing 1 added doc-base file... 正在设置 libencode-locale-perl (1.03-1) ... 正在设置 libhttp-date-perl (6.02-1) ... 正在设置 libfile-listing-perl (6.04-1) ... 正在设置 libfont-afm-perl (1.20-1) ... 正在设置 libhtml-tagset-perl (3.20-2) ... 正在设置 libhtml-parser-perl (3.71-1build1) ... 正在设置 libio-html-perl (1.00-1) ... 正在设置 liblwp-mediatypes-perl (6.02-1) ... 正在设置 libhttp-message-perl (6.06-1) ... 正在设置 libhtml-form-perl (6.03-1) ... 正在设置 libhtml-tree-perl (5.03-1) ... 正在设置 libhtml-format-perl (2.11-1) ... 正在设置 libhttp-cookies-perl (6.00-2) ... 正在设置 libhttp-daemon-perl (6.01-1) ... 正在设置 libhttp-negotiate-perl (6.00-2) ... 正在设置 libintl-perl (1.23-1build1) ... 正在设置 libnet-http-perl (6.06-1) ... 正在设置 libwww-robotrules-perl (6.01-1) ... 正在设置 libtext-unidecode-perl (0.04-2) ... 正在设置 libxml-namespacesupport-perl (1.11-1) ... 正在设置 libxml-sax-base-perl (1.07-1) ... 正在设置 libxml-sax-perl (0.99+dfsg-2ubuntu1) ... update-perl-sax-parsers: Registering Perl SAX parser XML::SAX::PurePerl with priority 10... update-perl-sax-parsers: Updating overall Perl SAX parser modules info file... Creating config file /etc/perl/XML/SAX/ParserDetails.ini with new version 正在设置 libxml-libxml-perl (2.0108+dfsg-1ubuntu0.1) ... update-perl-sax-parsers: Registering Perl SAX parser XML::LibXML::SAX::Parser with priority 50... update-perl-sax-parsers: Registering Perl SAX parser XML::LibXML::SAX with priority 50... update-perl-sax-parsers: Updating overall Perl SAX parser modules info file... Replacing config file /etc/perl/XML/SAX/ParserDetails.ini with new version 正在设置 texinfo (5.2.0.dfsg.1-2) ... Running mktexlsr. This may take some time. ... done. 正在设置 libwww-perl (6.05-2) ... 正在设置 liblwp-protocol-https-perl (6.04-2ubuntu0.1) ... 正在设置 libxml-parser-perl (2.41-1build3) ... 正在设置 libxml-sax-expat-perl (0.40-2) ... update-perl-sax-parsers: Registering Perl SAX parser XML::SAX::Expat with priority 50... update-perl-sax-parsers: Updating overall Perl SAX parser modules info file... Replacing config file /etc/perl/XML/SAX/ParserDetails.ini with new version rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ ./build.sh http://blog.csdn.net/linuxarmsummary/article/details/12775457 msgfmt包错误 makeinfo 包错误 e.o -MD -MP -MF .deps/execute.Tpo -c -o execute.o execute.c /usr/bin/gcc -std=gnu99 -I. -O2 -I/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/include -I/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/usr/include -MT exitfail.o -MD -MP -MF .deps/exitfail.Tpo -c -o exitfail.o exitfail.c In file included from clean-temp.h:22:0, from clean-temp.c:23: ./stdio.h:456:1: error: 'gets' undeclared here (not in a function) _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); ^ mv -f .deps/exitfail.Tpo .deps/exitfail.Po /usr/bin/gcc -std=gnu99 -I. -O2 -I/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/include -I/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/usr/include -MT fatal-signal.o -MD -MP -MF .deps/fatal-signal.Tpo -c -o fatal-signal.o fatal-signal.c mv -f .deps/c-ctype.Tpo .deps/c-ctype.Po /usr/bin/gcc -std=gnu99 -I. -O2 -I/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/include -I/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/usr/include -MT fd-safer-flag.o -MD -MP -MF .deps/fd-safer-flag.Tpo -c -o fd-safer-flag.o fd-safer-flag.c mv -f .deps/c-stack.Tpo .deps/c-stack.Po make[4]: *** [clean-temp.o] Error 1 make[4]: *** Waiting for unfinished jobs.... mv -f .deps/execute.Tpo .deps/execute.Po mv -f .deps/fd-safer-flag.Tpo .deps/fd-safer-flag.Po mv -f .deps/fatal-signal.Tpo .deps/fatal-signal.Po mv -f .deps/gl_avltree_oset.Tpo .deps/gl_avltree_oset.Po make[4]: Leaving directory `/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-m4-1.4.15/lib' make[3]: *** [all] Error 2 make[3]: Leaving directory `/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-m4-1.4.15/lib' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-m4-1.4.15' make[1]: *** [all] 错误 2 make[1]:正在离开目录 `/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-m4-1.4.15' make: *** [/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-m4-1.4.15/.stamp_built] 错误 2 make:离开目录“/home/wwt/linux_r16/lichee/buildroot” ERROR: build buildroot Failed rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ find . -name stdio.in.h ./out/sun8iw5p1/linux/common/buildroot/build/host-m4-1.4.15/lib/stdio.in.h rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ Z:\home\wwt\linux_r16\lichee\out\sun8iw5p1\linux\common\buildroot\build\host-m4-1.4.15\lib\stdio.in.h // 2017/5/2 14:13 wenyuanbo add!!!! //_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); #if defined(__GLIBC__) && !defined(__UCLIBC__) && !__GLIBC_PREREQ(2, 16) _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); #endif http://www.cnblogs.com/hjj801006/p/3988220.html 'gets' undeclared here (not in a function) rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ ./build.sh make[3]: Leaving directory `/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-autoconf-2.65/lib' Making install in doc make[3]: Entering directory `/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-autoconf-2.65/doc' restore=: && backupdir=".am$$" && \ am__cwd=`pwd` && CDPATH="${ZSH_VERSION+.}:" && cd . && \ rm -rf $backupdir && mkdir $backupdir && \ if (/bin/sh /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-autoconf-2.65/build-aux/missing --run makeinfo --version) >/dev/null 2>&1; then \ for f in autoconf.info autoconf.info-[0-9] autoconf.info-[0-9][0-9] autoconf.i[0-9] autoconf.i[0-9][0-9]; do \ if test -f $f; then mv $f $backupdir; restore=mv; else :; fi; \ done; \ else :; fi && \ cd "$am__cwd"; \ if /bin/sh /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-autoconf-2.65/build-aux/missing --run makeinfo --no-split -I . \ -o autoconf.info autoconf.texi; \ then \ rc=0; \ CDPATH="${ZSH_VERSION+.}:" && cd .; \ else \ rc=$?; \ CDPATH="${ZSH_VERSION+.}:" && cd . && \ $restore $backupdir/* `echo "./autoconf.info" | sed 's|[^/]*$||'`; \ fi; \ rm -rf $backupdir; exit $rc conftest.c:14625: must be after `@defmac' to use `@defmacx' make[3]: *** [autoconf.info] Error 1 make[3]: Leaving directory `/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-autoconf-2.65/doc' make[2]: *** [install-recursive] Error 1 make[2]: Leaving directory `/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-autoconf-2.65' make[1]: *** [install] 错误 2 make[1]:正在离开目录 `/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-autoconf-2.65' make: *** [/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-autoconf-2.65/.stamp_host_installed] 错误 2 make:离开目录“/home/wwt/linux_r16/lichee/buildroot” ERROR: build buildroot Failed rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ find . -name autoconf.texi ./out/sun8iw5p1/linux/common/buildroot/build/host-autoconf-2.65/doc/autoconf.texi rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ Z:\home\wwt\linux_r16\lichee\out\sun8iw5p1\linux\common\buildroot\build\host-autoconf-2.65\doc\autoconf.texi @r{[}@var{\varname\}@r{]}@c (修改为:) @r{[}@var{\varname\}@r{]} @r{[}@var{\varname\} = @samp{\default\}@r{]}@c (修改为:) @r{[}@var{\varname\} = @samp{\default\}@r{]} http://blog.csdn.net/laohuang1122/article/details/44098291/ Ubuntu14.04编译Allwinner lichee 两个出错解决方法 rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ ./build.sh libtool: install: ranlib /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/usr/lib/libfakeroot.a libtool: finish: PATH="/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/bin:/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/usr/bin:/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/external-toolchain/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/cm/cm/R58/r58_new20161012/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/arm-linux-androideabi/bin:/home/cm/cm/R58/r58_new20161012/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin:/opt/jdk1.6.0_45/bin:/opt/jdk1.6.0_45/jre/bin:/sbin" ldconfig -n /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/usr/lib ---------------------------------------------------------------------- Libraries have been installed in: /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/usr/lib If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,-rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- test -z "/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/usr/bin" || /bin/mkdir -p "/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/usr/bin" /bin/sh ./libtool --mode=install /usr/bin/install -c 'faked' '/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/usr/bin/faked' libtool: install: /usr/bin/install -c faked /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/usr/bin/faked make[3]:正在离开目录 `/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-fakeroot-1.9.5' make[2]:正在离开目录 `/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-fakeroot-1.9.5' make[1]:正在离开目录 `/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-fakeroot-1.9.5' rm -rf /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-makedevs mkdir /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-makedevs cp package/makedevs/makedevs.c /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-makedevs cc -Wall -Werror -O2 /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-makedevs/makedevs.c -o /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-makedevs/makedevs /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-makedevs/makedevs.c: In function ‘main’: /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-makedevs/makedevs.c:374:6: error: variable ‘ret’ set but not used [-Werror=unused-but-set-variable] int ret = EXIT_SUCCESS; ^ cc1: all warnings being treated as errors make: *** [/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-makedevs/makedevs] 错误 1 make:离开目录“/home/wwt/linux_r16/lichee/buildroot” ERROR: build rootfs Failed rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ find . -name makedevs.c ./buildroot/package/makedevs/makedevs.c ./out/sun8iw5p1/linux/common/buildroot/build/host-makedevs/makedevs.c ./out/sun8iw5p1/linux/common/buildroot/build/busybox-1.18.3/miscutils/makedevs.c rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ http://blog.csdn.net/laohuang1122/article/details/44098291/ Ubuntu14.04编译Allwinner lichee 两个出错解决方法 rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ ./build.sh /local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/cm/cm/R58/r58_new20161012/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/arm-linux-androideabi/bin:/home/cm/cm/R58/r58_new20161012/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin:/opt/jdk1.6.0_45/bin:/opt/jdk1.6.0_45/jre/bin"" >> /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/_fakeroot.fs chmod a+x /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/_fakeroot.fs /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/usr/bin/fakeroot -- /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/_fakeroot.fs rootdir=/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/target table='target/generic/device_table.txt' Warning: skip syncing -d /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/target /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/images/rootfs.ext4 -N 1399 -b 42633 tune2fs 1.42.9 (4-Feb-2014) Creating journal inode: 完成 This filesystem will be automatically checked every 20 mounts or 0 days, whichever comes first. Use tune2fs -c or -i to override. e2fsck 1.42.9 (4-Feb-2014) 文件系统缺少UUID;正在生成一个。 Adding dirhash hint to 文件系统. /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/images/rootfs.ext4: clean, 1009/1440 files, 38102/42633 blocks busybox directfb directfb-examples divine dosfstools e2fsprogs ethtool ext4-utils freetype fsck-msdos fuse-exfat libfuse i2c-tools input-tools iostat iperf iw jpeg libnl libpcap libpng memstat memtester ntfs-3g openssh openssl portmap strace stress sysstat szrz tcpdump tiobench tslib udev which wireless_tools wpa_supplicant zlib target-generic-hostname target-generic-issue target-generic-getty-busybox target-finalize target-purgelocales /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/bin:/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/usr/bin:/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/usr/sbin/:/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/external-toolchain/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/cm/cm/R58/r58_new20161012/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/arm-linux-androideabi/bin:/home/cm/cm/R58/r58_new20161012/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin:/opt/jdk1.6.0_45/bin:/opt/jdk1.6.0_45/jre/bin make:离开目录“/home/wwt/linux_r16/lichee/buildroot” INFO: build rootfs OK. INFO: ---------------------------------------- INFO: build lichee OK. INFO: ---------------------------------------- rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ ./build.sh pack INFO: packing firmware ... copying tools file copying configs file ./out/aultls32.fex ./out/aultools.fex ./out/cardscript.fex ./out/cardtool.fex ./out/diskfs.fex ./out/env_burn.cfg ./out/env.cfg ./out/image.cfg "./out/image_linux.cfg" -> "./out/image.cfg" ./out/split_xxxx.fex ./out/sys_config.fex ./out/sys_partition_dragonboard.fex ./out/sys_partition_dump.fex ./out/sys_partition.fex "./out/sys_partition_linux.fex" -> "./out/sys_partition.fex" ./out/sys_partition_private.fex ./out/sys_partition_tina.fex ./out/test_config.fex ./out/usbtool.fex ./out/usbtool_test.fex copying boot resource copying boot file packing for linux normal /home/wwt/linux_r16/lichee/tools/pack/pctools/linux/eDragonEx/ /home/wwt/linux_r16/lichee/tools/pack/out Begin Parse sys_partion.fex Add partion boot-resource.fex BOOT-RESOURCE_FEX Add partion very boot-resource.fex BOOT-RESOURCE_FEX FilePath: boot-resource.fex FileLength=453400Add partion env.fex ENV_FEX000000000 Add partion very env.fex ENV_FEX000000000 FilePath: env.fex FileLength=20000Add partion boot.fex BOOT_FEX00000000 Add partion very boot.fex BOOT_FEX00000000 FilePath: boot.fex FileLength=c5a000Add partion rootfs.fex ROOTFS_FEX000000 Add partion very rootfs.fex ROOTFS_FEX000000 FilePath: rootfs.fex FileLength=29a2400sys_config.fex Len: 0xf450 config.fex Len: 0x9ac8 split_xxxx.fex Len: 0x200 sys_partition.fex Len: 0xa80 boot0_nand.fex Len: 0x8000 boot0_sdcard.fex Len: 0x8000 u-boot.fex Len: 0xc4000 fes1.fex Len: 0x1fc0 usbtool.fex Len: 0x23000 aultools.fex Len: 0x26ead aultls32.fex Len: 0x238dd cardtool.fex Len: 0x14000 cardscript.fex Len: 0x6ea sunxi_mbr.fex Len: 0x10000 dlinfo.fex Len: 0x4000 arisc.fex Len: 0x2ed88 vmlinux.fex Len: 0x2c78baa boot-resource.fex Len: 0x453400 Vboot-resource.fex Len: 0x4 env.fex Len: 0x20000 Venv.fex Len: 0x4 boot.fex Len: 0xc5a000 Vboot.fex Len: 0x4 rootfs.fex Len: 0x29a2400 Vrootfs.fex Len: 0x4 BuildImg 0 Dragon execute image.cfg SUCCESS ! ----------image is at---------- /home/wwt/linux_r16/lichee/tools/pack/sun8iw5p1_linux_evb-30_uart0.img pack finish rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值