view linux-kernel.sh @ 1728:b89324905ca2 draft

Giant redo to put simple-root-filesystem in initmpfs. NO_NATIVE_COMPILER and NO_ROOTDIRS went away, kernel built moved back into system-image.sh, old root-filesystem.sh and root-image.sh are no longer used, I need to fix up several things (chroot-splice.sh, the lfs-bootstrap build is breaking in mpfr, haven't tested this on all targets yet... but the basics are in.
author Rob Landley <rob@landley.net>
date Fri, 06 Feb 2015 01:51:54 -0600
parents 3873d1b178e0
children
line wrap: on
line source

#!/bin/bash

# Package a root filesystem directory into a filesystem image file

source sources/include.sh || exit 1

# Parse sources/targets/$1

load_target "$1"

setupfor linux

# Build linux kernel for the target

getconfig linux > mini.conf
[ "$SYSIMAGE_TYPE" == rootfs ] &&
  echo -e "CONFIG_INITRAMFS_SOURCE=\"$BUILD/rootfs-$ARCH.cpio\"\n" \
    >> mini.conf
make ARCH=${BOOT_KARCH:-$KARCH} $LINUX_FLAGS KCONFIG_ALLCONFIG=mini.conf \
  allnoconfig >/dev/null &&
make -j $CPUS ARCH=${BOOT_KARCH:-$KARCH} $DO_CROSS $LINUX_FLAGS $VERBOSITY &&
cp "$KERNEL_PATH" "$STAGE_DIR"

cleanup

ARCH="$ARCH_NAME" create_stage_tarball