consmirror.c: the BSD notice is replaced (Makronix's own file). Files with changes of other sessions pending are left for their commit. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
24 lines
974 B
Bash
Executable File
24 lines
974 B
Bash
Executable File
#!/bin/sh
|
|
# License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree.
|
|
#
|
|
# The first layer of Makronix/Linux's own sysroot (docs/NETBSD-USERLAND.md,
|
|
# L1): the kernel's userspace headers of our kernel tree (make linux), as LFS
|
|
# installs them (make headers_install). The tooldir's gcc is configured
|
|
# against this directory and needs nothing else of it. NetBSD's hierarchy
|
|
# and glibc follow with tools/mkglibc.sh, once the tooldir (nbmtree) exists.
|
|
#
|
|
# Usage: mkmxheaders.sh DEVICEDIR SYSROOT
|
|
|
|
set -eu
|
|
. "$(dirname "$0")/lib.sh"
|
|
|
|
[ $# -eq 2 ] || { echo "usage: $0 DEVICEDIR SYSROOT" >&2; exit 2; }
|
|
load_device "$1"
|
|
mkdir -p "$2/usr"
|
|
sysroot=$(cd "$2" && pwd)
|
|
tree=$ROOT/build/linux-$(basename "$DEVDIR")
|
|
[ -f "$tree/Makefile" ] || die "no kernel tree $tree (make linux)"
|
|
|
|
kernel_make "$tree" -s headers_install INSTALL_HDR_PATH="$sysroot/usr"
|
|
echo "$sysroot: kernel headers $(sed -n 's/.*LINUX_VERSION_CODE //p' "$sysroot/usr/include/linux/version.h")"
|