From 196013d337b14a1a2af03e7c04accc7460443f62 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 30 Mar 2014 14:28:10 +0200 Subject: update to latest upstream version --- package/radvd/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/radvd/Makefile b/package/radvd/Makefile index 1dd5b6ccf..dc927a628 100644 --- a/package/radvd/Makefile +++ b/package/radvd/Makefile @@ -4,9 +4,9 @@ include ${TOPDIR}/rules.mk PKG_NAME:= radvd -PKG_VERSION:= 1.9.7 +PKG_VERSION:= 1.10.0 PKG_RELEASE:= 1 -PKG_MD5SUM:= 85141c7dc7d35e5499e16052742f1040 +PKG_MD5SUM:= 5ef15bc6c8316dba02147065f8dfdad3 PKG_DESCR:= Routing Advertisement Daemon for IPv6 PKG_SECTION:= ipv6 PKG_DEPENDS:= kmod-ipv6 libdaemon -- cgit v1.2.3 From 8aed1fcd443b550c15a21ddbf1b1d3899803120a Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 30 Mar 2014 15:55:20 +0200 Subject: rework hosttools building, add tools into package stuff --- .gitignore | 42 +- adk/config/Config.in | 8 + adk/config/Kconfig-language.txt | 379 ++ adk/config/Makefile | 131 + adk/config/Makefile.in | 5 + adk/config/check.sh | 14 + adk/config/conf.c | 619 ++ adk/config/confdata.c | 899 +++ adk/config/expr.c | 1106 +++ adk/config/expr.h | 228 + adk/config/gconf.c | 1618 +++++ adk/config/gconf.glade | 648 ++ adk/config/images.c | 326 + adk/config/kconfig_load.c | 35 + adk/config/kxgettext.c | 233 + adk/config/lex.zconf.c_shipped | 2416 +++++++ adk/config/lkc.h | 169 + adk/config/lkc_proto.h | 45 + adk/config/lxdialog/.gitignore | 4 + adk/config/lxdialog/BIG.FAT.WARNING | 4 + adk/config/lxdialog/check-lxdialog.sh | 82 + adk/config/lxdialog/checklist.c | 326 + adk/config/lxdialog/dialog.h | 230 + adk/config/lxdialog/inputbox.c | 238 + adk/config/lxdialog/menubox.c | 434 ++ adk/config/lxdialog/textbox.c | 391 ++ adk/config/lxdialog/util.c | 657 ++ adk/config/lxdialog/yesno.c | 114 + adk/config/mconf.c | 940 +++ adk/config/menu.c | 533 ++ adk/config/symbol.c | 973 +++ adk/config/util.c | 133 + adk/config/zconf.gperf | 44 + adk/config/zconf.hash.c_shipped | 237 + adk/config/zconf.l | 359 + adk/config/zconf.tab.c_shipped | 2490 +++++++ adk/config/zconf.tab.h_shipped | 133 + adk/config/zconf.y | 706 ++ adk/tests/adk.exp.in | 5 + adk/tests/master.exp.in | 5 + adk/tools/Makefile | 17 + adk/tools/depmaker.c | 314 + adk/tools/dkgetsz.c | 95 + adk/tools/pkgmaker.c | 1194 ++++ adk/tools/pkgrebuild.c | 273 + adk/tools/sortfile.c | 153 + adk/tools/sortfile.h | 1 + adk/tools/strmap.c | 510 ++ adk/tools/strmap.h | 350 + config/Config.in | 8 - config/Kconfig-language.txt | 379 -- config/Makefile | 131 - config/Makefile.in | 5 - config/check.sh | 14 - config/conf.c | 619 -- config/confdata.c | 899 --- config/expr.c | 1106 --- config/expr.h | 228 - config/gconf.c | 1618 ----- config/gconf.glade | 648 -- config/images.c | 326 - config/kconfig_load.c | 35 - config/kxgettext.c | 233 - config/lex.zconf.c_shipped | 2416 ------- config/lkc.h | 169 - config/lkc_proto.h | 45 - config/lxdialog/.gitignore | 4 - config/lxdialog/BIG.FAT.WARNING | 4 - config/lxdialog/check-lxdialog.sh | 82 - config/lxdialog/checklist.c | 326 - config/lxdialog/dialog.h | 230 - config/lxdialog/inputbox.c | 238 - config/lxdialog/menubox.c | 434 -- config/lxdialog/textbox.c | 391 -- config/lxdialog/util.c | 657 -- config/lxdialog/yesno.c | 114 - config/mconf.c | 940 --- config/menu.c | 533 -- config/symbol.c | 973 --- config/util.c | 133 - config/zconf.gperf | 44 - config/zconf.hash.c_shipped | 237 - config/zconf.l | 359 - config/zconf.tab.c_shipped | 2490 ------- config/zconf.tab.h_shipped | 133 - config/zconf.y | 706 -- docs/how-openadk-works.txt | 25 +- docs/make-tips.txt | 4 +- docs/prerequisite.txt | 11 +- mk/build.mk | 67 +- mk/buildhlp.mk | 4 +- mk/fetch.mk | 1 - mk/host.mk | 2 + mk/image.mk | 6 +- mk/pkg-bottom.mk | 2 + mk/vars.mk | 3 +- package/Makefile | 2 + package/base-files/Makefile | 1 - package/bc/Makefile | 7 +- package/busybox/Makefile | 1 + package/bzip2/Makefile | 2 + package/ccache/Makefile | 24 + package/cdrtools/Makefile | 31 +- package/cfgfs/Makefile | 2 +- package/genext2fs/Makefile | 24 + package/heirloom-cpio/Makefile | 32 + package/heirloom-cpio/src/Makefile | 28 + package/heirloom-cpio/src/_alloca.h | 27 + package/heirloom-cpio/src/_malloc.h | 26 + package/heirloom-cpio/src/_utmpx.h | 89 + package/heirloom-cpio/src/asciitype.c | 59 + package/heirloom-cpio/src/asciitype.h | 60 + package/heirloom-cpio/src/atoll.h | 8 + package/heirloom-cpio/src/blank.h | 38 + package/heirloom-cpio/src/blast.c | 449 ++ package/heirloom-cpio/src/blast.h | 76 + package/heirloom-cpio/src/cpio.1 | 943 +++ package/heirloom-cpio/src/cpio.c | 7172 ++++++++++++++++++++ package/heirloom-cpio/src/cpio.h | 232 + package/heirloom-cpio/src/crc32.c | 115 + package/heirloom-cpio/src/expand.c | 193 + package/heirloom-cpio/src/explode.c | 1138 ++++ package/heirloom-cpio/src/flags.c | 257 + package/heirloom-cpio/src/getdir.c | 197 + package/heirloom-cpio/src/getdir.h | 33 + package/heirloom-cpio/src/getopt.c | 141 + package/heirloom-cpio/src/gmatch.c | 136 + package/heirloom-cpio/src/ib_alloc.c | 60 + package/heirloom-cpio/src/ib_close.c | 36 + package/heirloom-cpio/src/ib_free.c | 33 + package/heirloom-cpio/src/ib_getlin.c | 78 + package/heirloom-cpio/src/ib_getw.c | 81 + package/heirloom-cpio/src/ib_open.c | 48 + package/heirloom-cpio/src/ib_popen.c | 87 + package/heirloom-cpio/src/ib_read.c | 51 + package/heirloom-cpio/src/ib_seek.c | 53 + package/heirloom-cpio/src/iblok.h | 135 + package/heirloom-cpio/src/inflate.c | 991 +++ package/heirloom-cpio/src/mbtowi.h | 22 + package/heirloom-cpio/src/memalign.c | 51 + package/heirloom-cpio/src/memalign.h | 35 + package/heirloom-cpio/src/msgselect.h | 30 + package/heirloom-cpio/src/nonpax.c | 55 + package/heirloom-cpio/src/oblok.c | 260 + package/heirloom-cpio/src/oblok.h | 96 + package/heirloom-cpio/src/pathconf.c | 51 + package/heirloom-cpio/src/pathconf.h | 29 + package/heirloom-cpio/src/pax.1 | 919 +++ package/heirloom-cpio/src/pax.c | 757 +++ package/heirloom-cpio/src/pfmt.c | 39 + package/heirloom-cpio/src/pfmt.h | 46 + package/heirloom-cpio/src/pfmt_label.c | 1 + package/heirloom-cpio/src/regexp.h | 1211 ++++ package/heirloom-cpio/src/regexpr.c | 90 + package/heirloom-cpio/src/regexpr.h | 53 + package/heirloom-cpio/src/setlabel.c | 40 + package/heirloom-cpio/src/setuxlabel.c | 47 + package/heirloom-cpio/src/sfile.c | 99 + package/heirloom-cpio/src/sfile.h | 40 + package/heirloom-cpio/src/sighold.c | 42 + package/heirloom-cpio/src/sigignore.c | 45 + package/heirloom-cpio/src/signal.c | 46 + package/heirloom-cpio/src/sigpause.c | 48 + package/heirloom-cpio/src/sigrelse.c | 42 + package/heirloom-cpio/src/sigset.c | 57 + package/heirloom-cpio/src/sigset.h | 40 + package/heirloom-cpio/src/strtol.c | 117 + package/heirloom-cpio/src/unshrink.c | 307 + package/heirloom-cpio/src/unzip.h | 121 + package/heirloom-cpio/src/utmpx.c | 252 + package/heirloom-cpio/src/version.c | 26 + package/heirloom-cpio/src/vpfmt.c | 90 + package/liblzo/Makefile | 1 - package/lzma/Makefile | 28 + package/lzop/Makefile | 6 + package/mkcrypt/Makefile | 31 + package/mkcrypt/src/mkcrypt.c | 441 ++ package/mkimage/Makefile | 33 + package/mkimage/src/crc32.c | 200 + package/mkimage/src/image.h | 161 + package/mkimage/src/mkimage.c | 755 +++ package/mksh/Makefile | 18 +- package/mtd-utils/Makefile | 35 + package/mtd-utils/patches/patch-Makefile | 65 + package/mtd-utils/patches/patch-common_mk | 11 + package/mtd-utils/patches/patch-compr_c | 21 + package/mtd-utils/patches/patch-compr_lzo_c | 10 + package/mtd-utils/patches/patch-compr_zlib_c | 10 + .../patches/patch-include_mtd_jffs2-user_h | 16 + .../mtd-utils/patches/patch-include_mtd_mtd-abi_h | 14 + .../patches/patch-include_mtd_ubi-media_h | 18 + package/mtd-utils/patches/patch-lib_libfec_c | 20 + package/mtd-utils/patches/patch-lib_libmtd_c | 38 + .../mtd-utils/patches/patch-lib_libmtd_legacy_c | 11 + package/mtd-utils/patches/patch-mkfs_jffs2_c | 15 + package/mtd-utils/patches/patch-rbtree_h | 12 + package/pcre/Makefile | 4 + package/squashfs/Makefile | 37 + .../squashfs/patches/patch-squashfs-tools_Makefile | 11 + .../patches/patch-squashfs-tools_mksquashfs_c | 47 + .../patches/patch-squashfs-tools_unsquashfs_c | 39 + package/syslinux/Makefile | 35 +- package/xz/Makefile | 5 + scripts/adkprepare.sh | 10 +- target/config/Config.in | 5 +- target/config/Config.in.tools | 32 +- target/microblaze/sys-available/qemu-microblaze | 1 - target/microblaze/sys-available/qemu-microblazeel | 1 - tests/adk.exp.in | 5 - tests/master.exp.in | 5 - toolchain/binutils/Makefile.inc | 3 +- toolchain/gcc/Makefile.inc | 3 +- toolchain/gdb/Makefile.inc | 3 +- toolchain/uClibc/Makefile.inc | 4 +- tools/Makefile | 57 - tools/addpattern/Makefile | 4 - tools/addpattern/addpattern.c | 252 - tools/adk/Makefile | 17 - tools/adk/depmaker.c | 313 - tools/adk/dkgetsz.c | 95 - tools/adk/pkgmaker.c | 1194 ---- tools/adk/pkgrebuild.c | 273 - tools/adk/sortfile.c | 153 - tools/adk/sortfile.h | 1 - tools/adk/strmap.c | 510 -- tools/adk/strmap.h | 350 - tools/bc/Makefile | 25 - tools/bzip2/Makefile | 24 - tools/ccache/Makefile | 25 - tools/cdrtools/Makefile | 25 - tools/cpio/Makefile | 32 - tools/cpio/src/_alloca.h | 27 - tools/cpio/src/_malloc.h | 26 - tools/cpio/src/_utmpx.h | 89 - tools/cpio/src/asciitype.c | 59 - tools/cpio/src/asciitype.h | 60 - tools/cpio/src/atoll.h | 8 - tools/cpio/src/blank.h | 38 - tools/cpio/src/blast.c | 449 -- tools/cpio/src/blast.h | 76 - tools/cpio/src/cpio.1 | 943 --- tools/cpio/src/cpio.c | 7172 -------------------- tools/cpio/src/cpio.h | 232 - tools/cpio/src/crc32.c | 115 - tools/cpio/src/expand.c | 193 - tools/cpio/src/explode.c | 1138 ---- tools/cpio/src/flags.c | 257 - tools/cpio/src/getdir.c | 197 - tools/cpio/src/getdir.h | 33 - tools/cpio/src/getopt.c | 141 - tools/cpio/src/gmatch.c | 136 - tools/cpio/src/ib_alloc.c | 60 - tools/cpio/src/ib_close.c | 36 - tools/cpio/src/ib_free.c | 33 - tools/cpio/src/ib_getlin.c | 78 - tools/cpio/src/ib_getw.c | 81 - tools/cpio/src/ib_open.c | 48 - tools/cpio/src/ib_popen.c | 87 - tools/cpio/src/ib_read.c | 51 - tools/cpio/src/ib_seek.c | 53 - tools/cpio/src/iblok.h | 135 - tools/cpio/src/inflate.c | 991 --- tools/cpio/src/mbtowi.h | 22 - tools/cpio/src/memalign.c | 51 - tools/cpio/src/memalign.h | 35 - tools/cpio/src/msgselect.h | 30 - tools/cpio/src/nonpax.c | 55 - tools/cpio/src/oblok.c | 260 - tools/cpio/src/oblok.h | 96 - tools/cpio/src/pathconf.c | 51 - tools/cpio/src/pathconf.h | 29 - tools/cpio/src/pax.1 | 919 --- tools/cpio/src/pax.c | 757 --- tools/cpio/src/pfmt.c | 39 - tools/cpio/src/pfmt.h | 46 - tools/cpio/src/pfmt_label.c | 1 - tools/cpio/src/regexp.h | 1211 ---- tools/cpio/src/regexpr.c | 90 - tools/cpio/src/regexpr.h | 53 - tools/cpio/src/setlabel.c | 40 - tools/cpio/src/setuxlabel.c | 47 - tools/cpio/src/sfile.c | 99 - tools/cpio/src/sfile.h | 40 - tools/cpio/src/sighold.c | 42 - tools/cpio/src/sigignore.c | 45 - tools/cpio/src/signal.c | 46 - tools/cpio/src/sigpause.c | 48 - tools/cpio/src/sigrelse.c | 42 - tools/cpio/src/sigset.c | 57 - tools/cpio/src/sigset.h | 40 - tools/cpio/src/strtol.c | 117 - tools/cpio/src/unshrink.c | 307 - tools/cpio/src/unzip.h | 121 - tools/cpio/src/utmpx.c | 252 - tools/cpio/src/version.c | 26 - tools/cpio/src/vpfmt.c | 90 - tools/flex/Makefile | 25 - tools/genext2fs/Makefile | 25 - tools/lzma/Makefile | 25 - tools/lzo/Makefile | 28 - tools/lzop/Makefile | 30 - tools/m4/Makefile | 25 - tools/mkcrypt/Makefile | 11 - tools/mkcrypt/mkcrypt.c | 441 -- tools/mkfimage/Makefile | 4 - tools/mkfimage/mkfimage.c | 72 - tools/mkimage/Makefile | 11 - tools/mkimage/crc32.c | 200 - tools/mkimage/image.h | 161 - tools/mkimage/mkimage | Bin 23424 -> 0 bytes tools/mkimage/mkimage.c | 755 --- tools/mksh/Makefile | 29 - tools/mtd-utils/Makefile | 24 - tools/mtd-utils/patches/darwin.patch | 261 - tools/mtd-utils/patches/lzo.patch | 88 - tools/pcre/Makefile | 30 - tools/rules.mk | 7 - tools/squashfs/Makefile | 29 - tools/squashfs/patches/cppflags.patch | 12 - tools/squashfs/patches/darwin.patch | 88 - tools/srec2bin/Makefile | 4 - tools/srec2bin/srec2bin.c | 521 -- tools/syslinux/Makefile | 37 - tools/trx/Makefile | 4 - tools/trx/trx.c | 366 - tools/xz/Makefile | 28 - 326 files changed, 41449 insertions(+), 43006 deletions(-) create mode 100644 adk/config/Config.in create mode 100644 adk/config/Kconfig-language.txt create mode 100644 adk/config/Makefile create mode 100644 adk/config/Makefile.in create mode 100755 adk/config/check.sh create mode 100644 adk/config/conf.c create mode 100644 adk/config/confdata.c create mode 100644 adk/config/expr.c create mode 100644 adk/config/expr.h create mode 100644 adk/config/gconf.c create mode 100644 adk/config/gconf.glade create mode 100644 adk/config/images.c create mode 100644 adk/config/kconfig_load.c create mode 100644 adk/config/kxgettext.c create mode 100644 adk/config/lex.zconf.c_shipped create mode 100644 adk/config/lkc.h create mode 100644 adk/config/lkc_proto.h create mode 100644 adk/config/lxdialog/.gitignore create mode 100644 adk/config/lxdialog/BIG.FAT.WARNING create mode 100644 adk/config/lxdialog/check-lxdialog.sh create mode 100644 adk/config/lxdialog/checklist.c create mode 100644 adk/config/lxdialog/dialog.h create mode 100644 adk/config/lxdialog/inputbox.c create mode 100644 adk/config/lxdialog/menubox.c create mode 100644 adk/config/lxdialog/textbox.c create mode 100644 adk/config/lxdialog/util.c create mode 100644 adk/config/lxdialog/yesno.c create mode 100644 adk/config/mconf.c create mode 100644 adk/config/menu.c create mode 100644 adk/config/symbol.c create mode 100644 adk/config/util.c create mode 100644 adk/config/zconf.gperf create mode 100644 adk/config/zconf.hash.c_shipped create mode 100644 adk/config/zconf.l create mode 100644 adk/config/zconf.tab.c_shipped create mode 100644 adk/config/zconf.tab.h_shipped create mode 100644 adk/config/zconf.y create mode 100644 adk/tests/adk.exp.in create mode 100644 adk/tests/master.exp.in create mode 100644 adk/tools/Makefile create mode 100644 adk/tools/depmaker.c create mode 100644 adk/tools/dkgetsz.c create mode 100644 adk/tools/pkgmaker.c create mode 100644 adk/tools/pkgrebuild.c create mode 100644 adk/tools/sortfile.c create mode 100644 adk/tools/sortfile.h create mode 100644 adk/tools/strmap.c create mode 100644 adk/tools/strmap.h delete mode 100644 config/Config.in delete mode 100644 config/Kconfig-language.txt delete mode 100644 config/Makefile delete mode 100644 config/Makefile.in delete mode 100755 config/check.sh delete mode 100644 config/conf.c delete mode 100644 config/confdata.c delete mode 100644 config/expr.c delete mode 100644 config/expr.h delete mode 100644 config/gconf.c delete mode 100644 config/gconf.glade delete mode 100644 config/images.c delete mode 100644 config/kconfig_load.c delete mode 100644 config/kxgettext.c delete mode 100644 config/lex.zconf.c_shipped delete mode 100644 config/lkc.h delete mode 100644 config/lkc_proto.h delete mode 100644 config/lxdialog/.gitignore delete mode 100644 config/lxdialog/BIG.FAT.WARNING delete mode 100644 config/lxdialog/check-lxdialog.sh delete mode 100644 config/lxdialog/checklist.c delete mode 100644 config/lxdialog/dialog.h delete mode 100644 config/lxdialog/inputbox.c delete mode 100644 config/lxdialog/menubox.c delete mode 100644 config/lxdialog/textbox.c delete mode 100644 config/lxdialog/util.c delete mode 100644 config/lxdialog/yesno.c delete mode 100644 config/mconf.c delete mode 100644 config/menu.c delete mode 100644 config/symbol.c delete mode 100644 config/util.c delete mode 100644 config/zconf.gperf delete mode 100644 config/zconf.hash.c_shipped delete mode 100644 config/zconf.l delete mode 100644 config/zconf.tab.c_shipped delete mode 100644 config/zconf.tab.h_shipped delete mode 100644 config/zconf.y create mode 100644 package/ccache/Makefile create mode 100644 package/genext2fs/Makefile create mode 100644 package/heirloom-cpio/Makefile create mode 100644 package/heirloom-cpio/src/Makefile create mode 100644 package/heirloom-cpio/src/_alloca.h create mode 100644 package/heirloom-cpio/src/_malloc.h create mode 100644 package/heirloom-cpio/src/_utmpx.h create mode 100644 package/heirloom-cpio/src/asciitype.c create mode 100644 package/heirloom-cpio/src/asciitype.h create mode 100644 package/heirloom-cpio/src/atoll.h create mode 100644 package/heirloom-cpio/src/blank.h create mode 100644 package/heirloom-cpio/src/blast.c create mode 100644 package/heirloom-cpio/src/blast.h create mode 100644 package/heirloom-cpio/src/cpio.1 create mode 100644 package/heirloom-cpio/src/cpio.c create mode 100644 package/heirloom-cpio/src/cpio.h create mode 100644 package/heirloom-cpio/src/crc32.c create mode 100644 package/heirloom-cpio/src/expand.c create mode 100644 package/heirloom-cpio/src/explode.c create mode 100644 package/heirloom-cpio/src/flags.c create mode 100644 package/heirloom-cpio/src/getdir.c create mode 100644 package/heirloom-cpio/src/getdir.h create mode 100644 package/heirloom-cpio/src/getopt.c create mode 100644 package/heirloom-cpio/src/gmatch.c create mode 100644 package/heirloom-cpio/src/ib_alloc.c create mode 100644 package/heirloom-cpio/src/ib_close.c create mode 100644 package/heirloom-cpio/src/ib_free.c create mode 100644 package/heirloom-cpio/src/ib_getlin.c create mode 100644 package/heirloom-cpio/src/ib_getw.c create mode 100644 package/heirloom-cpio/src/ib_open.c create mode 100644 package/heirloom-cpio/src/ib_popen.c create mode 100644 package/heirloom-cpio/src/ib_read.c create mode 100644 package/heirloom-cpio/src/ib_seek.c create mode 100644 package/heirloom-cpio/src/iblok.h create mode 100644 package/heirloom-cpio/src/inflate.c create mode 100644 package/heirloom-cpio/src/mbtowi.h create mode 100644 package/heirloom-cpio/src/memalign.c create mode 100644 package/heirloom-cpio/src/memalign.h create mode 100644 package/heirloom-cpio/src/msgselect.h create mode 100644 package/heirloom-cpio/src/nonpax.c create mode 100644 package/heirloom-cpio/src/oblok.c create mode 100644 package/heirloom-cpio/src/oblok.h create mode 100644 package/heirloom-cpio/src/pathconf.c create mode 100644 package/heirloom-cpio/src/pathconf.h create mode 100644 package/heirloom-cpio/src/pax.1 create mode 100644 package/heirloom-cpio/src/pax.c create mode 100644 package/heirloom-cpio/src/pfmt.c create mode 100644 package/heirloom-cpio/src/pfmt.h create mode 100644 package/heirloom-cpio/src/pfmt_label.c create mode 100644 package/heirloom-cpio/src/regexp.h create mode 100644 package/heirloom-cpio/src/regexpr.c create mode 100644 package/heirloom-cpio/src/regexpr.h create mode 100644 package/heirloom-cpio/src/setlabel.c create mode 100644 package/heirloom-cpio/src/setuxlabel.c create mode 100644 package/heirloom-cpio/src/sfile.c create mode 100644 package/heirloom-cpio/src/sfile.h create mode 100644 package/heirloom-cpio/src/sighold.c create mode 100644 package/heirloom-cpio/src/sigignore.c create mode 100644 package/heirloom-cpio/src/signal.c create mode 100644 package/heirloom-cpio/src/sigpause.c create mode 100644 package/heirloom-cpio/src/sigrelse.c create mode 100644 package/heirloom-cpio/src/sigset.c create mode 100644 package/heirloom-cpio/src/sigset.h create mode 100644 package/heirloom-cpio/src/strtol.c create mode 100644 package/heirloom-cpio/src/unshrink.c create mode 100644 package/heirloom-cpio/src/unzip.h create mode 100644 package/heirloom-cpio/src/utmpx.c create mode 100644 package/heirloom-cpio/src/version.c create mode 100644 package/heirloom-cpio/src/vpfmt.c create mode 100644 package/lzma/Makefile create mode 100644 package/mkcrypt/Makefile create mode 100644 package/mkcrypt/src/mkcrypt.c create mode 100644 package/mkimage/Makefile create mode 100644 package/mkimage/src/crc32.c create mode 100644 package/mkimage/src/image.h create mode 100644 package/mkimage/src/mkimage.c create mode 100644 package/mtd-utils/Makefile create mode 100644 package/mtd-utils/patches/patch-Makefile create mode 100644 package/mtd-utils/patches/patch-common_mk create mode 100644 package/mtd-utils/patches/patch-compr_c create mode 100644 package/mtd-utils/patches/patch-compr_lzo_c create mode 100644 package/mtd-utils/patches/patch-compr_zlib_c create mode 100644 package/mtd-utils/patches/patch-include_mtd_jffs2-user_h create mode 100644 package/mtd-utils/patches/patch-include_mtd_mtd-abi_h create mode 100644 package/mtd-utils/patches/patch-include_mtd_ubi-media_h create mode 100644 package/mtd-utils/patches/patch-lib_libfec_c create mode 100644 package/mtd-utils/patches/patch-lib_libmtd_c create mode 100644 package/mtd-utils/patches/patch-lib_libmtd_legacy_c create mode 100644 package/mtd-utils/patches/patch-mkfs_jffs2_c create mode 100644 package/mtd-utils/patches/patch-rbtree_h create mode 100644 package/squashfs/Makefile create mode 100644 package/squashfs/patches/patch-squashfs-tools_Makefile create mode 100644 package/squashfs/patches/patch-squashfs-tools_mksquashfs_c create mode 100644 package/squashfs/patches/patch-squashfs-tools_unsquashfs_c delete mode 100644 tests/adk.exp.in delete mode 100644 tests/master.exp.in delete mode 100644 tools/Makefile delete mode 100644 tools/addpattern/Makefile delete mode 100644 tools/addpattern/addpattern.c delete mode 100644 tools/adk/Makefile delete mode 100644 tools/adk/depmaker.c delete mode 100644 tools/adk/dkgetsz.c delete mode 100644 tools/adk/pkgmaker.c delete mode 100644 tools/adk/pkgrebuild.c delete mode 100644 tools/adk/sortfile.c delete mode 100644 tools/adk/sortfile.h delete mode 100644 tools/adk/strmap.c delete mode 100644 tools/adk/strmap.h delete mode 100644 tools/bc/Makefile delete mode 100644 tools/bzip2/Makefile delete mode 100644 tools/ccache/Makefile delete mode 100644 tools/cdrtools/Makefile delete mode 100644 tools/cpio/Makefile delete mode 100644 tools/cpio/src/_alloca.h delete mode 100644 tools/cpio/src/_malloc.h delete mode 100644 tools/cpio/src/_utmpx.h delete mode 100644 tools/cpio/src/asciitype.c delete mode 100644 tools/cpio/src/asciitype.h delete mode 100644 tools/cpio/src/atoll.h delete mode 100644 tools/cpio/src/blank.h delete mode 100644 tools/cpio/src/blast.c delete mode 100644 tools/cpio/src/blast.h delete mode 100644 tools/cpio/src/cpio.1 delete mode 100644 tools/cpio/src/cpio.c delete mode 100644 tools/cpio/src/cpio.h delete mode 100644 tools/cpio/src/crc32.c delete mode 100644 tools/cpio/src/expand.c delete mode 100644 tools/cpio/src/explode.c delete mode 100644 tools/cpio/src/flags.c delete mode 100644 tools/cpio/src/getdir.c delete mode 100644 tools/cpio/src/getdir.h delete mode 100644 tools/cpio/src/getopt.c delete mode 100644 tools/cpio/src/gmatch.c delete mode 100644 tools/cpio/src/ib_alloc.c delete mode 100644 tools/cpio/src/ib_close.c delete mode 100644 tools/cpio/src/ib_free.c delete mode 100644 tools/cpio/src/ib_getlin.c delete mode 100644 tools/cpio/src/ib_getw.c delete mode 100644 tools/cpio/src/ib_open.c delete mode 100644 tools/cpio/src/ib_popen.c delete mode 100644 tools/cpio/src/ib_read.c delete mode 100644 tools/cpio/src/ib_seek.c delete mode 100644 tools/cpio/src/iblok.h delete mode 100644 tools/cpio/src/inflate.c delete mode 100644 tools/cpio/src/mbtowi.h delete mode 100644 tools/cpio/src/memalign.c delete mode 100644 tools/cpio/src/memalign.h delete mode 100644 tools/cpio/src/msgselect.h delete mode 100644 tools/cpio/src/nonpax.c delete mode 100644 tools/cpio/src/oblok.c delete mode 100644 tools/cpio/src/oblok.h delete mode 100644 tools/cpio/src/pathconf.c delete mode 100644 tools/cpio/src/pathconf.h delete mode 100644 tools/cpio/src/pax.1 delete mode 100644 tools/cpio/src/pax.c delete mode 100644 tools/cpio/src/pfmt.c delete mode 100644 tools/cpio/src/pfmt.h delete mode 100644 tools/cpio/src/pfmt_label.c delete mode 100644 tools/cpio/src/regexp.h delete mode 100644 tools/cpio/src/regexpr.c delete mode 100644 tools/cpio/src/regexpr.h delete mode 100644 tools/cpio/src/setlabel.c delete mode 100644 tools/cpio/src/setuxlabel.c delete mode 100644 tools/cpio/src/sfile.c delete mode 100644 tools/cpio/src/sfile.h delete mode 100644 tools/cpio/src/sighold.c delete mode 100644 tools/cpio/src/sigignore.c delete mode 100644 tools/cpio/src/signal.c delete mode 100644 tools/cpio/src/sigpause.c delete mode 100644 tools/cpio/src/sigrelse.c delete mode 100644 tools/cpio/src/sigset.c delete mode 100644 tools/cpio/src/sigset.h delete mode 100644 tools/cpio/src/strtol.c delete mode 100644 tools/cpio/src/unshrink.c delete mode 100644 tools/cpio/src/unzip.h delete mode 100644 tools/cpio/src/utmpx.c delete mode 100644 tools/cpio/src/version.c delete mode 100644 tools/cpio/src/vpfmt.c delete mode 100644 tools/flex/Makefile delete mode 100644 tools/genext2fs/Makefile delete mode 100644 tools/lzma/Makefile delete mode 100644 tools/lzo/Makefile delete mode 100644 tools/lzop/Makefile delete mode 100644 tools/m4/Makefile delete mode 100644 tools/mkcrypt/Makefile delete mode 100644 tools/mkcrypt/mkcrypt.c delete mode 100644 tools/mkfimage/Makefile delete mode 100644 tools/mkfimage/mkfimage.c delete mode 100644 tools/mkimage/Makefile delete mode 100644 tools/mkimage/crc32.c delete mode 100644 tools/mkimage/image.h delete mode 100755 tools/mkimage/mkimage delete mode 100644 tools/mkimage/mkimage.c delete mode 100644 tools/mksh/Makefile delete mode 100644 tools/mtd-utils/Makefile delete mode 100644 tools/mtd-utils/patches/darwin.patch delete mode 100644 tools/mtd-utils/patches/lzo.patch delete mode 100644 tools/pcre/Makefile delete mode 100644 tools/rules.mk delete mode 100644 tools/squashfs/Makefile delete mode 100644 tools/squashfs/patches/cppflags.patch delete mode 100644 tools/squashfs/patches/darwin.patch delete mode 100644 tools/srec2bin/Makefile delete mode 100644 tools/srec2bin/srec2bin.c delete mode 100644 tools/syslinux/Makefile delete mode 100644 tools/trx/Makefile delete mode 100644 tools/trx/trx.c delete mode 100644 tools/xz/Makefile diff --git a/.gitignore b/.gitignore index b2a8d1a21..b28f3e045 100644 --- a/.gitignore +++ b/.gitignore @@ -1,20 +1,25 @@ -/config/conf -/config/conf.exe -/config/a.exe -/config/lex.backup -/config/lex.zconf.c -/config/lkc_defs.h -/config/gconf -/config/gconf.exe -/config/mconf -/config/mconf.exe -/config/zconf.hash.c -/config/zconf.output -/config/zconf.tab.c -/config/zconf.tab.h -/tests/master.exp -/tests/adk.exp -/tests/adk.exp.in.tmp +/adk/config/*.o +/adk/config/lxdialog/*.o +/adk/config/conf +/adk/config/conf.exe +/adk/config/a.exe +/adk/config/lex.backup +/adk/config/lex.zconf.c +/adk/config/lkc_defs.h +/adk/config/gconf +/adk/config/gconf.exe +/adk/config/mconf +/adk/config/mconf.exe +/adk/config/zconf.hash.c +/adk/config/zconf.output +/adk/config/zconf.tab.c +/adk/config/zconf.tab.h +/adk/tools/pkgmaker +/adk/tools/depmaker +/adk/tools/pkgrebuild +/adk/tests/master.exp +/adk/tests/adk.exp +/adk/tests/adk.exp.in.tmp /prereq.mk /toolchain_*/ /.ADK_HAVE_DOT_CONFIG @@ -32,8 +37,6 @@ /root_*/ /firmware/ /build_*/ -/config/*.o -/config/lxdialog/*.o /make.log /dl /package/Config.in.auto* @@ -41,7 +44,6 @@ /package/*/Config.in /package/*/Config.in.lib /package/*/Config.in.kmod -/tools_build/ /extra/ /.menu /.adkinit diff --git a/adk/config/Config.in b/adk/config/Config.in new file mode 100644 index 000000000..9a7778310 --- /dev/null +++ b/adk/config/Config.in @@ -0,0 +1,8 @@ +# + +config ADK_PACKAGE_CONFIG + bool"config" + default n + help + Add help text here. + diff --git a/adk/config/Kconfig-language.txt b/adk/config/Kconfig-language.txt new file mode 100644 index 000000000..c412c2458 --- /dev/null +++ b/adk/config/Kconfig-language.txt @@ -0,0 +1,379 @@ +Introduction +------------ + +The configuration database is a collection of configuration options +organized in a tree structure: + + +- Code maturity level options + | +- Prompt for development and/or incomplete code/drivers + +- General setup + | +- Networking support + | +- System V IPC + | +- BSD Process Accounting + | +- Sysctl support + +- Loadable module support + | +- Enable loadable module support + | +- Set version information on all module symbols + | +- Kernel module loader + +- ... + +Every entry has its own dependencies. These dependencies are used +to determine the visibility of an entry. Any child entry is only +visible if its parent entry is also visible. + +Menu entries +------------ + +Most entries define a config option; all other entries help to organize +them. A single configuration option is defined like this: + +config MODVERSIONS + bool "Set version information on all module symbols" + depends on MODULES + help + Usually, modules have to be recompiled whenever you switch to a new + kernel. ... + +Every line starts with a key word and can be followed by multiple +arguments. "config" starts a new config entry. The following lines +define attributes for this config option. Attributes can be the type of +the config option, input prompt, dependencies, help text and default +values. A config option can be defined multiple times with the same +name, but every definition can have only a single input prompt and the +type must not conflict. + +Menu attributes +--------------- + +A menu entry can have a number of attributes. Not all of them are +applicable everywhere (see syntax). + +- type definition: "bool"/"tristate"/"string"/"hex"/"int" + Every config option must have a type. There are only two basic types: + tristate and string; the other types are based on these two. The type + definition optionally accepts an input prompt, so these two examples + are equivalent: + + bool "Networking support" + and + bool + prompt "Networking support" + +- input prompt: "prompt" ["if" ] + Every menu entry can have at most one prompt, which is used to display + to the user. Optionally dependencies only for this prompt can be added + with "if". + +- default value: "default" ["if" ] + A config option can have any number of default values. If multiple + default values are visible, only the first defined one is active. + Default values are not limited to the menu entry where they are + defined. This means the default can be defined somewhere else or be + overridden by an earlier definition. + The default value is only assigned to the config symbol if no other + value was set by the user (via the input prompt above). If an input + prompt is visible the default value is presented to the user and can + be overridden by him. + Optionally, dependencies only for this default value can be added with + "if". + +- type definition + default value: + "def_bool"/"def_tristate" ["if" ] + This is a shorthand notation for a type definition plus a value. + Optionally dependencies for this default value can be added with "if". + +- dependencies: "depends on" + This defines a dependency for this menu entry. If multiple + dependencies are defined, they are connected with '&&'. Dependencies + are applied to all other options within this menu entry (which also + accept an "if" expression), so these two examples are equivalent: + + bool "foo" if BAR + default y if BAR + and + depends on BAR + bool "foo" + default y + +- reverse dependencies: "select" ["if" ] + While normal dependencies reduce the upper limit of a symbol (see + below), reverse dependencies can be used to force a lower limit of + another symbol. The value of the current menu symbol is used as the + minimal value can be set to. If is selected multiple + times, the limit is set to the largest selection. + Reverse dependencies can only be used with boolean or tristate + symbols. + Note: + select should be used with care. select will force + a symbol to a value without visiting the dependencies. + By abusing select you are able to select a symbol FOO even + if FOO depends on BAR that is not set. + In general use select only for non-visible symbols + (no prompts anywhere) and for symbols with no dependencies. + That will limit the usefulness but on the other hand avoid + the illegal configurations all over. + kconfig should one day warn about such things. + +- numerical ranges: "range" ["if" ] + This allows to limit the range of possible input values for int + and hex symbols. The user can only input a value which is larger than + or equal to the first symbol and smaller than or equal to the second + symbol. + +- help text: "help" or "---help---" + This defines a help text. The end of the help text is determined by + the indentation level, this means it ends at the first line which has + a smaller indentation than the first line of the help text. + "---help---" and "help" do not differ in behaviour, "---help---" is + used to help visually separate configuration logic from help within + the file as an aid to developers. + +- misc options: "option" [=] + Various less common options can be defined via this option syntax, + which can modify the behaviour of the menu entry and its config + symbol. These options are currently possible: + + - "defconfig_list" + This declares a list of default entries which can be used when + looking for the default configuration (which is used when the main + .config doesn't exists yet.) + + - "modules" + This declares the symbol to be used as the MODULES symbol, which + enables the third modular state for all config symbols. + + - "env"= + This imports the environment variable into Kconfig. It behaves like + a default, except that the value comes from the environment, this + also means that the behaviour when mixing it with normal defaults is + undefined at this point. The symbol is currently not exported back + to the build environment (if this is desired, it can be done via + another symbol). + +Menu dependencies +----------------- + +Dependencies define the visibility of a menu entry and can also reduce +the input range of tristate symbols. The tristate logic used in the +expressions uses one more state than normal boolean logic to express the +module state. Dependency expressions have the following syntax: + + ::= (1) + '=' (2) + '!=' (3) + '(' ')' (4) + '!' (5) + '&&' (6) + '||' (7) + +Expressions are listed in decreasing order of precedence. + +(1) Convert the symbol into an expression. Boolean and tristate symbols + are simply converted into the respective expression values. All + other symbol types result in 'n'. +(2) If the values of both symbols are equal, it returns 'y', + otherwise 'n'. +(3) If the values of both symbols are equal, it returns 'n', + otherwise 'y'. +(4) Returns the value of the expression. Used to override precedence. +(5) Returns the result of (2-/expr/). +(6) Returns the result of min(/expr/, /expr/). +(7) Returns the result of max(/expr/, /expr/). + +An expression can have a value of 'n', 'm' or 'y' (or 0, 1, 2 +respectively for calculations). A menu entry becomes visible when it's +expression evaluates to 'm' or 'y'. + +There are two types of symbols: constant and non-constant symbols. +Non-constant symbols are the most common ones and are defined with the +'config' statement. Non-constant symbols consist entirely of alphanumeric +characters or underscores. +Constant symbols are only part of expressions. Constant symbols are +always surrounded by single or double quotes. Within the quote, any +other character is allowed and the quotes can be escaped using '\'. + +Menu structure +-------------- + +The position of a menu entry in the tree is determined in two ways. First +it can be specified explicitly: + +menu "Network device support" + depends on NET + +config NETDEVICES + ... + +endmenu + +All entries within the "menu" ... "endmenu" block become a submenu of +"Network device support". All subentries inherit the dependencies from +the menu entry, e.g. this means the dependency "NET" is added to the +dependency list of the config option NETDEVICES. + +The other way to generate the menu structure is done by analyzing the +dependencies. If a menu entry somehow depends on the previous entry, it +can be made a submenu of it. First, the previous (parent) symbol must +be part of the dependency list and then one of these two conditions +must be true: +- the child entry must become invisible, if the parent is set to 'n' +- the child entry must only be visible, if the parent is visible + +config MODULES + bool "Enable loadable module support" + +config MODVERSIONS + bool "Set version information on all module symbols" + depends on MODULES + +comment "module support disabled" + depends on !MODULES + +MODVERSIONS directly depends on MODULES, this means it's only visible if +MODULES is different from 'n'. The comment on the other hand is always +visible when MODULES is visible (the (empty) dependency of MODULES is +also part of the comment dependencies). + + +Kconfig syntax +-------------- + +The configuration file describes a series of menu entries, where every +line starts with a keyword (except help texts). The following keywords +end a menu entry: +- config +- menuconfig +- choice/endchoice +- comment +- menu/endmenu +- if/endif +- source +The first five also start the definition of a menu entry. + +config: + + "config" + + +This defines a config symbol and accepts any of above +attributes as options. + +menuconfig: + "menuconfig" + + +This is similar to the simple config entry above, but it also gives a +hint to front ends, that all suboptions should be displayed as a +separate list of options. + +choices: + + "choice" + + + "endchoice" + +This defines a choice group and accepts any of the above attributes as +options. A choice can only be of type bool or tristate, while a boolean +choice only allows a single config entry to be selected, a tristate +choice also allows any number of config entries to be set to 'm'. This +can be used if multiple drivers for a single hardware exists and only a +single driver can be compiled/loaded into the kernel, but all drivers +can be compiled as modules. +A choice accepts another option "optional", which allows to set the +choice to 'n' and no entry needs to be selected. + +comment: + + "comment" + + +This defines a comment which is displayed to the user during the +configuration process and is also echoed to the output files. The only +possible options are dependencies. + +menu: + + "menu" + + + "endmenu" + +This defines a menu block, see "Menu structure" above for more +information. The only possible options are dependencies. + +if: + + "if" + + "endif" + +This defines an if block. The dependency expression is appended +to all enclosed menu entries. + +source: + + "source" + +This reads the specified configuration file. This file is always parsed. + +mainmenu: + + "mainmenu" + +This sets the config program's title bar if the config program chooses +to use it. + + +Kconfig hints +------------- +This is a collection of Kconfig tips, most of which aren't obvious at +first glance and most of which have become idioms in several Kconfig +files. + +Adding common features and make the usage configurable +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +It is a common idiom to implement a feature/functionality that are +relevant for some architectures but not all. +The recommended way to do so is to use a config variable named HAVE_* +that is defined in a common Kconfig file and selected by the relevant +architectures. +An example is the generic IOMAP functionality. + +We would in lib/Kconfig see: + +# Generic IOMAP is used to ... +config HAVE_GENERIC_IOMAP + +config GENERIC_IOMAP + depends on HAVE_GENERIC_IOMAP && FOO + +And in lib/Makefile we would see: +obj-$(CONFIG_GENERIC_IOMAP) += iomap.o + +For each architecture using the generic IOMAP functionality we would see: + +config X86 + select ... + select HAVE_GENERIC_IOMAP + select ... + +Note: we use the existing config option and avoid creating a new +config variable to select HAVE_GENERIC_IOMAP. + +Note: the use of the internal config variable HAVE_GENERIC_IOMAP, it is +introduced to overcome the limitation of select which will force a +config option to 'y' no matter the dependencies. +The dependencies are moved to the symbol GENERIC_IOMAP and we avoid the +situation where select forces a symbol equals to 'y'. + +Build as module only +~~~~~~~~~~~~~~~~~~~~ +To restrict a component build to module-only, qualify its config symbol +with "depends on m". E.g.: + +config FOO + depends on BAR && m + +limits FOO to module (=m) or disabled (=n). + diff --git a/adk/config/Makefile b/adk/config/Makefile new file mode 100644 index 000000000..9dc08d3ac --- /dev/null +++ b/adk/config/Makefile @@ -0,0 +1,131 @@ +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +ifneq ($(filter-out clean,${MAKECMDGOALS}),) +include ${TOPDIR}/rules.mk +endif + +CP=cp -fpR +CFLAGS_FOR_BUILD:=-DKBUILD_NO_NLS -O2 -w + +all: ncurses conf mconf + +LIBS= -lncurses +ifeq (/usr/include/ncurses/ncurses.h, $(wildcard /usr/include/ncurses/ncurses.h)) +CFLAGS_FOR_BUILD+= -I/usr/include/ncurses -DCURSES_LOC="" +else +ifeq (/usr/include/ncurses/curses.h, $(wildcard /usr/include/ncurses/curses.h)) +CFLAGS_FOR_BUILD+= -I/usr/include/ncurses -DCURSES_LOC="" +else +ifeq (/usr/local/include/ncurses/ncurses.h, $(wildcard /usr/local/include/ncurses/ncurses.h)) +CFLAGS_FOR_BUILD+= -I/usr/local/include/ncurses -DCURSES_LOC="" +else +ifeq (/usr/local/include/ncurses/curses.h, $(wildcard /usr/local/include/ncurses/curses.h)) +CFLAGS_FOR_BUILD+= -I/usr/local/include/ncurses -DCURSES_LOC="" +else +ifeq (/usr/pkg/include/ncurses.h, $(wildcard /usr/pkg/include/ncurses.h)) +CFLAGS_FOR_BUILD+= -I/usr/pkg/include -DCURSES_LOC="" +LIBS+= -L/usr/pkg/lib -Wl,-rpath -Wl,/usr/pkg/lib +else +ifeq (/usr/include/ncurses.h, $(wildcard /usr/include/ncurses.h)) +CFLAGS_FOR_BUILD+= -DCURSES_LOC="" +else +CFLAGS_FOR_BUILD+= -DCURSES_LOC="" +LIBS= -lcurses +endif +endif +endif +endif +endif +endif + +CONF_SRC =conf.c +MCONF_SRC =mconf.c $(wildcard lxdialog/*.c) +SHARED_SRC=zconf.tab.c +SHARED_DEPS:=lkc.h lkc_proto.h lkc_defs.h expr.h zconf.tab.h +CONF_OBJS =$(patsubst %.c,%.o, $(CONF_SRC)) +MCONF_OBJS=$(patsubst %.c,%.o, $(MCONF_SRC)) +SHARED_OBJS=$(patsubst %.c,%.o, $(SHARED_SRC)) + +conf: $(CONF_OBJS) $(SHARED_OBJS) + @$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $^ -o $@ + +mconf: $(MCONF_OBJS) $(SHARED_OBJS) + @$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $^ -o $@ $(LIBS) + +$(CONF_OBJS): %.o : %.c $(SHARED_DEPS) + @$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -I. -c $< -o $@ + +$(MCONF_OBJS): %.o : %.c $(SHARED_DEPS) + @$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -I. -c $< -o $@ + +glob.o: glob.c $(SHARED_DEPS) + @$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -I. -c glob.c -o $@ + +lkc_defs.h: lkc_proto.h + @sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/' + +### +# The following requires flex/bison +# By default we use the _shipped versions, uncomment the +# following line if you are modifying the flex/bison src. +#LKC_GENPARSER:= 1 + +ifdef LKC_GENPARSER + +%.tab.c %.tab.h: %.y + bison -t -d -v -b $* -p $(notdir $*) $< + +%.hash.c: %.gperf + gperf < $< > $@ + +lex.%.c: %.l + flex -P$(notdir $*) -o$@ $< + +lex.zconf.o: lex.zconf.c $(SHARED_DEPS) + @$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -I. -c $< -o $@ + +zconf.tab.o: zconf.tab.c zconf.hash.c lex.zconf.c confdata.c expr.c symbol.c menu.c $(SHARED_DEPS) + @$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -I. -c $< -o $@ + +else + +lex.zconf.o: lex.zconf.c $(SHARED_DEPS) + @$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -I. -c $< -o $@ + +lex.zconf.c: lex.zconf.c_shipped + @$(CP) lex.zconf.c_shipped lex.zconf.c + +zconf.hash.c: zconf.hash.c_shipped + @$(CP) zconf.hash.c_shipped zconf.hash.c + +zconf.tab.o: zconf.tab.c zconf.hash.c lex.zconf.c confdata.c expr.c symbol.c menu.c $(SHARED_DEPS) + @$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -I. -c $< -o $@ + +zconf.tab.c: zconf.tab.c_shipped + @$(CP) zconf.tab.c_shipped zconf.tab.c + +zconf.tab.h: zconf.tab.h_shipped + @$(CP) zconf.tab.h_shipped zconf.tab.h +endif + +.PHONY: ncurses + +ncurses: + @echo "int main(void) { return -1; }" > lxtemp.c + @if $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) lxtemp.c $(LIBS) ; then \ + rm -f lxtemp.c a.out; \ + else \ + rm -f lxtemp.c; \ + printf '\007'; \ + echo ">> Unable to find the Ncurses libraries." ;\ + echo ">>" ;\ + echo ">> You must have Ncurses installed in order" ;\ + echo ">> to use 'make menuconfig'" ;\ + echo ;\ + exit 1 ;\ + fi + +clean: + @rm -f *.o *~ core $(TARGETS) $(MCONF_OBJS) $(CONF_OBJS) zconf.hash.c \ + conf mconf zconf.tab.c zconf.tab.h lex.zconf.c lkc_defs.h diff --git a/adk/config/Makefile.in b/adk/config/Makefile.in new file mode 100644 index 000000000..0b3ac40a9 --- /dev/null +++ b/adk/config/Makefile.in @@ -0,0 +1,5 @@ +ifeq ($(strip $(ADK_PACKAGE_CONFIG)),y) +TARGETS+=config +endif + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/adk/config/check.sh b/adk/config/check.sh new file mode 100755 index 000000000..fa59cbf9d --- /dev/null +++ b/adk/config/check.sh @@ -0,0 +1,14 @@ +#!/bin/sh +# Needed for systems without gettext +$* -xc -o /dev/null - > /dev/null 2>&1 << EOF +#include +int main() +{ + gettext(""); + return 0; +} +EOF +if [ ! "$?" -eq "0" ]; then + echo -DKBUILD_NO_NLS; +fi + diff --git a/adk/config/conf.c b/adk/config/conf.c new file mode 100644 index 000000000..412656fec --- /dev/null +++ b/adk/config/conf.c @@ -0,0 +1,619 @@ +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define LKC_DIRECT_LINK +#include "lkc.h" + +static void conf(struct menu *menu); +static void check_conf(struct menu *menu); + +enum { + ask_all, + ask_new, + ask_silent, + set_default, + set_yes, + set_mod, + set_no, + set_random +} input_mode = ask_all; +char *defconfig_file; + +static int indent = 1; +static int valid_stdin = 1; +static int sync_kconfig; +static int conf_cnt; +static char line[128]; +static struct menu *rootEntry; + +static char nohelp_text[] = N_("Sorry, no help available for this option yet.\n"); + +static const char *get_help(struct menu *menu) +{ + if (menu_has_help(menu)) + return _(menu_get_help(menu)); + else + return nohelp_text; +} + +static void strip(char *str) +{ + char *p = str; + int l; + + while ((isspace(*p))) + p++; + l = strlen(p); + if (p != str) + memmove(str, p, l + 1); + if (!l) + return; + p = str + l - 1; + while ((isspace(*p))) + *p-- = 0; +} + +static void check_stdin(void) +{ + if (!valid_stdin) { + printf("aborted!\n\n"); + printf("Console input/output is redirected. "); + printf("Run 'make oldconfig' to update configuration.\n\n"); + exit(1); + } +} + +static int conf_askvalue(struct symbol *sym, const char *def) +{ + enum symbol_type type = sym_get_type(sym); + + if (!sym_has_value(sym)) + printf("(NEW) "); + + line[0] = '\n'; + line[1] = 0; + + if (!sym_is_changable(sym)) { + printf("%s\n", def); + line[0] = '\n'; + line[1] = 0; + return 0; + } + + switch (input_mode) { + case ask_new: + case ask_silent: + if (sym_has_value(sym)) { + printf("%s\n", def); + return 0; + } + check_stdin(); + case ask_all: + fflush(stdout); + if (fgets(line, 128, stdin) != NULL) + return 1; + default: + break; + } + + switch (type) { + case S_INT: + case S_HEX: + case S_STRING: + printf("%s\n", def); + return 1; + default: + ; + } + printf("%s", line); + return 1; +} + +int conf_string(struct menu *menu) +{ + struct symbol *sym = menu->sym; + const char *def; + + while (1) { + printf("%*s%s ", indent - 1, "", _(menu->prompt->text)); + printf("(%s) ", sym->name); + def = sym_get_string_value(sym); + if (sym_get_string_value(sym)) + printf("[%s] ", def); + if (!conf_askvalue(sym, def)) + return 0; + switch (line[0]) { + case '\n': + break; + case '?': + /* print help */ + if (line[1] == '\n') { + printf("\n%s\n", get_help(menu)); + def = NULL; + break; + } + default: + line[strlen(line)-1] = 0; + def = line; + } + if (def && sym_set_string_value(sym, def)) + return 0; + } +} + +static int conf_sym(struct menu *menu) +{ + struct symbol *sym = menu->sym; + int type; + tristate oldval, newval; + + while (1) { + printf("%*s%s ", indent - 1, "", _(menu->prompt->text)); + if (sym->name) + printf("(%s) ", sym->name); + type = sym_get_type(sym); + putchar('['); + oldval = sym_get_tristate_value(sym); + switch (oldval) { + case no: + putchar('N'); + break; + case mod: + putchar('M'); + break; + case yes: + putchar('Y'); + break; + } + if (oldval != no && sym_tristate_within_range(sym, no)) + printf("/n"); + if (oldval != mod && sym_tristate_within_range(sym, mod)) + printf("/m"); + if (oldval != yes && sym_tristate_within_range(sym, yes)) + printf("/y"); + if (menu_has_help(menu)) + printf("/?"); + printf("] "); + if (!conf_askvalue(sym, sym_get_string_value(sym))) + return 0; + strip(line); + + switch (line[0]) { + case 'n': + case 'N': + newval = no; + if (!line[1] || !strcmp(&line[1], "o")) + break; + continue; + case 'm': + case 'M': + newval = mod; + if (!line[1]) + break; + continue; + case 'y': + case 'Y': + newval = yes; + if (!line[1] || !strcmp(&line[1], "es")) + break; + continue; + case 0: + newval = oldval; + break; + case '?': + goto help; + default: + continue; + } + if (sym_set_tristate_value(sym, newval)) + return 0; +help: + printf("\n%s\n", get_help(menu)); + } +} + +static int conf_choice(struct menu *menu) +{ + struct symbol *sym, *def_sym; + struct menu *child; + int type; + bool is_new; + + sym = menu->sym; + type = sym_get_type(sym); + is_new = !sym_has_value(sym); + if (sym_is_changable(sym)) { + conf_sym(menu); + sym_calc_value(sym); + switch (sym_get_tristate_value(sym)) { + case no: + return 1; + case mod: + return 0; + case yes: + break; + } + } else { + switch (sym_get_tristate_value(sym)) { + case no: + return 1; + case mod: + printf("%*s%s\n", indent - 1, "", _(menu_get_prompt(menu))); + return 0; + case yes: + break; + } + } + + while (1) { + int cnt, def; + + printf("%*s%s\n", indent - 1, "", _(menu_get_prompt(menu))); + def_sym = sym_get_choice_value(sym); + cnt = def = 0; + line[0] = 0; + for (child = menu->list; child; child = child->next) { + if (!menu_is_visible(child)) + continue; + if (!child->sym) { + printf("%*c %s\n", indent, '*', _(menu_get_prompt(child))); + continue; + } + cnt++; + if (child->sym == def_sym) { + def = cnt; + printf("%*c", indent, '>'); + } else + printf("%*c", indent, ' '); + printf(" %d. %s", cnt, _(menu_get_prompt(child))); + if (child->sym->name) + printf(" (%s)", child->sym->name); + if (!sym_has_value(child->sym)) + printf(" (NEW)"); + printf("\n"); + } + printf(_("%*schoice"), indent - 1, ""); + if (cnt == 1) { + printf("[1]: 1\n"); + goto conf_childs; + } + printf("[1-%d", cnt); + if (menu_has_help(menu)) + printf("?"); + printf("]: "); + switch (input_mode) { + case ask_new: + case ask_silent: + if (!is_new) { + cnt = def; + printf("%d\n", cnt); + break; + } + check_stdin(); + case ask_all: + fflush(stdout); + if (fgets(line, 128, stdin) != NULL) + strip(line); + if (line[0] == '?') { + printf("\n%s\n", get_help(menu)); + continue; + } + if (!line[0]) + cnt = def; + else if (isdigit(line[0])) + cnt = atoi(line); + else + continue; + break; + default: + break; + } + + conf_childs: + for (child = menu->list; child; child = child->next) { + if (!child->sym || !menu_is_visible(child)) + continue; + if (!--cnt) + break; + } + if (!child) + continue; + if (line[strlen(line) - 1] == '?') { + printf("\n%s\n", get_help(child)); + continue; + } + sym_set_choice_value(sym, child->sym); + for (child = child->list; child; child = child->next) { + indent += 2; + conf(child); + indent -= 2; + } + return 1; + } +} + +static void conf(struct menu *menu) +{ + struct symbol *sym; + struct property *prop; + struct menu *child; + + if (!menu_is_visible(menu)) + return; + + sym = menu->sym; + prop = menu->prompt; + if (prop) { + const char *prompt; + + switch (prop->type) { + case P_MENU: + if (input_mode == ask_silent && rootEntry != menu) { + check_conf(menu); + return; + } + case P_COMMENT: + prompt = menu_get_prompt(menu); + if (prompt) + printf("%*c\n%*c %s\n%*c\n", + indent, '*', + indent, '*', _(prompt), + indent, '*'); + default: + ; + } + } + + if (!sym) + goto conf_childs; + + if (sym_is_choice(sym)) { + conf_choice(menu); + if (sym->curr.tri != mod) + return; + goto conf_childs; + } + + switch (sym->type) { + case S_INT: + case S_HEX: + case S_STRING: + conf_string(menu); + break; + default: + conf_sym(menu); + break; + } + +conf_childs: + if (sym) + indent += 2; + for (child = menu->list; child; child = child->next) + conf(child); + if (sym) + indent -= 2; +} + +static void check_conf(struct menu *menu) +{ + struct symbol *sym; + struct menu *child; + + if (!menu_is_visible(menu)) + return; + + sym = menu->sym; + if (sym && !sym_has_value(sym)) { + if (sym_is_changable(sym) || + (sym_is_choice(sym) && sym_get_tristate_value(sym) == yes)) { + if (!conf_cnt++) + printf("*\n* Restart config...\n*\n"); + rootEntry = menu_get_parent_menu(menu); + conf(rootEntry); + } + } + + for (child = menu->list; child; child = child->next) + check_conf(child); +} + +int main(int ac, char **av) +{ + int opt; + const char *name; + struct stat tmpstat; + +#ifndef KBUILD_NO_NLS + setlocale(LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); +#endif + + while ((opt = getopt(ac, av, "osdD:nmyrh")) != -1) { + switch (opt) { + case 'o': + input_mode = ask_silent; + break; + case 's': + input_mode = ask_silent; + sync_kconfig = 1; + break; + case 'd': + input_mode = set_default; + break; + case 'D': + input_mode = set_default; + defconfig_file = optarg; + break; + case 'n': + input_mode = set_no; + break; + case 'm': + input_mode = set_mod; + break; + case 'y': + input_mode = set_yes; + break; + case 'r': + { + struct timeval now; + unsigned int seed; + + /* + * Use microseconds derived seed, + * compensate for systems where it may be zero + */ + gettimeofday(&now, NULL); + + seed = (unsigned int)((now.tv_sec + 1) * (now.tv_usec + 1)); + srand(seed); + + input_mode = set_random; + break; + } + case 'h': + printf("See README for usage info\n"); + exit(0); + break; + default: + fprintf(stderr, "See README for usage info\n"); + exit(1); + } + } + if (ac == optind) { + printf(_("%s: Kconfig file missing\n"), av[0]); + exit(1); + } + name = av[optind]; + conf_parse(name); + //zconfdump(stdout); + if (sync_kconfig) { + name = conf_get_configname(); + if (stat(name, &tmpstat)) { + fprintf(stderr, _("***\n" + "*** You have not yet configured your kernel!\n" + "*** (missing kernel config file \"%s\")\n" + "***\n" + "*** Please run some configurator (e.g. \"make oldconfig\" or\n" + "*** \"make menuconfig\" or \"make xconfig\").\n" + "***\n"), name); + exit(1); + } + } + + switch (input_mode) { + case