加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
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

空文件

简介

kernel debug with qemu 展开 收起
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化