From ddca240b1f6b89294d67f1129d33f1cb9e57977e Mon Sep 17 00:00:00 2001 From: George Boudreau Date: Fri, 16 Feb 2007 21:34:04 +0000 Subject: [PATCH] Added CLFS-Embedded custom files examples (from ch.12 Beyond CLFS-Embedded) --- CLFS2/master.sh | 2 +- custom/examples_CLFS-E/950-dropbear | 49 +++++++++++++++++++++++++++++ custom/examples_CLFS-E/960-iptables | 42 +++++++++++++++++++++++++ 3 files changed, 92 insertions(+), 1 deletion(-) create mode 100644 custom/examples_CLFS-E/950-dropbear create mode 100644 custom/examples_CLFS-E/960-iptables diff --git a/CLFS2/master.sh b/CLFS2/master.sh index 3410148..7295ee2 100644 --- a/CLFS2/master.sh +++ b/CLFS2/master.sh @@ -461,7 +461,7 @@ mk_BLFS_TOOL: mk_CUSTOM_TOOLS fi; @touch \$@ -mk_ROOT: mk_BLFS_TOOL +mk_ROOT: create-sbu_du-report @\$(call echo_SU_request) @echo "$VERSION-sysroot - jhalfs build" > clfs-release && \\ sudo mv clfs-release \$(MOUNT_PT)/etc diff --git a/custom/examples_CLFS-E/950-dropbear b/custom/examples_CLFS-E/950-dropbear new file mode 100644 index 0000000..be33f5b --- /dev/null +++ b/custom/examples_CLFS-E/950-dropbear @@ -0,0 +1,49 @@ +# +# $Id$ +# +# Code taken from CLFS-Embedded +# Chapter 12 Beyond CLFS Embedded +# +# Dropbear is a relatively small SSH 2 server and client. +# Dropbear has a small memory footprint suitable for memory-constrained +# environments, while still having the same features as OpenSSH. It +# does not depend on OpenSSL and it has a MIT style license. Optionally +# it can even be made smaller. +# + +PKG="DROPBEAR +PKG_VERSION="0.48.1" +PKG_FILE="${PKG}-${PKG_VERSION}.tar.gz +URL="http://matt.ucc.asn.au/dropbear/releases/${PKG_FILE} +MD5="ca8e53a766faec831882831364568421" +for i in PATCH{1..10}; do + unset $i +done +PATCH1="http://svn.cross-lfs.org/svn/repos/cross-lfs/branches/clfs-embedded/patches/dropbear-0.48.1-autotool-1.patch" + +( cat << "xEOFx" + +patch -Np1 -i ../dropbear-0.48.1-autotool-1.patch + +cp Makefile.in{,.orig} +sed -e s/@LD@/@CC@/ Makefile.in.orig > Makefile.in + +CC="${CC} ${BUILD}" ./configure --prefix=/usr --host=${CLFS_TARGET} + +cp -v options.h options.h.backup +sed -e "s@/dev/random@/dev/urandom@" options.h.backup > options.h + +make MULTI=1 PROGRAMS="dropbear dbclient dropbearkey dropbearconvert scp" + +make MULTI=1 PROGRAMS="dropbear dbclient dropbearkey dropbearconvert scp" install DESTDIR=${CLFS} +ln -svf ../../usr/bin/dropbearmulti ${CLFS}/usr/sbin/dropbear +ln -svf ../../usr/bin/dropbearmulti ${CLFS}/usr/bin/dbclient +ln -svf ../../usr/bin/dropbearmulti ${CLFS}/usr/bin/dropbearkey +ln -svf ../../usr/bin/dropbearmulti ${CLFS}/usr/bin/dropbearconvert +ln -svf ../../usr/bin/dropbearmulti ${CLFS}/usr/bin/scp + +install -dv ${CLFS}/etc/ssh + + +xEOFx +) > tmp diff --git a/custom/examples_CLFS-E/960-iptables b/custom/examples_CLFS-E/960-iptables new file mode 100644 index 0000000..96c7ab1 --- /dev/null +++ b/custom/examples_CLFS-E/960-iptables @@ -0,0 +1,42 @@ +# +# $Id:$ +# +# Code taken from CLFS-Embedded +# Chapter 12 Beyond CLFS Embedded +# +# iptables is the userspace command line program +# used to configure the Linux firewall. +# + +PKG="iptables" +PKG_VERSION="1.3.7" +PKG_FILE="${PKG}-${PKG_VERSION}.tar.bz2 +URL=" http://www.netfilter.org/projects/iptables/files/iptables-1.3.7.tar.bz2" +MD5="077e886a9c90a11bb47f3d7a4fc4a689" +for i in PATCH{1..10}; do + unset $i +done +PATCH1="http://svn.cross-lfs.org/svn/repos/cross-lfs/branches/clfs-embedded/patches/iptables-1.3.7-do_multi-1.patch" + +( cat << "xEOFx" + +patch -Np1 -i ../iptables-1.3.7-do_multi-1.patch + +make CC="${CC} ${BUILD}" \ + COPT_FLAGS="-Os" \ + LD=${LD} DO_MULTI=1 \ + PREFIX=/usr \ + KERNEL_DIR=${CLFS}/lib/modules/2.6.19.2/build \ + LIBDIR=/lib \ + BINDIR=/sbin + +make CC="${CC} ${BUILD}" \ + COPT_FLAGS="-Os" \ + LD=${LD} DO_MULTI=1 \ + PREFIX=/usr \ + KERNEL_DIR=${CLFS}/lib/modules/2.6.19.2/build \ + LIBDIR=/lib BINDIR=/sbin \ + DESTDIR=${CLFS} install + +xEOFx +) > tmp