public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Theodore Y. Ts'o" <tytso@mit.edu>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Michal Kubecek <mkubecek@suse.cz>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Thomas Backlund <tmb@mageia.org>,
	Ulf Magnusson <ulfalizer@gmail.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: building in 32bit chroot on x86_64 host broken
Date: Sat, 9 Jun 2018 12:49:21 -0400	[thread overview]
Message-ID: <20180609164921.GA5020@thunk.org> (raw)
In-Reply-To: <CAK7LNAQrhBukG14-ggBWPBauB1shAiuZvESo70KrFxuOwhRJjg@mail.gmail.com>

On Sat, Jun 09, 2018 at 09:23:55PM +0900, Masahiro Yamada wrote:
> Just a note.
> 
> In case of cross-compiling, not only ARCH but also CROSS_COMPILE
> must be passed when you do "make *config".

Sure, what was being discussed was people who build 32-bit x86 kernels
on a 64-bit platform.  I do this occasionally to check and make sure
that 32-compat ioctl handling is working correctly, etc.  I suspect
there are more developers setting just ARCH= and not CROSS_COMPILE
because they are building 32-bit x86 kernels (which can then be
trivially tested using qemu) than there are building cross-compiled
kernels for a completely different architecture.

I saw this thread and decided I didn't care because I use a standard
"kbuild32" script (I also have a "kbuild" script for building normal
64-bit kernels), and it always passes ARCH=i386.

					- Ted

#!/bin/bash

N=$(getconf _NPROCESSORS_ONLN)

if test -f .git/kbuild/config ; then
    . .git/kbuild/config
else
    echo "Missing kbuild configuration file!"
    exit 1
fi

if test ! -d "$BLD_DIR_32" ; then
    mkdir -p "$BLD_DIR_32"
    if test -f .git/kbuild/kernel-config ; then
	cp .git/kbuild/kernel-config-32 "$BLD_DIR_32/.config"
    fi
    for i in x509.genkey signing_key.pem signing_key.x509
    do
	if test -f ".git/kbuild/$i" ; then
	    mkdir -p "$BLD_DIR_32/certs"
	    cp ".git/kbuild/$i" "$BLD_DIR_32/certs"
	fi
    done
fi

time nice make O="$BLD_DIR_32" ARCH=i386 -j$N $*

cp "$BLD_DIR_32/.config" .git/kbuild/kernel-config-32

  reply	other threads:[~2018-06-09 16:49 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-03 21:58 Linux 4.17 Linus Torvalds
2018-06-05 17:53 ` building in 32bit chroot on x86_64 host broken (was: Linux 4.17) Thomas Backlund
2018-06-05 18:11   ` Linus Torvalds
2018-06-05 18:24     ` building in 32bit chroot on x86_64 host broken Thomas Backlund
2018-06-05 18:38       ` Linus Torvalds
2018-06-05 18:51         ` Thomas Backlund
2018-06-05 19:13           ` Linus Torvalds
2018-06-05 19:36             ` Thomas Backlund
2018-06-06  1:37             ` Masahiro Yamada
2018-06-06  1:54               ` Linus Torvalds
2018-06-06  2:19                 ` Linus Torvalds
2018-06-06  3:31                   ` Masahiro Yamada
2018-06-07 19:36                     ` Thomas Backlund
2018-06-07 19:40                       ` Linus Torvalds
2018-06-07 19:49                         ` Thomas Backlund
2018-06-09 12:16                           ` Masahiro Yamada
2018-06-08  9:12                         ` Michal Kubecek
2018-06-09 12:23                           ` Masahiro Yamada
2018-06-09 16:49                             ` Theodore Y. Ts'o [this message]
2018-06-05 18:12   ` building in 32bit chroot on x86_64 host broken - IGNORE Thomas Backlund
2018-06-05 20:10 ` python errors in tools/testing/selftests/tc-testing (was: Linux 4.17) Thomas Backlund
2018-06-05 21:01   ` python errors in tools/testing/selftests/tc-testing - IGNORE Thomas Backlund

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180609164921.GA5020@thunk.org \
    --to=tytso@mit.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mkubecek@suse.cz \
    --cc=tmb@mageia.org \
    --cc=torvalds@linux-foundation.org \
    --cc=ulfalizer@gmail.com \
    --cc=yamada.masahiro@socionext.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox