[QUESTION] How to run 16K page kernel with qemu
Wenchao Hao
haowenchao22 at gmail.com
Sat Sep 21 03:31:49 PDT 2024
Hi all:
I am trying to run ARM64 16K kernel on qemu, but failed.
I run a narmal 4K kernel on qemu at first with following steps:
1. cloning latest linux code
2. using default config and build kernel
(wd: path where I cloned the linux code)
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- defconfig
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j 16
3. run the built kernel with following command:
qemu-system-aarch64 -cpu cortex-a72 -m 4G -nographic \
-machine virt,usb=off,dump-guest-core=off,gic-version=2 \
-kernel arch/arm64/boot/Image
The kernel can be booted successfully with above steps, but halt when trying to
mount a rootfs, it does not matter to me.
Then I enabled CONFIG_ARM64_16K_PAGES then build the kernel again:
1. change the config and build again
sed -i 's/default ARM64_4K_PAGES/default ARM64_16K_PAGES/' arch/arm64/Kconfig
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- defconfig
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j 16
2. run the built kernel with following command:
qemu-system-aarch64 -cpu cortex-a72 -m 4G -nographic \
-machine virt,usb=off,dump-guest-core=off,gic-version=2 \
-kernel arch/arm64/boot/Image
But I failed to boot the 16K kernel, no log printed.
Following is some related config:
CONFIG_ARM64=y
CONFIG_ARM64_PAGE_SHIFT=14
CONFIG_ARM64_CONT_PTE_SHIFT=7
CONFIG_ARM64_CONT_PMD_SHIFT=5
CONFIG_ARM64_VA_BITS_48=y
CONFIG_ARM64_VA_BITS=48
CONFIG_PGTABLE_LEVELS=4
Is anyone help to point out how to run ARM64 16K pages kernel? Or is there
any doc about it? Did I miss any critical changes?
Thanks.
More information about the linux-arm-kernel
mailing list