diff options
Diffstat (limited to 'build-essential')
22 files changed, 724 insertions, 0 deletions
diff --git a/build-essential/binutils.morph b/build-essential/binutils.morph new file mode 100644 index 00000000..011901ee --- /dev/null +++ b/build-essential/binutils.morph @@ -0,0 +1,21 @@ +name: build-essential/binutils.morph +kind: chunk +repo: upstream:binutils-redhat +ref: 987eb543a034cddc4eeb103f08f566f24a5f964a +build-system: autotools +configure-commands: +- | + ./configure --prefix="$PREFIX" --disable-nls --disable-werror \ + --with-system-zlib +build_depends: +- build-essential/stage2-binutils.morph +- build-essential/stage2-busybox.morph +- build-essential/stage2-eglibc.morph +- build-essential/stage2-fhs-dirs.morph +- build-essential/stage2-gawk.morph +- build-essential/stage2-gcc.morph +- build-essential/stage2-linux-api-headers.morph +- build-essential/stage2-make.morph +- build-essential/stage2-reset-specs.morph +- build-essential/eglibc.morph +- build-essential/zlib.morph diff --git a/build-essential/busybox.morph b/build-essential/busybox.morph new file mode 100644 index 00000000..6b9d07dd --- /dev/null +++ b/build-essential/busybox.morph @@ -0,0 +1,107 @@ +name: build-essential/busybox.morph +kind: chunk +repo: upstream:busybox +ref: eeb9014f28e3aa00673a0fad127e7420da4392db +configure-commands: +- make defconfig +- sed -e 's|.*UDHCPC_DEFAULT_SCRIPT.*|CONFIG_UDHCPC_DEFAULT_SCRIPT="'"$PREFIX"/share/udhcpc/default.script'"|' + -i .config +- sed -e 's|.*IFUPDOWN_IFSTATE_PATH.*|CONFIG_IFUPDOWN_IFSTATE_PATH="/run/ifstate"|' + -i .config +- '[ "$PREFIX" = /usr ] || sed -e ''s/.*INSTALL_NO_USR.*/CONFIG_INSTALL_NO_USR=y/'' + -i .config' +- sed -e 's/CONFIG_INETD=y.*/# CONFIG_INETD is not set/' -i .config +- sed -e 's/CONFIG_PATCH=y.*/# CONFIG_PATCH is not set/' -i .config +- sed -e 's/CONFIG_DEPMOD=y.*/# CONFIG_DEPMOD is not set/' -i .config +- sed -e 's/CONFIG_INSMOD=y.*/# CONFIG_INSMOD is not set/' -i .config +- sed -e 's/CONFIG_MODPROBE=y.*/# CONFIG_MODPROBE is not set/' -i .config +- sed -e 's/CONFIG_MODPROBE_SMALL=y.*/# CONFIG_MODPROBE_SMALL is not set/' -i .config +- sed -e 's/CONFIG_LSMOD=y.*/# CONFIG_LSMOD is not set/' -i .config +- sed -e 's/CONFIG_RMMOD=y.*/# CONFIG_RMMOD is not set/' -i .config +- sed -e 's/CONFIG_FEATURE_MOUNT_CIFS=y.*/# CONFIG_FEATURE_MOUNT_CIFS is not set/' + -i .config +- sed -e 's/CONFIG_FEATURE_EXTRA_QUIET=y.*/# CONFIG_FEATURE_EXTRA_QUIET is not set/' + -i .config +- sed -e 's/CONFIG_FEATURE_INIT_COREDUMPS=y.*/# CONFIG_FEATURE_INIT_COREDUMPS is not + set/' -i .config +- sed -e 's/CONFIG_FEATURE_INIT_SCTTY=y.*/# CONFIG_FEATURE_INIT_SCTTY is not set/' + -i .config +- sed -e 's/CONFIG_FEATURE_INIT_SYSLOG=y.*/# CONFIG_FEATURE_INIT_SYSLOG is not set/' + -i .config +- sed -e 's/CONFIG_FEATURE_INITRD=y.*/# CONFIG_FEATURE_INITRD is not set/' -i .config +- sed -e 's/CONFIG_FEATURE_MINIX2=y.*/# CONFIG_FEATURE_MINIX2 is not set/' -i .config +- sed -e 's/CONFIG_FSCK_MINIX=y.*/# CONFIG_FSCK_MINIX is not set/' -i .config +- sed -e 's/CONFIG_LOSETUP=y.*/# CONFIG_LOSETUP is not set/' -i .config +- sed -e 's/CONFIG_LSUSB=y.*/# CONFIG_LSUSB is not set/' -i .config +- sed -e 's/CONFIG_LZMA=y.*/# CONFIG_LZMA is not set/' -i .config +- sed -e 's/CONFIG_MKFS_EXT2=y.*/# CONFIG_MKFS_EXT2 is not set/' -i .config +- sed -e 's/CONFIG_MKFS_MINIX=y.*/# CONFIG_MKFS_MINIX is not set/' -i .config +- sed -e 's/CONFIG_STRINGS=y.*/# CONFIG_STRINGS is not set/' -i .config +- sed -e 's/CONFIG_UNLZMA=y.*/# CONFIG_UNLZMA is not set/' -i .config +- sed -e 's/CONFIG_UNXZ=y.*/# CONFIG_UNXZ is not set/' -i .config +- sed -e 's/CONFIG_XZ=y.*/# CONFIG_XZ is not set/' -i .config +build-commands: +- make +- | + for fin in systemd-units/*.in + do + f=$(echo "$fin" | sed 's/\.in$//') + sed -e 's|@rootprefix@||g' "$fin" >"$f"; + done +install-commands: +- | + if [ "$PREFIX" = /usr ]; then PREFIX=; fi && + make CONFIG_PREFIX="$DESTDIR$PREFIX" install && + chmod 6755 "$DESTDIR$PREFIX"/bin/busybox +- mkdir -p "$DESTDIR/var/spool/cron/crontabs" +- mkdir -p "$DESTDIR/lib/systemd/system/multi-user.target.wants" +- | + for f in systemd-units/*.service; do + install -m 644 "$f" "$DESTDIR/lib/systemd/system"; + done +- | + for f in $(cd systemd-units; ls *.service | grep -v -F "@"); do + ln -s "../$f" "$DESTDIR/lib/systemd/system/multi-user.target.wants/"; + done +- mkdir -p "$DESTDIR/lib/udev/rules.d" +- for f in udev-rules/100-baserock.rules; do install -m 644 "$f" "$DESTDIR/lib/udev/rules.d"; + done +- mkdir -p "$DESTDIR$PREFIX"/share/udhcpc +- cp examples/udhcp/simple.script "$DESTDIR$PREFIX"/share/udhcpc/default.script +- install scripts/run-ntpd-with-config "$DESTDIR$PREFIX"/sbin/. +- install -d "$DESTDIR/etc" +- | + cat << EOF > "$DESTDIR/etc/ntpd.conf" + server 0.pool.ntp.org + server 1.pool.ntp.org + server 2.pool.ntp.org + server 3.pool.ntp.org + EOF +- | + cat << EOF > "$DESTDIR/etc/profile" + # Set default pager to less + export MANPAGER='less -R' + EOF +- | + cat << EOF > "$DESTDIR/etc/man.conf" + # This file is used by man to provide a manpath for those without one by + # examining their PATH environment variable. + # + # Lines beginning with `#' are comments and are ignored. Any combination of + # tabs or spaces may be used as `whitespace' separators. + + MANDATORY_MANPATH /usr/man + MANDATORY_MANPATH /usr/share/man + MANDATORY_MANPATH /usr/local/share/man + EOF +build_depends: +- build-essential/stage2-binutils.morph +- build-essential/stage2-busybox.morph +- build-essential/stage2-eglibc.morph +- build-essential/stage2-fhs-dirs.morph +- build-essential/stage2-gawk.morph +- build-essential/stage2-gcc.morph +- build-essential/stage2-linux-api-headers.morph +- build-essential/stage2-make.morph +- build-essential/stage2-reset-specs.morph +- build-essential/eglibc.morph diff --git a/build-essential/ccache.morph b/build-essential/ccache.morph new file mode 100644 index 00000000..9ffb4b65 --- /dev/null +++ b/build-essential/ccache.morph @@ -0,0 +1,26 @@ +name: build-essential/ccache.morph +kind: chunk +repo: upstream:ccache +ref: 567631456f0899cdf0c382f898d38aadc8901d32 +build-system: autotools +configure-commands: +- ./configure --prefix="$PREFIX" +install-commands: +- make DESTDIR="$DESTDIR" install +- mkdir -p "$DESTDIR/$PREFIX/lib/ccache" +- for cc in gcc cc g++ c++; do ln -sf "$PREFIX/bin/ccache" "$DESTDIR/$PREFIX/lib/ccache/$cc"; + done +- for cc in gcc cc g++ c++; do ln -sf "$PREFIX/bin/ccache" "$DESTDIR/$PREFIX/lib/ccache/$TARGET-$cc"; + done +build_depends: +- build-essential/stage2-binutils.morph +- build-essential/stage2-busybox.morph +- build-essential/stage2-eglibc.morph +- build-essential/stage2-fhs-dirs.morph +- build-essential/stage2-gawk.morph +- build-essential/stage2-gcc.morph +- build-essential/stage2-linux-api-headers.morph +- build-essential/stage2-make.morph +- build-essential/stage2-reset-specs.morph +- build-essential/eglibc.morph +- build-essential/zlib.morph diff --git a/build-essential/eglibc.morph b/build-essential/eglibc.morph new file mode 100644 index 00000000..ba9785b5 --- /dev/null +++ b/build-essential/eglibc.morph @@ -0,0 +1,34 @@ +name: build-essential/eglibc.morph +kind: chunk +repo: upstream:eglibc2 +ref: 43ee5d250ad47d2bee8ec17954efb7f22d2b804c +configure-commands: +- mkdir o +- cd libc && ln -s ../ports ports +- | + export CFLAGS="-O2 $CFLAGS"; cd o && + ../libc/configure \ + $(../morph-arch-config) \ + --prefix="$PREFIX" \ + --disable-profile \ + --enable-kernel=2.6.25 \ + --enable-add-ons=nptl,ports \ + --without-cvs \ + --without-selinux +build-commands: +- cd o && make localtime=UTC +install-commands: +- cd o && make install_root="$DESTDIR" localtime=UTC install +- mkdir -p "$DESTDIR/etc" +- install -m 644 -o root -g root nsswitch.conf "$DESTDIR/etc/nsswitch.conf" +build_depends: +- build-essential/stage2-binutils.morph +- build-essential/stage2-busybox.morph +- build-essential/stage2-eglibc.morph +- build-essential/stage2-fhs-dirs.morph +- build-essential/stage2-gawk.morph +- build-essential/stage2-gcc.morph +- build-essential/stage2-linux-api-headers.morph +- build-essential/stage2-make.morph +- build-essential/stage2-reset-specs.morph +- build-essential/linux-api-headers.morph diff --git a/build-essential/fhs-dirs.morph b/build-essential/fhs-dirs.morph new file mode 100644 index 00000000..0658d012 --- /dev/null +++ b/build-essential/fhs-dirs.morph @@ -0,0 +1,62 @@ +name: build-essential/fhs-dirs.morph +kind: chunk +repo: baserock:baserock/fhs-dirs +ref: 442e2a6453ec380bf9d64f6be50e57d54ddf93d3 +install-commands: +- sh ./create-fhs-dirs "$DESTDIR" +- install -m 644 passwd "$DESTDIR/etc/passwd" +- install -m 600 shadow "$DESTDIR/etc/shadow" +- install -m 644 interfaces "$DESTDIR/etc/network/interfaces" +- install -m 644 group "$DESTDIR/etc/group" +- install -m 644 ld.so.conf "$DESTDIR/etc/ld.so.conf" +- install -m 644 issue "$DESTDIR/etc/issue" +- install -m 644 services "$DESTDIR/etc/services" +- install -m 644 protocols "$DESTDIR/etc/protocols" +- echo baserock > "$DESTDIR"/etc/hostname +build_depends: +- build-essential/stage2-binutils.morph +- build-essential/stage2-busybox.morph +- build-essential/stage2-eglibc.morph +- build-essential/stage2-fhs-dirs.morph +- build-essential/stage2-gawk.morph +- build-essential/stage2-gcc.morph +- build-essential/stage2-linux-api-headers.morph +- build-essential/stage2-make.morph +- build-essential/stage2-reset-specs.morph +decription: create the FHS 2.3 directory hierarchy and the usual files +devices: +- type: c + filename: /dev/console + gid: 0 + major: 5 + minor: 1 + permissions: '0600' + uid: 0 +- type: c + filename: /dev/full + gid: 0 + major: 1 + minor: 7 + permissions: '0666' + uid: 0 +- type: c + filename: /dev/null + gid: 0 + major: 1 + minor: 3 + permissions: '0666' + uid: 0 +- type: c + filename: /dev/urandom + gid: 0 + major: 1 + minor: 9 + permissions: '0666' + uid: 0 +- type: c + filename: /dev/zero + gid: 0 + major: 1 + minor: 5 + permissions: '0666' + uid: 0 diff --git a/build-essential/gawk.morph b/build-essential/gawk.morph new file mode 100644 index 00000000..cbcaf716 --- /dev/null +++ b/build-essential/gawk.morph @@ -0,0 +1,18 @@ +name: build-essential/gawk.morph +kind: chunk +repo: upstream:gawk +ref: 6a0eb04c3d2ac24d80d505b42a8f67799487d133 +build-system: autotools +configure-commands: +- ./configure --prefix="$PREFIX" --disable-nls +build_depends: +- build-essential/stage2-binutils.morph +- build-essential/stage2-busybox.morph +- build-essential/stage2-eglibc.morph +- build-essential/stage2-fhs-dirs.morph +- build-essential/stage2-gawk.morph +- build-essential/stage2-gcc.morph +- build-essential/stage2-linux-api-headers.morph +- build-essential/stage2-make.morph +- build-essential/stage2-reset-specs.morph +- build-essential/eglibc.morph diff --git a/build-essential/gcc.morph b/build-essential/gcc.morph new file mode 100644 index 00000000..e264da78 --- /dev/null +++ b/build-essential/gcc.morph @@ -0,0 +1,42 @@ +name: build-essential/gcc.morph +kind: chunk +repo: upstream:gcc-tarball +ref: dd78b627480ed8d3c135271cd627096ae76fa5fc +configure-commands: +- mkdir o +- | + cd o && \ + ../configure \ + $(../morph-arch-config) \ + --prefix="$PREFIX" \ + `# [1]` --libdir=$PREFIX/lib \ + --disable-nls \ + --enable-languages=c,c++,fortran \ + --enable-shared --enable-threads=posix \ + `# [2]` --disable-multilib \ + `# [3]` --disable-libgomp --without-cloog --without-ppl \ + `# [4]` --enable-__cxa_atexit \ + `# [5]` --with-mpfr-include="$(pwd)/../mpfr/src" \ + --with-mpfr-lib="$(pwd)/mpfr/src/.libs" \ + `# [6]` --with-system-zlib +build-commands: +- cd o && make +install-commands: +- cd o && make DESTDIR="$DESTDIR" install +- ln -s gcc "$DESTDIR/$PREFIX/bin/cc" +- | + for fortran_alias in f77 f90 f95; do + ln -s gfortran "$DESTDIR/$PREFIX/bin/$fortran_alias" + done +build_depends: +- build-essential/stage2-binutils.morph +- build-essential/stage2-busybox.morph +- build-essential/stage2-eglibc.morph +- build-essential/stage2-fhs-dirs.morph +- build-essential/stage2-gawk.morph +- build-essential/stage2-gcc.morph +- build-essential/stage2-linux-api-headers.morph +- build-essential/stage2-make.morph +- build-essential/stage2-reset-specs.morph +- build-essential/eglibc.morph +- build-essential/zlib.morph diff --git a/build-essential/linux-api-headers.morph b/build-essential/linux-api-headers.morph new file mode 100644 index 00000000..11aa8092 --- /dev/null +++ b/build-essential/linux-api-headers.morph @@ -0,0 +1,19 @@ +name: build-essential/linux-api-headers.morph +kind: chunk +repo: upstream:linux +ref: eff825d6e284eb0fb04b434429a3e3b2e10cabf8 +install-commands: +- make mrproper +- ARCH=$(./morph-arch) make INSTALL_HDR_PATH=dest headers_install +- install -d "$DESTDIR${PREFIX-/usr}/include" +- cp -r dest/include/* "$DESTDIR/${PREFIX-/usr}/include" +build_depends: +- build-essential/stage2-binutils.morph +- build-essential/stage2-busybox.morph +- build-essential/stage2-eglibc.morph +- build-essential/stage2-fhs-dirs.morph +- build-essential/stage2-gawk.morph +- build-essential/stage2-gcc.morph +- build-essential/stage2-linux-api-headers.morph +- build-essential/stage2-make.morph +- build-essential/stage2-reset-specs.morph diff --git a/build-essential/make.morph b/build-essential/make.morph new file mode 100644 index 00000000..badaf057 --- /dev/null +++ b/build-essential/make.morph @@ -0,0 +1,18 @@ +name: build-essential/make.morph +kind: chunk +repo: upstream:make +ref: 56968f58301e6e5157cf4c8b6deefbaff2955eba +build-system: autotools +configure-commands: +- ./configure --prefix="$PREFIX" --disable-nls +build_depends: +- build-essential/stage2-binutils.morph +- build-essential/stage2-busybox.morph +- build-essential/stage2-eglibc.morph +- build-essential/stage2-fhs-dirs.morph +- build-essential/stage2-gawk.morph +- build-essential/stage2-gcc.morph +- build-essential/stage2-linux-api-headers.morph +- build-essential/stage2-make.morph +- build-essential/stage2-reset-specs.morph +- build-essential/eglibc.morph diff --git a/build-essential/stage1-binutils.morph b/build-essential/stage1-binutils.morph new file mode 100644 index 00000000..622543db --- /dev/null +++ b/build-essential/stage1-binutils.morph @@ -0,0 +1,12 @@ +name: build-essential/stage1-binutils.morph +kind: chunk +repo: upstream:binutils-redhat +ref: 987eb543a034cddc4eeb103f08f566f24a5f964a +build-system: autotools +configure-commands: +- | + ./configure --prefix="$PREFIX" --disable-nls --disable-werror \ + --build=$(sh config.guess) \ + --host=$(sh config.guess) \ + --target=$TARGET_STAGE1 \ + --with-sysroot="/" --with-lib-path="=$PREFIX/lib" diff --git a/build-essential/stage1-gcc.morph b/build-essential/stage1-gcc.morph new file mode 100644 index 00000000..b0127f3c --- /dev/null +++ b/build-essential/stage1-gcc.morph @@ -0,0 +1,34 @@ +name: build-essential/stage1-gcc.morph +kind: chunk +repo: upstream:gcc-tarball +ref: dd78b627480ed8d3c135271cd627096ae76fa5fc +configure-commands: +- mkdir o +- | + cd o && + ../configure \ + $(../morph-arch-config) \ + --build=$(sh ../config.guess) --host=$(sh ../config.guess) \ + --target=$TARGET_STAGE1 \ + --prefix="$PREFIX" \ + --disable-bootstrap --disable-nls \ + `# [1]` --libdir="$PREFIX/lib" --disable-multilib --disable-libgomp \ + --without-cloog --without-ppl \ + --with-mpfr-include="$(pwd)/../mpfr/src" \ + --with-mpfr-lib="$(pwd)/mpfr/src/.libs" \ + `# [2]` --with-local-prefix="$PREFIX" \ + `# [3]` --with-native-system-header-dir="$PREFIX/include" \ + `# [4]` --enable-languages=c --disable-decimal-float \ + --disable-libmudflap --disable-libquadmath --disable-libssp \ + --disable-shared --disable-threads --disable-target-libiberty \ + --disable-target-zlib --without-headers --with-newlib \ + --with-system-zlib +build-commands: +- cd o && make +install-commands: +- cd o && make DESTDIR="$DESTDIR" install +- | + libgcc_filename=$($DESTDIR$PREFIX/bin/$TARGET_STAGE1-gcc -print-libgcc-file-name) + ln -sv libgcc.a $(echo $libgcc_filename | sed 's/libgcc/&_eh/') +build_depends: +- build-essential/stage1-binutils.morph diff --git a/build-essential/stage2-binutils.morph b/build-essential/stage2-binutils.morph new file mode 100644 index 00000000..b76b82e9 --- /dev/null +++ b/build-essential/stage2-binutils.morph @@ -0,0 +1,25 @@ +name: build-essential/stage2-binutils.morph +kind: chunk +repo: upstream:binutils-redhat +ref: 987eb543a034cddc4eeb103f08f566f24a5f964a +build-system: autotools +configure-commands: +- | + export STAGE2_SYSROOT="$(dirname $(pwd))" + export CPPFLAGS="--sysroot=$STAGE2_SYSROOT" + export CXX=false + export LDFLAGS="-Wl,--sysroot=$STAGE2_SYSROOT" + ./configure --prefix="$PREFIX" --disable-nls --disable-werror \ + --build=$(sh config.guess) \ + --host=$TARGET_STAGE1 \ + --target=$TARGET_STAGE1 +build-commands: +- | + export STAGE2_SYSROOT="$(dirname $(pwd))" + export CPPFLAGS="--sysroot=$STAGE2_SYSROOT" + export LDFLAGS="-Wl,--sysroot=$STAGE2_SYSROOT" + make +build_depends: +- build-essential/stage1-binutils.morph +- build-essential/stage1-gcc.morph +- build-essential/stage2-eglibc.morph diff --git a/build-essential/stage2-busybox.morph b/build-essential/stage2-busybox.morph new file mode 100644 index 00000000..52621bb7 --- /dev/null +++ b/build-essential/stage2-busybox.morph @@ -0,0 +1,63 @@ +name: build-essential/stage2-busybox.morph +kind: chunk +repo: upstream:busybox +ref: eeb9014f28e3aa00673a0fad127e7420da4392db +configure-commands: +- make HOSTCC="/usr/bin/gcc" CROSS_COMPILE=$TARGET_STAGE1- defconfig +- '[ "$PREFIX" = /usr ] || sed -e ''s/.*INSTALL_NO_USR.*/CONFIG_INSTALL_NO_USR=y/'' + -i .config' +- sed -e 's/CONFIG_AWK=y.*/# CONFIG_AWK is not set/' -i .config +- sed -e 's/CONFIG_INETD=y.*/# CONFIG_INETD is not set/' -i .config +- sed -e 's/CONFIG_PATCH=y.*/# CONFIG_PATCH is not set/' -i .config +- sed -e 's/CONFIG_DEPMOD=y.*/# CONFIG_DEPMOD is not set/' -i .config +- sed -e 's/CONFIG_INSMOD=y.*/# CONFIG_INSMOD is not set/' -i .config +- sed -e 's/CONFIG_MODPROBE=y.*/# CONFIG_MODPROBE is not set/' -i .config +- sed -e 's/CONFIG_MODPROBE_SMALL=y.*/# CONFIG_MODPROBE_SMALL is not set/' -i .config +- sed -e 's/CONFIG_LSMOD=y.*/# CONFIG_LSMOD is not set/' -i .config +- sed -e 's/CONFIG_RMMOD=y.*/# CONFIG_RMMOD is not set/' -i .config +- sed -e 's/CONFIG_FEATURE_MOUNT_CIFS=y.*/# CONFIG_FEATURE_MOUNT_CIFS is not set/' + -i .config +- sed -e 's/CONFIG_FEATURE_EXTRA_QUIET=y.*/# CONFIG_FEATURE_EXTRA_QUIET is not set/' + -i .config +- sed -e 's/CONFIG_FEATURE_INIT_COREDUMPS=y.*/# CONFIG_FEATURE_INIT_COREDUMPS is not + set/' -i .config +- sed -e 's/CONFIG_FEATURE_INIT_SCTTY=y.*/# CONFIG_FEATURE_INIT_SCTTY is not set/' + -i .config +- sed -e 's/CONFIG_FEATURE_INIT_SYSLOG=y.*/# CONFIG_FEATURE_INIT_SYSLOG is not set/' + -i .config +- sed -e 's/CONFIG_FEATURE_INITRD=y.*/# CONFIG_FEATURE_INITRD is not set/' -i .config +- sed -e 's/CONFIG_FEATURE_USE_INITTAB=y.*/# CONFIG_FEATURE_USE_INITTAB is not set/' + -i .config +- sed -e 's/CONFIG_FEATURE_MINIX2=y.*/# CONFIG_FEATURE_MINIX2 is not set/' -i .config +- sed -e 's/CONFIG_FSCK_MINIX=y.*/# CONFIG_FSCK_MINIX is not set/' -i .config +- sed -e 's/CONFIG_HALT=y.*/# CONFIG_HALT is not set/' -i .config +- sed -e 's/CONFIG_INIT=y.*/# CONFIG_INIT is not set/' -i .config +- sed -e 's/CONFIG_INIT_TERMINAL_TYPE=y.*/CONFIG_INIT_TERMINAL_TYPE=""/' -i .config +- sed -e 's/CONFIG_LOSETUP=y.*/# CONFIG_LOSETUP is not set/' -i .config +- sed -e 's/CONFIG_LSUSB=y.*/# CONFIG_LSUSB is not set/' -i .config +- sed -e 's/CONFIG_LZMA=y.*/# CONFIG_LZMA is not set/' -i .config +- sed -e 's/CONFIG_MKFS_EXT2=y.*/# CONFIG_MKFS_EXT2 is not set/' -i .config +- sed -e 's/CONFIG_MKFS_MINIX=y.*/# CONFIG_MKFS_MINIX is not set/' -i .config +- sed -e 's/CONFIG_RUNLEVEL=y.*/# CONFIG_RUNLEVEL is not set/' -i .config +- sed -e 's/CONFIG_STRINGS=y.*/# CONFIG_STRINGS is not set/' -i .config +- sed -e 's/CONFIG_UNLZMA=y.*/# CONFIG_UNLZMA is not set/' -i .config +- sed -e 's/CONFIG_UNXZ=y.*/# CONFIG_UNXZ is not set/' -i .config +- sed -e 's/CONFIG_XZ=y.*/# CONFIG_XZ is not set/' -i .config +build-commands: +- | + export STAGE2_SYSROOT="$(dirname $(pwd))" + export CPPFLAGS="--sysroot=$STAGE2_SYSROOT" + export LDFLAGS="-Wl,--sysroot=$STAGE2_SYSROOT" + make HOSTCC="/usr/bin/gcc" CROSS_COMPILE=$TARGET_STAGE1- +install-commands: +- | + export STAGE2_SYSROOT="$(dirname $(pwd))" + export CPPFLAGS="--sysroot=$STAGE2_SYSROOT" + export LDFLAGS="-Wl,--sysroot=$STAGE2_SYSROOT" + make CONFIG_PREFIX="$DESTDIR$PREFIX" \ + HOSTCC="/usr/bin/gcc" CROSS_COMPILE=$TARGET_STAGE1- install && + chmod 6755 "$DESTDIR$PREFIX"/bin/busybox +build_depends: +- build-essential/stage1-binutils.morph +- build-essential/stage1-gcc.morph +- build-essential/stage2-eglibc.morph diff --git a/build-essential/stage2-eglibc.morph b/build-essential/stage2-eglibc.morph new file mode 100644 index 00000000..7fe3b626 --- /dev/null +++ b/build-essential/stage2-eglibc.morph @@ -0,0 +1,44 @@ +name: build-essential/stage2-eglibc.morph +kind: chunk +repo: upstream:eglibc2 +ref: 43ee5d250ad47d2bee8ec17954efb7f22d2b804c +configure-commands: +- mkdir o +- cd libc && ln -s ../ports ports +- | + export CFLAGS="-O2 $CFLAGS"; export CXX=false; \ + cd o && ../libc/configure \ + $(../morph-arch-config) \ + --build=$(../libc/scripts/config.guess) --host=$TARGET_STAGE1 \ + --prefix="$PREFIX" \ + `# [1]` --libdir="$PREFIX/lib" \ + `# [2]` --with-headers="$(pwd)/../../$PREFIX/include" \ + `# [3]` --disable-profile --enable-kernel=2.6.25 \ + --enable-add-ons=nptl,ports --without-cvs --without-selinux \ + `# [4]` libc_cv_c_cleanup=yes libc_cv_ctors_header=yes \ + libc_cv_forced_unwind=yes libc_cv_ssp=no +build-commands: +- cd o && make localtime=UTC +install-commands: +- cd o && make install_root="$DESTDIR" localtime=UTC install +- sh stage2-eglibc-fix-specs +- install -d $DESTDIR/lib +- | + cpu=$(echo $TARGET | cut -d '-' -f 1) + case "$cpu" in + x86_64) + install -d "$DESTDIR/lib64" + ln -s "$PREFIX/lib/ld-linux-x86-64.so.2" \ + "$DESTDIR/lib64/ld-linux-x86-64.so.2" ;; + ppc64) + install -d "$DESTDIR/lib64" + ln -s "$PREFIX/lib/ld64.so.1" \ + "$DESTDIR/lib64/ld64.so.1" ;; + *) + loader=$(basename $(ls "$DESTDIR$PREFIX"/lib/ld-linux*)) + ln -s "$PREFIX/lib/$loader" "$DESTDIR/lib/$loader" + esac +build_depends: +- build-essential/stage1-binutils.morph +- build-essential/stage1-gcc.morph +- build-essential/stage2-linux-api-headers.morph diff --git a/build-essential/stage2-fhs-dirs.morph b/build-essential/stage2-fhs-dirs.morph new file mode 100644 index 00000000..c8eb9039 --- /dev/null +++ b/build-essential/stage2-fhs-dirs.morph @@ -0,0 +1,54 @@ +name: build-essential/stage2-fhs-dirs.morph +kind: chunk +repo: baserock:baserock/fhs-dirs +ref: 442e2a6453ec380bf9d64f6be50e57d54ddf93d3 +install-commands: +- sh ./create-fhs-dirs "$DESTDIR" +- rmdir "$DESTDIR/bin" +- ln -s "$PREFIX/bin" "$DESTDIR/bin" +- install -m 644 passwd "$DESTDIR/etc/passwd" +- install -m 600 shadow "$DESTDIR/etc/shadow" +- install -m 644 interfaces "$DESTDIR/etc/network/interfaces" +- install -m 644 group "$DESTDIR/etc/group" +- install -m 644 ld.so.conf "$DESTDIR/etc/ld.so.conf" +- install -m 644 issue "$DESTDIR/etc/issue" +- install -m 644 services "$DESTDIR/etc/services" +- install -m 644 protocols "$DESTDIR/etc/protocols" +- echo baserock > "$DESTDIR"/etc/hostname +decription: create the FHS 2.3 directory hierarchy and the usual files +devices: +- type: c + filename: /dev/console + gid: 0 + major: 5 + minor: 1 + permissions: '0600' + uid: 0 +- type: c + filename: /dev/full + gid: 0 + major: 1 + minor: 7 + permissions: '0666' + uid: 0 +- type: c + filename: /dev/null + gid: 0 + major: 1 + minor: 3 + permissions: '0666' + uid: 0 +- type: c + filename: /dev/urandom + gid: 0 + major: 1 + minor: 9 + permissions: '0666' + uid: 0 +- type: c + filename: /dev/zero + gid: 0 + major: 1 + minor: 5 + permissions: '0666' + uid: 0 diff --git a/build-essential/stage2-gawk.morph b/build-essential/stage2-gawk.morph new file mode 100644 index 00000000..4e40a81c --- /dev/null +++ b/build-essential/stage2-gawk.morph @@ -0,0 +1,15 @@ +name: build-essential/stage2-gawk.morph +kind: chunk +repo: upstream:gawk +ref: 6a0eb04c3d2ac24d80d505b42a8f67799487d133 +build-system: autotools +configure-commands: +- STAGE2_SYSROOT="$(dirname $(pwd))" CPPFLAGS="--sysroot=$STAGE2_SYSROOT" CXX=false + LDFLAGS="-Wl,--sysroot=$STAGE2_SYSROOT" ./configure --prefix="$PREFIX" --disable-nls + --build=$(sh config.guess) --host=$TARGET_STAGE1 +build-commands: +- STAGE2_SYSROOT="$(dirname $(pwd))" make +build_depends: +- build-essential/stage1-binutils.morph +- build-essential/stage1-gcc.morph +- build-essential/stage2-eglibc.morph diff --git a/build-essential/stage2-gcc-fixed-headers.morph b/build-essential/stage2-gcc-fixed-headers.morph new file mode 100644 index 00000000..72342d92 --- /dev/null +++ b/build-essential/stage2-gcc-fixed-headers.morph @@ -0,0 +1,16 @@ +name: build-essential/stage2-gcc-fixed-headers.morph +kind: chunk +repo: upstream:gcc-tarball +ref: dd78b627480ed8d3c135271cd627096ae76fa5fc +install-commands: +- | + libgcc_dir=$(dirname $($TARGET_STAGE1-gcc -print-libgcc-file-name)) + sysroot="$(dirname "$(pwd)")" + target_libgcc_dir="${libgcc_dir#$sysroot}" + mkdir -p "$DESTDIR/$target_libgcc_dir/include-fixed" + cat "gcc/limitx.h" "gcc/glimits.h" "gcc/limity.h" \ + >"$DESTDIR/$target_libgcc_dir/include-fixed/limits.h" +build_depends: +- build-essential/stage1-binutils.morph +- build-essential/stage1-gcc.morph +- build-essential/stage2-eglibc.morph diff --git a/build-essential/stage2-gcc.morph b/build-essential/stage2-gcc.morph new file mode 100644 index 00000000..e5ba5496 --- /dev/null +++ b/build-essential/stage2-gcc.morph @@ -0,0 +1,47 @@ +name: build-essential/stage2-gcc.morph +kind: chunk +repo: upstream:gcc-tarball +ref: dd78b627480ed8d3c135271cd627096ae76fa5fc +configure-commands: +- mkdir o +- | + export STAGE2_SYSROOT="$(dirname $(pwd))" + export CC="$TARGET_STAGE1-gcc --sysroot=$STAGE2_SYSROOT" + export LDFLAGS="-Wl,--sysroot=$STAGE2_SYSROOT" + cd o && ../configure \ + $(../morph-arch-config) \ + `# [1]` --build=$(sh ../config.guess) \ + --host=$TARGET_STAGE1 \ + --target=$TARGET_STAGE1 \ + --prefix="$PREFIX" \ + `# [2]` --with-local-prefix=$PREFIX \ + `# [3]` --with-build-sysroot="$STAGE2_SYSROOT" \ + --disable-bootstrap \ + --enable-clocale=gnu --enable-shared --enable-threads=posix \ + `# [4]` --enable-languages=c \ + `# [5]` --libdir=$PREFIX/lib \ + --disable-libgomp --disable-multilib --disable-nls \ + --without-cloog --without-ppl \ + --with-mpfr-include="$(pwd)/../mpfr/src" \ + --with-mpfr-lib="$(pwd)/mpfr/src/.libs" +build-commands: +- | + export STAGE2_SYSROOT="$(dirname $(pwd))" + cd o && make +install-commands: +- cd o && make DESTDIR="$DESTDIR" install +- | + if [ "$(echo $TARGET | cut -c -6)" = "x86_64" ]; then + libdir=lib64 + else + libdir=lib + fi + + install -d "$DESTDIR/lib" + ln -s "$PREFIX/$libdir/libgcc_s.so" "$DESTDIR/lib/" + ln -s "$PREFIX/$libdir/libgcc_s.so.1" "$DESTDIR/lib/" +build_depends: +- build-essential/stage1-binutils.morph +- build-essential/stage1-gcc.morph +- build-essential/stage2-eglibc.morph +- build-essential/stage2-gcc-fixed-headers.morph diff --git a/build-essential/stage2-linux-api-headers.morph b/build-essential/stage2-linux-api-headers.morph new file mode 100644 index 00000000..182bebac --- /dev/null +++ b/build-essential/stage2-linux-api-headers.morph @@ -0,0 +1,14 @@ +name: build-essential/stage2-linux-api-headers.morph +kind: chunk +repo: upstream:linux +ref: eff825d6e284eb0fb04b434429a3e3b2e10cabf8 +install-commands: +- make mrproper +- | + export ARCH=$(./morph-arch) + make INSTALL_HDR_PATH=dest headers_install +- install -d "$DESTDIR${PREFIX-/usr}/include" +- cp -r dest/include/* "$DESTDIR/${PREFIX-/usr}/include" +build_depends: +- build-essential/stage1-binutils.morph +- build-essential/stage1-gcc.morph diff --git a/build-essential/stage2-make.morph b/build-essential/stage2-make.morph new file mode 100644 index 00000000..ed2b9746 --- /dev/null +++ b/build-essential/stage2-make.morph @@ -0,0 +1,15 @@ +name: build-essential/stage2-make.morph +kind: chunk +repo: upstream:make +ref: 56968f58301e6e5157cf4c8b6deefbaff2955eba +build-system: autotools +configure-commands: +- STAGE2_SYSROOT="$(dirname $(pwd))" CPPFLAGS="--sysroot=$STAGE2_SYSROOT" CXX=false + LDFLAGS="-Wl,--sysroot=$STAGE2_SYSROOT" ./configure --prefix="$PREFIX" --disable-nls + --build=$(sh config/config.guess) --host=$TARGET_STAGE1 +build-commands: +- STAGE2_SYSROOT="$(dirname $(pwd))" make +build_depends: +- build-essential/stage1-binutils.morph +- build-essential/stage1-gcc.morph +- build-essential/stage2-eglibc.morph diff --git a/build-essential/stage2-reset-specs.morph b/build-essential/stage2-reset-specs.morph new file mode 100644 index 00000000..5fb6cfb1 --- /dev/null +++ b/build-essential/stage2-reset-specs.morph @@ -0,0 +1,16 @@ +name: build-essential/stage2-reset-specs.morph +kind: chunk +repo: upstream:eglibc2 +ref: 43ee5d250ad47d2bee8ec17954efb7f22d2b804c +install-commands: +- | + STAGE2_SYSROOT="$(dirname "$(pwd)")" + specs_dir="$(dirname $($TARGET_STAGE1-gcc -print-libgcc-file-name))" + target_specs_dir="$DESTDIR/${specs_dir#$STAGE2_SYSROOT}" + mkdir -p "$target_specs_dir" + ln -s "temporary specs removed by baserock bootstrap" "$target_specs_dir/specs" +build_depends: +- build-essential/stage1-binutils.morph +- build-essential/stage1-gcc.morph +- build-essential/stage2-linux-api-headers.morph +- build-essential/stage2-eglibc.morph diff --git a/build-essential/zlib.morph b/build-essential/zlib.morph new file mode 100644 index 00000000..359692f1 --- /dev/null +++ b/build-essential/zlib.morph @@ -0,0 +1,22 @@ +name: build-essential/zlib.morph +kind: chunk +repo: upstream:zlib +ref: db3aed6856d7a23186844fdf93105cad2fcf2f2f +max-jobs: '1' +configure-commands: +- ./configure --prefix="$PREFIX" +build-commands: +- make +install-commands: +- make DESTDIR="$DESTDIR" install +build_depends: +- build-essential/stage2-binutils.morph +- build-essential/stage2-busybox.morph +- build-essential/stage2-eglibc.morph +- build-essential/stage2-fhs-dirs.morph +- build-essential/stage2-gawk.morph +- build-essential/stage2-gcc.morph +- build-essential/stage2-linux-api-headers.morph +- build-essential/stage2-make.morph +- build-essential/stage2-reset-specs.morph +- build-essential/eglibc.morph |