From patchwork Wed Jul 10 19:32:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jim Baxter X-Patchwork-Id: 2825892 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5A8799F756 for ; Wed, 10 Jul 2013 19:32:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 79AB220177 for ; Wed, 10 Jul 2013 19:32:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 60FD220176 for ; Wed, 10 Jul 2013 19:32:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754602Ab3GJTcG (ORCPT ); Wed, 10 Jul 2013 15:32:06 -0400 Received: from relay1.mentorg.com ([192.94.38.131]:39187 "EHLO relay1.mentorg.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754423Ab3GJTcF (ORCPT ); Wed, 10 Jul 2013 15:32:05 -0400 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1Ux07P-0003az-8E from Jim_Baxter@mentor.com ; Wed, 10 Jul 2013 12:32:03 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Wed, 10 Jul 2013 12:32:03 -0700 Received: from [172.30.64.74] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server (TLS) id 14.2.247.3; Wed, 10 Jul 2013 20:32:01 +0100 Message-ID: <51DDB6BC.5060203@mentor.com> Date: Wed, 10 Jul 2013 20:32:12 +0100 From: Jim Baxter User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130623 Thunderbird/17.0.7 MIME-Version: 1.0 To: , CC: , "Moseley, Drew" Subject: Building CONFIG_SAMPLES separately. X-Originating-IP: [137.202.0.76] X-OriginalArrivalTime: 10 Jul 2013 19:32:03.0048 (UTC) FILETIME=[27760E80:01CE7DA4] Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi, I was wondering if there is a reason the modules under the samples directory only build if you use the command make uImage modules? I have created a patch so that they compile if you enable CONFIG_SAMPLES and then build the kernel separately, i.e. make uImage make modules This two step approach is how the kernel is built if you use bitbake in yocto, currently it does not output the kernel module object file for the sample modules. This is the patch I am considering: $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost Thank you for any help or advice, Jim Baxter --- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/Makefile b/Makefile index 29339b4..1acd69f 100644 --- a/Makefile +++ b/Makefile @@ -772,9 +772,6 @@ vmlinux: scripts/link-vmlinux.sh $(vmlinux-deps) FORCE ifdef CONFIG_HEADERS_CHECK $(Q)$(MAKE) -f $(srctree)/Makefile headers_check endif -ifdef CONFIG_SAMPLES - $(Q)$(MAKE) $(build)=samples -endif ifdef CONFIG_BUILD_DOCSRC $(Q)$(MAKE) $(build)=Documentation endif @@ -943,6 +940,9 @@ all: modules PHONY += modules modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin +ifdef CONFIG_SAMPLES + $(Q)$(MAKE) $(build)=samples +endif $(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order @$(kecho) ' Building modules, stage 2.';