lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a2o-_JcLBsF-8JozRv_i3n18r7ZEBBBmzvTVaXpt8HQpg@mail.gmail.com>
Date:   Wed, 3 Jun 2020 16:05:27 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     Rob Landley <rob@...dley.net>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        David Woodhouse <dwmw2@...radead.org>,
        Masahiro Yamada <yamada.masahiro@...ionext.com>,
        Rich Felker <dalias@...c.org>
Subject: Re: headers_install builds break on a lot of targets?

On Wed, Jun 3, 2020 at 3:49 PM Rob Landley <rob@...dley.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@...h/\([^/]*\)/@\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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ