Next: kernel code download, Up: (dir) [Contents]
This manual is for program, version version.
• kernel code download: | ||
• install qemu: | ||
• rootfs: | ||
• install toolchain: | ||
• build & run: | ||
• access host directory: | ||
• resource: |
Next: install qemu, Previous: Top, Up: Top [Contents]
https://cdn.kernel.org/pub/linux/kernel/
Next: rootfs, Previous: kernel code download, Up: Top [Contents]
install qemu => install from source code
Next: install toolchain, Previous: install qemu, Up: Top [Contents]
download rootfs => rootfs.cpio
unpack kernel source code
cp rootfs.cpio to your kernel source code’s root directory
Next: build & run, Previous: rootfs, Up: Top [Contents]
sudo apt-get install g++-aarch64-linux-gnu
Next: access host directory, Previous: install toolchain, Up: Top [Contents]
change to your kernel’s root directory
add rootfs.cpio
add the line: CONFIG_INITRAMFS_SOURCE="/your/rootfs/absolute/path/rootfs.cpio" to the file: arch/arm64/configs/defconfig
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- O=../out defconfig make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- O=../out -j4 Image /to/your/path/qemu-2.10.0/bin/qemu-system-aarch64 -machine virt -cpu cortex-a57 -machine type=virt -nographic -smp 1 -m 2048 -kernel ../out/arch/arm64/boot/Image --append "console=ttyAMA0"
Next: resource, Previous: build & run, Up: Top [Contents]
qemu-system-aarch64 -machine virt -cpu cortex-a57 -machine type=virt -nographic -smp 1 -m 2048 -kernel ../out/arch/arm64/boot/Image --append "console=ttyAMA0" -fsdev local,id=r,path=../,security_model=none -device virtio-9p-device,fsdev=r,mount_tag=r
mkdir /mnt mount -t 9p -o trans=virtio r /mnt cd /mnt
Previous: access host directory, Up: Top [Contents]
patch -p1 < ... # text format patch
git apply -p1 < ... # patch with binary data