svn commit: trunk/busybox: applets include networking scripts

landley at busybox.net landley at busybox.net
Sat Aug 5 00:41:39 UTC 2006


Author: landley
Date: 2006-08-04 17:41:39 -0700 (Fri, 04 Aug 2006)
New Revision: 15784

Log:
scripts/individual now builds 171 applets.  Some of them may even work. :)


Modified:
   trunk/busybox/applets/individual.c
   trunk/busybox/include/applets.h
   trunk/busybox/networking/ether-wake.c
   trunk/busybox/scripts/individual


Changeset:
Modified: trunk/busybox/applets/individual.c
===================================================================
--- trunk/busybox/applets/individual.c	2006-08-04 22:02:55 UTC (rev 15783)
+++ trunk/busybox/applets/individual.c	2006-08-05 00:41:39 UTC (rev 15784)
@@ -9,6 +9,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include "bb_config.h"
 #include "usage.h"
 
 int main(int argc, char *argv[])

Modified: trunk/busybox/include/applets.h
===================================================================
--- trunk/busybox/include/applets.h	2006-08-04 22:02:55 UTC (rev 15783)
+++ trunk/busybox/include/applets.h	2006-08-05 00:41:39 UTC (rev 15784)
@@ -105,7 +105,7 @@
 USE_FEATURE_GREP_EGREP_ALIAS(APPLET_NOUSAGE(egrep, grep, _BB_DIR_BIN, _BB_SUID_NEVER))
 USE_EJECT(APPLET(eject, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
 USE_ENV(APPLET(env, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_ETHER_WAKE(APPLET_ODDNAME(ether-wake, etherwake, _BB_DIR_USR_BIN, _BB_SUID_NEVER, ether_wake))
+USE_ETHER_WAKE(APPLET_ODDNAME(ether-wake, ether_wake, _BB_DIR_USR_BIN, _BB_SUID_NEVER, ether_wake))
 USE_EXPR(APPLET(expr, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
 USE_FAKEIDENTD(APPLET(fakeidentd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
 USE_FALSE(APPLET(false, _BB_DIR_BIN, _BB_SUID_NEVER))

Modified: trunk/busybox/networking/ether-wake.c
===================================================================
--- trunk/busybox/networking/ether-wake.c	2006-08-04 22:02:55 UTC (rev 15783)
+++ trunk/busybox/networking/ether-wake.c	2006-08-05 00:41:39 UTC (rev 15784)
@@ -105,7 +105,7 @@
 static inline int get_fill(unsigned char *pkt, struct ether_addr *eaddr, int broadcast);
 static inline int get_wol_pw(const char *ethoptarg, unsigned char *wol_passwd);
 
-int etherwake_main(int argc, char *argv[])
+int ether_wake_main(int argc, char *argv[])
 {
 	char *ifname = "eth0", *pass = NULL;
 	unsigned long flags;

Modified: trunk/busybox/scripts/individual
===================================================================
--- trunk/busybox/scripts/individual	2006-08-04 22:02:55 UTC (rev 15783)
+++ trunk/busybox/scripts/individual	2006-08-05 00:41:39 UTC (rev 15784)
@@ -12,21 +12,47 @@
 make
 cd ..
 
+cd archival/libunarchive
+make
+cd ../..
+
+# 146 applets build without any extra stuff.  The applet is one C file with
+# the same name as the corresponding applet, and all it needs to link against
+# is libbb.a.  However, 104 of them need more than that.
+
+# dpkg_deb gzip
+function extra_libraries()
+{
+  archival="ar bunzip2 unlzma cpio dpkg gunzip rpm2cpio rpm tar uncompress unzip dpkg_deb gzip "
+  if [ "${archival/$1 //}" != "${archival}" ]
+  then
+    echo "archival/libunarchive/libunarchive.a"
+  fi
+}
+    
+  
+
 # Here are a few that build in a standard way.  Others are easy to get to
 # build, for example miscutils/dc needs -lm and most of loginutils/* needs
 # -lcrypt...
 
 rm -rf build
 mkdir build
+
 for APPLET in `sed 's .*/  ' busybox.links`
 do
-  j=`find . -name "$APPLET.c"`
+  APPFILT=${APPLET/-/_}
+  j=`find . -name "${APPLET/-/?}.c"`  # Because ether-wake.c is broken.
   if [ -z "$j" ]
   then
     echo no file for $APPLET
   else
     echo "Building $APPLET..."
-    gcc -Os -o build/$APPLET applets/individual.c $j libbb/libbb.a -Iinclude -DAPPLET_main=${APPLET}_main -DAPPLET_full_usage=${APPLET}_full_usage
+    gcc -Os -o build/$APPLET applets/individual.c $j \
+	`extra_libraries $APPFILT` libbb/libbb.a -Iinclude \
+	-DBUILD_INDIVIDUAL \
+	"-Drun_applet_by_name(...)" "-Dfind_applet_by_name(...) 0" \
+	-DAPPLET_main=${APPFILT}_main -DAPPLET_full_usage=${APPFILT}_full_usage
     if [ $? -ne 0 ];
     then
       echo "Failed."




More information about the busybox-cvs mailing list