linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Rob Landley <rob@landley.net>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	David Woodhouse <dwmw2@infradead.org>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	Rich Felker <dalias@libc.org>
Subject: Re: headers_install builds break on a lot of targets?
Date: Wed, 3 Jun 2020 16:05:27 +0200	[thread overview]
Message-ID: <CAK8P3a2o-_JcLBsF-8JozRv_i3n18r7ZEBBBmzvTVaXpt8HQpg@mail.gmail.com> (raw)
In-Reply-To: <4627b565-0a5c-080e-726a-01b773c985e8@landley.net>

On Wed, Jun 3, 2020 at 3:49 PM Rob Landley <rob@landley.net> wrote:
>
> The headers_install_all target got removed last year (commit f3c8d4c7a728 and
> would someone like to update Documentation/kbuild/headers_install.txt which
> still describes it?)
>
> The musl-libc maintainer is using a forked hand-hacked kernel header package in
> his toolchain build project (https://github.com/richfelker/musl-cross-make), and
> he said the reason for it is:
>
>   http://lists.landley.net/pipermail/toybox-landley.net/2020-March/011536.html
>
>   Because downloading 100 MB of kernel source and extracting it to a far
>   larger tree just to get the headers isn't really fun.
>
> And I thought "that's why headers_install_all existed", and noticed the target
> being removed, so I tried my hand at a small shell script vesion:
>
>   for i in $(echo arch/*/ | sed 's@arch/\([^/]*\)/@\1@g')
>   do
>     echo $i
>     X="$PWD/fruitbasket/$i"
>     mkdir -p "$X"
>     make ARCH=$i distclean defconfig headers_install \
>       INSTALL_HDR_PATH="$PWD/fruitbasket/$i" > /dev/null
>   done
>
> On the bright side, the resulting fruitbasket.tar.xz is 1.5 megabytes. The
> downside is I have no idea how broken the resulting header files are after this
> error-fest:

I think the problem is that you can no longer run 'make defconfig ARCH=foo'
without passing  a CROSS_COMPILE=${ARCH}-linux-gnu- argument pointing
to a valid toolchain target triple.

You can use the cross-compilers from
https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/10.1.0/
to do this if you need kernel headers for an architecture that you have no
cross-compilers for, but they are build against glibc and won't run on
a musl based host, or anything other than x86-64, arm64 or ppc64le
that I built for.

I don't know if you can just run 'make headers_install' without configuring
first, or if that is something that can be easily changed if it doesn't already
work.

       Arnd

  reply	other threads:[~2020-06-03 14:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-03 13:49 headers_install builds break on a lot of targets? Rob Landley
2020-06-03 14:05 ` Arnd Bergmann [this message]
2020-06-03 16:23   ` David Woodhouse
2020-06-03 14:14 ` Richard Weinberger
2020-06-03 17:03 ` Rich Felker
2020-06-03 17:59   ` Arnd Bergmann
2020-06-04  1:07     ` Masahiro Yamada

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=CAK8P3a2o-_JcLBsF-8JozRv_i3n18r7ZEBBBmzvTVaXpt8HQpg@mail.gmail.com \
    --to=arnd@arndb.de \
    --cc=dalias@libc.org \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rob@landley.net \
    --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;
as well as URLs for NNTP newsgroup(s).