kernel doesn't start booting after chaning to minimum config (on qemu arm64 machine)

Chan Kim ckim at etri.re.kr
Tue Oct 12 10:06:53 EDT 2021


Hello all,

To make a minimal kernel size (with almost no driver), I copied a .config
that was used for building kernel for sparc machine using linux 3.3 several
years ago to current linux 5.4.21 version build tree.

(That .config was for kernel with interrupt controller, timer and uart so a
very basic scheduling and shell is possible.)

Then I ran 

Yes "" | make ARCH=arm64 CROSS_COMPILE=aarch64-none-elf- oldconfig

This copies the configs and sets all the new config settings with default
values. 

(see
https://serverfault.com/questions/116299/automatically-answer-defaults-when-
doing-make-oldconfig-on-a-kernel-tree)

 

Now I can see the start_kernel function runs to the end and it's running
inside the cpu_idle function. but I don't see the first scrolling message
below that I normally should see.

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd083]

I tried adding several CONFIG variables using menuconfig but it's still the
same.

(CONFIG_SERIAL_AMBA_PL010, CONFIG_SERIAL_AMBA_PL010_CONSOLE,
CONFIG_SERIAL_CORE, CONFIG_SERIAL_CORE_CONSOLE were already automatically
set. 

And later I tried adding CONFIG_CPU_IDLE, CONFIG_CPU_IDLE_GOV_LADDR,
CONFIG_ACPI and other ACPI related things, CONFIG_PCI_ECAM, CONFIG_PNP,
CONFIG_PNP_DEBUG_MESSAGES, .. )

And the qemu command is like this.

${QEMU_DIR}/qemu-system-aarch64 -M ${QMACHINE} -cpu cortex-a72 -kernel
${LINUX_DIR}/arch/arm64/boot/Image -initrd ${BUSYBOX_DIR}/initramfs.cpio.gz
--append "root=/dev/ram init=/init nokaslr earlycon ip=dhcp" -m 2048M
-nographic -netdev user,id=n1 -device e1000,netdev=n1

Has anyone any idea what I can add in the config or try? (with original
.config, the kernel boots ok to the bash in initramfs)

Any suggestion will be appreciated.

Thank you,

Kind regards,

Chan Kim

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20211012/9bb6d10b/attachment.html>


More information about the Kernelnewbies mailing list