Sample Header Ad - 728x90

I Failed to execute AARCH64 Linux kernel on the QEMU

0 votes
0 answers
1001 views
I'm trying to execute AARCH64 Linux kernel on the QEMU. But,there was an error and the error log is:
rom: requested regions overlap (rom bootloader. free=0x00000000422c0a00, addr=0x0000000040000000)
qemu-system-aarch64: rom check and register reset failed
My development environment is:
host: x86_64 Ubuntu 18.04
linux kernel source version: v5.19
busybox version: 1_36_stable
I cannot find what I should check first. So, I need help. What I did to achieve my goal is as following: 1. Linux kernel build for AARCH64 - apply defconfig
make ARCH=arm64 defconfig -j$(nproc) CROSS_COMPILE=aarch64-linux-gnu-
- set 'CONFIG_BLK_DEV_RAM' config by using menuconfig to use RAM disk - build kernel
make ARCH=arm64 -j$(nproc) CROSS_COMPILE=aarch64-linux-gnu-
2. Build 'busybox' to make initramfs.gz - apply defconfig
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- defconfig
- set 'CONFIG_STATIC' config by using menuconfig to build the libraries as static library form. - build busybox
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j$(nproc)
- install busybox
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- install
- make initramfs.gz
cd _install
mkdir -p dev etc/init.d home/root lib mnt proc root sys tmp usr/lib var
cp -v /usr/aarch64-linux-gnu/lib/* ./lib/

cat > etc/init.d/rcS  /etc/resolv.conf
EOF

chmod +x etc/init.d/rcS
find . | cpio -o --format=newc > ../initramfs
cd ..
gzip -vc initramfs > initramfs.gz
- install qemu
sudo apt install qemu-system-arm qemu-efi-aarch64
- execute qemu
qemu-system-aarch64 \
-machine virt \
-cpu cortex-a57 \
-smp 4 \
-m 2048 \
-kernel arch/arm64/boot/Image \
-initrd busybox/initramfs.gz \
-append "rdinit=/sbin/init root=/dev/ram rootfstype=ramfs rw nokaslr" \
-nographic
If you have any idea about this problem, please help me. Thanks!
Asked by nickeys (21 rep)
Jan 31, 2024, 04:22 AM
Last activity: Jan 31, 2024, 04:52 AM