Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4359170imm; Mon, 20 Aug 2018 14:35:18 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzBPqQ8XrzQ0Ym+PsAc8XcBXj92HQk9ATUCuifCavg6Zfhnf3eJUj+qOCjkOB4kwHLGCRCk X-Received: by 2002:a17:902:7b96:: with SMTP id w22-v6mr46766343pll.24.1534800918581; Mon, 20 Aug 2018 14:35:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534800918; cv=none; d=google.com; s=arc-20160816; b=rwb4sCEoSkVQknfgBixkBN+waiDlWExXB5Q+jiTFosHYXXHw5h8zlNlCHNpI7xx8Ox 6SB89bVq4BY4EZ0+D+Z2ITvnFztA2GMOcardsaYPXyNBY4mNf6WTdZq9DRSxejVaB83H a5cCumUwpF0IJuvB6BjMhNlWl5dcFs6sI2p5FKG6KWivzlJHYtAt0jRkDa3c6VJj+bWr exVmNxq80qBB4SqN9VRkXENoYa6q5oJqw6uNOrfRD75US87nSM+8olaIIV9YzdkewEve EbATjww2AoKnmpUnsrF94ooeZ2awf/9VwJzKMx+Fc3VLQOsxWoHB1Kmn4RrRlv3gzVsr m4Dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=uNCuRoJ3pHcM4+h8QztPkjgfNLmcXqd/wzWWsROG5Pk=; b=XEHrRRlC1nBBZOuu373w/HHjerMV8/RQhLfWoF5jXXAcWJlViChBGrFG1tBiSuWoLS eEMg1/6tC+yWtoOfBYHIHq5HZQoOgXJHszpa9vpq0oA20lzSoAmVY8iUavEFVCmHNENT sEQ1RdDP3HvNWb8zNkuzTx8trkzCTUi+FrRh5PIFRZO6mgA34x96ljIJXuLv6tw43/ov ABl2MtkRmyX3tJnG8ptwt45TaQ6jNe1p3us7URBaZ4h30BqEfhBKlATTz89rmqyb1e0U MvBUSrB94M/xxyIwcAAlVVMGhjrs0xHcDH3sy4XLNxqdcpry3deXK+BCj3/9zyAAYagm JtFQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t30-v6si6907684pgm.66.2018.08.20.14.35.03; Mon, 20 Aug 2018 14:35:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726739AbeHUAuy convert rfc822-to-8bit (ORCPT + 99 others); Mon, 20 Aug 2018 20:50:54 -0400 Received: from mx2.suse.de ([195.135.220.15]:52008 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726099AbeHUAuy (ORCPT ); Mon, 20 Aug 2018 20:50:54 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id E9907AED3; Mon, 20 Aug 2018 21:33:34 +0000 (UTC) Date: Mon, 20 Aug 2018 23:33:31 +0200 From: Michal =?UTF-8?B?U3VjaMOhbmVr?= To: Masahiro Yamada Cc: Linux Kernel Mailing List , Takashi Iwai , Andreas Schwab , Michal Kubecek , Michal Marek , Jonathan Corbet , Yoshinori Sato , Rich Felker , "David S. Miller" , Jeff Dike , Richard Weinberger , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , X86 ML , Kees Cook , Philippe Ombredanne , Greg Kroah-Hartman , Ulf Magnusson , Jeff Mahoney , "Peter Zijlstra," , Mathieu Desnoyers , Frederic Weisbecker , Randy Dunlap , Dominik Brodowski , Nicholas Piggin , Linux Kbuild mailing list , "open list:DOCUMENTATION" , Linux-sh list , sparclinux , linux-um@lists.infradead.org Subject: Re: due to kconfig changes kernel config file is no longer sufficient for configuring the kernel Message-ID: <20180820233331.08dd2bfb@naga.suse.cz> In-Reply-To: References: <20180627143705.5a1fed1c@kitsune.suse.cz> <20180628111623.3807fe9b@naga.suse.cz> <20180806200725.4efa5d35@kitsune.suse.cz> X-Mailer: Claws Mail 3.15.1-dirty (GTK+ 2.24.32; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Tue, 21 Aug 2018 03:15:12 +0900 Masahiro Yamada wrote: > 2018-08-07 3:07 GMT+09:00 Michal Suchánek : > > On Mon, 30 Jul 2018 17:02:42 +0900 > > Masahiro Yamada wrote: > > > >> 2018-06-28 18:16 GMT+09:00 Michal Suchánek : > >> > On Wed, 27 Jun 2018 23:07:21 +0900 > >> > Masahiro Yamada wrote: > >> > > >> > >> > >> > >> >> > >> >> out-of-tree modules are built with exactly the same > >> >> configuration as used for the kernel. > >> > > >> > It is not true. And that is the problem. You need the config file > >> > and dump of the environment passed to the make command at > >> > configuration time to get the exact same configuration. The > >> > environment is not saved anywhere, though. > >> > >> > >> Why dump of the environment? > >> > >> > >> If you are building external modules natively > >> your distribution provides /lib/modules/$(uname -r)/build, > >> which contains files enough for building external modules. > >> > >> You can pass the directory path to M=... parameter. That's it. > > > > No, that's not it. Since passing ARCH=i386 is the de-facto standard > > to configure a 32bit kernel and the result of passing that was not > > saved you need to pass it to make as well. > > > If you pass ARCH= for the configuration phase, > you need to pass the same ARCH= in the build phase. > > > > > What I can suggest for you is: > > > $ make ARCH=i386 defconfig > $ make ARCH=i386 > > OR > > $ make i386_defconfig > $ make Maybe you missed that but I do not want to build the defconfig. I want to build a *particular* config which has been saved in a file beforehand. > > > And you need to patch a number of > > 3rd party build scripts that build a kernel module as part of a > > bigger project. > > > You do not need to patch a number of scripts. > > Just one liner fix. > Add 'export ARCH=i386' in the top level script. And that does not work because there is no toplevel script. rpm has three toplevel scripts - prep, build and install. Building out-of-tree module is another toplevel script. And it does not suffice to 'export ARCH=i386'. What if it was a 64bit config? How do I tell? With more and more options left out of the config that depend on compiler features, environment variables, phase of the moon or whatnot you can't even tell what kind of kernel the user is running by looking at the config. Thanks Michal