Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 905EBC433EF for ; Tue, 12 Oct 2021 14:07:41 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E00F660E0B for ; Tue, 12 Oct 2021 14:07:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E00F660E0B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=etri.re.kr Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.94.2) (envelope-from ) id 1maIQs-0007lN-FL; Tue, 12 Oct 2021 10:07:06 -0400 Received: from mscreen.etri.re.kr ([129.254.9.16]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA (Exim 4.94.2) (envelope-from ) id 1maIQo-0007l8-SS for kernelnewbies@kernelnewbies.org; Tue, 12 Oct 2021 10:07:04 -0400 Received: from unknown (HELO send002-relay.gov-dooray.com) (211.180.235.153) by 129.254.9.16 with ESMTP; 12 Oct 2021 23:06:55 +0900 X-Original-SENDERIP: 211.180.235.153 X-Original-MAILFROM: ckim@etri.re.kr X-Original-RCPTTO: kernelnewbies@kernelnewbies.org Received: from [10.162.225.112] (HELO smtp002-imp.gov-dooray.com) ([10.162.225.112]) by send002-relay.gov-dooray.com with SMTP id d7bb66ce6165967f; Tue, 12 Oct 2021 23:06:55 +0900 DKIM-Signature: a=rsa-sha256; b=pdVmBhLytSGIMGjeYyOiMBvI9UQHuwvbM0msLL3pgwlP7/WKKpc+DPPJnnKqbT2RATZ5Oiggjm wj/XRvxHnyh+v3LoIuWTTy4cJFLLpH4PU4hJ9+G7kWXzMAgg93eLJyLNyLPcR52r7/8DD1IQyEVm n6biv9rHmu/AkZmWJ0W645BBIGqMGWrSeKcCcRxwzMXVSc1ueU1wX1ppzsTVf8dTAEAijg7gt3aA jeXP2wJYSDHoGXrgBur7cK/MPH/MWytgaohRsRPsMh3GFsyp0MGYv5MWFEYw4lsXkU/f24P8VNbl xE4fozkSnECzHO9+bIQsqPvj6B0n7u2qeVtsmYHQ==; c=relaxed/relaxed; s=selector; d=dooray.com; v=1; bh=jAc6bKf4lM2FYVskJABnEOtFasiwhlM/oKf/QYGL6/w=; h=From:To:Subject:Message-ID; Received: from [129.254.132.39] (HELO CHANKIMPC) ([129.254.132.39]) by smtp002-imp.gov-dooray.com with SMTP id 923818a96165967f; Tue, 12 Oct 2021 23:06:55 +0900 From: "Chan Kim" To: Subject: kernel doesn't start booting after chaning to minimum config (on qemu arm64 machine) Date: Tue, 12 Oct 2021 23:06:53 +0900 Message-ID: <019701d7bf72$68a80de0$39f829a0$@etri.re.kr> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: Ade/bz90mbkNdHPeT728t+fxFtXu+Q== Content-Language: ko X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============2202842529141320563==" Errors-To: kernelnewbies-bounces@kernelnewbies.org This is a multipart message in MIME format. --===============2202842529141320563== Content-Type: multipart/alternative; boundary="----=_NextPart_000_0198_01D7BFBD.D890EE60" Content-Language: ko This is a multipart message in MIME format. ------=_NextPart_000_0198_01D7BFBD.D890EE60 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 ------=_NextPart_000_0198_01D7BFBD.D890EE60 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

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=3Darm64 = CROSS_COMPILE=3Daarch64-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-wh= en-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=3D/dev/ram = init=3D/init nokaslr earlycon ip=3Ddhcp" -m 2048M -nographic = -netdev user,id=3Dn1 -device e1000,netdev=3Dn1

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

 

------=_NextPart_000_0198_01D7BFBD.D890EE60-- --===============2202842529141320563== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies --===============2202842529141320563==--