第一步:make x86_64_defconfig
第二步:make menuconfig
1.sudo apt-get install libncurses5-dev
2.要选择
第三步:make -j4
1.sudo apt-get install libelf-dev
第四步:最终生成的img文件在arch/x86/boot/bzImage目录下!
第五步:下载busybox
https://busybox.net/
第六步:make menuconfig
第七步:设置为静态编译。
第八步:make && make install
qemu-system-x86_64 -kernel ./linux-4.14.225/arch/x86_64/boot/bzImage -initrd ./busybox-1.33.1/rootfs.img.gz -append “root=/dev/ram init=/linuxrc”