diff --git a/obsolete-buildroot/make/busybox.mk b/obsolete-buildroot/make/busybox.mk index 510489de39..baeb952667 100644 --- a/obsolete-buildroot/make/busybox.mk +++ b/obsolete-buildroot/make/busybox.mk @@ -15,7 +15,7 @@ BUSYBOX_SOURCE:=busybox-1.00-pre8.tar.bz2 BUSYBOX_SITE:=http://www.busybox.net/downloads endif BUSYBOX_UNZIP=bzcat -BUSYBOX_CONFIG:=$(SOURCE_DIR)/busybox.config +BUSYBOX_CONFIG:=$(SOURCE_DIR)/openwrt/busybox/busybox.config $(DL_DIR)/$(BUSYBOX_SOURCE): $(WGET) -P $(DL_DIR) $(BUSYBOX_SITE)/$(BUSYBOX_SOURCE) @@ -25,7 +25,7 @@ busybox-source: $(DL_DIR)/$(BUSYBOX_SOURCE) $(BUSYBOX_CONFIG) $(BUSYBOX_DIR)/.configured: $(DL_DIR)/$(BUSYBOX_SOURCE) $(BUSYBOX_CONFIG) $(BUSYBOX_UNZIP) $(DL_DIR)/$(BUSYBOX_SOURCE) | tar -C $(BUILD_DIR) -xvf - # Allow busybox patches. - $(SOURCE_DIR)/patch-kernel.sh $(BUSYBOX_DIR) $(SOURCE_DIR) busybox-*.patch + $(SOURCE_DIR)/patch-kernel.sh $(BUSYBOX_DIR) $(SOURCE_DIR)/openwrt/busybox/patches cp $(BUSYBOX_CONFIG) $(BUSYBOX_DIR)/.config $(SED) "s,^CROSS.*,CROSS=$(TARGET_CROSS)\n\ PREFIX=$(TARGET_DIR),;" $(BUSYBOX_DIR)/Rules.mak diff --git a/obsolete-buildroot/make/openssh.mk b/obsolete-buildroot/make/openssh.mk index 7fdb73ed0a..6c5ba7a4e2 100644 --- a/obsolete-buildroot/make/openssh.mk +++ b/obsolete-buildroot/make/openssh.mk @@ -93,15 +93,15 @@ $(OPENSSH_IPK_DIR)/usr/bin/ssh: $(OPENSSH_DIR)/ssh $(OPENSSH_SERVER_IPK): $(OPENSSH_IPK_DIR)/usr/bin/ssh rm -rf $(OPENSSH_IPK_DIR)/build mkdir -p $(OPENSSH_IPK_DIR)/build/CONTROL - cp $(SOURCE_DIR)/openssh.server.control $(OPENSSH_IPK_DIR)/build/CONTROL/control - cp $(SOURCE_DIR)/openssh.server.conffiles $(OPENSSH_IPK_DIR)/build/CONTROL/conffiles - cp $(SOURCE_DIR)/openssh.server.preinst $(OPENSSH_IPK_DIR)/build/CONTROL/preinst + cp $(SOURCE_DIR)/openwrt/ipkg/openssh/openssh.server.control $(OPENSSH_IPK_DIR)/build/CONTROL/control + cp $(SOURCE_DIR)/openwrt/ipkg/openssh/openssh.server.conffiles $(OPENSSH_IPK_DIR)/build/CONTROL/conffiles + cp $(SOURCE_DIR)/openwrt/ipkg/openssh/openssh.server.preinst $(OPENSSH_IPK_DIR)/build/CONTROL/preinst chmod a+x $(OPENSSH_IPK_DIR)/build/CONTROL/preinst - cp $(SOURCE_DIR)/openssh.server.postinst $(OPENSSH_IPK_DIR)/build/CONTROL/postinst + cp $(SOURCE_DIR)/openwrt/ipkg/openssh/openssh.server.postinst $(OPENSSH_IPK_DIR)/build/CONTROL/postinst chmod a+x $(OPENSSH_IPK_DIR)/build/CONTROL/postinst mkdir -p $(OPENSSH_IPK_DIR)/build/etc/init.d - cp $(SOURCE_DIR)/openssh.server.sshd_config $(OPENSSH_IPK_DIR)/build/etc/sshd_config - cp $(SOURCE_DIR)/openssh.server.S50sshd-ipk $(OPENSSH_IPK_DIR)/build/etc/init.d/S50sshd + cp $(SOURCE_DIR)/openwrt/ipkg/openssh/openssh.server.sshd_config $(OPENSSH_IPK_DIR)/build/etc/sshd_config + cp $(SOURCE_DIR)/openwrt/ipkg/openssh/openssh.server.S50sshd-ipk $(OPENSSH_IPK_DIR)/build/etc/init.d/S50sshd chmod a+x $(OPENSSH_IPK_DIR)/build/etc/init.d/S50sshd mkdir -p $(OPENSSH_IPK_DIR)/build/usr/sbin cp $(OPENSSH_IPK_DIR)/usr/sbin/sshd $(OPENSSH_IPK_DIR)/build/usr/sbin @@ -113,12 +113,12 @@ $(OPENSSH_SERVER_IPK): $(OPENSSH_IPK_DIR)/usr/bin/ssh $(OPENSSH_CLIENT_IPK): $(OPENSSH_IPK_DIR)/usr/bin/ssh rm -rf $(OPENSSH_IPK_DIR)/build mkdir -p $(OPENSSH_IPK_DIR)/build/CONTROL - cp $(SOURCE_DIR)/openssh.client.control $(OPENSSH_IPK_DIR)/build/CONTROL/control - cp $(SOURCE_DIR)/openssh.client.conffiles $(OPENSSH_IPK_DIR)/build/CONTROL/conffiles - cp $(SOURCE_DIR)/openssh.client.preinst $(OPENSSH_IPK_DIR)/build/CONTROL/preinst + cp $(SOURCE_DIR)/openwrt/ipkg/openssh/openssh.client.control $(OPENSSH_IPK_DIR)/build/CONTROL/control + cp $(SOURCE_DIR)/openwrt/ipkg/openssh/openssh.client.conffiles $(OPENSSH_IPK_DIR)/build/CONTROL/conffiles + cp $(SOURCE_DIR)/openwrt/ipkg/openssh/openssh.client.preinst $(OPENSSH_IPK_DIR)/build/CONTROL/preinst chmod a+x $(OPENSSH_IPK_DIR)/build/CONTROL/preinst mkdir -p $(OPENSSH_IPK_DIR)/build/etc - cp $(SOURCE_DIR)/openssh.client.ssh_config $(OPENSSH_IPK_DIR)/build/etc/ssh_config + cp $(SOURCE_DIR)/openwrt/ipkg/openssh/openssh.client.ssh_config $(OPENSSH_IPK_DIR)/build/etc/ssh_config mkdir -p $(OPENSSH_IPK_DIR)/build/usr/bin cp $(OPENSSH_IPK_DIR)/usr/bin/ssh $(OPENSSH_IPK_DIR)/build/usr/bin cp $(OPENSSH_IPK_DIR)/usr/bin/scp $(OPENSSH_IPK_DIR)/build/usr/bin @@ -128,7 +128,7 @@ $(OPENSSH_CLIENT_IPK): $(OPENSSH_IPK_DIR)/usr/bin/ssh $(OPENSSH_SFTP_SERVER_IPK): $(OPENSSH_IPK_DIR)/usr/bin/ssh rm -rf $(OPENSSH_IPK_DIR)/build mkdir -p $(OPENSSH_IPK_DIR)/build/CONTROL - cp $(SOURCE_DIR)/openssh.sftp-server.control $(OPENSSH_IPK_DIR)/build/CONTROL/control + cp $(SOURCE_DIR)/openwrt/ipkg/openssh/openssh.sftp-server.control $(OPENSSH_IPK_DIR)/build/CONTROL/control mkdir -p $(OPENSSH_IPK_DIR)/build/usr/sbin cp $(OPENSSH_IPK_DIR)/usr/sbin/sftp-server $(OPENSSH_IPK_DIR)/build/usr/sbin cd $(BUILD_DIR); $(STAGING_DIR)/bin/ipkg-build -c -o root -g root $(OPENSSH_IPK_DIR)/build @@ -137,7 +137,7 @@ $(OPENSSH_SFTP_SERVER_IPK): $(OPENSSH_IPK_DIR)/usr/bin/ssh $(OPENSSH_SFTP_CLIENT_IPK): $(OPENSSH_IPK_DIR)/usr/bin/ssh rm -rf $(OPENSSH_IPK_DIR)/build mkdir -p $(OPENSSH_IPK_DIR)/build/CONTROL - cp $(SOURCE_DIR)/openssh.sftp-client.control $(OPENSSH_IPK_DIR)/build/CONTROL/control + cp $(SOURCE_DIR)/openwrt/ipkg/openssh/openssh.sftp-client.control $(OPENSSH_IPK_DIR)/build/CONTROL/control mkdir -p $(OPENSSH_IPK_DIR)/build/usr/bin cp $(OPENSSH_IPK_DIR)/usr/bin/sftp $(OPENSSH_IPK_DIR)/build/usr/bin cd $(BUILD_DIR); $(STAGING_DIR)/bin/ipkg-build -c -o root -g root $(OPENSSH_IPK_DIR)/build @@ -146,7 +146,7 @@ $(OPENSSH_SFTP_CLIENT_IPK): $(OPENSSH_IPK_DIR)/usr/bin/ssh $(OPENSSH_CLIENT_EX_IPK): $(OPENSSH_IPK_DIR)/usr/bin/ssh rm -rf $(OPENSSH_IPK_DIR)/build mkdir -p $(OPENSSH_IPK_DIR)/build/CONTROL - cp $(SOURCE_DIR)/openssh.client.ex.control $(OPENSSH_IPK_DIR)/build/CONTROL/control + cp $(SOURCE_DIR)/openwrt/ipkg/openssh/openssh.client.ex.control $(OPENSSH_IPK_DIR)/build/CONTROL/control mkdir -p $(OPENSSH_IPK_DIR)/build/usr/bin cp $(OPENSSH_IPK_DIR)/usr/bin/ssh-add $(OPENSSH_IPK_DIR)/build/usr/bin cp $(OPENSSH_IPK_DIR)/usr/bin/ssh-agent $(OPENSSH_IPK_DIR)/build/usr/bin diff --git a/obsolete-buildroot/make/openssl.mk b/obsolete-buildroot/make/openssl.mk index e20c8b9d63..3fa273f5b8 100644 --- a/obsolete-buildroot/make/openssl.mk +++ b/obsolete-buildroot/make/openssl.mk @@ -70,7 +70,7 @@ openssl: uclibc $(TARGET_DIR)/usr/lib/libcrypto.so.0.9.7 $(LIBSSL_IPK): uclibc $(STAGING_DIR)/usr/lib/libcrypto.a mkdir -p $(OPENSSL_IPK_DIR)/CONTROL - cp $(SOURCE_DIR)/libssl.control $(OPENSSL_IPK_DIR)/CONTROL/control + cp $(SOURCE_DIR)/openwrt/openssl/control $(OPENSSL_IPK_DIR)/CONTROL/control mkdir -p $(OPENSSL_IPK_DIR)/usr/lib cp -fa $(STAGING_DIR)/lib/libcrypto.so* $(OPENSSL_IPK_DIR)/usr/lib/ cp -fa $(STAGING_DIR)/lib/libssl.so* $(OPENSSL_IPK_DIR)/usr/lib/ diff --git a/obsolete-buildroot/make/openwrt.mk b/obsolete-buildroot/make/openwrt.mk index 6889e1ec56..e839a0a5cb 100644 --- a/obsolete-buildroot/make/openwrt.mk +++ b/obsolete-buildroot/make/openwrt.mk @@ -36,22 +36,10 @@ openwrt-base: $(OPENWRT_TARGETS) ifneq ($(filter $(TARGETS),openwrt-base),) -# WRT54G_SOURCE=wrt54gv2.2.02.2.tgz -# WRT54G_SITE=http://www.linksys.com/support/opensourcecode/wrt54gv2/2.02.2 - -# WRT54G_SOURCE=wrt54g.2.02.7.tgz -# WRT54G_SITE=http://www.linksys.com/support/opensourcecode/wrt54gv2/2.02.7 -# WRT54G_DIR=$(BUILD_DIR)/WRT54G - WRT54G_SOURCE=wrt54gs.2.07.1.tgz WRT54G_SITE=http://www.linksys.com/support/opensourcecode/wrt54gs/2.07.1 - WRT54G_DIR=$(BUILD_DIR)/WRT54GS -# OPENWRT_ROOT=openwrt-root.tar.bz2 -# OPENWRT_SITE=http://127.0.0.1 -# OPENWRT_DIR=$(BUILD_DIR)/openwrt - LINUX_DIR=$(WRT54G_DIR)/release/src/linux/linux LINUX_FORMAT=zImage LINUX_BINLOC=arch/mips/brcm-boards/bcm947xx/compressed/vmlinuz @@ -63,17 +51,14 @@ $(LINUX_DIR)/.unpacked: $(WRT54G_DIR)/.prepared touch $(LINUX_DIR)/.unpacked $(LINUX_DIR)/.patched: $(WRT54G_DIR)/.prepared - $(SOURCE_DIR)/patch-kernel.sh $(LINUX_DIR)/../.. $(SOURCE_DIR) openwrt-linux-netfilter.patch - $(SOURCE_DIR)/patch-kernel.sh $(LINUX_DIR)/../.. $(SOURCE_DIR) openwrt-linux-sch_htb.patch - $(SOURCE_DIR)/patch-kernel.sh $(LINUX_DIR)/../.. $(SOURCE_DIR) openwrt-wrt54g-linux.patch - $(SOURCE_DIR)/patch-kernel.sh $(LINUX_DIR)/../.. $(SOURCE_DIR) openwrt-wrt54g-nfsswap.patch + $(SOURCE_DIR)/patch-kernel.sh $(LINUX_DIR)/../.. $(SOURCE_DIR)/openwrt/kernel/patches # use replacement diag module code - cp -f $(SOURCE_DIR)/openwrt-diag.c $(LINUX_DIR)/drivers/net/diag/diag_led.c - cp -f $(SOURCE_DIR)/openwrt-wrt54g-linux.config $(LINUX_DIR)/.config + cp -f $(SOURCE_DIR)/openwrt/kernel/diag.c $(LINUX_DIR)/drivers/net/diag/diag_led.c + cp -f $(SOURCE_DIR)/openwrt/kernel/linux.config $(LINUX_DIR)/.config -(cd $(BUILD_DIR); ln -sf $(LINUX_DIR) linux) -(cd $(LINUX_DIR)/arch/mips/brcm-boards/bcm947xx/; \ rm -rf compressed; \ - tar jxvf $(SOURCE_DIR)/compressed-20040531.tar.bz2; \ + tar jxvf $(SOURCE_DIR)/openwrt/kernel/compressed-20040531.tar.bz2; \ ) touch $(LINUX_DIR)/.patched @@ -107,8 +92,7 @@ $(WRT54G_DIR)/.source: $(DL_DIR)/$(WRT54G_SOURCE) touch $(WRT54G_DIR)/.source $(WRT54G_DIR)/.prepared: $(WRT54G_DIR)/.source - $(SOURCE_DIR)/patch-kernel.sh $(WRT54G_DIR) $(SOURCE_DIR) openwrt-wrt54g-router.patch - $(SOURCE_DIR)/patch-kernel.sh $(WRT54G_DIR) $(SOURCE_DIR) openwrt-wrt54g-shared.patch + $(SOURCE_DIR)/patch-kernel.sh $(WRT54G_DIR) $(SOURCE_DIR)/openwrt/patches touch $(WRT54G_DIR)/.prepared ###################################################################### @@ -236,8 +220,8 @@ openwrt-prune: ###################################################################### wrt-tools: - $(CC) -o $(WRT54G_DIR)/release/tools/trx $(SOURCE_DIR)/trx.c - $(CC) -o $(WRT54G_DIR)/release/tools/addpattern $(SOURCE_DIR)/addpattern.c + $(CC) -o $(WRT54G_DIR)/release/tools/trx $(SOURCE_DIR)/openwrt/tools/trx.c + $(CC) -o $(WRT54G_DIR)/release/tools/addpattern $(SOURCE_DIR)/openwrt/tools/addpattern.c openwrt-linux.trx: openwrt-prune squashfsroot wrt-tools $(WRT54G_DIR)/release/tools/trx -o openwrt-linux.trx \ @@ -253,24 +237,4 @@ openwrt-g-code.bin: openwrt-gs-code.bin openwrt-code.bin: openwrt-gs-code.bin openwrt-g-code.bin ###################################################################### - -openwrt-sourceball: - tar cjf buildroot-openwrt.tar.bz2 \ - README.openwrt \ - Makefile \ - Makefile-openwrt \ - make/openwrt.mk \ - make/uclibc.mk \ - make/busybox.mk \ - sources/uClibc.config \ - sources/uClibc.config-openwrt \ - sources/busybox-openwrt-*.patch \ - sources/busybox.config \ - sources/busybox.config-openwrt \ - sources/dnsmasq1-openwrt.patch \ - sources/iptables-openwrt-extensions.patch \ - sources/openwrt-wrt54g-linux.config \ - sources/openwrt-wrt54g-*.patch \ - sources/openwrt-diag.c - endif diff --git a/obsolete-buildroot/make/zlib.mk b/obsolete-buildroot/make/zlib.mk index 5500fec87a..48e7b32569 100644 --- a/obsolete-buildroot/make/zlib.mk +++ b/obsolete-buildroot/make/zlib.mk @@ -66,7 +66,7 @@ zlib: uclibc $(TARGET_DIR)/lib/libz.so.1.1.4 $(ZLIB_IPK): uclibc $(STAGING_DIR)/lib/libz.so.1.1.4 mkdir -p $(ZLIB_IPK_DIR)/CONTROL - cp $(SOURCE_DIR)/zlib.control $(ZLIB_IPK_DIR)/CONTROL/control + cp $(SOURCE_DIR)/openwrt/ipkg/zlib/control $(ZLIB_IPK_DIR)/CONTROL/control mkdir -p $(ZLIB_IPK_DIR)/lib cp -dpf $(STAGING_DIR)/lib/libz.so* $(ZLIB_IPK_DIR)/lib; -$(STRIP) --strip-unneeded $(ZLIB_IPK_DIR)/lib/libz.so* diff --git a/obsolete-buildroot/sources/busybox-openwrt-120-udhcp.patch b/obsolete-buildroot/sources/busybox-openwrt-120-udhcp.patch deleted file mode 100644 index f8e8d33b3a..0000000000 --- a/obsolete-buildroot/sources/busybox-openwrt-120-udhcp.patch +++ /dev/null @@ -1,129 +0,0 @@ -diff -urN busybox-dist/networking/udhcp/dumpleases.c busybox/networking/udhcp/dumpleases.c ---- busybox-dist/networking/udhcp/dumpleases.c 2004-03-15 02:29:00.000000000 -0600 -+++ busybox/networking/udhcp/dumpleases.c 2004-03-16 09:52:32.000000000 -0600 -@@ -42,7 +42,7 @@ - #endif - { - FILE *fp; -- int i, c, mode = REMAINING; -+ int i, c, mode = ABSOLUTE; - long expires; - const char *file = LEASES_FILE; - struct dhcpOfferedAddr lease; -@@ -73,7 +73,7 @@ - - fp = xfopen(file, "r"); - -- printf("Mac Address IP-Address Expires %s\n", mode == REMAINING ? "in" : "at"); -+ printf("Mac Address IP-Address Hostname Expires %s\n", mode == REMAINING ? "in" : "at"); - /* "00:00:00:00:00:00 255.255.255.255 Wed Jun 30 21:49:08 1993" */ - while (fread(&lease, sizeof(lease), 1, fp)) { - -@@ -84,7 +84,8 @@ - addr.s_addr = lease.yiaddr; - printf(" %-15s", inet_ntoa(addr)); - expires = ntohl(lease.expires); -- printf(" "); -+ //expires = lease.expires; -+ printf(" %-15s ",lease.hostname); - if (mode == REMAINING) { - if (!expires) printf("expired\n"); - else { -diff -urN busybox-dist/networking/udhcp/files.c busybox/networking/udhcp/files.c ---- busybox-dist/networking/udhcp/files.c 2004-03-15 02:29:00.000000000 -0600 -+++ busybox/networking/udhcp/files.c 2004-03-16 09:50:04.000000000 -0600 -@@ -281,7 +281,7 @@ - if (lease.yiaddr >= server_config.start && lease.yiaddr <= server_config.end) { - lease.expires = ntohl(lease.expires); - if (!server_config.remaining) lease.expires -= time(0); -- if (!(add_lease(lease.chaddr, lease.yiaddr, lease.expires))) { -+ if (!(add_lease(lease.hostname, lease.chaddr, lease.yiaddr, lease.expires))) { - LOG(LOG_WARNING, "Too many leases while loading %s\n", file); - break; - } -diff -urN busybox-dist/networking/udhcp/leases.c busybox/networking/udhcp/leases.c ---- busybox-dist/networking/udhcp/leases.c 2004-03-15 02:29:00.000000000 -0600 -+++ busybox/networking/udhcp/leases.c 2004-03-16 09:50:04.000000000 -0600 -@@ -35,7 +35,7 @@ - - - /* add a lease into the table, clearing out any old ones */ --struct dhcpOfferedAddr *add_lease(uint8_t *chaddr, uint32_t yiaddr, unsigned long lease) -+struct dhcpOfferedAddr *add_lease(uint8_t *hostname, uint8_t *chaddr, uint32_t yiaddr, unsigned long lease) - { - struct dhcpOfferedAddr *oldest; - -@@ -45,6 +45,13 @@ - oldest = oldest_expired_lease(); - - if (oldest) { -+ if (hostname) { -+ uint8_t length = *(hostname-1); -+ if (length>15) length=15; -+ memcpy(oldest->hostname,hostname,length); -+ oldest->hostname[length]=0; -+ } -+ - memcpy(oldest->chaddr, chaddr, 16); - oldest->yiaddr = yiaddr; - oldest->expires = time(0) + lease; -@@ -112,7 +119,7 @@ - temp.s_addr = addr; - LOG(LOG_INFO, "%s belongs to someone, reserving it for %ld seconds", - inet_ntoa(temp), server_config.conflict_time); -- add_lease(blank_chaddr, addr, server_config.conflict_time); -+ add_lease(blank_chaddr, blank_chaddr, addr, server_config.conflict_time); - return 1; - } else return 0; - } -diff -urN busybox-dist/networking/udhcp/leases.h busybox/networking/udhcp/leases.h ---- busybox-dist/networking/udhcp/leases.h 2004-01-30 17:45:12.000000000 -0600 -+++ busybox/networking/udhcp/leases.h 2004-03-16 09:50:04.000000000 -0600 -@@ -4,6 +4,7 @@ - - - struct dhcpOfferedAddr { -+ uint8_t hostname[16]; - uint8_t chaddr[16]; - uint32_t yiaddr; /* network order */ - uint32_t expires; /* host order */ -@@ -12,7 +13,7 @@ - extern uint8_t blank_chaddr[]; - - void clear_lease(uint8_t *chaddr, uint32_t yiaddr); --struct dhcpOfferedAddr *add_lease(uint8_t *chaddr, uint32_t yiaddr, unsigned long lease); -+struct dhcpOfferedAddr *add_lease(uint8_t *hostname, uint8_t *chaddr, uint32_t yiaddr, unsigned long lease); - int lease_expired(struct dhcpOfferedAddr *lease); - struct dhcpOfferedAddr *oldest_expired_lease(void); - struct dhcpOfferedAddr *find_lease_by_chaddr(uint8_t *chaddr); -diff -urN busybox-dist/networking/udhcp/serverpacket.c busybox/networking/udhcp/serverpacket.c ---- busybox-dist/networking/udhcp/serverpacket.c 2004-03-15 02:29:01.000000000 -0600 -+++ busybox/networking/udhcp/serverpacket.c 2004-03-16 09:51:36.000000000 -0600 -@@ -29,6 +29,7 @@ - #include "dhcpd.h" - #include "options.h" - #include "common.h" -+#include "files.h" - - /* send a packet to giaddr using the kernel ip stack */ - static int send_packet_to_relay(struct dhcpMessage *payload) -@@ -152,7 +153,7 @@ - return -1; - } - -- if (!add_lease(packet.chaddr, packet.yiaddr, server_config.offer_time)) { -+ if (!add_lease(get_option(oldpacket, DHCP_HOST_NAME), packet.chaddr, packet.yiaddr, server_config.offer_time)) { - LOG(LOG_WARNING, "lease pool is full -- OFFER abandoned"); - return -1; - } -@@ -233,7 +234,9 @@ - if (send_packet(&packet, 0) < 0) - return -1; - -- add_lease(packet.chaddr, packet.yiaddr, lease_time_align); -+ add_lease(get_option(oldpacket, DHCP_HOST_NAME), packet.chaddr, packet.yiaddr, lease_time_align); -+ -+ write_leases(); - - return 0; - } diff --git a/obsolete-buildroot/sources/cramfs.patch b/obsolete-buildroot/sources/cramfs.patch deleted file mode 100644 index 884eb8cb83..0000000000 --- a/obsolete-buildroot/sources/cramfs.patch +++ /dev/null @@ -1,1269 +0,0 @@ ---- cramfs-1.1.orig/cramfsck.c 2002-02-22 17:00:42.000000000 -0700 -+++ cramfs-1.1/cramfsck.c 2002-12-21 01:25:17.000000000 -0700 -@@ -51,10 +51,11 @@ - #include - #include - #define _LINUX_STRING_H_ --#include --#include -+#include "linux/cramfs_fs.h" - #include - -+#define BLKGETSIZE _IO(0x12,96) /* return device size /512 (long *arg) */ -+ - /* Exit codes used by fsck-type programs */ - #define FSCK_OK 0 /* No errors */ - #define FSCK_NONDESTRUCT 1 /* File system errors corrected */ -@@ -75,7 +76,7 @@ - static int opt_verbose = 0; /* 1 = verbose (-v), 2+ = very verbose (-vv) */ - #ifdef INCLUDE_FS_TESTS - static int opt_extract = 0; /* extract cramfs (-x) */ --static char *extract_dir = "root"; /* extraction directory (-x) */ -+static char *extract_dir = "/"; /* extraction directory (-x) */ - static uid_t euid; /* effective UID */ - - /* (cramfs_super + start) <= start_dir < end_dir <= start_data <= end_data */ -@@ -155,7 +156,7 @@ - } - - if (*length < sizeof(struct cramfs_super)) { -- die(FSCK_UNCORRECTED, 0, "file length too short"); -+ die(FSCK_UNCORRECTED, 0, "filesystem smaller than a cramfs superblock!"); - } - - /* find superblock */ -@@ -190,7 +191,8 @@ - die(FSCK_UNCORRECTED, 0, "zero file count"); - } - if (*length < super.size) { -- die(FSCK_UNCORRECTED, 0, "file length too short"); -+ die(FSCK_UNCORRECTED, 0, "file length too short, %lu is smaller than %lu", -+ *length, super.size); - } - else if (*length > super.size) { - fprintf(stderr, "warning: file extends past end of filesystem\n"); -@@ -267,11 +269,11 @@ - #ifdef INCLUDE_FS_TESTS - static void print_node(char type, struct cramfs_inode *i, char *name) - { -- char info[10]; -+ char info[11]; - - if (S_ISCHR(i->mode) || (S_ISBLK(i->mode))) { - /* major/minor numbers can be as high as 2^12 or 4096 */ -- snprintf(info, 10, "%4d,%4d", major(i->size), minor(i->size)); -+ snprintf(info, 11, "%4d,%4d", major(i->size), minor(i->size)); - } - else { - /* size be as high as 2^24 or 16777216 */ -@@ -445,8 +447,10 @@ - } - /* TODO: Do we need to check end_dir for empty case? */ - memcpy(newpath, path, pathlen); -- newpath[pathlen] = '/'; -- pathlen++; -+ if (pathlen > 1) { -+ newpath[pathlen] = '/'; -+ pathlen++; -+ } - if (opt_verbose) { - print_node('d', i, path); - } ---- cramfs-1.1.orig/device_table.txt 1969-12-31 17:00:00.000000000 -0700 -+++ cramfs-1.1/device_table.txt 2003-01-01 05:13:44.000000000 -0700 -@@ -0,0 +1,129 @@ -+# When building a target filesystem, it is desirable to not have to -+# become root and then run 'mknod' a thousand times. Using a device -+# table you can create device nodes and directories "on the fly". -+# -+# This is a sample device table file for use with mkcramfs. You can -+# do all sorts of interesting things with a device table file. For -+# example, if you want to adjust the permissions on a particular file -+# you can just add an entry like: -+# /sbin/foobar f 2755 0 0 - - - - - -+# and (assuming the file /sbin/foobar exists) it will be made setuid -+# root (regardless of what its permissions are on the host filesystem. -+# Furthermore, you can use a single table entry to create a many device -+# minors. For example, if I wanted to create /dev/hda and /dev/hda[0-15] -+# I could just use the following two table entries: -+# /dev/hda b 640 0 0 3 0 0 0 - -+# /dev/hda b 640 0 0 3 1 1 1 15 -+# -+# Device table entries take the form of: -+# -+# where name is the file name, type can be one of: -+# f A regular file -+# d Directory -+# c Character special device file -+# b Block special device file -+# p Fifo (named pipe) -+# uid is the user id for the target file, gid is the group id for the -+# target file. The rest of the entries (major, minor, etc) apply only -+# to device special files. -+ -+# Have fun -+# -Erik Andersen -+# -+ -+# -+/dev d 755 0 0 - - - - - -+/dev/mem c 640 0 0 1 1 0 0 - -+/dev/kmem c 640 0 0 1 2 0 0 - -+/dev/null c 640 0 0 1 3 0 0 - -+/dev/zero c 640 0 0 1 5 0 0 - -+/dev/random c 640 0 0 1 8 0 0 - -+/dev/urandom c 640 0 0 1 9 0 0 - -+/dev/tty c 666 0 0 5 0 0 0 - -+/dev/tty c 666 0 0 4 0 0 1 6 -+/dev/console c 640 0 0 5 1 0 0 - -+/dev/ram b 640 0 0 1 1 0 0 - -+/dev/ram b 640 0 0 1 0 0 1 4 -+/dev/loop b 640 0 0 7 0 0 1 2 -+/dev/ptmx c 666 0 0 5 2 0 0 - -+#/dev/ttyS c 640 0 0 4 64 0 1 4 -+#/dev/psaux c 640 0 0 10 1 0 0 - -+#/dev/rtc c 640 0 0 10 135 0 0 - -+ -+# Adjust permissions on some normal files -+#/etc/shadow f 600 0 0 - - - - - -+#/bin/tinylogin f 4755 0 0 - - - - - -+ -+# User-mode Linux stuff -+/dev/ubda b 640 0 0 98 0 0 0 - -+/dev/ubda b 640 0 0 98 1 1 1 15 -+ -+# IDE Devices -+/dev/hda b 640 0 0 3 0 0 0 - -+/dev/hda b 640 0 0 3 1 1 1 15 -+/dev/hdb b 640 0 0 3 64 0 0 - -+/dev/hdb b 640 0 0 3 65 1 1 15 -+#/dev/hdc b 640 0 0 22 0 0 0 - -+#/dev/hdc b 640 0 0 22 1 1 1 15 -+#/dev/hdd b 640 0 0 22 64 0 0 - -+#/dev/hdd b 640 0 0 22 65 1 1 15 -+#/dev/hde b 640 0 0 33 0 0 0 - -+#/dev/hde b 640 0 0 33 1 1 1 15 -+#/dev/hdf b 640 0 0 33 64 0 0 - -+#/dev/hdf b 640 0 0 33 65 1 1 15 -+#/dev/hdg b 640 0 0 34 0 0 0 - -+#/dev/hdg b 640 0 0 34 1 1 1 15 -+#/dev/hdh b 640 0 0 34 64 0 0 - -+#/dev/hdh b 640 0 0 34 65 1 1 15 -+ -+# SCSI Devices -+#/dev/sda b 640 0 0 8 0 0 0 - -+#/dev/sda b 640 0 0 8 1 1 1 15 -+#/dev/sdb b 640 0 0 8 16 0 0 - -+#/dev/sdb b 640 0 0 8 17 1 1 15 -+#/dev/sdc b 640 0 0 8 32 0 0 - -+#/dev/sdc b 640 0 0 8 33 1 1 15 -+#/dev/sdd b 640 0 0 8 48 0 0 - -+#/dev/sdd b 640 0 0 8 49 1 1 15 -+#/dev/sde b 640 0 0 8 64 0 0 - -+#/dev/sde b 640 0 0 8 65 1 1 15 -+#/dev/sdf b 640 0 0 8 80 0 0 - -+#/dev/sdf b 640 0 0 8 81 1 1 15 -+#/dev/sdg b 640 0 0 8 96 0 0 - -+#/dev/sdg b 640 0 0 8 97 1 1 15 -+#/dev/sdh b 640 0 0 8 112 0 0 - -+#/dev/sdh b 640 0 0 8 113 1 1 15 -+#/dev/sg c 640 0 0 21 0 0 1 15 -+#/dev/scd b 640 0 0 11 0 0 1 15 -+#/dev/st c 640 0 0 9 0 0 1 8 -+#/dev/nst c 640 0 0 9 128 0 1 8 -+#/dev/st c 640 0 0 9 32 1 1 4 -+#/dev/st c 640 0 0 9 64 1 1 4 -+#/dev/st c 640 0 0 9 96 1 1 4 -+ -+# Floppy disk devices -+#/dev/fd b 640 0 0 2 0 0 1 2 -+#/dev/fd0d360 b 640 0 0 2 4 0 0 - -+#/dev/fd1d360 b 640 0 0 2 5 0 0 - -+#/dev/fd0h1200 b 640 0 0 2 8 0 0 - -+#/dev/fd1h1200 b 640 0 0 2 9 0 0 - -+#/dev/fd0u1440 b 640 0 0 2 28 0 0 - -+#/dev/fd1u1440 b 640 0 0 2 29 0 0 - -+#/dev/fd0u2880 b 640 0 0 2 32 0 0 - -+#/dev/fd1u2880 b 640 0 0 2 33 0 0 - -+ -+# All the proprietary cdrom devices in the world -+#/dev/aztcd b 640 0 0 29 0 0 0 - -+#/dev/bpcd b 640 0 0 41 0 0 0 - -+#/dev/capi20 c 640 0 0 68 0 0 1 2 -+#/dev/cdu31a b 640 0 0 15 0 0 0 - -+#/dev/cdu535 b 640 0 0 24 0 0 0 - -+#/dev/cm206cd b 640 0 0 32 0 0 0 - -+#/dev/sjcd b 640 0 0 18 0 0 0 - -+#/dev/sonycd b 640 0 0 15 0 0 0 - -+#/dev/gscd b 640 0 0 16 0 0 0 - -+#/dev/sbpcd b 640 0 0 25 0 0 0 - -+#/dev/sbpcd b 640 0 0 25 0 0 1 4 -+#/dev/mcd b 640 0 0 23 0 0 0 - -+#/dev/optcd b 640 0 0 17 0 0 0 - -+ ---- cramfs-1.1.orig/mkcramfs.c 2002-02-20 01:03:32.000000000 -0700 -+++ cramfs-1.1/mkcramfs.c 2002-12-21 01:25:17.000000000 -0700 -@@ -1,3 +1,4 @@ -+/* vi: set sw=8 ts=8: */ - /* - * mkcramfs - make a cramfs file system - * -@@ -16,12 +17,21 @@ - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ * -+ * Added device table support (code taken from mkfs.jffs2.c, credit to -+ * Erik Andersen ) as well as an option to squash -+ * permissions. - Russ Dill September 2002 -+ * -+ * Reworked, cleaned up, and updated for cramfs-1.1, December 2002 -+ * - Erik Andersen -+ * - */ - - /* - * If you change the disk format of cramfs, please update fs/cramfs/README. - */ - -+#define _GNU_SOURCE - #include - #include - #include -@@ -33,8 +43,15 @@ - #include - #include - #include -+#include -+#include -+#include -+#include - #include - #include -+#ifdef DMALLOC -+#include -+#endif - - /* Exit codes used by mkfs-type programs */ - #define MKFS_OK 0 /* No errors */ -@@ -71,11 +88,17 @@ - + (1 << CRAMFS_SIZE_WIDTH) - 1 /* filesize */ \ - + (1 << CRAMFS_SIZE_WIDTH) * 4 / PAGE_CACHE_SIZE /* block pointers */ ) - -+ -+/* The kernel assumes PAGE_CACHE_SIZE as block size. */ -+#define PAGE_CACHE_SIZE (4096) -+ -+ - static const char *progname = "mkcramfs"; - static unsigned int blksize = PAGE_CACHE_SIZE; - static long total_blocks = 0, total_nodes = 1; /* pre-count the root node */ - static int image_length = 0; - -+ - /* - * If opt_holes is set, then mkcramfs can create explicit holes in the - * data, which saves 26 bytes per hole (which is a lot smaller a -@@ -91,10 +114,12 @@ - static int opt_holes = 0; - static int opt_pad = 0; - static int opt_verbose = 0; -+static int opt_squash = 0; - static char *opt_image = NULL; - static char *opt_name = NULL; - - static int warn_dev, warn_gid, warn_namelen, warn_skip, warn_size, warn_uid; -+static const char *const memory_exhausted = "memory exhausted"; - - /* In-core version of inode / directory entry. */ - struct entry { -@@ -123,7 +148,7 @@ - { - FILE *stream = status ? stderr : stdout; - -- fprintf(stream, "usage: %s [-h] [-e edition] [-i file] [-n name] dirname outfile\n" -+ fprintf(stream, "usage: %s [-h] [-e edition] [-i file] [-n name] [-D file] dirname outfile\n" - " -h print this help\n" - " -E make all warnings errors (non-zero exit status)\n" - " -e edition set edition number (part of fsid)\n" -@@ -133,39 +158,157 @@ - " -s sort directory entries (old option, ignored)\n" - " -v be more verbose\n" - " -z make explicit holes (requires >= 2.3.39)\n" -- " dirname root of the directory tree to be compressed\n" -+ " -D Use the named FILE as a device table file\n" -+ " -q squash permissions (make everything owned by root)\n" -+ " dirname root of the filesystem to be compressed\n" - " outfile output file\n", progname, PAD_SIZE); - - exit(status); - } - --static void die(int status, int syserr, const char *fmt, ...) -+static void verror_msg(const char *s, va_list p) -+{ -+ fflush(stdout); -+ fprintf(stderr, "mkcramfs: "); -+ vfprintf(stderr, s, p); -+} -+ -+static void vperror_msg(const char *s, va_list p) -+{ -+ int err = errno; -+ -+ if (s == 0) -+ s = ""; -+ verror_msg(s, p); -+ if (*s) -+ s = ": "; -+ fprintf(stderr, "%s%s\n", s, strerror(err)); -+} -+ -+static void perror_msg(const char *s, ...) -+{ -+ va_list p; -+ -+ va_start(p, s); -+ vperror_msg(s, p); -+ va_end(p); -+} -+ -+static void error_msg_and_die(const char *s, ...) -+{ -+ va_list p; -+ -+ va_start(p, s); -+ verror_msg(s, p); -+ va_end(p); -+ putc('\n', stderr); -+ exit(MKFS_ERROR); -+} -+ -+static void perror_msg_and_die(const char *s, ...) -+{ -+ va_list p; -+ -+ va_start(p, s); -+ vperror_msg(s, p); -+ va_end(p); -+ exit(MKFS_ERROR); -+} -+#ifndef DMALLOC -+extern char *xstrdup(const char *s) -+{ -+ char *t; -+ -+ if (s == NULL) -+ return NULL; -+ t = strdup(s); -+ if (t == NULL) -+ error_msg_and_die(memory_exhausted); -+ return t; -+} -+ -+extern void *xmalloc(size_t size) -+{ -+ void *ptr = malloc(size); -+ -+ if (ptr == NULL && size != 0) -+ error_msg_and_die(memory_exhausted); -+ return ptr; -+} -+ -+extern void *xcalloc(size_t nmemb, size_t size) -+{ -+ void *ptr = calloc(nmemb, size); -+ -+ if (ptr == NULL && nmemb != 0 && size != 0) -+ error_msg_and_die(memory_exhausted); -+ return ptr; -+} -+ -+extern void *xrealloc(void *ptr, size_t size) -+{ -+ ptr = realloc(ptr, size); -+ if (ptr == NULL && size != 0) -+ error_msg_and_die(memory_exhausted); -+ return ptr; -+} -+#endif -+ -+static FILE *xfopen(const char *path, const char *mode) - { -- va_list arg_ptr; -- int save = errno; -+ FILE *fp; -+ -+ if ((fp = fopen(path, mode)) == NULL) -+ perror_msg_and_die("%s", path); -+ return fp; -+} - -- fflush(0); -- va_start(arg_ptr, fmt); -- fprintf(stderr, "%s: ", progname); -- vfprintf(stderr, fmt, arg_ptr); -- if (syserr) { -- fprintf(stderr, ": %s", strerror(save)); -+extern int xopen(const char *pathname, int flags, mode_t mode) -+{ -+ int ret; -+ -+ if (flags & O_CREAT) -+ ret = open(pathname, flags, mode); -+ else -+ ret = open(pathname, flags); -+ if (ret == -1) { -+ perror_msg_and_die("%s", pathname); - } -- fprintf(stderr, "\n"); -- va_end(arg_ptr); -- exit(status); -+ return ret; - } - -+extern char *xreadlink(const char *path) -+{ -+ static const int GROWBY = 80; /* how large we will grow strings by */ -+ -+ char *buf = NULL; -+ int bufsize = 0, readsize = 0; -+ -+ do { -+ buf = xrealloc(buf, bufsize += GROWBY); -+ readsize = readlink(path, buf, bufsize); /* 1st try */ -+ if (readsize == -1) { -+ perror_msg("%s:%s", progname, path); -+ return NULL; -+ } -+ } -+ while (bufsize < readsize + 1); -+ -+ buf[readsize] = '\0'; -+ -+ return buf; -+} -+ - static void map_entry(struct entry *entry) - { - if (entry->path) { - entry->fd = open(entry->path, O_RDONLY); - if (entry->fd < 0) { -- die(MKFS_ERROR, 1, "open failed: %s", entry->path); -+ error_msg_and_die("open failed: %s", entry->path); - } - entry->uncompressed = mmap(NULL, entry->size, PROT_READ, MAP_PRIVATE, entry->fd, 0); - if (entry->uncompressed == MAP_FAILED) { -- die(MKFS_ERROR, 1, "mmap failed: %s", entry->path); -+ error_msg_and_die("mmap failed: %s", entry->path); - } - } - } -@@ -174,8 +317,9 @@ - { - if (entry->path) { - if (munmap(entry->uncompressed, entry->size) < 0) { -- die(MKFS_ERROR, 1, "munmap failed: %s", entry->path); -+ error_msg_and_die("munmap failed: %s", entry->path); - } -+ entry->uncompressed=NULL; - close(entry->fd); - } - } -@@ -204,7 +348,8 @@ - find_identical_file(orig->next, newfile)); - } - --static void eliminate_doubles(struct entry *root, struct entry *orig) { -+static void eliminate_doubles(struct entry *root, struct entry *orig) -+{ - if (orig) { - if (orig->size && (orig->path || orig->uncompressed)) - find_identical_file(root, orig); -@@ -232,10 +377,7 @@ - - /* Set up the path. */ - /* TODO: Reuse the parent's buffer to save memcpy'ing and duplication. */ -- path = malloc(len + 1 + MAX_INPUT_NAMELEN + 1); -- if (!path) { -- die(MKFS_ERROR, 1, "malloc failed"); -- } -+ path = xmalloc(len + 1 + MAX_INPUT_NAMELEN + 1); - memcpy(path, name, len); - endpath = path + len; - *endpath = '/'; -@@ -245,7 +387,7 @@ - dircount = scandir(name, &dirlist, 0, cramsort); - - if (dircount < 0) { -- die(MKFS_ERROR, 1, "scandir failed: %s", name); -+ error_msg_and_die("scandir failed: %s", name); - } - - /* process directory */ -@@ -269,25 +411,20 @@ - } - namelen = strlen(dirent->d_name); - if (namelen > MAX_INPUT_NAMELEN) { -- die(MKFS_ERROR, 0, -- "very long (%u bytes) filename found: %s\n" -- "please increase MAX_INPUT_NAMELEN in mkcramfs.c and recompile", -+ error_msg_and_die( -+ "Very long (%u bytes) filename `%s' found.\n" -+ " Please increase MAX_INPUT_NAMELEN in mkcramfs.c and recompile. Exiting.\n", - namelen, dirent->d_name); - } - memcpy(endpath, dirent->d_name, namelen + 1); - - if (lstat(path, &st) < 0) { -+ perror(endpath); - warn_skip = 1; - continue; - } -- entry = calloc(1, sizeof(struct entry)); -- if (!entry) { -- die(MKFS_ERROR, 1, "calloc failed"); -- } -- entry->name = strdup(dirent->d_name); -- if (!entry->name) { -- die(MKFS_ERROR, 1, "strdup failed"); -- } -+ entry = xcalloc(1, sizeof(struct entry)); -+ entry->name = xstrdup(dirent->d_name); - /* truncate multi-byte UTF-8 filenames on character boundary */ - if (namelen > CRAMFS_MAXPATHLEN) { - namelen = CRAMFS_MAXPATHLEN; -@@ -297,24 +434,25 @@ - namelen--; - /* are we reasonably certain it was UTF-8 ? */ - if (entry->name[namelen] < 0x80 || !namelen) { -- die(MKFS_ERROR, 0, "cannot truncate filenames not encoded in UTF-8"); -+ error_msg_and_die("cannot truncate filenames not encoded in UTF-8"); - } - } - entry->name[namelen] = '\0'; - } - entry->mode = st.st_mode; - entry->size = st.st_size; -- entry->uid = st.st_uid; -+ entry->uid = opt_squash ? 0 : st.st_uid; - if (entry->uid >= 1 << CRAMFS_UID_WIDTH) - warn_uid = 1; -- entry->gid = st.st_gid; -- if (entry->gid >= 1 << CRAMFS_GID_WIDTH) -+ entry->gid = opt_squash ? 0 : st.st_gid; -+ if (entry->gid >= 1 << CRAMFS_GID_WIDTH) { - /* TODO: We ought to replace with a default - gid instead of truncating; otherwise there - are security problems. Maybe mode should - be &= ~070. Same goes for uid once Linux - supports >16-bit uids. */ - warn_gid = 1; -+ } - size = sizeof(struct cramfs_inode) + ((namelen + 3) & ~3); - *fslen_ub += size; - if (S_ISDIR(st.st_mode)) { -@@ -325,21 +463,15 @@ - warn_skip = 1; - continue; - } -- entry->path = strdup(path); -- if (!entry->path) { -- die(MKFS_ERROR, 1, "strdup failed"); -- } -+ entry->path = xstrdup(path); - if ((entry->size >= 1 << CRAMFS_SIZE_WIDTH)) { - warn_size = 1; - entry->size = (1 << CRAMFS_SIZE_WIDTH) - 1; - } - } - } else if (S_ISLNK(st.st_mode)) { -- entry->uncompressed = malloc(entry->size); -+ entry->uncompressed = xreadlink(path); - if (!entry->uncompressed) { -- die(MKFS_ERROR, 1, "malloc failed"); -- } -- if (readlink(path, entry->uncompressed, entry->size) < 0) { - warn_skip = 1; - continue; - } -@@ -351,7 +483,7 @@ - if (entry->size & -(1<name); -+ error_msg_and_die("bogus file type: %s", entry->name); - } - - if (S_ISREG(st.st_mode) || S_ISLNK(st.st_mode)) { -@@ -378,7 +510,9 @@ - struct cramfs_super *super = (struct cramfs_super *) base; - unsigned int offset = sizeof(struct cramfs_super) + image_length; - -- offset += opt_pad; /* 0 if no padding */ -+ if (opt_pad) { -+ offset += opt_pad; /* 0 if no padding */ -+ } - - super->magic = CRAMFS_MAGIC; - super->flags = CRAMFS_FLAG_FSID_VERSION_2 | CRAMFS_FLAG_SORTED_DIRS; -@@ -414,10 +548,10 @@ - struct cramfs_inode *inode = (struct cramfs_inode *) (base + entry->dir_offset); - - if ((offset & 3) != 0) { -- die(MKFS_ERROR, 0, "illegal offset of %lu bytes", offset); -+ error_msg_and_die("illegal offset of %lu bytes", offset); - } - if (offset >= (1 << (2 + CRAMFS_OFFSET_WIDTH))) { -- die(MKFS_ERROR, 0, "filesystem too big"); -+ error_msg_and_die("filesystem too big"); - } - inode->offset = (offset >> 2); - } -@@ -429,7 +563,7 @@ - */ - static void print_node(struct entry *e) - { -- char info[10]; -+ char info[12]; - char type = '?'; - - if (S_ISREG(e->mode)) type = 'f'; -@@ -442,11 +576,11 @@ - - if (S_ISCHR(e->mode) || (S_ISBLK(e->mode))) { - /* major/minor numbers can be as high as 2^12 or 4096 */ -- snprintf(info, 10, "%4d,%4d", major(e->size), minor(e->size)); -+ snprintf(info, 11, "%4d,%4d", major(e->size), minor(e->size)); - } - else { - /* size be as high as 2^24 or 16777216 */ -- snprintf(info, 10, "%9d", e->size); -+ snprintf(info, 11, "%9d", e->size); - } - - printf("%c %04o %s %5d:%-3d %s\n", -@@ -462,17 +596,9 @@ - { - int stack_entries = 0; - int stack_size = 64; -- struct entry **entry_stack; -- -- entry_stack = malloc(stack_size * sizeof(struct entry *)); -- if (!entry_stack) { -- die(MKFS_ERROR, 1, "malloc failed"); -- } -- -- if (opt_verbose) { -- printf("root:\n"); -- } -+ struct entry **entry_stack = NULL; - -+ entry_stack = xmalloc(stack_size * sizeof(struct entry *)); - for (;;) { - int dir_start = stack_entries; - while (entry) { -@@ -506,10 +632,7 @@ - if (entry->child) { - if (stack_entries >= stack_size) { - stack_size *= 2; -- entry_stack = realloc(entry_stack, stack_size * sizeof(struct entry *)); -- if (!entry_stack) { -- die(MKFS_ERROR, 1, "realloc failed"); -- } -+ entry_stack = xrealloc(entry_stack, stack_size * sizeof(struct entry *)); - } - entry_stack[stack_entries] = entry; - stack_entries++; -@@ -543,7 +666,7 @@ - - set_data_offset(entry, base, offset); - if (opt_verbose) { -- printf("%s:\n", entry->name); -+ printf("'%s':\n", entry->name); - } - entry = entry->child; - } -@@ -553,16 +676,21 @@ - - static int is_zero(char const *begin, unsigned len) - { -- /* Returns non-zero iff the first LEN bytes from BEGIN are all NULs. */ -- return (len-- == 0 || -- (begin[0] == '\0' && -- (len-- == 0 || -- (begin[1] == '\0' && -- (len-- == 0 || -- (begin[2] == '\0' && -- (len-- == 0 || -- (begin[3] == '\0' && -- memcmp(begin, begin + 4, len) == 0)))))))); -+ if (opt_holes) -+ /* Returns non-zero iff the first LEN bytes from BEGIN are -+ all NULs. */ -+ return (len-- == 0 || -+ (begin[0] == '\0' && -+ (len-- == 0 || -+ (begin[1] == '\0' && -+ (len-- == 0 || -+ (begin[2] == '\0' && -+ (len-- == 0 || -+ (begin[3] == '\0' && -+ memcmp(begin, begin + 4, len) == 0)))))))); -+ else -+ /* Never create holes. */ -+ return 0; - } - - /* -@@ -575,37 +703,34 @@ - * Note that size > 0, as a zero-sized file wouldn't ever - * have gotten here in the first place. - */ --static unsigned int do_compress(char *base, unsigned int offset, char const *name, char *uncompressed, unsigned int size) -+static unsigned int do_compress(char *base, unsigned int offset, struct entry *entry) - { -+ unsigned int size = entry->size; - unsigned long original_size = size; - unsigned long original_offset = offset; - unsigned long new_size; - unsigned long blocks = (size - 1) / blksize + 1; - unsigned long curr = offset + 4 * blocks; - int change; -+ char *uncompressed = entry->uncompressed; - -- total_blocks += blocks; -+ total_blocks += blocks; - - do { - unsigned long len = 2 * blksize; - unsigned int input = size; -- int err; -- - if (input > blksize) - input = blksize; - size -= input; -- if (!(opt_holes && is_zero (uncompressed, input))) { -- err = compress2(base + curr, &len, uncompressed, input, Z_BEST_COMPRESSION); -- if (err != Z_OK) { -- die(MKFS_ERROR, 0, "compression error: %s", zError(err)); -- } -+ if (!is_zero (uncompressed, input)) { -+ compress(base + curr, &len, uncompressed, input); - curr += len; - } - uncompressed += input; - - if (len > blksize*2) { - /* (I don't think this can happen with zlib.) */ -- die(MKFS_ERROR, 0, "AIEEE: block \"compressed\" to > 2*blocklength (%ld)", len); -+ error_msg_and_die("AIEEE: block \"compressed\" to > 2*blocklength (%ld)\n", len); - } - - *(u32 *) (base + offset) = curr; -@@ -618,10 +743,12 @@ - st_blocks * 512. But if you say that then perhaps - administrative data should also be included in both. */ - change = new_size - original_size; -- if (opt_verbose > 1) { -- printf("%6.2f%% (%+d bytes)\t%s\n", -- (change * 100) / (double) original_size, change, name); -+#if 0 -+ if (opt_verbose) { -+ printf("%6.2f%% (%+d bytes)\t%s\n", -+ (change * 100) / (double) original_size, change, entry->name); - } -+#endif - - return curr; - } -@@ -644,7 +771,7 @@ - set_data_offset(entry, base, offset); - entry->offset = offset; - map_entry(entry); -- offset = do_compress(base, offset, entry->name, entry->uncompressed, entry->size); -+ offset = do_compress(base, offset, entry); - unmap_entry(entry); - } - } -@@ -660,13 +787,10 @@ - int fd; - char *buf; - -- fd = open(file, O_RDONLY); -- if (fd < 0) { -- die(MKFS_ERROR, 1, "open failed: %s", file); -- } -+ fd = xopen(file, O_RDONLY, 0); - buf = mmap(NULL, image_length, PROT_READ, MAP_PRIVATE, fd, 0); - if (buf == MAP_FAILED) { -- die(MKFS_ERROR, 1, "mmap failed"); -+ error_msg_and_die("mmap failed"); - } - memcpy(base + offset, buf, image_length); - munmap(buf, image_length); -@@ -679,6 +803,328 @@ - return (offset + image_length); - } - -+static struct entry *find_filesystem_entry(struct entry *dir, char *name, mode_t type) -+{ -+ struct entry *e = dir; -+ -+ if (S_ISDIR(dir->mode)) { -+ e = dir->child; -+ } -+ while (e) { -+ /* Only bother to do the expensive strcmp on matching file types */ -+ if (type == (e->mode & S_IFMT) && e->name) { -+ if (S_ISDIR(e->mode)) { -+ int len = strlen(e->name); -+ -+ /* Check if we are a parent of the correct path */ -+ if (strncmp(e->name, name, len) == 0) { -+ /* Is this an _exact_ match? */ -+ if (strcmp(name, e->name) == 0) { -+ return (e); -+ } -+ /* Looks like we found a parent of the correct path */ -+ if (name[len] == '/') { -+ if (e->child) { -+ return (find_filesystem_entry (e, name + len + 1, type)); -+ } else { -+ return NULL; -+ } -+ } -+ } -+ } else { -+ if (strcmp(name, e->name) == 0) { -+ return (e); -+ } -+ } -+ } -+ e = e->next; -+ } -+ return (NULL); -+} -+ -+void modify_entry(char *full_path, unsigned long uid, unsigned long gid, -+ unsigned long mode, unsigned long rdev, struct entry *root, loff_t *fslen_ub) -+{ -+ char *name, *path, *full; -+ struct entry *curr, *parent, *entry, *prev; -+ -+ full = xstrdup(full_path); -+ path = xstrdup(dirname(full)); -+ name = full_path + strlen(path) + 1; -+ free(full); -+ if (strcmp(path, "/") == 0) { -+ parent = root; -+ name = full_path + 1; -+ } else { -+ if (!(parent = find_filesystem_entry(root, path+1, S_IFDIR))) -+ error_msg_and_die("%s/%s: could not find parent\n", path, name); -+ } -+ if ((entry = find_filesystem_entry(parent, name, (mode & S_IFMT)))) { -+ /* its there, just modify permissions */ -+ entry->mode = mode; -+ entry->uid = uid; -+ entry->gid = gid; -+ } else { /* make a new entry */ -+ -+ /* code partially replicated from parse_directory() */ -+ size_t namelen; -+ if (S_ISREG(mode)) { -+ error_msg_and_die("%s: regular file from device_table file must exist on disk!", full_path); -+ } -+ -+ namelen = strlen(name); -+ if (namelen > MAX_INPUT_NAMELEN) { -+ error_msg_and_die( -+ "Very long (%u bytes) filename `%s' found.\n" -+ " Please increase MAX_INPUT_NAMELEN in mkcramfs.c and recompile. Exiting.\n", -+ namelen, name); -+ } -+ entry = xcalloc(1, sizeof(struct entry)); -+ entry->name = xstrdup(name); -+ /* truncate multi-byte UTF-8 filenames on character boundary */ -+ if (namelen > CRAMFS_MAXPATHLEN) { -+ namelen = CRAMFS_MAXPATHLEN; -+ warn_namelen = 1; -+ /* the first lost byte must not be a trail byte */ -+ while ((entry->name[namelen] & 0xc0) == 0x80) { -+ namelen--; -+ /* are we reasonably certain it was UTF-8 ? */ -+ if (entry->name[namelen] < 0x80 || !namelen) { -+ error_msg_and_die("cannot truncate filenames not encoded in UTF-8"); -+ } -+ } -+ entry->name[namelen] = '\0'; -+ } -+ entry->mode = mode; -+ entry->uid = uid; -+ entry->gid = gid; -+ entry->size = 0; -+ if (S_ISBLK(mode) || S_ISCHR(mode)) { -+ entry->size = rdev; -+ if (entry->size & -(1<size += sizeof(struct cramfs_inode) + ((namelen + 3) & ~3); -+ -+ /* alright, time to link us in */ -+ curr = parent->child; -+ prev = NULL; -+ while (curr && strcmp(name, curr->name) > 0) { -+ prev = curr; -+ curr = curr->next; -+ } -+ if (!prev) parent->child = entry; -+ else prev->next = entry; -+ entry->next = curr; -+ entry->child = NULL; -+ } -+ if (entry->uid >= 1 << CRAMFS_UID_WIDTH) -+ warn_uid = 1; -+ if (entry->gid >= 1 << CRAMFS_GID_WIDTH) { -+ /* TODO: We ought to replace with a default -+ gid instead of truncating; otherwise there -+ are security problems. Maybe mode should -+ be &= ~070. Same goes for uid once Linux -+ supports >16-bit uids. */ -+ warn_gid = 1; -+ } -+ free(path); -+} -+ -+/* the GNU C library has a wonderful scanf("%as", string) which will -+ allocate the string with the right size, good to avoid buffer overruns. -+ the following macros use it if available or use a hacky workaround... -+ */ -+ -+#ifdef __GNUC__ -+#define SCANF_PREFIX "a" -+#define SCANF_STRING(s) (&s) -+#define GETCWD_SIZE 0 -+#else -+#define SCANF_PREFIX "511" -+#define SCANF_STRING(s) (s = xmalloc(512)) -+#define GETCWD_SIZE -1 -+inline int snprintf(char *str, size_t n, const char *fmt, ...) -+{ -+ int ret; -+ va_list ap; -+ -+ va_start(ap, fmt); -+ ret = vsprintf(str, fmt, ap); -+ va_end(ap); -+ return ret; -+} -+#endif -+ -+/* device table entries take the form of: -+ -+ /dev/mem c 640 0 0 1 1 0 0 - -+ -+ type can be one of: -+ f A regular file -+ d Directory -+ c Character special device file -+ b Block special device file -+ p Fifo (named pipe) -+ -+ I don't bother with symlinks (permissions are irrelevant), hard -+ links (special cases of regular files), or sockets (why bother). -+ -+ Regular files must exist in the target root directory. If a char, -+ block, fifo, or directory does not exist, it will be created. -+*/ -+ -+static int interpret_table_entry(char *line, struct entry *root, loff_t *fslen_ub) -+{ -+ char type, *name = NULL; -+ unsigned long mode = 0755, uid = 0, gid = 0, major = 0, minor = 0; -+ unsigned long start = 0, increment = 1, count = 0; -+ -+ if (sscanf (line, "%" SCANF_PREFIX "s %c %lo %lu %lu %lu %lu %lu %lu %lu", -+ SCANF_STRING(name), &type, &mode, &uid, &gid, &major, &minor, -+ &start, &increment, &count) < 0) -+ { -+ return 1; -+ } -+ -+ if (!strcmp(name, "/")) { -+ error_msg_and_die("Device table entries require absolute paths"); -+ } -+ -+ switch (type) { -+ case 'd': -+ mode |= S_IFDIR; -+ modify_entry(name, uid, gid, mode, 0, root, fslen_ub); -+ break; -+ case 'f': -+ mode |= S_IFREG; -+ modify_entry(name, uid, gid, mode, 0, root, fslen_ub); -+ break; -+ case 'p': -+ mode |= S_IFIFO; -+ modify_entry(name, uid, gid, mode, 0, root, fslen_ub); -+ break; -+ case 'c': -+ case 'b': -+ mode |= (type == 'c') ? S_IFCHR : S_IFBLK; -+ if (count > 0) { -+ char *buf; -+ unsigned long i; -+ dev_t rdev; -+ -+ for (i = start; i < count; i++) { -+ asprintf(&buf, "%s%lu", name, i); -+ rdev = makedev(major, minor + (i * increment - start)); -+ modify_entry(buf, uid, gid, mode, rdev, root, fslen_ub); -+ free(buf); -+ } -+ } else { -+ dev_t rdev = makedev(major, minor); -+ modify_entry(name, uid, gid, mode, rdev, root, fslen_ub); -+ } -+ break; -+ default: -+ error_msg_and_die("Unsupported file type"); -+ } -+ free(name); -+ return 0; -+} -+ -+static int parse_device_table(FILE *file, struct entry *root, loff_t *fslen_ub) -+{ -+ char *line; -+ int status = 0; -+ size_t length = 0; -+ -+ /* Turn off squash, since we must ensure that values -+ * entered via the device table are not squashed */ -+ opt_squash = 0; -+ -+ /* Looks ok so far. The general plan now is to read in one -+ * line at a time, check for leading comment delimiters ('#'), -+ * then try and parse the line as a device table. If we fail -+ * to parse things, try and help the poor fool to fix their -+ * device table with a useful error msg... */ -+ line = NULL; -+ while (getline(&line, &length, file) != -1) { -+ /* First trim off any whitespace */ -+ int len = strlen(line); -+ -+ /* trim trailing whitespace */ -+ while (len > 0 && isspace(line[len - 1])) -+ line[--len] = '\0'; -+ /* trim leading whitespace */ -+ memmove(line, &line[strspn(line, " \n\r\t\v")], len); -+ -+ /* How long are we after trimming? */ -+ len = strlen(line); -+ -+ /* If this is NOT a comment line, try to interpret it */ -+ if (len && *line != '#') { -+ if (interpret_table_entry(line, root, fslen_ub)) -+ status = 1; -+ } -+ -+ free(line); -+ line = NULL; -+ } -+ free(line); -+ fclose(file); -+ -+ return status; -+} -+ -+void traverse(struct entry *entry, int depth) -+{ -+ struct entry *curr = entry; -+ int i; -+ -+ while (curr) { -+ for (i = 0; i < depth; i++) putchar(' '); -+ printf("%s: size=%d mode=%d same=%p\n", -+ (curr->name)? (char*)curr->name : "/", -+ curr->size, curr->mode, curr->same); -+ if (curr->child) traverse(curr->child, depth + 4); -+ curr = curr->next; -+ } -+} -+ -+static void free_filesystem_entry(struct entry *dir) -+{ -+ struct entry *e = dir, *last; -+ -+ if (S_ISDIR(dir->mode)) { -+ e = dir->child; -+ } -+ while (e) { -+ if (e->name) -+ free(e->name); -+ if (e->path) -+ free(e->path); -+ if (e->uncompressed) -+ free(e->uncompressed); -+ last = e; -+ if (e->child) { -+ free_filesystem_entry(e); -+ } -+ e = e->next; -+ free(last); -+ } -+} -+ -+ -+/* -+ * Usage: -+ * -+ * mkcramfs directory-name outfile -+ * -+ * where "directory-name" is simply the root of the directory -+ * tree that we want to generate a compressed filesystem out -+ * of. -+ */ - int main(int argc, char **argv) - { - struct stat st; /* used twice... */ -@@ -692,6 +1138,7 @@ - u32 crc; - int c; /* for getopt */ - char *ep; /* for strtoul */ -+ FILE *devtable = NULL; - - total_blocks = 0; - -@@ -699,7 +1146,7 @@ - progname = argv[0]; - - /* command line options */ -- while ((c = getopt(argc, argv, "hEe:i:n:psvz")) != EOF) { -+ while ((c = getopt(argc, argv, "hEe:i:n:psvzD:q")) != EOF) { - switch (c) { - case 'h': - usage(MKFS_OK); -@@ -715,7 +1162,7 @@ - case 'i': - opt_image = optarg; - if (lstat(opt_image, &st) < 0) { -- die(MKFS_ERROR, 1, "lstat failed: %s", opt_image); -+ error_msg_and_die("lstat failed: %s", opt_image); - } - image_length = st.st_size; /* may be padded later */ - fslen_ub += (image_length + 3); /* 3 is for padding */ -@@ -736,6 +1183,16 @@ - case 'z': - opt_holes = 1; - break; -+ case 'q': -+ opt_squash = 1; -+ break; -+ case 'D': -+ devtable = xfopen(optarg, "r"); -+ if (fstat(fileno(devtable), &st) < 0) -+ perror_msg_and_die(optarg); -+ if (st.st_size < 10) -+ error_msg_and_die("%s: not a proper device table file\n", optarg); -+ break; - } - } - -@@ -745,25 +1202,23 @@ - outfile = argv[optind + 1]; - - if (stat(dirname, &st) < 0) { -- die(MKFS_USAGE, 1, "stat failed: %s", dirname); -- } -- fd = open(outfile, O_WRONLY | O_CREAT | O_TRUNC, 0666); -- if (fd < 0) { -- die(MKFS_USAGE, 1, "open failed: %s", outfile); -+ error_msg_and_die("stat failed: %s", dirname); - } -+ fd = xopen(outfile, O_WRONLY | O_CREAT | O_TRUNC, 0666); - -- root_entry = calloc(1, sizeof(struct entry)); -- if (!root_entry) { -- die(MKFS_ERROR, 1, "calloc failed"); -- } -+ root_entry = xcalloc(1, sizeof(struct entry)); - root_entry->mode = st.st_mode; - root_entry->uid = st.st_uid; - root_entry->gid = st.st_gid; - - root_entry->size = parse_directory(root_entry, dirname, &root_entry->child, &fslen_ub); - -+ if (devtable) { -+ parse_device_table(devtable, root_entry, &fslen_ub); -+ } -+ - /* always allocate a multiple of blksize bytes because that's -- what we're going to write later on */ -+ what we're going to write later on */ - fslen_ub = ((fslen_ub - 1) | (blksize - 1)) + 1; - - if (fslen_ub > MAXFSLEN) { -@@ -790,7 +1245,7 @@ - rom_image = mmap(NULL, fslen_ub?fslen_ub:1, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - - if (rom_image == MAP_FAILED) { -- die(MKFS_ERROR, 1, "mmap failed"); -+ error_msg_and_die("mmap failed"); - } - - /* Skip the first opt_pad bytes for boot loader code */ -@@ -807,6 +1262,7 @@ - } - - offset = write_directory_structure(root_entry->child, rom_image, offset); -+ if (opt_verbose) - printf("Directory data: %d bytes\n", offset); - - offset = write_data(root_entry, rom_image, offset); -@@ -814,30 +1270,38 @@ - /* We always write a multiple of blksize bytes, so that - losetup works. */ - offset = ((offset - 1) | (blksize - 1)) + 1; -+ if (opt_verbose) - printf("Everything: %d kilobytes\n", offset >> 10); - - /* Write the superblock now that we can fill in all of the fields. */ - write_superblock(root_entry, rom_image+opt_pad, offset); -+ if (opt_verbose) - printf("Super block: %d bytes\n", sizeof(struct cramfs_super)); - - /* Put the checksum in. */ - crc = crc32(0L, Z_NULL, 0); - crc = crc32(crc, (rom_image+opt_pad), (offset-opt_pad)); - ((struct cramfs_super *) (rom_image+opt_pad))->fsid.crc = crc; -+ if (opt_verbose) - printf("CRC: %x\n", crc); - - /* Check to make sure we allocated enough space. */ - if (fslen_ub < offset) { -- die(MKFS_ERROR, 0, "not enough space allocated for ROM image (%Ld allocated, %d used)", fslen_ub, offset); -+ error_msg_and_die("not enough space allocated for ROM " -+ "image (%Ld allocated, %d used)", fslen_ub, offset); - } - - written = write(fd, rom_image, offset); - if (written < 0) { -- die(MKFS_ERROR, 1, "write failed"); -+ error_msg_and_die("write failed"); - } - if (offset != written) { -- die(MKFS_ERROR, 0, "ROM image write failed (wrote %d of %d bytes)", written, offset); -+ error_msg_and_die("ROM image write failed (wrote %d of %d bytes)", written, offset); - } -+ -+ /* Free up memory */ -+ free_filesystem_entry(root_entry); -+ free(root_entry); - - /* (These warnings used to come at the start, but they scroll off the - screen too quickly.) */ diff --git a/obsolete-buildroot/sources/device_table.txt b/obsolete-buildroot/sources/device_table.txt deleted file mode 100644 index 75d8068354..0000000000 --- a/obsolete-buildroot/sources/device_table.txt +++ /dev/null @@ -1,163 +0,0 @@ -# When building a target filesystem, it is desirable to not have to -# become root and then run 'mknod' a thousand times. Using a device -# table you can create device nodes and directories "on the fly". -# -# This is a sample device table file for use with genext2fs. You can -# do all sorts of interesting things with a device table file. For -# example, if you want to adjust the permissions on a particular file -# you can just add an entry like: -# /sbin/foobar f 2755 0 0 - - - - - -# and (assuming the file /sbin/foobar exists) it will be made setuid -# root (regardless of what its permissions are on the host filesystem. -# Furthermore, you can use a single table entry to create a many device -# minors. For example, if I wanted to create /dev/hda and /dev/hda[0-15] -# I could just use the following two table entries: -# /dev/hda b 640 0 0 3 0 0 0 - -# /dev/hda b 640 0 0 3 1 1 1 15 -# -# Device table entries take the form of: -# -# where name is the file name, type can be one of: -# f A regular file -# d Directory -# c Character special device file -# b Block special device file -# p Fifo (named pipe) -# uid is the user id for the target file, gid is the group id for the -# target file. The rest of the entries (major, minor, etc) apply only -# to device special files. - -# Have fun -# -Erik Andersen -# - -# -/dev d 755 0 0 - - - - - -/dev d 755 0 0 - - - - - -/dev/pts d 755 0 0 - - - - - -/tmp d 1777 0 0 - - - - - -/etc d 755 0 0 - - - - - -/home/default d 2755 1000 1000 - - - - - -/etc/network/if-up.d d 755 0 0 - - - - - -/etc/network/if-pre-up.d d 755 0 0 - - - - - -/etc/network/if-down.d d 755 0 0 - - - - - -/etc/network/if-post-down.d d 755 0 0 - - - - - -# Adjust permissions on some normal files -/etc/shadow f 600 0 0 - - - - - -/etc/passwd f 644 0 0 - - - - - -/bin/busybox f 4755 0 0 - - - - - -# uncomment this to allow starting x as non-root -#/usr/X11R6/bin/Xfbdev f 4755 0 0 - - - - - - -# Normal system devices -/dev/mem c 640 0 0 1 1 0 0 - -/dev/kmem c 640 0 0 1 2 0 0 - -/dev/null c 666 0 0 1 3 0 0 - -/dev/zero c 666 0 0 1 5 0 0 - -/dev/random c 666 0 0 1 8 0 0 - -/dev/urandom c 666 0 0 1 9 0 0 - -/dev/ram b 640 0 0 1 1 0 0 - -/dev/ram b 640 0 0 1 0 0 1 4 -/dev/loop b 640 0 0 7 0 0 1 2 -/dev/rtc c 640 0 0 10 135 - - - -/dev/console c 666 0 0 5 1 - - - -/dev/tty c 666 0 0 5 0 - - - -/dev/tty c 666 0 0 4 0 0 1 8 -/dev/ttyp c 666 0 0 3 0 0 1 10 -/dev/ptyp c 666 0 0 2 0 0 1 10 -/dev/ptmx c 666 0 0 5 2 - - - -/dev/ttyP c 666 0 0 57 0 0 1 4 -/dev/ttyS c 666 0 0 4 64 0 1 4 -/dev/fb c 640 0 5 29 0 0 32 4 -#/dev/ttySA c 666 0 0 204 5 0 1 3 -/dev/psaux c 666 0 0 10 1 0 0 - -#/dev/ppp c 666 0 0 108 0 - - - - -# MTD stuff -/dev/mtd c 640 0 0 90 0 0 2 4 -/dev/mtdblock b 640 0 0 31 0 0 1 4 - -#Tun/tap driver -/dev/net d 755 0 0 - - - - - -/dev/net/tun c 660 0 0 10 200 - - - - -# Audio stuff -#/dev/audio c 666 0 29 14 4 - - - -#/dev/audio1 c 666 0 29 14 20 - - - -#/dev/dsp c 666 0 29 14 3 - - - -#/dev/dsp1 c 666 0 29 14 19 - - - -#/dev/sndstat c 666 0 29 14 6 - - - - -# User-mode Linux stuff -/dev/ubda b 640 0 0 98 0 0 0 - -/dev/ubda b 640 0 0 98 1 1 1 15 - -# IDE Devices -/dev/hda b 640 0 0 3 0 0 0 - -/dev/hda b 640 0 0 3 1 1 1 15 -/dev/hdb b 640 0 0 3 64 0 0 - -/dev/hdb b 640 0 0 3 65 1 1 15 -#/dev/hdc b 640 0 0 22 0 0 0 - -#/dev/hdc b 640 0 0 22 1 1 1 15 -#/dev/hdd b 640 0 0 22 64 0 0 - -#/dev/hdd b 640 0 0 22 65 1 1 15 -#/dev/hde b 640 0 0 33 0 0 0 - -#/dev/hde b 640 0 0 33 1 1 1 15 -#/dev/hdf b 640 0 0 33 64 0 0 - -#/dev/hdf b 640 0 0 33 65 1 1 15 -#/dev/hdg b 640 0 0 34 0 0 0 - -#/dev/hdg b 640 0 0 34 1 1 1 15 -#/dev/hdh b 640 0 0 34 64 0 0 - -#/dev/hdh b 640 0 0 34 65 1 1 15 - -# SCSI Devices -#/dev/sda b 640 0 0 8 0 0 0 - -#/dev/sda b 640 0 0 8 1 1 1 15 -#/dev/sdb b 640 0 0 8 16 0 0 - -#/dev/sdb b 640 0 0 8 17 1 1 15 -#/dev/sdc b 640 0 0 8 32 0 0 - -#/dev/sdc b 640 0 0 8 33 1 1 15 -#/dev/sdd b 640 0 0 8 48 0 0 - -#/dev/sdd b 640 0 0 8 49 1 1 15 -#/dev/sde b 640 0 0 8 64 0 0 - -#/dev/sde b 640 0 0 8 65 1 1 15 -#/dev/sdf b 640 0 0 8 80 0 0 - -#/dev/sdf b 640 0 0 8 81 1 1 15 -#/dev/sdg b 640 0 0 8 96 0 0 - -#/dev/sdg b 640 0 0 8 97 1 1 15 -#/dev/sdh b 640 0 0 8 112 0 0 - -#/dev/sdh b 640 0 0 8 113 1 1 15 -#/dev/sg c 640 0 0 21 0 0 1 15 -#/dev/scd b 640 0 0 11 0 0 1 15 -#/dev/st c 640 0 0 9 0 0 1 8 -#/dev/nst c 640 0 0 9 128 0 1 8 -#/dev/st c 640 0 0 9 32 1 1 4 -#/dev/st c 640 0 0 9 64 1 1 4 -#/dev/st c 640 0 0 9 96 1 1 4 - -# Floppy disk devices -#/dev/fd b 640 0 0 2 0 0 1 2 -#/dev/fd0d360 b 640 0 0 2 4 0 0 - -#/dev/fd1d360 b 640 0 0 2 5 0 0 - -#/dev/fd0h1200 b 640 0 0 2 8 0 0 - -#/dev/fd1h1200 b 640 0 0 2 9 0 0 - -#/dev/fd0u1440 b 640 0 0 2 28 0 0 - -#/dev/fd1u1440 b 640 0 0 2 29 0 0 - -#/dev/fd0u2880 b 640 0 0 2 32 0 0 - -#/dev/fd1u2880 b 640 0 0 2 33 0 0 - - -# All the proprietary cdrom devices in the world -#/dev/aztcd b 640 0 0 29 0 0 0 - -#/dev/bpcd b 640 0 0 41 0 0 0 - -#/dev/capi20 c 640 0 0 68 0 0 1 2 -#/dev/cdu31a b 640 0 0 15 0 0 0 - -#/dev/cdu535 b 640 0 0 24 0 0 0 - -#/dev/cm206cd b 640 0 0 32 0 0 0 - -#/dev/sjcd b 640 0 0 18 0 0 0 - -#/dev/sonycd b 640 0 0 15 0 0 0 - -#/dev/gscd b 640 0 0 16 0 0 0 - -#/dev/sbpcd b 640 0 0 25 0 0 0 - -#/dev/sbpcd b 640 0 0 25 0 0 1 4 -#/dev/mcd b 640 0 0 23 0 0 0 - -#/dev/optcd b 640 0 0 17 0 0 0 - - diff --git a/obsolete-buildroot/sources/dnsmasq1-openwrt.patch b/obsolete-buildroot/sources/dnsmasq1-openwrt.patch deleted file mode 100644 index e1741a28a2..0000000000 --- a/obsolete-buildroot/sources/dnsmasq1-openwrt.patch +++ /dev/null @@ -1,219 +0,0 @@ -diff -x CVS -urN dnsmasq-1.18/dhcp.c dnsmasq.old/dhcp.c ---- dnsmasq-1.18/dhcp.c 2003-11-05 08:30:20.000000000 -0600 -+++ dnsmasq.old/dhcp.c 2004-01-05 23:40:11.000000000 -0600 -@@ -15,14 +15,20 @@ - - #include "dnsmasq.h" - --static int next_token (char *token, int buffsize, FILE * fp); -+struct dhcpOfferedAddr { -+ u_int8_t hostname[16]; -+ u_int8_t chaddr[16]; -+ u_int32_t yiaddr; /* network order */ -+ u_int32_t expires; /* host order */ -+}; - - void load_dhcp(char *file, char *suffix, time_t now, char *hostname) - { -- char token[MAXTOK], *dot; -+ char *dot; - struct all_addr host_address; -- time_t ttd, tts; -+ time_t ttd; - FILE *fp = fopen (file, "r"); -+ struct dhcpOfferedAddr lease; - - if (!fp) - { -@@ -34,154 +40,45 @@ - - /* remove all existing DHCP cache entries */ - cache_unhash_dhcp(); -- -- while ((next_token(token, MAXTOK, fp))) -- { -- if (strcmp(token, "lease") == 0) -- { -- hostname[0] = '\0'; -- ttd = tts = (time_t)(-1); --#ifdef HAVE_IPV6 -- if (next_token(token, MAXTOK, fp) && -- inet_pton(AF_INET, token, &host_address)) --#else -- if (next_token(token, MAXTOK, fp) && -- (host_address.addr4.s_addr = inet_addr(token)) != (in_addr_t) -1) --#endif -- { -- if (next_token(token, MAXTOK, fp) && *token == '{') -- { -- while (next_token(token, MAXTOK, fp) && *token != '}') -+ -+ while (fread(&lease, sizeof(lease), 1, fp)) { -+ host_address.addr.addr4.s_addr = lease.yiaddr; -+ -+ strcpy(hostname,lease.hostname); -+ if (lease.expires>(unsigned)now) -+ ttd = lease.expires; -+ else -+ ttd = -1; -+ dot = strchr(hostname, '.'); -+ if (suffix) - { -- if ((strcmp(token, "client-hostname") == 0) || -- (strcmp(token, "hostname") == 0)) -- { -- if (next_token(hostname, MAXDNAME, fp)) -- if (!canonicalise(hostname)) -- { -- *hostname = 0; -- syslog(LOG_ERR, "bad name in %s", file); -- } -- } -- else if ((strcmp(token, "ends") == 0) || -- (strcmp(token, "starts") == 0)) -- { -- struct tm lease_time; -- int is_ends = (strcmp(token, "ends") == 0); -- if (next_token(token, MAXTOK, fp) && /* skip weekday */ -- next_token(token, MAXTOK, fp) && /* Get date from lease file */ -- sscanf (token, "%d/%d/%d", -- &lease_time.tm_year, -- &lease_time.tm_mon, -- &lease_time.tm_mday) == 3 && -- next_token(token, MAXTOK, fp) && -- sscanf (token, "%d:%d:%d:", -- &lease_time.tm_hour, -- &lease_time.tm_min, -- &lease_time.tm_sec) == 3) -- { -- /* There doesn't seem to be a universally available library function -- which converts broken-down _GMT_ time to seconds-in-epoch. -- The following was borrowed from ISC dhcpd sources, where -- it is noted that it might not be entirely accurate for odd seconds. -- Since we're trying to get the same answer as dhcpd, that's just -- fine here. */ -- static int months [11] = { 31, 59, 90, 120, 151, 181, -- 212, 243, 273, 304, 334 }; -- time_t time = ((((((365 * (lease_time.tm_year - 1970) + /* Days in years since '70 */ -- (lease_time.tm_year - 1969) / 4 + /* Leap days since '70 */ -- (lease_time.tm_mon > 1 /* Days in months this year */ -- ? months [lease_time.tm_mon - 2] -- : 0) + -- (lease_time.tm_mon > 2 && /* Leap day this year */ -- !((lease_time.tm_year - 1972) & 3)) + -- lease_time.tm_mday - 1) * 24) + /* Day of month */ -- lease_time.tm_hour) * 60) + -- lease_time.tm_min) * 60) + lease_time.tm_sec; -- if (is_ends) -- ttd = time; -- else -- tts = time; } -+ if (dot) -+ { /* suffix and lease has ending: must match */ -+ if (strcmp(dot+1, suffix) != 0) -+ syslog(LOG_WARNING, -+ "Ignoring DHCP lease for %s because it has an illegal domain part", hostname); -+ else -+ cache_add_dhcp_entry(hostname, &host_address, ttd, F_REVERSE); - } -- } -- -- /* missing info? */ -- if (!*hostname) -- continue; -- if (ttd == (time_t)(-1)) -- continue; -- -- /* infinite lease to is represented by -1 */ -- /* This makes is to the lease file as -- start time one less than end time. */ -- /* We use -1 as infinite in ttd */ -- if ((tts != -1) && (ttd == tts - 1)) -- ttd = (time_t)(-1); -- else if (ttd < now) -- continue; -- -- dot = strchr(hostname, '.'); -- if (suffix) -- { -- if (dot) -- { /* suffix and lease has ending: must match */ -- if (strcmp(dot+1, suffix) != 0) -- syslog(LOG_WARNING, -- "Ignoring DHCP lease for %s because it has an illegal domain part", hostname); -- else -- cache_add_dhcp_entry(hostname, &host_address, ttd, F_REVERSE); -- } -- else -- { /* suffix exists but lease has no ending - add lease and lease.suffix */ -- cache_add_dhcp_entry(hostname, &host_address, ttd, 0); -- strncat(hostname, ".", MAXDNAME); -- strncat(hostname, suffix, MAXDNAME); -- hostname[MAXDNAME-1] = 0; /* in case strncat hit limit */ -- /* Make FQDN canonical for reverse lookups */ -- cache_add_dhcp_entry(hostname, &host_address, ttd, F_REVERSE); -- } -- } -- else -- { /* no suffix */ -- if (dot) /* no lease ending allowed */ -- syslog(LOG_WARNING, -- "Ignoring DHCP lease for %s because it has a domain part", hostname); -- else -- cache_add_dhcp_entry(hostname, &host_address, ttd, F_REVERSE); -- } -- } -- } -- } -- } -+ else -+ { /* suffix exists but lease has no ending - add lease and lease.suffix */ -+ cache_add_dhcp_entry(hostname, &host_address, ttd, 0); -+ strncat(hostname, ".", MAXDNAME); -+ strncat(hostname, suffix, MAXDNAME); -+ hostname[MAXDNAME-1] = 0; /* in case strncat hit limit */ -+ /* Make FQDN canonical for reverse lookups */ -+ cache_add_dhcp_entry(hostname, &host_address, ttd, F_REVERSE); -+ } -+ } -+ else -+ { /* no suffix */ -+ if (dot) /* no lease ending allowed */ -+ syslog(LOG_WARNING, -+ "Ignoring DHCP lease for %s because it has a domain part", hostname); -+ else -+ cache_add_dhcp_entry(hostname, &host_address, ttd, F_REVERSE); -+ } -+ } - fclose(fp); - - } -- --static int next_token (char *token, int buffsize, FILE * fp) --{ -- int c, count = 0; -- char *cp = token; -- -- while((c = getc(fp)) != EOF) -- { -- if (c == '#') -- do { c = getc(fp); } while (c != '\n' && c != EOF); -- -- if (c == ' ' || c == '\t' || c == '\n' || c == ';') -- { -- if (count) -- break; -- } -- else if ((c != '"') && (count + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* July 29, 2004 + * + * This is a hacked replacement for the 'trx' utility used to create + * wrt54g .trx firmware files. It isn't pretty, but it does the job + * for me. + * + * As an extension, you can specify a larger maximum length for the + * .trx file using '-m'. It will be rounded up to be a multiple of 4K. + * NOTE: This space will be malloc()'d. + * + * TODO: Support '-b' option to specify offsets for each file. + */ + +#include +#include +#include +#include +#include +#include +#include + +uint32_t crc32buf(char *buf, size_t len); + +/**********************************************************************/ +/* from trxhdr.h */ + +#define TRX_MAGIC 0x30524448 /* "HDR0" */ +#define TRX_VERSION 1 +#define TRX_MAX_LEN 0x3A0000 +#define TRX_NO_HEADER 1 /* Do not write TRX header */ + +struct trx_header { + uint32_t magic; /* "HDR0" */ + uint32_t len; /* Length of file including header */ + uint32_t crc32; /* 32-bit CRC from flag_version to end of file */ + uint32_t flag_version; /* 0:15 flags, 16:31 version */ + uint32_t offsets[3]; /* Offsets of partitions from start of header */ +}; + +/**********************************************************************/ + +void usage(void) __attribute__ (( __noreturn__ )); + +void usage(void) +{ + fprintf(stderr, "Usage: trx [-o outfile] [-m maxlen] file [file [file]]\n"); + exit(EXIT_FAILURE); +} + +int main(int argc, char **argv) +{ + FILE *out = stdout; + FILE *in; + char *ofn = NULL; + char *buf; + char *e; + int c, i; + size_t n; + unsigned long maxlen = TRX_MAX_LEN; + struct trx_header *p; + + fprintf(stderr, "mjn3's trx replacement - v0.80\n"); + + while ((c = getopt(argc, argv, "o:m:")) != -1) { + switch (c) { + case 'o': + ofn = optarg; + break; + case 'm': + errno = 0; + maxlen = strtoul(optarg, &e, 0); + if (errno || (e == optarg) || *e) { + fprintf(stderr, "illegal numeric string\n"); + usage(); + } +#undef ROUND +#define ROUND 0x1000 + if (maxlen & (ROUND-1)) { + maxlen += (ROUND - (maxlen & (ROUND-1))); + } + if (maxlen < ROUND) { + fprintf(stderr, "maxlen too small (or wrapped)\n"); + usage(); + } + break; + default: + usage(); + } + } + + if (ofn && !(out = fopen(ofn, "w"))) { + fprintf(stderr, "can not open \"%s\" for writing\n", ofn); + usage(); + } + + if (optind == argc) { + fprintf(stderr, "we require at least one arg\n"); + usage(); + } + + if (argc - optind > 3) { + fprintf(stderr, "too many args: %d > 3\n", argc - optind); + usage(); + } + + if (maxlen > TRX_MAX_LEN) { + fprintf(stderr, "WARNING: maxlen exceeds default maximum! Beware of overwriting nvram!\n"); + } + + if (!(buf = malloc(maxlen))) { + fprintf(stderr, "malloc failed\n"); + return EXIT_FAILURE; + } + + p = (struct trx_header *) buf; + + p->magic = TRX_MAGIC; + p->len = sizeof(struct trx_header); + p->flag_version = (TRX_VERSION << 16); + + i = 0; + + while (optind < argc) { + p->offsets[i++] = p->len; + + if (!(in = fopen(argv[optind], "r"))) { + fprintf(stderr, "can not open \"%s\" for reading\n", argv[optind]); + usage(); + } + + n = fread(buf + p->len, 1, maxlen - p->len, in); + if (!feof(in)) { + fprintf(stderr, "fread failure or file \"%s\" too large\n", + argv[optind]); + fclose(in); + return EXIT_FAILURE; + } + + fclose(in); + + ++optind; + + if (optind < argc) { +#undef ROUND +#define ROUND 4 + if (n & (ROUND-1)) { + memset(buf + p->len + n, 0, ROUND - (n & (ROUND-1))); + n += ROUND - (n & (ROUND-1)); + } + } + + p->len += n; + } + +#undef ROUND +#define ROUND 0x1000 + n = p->len & (ROUND-1); + if (n) { + memset(buf + p->len, 0, ROUND - n); + p->len += ROUND - n; + } + + p->crc32 = crc32buf((char *) &p->flag_version, + p->len - offsetof(struct trx_header, flag_version)); + + if (!fwrite(buf, p->len, 1, out) || fflush(out)) { + fprintf(stderr, "fwrite failed\n"); + return EXIT_FAILURE; + } + + fclose(out); + + return EXIT_SUCCESS; +} + +/**********************************************************************/ +/* The following was grabbed and tweaked from the old snippets collection + * of public domain C code. */ + +/**********************************************************************\ +|* Demonstration program to compute the 32-bit CRC used as the frame *| +|* check sequence in ADCCP (ANSI X3.66, also known as FIPS PUB 71 *| +|* and FED-STD-1003, the U.S. versions of CCITT's X.25 link-level *| +|* protocol). The 32-bit FCS was added via the Federal Register, *| +|* 1 June 1982, p.23798. I presume but don't know for certain that *| +|* this polynomial is or will be included in CCITT V.41, which *| +|* defines the 16-bit CRC (often called CRC-CCITT) polynomial. FIPS *| +|* PUB 78 says that the 32-bit FCS reduces otherwise undetected *| +|* errors by a factor of 10^-5 over 16-bit FCS. *| +\**********************************************************************/ + +/* Copyright (C) 1986 Gary S. Brown. You may use this program, or + code or tables extracted from it, as desired without restriction.*/ + +/* First, the polynomial itself and its table of feedback terms. The */ +/* polynomial is */ +/* X^32+X^26+X^23+X^22+X^16+X^12+X^11+X^10+X^8+X^7+X^5+X^4+X^2+X^1+X^0 */ +/* Note that we take it "backwards" and put the highest-order term in */ +/* the lowest-order bit. The X^32 term is "implied"; the LSB is the */ +/* X^31 term, etc. The X^0 term (usually shown as "+1") results in */ +/* the MSB being 1. */ + +/* Note that the usual hardware shift register implementation, which */ +/* is what we're using (we're merely optimizing it by doing eight-bit */ +/* chunks at a time) shifts bits into the lowest-order term. In our */ +/* implementation, that means shifting towards the right. Why do we */ +/* do it this way? Because the calculated CRC must be transmitted in */ +/* order from highest-order term to lowest-order term. UARTs transmit */ +/* characters in order from LSB to MSB. By storing the CRC this way, */ +/* we hand it to the UART in the order low-byte to high-byte; the UART */ +/* sends each low-bit to hight-bit; and the result is transmission bit */ +/* by bit from highest- to lowest-order term without requiring any bit */ +/* shuffling on our part. Reception works similarly. */ + +/* The feedback terms table consists of 256, 32-bit entries. Notes: */ +/* */ +/* 1. The table can be generated at runtime if desired; code to do so */ +/* is shown later. It might not be obvious, but the feedback */ +/* terms simply represent the results of eight shift/xor opera- */ +/* tions for all combinations of data and CRC register values. */ +/* */ +/* 2. The CRC accumulation logic is the same for all CRC polynomials, */ +/* be they sixteen or thirty-two bits wide. You simply choose the */ +/* appropriate table. Alternatively, because the table can be */ +/* generated at runtime, you can start by generating the table for */ +/* the polynomial in question and use exactly the same "updcrc", */ +/* if your application needn't simultaneously handle two CRC */ +/* polynomials. (Note, however, that XMODEM is strange.) */ +/* */ +/* 3. For 16-bit CRCs, the table entries need be only 16 bits wide; */ +/* of course, 32-bit entries work OK if the high 16 bits are zero. */ +/* */ +/* 4. The values must be right-shifted by eight bits by the "updcrc" */ +/* logic; the shift must be unsigned (bring in zeroes). On some */ +/* hardware you could probably optimize the shift in assembler by */ +/* using byte-swap instructions. */ + +static const uint32_t crc_32_tab[] = { /* CRC polynomial 0xedb88320 */ +0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, +0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, +0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2, +0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, +0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, +0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, +0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c, +0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, +0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, +0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, +0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x01db7106, +0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433, +0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, +0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, +0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, +0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, +0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7, +0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, +0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, +0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, +0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81, +0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, +0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, 0xe3630b12, 0x94643b84, +0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, +0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, +0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, +0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e, +0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, +0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, +0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, +0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28, +0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, +0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f, +0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, +0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, +0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777, +0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69, +0x616bffd3, 0x166ccf45, 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, +0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, +0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, +0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693, +0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, +0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d +}; + +#define UPDC32(octet,crc) (crc_32_tab[((crc) ^ (octet)) & 0xff] ^ ((crc) >> 8)) + +uint32_t crc32buf(char *buf, size_t len) +{ + uint32_t crc; + + crc = 0xFFFFFFFF; + + for ( ; len; --len, ++buf) + { + crc = UPDC32(*buf, crc); + } + + return crc; +} diff --git a/obsolete-buildroot/sources/target_skeleton/etc/TZ b/obsolete-buildroot/sources/target_skeleton/etc/TZ deleted file mode 100644 index 9fcb2a3c56..0000000000 --- a/obsolete-buildroot/sources/target_skeleton/etc/TZ +++ /dev/null @@ -1 +0,0 @@ -MST7MDT diff --git a/obsolete-buildroot/sources/target_skeleton/etc/fstab b/obsolete-buildroot/sources/target_skeleton/etc/fstab deleted file mode 100644 index 6d33629a7b..0000000000 --- a/obsolete-buildroot/sources/target_skeleton/etc/fstab +++ /dev/null @@ -1,8 +0,0 @@ -# /etc/fstab: static file system information. -# -# -/dev/root / ext2 rw,noauto 0 1 -proc /proc proc defaults 0 0 -devpts /dev/pts devpts defaults,gid=5,mode=620 0 0 -tmpfs /tmp tmpfs defaults 0 0 - diff --git a/obsolete-buildroot/sources/target_skeleton/etc/group b/obsolete-buildroot/sources/target_skeleton/etc/group deleted file mode 100644 index a21ef0f769..0000000000 --- a/obsolete-buildroot/sources/target_skeleton/etc/group +++ /dev/null @@ -1,10 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -utmp:x:43: -staff:x:50: -default:x:1000: diff --git a/obsolete-buildroot/sources/target_skeleton/etc/hostname b/obsolete-buildroot/sources/target_skeleton/etc/hostname deleted file mode 100644 index 52e67d68aa..0000000000 --- a/obsolete-buildroot/sources/target_skeleton/etc/hostname +++ /dev/null @@ -1 +0,0 @@ -uclibc diff --git a/obsolete-buildroot/sources/target_skeleton/etc/hosts b/obsolete-buildroot/sources/target_skeleton/etc/hosts deleted file mode 100644 index ba712fe033..0000000000 --- a/obsolete-buildroot/sources/target_skeleton/etc/hosts +++ /dev/null @@ -1 +0,0 @@ -127.0.0.1 localhost diff --git a/obsolete-buildroot/sources/target_skeleton/etc/init.d/S20urandom b/obsolete-buildroot/sources/target_skeleton/etc/init.d/S20urandom deleted file mode 100755 index 433fafee4e..0000000000 --- a/obsolete-buildroot/sources/target_skeleton/etc/init.d/S20urandom +++ /dev/null @@ -1,44 +0,0 @@ -#! /bin/sh -# -# urandom This script saves the random seed between reboots. -# It is called from the boot, halt and reboot scripts. -# -# Version: @(#)urandom 1.33 22-Jun-1998 miquels@cistron.nl -# - -[ -c /dev/urandom ] || exit 0 -#. /etc/default/rcS - -case "$1" in - start|"") - if [ "$VERBOSE" != no ] - then - echo -n "Initializing random number generator... " - fi - # Load and then save 512 bytes, - # which is the size of the entropy pool - if [ -f /etc/random-seed ] - then - cat /etc/random-seed >/dev/urandom - fi - rm -f /etc/random-seed - umask 077 - dd if=/dev/urandom of=/etc/random-seed count=1 \ - >/dev/null 2>&1 || echo "urandom start: failed." - umask 022 - [ "$VERBOSE" != no ] && echo "done." - ;; - stop) - # Carry a random seed from shut-down to start-up; - # see documentation in linux/drivers/char/random.c - [ "$VERBOSE" != no ] && echo -n "Saving random seed... " - umask 077 - dd if=/dev/urandom of=/etc/random-seed count=1 \ - >/dev/null 2>&1 || echo "urandom stop: failed." - [ "$VERBOSE" != no ] && echo "done." - ;; - *) - echo "Usage: urandom {start|stop}" >&2 - exit 1 - ;; -esac diff --git a/obsolete-buildroot/sources/target_skeleton/etc/init.d/S40network b/obsolete-buildroot/sources/target_skeleton/etc/init.d/S40network deleted file mode 100755 index d835d9c72a..0000000000 --- a/obsolete-buildroot/sources/target_skeleton/etc/init.d/S40network +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -# -# Start the network.... -# - -start() { - echo "Starting network..." - /sbin/ifup -a -} -stop() { - echo -n "Stopping network..." - /sbin/ifdown -a -} -restart() { - stop - start -} - -case "$1" in - start) - start - ;; - stop) - stop - ;; - restart|reload) - restart - ;; - *) - echo $"Usage: $0 {start|stop|restart}" - exit 1 -esac - -exit $? - diff --git a/obsolete-buildroot/sources/target_skeleton/etc/init.d/rcS b/obsolete-buildroot/sources/target_skeleton/etc/init.d/rcS deleted file mode 100755 index de411534da..0000000000 --- a/obsolete-buildroot/sources/target_skeleton/etc/init.d/rcS +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh - - -# Start all init scripts in /etc/init.d -# executing them in numerical order. -# -for i in /etc/init.d/S??* ;do - - # Ignore dangling symlinks (if any). - [ ! -f "$i" ] && continue - - case "$i" in - *.sh) - # Source shell script for speed. - ( - trap - INT QUIT TSTP - set start - . $i - ) - ;; - *) - # No sh extension, so fork subprocess. - $i start - ;; - esac -done - diff --git a/obsolete-buildroot/sources/target_skeleton/etc/inittab b/obsolete-buildroot/sources/target_skeleton/etc/inittab deleted file mode 100644 index a6c014e751..0000000000 --- a/obsolete-buildroot/sources/target_skeleton/etc/inittab +++ /dev/null @@ -1,47 +0,0 @@ -# /etc/inittab -# -# Copyright (C) 2001 Erik Andersen -# -# Note: BusyBox init doesn't support runlevels. The runlevels field is -# completely ignored by BusyBox init. If you want runlevels, use -# sysvinit. -# -# Format for each entry: ::: -# -# id == tty to run on, or empty for /dev/console -# runlevels == ignored -# action == one of sysinit, respawn, askfirst, wait, and once -# process == program to run - -# Startup the system -null::sysinit:/bin/mount -o remount,rw / -null::sysinit:/bin/mount -t proc proc /proc -null::sysinit:/bin/mount -a -null::sysinit:/bin/hostname -F /etc/hostname -null::sysinit:/sbin/ifconfig lo 127.0.0.1 up -null::sysinit:/sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo -# now run any rc scripts -::sysinit:/etc/init.d/rcS - -# Set up a couple of getty's -tty1::respawn:/sbin/getty 38400 tty1 -tty2::respawn:/sbin/getty 38400 tty2 - -# Put a getty on the serial port -#ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100 - -# Logging junk -null::sysinit:/bin/touch /var/log/messages -null::respawn:/sbin/syslogd -n -m 0 -null::respawn:/sbin/klogd -n -tty3::respawn:/usr/bin/tail -f /var/log/messages - -# Stuff to do for the 3-finger salute -::ctrlaltdel:/sbin/reboot - -# Stuff to do before rebooting -null::shutdown:/usr/bin/killall klogd -null::shutdown:/usr/bin/killall syslogd -null::shutdown:/bin/umount -a -r -null::shutdown:/sbin/swapoff -a - diff --git a/obsolete-buildroot/sources/target_skeleton/etc/inputrc b/obsolete-buildroot/sources/target_skeleton/etc/inputrc deleted file mode 100644 index 2f1cb601a5..0000000000 --- a/obsolete-buildroot/sources/target_skeleton/etc/inputrc +++ /dev/null @@ -1,44 +0,0 @@ -# /etc/inputrc - global inputrc for libreadline -# See readline(3readline) and `info readline' for more information. - -# Be 8 bit clean. -set input-meta on -set output-meta on -set bell-style visible - -# To allow the use of 8bit-characters like the german umlauts, comment out -# the line below. However this makes the meta key not work as a meta key, -# which is annoying to those which don't need to type in 8-bit characters. - -# set convert-meta off - -"\e0d": backward-word -"\e0c": forward-word -"\e[h": beginning-of-line -"\e[f": end-of-line -"\e[1~": beginning-of-line -"\e[4~": end-of-line -#"\e[5~": beginning-of-history -#"\e[6~": end-of-history -"\e[3~": delete-char -"\e[2~": quoted-insert - -# Common standard keypad and cursor -# (codes courtsey Werner Fink, ) -#"\e[1~": history-search-backward -"\e[2~": yank -"\e[3~": delete-char -#"\e[4~": set-mark -"\e[5~": history-search-backward -"\e[6~": history-search-forward -# Normal keypad and cursor of xterm -"\e[F": end-of-line -"\e[H": beginning-of-line -# Application keypad and cursor of xterm -"\eOA": previous-history -"\eOC": forward-char -"\eOB": next-history -"\eOD": backward-char -"\eOF": end-of-line -"\eOH": beginning-of-line - diff --git a/obsolete-buildroot/sources/target_skeleton/etc/issue b/obsolete-buildroot/sources/target_skeleton/etc/issue deleted file mode 100644 index f24b862c97..0000000000 --- a/obsolete-buildroot/sources/target_skeleton/etc/issue +++ /dev/null @@ -1,4 +0,0 @@ - - -Welcome to the Erik's uClibc development environment. - diff --git a/obsolete-buildroot/sources/target_skeleton/etc/network/interfaces b/obsolete-buildroot/sources/target_skeleton/etc/network/interfaces deleted file mode 100644 index 218b82cde5..0000000000 --- a/obsolete-buildroot/sources/target_skeleton/etc/network/interfaces +++ /dev/null @@ -1,4 +0,0 @@ -# Configure Loopback -auto lo -iface lo inet loopback - diff --git a/obsolete-buildroot/sources/target_skeleton/etc/passwd b/obsolete-buildroot/sources/target_skeleton/etc/passwd deleted file mode 100644 index e0f473fc7b..0000000000 --- a/obsolete-buildroot/sources/target_skeleton/etc/passwd +++ /dev/null @@ -1,13 +0,0 @@ -root:x:0:0:root:/root:/bin/sh -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:100:sync:/bin:/bin/sync -mail:x:8:8:mail:/var/spool/mail:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -operator:x:37:37:Operator:/var:/bin/sh -sshd:x:103:99:Operator:/var:/bin/sh -nobody:x:99:99:nobody:/home:/bin/sh -default:x:1000:1000:Default non-root user:/home/default:/bin/sh diff --git a/obsolete-buildroot/sources/target_skeleton/etc/profile b/obsolete-buildroot/sources/target_skeleton/etc/profile deleted file mode 100644 index cc2e0beb87..0000000000 --- a/obsolete-buildroot/sources/target_skeleton/etc/profile +++ /dev/null @@ -1,48 +0,0 @@ -# ~/.bashrc: executed by bash(1) for non-login interactive shells. - -export PATH=\ -/bin:\ -/sbin:\ -/usr/bin:\ -/usr/sbin:\ -/usr/bin/X11:\ -/usr/local/bin - -# If running interactively, then: -if [ "$PS1" ]; then - - if [ "$BASH" ]; then - export PS1="[\u@\h \W]\\$ " - alias ll='/bin/ls --color=tty -laFh' - alias ls='/bin/ls --color=tty -F' - export LS_COLORS='no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.png=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:'; - else - if [ "`id -u`" -eq 0 ]; then - export PS1='# ' - else - export PS1='$ ' - fi - fi - - export USER=`id -un` - export LOGNAME=$USER - export HOSTNAME=`/bin/hostname` - export HISTSIZE=1000 - export HISTFILESIZE=1000 - export PAGER='/bin/more ' - export EDITOR='/bin/vi' - export INPUTRC=/etc/inputrc - export DMALLOC_OPTIONS=debug=0x34f47d83,inter=100,log=logfile - - ### Some aliases - alias ps2='ps facux ' - alias ps1='ps faxo "%U %t %p %a" ' - alias af='ps af' - alias cls='clear' - alias df='df -h' - alias indent='indent -bad -bap -bbo -nbc -br -brs -c33 -cd33 -ncdb -ce -ci4 -cli0 -cp33 -cs -d0 -di1 -nfc1 -nfca -hnl -i4 -ip0 -l75 -lp -npcs -npsl -nsc -nsob -nss -ts4 ' - #alias bc='bc -l' - alias minicom='minicom -c on' - alias calc='calc -Cd ' - alias bc='calc -Cd ' -fi; diff --git a/obsolete-buildroot/sources/target_skeleton/etc/protocols b/obsolete-buildroot/sources/target_skeleton/etc/protocols deleted file mode 100644 index 98f9f2d30e..0000000000 --- a/obsolete-buildroot/sources/target_skeleton/etc/protocols +++ /dev/null @@ -1,31 +0,0 @@ -# /etc/protocols: -# $Id$ -# -# Internet (IP) protocols -# -# from: @(#)protocols 5.1 (Berkeley) 4/17/89 -# -# Updated for NetBSD based on RFC 1340, Assigned Numbers (July 1992). - -ip 0 IP # internet protocol, pseudo protocol number -icmp 1 ICMP # internet control message protocol -igmp 2 IGMP # Internet Group Management -ggp 3 GGP # gateway-gateway protocol -ipencap 4 IP-ENCAP # IP encapsulated in IP (officially ``IP'') -st 5 ST # ST datagram mode -tcp 6 TCP # transmission control protocol -egp 8 EGP # exterior gateway protocol -pup 12 PUP # PARC universal packet protocol -udp 17 UDP # user datagram protocol -hmp 20 HMP # host monitoring protocol -xns-idp 22 XNS-IDP # Xerox NS IDP -rdp 27 RDP # "reliable datagram" protocol -iso-tp4 29 ISO-TP4 # ISO Transport Protocol class 4 -xtp 36 XTP # Xpress Tranfer Protocol -ddp 37 DDP # Datagram Delivery Protocol -idpr-cmtp 39 IDPR-CMTP # IDPR Control Message Transport -rspf 73 RSPF #Radio Shortest Path First. -vmtp 81 VMTP # Versatile Message Transport -ospf 89 OSPFIGP # Open Shortest Path First IGP -ipip 94 IPIP # Yet Another IP encapsulation -encap 98 ENCAP # Yet Another IP encapsulation diff --git a/obsolete-buildroot/sources/target_skeleton/etc/random-seed b/obsolete-buildroot/sources/target_skeleton/etc/random-seed deleted file mode 100644 index fbc7352fbb..0000000000 Binary files a/obsolete-buildroot/sources/target_skeleton/etc/random-seed and /dev/null differ diff --git a/obsolete-buildroot/sources/target_skeleton/etc/resolv.conf b/obsolete-buildroot/sources/target_skeleton/etc/resolv.conf deleted file mode 100644 index 71a86dd76c..0000000000 --- a/obsolete-buildroot/sources/target_skeleton/etc/resolv.conf +++ /dev/null @@ -1,2 +0,0 @@ -domain dev.null -nameserver 127.0.0.1 diff --git a/obsolete-buildroot/sources/target_skeleton/etc/securetty b/obsolete-buildroot/sources/target_skeleton/etc/securetty deleted file mode 100644 index 81616f38ea..0000000000 --- a/obsolete-buildroot/sources/target_skeleton/etc/securetty +++ /dev/null @@ -1,12 +0,0 @@ -tty1 -tty2 -tty3 -tty4 -tty5 -tty6 -tty7 -tty8 -ttyS0 -ttyS1 -ttyS2 -ttyS3 diff --git a/obsolete-buildroot/sources/target_skeleton/etc/services b/obsolete-buildroot/sources/target_skeleton/etc/services deleted file mode 100644 index 13718ef3de..0000000000 --- a/obsolete-buildroot/sources/target_skeleton/etc/services +++ /dev/null @@ -1,302 +0,0 @@ -# /etc/services: -# $Id$ -# -# Network services, Internet style -# -# Note that it is presently the policy of IANA to assign a single well-known -# port number for both TCP and UDP; hence, most entries here have two entries -# even if the protocol doesn't support UDP operations. -# Updated from RFC 1700, ``Assigned Numbers'' (October 1994). Not all ports -# are included, only the more common ones. - -tcpmux 1/tcp # TCP port service multiplexer -echo 7/tcp -echo 7/udp -discard 9/tcp sink null -discard 9/udp sink null -systat 11/tcp users -daytime 13/tcp -daytime 13/udp -netstat 15/tcp -qotd 17/tcp quote -msp 18/tcp # message send protocol -msp 18/udp # message send protocol -chargen 19/tcp ttytst source -chargen 19/udp ttytst source -ftp-data 20/tcp -ftp 21/tcp -fsp 21/udp fspd -ssh 22/tcp # SSH Remote Login Protocol -ssh 22/udp # SSH Remote Login Protocol -telnet 23/tcp -# 24 - private -smtp 25/tcp mail -# 26 - unassigned -time 37/tcp timserver -time 37/udp timserver -rlp 39/udp resource # resource location -nameserver 42/tcp name # IEN 116 -whois 43/tcp nicname -re-mail-ck 50/tcp # Remote Mail Checking Protocol -re-mail-ck 50/udp # Remote Mail Checking Protocol -domain 53/tcp nameserver # name-domain server -domain 53/udp nameserver -mtp 57/tcp # deprecated -bootps 67/tcp # BOOTP server -bootps 67/udp -bootpc 68/tcp # BOOTP client -bootpc 68/udp -tftp 69/udp -gopher 70/tcp # Internet Gopher -gopher 70/udp -rje 77/tcp netrjs -finger 79/tcp -www 80/tcp http # WorldWideWeb HTTP -www 80/udp # HyperText Transfer Protocol -link 87/tcp ttylink -kerberos 88/tcp kerberos5 krb5 # Kerberos v5 -kerberos 88/udp kerberos5 krb5 # Kerberos v5 -supdup 95/tcp -# 100 - reserved -hostnames 101/tcp hostname # usually from sri-nic -iso-tsap 102/tcp tsap # part of ISODE. -csnet-ns 105/tcp cso-ns # also used by CSO name server -csnet-ns 105/udp cso-ns -# unfortunately the poppassd (Eudora) uses a port which has already -# been assigned to a different service. We list the poppassd as an -# alias here. This should work for programs asking for this service. -# (due to a bug in inetd the 3com-tsmux line is disabled) -#3com-tsmux 106/tcp poppassd -#3com-tsmux 106/udp poppassd -rtelnet 107/tcp # Remote Telnet -rtelnet 107/udp -pop-2 109/tcp postoffice # POP version 2 -pop-2 109/udp -pop-3 110/tcp # POP version 3 -pop-3 110/udp -sunrpc 111/tcp portmapper # RPC 4.0 portmapper TCP -sunrpc 111/udp portmapper # RPC 4.0 portmapper UDP -auth 113/tcp authentication tap ident -sftp 115/tcp -uucp-path 117/tcp -nntp 119/tcp readnews untp # USENET News Transfer Protocol -ntp 123/tcp -ntp 123/udp # Network Time Protocol -netbios-ns 137/tcp # NETBIOS Name Service -netbios-ns 137/udp -netbios-dgm 138/tcp # NETBIOS Datagram Service -netbios-dgm 138/udp -netbios-ssn 139/tcp # NETBIOS session service -netbios-ssn 139/udp -imap2 143/tcp # Interim Mail Access Proto v2 -imap2 143/udp -snmp 161/udp # Simple Net Mgmt Proto -snmp-trap 162/udp snmptrap # Traps for SNMP -cmip-man 163/tcp # ISO mgmt over IP (CMOT) -cmip-man 163/udp -cmip-agent 164/tcp -cmip-agent 164/udp -xdmcp 177/tcp # X Display Mgr. Control Proto -xdmcp 177/udp -nextstep 178/tcp NeXTStep NextStep # NeXTStep window -nextstep 178/udp NeXTStep NextStep # server -bgp 179/tcp # Border Gateway Proto. -bgp 179/udp -prospero 191/tcp # Cliff Neuman's Prospero -prospero 191/udp -irc 194/tcp # Internet Relay Chat -irc 194/udp -smux 199/tcp # SNMP Unix Multiplexer -smux 199/udp -at-rtmp 201/tcp # AppleTalk routing -at-rtmp 201/udp -at-nbp 202/tcp # AppleTalk name binding -at-nbp 202/udp -at-echo 204/tcp # AppleTalk echo -at-echo 204/udp -at-zis 206/tcp # AppleTalk zone information -at-zis 206/udp -qmtp 209/tcp # The Quick Mail Transfer Protocol -qmtp 209/udp # The Quick Mail Transfer Protocol -z3950 210/tcp wais # NISO Z39.50 database -z3950 210/udp wais -ipx 213/tcp # IPX -ipx 213/udp -imap3 220/tcp # Interactive Mail Access -imap3 220/udp # Protocol v3 -ulistserv 372/tcp # UNIX Listserv -ulistserv 372/udp -https 443/tcp # MCom -https 443/udp # MCom -snpp 444/tcp # Simple Network Paging Protocol -snpp 444/udp # Simple Network Paging Protocol -saft 487/tcp # Simple Asynchronous File Transfer -saft 487/udp # Simple Asynchronous File Transfer -npmp-local 610/tcp dqs313_qmaster # npmp-local / DQS -npmp-local 610/udp dqs313_qmaster # npmp-local / DQS -npmp-gui 611/tcp dqs313_execd # npmp-gui / DQS -npmp-gui 611/udp dqs313_execd # npmp-gui / DQS -hmmp-ind 612/tcp dqs313_intercell# HMMP Indication / DQS -hmmp-ind 612/udp dqs313_intercell# HMMP Indication / DQS -# -# UNIX specific services -# -exec 512/tcp -biff 512/udp comsat -login 513/tcp -who 513/udp whod -shell 514/tcp cmd # no passwords used -syslog 514/udp -printer 515/tcp spooler # line printer spooler -talk 517/udp -ntalk 518/udp -route 520/udp router routed # RIP -timed 525/udp timeserver -tempo 526/tcp newdate -courier 530/tcp rpc -conference 531/tcp chat -netnews 532/tcp readnews -netwall 533/udp # -for emergency broadcasts -uucp 540/tcp uucpd # uucp daemon -afpovertcp 548/tcp # AFP over TCP -afpovertcp 548/udp # AFP over TCP -remotefs 556/tcp rfs_server rfs # Brunhoff remote filesystem -klogin 543/tcp # Kerberized `rlogin' (v5) -kshell 544/tcp krcmd # Kerberized `rsh' (v5) -kerberos-adm 749/tcp # Kerberos `kadmin' (v5) -# -webster 765/tcp # Network dictionary -webster 765/udp -# -# From ``Assigned Numbers'': -# -#> The Registered Ports are not controlled by the IANA and on most systems -#> can be used by ordinary user processes or programs executed by ordinary -#> users. -# -#> Ports are used in the TCP [45,106] to name the ends of logical -#> connections which carry long term conversations. For the purpose of -#> providing services to unknown callers, a service contact port is -#> defined. This list specifies the port used by the server process as its -#> contact port. While the IANA can not control uses of these ports it -#> does register or list uses of these ports as a convienence to the -#> community. -# -nfsdstatus 1110/tcp -nfsd-keepalive 1110/udp - -ingreslock 1524/tcp -ingreslock 1524/udp -prospero-np 1525/tcp # Prospero non-privileged -prospero-np 1525/udp -datametrics 1645/tcp old-radius # datametrics / old radius entry -datametrics 1645/udp old-radius # datametrics / old radius entry -sa-msg-port 1646/tcp old-radacct # sa-msg-port / old radacct entry -sa-msg-port 1646/udp old-radacct # sa-msg-port / old radacct entry -radius 1812/tcp # Radius -radius 1812/udp # Radius -radacct 1813/tcp # Radius Accounting -radacct 1813/udp # Radius Accounting -nfsd 2049/tcp nfs -nfsd 2049/udp nfs -cvspserver 2401/tcp # CVS client/server operations -cvspserver 2401/udp # CVS client/server operations -mysql 3306/tcp # MySQL -mysql 3306/udp # MySQL -rfe 5002/tcp # Radio Free Ethernet -rfe 5002/udp # Actually uses UDP only -cfengine 5308/tcp # CFengine -cfengine 5308/udp # CFengine -bbs 7000/tcp # BBS service -# -# -# Kerberos (Project Athena/MIT) services -# Note that these are for Kerberos v4, and are unofficial. Sites running -# v4 should uncomment these and comment out the v5 entries above. -# -kerberos4 750/udp kerberos-iv kdc # Kerberos (server) udp -kerberos4 750/tcp kerberos-iv kdc # Kerberos (server) tcp -kerberos_master 751/udp # Kerberos authentication -kerberos_master 751/tcp # Kerberos authentication -passwd_server 752/udp # Kerberos passwd server -krb_prop 754/tcp # Kerberos slave propagation -krbupdate 760/tcp kreg # Kerberos registration -kpasswd 761/tcp kpwd # Kerberos "passwd" -kpop 1109/tcp # Pop with Kerberos -knetd 2053/tcp # Kerberos de-multiplexor -zephyr-srv 2102/udp # Zephyr server -zephyr-clt 2103/udp # Zephyr serv-hm connection -zephyr-hm 2104/udp # Zephyr hostmanager -eklogin 2105/tcp # Kerberos encrypted rlogin -# -# Unofficial but necessary (for NetBSD) services -# -supfilesrv 871/tcp # SUP server -supfiledbg 1127/tcp # SUP debugging -# -# Datagram Delivery Protocol services -# -rtmp 1/ddp # Routing Table Maintenance Protocol -nbp 2/ddp # Name Binding Protocol -echo 4/ddp # AppleTalk Echo Protocol -zip 6/ddp # Zone Information Protocol -# -# Services added for the Debian GNU/Linux distribution -poppassd 106/tcp # Eudora -poppassd 106/udp # Eudora -mailq 174/tcp # Mailer transport queue for Zmailer -mailq 174/tcp # Mailer transport queue for Zmailer -omirr 808/tcp omirrd # online mirror -omirr 808/udp omirrd # online mirror -rmtcfg 1236/tcp # Gracilis Packeten remote config server -xtel 1313/tcp # french minitel -coda_opcons 1355/udp # Coda opcons (Coda fs) -coda_venus 1363/udp # Coda venus (Coda fs) -coda_auth 1357/udp # Coda auth (Coda fs) -coda_udpsrv 1359/udp # Coda udpsrv (Coda fs) -coda_filesrv 1361/udp # Coda filesrv (Coda fs) -codacon 1423/tcp venus.cmu # Coda Console (Coda fs) -coda_aux1 1431/tcp # coda auxiliary service (Coda fs) -coda_aux1 1431/udp # coda auxiliary service (Coda fs) -coda_aux2 1433/tcp # coda auxiliary service (Coda fs) -coda_aux2 1433/udp # coda auxiliary service (Coda fs) -coda_aux3 1435/tcp # coda auxiliary service (Coda fs) -coda_aux3 1435/udp # coda auxiliary service (Coda fs) -cfinger 2003/tcp # GNU Finger -afbackup 2988/tcp # Afbackup system -afbackup 2988/udp # Afbackup system -icp 3130/tcp # Internet Cache Protocol (Squid) -icp 3130/udp # Internet Cache Protocol (Squid) -postgres 5432/tcp # POSTGRES -postgres 5432/udp # POSTGRES -fax 4557/tcp # FAX transmission service (old) -hylafax 4559/tcp # HylaFAX client-server protocol (new) -noclog 5354/tcp # noclogd with TCP (nocol) -noclog 5354/udp # noclogd with UDP (nocol) -hostmon 5355/tcp # hostmon uses TCP (nocol) -hostmon 5355/udp # hostmon uses TCP (nocol) -ircd 6667/tcp # Internet Relay Chat -ircd 6667/udp # Internet Relay Chat -webcache 8080/tcp # WWW caching service -webcache 8080/udp # WWW caching service -tproxy 8081/tcp # Transparent Proxy -tproxy 8081/udp # Transparent Proxy -mandelspawn 9359/udp mandelbrot # network mandelbrot -amanda 10080/udp # amanda backup services -amandaidx 10082/tcp # amanda backup services -amidxtape 10083/tcp # amanda backup services -isdnlog 20011/tcp # isdn logging system -isdnlog 20011/udp # isdn logging system -vboxd 20012/tcp # voice box system -vboxd 20012/udp # voice box system -binkp 24554/tcp # Binkley -binkp 24554/udp # Binkley -asp 27374/tcp # Address Search Protocol -asp 27374/udp # Address Search Protocol -tfido 60177/tcp # Ifmail -tfido 60177/udp # Ifmail -fido 60179/tcp # Ifmail -fido 60179/udp # Ifmail - -# Local services - diff --git a/obsolete-buildroot/sources/target_skeleton/etc/shadow b/obsolete-buildroot/sources/target_skeleton/etc/shadow deleted file mode 100644 index 4941a1ac53..0000000000 --- a/obsolete-buildroot/sources/target_skeleton/etc/shadow +++ /dev/null @@ -1,12 +0,0 @@ -root::10933:0:99999:7::: -bin:*:10933:0:99999:7::: -daemon:*:10933:0:99999:7::: -adm:*:10933:0:99999:7::: -lp:*:10933:0:99999:7::: -sync:*:10933:0:99999:7::: -shutdown:*:10933:0:99999:7::: -halt:*:10933:0:99999:7::: -uucp:*:10933:0:99999:7::: -operator:*:10933:0:99999:7::: -nobody:*:10933:0:99999:7::: -default::10933:0:99999:7::: diff --git a/obsolete-buildroot/sources/target_skeleton/root/.bash_history b/obsolete-buildroot/sources/target_skeleton/root/.bash_history deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/obsolete-buildroot/sources/target_skeleton/root/.bash_logout b/obsolete-buildroot/sources/target_skeleton/root/.bash_logout deleted file mode 100644 index 77ef1f9508..0000000000 --- a/obsolete-buildroot/sources/target_skeleton/root/.bash_logout +++ /dev/null @@ -1,7 +0,0 @@ -# ~/.bash_logout: executed by bash(1) when login shell exits. - -# when leaving the console clear the screen to increase privacy - -case "`tty`" in - /dev/tty[0-9]*) clear -esac diff --git a/obsolete-buildroot/sources/target_skeleton/root/.bash_profile b/obsolete-buildroot/sources/target_skeleton/root/.bash_profile deleted file mode 100644 index 27bf14953d..0000000000 --- a/obsolete-buildroot/sources/target_skeleton/root/.bash_profile +++ /dev/null @@ -1,15 +0,0 @@ -# .bash_profile - -export PATH=\ -/bin:\ -/sbin:\ -/usr/bin:\ -/usr/sbin:\ -/usr/bin/X11:\ -/usr/local/bin - -umask 022 - -if [ -f ~/.bashrc ]; then - source ~/.bashrc -fi diff --git a/obsolete-buildroot/sources/target_skeleton/root/.bashrc b/obsolete-buildroot/sources/target_skeleton/root/.bashrc deleted file mode 100644 index d13c8f9026..0000000000 --- a/obsolete-buildroot/sources/target_skeleton/root/.bashrc +++ /dev/null @@ -1,48 +0,0 @@ -# ~/.bashrc: executed by bash(1) for non-login interactive shells. - -export PATH=\ -/bin:\ -/sbin:\ -/usr/bin:\ -/usr/sbin:\ -/usr/bin/X11:\ -/usr/local/bin - -# If running interactively, then: -if [ "$PS1" ]; then - - if [ "$BASH" ]; then - export PS1="[\u@\h \W]\\$ " - else - if [ "`id -u`" -eq 0 ]; then - export PS1='# ' - else - export PS1='$ ' - fi - fi - - export USER=`id -un` - export LOGNAME=$USER - export HOSTNAME=`/bin/hostname` - export HISTSIZE=1000 - export HISTFILESIZE=1000 - export PAGER='/bin/more ' - export EDITOR='/bin/vi' - export INPUTRC=/etc/inputrc - export DMALLOC_OPTIONS=debug=0x34f47d83,inter=100,log=logfile - export LS_COLORS='no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.png=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:'; - - ### Some aliases - alias ps2='ps facux ' - alias ps1='ps faxo "%U %t %p %a" ' - alias af='ps af' - alias cls='clear' - alias ll='/bin/ls --color=tty -laFh' - alias ls='/bin/ls --color=tty -F' - alias df='df -h' - alias indent='indent -bad -bap -bbo -nbc -br -brs -c33 -cd33 -ncdb -ce -ci4 -cli0 -cp33 -cs -d0 -di1 -nfc1 -nfca -hnl -i4 -ip0 -l75 -lp -npcs -npsl -nsc -nsob -nss -ts4 ' - #alias bc='bc -l' - alias minicom='minicom -c on' - alias calc='calc -Cd ' - alias bc='calc -Cd ' -fi; diff --git a/obsolete-buildroot/sources/target_skeleton/usr/share/terminfo/a/ansi b/obsolete-buildroot/sources/target_skeleton/usr/share/terminfo/a/ansi deleted file mode 100644 index d1e14008c5..0000000000 Binary files a/obsolete-buildroot/sources/target_skeleton/usr/share/terminfo/a/ansi and /dev/null differ diff --git a/obsolete-buildroot/sources/target_skeleton/usr/share/terminfo/d/dumb b/obsolete-buildroot/sources/target_skeleton/usr/share/terminfo/d/dumb deleted file mode 100644 index ffdc8acf34..0000000000 Binary files a/obsolete-buildroot/sources/target_skeleton/usr/share/terminfo/d/dumb and /dev/null differ diff --git a/obsolete-buildroot/sources/target_skeleton/usr/share/terminfo/l/linux b/obsolete-buildroot/sources/target_skeleton/usr/share/terminfo/l/linux deleted file mode 100644 index e9ec115d5c..0000000000 Binary files a/obsolete-buildroot/sources/target_skeleton/usr/share/terminfo/l/linux and /dev/null differ diff --git a/obsolete-buildroot/sources/target_skeleton/usr/share/terminfo/r/rxvt b/obsolete-buildroot/sources/target_skeleton/usr/share/terminfo/r/rxvt deleted file mode 100644 index ba6987a1a8..0000000000 Binary files a/obsolete-buildroot/sources/target_skeleton/usr/share/terminfo/r/rxvt and /dev/null differ diff --git a/obsolete-buildroot/sources/target_skeleton/usr/share/terminfo/s/screen b/obsolete-buildroot/sources/target_skeleton/usr/share/terminfo/s/screen deleted file mode 100644 index 8f4206c81e..0000000000 Binary files a/obsolete-buildroot/sources/target_skeleton/usr/share/terminfo/s/screen and /dev/null differ diff --git a/obsolete-buildroot/sources/target_skeleton/usr/share/terminfo/s/screen-w b/obsolete-buildroot/sources/target_skeleton/usr/share/terminfo/s/screen-w deleted file mode 100644 index 965601433d..0000000000 Binary files a/obsolete-buildroot/sources/target_skeleton/usr/share/terminfo/s/screen-w and /dev/null differ diff --git a/obsolete-buildroot/sources/target_skeleton/usr/share/terminfo/s/sun b/obsolete-buildroot/sources/target_skeleton/usr/share/terminfo/s/sun deleted file mode 100644 index 47c0d66faa..0000000000 Binary files a/obsolete-buildroot/sources/target_skeleton/usr/share/terminfo/s/sun and /dev/null differ diff --git a/obsolete-buildroot/sources/target_skeleton/usr/share/terminfo/v/vt100 b/obsolete-buildroot/sources/target_skeleton/usr/share/terminfo/v/vt100 deleted file mode 100644 index 5cc9a88bb0..0000000000 Binary files a/obsolete-buildroot/sources/target_skeleton/usr/share/terminfo/v/vt100 and /dev/null differ diff --git a/obsolete-buildroot/sources/target_skeleton/usr/share/terminfo/v/vt220 b/obsolete-buildroot/sources/target_skeleton/usr/share/terminfo/v/vt220 deleted file mode 100644 index cefb7b3587..0000000000 Binary files a/obsolete-buildroot/sources/target_skeleton/usr/share/terminfo/v/vt220 and /dev/null differ diff --git a/obsolete-buildroot/sources/target_skeleton/usr/share/terminfo/v/vt52 b/obsolete-buildroot/sources/target_skeleton/usr/share/terminfo/v/vt52 deleted file mode 100644 index d55932876a..0000000000 Binary files a/obsolete-buildroot/sources/target_skeleton/usr/share/terminfo/v/vt52 and /dev/null differ diff --git a/obsolete-buildroot/sources/target_skeleton/usr/share/terminfo/x/xterm b/obsolete-buildroot/sources/target_skeleton/usr/share/terminfo/x/xterm deleted file mode 100644 index 89da67d089..0000000000 Binary files a/obsolete-buildroot/sources/target_skeleton/usr/share/terminfo/x/xterm and /dev/null differ diff --git a/obsolete-buildroot/sources/target_skeleton/usr/share/terminfo/x/xterm-xfree86 b/obsolete-buildroot/sources/target_skeleton/usr/share/terminfo/x/xterm-xfree86 deleted file mode 100644 index eeac9d8d35..0000000000 Binary files a/obsolete-buildroot/sources/target_skeleton/usr/share/terminfo/x/xterm-xfree86 and /dev/null differ diff --git a/obsolete-buildroot/sources/target_skeleton/usr/share/udhcpc/default.script b/obsolete-buildroot/sources/target_skeleton/usr/share/udhcpc/default.script deleted file mode 100755 index a52a7f8122..0000000000 --- a/obsolete-buildroot/sources/target_skeleton/usr/share/udhcpc/default.script +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -# udhcpc script edited by Tim Riker - -[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1 - -RESOLV_CONF="/etc/resolv.conf" -[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast" -[ -n "$subnet" ] && NETMASK="netmask $subnet" - -case "$1" in - deconfig) - /sbin/ifconfig $interface 0.0.0.0 - ;; - - renew|bound) - /sbin/ifconfig $interface $ip $BROADCAST $NETMASK - - if [ -n "$router" ] ; then - echo "deleting routers" - while route del default gw 0.0.0.0 dev $interface ; do - : - done - - for i in $router ; do - route add default gw $i dev $interface - done - fi - - echo -n > $RESOLV_CONF - [ -n "$domain" ] && echo search $domain >> $RESOLV_CONF - for i in $dns ; do - echo adding dns $i - echo nameserver $i >> $RESOLV_CONF - done - ;; -esac - -exit 0