Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1818704pxb; Fri, 1 Oct 2021 21:35:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzSUSCZN68eJDmU+RczR8OAhSKsLQbhXQkRvAU1fjUZ4Rdyv4GUBCjGD54qtuTcqn5hpdQ7 X-Received: by 2002:a50:8d51:: with SMTP id t17mr1787984edt.205.1633149355880; Fri, 01 Oct 2021 21:35:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633149355; cv=none; d=google.com; s=arc-20160816; b=MJasPmShl5Nuz84cm8C2er30FCUBRTLmCDKqDlIILoU7JYp+ZRXJOEjAI1TvmksAQn i3Ebc6RmOzYYWcoxpbgyJK3ReYwuCAW4fNVWh4XbNOYUzHFxsLwAqdRdHRdnmXjbFJCM nBLxpTJCbi/DZLkMiFqHYtCM5H7NV1S31hr0uOqrMu71tEX2mZ7uOePxoAf6CuFSc/oN 2pVVnsGejDUmohhs5a/DykLHEgCQvAjfO6TVqjtUZUkiboK4qScsbLrOcvsefa8hQ+OK TBwuuZ7Gu0yumuJxhZSlzo3P5teIjQ1Zk5+0RM+qGNGChDsKUY5SlrVNJOHEW7GZ/7AX ORPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :to:subject:dkim-signature; bh=4JZ3mZOgBHzk6nQXM49sVSof9RiCWY+oRRqCmLztV7c=; b=f6RscTHofa52IW0MoyF9JwllPOLnA4mH+1iZ1K61+myhc+bghnzTVmcUrjxyp0GXIB ScCHT7r0+7ubvhuQEbshoLDzmZ+6e6Ew9npE3LnsOhKGXLufb8MDyoaHHszBN/A6Gpf3 7eM8e56Oo41kllVorKvSQSN8zb35GXRDSLWrXBYpuTAlpeDsE8hV/MTWDYG1UgBikghN bZEMRcNnTScVqvBJbsXZ1B+++u4D4Td5y7U4EweJ+oQ2X3px949C3ymXy9/pwZRYlcIg Wxy/2FFVm5xv2sfCtHriyqwETamwaykoQ7YfdtaO5ogCQKrIUWLsmZ8BqgHmx62SFPtp 4UYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=B8VFt1gK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gx23si3189653ejb.285.2021.10.01.21.35.16; Fri, 01 Oct 2021 21:35:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=B8VFt1gK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230202AbhJBEe4 (ORCPT + 99 others); Sat, 2 Oct 2021 00:34:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229661AbhJBEey (ORCPT ); Sat, 2 Oct 2021 00:34:54 -0400 Received: from bombadil.infradead.org (unknown [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DE13C061775; Fri, 1 Oct 2021 21:33:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:To: Subject:Sender:Reply-To:Cc:Content-ID:Content-Description; bh=4JZ3mZOgBHzk6nQXM49sVSof9RiCWY+oRRqCmLztV7c=; b=B8VFt1gKCr0laPhHKBw/a8qcFa FYoY2bPrjr2ia3s33zbZrbXC4pWjSB9xRgqYS4KC4UyRJOea7z9u9+0uQMXW6z2Nrp+C9TUk40YAc fzYhg1Wane037hxX0eW9aiOeQL9P0bgxw3hPeEC0rtip6Px531AIUkRNFrgWNTi1eYlF29thWnA+w jwg7FnHMeJgH6HfP9Hgr/VczlQSOx+T26eoIkBddOi5cxa/p2rGynujcboZlZQYhcNCLMLej1bxvp WuB/9c9TtJHM5ggATe/cMtc7u0N/hXRu+DpI38qK6Cw2yWZBoFrw68a5Eq0aKOqXNdadlWBu95fuZ ArG87Mkw==; Received: from [2601:1c0:6280:3f0::aa0b] by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mWWhv-001mSP-P3; Sat, 02 Oct 2021 04:33:07 +0000 Subject: Re: Recommended way to do kernel-development for static modules To: Ajay Garg , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org References: From: Randy Dunlap Message-ID: Date: Fri, 1 Oct 2021 21:33:05 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/1/21 8:31 PM, Ajay Garg wrote: > Hello All, > > Let's say, I want to make a simple printk change to drivers/pci/bus.c, > compile it, load it, test it. > > Now, since bus.o is built as a result of CONFIG_PCI=y in > drivers/pci/Makefile, so this module is statically built, and as a > result doing a "make M=drivers/pci" does-not-pick-up-the-change / > have-any-effect. > > Doing a simple "make" takes too long, everytime for even a trivial change. > > > So, what is the recommended way to do kernel-development for static modules? > > > Will be grateful for pointers. Just to build drivers/pci/bus.o, you do $ make drivers/pci/bus.o That will tell you if you have any build errors/warnings. For run-time testing, AFAIK you don't have any choice but to build a full kernel and boot it. -- ~Randy