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 4296CC433F5 for ; Wed, 13 Oct 2021 07:24:14 +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 B7FE060EDF for ; Wed, 13 Oct 2021 07:24:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B7FE060EDF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kroah.com 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 1maYbr-0001IX-Ik; Wed, 13 Oct 2021 03:23:31 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1maYbp-0001IF-3T for kernelnewbies@kernelnewbies.org; Wed, 13 Oct 2021 03:23:29 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id AE48A5C010B; Wed, 13 Oct 2021 03:23:24 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 13 Oct 2021 03:23:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=Q86/hNDWnboGyJLBPv7JFzJVbIy mW+pSCRF5x0BYYnk=; b=O3K5wigf5KtIdVScOfsXcQBDnhJnTxL41sZR37K65ar v+S6OxHmO92Qx1ZiabZMWwpfIY4rNv4MxjylLEnNvQf4e0jruI9NheqXi4O1oqPp 50vTVC39YljUSmdAv++j1S4Iw/PQh8hPuGf1dIX1PqzOwIs86BLGTApNmOvSwLSK kewbKuxBerXutZBdrUNRp8mCLuqJUnLKqEfBKkfkALnjSrM+6fnLMpRF6kB3FG5M gDRUNJgkt51s2Hvy7ZZwJIf7dsyT2cQ3hNuF72lUn93vqZfb+CZk+UgXwVaz3dMO Gq9EhSp/Fn+2vVHEQZBfN1y6xkzIm9UV0E+8dgGYUEQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=Q86/hN DWnboGyJLBPv7JFzJVbIymW+pSCRF5x0BYYnk=; b=cM76PqZ6kozoEmTCltv+Pf JasTGSYwXyl9veSISCrXbIxa6m4eDi1gDRcS0uRkLK5gsuZPBqrR9wmstqV8OmUv KOw+EzKOcvT57YfBx8WbaE1OPDt5YciLYim4NGTrwH6xjwnTMCV6sSYH4q1pLhol mGotA1tS5HfAlXUNZrlcsai1NBQmhSF9hknryTUEo6YXuamOeyXvJTIvMSLQ0NNB 6LrLBST8VRQBd6ycIryUc2eBW9AO68NO18MhnXepdw9zqyC7Wr7e02WA4hkCehpV kFJ4FLX3e3qjKKQDG+qn12fSCPG1C+II1i5UffSeJmunrOfcPizJHNsjY3wTOU6g == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvddtledgudduhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepifhrvghg ucfmjfcuoehgrhgvgheskhhrohgrhhdrtghomheqnecuggftrfgrthhtvghrnhepfeefff egudehudfhgfffjeevheejueejgeelgeeukeefgeefteejhfevkedtjeeinecuffhomhgr ihhnpehsvghrvhgvrhhfrghulhhtrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepghhrvghgsehkrhhorghhrdgtohhm X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 13 Oct 2021 03:23:23 -0400 (EDT) Date: Wed, 13 Oct 2021 09:23:21 +0200 From: Greg KH To: Chan Kim Subject: Re: kernel doesn't start booting after chaning to minimum config (on qemu arm64 machine) Message-ID: References: <019701d7bf72$68a80de0$39f829a0$@etri.re.kr> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <019701d7bf72$68a80de0$39f829a0$@etri.re.kr> Cc: kernelnewbies@kernelnewbies.org 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: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces@kernelnewbies.org On Tue, Oct 12, 2021 at 11:06:53PM +0900, Chan Kim wrote: > 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. There are two different ways of getting a "minimal" kernel configuration: - start with a working one and remove items until something breaks - start with a minimal config and keep adding things until it works. Usually the first option is the easier one, as it should go faster and you can figure out exactly what is needed. The second way is just blindly guessing, like it seems you are doing here. Best of luck! greg k-h _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies