Skip to content

Commit

Permalink
Add openssl and openssh. Fix up UML kernel build.
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBAndersen committed Oct 17, 2002
1 parent f2f69f7 commit 365aac2
Show file tree
Hide file tree
Showing 9 changed files with 404 additions and 130 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ ifeq ($(USE_UCLIBC_TOOLCHAIN),true)
TARGETS=uclibc_toolchain
endif

TARGETS+=user-mode-linux busybox tinylogin ncurses gdb strace valgrind db
TARGETS+=user-mode-linux busybox tinylogin ncurses gdb strace valgrind db openssl zlib openssh #stlport

# Pick your root filesystem type.
TARGETS+=ext2root
Expand Down
17 changes: 17 additions & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,20 @@ Have fun!

Please feed suggestions, bug reports, insults, and bribes back to:
Erik Andersen <[email protected]>



NOTE:

For './configure' to behave itself with certain applications, you may need
to create a symlink under "/lib" on your system that points to the uClibc
shared library loader in the staging directory. For example, on my system

$ cd /lib
$ sudo ln -s /home/andersen/buildroot/build/staging_dir/lib/ld-uClibc.so.0 ld-uClibc.so.0

If you don't use sudo, run 'su -' to become root when making the link. If
you aren't root it won't work. The reason for this symlink, is it allows
'./configure' to actually execute the test applications it compiles against
uClibc during the configuration process....

46 changes: 46 additions & 0 deletions make/openssh.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#############################################################
#
# openssh
#
#############################################################

OPENSSH_SITE:=ftp://mirror.cs.wisc.edu/pub/mirrors/OpenBSD/OpenSSH/portable/
OPENSSH_DIR:=$(BUILD_DIR)/openssh-3.4p1
OPENSSH_SOURCE:=openssh-3.4p1.tar.gz
OPENSSH_PATCH:=$(SOURCE_DIR)/openssh_3.4p1-4.diff.gz

$(DL_DIR)/$(OPENSSH_SOURCE):
wget -P $(DL_DIR) --passive-ftp $(OPENSSH_SITE)/$(OPENSSH_SOURCE)

$(OPENSSH_DIR)/.unpacked: $(DL_DIR)/$(OPENSSH_SOURCE)
zcat $(DL_DIR)/$(OPENSSH_SOURCE) | tar -C $(BUILD_DIR) -xvf -
touch $(OPENSSH_DIR)/.unpacked

$(OPENSSH_DIR)/.patched: $(OPENSSH_DIR)/.unpacked
zcat $(OPENSSH_PATCH) | patch -d $(OPENSSH_DIR) -p1
touch $(OPENSSH_DIR)/.patched

$(OPENSSH_DIR)/.configured: $(OPENSSH_DIR)/.patched
(cd $(OPENSSH_DIR); rm -rf config.cache; CC=$(TARGET_CC1) \
./configure --prefix=/usr \
--includedir=$(STAGING_DIR)/include \
--disable-lastlog --disable-utmp --disable-utmpx --disable-wtmp --disable-wtmpx \
--disable-nls --without-x);
touch $(OPENSSH_DIR)/.configured

$(OPENSSH_DIR)/openssh: $(OPENSSH_DIR)/.configured
make CC=$(TARGET_CC1) -C $(OPENSSH_DIR)
-$(STRIP) --strip-unneeded $(OPENSSH_DIR)/*.so*

$(TARGET_DIR)/usr/bin/openssh: $(OPENSSH_DIR)/openssh
make CC=$(TARGET_CC1) DESTDIR=$(TARGET_DIR) -C $(OPENSSH_DIR) install
rm -rf $(TARGET_DIR)/usr/share/doc/openssh

openssh: $(TARGET_DIR)/usr/bin/openssh

openssh-clean:
make -C $(OPENSSH_DIR) clean

openssh-dirclean:
rm -rf $(OPENSSH_DIR)

49 changes: 49 additions & 0 deletions make/openssl.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#############################################################
#
# openssl
#
#############################################################

# TARGETS
OPENSSL_SITE:=http://www.openssl.org/source
OPENSSL_SOURCE:=openssl-0.9.6g.tar.gz
OPENSSL_DIR:=$(BUILD_DIR)/openssl-0.9.6g


$(DL_DIR)/$(OPENSSL_SOURCE):
wget -P $(DL_DIR) --passive-ftp $(OPENSSL_SITE)/$(OPENSSL_SOURCE)

$(OPENSSL_DIR)/.unpacked: $(DL_DIR)/$(OPENSSL_SOURCE)
gunzip -c $(DL_DIR)/$(OPENSSL_SOURCE) | tar -C $(BUILD_DIR) -xvf -
touch $(OPENSSL_DIR)/.unpacked

$(OPENSSL_DIR)/Makefile: $(OPENSSL_DIR)/.unpacked
(cd $(OPENSSL_DIR); \
PATH=$(TARGET_PATH) ./Configure linux-elf --prefix=$(STAGING_DIR) \
--openssldir=$(STAGING_DIR) -L$(STAGING_DIR)/lib -ldl \
-I$(STAGING_DIR)/include no-threads shared no-asm)

$(OPENSSL_DIR)/apps/openssl: $(OPENSSL_DIR)/Makefile
make CC=$(TARGET_CC1) -C $(OPENSSL_DIR)

$(STAGING_DIR)/bin/openssl: $(OPENSSL_DIR)/apps/openssl
make CC=$(TARGET_CC1) -C $(OPENSSL_DIR) install

$(TARGET_DIR)/bin/openssl: $(STAGING_DIR)/bin/openssl
cp -fa $(STAGING_DIR)/bin/openssl $(TARGET_DIR)/bin/
cp -fa $(STAGING_DIR)/lib/libcrypto.so* $(TARGET_DIR)/lib/
cp -fa $(STAGING_DIR)/lib/libssl.so* $(TARGET_DIR)/lib/

openssl-clean:
rm -f $(STAGING_DIR)/bin/openssl $(TARGET_DIR)/bin/openssl
rm -f $(STAGING_DIR)/lib/libcrypto.so* $(TARGET_DIR)/lib/libcrypto.so*
rm -f $(STAGING_DIR)/lib/libssl.so* $(TARGET_DIR)/lib/libssl.so*
$(MAKE) -C $(OPENSSL_DIR) clean

openssl-dirclean:
rm -rf $(OPENSSL_DIR)

openssl: uclibc $(TARGET_DIR)/bin/openssl

#EOF

2 changes: 1 addition & 1 deletion make/user-mode-linux.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Linux kernel targets
#
#############################################################
UMLINUX_DIR=$(BUILD_DIR)/linux
UMLINUX_DIR=$(BUILD_DIR)/linux-2.4.19
UMLINUX_SOURCE=linux-2.4.19.tar.bz2
UMLINUX_SITE=http://ftp.us.kernel.org/pub/linux/kernel/v2.4
UMLINUX_PATCH_1:=uml-patch-2.4.19-5.bz2
Expand Down
142 changes: 99 additions & 43 deletions sources/busybox.patch
Original file line number Diff line number Diff line change
@@ -1,23 +1,41 @@
--- busybox/Config.h 6 Apr 2002 04:22:15 -0000 1.116
+++ busybox/Config.h 30 May 2002 05:10:32 -0000
@@ -7,8 +7,8 @@
//
--- busybox/Config.h 17 Sep 2002 22:04:28 -0000 1.118
+++ busybox/Config.h 17 Sep 2002 23:43:54 -0000
@@ -8,7 +8,7 @@
//
// BusyBox Applications
-//#define BB_ADJTIMEX
//#define BB_ADJTIMEX
-//#define BB_AR
+#define BB_ADJTIMEX
+#define BB_AR
#define BB_ASH
#define BB_BASENAME
#define BB_CAT
@@ -18,14 +18,14 @@
#define BB_CHROOT
#define BB_CHVT
#define BB_CLEAR
-//#define BB_CMP
+#define BB_CMP
#define BB_CP
-//#define BB_CPIO
+#define BB_CPIO
#define BB_CUT
#define BB_DATE
-//#define BB_DC
+#define BB_DC
#define BB_DD
-//#define BB_DEALLOCVT
+#define BB_DEALLOCVT
#define BB_DF
#define BB_DIRNAME
#define BB_DMESG
@@ -37,12 +37,12 @@
//#define BB_DUMPKMAP
#define BB_ECHO
#define BB_ENV
-//#define BB_EXPR
-//#define BB_FBSET
+#define BB_EXPR
//#define BB_FBSET
+#define BB_FBSET
//#define BB_FDFLUSH
#define BB_FIND
#define BB_FREE
Expand All @@ -26,11 +44,13 @@
//#define BB_FSCK_MINIX
//#define BB_GETOPT
#define BB_GREP
@@ -51,12 +51,12 @@
@@ -50,13 +50,13 @@
#define BB_GZIP
#define BB_HALT
#define BB_HEAD
//#define BB_HOSTID
-//#define BB_HOSTID
-//#define BB_HOSTNAME
+#define BB_HOSTID
+#define BB_HOSTNAME
//#define BB_HUSH
#define BB_ID
Expand All @@ -42,11 +62,13 @@
#define BB_KILL
#define BB_KILLALL
#define BB_KLOGD
@@ -68,11 +68,11 @@
@@ -67,77 +67,77 @@
//#define BB_LOADFONT
//#define BB_LOADKMAP
#define BB_LOGGER
//#define BB_LOGNAME
-//#define BB_LOGNAME
-//#define BB_LOSETUP
+#define BB_LOGNAME
+#define BB_LOSETUP
#define BB_LS
#define BB_LSMOD
Expand All @@ -56,7 +78,13 @@
#define BB_MKDIR
//#define BB_MKFIFO
//#define BB_MKFS_MINIX
@@ -85,11 +85,11 @@
#define BB_MKNOD
#define BB_MKSWAP
-//#define BB_MKTEMP
+#define BB_MKTEMP
#define BB_MODPROBE
#define BB_MORE
#define BB_MOUNT
//#define BB_MSH
//#define BB_MT
#define BB_MV
Expand All @@ -70,9 +98,16 @@
+#define BB_PING
+#define BB_PIVOT_ROOT
#define BB_POWEROFF
//#define BB_PRINTF
-//#define BB_PRINTF
+#define BB_PRINTF
#define BB_PS
@@ -101,8 +101,8 @@
#define BB_PWD
-//#define BB_RDATE
-//#define BB_READLINK
+#define BB_RDATE
+#define BB_READLINK
#define BB_REBOOT
//#define BB_RENICE
#define BB_RESET
#define BB_RM
#define BB_RMDIR
Expand All @@ -83,28 +118,46 @@
//#define BB_RPM2CPIO
#define BB_SED
//#define BB_SETKEYCODES
@@ -115,13 +115,13 @@
#define BB_SLEEP
#define BB_SORT
-//#define BB_STTY
+#define BB_STTY
#define BB_SWAPONOFF
#define BB_SYNC
#define BB_SYSLOGD
#define BB_TAIL
#define BB_TAR
//#define BB_TEE
-//#define BB_TEE
-//#define BB_TEST
-//#define BB_TELNET
+#define BB_TEE
+#define BB_TEST
//#define BB_TELNET
+#define BB_TELNET
//#define BB_TFTP
-//#define BB_TIME
-//#define BB_TOP
+#define BB_TIME
+#define BB_TOP
#define BB_TOUCH
//#define BB_TR
-//#define BB_TR
-//#define BB_TRACEROUTE
+#define BB_TR
+#define BB_TRACEROUTE
#define BB_TRUE_FALSE
#define BB_TTY
//#define BB_UNIX2DOS
@@ -133,10 +133,10 @@
-//#define BB_UUENCODE
-//#define BB_UUDECODE
+#define BB_UUENCODE
+#define BB_UUDECODE
#define BB_UMOUNT
#define BB_UNIQ
#define BB_UNAME
//#define BB_UPDATE
#define BB_UPTIME
//#define BB_USLEEP
-//#define BB_USLEEP
-//#define BB_VI
+#define BB_USLEEP
+#define BB_VI
//#define BB_WATCHDOG
#define BB_WC
Expand All @@ -113,25 +166,38 @@
#define BB_WHICH
#define BB_WHOAMI
#define BB_XARGS
@@ -217,7 +217,7 @@
#define BB_FEATURE_USE_INITTAB
@@ -185,7 +185,7 @@
#define BB_FEATURE_VERBOSE_USAGE
//
//Enable init being called as /linuxrc
-#define BB_FEATURE_LINUXRC
+//#define BB_FEATURE_LINUXRC
// Use termios to manipulate the screen ('more' is prettier with this on)
-//#define BB_FEATURE_USE_TERMIOS
+#define BB_FEATURE_USE_TERMIOS
//
//Have init enable core dumping for child processes (for debugging only)
// calculate terminal & column widths (for more, ls, and telnet)
#define BB_FEATURE_AUTOWIDTH
@@ -224,10 +224,10 @@
//#define BB_FEATURE_INIT_COREDUMPS
@@ -226,7 +226,7 @@
//#define BB_FEATURE_EXTRA_QUIET
//
//Make sure nothing is printed to the console on boot
-//#define BB_FEATURE_EXTRA_QUIET
+#define BB_FEATURE_EXTRA_QUIET
//
// enable syslogd -R remotehost
-#define BB_FEATURE_REMOTE_LOG
+//#define BB_FEATURE_REMOTE_LOG
//
// enable syslogd -C
//#define BB_FEATURE_IPC_SYSLOG
@@ -277,7 +277,7 @@
@@ -248,7 +248,7 @@
//
// If you are using uClibc, be sure that you've already compiled
// uClibc with INCLUDE_RPC=true (contained in the Config file)
-//#define BB_FEATURE_NFSMOUNT
+#define BB_FEATURE_NFSMOUNT
//
// Enable support forced filesystem unmounting
// (i.e., in case of an unreachable NFS system).
@@ -278,7 +278,7 @@
#define BB_FEATURE_COMMAND_TAB_COMPLETION
//
// Attempts to match usernames in a ~-prefixed path
Expand All @@ -140,7 +206,7 @@
//
//Allow the shell to invoke all the compiled in BusyBox applets as if they
//were shell builtins. Nice for staticly linking an emergency rescue shell,
@@ -298,7 +298,7 @@
@@ -299,7 +299,7 @@
// current username and hostname. On systems that don't have usernames
// or hostnames, this can look hideous.
// Only relevant if a shell is enabled.
Expand All @@ -149,25 +215,15 @@
//
// Uncomment this option to disable job control. Job control lets you
// run jobs in the background (which completely useless for is all you
@@ -314,7 +314,7 @@
//#define BB_FEATURE_FBSET_READMODE
//
// Support insmod/lsmod/rmmod for post 2.1 kernels
-//#define BB_FEATURE_NEW_MODULE_INTERFACE
+#define BB_FEATURE_NEW_MODULE_INTERFACE
//
// Support insmod/lsmod/rmmod for pre 2.1 kernels
//#define BB_FEATURE_OLD_MODULE_INTERFACE
@@ -332,16 +332,16 @@
@@ -333,16 +333,16 @@
//#define BB_FEATURE_MINIX2
//
// Enable ifconfig status reporting output -- this feature adds 7k.
-//#define BB_FEATURE_IFCONFIG_STATUS
+#define BB_FEATURE_IFCONFIG_STATUS
//
// Enable ifconfig slip-specific options "keepalive" and "outfill"
-//#define BB_FEATURE_IFCONFIG_SLIP
+#define BB_FEATURE_IFCONFIG_SLIP
//#define BB_FEATURE_IFCONFIG_SLIP
//
// Enable ifconfig options "mem_start", "io_addr", and "irq".
-//#define BB_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ
Expand All @@ -179,7 +235,7 @@
//
// Allows "broadcast +" to set broadcast automatically based on hostaddr
// and netmask, at a cost of about 100 bytes of code (i386).
@@ -379,7 +379,7 @@
@@ -380,7 +380,7 @@
#define BB_FEATURE_FIND_NEWER
//
// Support for the -A -B and -C context flags in grep
Expand Down
Loading

0 comments on commit 365aac2

Please sign in to comment.