制作initrams

make PLATFORM=generic  CROSS_COMPILE=riscv64-linux-gnu- -j64 menuconfig
制作initrams



 


 

make PLATFORM=generic  CROSS_COMPILE=riscv64-linux-gnu- -j64  
make PLATFORM=generic  CROSS_COMPILE=riscv64-linux-gnu- -j64  install





root@ubuntu:/home/ubuntu/busybox-1.32.1# find ./ -name tcpdump
root@ubuntu:/home/ubuntu/busybox-1.32.1# cd _install/
root@ubuntu:/home/ubuntu/busybox-1.32.1/_install# ls
bin  linuxrc  sbin  usr
root@ubuntu:/home/ubuntu/busybox-1.32.1/_install# mkdir bin dev tmp proc sys 
mkdir: cannot create directory ‘bin’: File exists
root@ubuntu:/home/ubuntu/busybox-1.32.1/_install# ls
bin  dev  linuxrc  proc  sbin  sys  tmp  usr
root@ubuntu:/home/ubuntu/busybox-1.32.1/_install# 


root@ubuntu:/home/ubuntu/busybox-1.32.1/_install# ls
bin  linuxrc  sbin  usr
root@ubuntu:/home/ubuntu/busybox-1.32.1/_install# mkdir bin dev tmp proc sys 
mkdir: cannot create directory ‘bin’: File exists
root@ubuntu:/home/ubuntu/busybox-1.32.1/_install# ls
bin  dev  linuxrc  proc  sbin  sys  tmp  usr
root@ubuntu:/home/ubuntu/busybox-1.32.1/_install# ln -s ../bin/busybox sbin/init
ln: failed to create symbolic link 'sbin/init': File exists
root@ubuntu:/home/ubuntu/busybox-1.32.1/_install# ln -s bin/busybox linuxrc 
ln: failed to create symbolic link 'linuxrc': File exists
root@ubuntu:/home/ubuntu/busybox-1.32.1/_install# ln -s sbin/init init  
root@ubuntu:/home/ubuntu/busybox-1.32.1/_install#

root@ubuntu:/home/ubuntu/ busybox-1.32.1/_install# mknod dev/console c 5 1
root@ubuntu:/home/ubuntu/ busybox-1.32.1/_install# mknod dev/ram b 1 0


                      
mkdir bin dev tmp proc sys              # 创建一些系统目录
cp inittab $RISCV/rootfs/etc/inittab    # 拷贝进inittab 文档(可选,可以不拷贝)
ln -s ../bin/busybox sbin/init          # 设定init起始文档连接到busybox
ln -s bin/busybox linuxrc               #
ln -s sbin/init init                    # 
mknod dev/console c 5 1                 # 设置一些必要的虚拟外设()
mknod dev/null c 1 3   
 
/home/ubuntu/busybox-1.32.1# find . -print0 | cpio --null -ov --format=newc | gzip -9 > ../initrams.my.gz

 

qemu-system-riscv64 -nographic -machine virt  -bios fw_jump.elf -m 1024    \
     -kernel ~/riscv_debug/linux-5.14/arch/riscv/boot/Image  -append "root=/dev/vda ro console=ttyS0,115200n8  earlycon" \
     -initrd initrams.my.gz  

 

制作initrams

 

上一篇:USB WIFI网卡在S5PV210上的移植和使用最全攻略(2)


下一篇:DM8搭建dsc集群