加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
README 2.09 KB
一键复制 编辑 原始数据 按行查看 历史
jianwu 提交于 2022-10-06 23:01 . Fix comments issue
Linux kernel
============
There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.
In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``. The formatted documentation can also be read online at:
https://www.kernel.org/doc/html/latest/
There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.
(version 0)
../qemu-7.1.0/build/qemu-system-x86_64 --enable-kvm -cpu host -m 2048 -kernel arch/x86_64/boot/bzImage -nographic -append "console=ttyS0 nokaslr" -initrd ./rootfs.cpio.gz -drive file=../nvm.img,format=raw,if=none,id=nvm -device nvme,serial=deadbeef,drive=nvm
(version 1)
Step1: make up rootfs image
<1> Create 4GB raw file for rootfs, which will hold the rootfs.
dd if=/dev/zero of=rootfs-target.img bs=1M count=4096
<2> Format with ext4 filesystem.
mkfs.ext4 -b 4096 -F rootfs-target.img
<3> Mount the filesystem
mkdir ubuntu_xenial
sudo mount -o loop rootfs-target.img ubuntu_xenial/
<4> Create root file system using debootstrap
sudo apt-get install qemu-user-static debootstrap binfmt-support
debootstrap --arch=amd64 xenial ubuntu_xenial http://archive.ubuntu.com/ubuntu/
<5> Change the root password
sudo chroot ubuntu_xenial/
root@ubuntu:/# sudo passwd root
<6> Change the hostname
root@ubuntu:/# cat /etc/hostname
target
<7> Unmount the rootfs
sudo umount ubuntu_xenial/
../qemu-7.1.0/build/qemu-system-x86_64 --enable-kvm -cpu host -m 2048 -kernel arch/x86_64/boot/bzImage -nographic -append "console=ttyS0 nokaslr root=/dev/vda rw" -drive file=../nvm.img,format=raw,if=none,id=nvm -device nvme,serial=deadbeef,drive=nvm -drive if=virtio,file=../try/rootfs-target.img
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化