diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2010-05-30 19:14:27 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2010-05-30 19:14:27 +0200 |
commit | d1336177b7215b7a638231bb1ec5fd22a87d9adb (patch) | |
tree | 65efb3b1487f0c658f02a08d97de6dc57de59254 | |
parent | ed18fdf27be16211745a9d81dbcd3c1f1b529b75 (diff) | |
parent | 1a1c38ece81ef998be92218ade235bc7b44d9643 (diff) |
Merge branch 'master' of git+ssh://openadk.org/git/openadk
71 files changed, 7789 insertions, 13174 deletions
diff --git a/mk/build.mk b/mk/build.mk index f6f764c87..8a0e310f1 100644 --- a/mk/build.mk +++ b/mk/build.mk @@ -427,7 +427,7 @@ bulk: $(GMAKE) VERBOSE=1 all; \ rm .config; \ ) 2>&1 | tee $(TOPDIR)/bin/$${target}_$$libc/$$target-$$libc-$$fs.log; \ - done <${TOPDIR}/target/bulk.lst + done <${TOPDIR}/target/bulkdef.lst bulktoolchain: @while read target libc; do \ diff --git a/mk/image.mk b/mk/image.mk index 04fae43bf..53b01d0c2 100644 --- a/mk/image.mk +++ b/mk/image.mk @@ -70,6 +70,8 @@ ${BIN_DIR}/${INITRAMFS}: ${TARGET_DIR} cpio -R 0:0 -oC512 -Mdist -Hnewc | ${ADK_COMPRESSION_TOOL} >$@ ${BUILD_DIR}/${INITRAMFS_PIGGYBACK}: ${TARGET_DIR} + $(SED) 's#^CONFIG_INITRAMFS_SOURCE.*#CONFIG_INITRAMFS_SOURCE="${BUILD_DIR}/${INITRAMFS_PIGGYBACK}"#' \ + $(LINUX_DIR)/.config cd ${TARGET_DIR}; find . | sed -n '/^\.\//s///p' | sort | \ cpio -R 0:0 -oC512 -Mdist -Hnewc >$@ @@ -81,5 +83,13 @@ ${BIN_DIR}/${ROOTFSSQUASHFS}: ${TARGET_DIR} ${BUILD_DIR}/root.squashfs > \ ${BUILD_DIR}/${ROOTFSSQUASHFS} +createinitramfs: + @-rm $(LINUX_DIR)/usr/initramfs_data.cpio* $(MAKE_TRACE) + echo N | \ + $(MAKE) -C $(LINUX_DIR) V=1 CROSS_COMPILE="$(TARGET_CROSS)" \ + ARCH=$(ARCH) CC="$(TARGET_CC)" oldconfig $(MAKE_TRACE) + $(MAKE) -C $(LINUX_DIR) V=1 CROSS_COMPILE="$(TARGET_CROSS)" \ + ARCH=$(ARCH) CC="$(TARGET_CC)" $(MAKE_TRACE) + imageclean: rm -f $(BIN_DIR)/$(ADK_TARGET)-* ${BUILD_DIR}/$(ADK_TARGET)-* diff --git a/package/Config.in b/package/Config.in index 265e222fd..80717c15b 100644 --- a/package/Config.in +++ b/package/Config.in @@ -587,7 +587,6 @@ source "package/sispmctl/Config.in" source "package/stress/Config.in" source "package/sysfsutils/Config.in" source "package/sysstat/Config.in" -source "package/swconfig/Config.in" source "package/udev/Config.in" source "package/watchdog/Config.in" endmenu diff --git a/package/MesaLib/patches/patch-src_glsl_apps_Makefile b/package/MesaLib/patches/patch-src_glsl_apps_Makefile new file mode 100644 index 000000000..76d23d7bf --- /dev/null +++ b/package/MesaLib/patches/patch-src_glsl_apps_Makefile @@ -0,0 +1,15 @@ +--- Mesa-7.8.1.orig/src/glsl/apps/Makefile 2010-04-05 01:46:26.000000000 +0200 ++++ Mesa-7.8.1/src/glsl/apps/Makefile 2010-05-25 17:38:03.594714854 +0200 +@@ -26,10 +26,10 @@ INCLUDES = -I. + .SUFFIXES: .c + + .c: +- $(APP_CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@ ++ $(APP_CC) $(HOSTCFLAGS) $< $(LIBS) -o $@ + + .c.o: +- $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@ ++ $(APP_CC) -c $(HOSTCFLAGS) $(DEFINES) $< -o $@ + + + ##### TARGETS ##### diff --git a/package/bash/Makefile b/package/bash/Makefile index b06ee4991..c0b55681e 100644 --- a/package/bash/Makefile +++ b/package/bash/Makefile @@ -16,6 +16,7 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,BASH,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +CONFIGURE_ENV+= bash_cv_getenv_redef=no XAKE_FLAGS+= LIBS_FOR_BUILD='' post-install: diff --git a/package/binutils/Makefile b/package/binutils/Makefile index 9d1df7793..3d54ff6ea 100644 --- a/package/binutils/Makefile +++ b/package/binutils/Makefile @@ -6,6 +6,7 @@ include ${TOPDIR}/toolchain/binutils/Makefile.inc PKG_DESCR:= binary utilities (nm, objdump, ar, as, ..) PKG_SECTION:= comp +PKG_HOST_DEPENDS:= !cygwin include ${TOPDIR}/mk/package.mk @@ -16,10 +17,6 @@ CONFIGURE_ARGS+= --disable-werror \ --host=$(REAL_GNU_TARGET_NAME) \ --target=$(REAL_GNU_TARGET_NAME) -post-patch: - ${PREVENT_PATCH} ${PATCH} ${WRKDIST} \ - ${TOPDIR}/toolchain/binutils/patches \*.patch - post-install: ${INSTALL_DIR} ${IDIR_BINUTILS}/usr/lib $(CP) ${WRKINST}/usr/lib/*.so ${IDIR_BINUTILS}/usr/lib diff --git a/package/ccid/Makefile b/package/ccid/Makefile index 2e63a888c..98d36a3cd 100644 --- a/package/ccid/Makefile +++ b/package/ccid/Makefile @@ -9,6 +9,7 @@ PKG_RELEASE:= 1 PKG_MD5SUM:= 7fcdbacacd955659286f988fa9b6e0be PKG_DESCR:= a generic USB CCID and ICCD driver PKG_SECTION:= security +PKG_BUILDDEP+= pcsc-lite PKG_URL:= http://pcsclite.alioth.debian.org/ccid.html PKG_SITES:= https://alioth.debian.org/frs/download.php/3281/ diff --git a/package/libXxf86vm/Makefile b/package/libXxf86vm/Makefile index 778b74f0b..4d8d57f12 100644 --- a/package/libXxf86vm/Makefile +++ b/package/libXxf86vm/Makefile @@ -9,7 +9,7 @@ PKG_RELEASE:= 1 PKG_MD5SUM:= 52b49483eccbdd1566b8c560fe7f76e8 PKG_DESCR:= add short description PKG_SECTION:= libs -PKG_BUILDDEP+= xf86vidmodeproto +PKG_BUILDDEP+= xf86vidmodeproto libXext PKG_SITES:= http://xorg.freedesktop.org/archive/individual/lib/ include $(TOPDIR)/mk/package.mk diff --git a/package/swconfig/Makefile b/package/swconfig/Makefile deleted file mode 100644 index 8d7573c36..000000000 --- a/package/swconfig/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -# This file is part of the OpenADK project. OpenADK is copyrighted -# material, please see the LICENCE file in the top-level directory. - -include ${TOPDIR}/rules.mk - -PKG_NAME:= swconfig -PKG_VERSION:= 1.0 -PKG_RELEASE:= 1 -PKG_DESCR:= switch configuration utility -PKG_SECTION:= misc -PKG_DEPENDS:= libnl -PKG_BUILDDEP+= libnl - -PKG_TARGET_CONFIG:= rb433 - -NO_DISTFILES:= 1 - -include ${TOPDIR}/mk/package.mk - -$(eval $(call PKG_template,SWCONFIG,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) - -CONFIG_STYLE:= manual -INSTALL_STYLE:= manual - -XAKE_FLAGS:= LIBS="-lnl -lm" CFLAGS="$(TARGET_CFLAGS) \ - -I$(LINUX_DIR)/include" - -do-install: - ${INSTALL_DIR} ${IDIR_SWCONFIG}/sbin - ${INSTALL_BIN} ${WRKBUILD}/swconfig ${IDIR_SWCONFIG}/sbin/ - -include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/swconfig/src/Makefile b/package/swconfig/src/Makefile deleted file mode 100644 index 64816af54..000000000 --- a/package/swconfig/src/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -ifndef CFLAGS -CFLAGS = -O2 -g -I ../src -endif -LIBS=-lnl - -all: swconfig - -%.o: %.c - $(CC) $(CFLAGS) -c -o $@ $^ - -swconfig: cli.o swlib.o - $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) diff --git a/package/swconfig/src/cli.c b/package/swconfig/src/cli.c deleted file mode 100644 index c6035e585..000000000 --- a/package/swconfig/src/cli.c +++ /dev/null @@ -1,255 +0,0 @@ -/* - * swconfig.c: Switch configuration utility - * - * Copyright (C) 2008 Felix Fietkau <nbd@openwrt.org> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * version 2 as published by the Free Software Foundatio. - * - * 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. - */ - -#include <stdio.h> -#include <string.h> -#include <stdlib.h> -#include <inttypes.h> -#include <errno.h> -#include <stdint.h> -#include <getopt.h> -#include <sys/types.h> -#include <sys/socket.h> - -#include <linux/types.h> -#include <linux/netlink.h> -#include <linux/genetlink.h> -#include <netlink/netlink.h> -#include <netlink/genl/genl.h> -#include <netlink/genl/ctrl.h> -#include <linux/switch.h> -#include "swlib.h" - -#define GET 1 -#define SET 2 - -void print_attrs(struct switch_attr *attr) -{ - int i = 0; - while (attr) { - const char *type; - switch(attr->type) { - case SWITCH_TYPE_INT: - type = "int"; - break; - case SWITCH_TYPE_STRING: - type = "string"; - break; - case SWITCH_TYPE_PORTS: - type = "ports"; - break; - case SWITCH_TYPE_NOVAL: - type = "none"; - break; - default: - type = "unknown"; - break; - } - printf("\tAttribute %d (%s): %s (%s)\n", ++i, type, attr->name, attr->description); - attr = attr->next; - } -} - -void list_attributes(struct switch_dev *dev) -{ - printf("Switch %d: %s(%s), ports: %d, vlans: %d\n", dev->id, dev->dev_name, dev->name, dev->ports, dev->vlans); - printf(" --switch\n"); - print_attrs(dev->ops); - printf(" --vlan\n"); - print_attrs(dev->vlan_ops); - printf(" --port\n"); - print_attrs(dev->port_ops); -} - -void print_usage(void) -{ - printf("swconfig dev <dev> [port <port>|vlan <vlan>] (help|set <key> <value>|get <key>)\n"); - exit(0); -} - -int main(int argc, char **argv) -{ - int retval = 0; - struct switch_dev *dev; - struct switch_attr *a; - struct switch_val val; - int err; - int i; - - struct switch_port *ports; - - int cmd = 0; - char *cdev = NULL; - int cport = -1; - int cvlan = -1; - char *ckey = NULL; - char *cvalue = NULL; - int chelp = 0; - - if(argc < 4) - print_usage(); - - if(strcmp(argv[1], "dev")) - print_usage(); - - cdev = argv[2]; - - for(i = 3; i < argc; i++) - { - int p; - if(!strcmp(argv[i], "help")) - { - chelp = 1; - continue; - } - if(i + 1 >= argc) - print_usage(); - p = atoi(argv[i + 1]); - if(!strcmp(argv[i], "port")) - { - cport = p; - } else if(!strcmp(argv[i], "vlan")) - { - cvlan = p; - } else if(!strcmp(argv[i], "set")) - { - if(argc <= i + 1) - print_usage(); - cmd = SET; - ckey = argv[i + 1]; - if (argc > i + 2) - cvalue = argv[i + 2]; - else - cvalue = NULL; - i++; - } else if(!strcmp(argv[i], "get")) - { - cmd = GET; - ckey = argv[i + 1]; - } else{ - print_usage(); - } - i++; - } - - if(cport > -1 && cvlan > -1) - print_usage(); - - dev = swlib_connect(cdev); - if (!dev) { - fprintf(stderr, "Failed to connect to the switch\n"); - return 1; - } - - ports = malloc(sizeof(struct switch_port) * dev->ports); - memset(ports, 0, sizeof(struct switch_port) * dev->ports); - swlib_scan(dev); - - if(chelp) - { - list_attributes(dev); - goto out; - } - - if(cport > -1) - a = swlib_lookup_attr(dev, SWLIB_ATTR_GROUP_PORT, ckey); - else if(cvlan > -1) - a = swlib_lookup_attr(dev, SWLIB_ATTR_GROUP_VLAN, ckey); - else - a = swlib_lookup_attr(dev, SWLIB_ATTR_GROUP_GLOBAL, ckey); - - if(!a) - { - fprintf(stderr, "Unknown attribute \"%s\"\n", ckey); - goto out; - } - - switch(cmd) - { - case SET: - if ((a->type != SWITCH_TYPE_NOVAL) && - (cvalue == NULL)) - print_usage(); - - switch(a->type) { - case SWITCH_TYPE_INT: - val.value.i = atoi(cvalue); - break; - case SWITCH_TYPE_STRING: - val.value.s = cvalue; - break; - case SWITCH_TYPE_PORTS: - val.len = 0; - while(cvalue && *cvalue) - { - ports[val.len].flags = 0; - ports[val.len].id = strtol(cvalue, &cvalue, 10); - while(*cvalue && !isspace(*cvalue)) { - if (*cvalue == 't') - ports[val.len].flags |= SWLIB_PORT_FLAG_TAGGED; - cvalue++; - } - if (*cvalue) - cvalue++; - val.len++; - } - val.value.ports = ports; - break; - default: - break; - } - if(cvlan > -1) - val.port_vlan = cvlan; - if(cport > -1) - val.port_vlan = cport; - if(swlib_set_attr(dev, a, &val) < 0) - { - fprintf(stderr, "failed\n"); - retval = -1; - goto out; - } - break; - case GET: - if(cvlan > -1) - val.port_vlan = cvlan; - if(cport > -1) - val.port_vlan = cport; - if(swlib_get_attr(dev, a, &val) < 0) - { - fprintf(stderr, "failed\n"); - retval = -1; - goto out; - } - switch(a->type) { - case SWITCH_TYPE_INT: - printf("%d\n", val.value.i); - break; - case SWITCH_TYPE_STRING: - printf("%s\n", val.value.s); - break; - case SWITCH_TYPE_PORTS: - for(i = 0; i < val.len; i++) - printf("%d ", val.value.ports[i]); - printf("\n"); - break; - } - } - -out: - swlib_free_all(dev); - free(ports); - - return 0; -} diff --git a/package/swconfig/src/swlib.c b/package/swconfig/src/swlib.c deleted file mode 100644 index 3fde81641..000000000 --- a/package/swconfig/src/swlib.c +++ /dev/null @@ -1,614 +0,0 @@ -/* - * swlib.c: Switch configuration API (user space part) - * - * Copyright (C) 2008 Felix Fietkau <nbd@openwrt.org> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * version 2.1 as published by the Free Software Foundation. - * - * 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. - */ - -#include <stdio.h> -#include <string.h> -#include <stdlib.h> -#include <inttypes.h> -#include <errno.h> -#include <stdint.h> -#include <getopt.h> -#include <sys/types.h> -#include <sys/socket.h> -#include <linux/switch.h> -#include "swlib.h" - -//#define DEBUG 1 -#ifdef DEBUG -#define DPRINTF(fmt, ...) fprintf(stderr, "%s(%d): " fmt, __func__, __LINE__, ##__VA_ARGS__) -#else -#define DPRINTF(fmt, ...) do {} while (0) -#endif - -static struct nl_handle *handle; -static struct nl_cache *cache; -static struct genl_family *family; -static struct nlattr *tb[SWITCH_ATTR_MAX]; -static int refcount = 0; - -static struct nla_policy port_policy[] = { - [SWITCH_PORT_ID] = { .type = NLA_U32 }, - [SWITCH_PORT_FLAG_TAGGED] = { .type = NLA_FLAG }, -}; - -static inline void * -swlib_alloc(size_t size) -{ - void *ptr; - - ptr = malloc(size); - if (!ptr) - goto done; - memset(ptr, 0, size); - -done: - return ptr; -} - -static int -wait_handler(struct nl_msg *msg, void *arg) -{ - int *finished = arg; - - *finished = 1; - return NL_STOP; -} - -/* helper function for performing netlink requests */ -static int -swlib_call(int cmd, int (*call)(struct nl_msg *, void *), - int (*data)(struct nl_msg *, void *), void *arg) -{ - struct nl_msg *msg; - struct nl_cb *cb = NULL; - int finished; - int flags = 0; - int err; - - msg = nlmsg_alloc(); - if (!msg) { - fprintf(stderr, "Out of memory!\n"); - exit(1); - } - - if (!data) - flags |= NLM_F_DUMP; - - genlmsg_put(msg, NL_AUTO_PID, NL_AUTO_SEQ, genl_family_get_id(family), 0, flags, cmd, 0); - if (data) { - if (data(msg, arg) < 0) - goto nla_put_failure; - } - - cb = nl_cb_alloc(NL_CB_CUSTOM); - if (!cb) { - fprintf(stderr, "nl_cb_alloc failed.\n"); - exit(1); - } - - err = nl_send_auto_complete(handle, msg); - if (err < 0) { - fprintf(stderr, "nl_send_auto_complete failed: %d\n", err); - goto out; - } - - finished = 0; - - if (call) - nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, call, arg); - - if (data) - nl_cb_set(cb, NL_CB_ACK, NL_CB_CUSTOM, wait_handler, &finished); - else - nl_cb_set(cb, NL_CB_FINISH, NL_CB_CUSTOM, wait_handler, &finished); - - err = nl_recvmsgs(handle, cb); - if (err < 0) { - goto out; - } - - if (!finished) - err = nl_wait_for_ack(handle); - -out: - if (cb) - nl_cb_put(cb); -nla_put_failure: - nlmsg_free(msg); - return err; -} - -static int -send_attr(struct nl_msg *msg, void *arg) -{ - struct switch_val *val = arg; - struct switch_attr *attr = val->attr; - - NLA_PUT_U32(msg, SWITCH_ATTR_ID, attr->dev->id); - |