Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1819777pxb; Fri, 1 Oct 2021 21:38:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzgOiNG5iOaMajRhiMfBNG+dPqMhEuJ18xzlo6VlwF7jD4QDS8GAwZoklvTi2kQVZnnA5bf X-Received: by 2002:a63:f94c:: with SMTP id q12mr1441177pgk.171.1633149518275; Fri, 01 Oct 2021 21:38:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633149518; cv=none; d=google.com; s=arc-20160816; b=pXOBQ53jqXVDWlyOJbucmX/ma9fXsQI+Hp5edkyEMHTfgi/JEvHscs0cSUgmBZaE7X wf/X0TTXt3jc8rIdoCD+P8kf4LLhhAfCh3pLKbJkM+SF4WH7F9m94Op24TF4AUdukIMr 6Qnf5Ht+u6bYMpXx8k8rI9IZH2wzOM7VWoWiZ1vvFrKe/wZ2MGy/mbY82wuAfHamgi5/ wZ1YQTwTHF7AQlwHXrZQsGo1mqqUWshNaOxLr9aRY6DWXVoiTFoaOTfoDjg8GiXhWvxb JV1rTpcHTNOGuhQFYCbp8BOe8EwY+FbMuQrVDwPpUPCb6mGF5S6vSITMCVu2ix/Z57d8 bdXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=nAmKLZjrOXAXZSBKxPTPKE4dKm8DALBsSgMVMuCAdHc=; b=Cc1b+iKnN8aZTLLcDl9+BL+K05yYAxdVY860WMbqULPlARy12BgQdnLGCc5r+ZCACN RQUhDhLY8J36YcgxIm6r+17eVz9PVBjVJWTB/p5p3IS17kQTHHAgD1mqijxkBkDtH9/F RrvUB43saQF5v3P4CyZSgjhWv0j3CeFrsuuJ8DvmKSEtclgvYBne2NNhhWI/10kxrjDW aKt/cSf0nF8XRf2exlSkyyTo9iSfIrucFtuKKwOl+GG9J1tGYiBqBoDTTvnivx2zciSf Pqba/KTzzvJMQa0N+VzldQk5Tye7ushWamnK11kHBqJ9/Lapx3RS0nzmY5aHJxWWUwZc rswg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="b3yLo2/v"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l10si10069919pgq.267.2021.10.01.21.38.24; Fri, 01 Oct 2021 21:38:38 -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=@gmail.com header.s=20210112 header.b="b3yLo2/v"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230263AbhJBEjY (ORCPT + 99 others); Sat, 2 Oct 2021 00:39:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229661AbhJBEjY (ORCPT ); Sat, 2 Oct 2021 00:39:24 -0400 Received: from mail-ot1-x331.google.com (mail-ot1-x331.google.com [IPv6:2607:f8b0:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D6F7C061775; Fri, 1 Oct 2021 21:37:39 -0700 (PDT) Received: by mail-ot1-x331.google.com with SMTP id h9-20020a9d2f09000000b005453f95356cso14044208otb.11; Fri, 01 Oct 2021 21:37:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nAmKLZjrOXAXZSBKxPTPKE4dKm8DALBsSgMVMuCAdHc=; b=b3yLo2/vIHJ1uElT7jpgHuDU05OkhPEPhoxnqQ4jbk8CTVY662wXA0FS9X01S4cTRF yCLro9pVV/XfnE62RuN4dI5yPKAY9JLkgrQRooagDe0ggNfTH6VzYVIvzIF1ayafwMkm 7+NsS2fK9sGmACodNBVC8Gj+p3+fI0DjbPP2YZDwjJ3hRDBhgjZjqoJTOWHkxfYQiJ+/ +oHAXRDOTtPtmYpFKp2/8CbPRIRbw76CDcOvsNvqYXuEacrjuUn/aCCzYREeM70s53Vt xyiUeSAcUIBNqE1uvba4aK3BtID7VcC91qh6QwhrL+gxrLHBOdMfwJqTIgV7BkdSamh6 puYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=nAmKLZjrOXAXZSBKxPTPKE4dKm8DALBsSgMVMuCAdHc=; b=Op7yy+LUqZfAtQy1FLQTRuXcVKdLnT1abYWa599PuSc73WvbONbTDb/L2a3Axnf+Uq WZhU5s1/hyc8NeU+edPdfAAmTGYAwjwcdw33c6fa3n5cxz3C6DIKhzKZf7bq/G0jlDef 1uoY8YDu0xUvaeI7KaKH6ZJYTgoRvanm04jaofcLiEoTqFF1fvjjFl0pUK73YnGexQQ8 s6AGZ9KJIZ08KL+RCmeTmvWIy4aWUj7hnUp/uJtBAASCf38s/B1y/hq8BorQ8h968b/K 8lApgonr9M/OF4Br8TE1NY+TSlNFjn9bE8CcDew4bwrb1id7Sg60tTQe45q7kOJ1KgF9 IcLA== X-Gm-Message-State: AOAM530BfS8P8T77LmtqSxsStaDQwkeKddbjNT18qD2UdC/ulRtsvCB2 +caXZFIa4hfm5EUHEIa7+GevW/+v0aH5wU2qtBEa4Wn4 X-Received: by 2002:a05:6830:1653:: with SMTP id h19mr1351599otr.162.1633149458403; Fri, 01 Oct 2021 21:37:38 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Ajay Garg Date: Sat, 2 Oct 2021 10:07:26 +0530 Message-ID: Subject: Re: Recommended way to do kernel-development for static modules To: Randy Dunlap Cc: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks Randy. On Sat, Oct 2, 2021 at 10:03 AM Randy Dunlap wrote: > > 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