接上篇
ininramfs所需要的资料已经准备好 下面配置下内核
先清除之前的镜像和其他文件
make distclean
之后选择默认配置
make imx_v7_defconfig 生成.config文件
然后 make menuconfig 添加ininramfs需要的配置 添加我们之前准备的initramfs的相关资料 保存退出 这个时候将会把我们的配置添加到刚生成的.config
在Initramfs source file(s)项中添加自己的目录
/home/chit/fsl-release-bsp/tool/rootfs/rootfs
之后 make zImage 等待生成最终的zImange文件,最后可以看到 zImage的大小为13M多,比之前没有加入initramfs的zImage大,之前大小7M左右。这个就是包含了inirramfs的内核。
然后通过tftp 将zImage和dab文件分下载到相应的内存位置
tftp 80800000 zImage
tftp 83000000 zImage-imx6ul-14x14-evk.dtb
设置bootargs 变量 setenv bootargs console=ttymxc0,115200 rdinit=/linuxrc
启动系统 bootz 0x80800000 - 0x83000000
部分log如下
Bluetooth: RFCOMM socket layer initialized
Bluetooth: RFCOMM ver 1.11
Bluetooth: BNEP (Ethernet Emulation) ver 1.3
Bluetooth: BNEP filters: protocol multicast
Bluetooth: BNEP socket layer initialized
Bluetooth: HIDP (Human Interface Emulation) ver 1.2
Bluetooth: HIDP socket layer initialized
8021q: 802.1Q VLAN Support v1.8
Key type dns_resolver registered
cpu cpu0: dev_pm_opp_get_opp_count: device OPP not found (-19)
gpio_dvfs: disabling
VSD_3V3: disabling
can-3v3: disabling
regulator-dummy: disabling
imx mcc test is registered.
snvs_rtc 20cc034.snvs-rtc-lp: setting system clock to 1970-01-01 00:00:01 UTC (1)
ALSA device list:
#0: wm8960-audio
Freeing unused kernel memory: 8324K (809dd000 - 811fe000)
bin dev home linuxrc mnt run sys usr
boot etc lib media proc sbin tmp var
Starting
##############################################################
run initramfs --please input "0"and Enter
##############################################################
sh: cannot set terminal process group (-1): Inappropriate ioctl for device
sh: no job control in this shell
[InitRamFs@/]#random: nonblocking pool is initialized