summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore43
-rw-r--r--README1
-rw-r--r--adk/config/Config.in (renamed from config/Config.in)0
-rw-r--r--adk/config/Kconfig-language.txt (renamed from config/Kconfig-language.txt)0
-rw-r--r--adk/config/Makefile (renamed from config/Makefile)0
-rw-r--r--adk/config/Makefile.in (renamed from config/Makefile.in)0
-rwxr-xr-xadk/config/check.sh (renamed from config/check.sh)0
-rw-r--r--adk/config/conf.c (renamed from config/conf.c)0
-rw-r--r--adk/config/confdata.c (renamed from config/confdata.c)0
-rw-r--r--adk/config/expr.c (renamed from config/expr.c)0
-rw-r--r--adk/config/expr.h (renamed from config/expr.h)0
-rw-r--r--adk/config/gconf.c (renamed from config/gconf.c)0
-rw-r--r--adk/config/gconf.glade (renamed from config/gconf.glade)0
-rw-r--r--adk/config/images.c (renamed from config/images.c)0
-rw-r--r--adk/config/kconfig_load.c (renamed from config/kconfig_load.c)0
-rw-r--r--adk/config/kxgettext.c (renamed from config/kxgettext.c)0
-rw-r--r--adk/config/lex.zconf.c_shipped (renamed from config/lex.zconf.c_shipped)0
-rw-r--r--adk/config/lkc.h (renamed from config/lkc.h)0
-rw-r--r--adk/config/lkc_proto.h (renamed from config/lkc_proto.h)0
-rw-r--r--adk/config/lxdialog/.gitignore (renamed from config/lxdialog/.gitignore)0
-rw-r--r--adk/config/lxdialog/BIG.FAT.WARNING (renamed from config/lxdialog/BIG.FAT.WARNING)0
-rw-r--r--adk/config/lxdialog/check-lxdialog.sh (renamed from config/lxdialog/check-lxdialog.sh)0
-rw-r--r--adk/config/lxdialog/checklist.c (renamed from config/lxdialog/checklist.c)0
-rw-r--r--adk/config/lxdialog/dialog.h (renamed from config/lxdialog/dialog.h)0
-rw-r--r--adk/config/lxdialog/inputbox.c (renamed from config/lxdialog/inputbox.c)0
-rw-r--r--adk/config/lxdialog/menubox.c (renamed from config/lxdialog/menubox.c)0
-rw-r--r--adk/config/lxdialog/textbox.c (renamed from config/lxdialog/textbox.c)0
-rw-r--r--adk/config/lxdialog/util.c (renamed from config/lxdialog/util.c)0
-rw-r--r--adk/config/lxdialog/yesno.c (renamed from config/lxdialog/yesno.c)0
-rw-r--r--adk/config/mconf.c (renamed from config/mconf.c)0
-rw-r--r--adk/config/menu.c (renamed from config/menu.c)0
-rw-r--r--adk/config/symbol.c (renamed from config/symbol.c)0
-rw-r--r--adk/config/util.c (renamed from config/util.c)0
-rw-r--r--adk/config/zconf.gperf (renamed from config/zconf.gperf)0
-rw-r--r--adk/config/zconf.hash.c_shipped (renamed from config/zconf.hash.c_shipped)0
-rw-r--r--adk/config/zconf.l (renamed from config/zconf.l)0
-rw-r--r--adk/config/zconf.tab.c_shipped (renamed from config/zconf.tab.c_shipped)0
-rw-r--r--adk/config/zconf.tab.h_shipped (renamed from config/zconf.tab.h_shipped)0
-rw-r--r--adk/config/zconf.y (renamed from config/zconf.y)0
-rw-r--r--adk/tests/adk.exp.in (renamed from tests/adk.exp.in)0
-rw-r--r--adk/tests/master.exp.in (renamed from tests/master.exp.in)0
-rw-r--r--adk/tools/Makefile (renamed from tools/adk/Makefile)0
-rw-r--r--adk/tools/depmaker.c (renamed from tools/adk/depmaker.c)1
-rw-r--r--adk/tools/dkgetsz.c (renamed from tools/adk/dkgetsz.c)0
-rw-r--r--adk/tools/pkgmaker.c (renamed from tools/adk/pkgmaker.c)0
-rw-r--r--adk/tools/pkgrebuild.c (renamed from tools/adk/pkgrebuild.c)0
-rw-r--r--adk/tools/sortfile.c (renamed from tools/adk/sortfile.c)0
-rw-r--r--adk/tools/sortfile.h (renamed from tools/adk/sortfile.h)0
-rw-r--r--adk/tools/strmap.c (renamed from tools/adk/strmap.c)0
-rw-r--r--adk/tools/strmap.h (renamed from tools/adk/strmap.h)0
-rw-r--r--docs/how-openadk-works.txt25
-rw-r--r--docs/make-tips.txt4
-rw-r--r--docs/prerequisite.txt11
-rw-r--r--mk/build.mk67
-rw-r--r--mk/buildhlp.mk8
-rw-r--r--mk/fetch.mk1
-rw-r--r--mk/host.mk2
-rw-r--r--mk/image.mk6
-rw-r--r--mk/pkg-bottom.mk2
-rw-r--r--mk/vars.mk15
-rw-r--r--package/Makefile2
-rw-r--r--package/base-files/Makefile4
-rw-r--r--package/base-files/src/etc/mdev.conf1
-rw-r--r--package/base-files/src/lib/mdev/init27
-rw-r--r--package/bc/Makefile7
-rw-r--r--package/busybox/Makefile1
-rw-r--r--package/bzip2/Makefile2
-rw-r--r--package/ccache/Makefile24
-rw-r--r--package/cdrtools/Makefile31
-rw-r--r--package/cfgfs/Makefile2
-rw-r--r--package/findutils/Makefile6
-rw-r--r--package/genext2fs/Makefile24
-rw-r--r--package/heirloom-cpio/Makefile32
-rw-r--r--package/heirloom-cpio/src/Makefile28
-rw-r--r--package/heirloom-cpio/src/_alloca.h (renamed from tools/cpio/src/_alloca.h)0
-rw-r--r--package/heirloom-cpio/src/_malloc.h (renamed from tools/cpio/src/_malloc.h)0
-rw-r--r--package/heirloom-cpio/src/_utmpx.h (renamed from tools/cpio/src/_utmpx.h)0
-rw-r--r--package/heirloom-cpio/src/asciitype.c (renamed from tools/cpio/src/asciitype.c)0
-rw-r--r--package/heirloom-cpio/src/asciitype.h (renamed from tools/cpio/src/asciitype.h)0
-rw-r--r--package/heirloom-cpio/src/atoll.h (renamed from tools/cpio/src/atoll.h)0
-rw-r--r--package/heirloom-cpio/src/blank.h (renamed from tools/cpio/src/blank.h)0
-rw-r--r--package/heirloom-cpio/src/blast.c (renamed from tools/cpio/src/blast.c)0
-rw-r--r--package/heirloom-cpio/src/blast.h (renamed from tools/cpio/src/blast.h)0
-rw-r--r--package/heirloom-cpio/src/cpio.1 (renamed from tools/cpio/src/cpio.1)0
-rw-r--r--package/heirloom-cpio/src/cpio.c (renamed from tools/cpio/src/cpio.c)0
-rw-r--r--package/heirloom-cpio/src/cpio.h (renamed from tools/cpio/src/cpio.h)0
-rw-r--r--package/heirloom-cpio/src/crc32.c (renamed from tools/cpio/src/crc32.c)0
-rw-r--r--package/heirloom-cpio/src/expand.c (renamed from tools/cpio/src/expand.c)0
-rw-r--r--package/heirloom-cpio/src/explode.c (renamed from tools/cpio/src/explode.c)0
-rw-r--r--package/heirloom-cpio/src/flags.c (renamed from tools/cpio/src/flags.c)0
-rw-r--r--package/heirloom-cpio/src/getdir.c (renamed from tools/cpio/src/getdir.c)0
-rw-r--r--package/heirloom-cpio/src/getdir.h (renamed from tools/cpio/src/getdir.h)0
-rw-r--r--package/heirloom-cpio/src/getopt.c (renamed from tools/cpio/src/getopt.c)0
-rw-r--r--package/heirloom-cpio/src/gmatch.c (renamed from tools/cpio/src/gmatch.c)0
-rw-r--r--package/heirloom-cpio/src/ib_alloc.c (renamed from tools/cpio/src/ib_alloc.c)0
-rw-r--r--package/heirloom-cpio/src/ib_close.c (renamed from tools/cpio/src/ib_close.c)0
-rw-r--r--package/heirloom-cpio/src/ib_free.c (renamed from tools/cpio/src/ib_free.c)0
-rw-r--r--package/heirloom-cpio/src/ib_getlin.c (renamed from tools/cpio/src/ib_getlin.c)0
-rw-r--r--package/heirloom-cpio/src/ib_getw.c (renamed from tools/cpio/src/ib_getw.c)0
-rw-r--r--package/heirloom-cpio/src/ib_open.c (renamed from tools/cpio/src/ib_open.c)0
-rw-r--r--package/heirloom-cpio/src/ib_popen.c (renamed from tools/cpio/src/ib_popen.c)0
-rw-r--r--package/heirloom-cpio/src/ib_read.c (renamed from tools/cpio/src/ib_read.c)0
-rw-r--r--package/heirloom-cpio/src/ib_seek.c (renamed from tools/cpio/src/ib_seek.c)0
-rw-r--r--package/heirloom-cpio/src/iblok.h (renamed from tools/cpio/src/iblok.h)0
-rw-r--r--package/heirloom-cpio/src/inflate.c (renamed from tools/cpio/src/inflate.c)0
-rw-r--r--package/heirloom-cpio/src/mbtowi.h (renamed from tools/cpio/src/mbtowi.h)0
-rw-r--r--package/heirloom-cpio/src/memalign.c (renamed from tools/cpio/src/memalign.c)0
-rw-r--r--package/heirloom-cpio/src/memalign.h (renamed from tools/cpio/src/memalign.h)0
-rw-r--r--package/heirloom-cpio/src/msgselect.h (renamed from tools/cpio/src/msgselect.h)0
-rw-r--r--package/heirloom-cpio/src/nonpax.c (renamed from tools/cpio/src/nonpax.c)0
-rw-r--r--package/heirloom-cpio/src/oblok.c (renamed from tools/cpio/src/oblok.c)0
-rw-r--r--package/heirloom-cpio/src/oblok.h (renamed from tools/cpio/src/oblok.h)0
-rw-r--r--package/heirloom-cpio/src/pathconf.c (renamed from tools/cpio/src/pathconf.c)0
-rw-r--r--package/heirloom-cpio/src/pathconf.h (renamed from tools/cpio/src/pathconf.h)0
-rw-r--r--package/heirloom-cpio/src/pax.1 (renamed from tools/cpio/src/pax.1)0
-rw-r--r--package/heirloom-cpio/src/pax.c (renamed from tools/cpio/src/pax.c)0
-rw-r--r--package/heirloom-cpio/src/pfmt.c (renamed from tools/cpio/src/pfmt.c)0
-rw-r--r--package/heirloom-cpio/src/pfmt.h (renamed from tools/cpio/src/pfmt.h)0
-rw-r--r--package/heirloom-cpio/src/pfmt_label.c (renamed from tools/cpio/src/pfmt_label.c)0
-rw-r--r--package/heirloom-cpio/src/regexp.h (renamed from tools/cpio/src/regexp.h)0
-rw-r--r--package/heirloom-cpio/src/regexpr.c (renamed from tools/cpio/src/regexpr.c)0
-rw-r--r--package/heirloom-cpio/src/regexpr.h (renamed from tools/cpio/src/regexpr.h)0
-rw-r--r--package/heirloom-cpio/src/setlabel.c (renamed from tools/cpio/src/setlabel.c)0
-rw-r--r--package/heirloom-cpio/src/setuxlabel.c (renamed from tools/cpio/src/setuxlabel.c)0
-rw-r--r--package/heirloom-cpio/src/sfile.c (renamed from tools/cpio/src/sfile.c)0
-rw-r--r--package/heirloom-cpio/src/sfile.h (renamed from tools/cpio/src/sfile.h)0
-rw-r--r--package/heirloom-cpio/src/sighold.c (renamed from tools/cpio/src/sighold.c)0
-rw-r--r--package/heirloom-cpio/src/sigignore.c (renamed from tools/cpio/src/sigignore.c)0
-rw-r--r--package/heirloom-cpio/src/signal.c (renamed from tools/cpio/src/signal.c)0
-rw-r--r--package/heirloom-cpio/src/sigpause.c (renamed from tools/cpio/src/sigpause.c)0
-rw-r--r--package/heirloom-cpio/src/sigrelse.c (renamed from tools/cpio/src/sigrelse.c)0
-rw-r--r--package/heirloom-cpio/src/sigset.c (renamed from tools/cpio/src/sigset.c)0
-rw-r--r--package/heirloom-cpio/src/sigset.h (renamed from tools/cpio/src/sigset.h)0
-rw-r--r--package/heirloom-cpio/src/strtol.c (renamed from tools/cpio/src/strtol.c)0
-rw-r--r--package/heirloom-cpio/src/unshrink.c (renamed from tools/cpio/src/unshrink.c)0
-rw-r--r--package/heirloom-cpio/src/unzip.h (renamed from tools/cpio/src/unzip.h)0
-rw-r--r--package/heirloom-cpio/src/utmpx.c (renamed from tools/cpio/src/utmpx.c)0
-rw-r--r--package/heirloom-cpio/src/version.c (renamed from tools/cpio/src/version.c)0
-rw-r--r--package/heirloom-cpio/src/vpfmt.c (renamed from tools/cpio/src/vpfmt.c)0
-rw-r--r--package/liblzo/Makefile1
-rw-r--r--package/libpthread/Makefile1
-rw-r--r--package/libpthread/files/libpthread.postinst4
-rw-r--r--package/lzma/Makefile28
-rw-r--r--package/lzop/Makefile6
-rw-r--r--package/mkcrypt/Makefile31
-rw-r--r--package/mkcrypt/src/mkcrypt.c (renamed from tools/mkcrypt/mkcrypt.c)0
-rw-r--r--package/mkimage/Makefile33
-rw-r--r--package/mkimage/src/crc32.c (renamed from tools/mkimage/crc32.c)0
-rw-r--r--package/mkimage/src/image.h (renamed from tools/mkimage/image.h)0
-rw-r--r--package/mkimage/src/mkimage.c (renamed from tools/mkimage/mkimage.c)0
-rw-r--r--package/mksh/Makefile18
-rw-r--r--package/mtd-utils/Makefile35
-rw-r--r--package/mtd-utils/patches/patch-Makefile (renamed from tools/mtd-utils/patches/lzo.patch)33
-rw-r--r--package/mtd-utils/patches/patch-common_mk11
-rw-r--r--package/mtd-utils/patches/patch-compr_c21
-rw-r--r--package/mtd-utils/patches/patch-compr_lzo_c10
-rw-r--r--package/mtd-utils/patches/patch-compr_zlib_c10
-rw-r--r--package/mtd-utils/patches/patch-include_mtd_jffs2-user_h16
-rw-r--r--package/mtd-utils/patches/patch-include_mtd_mtd-abi_h14
-rw-r--r--package/mtd-utils/patches/patch-include_mtd_ubi-media_h18
-rw-r--r--package/mtd-utils/patches/patch-lib_libfec_c20
-rw-r--r--package/mtd-utils/patches/patch-lib_libmtd_c38
-rw-r--r--package/mtd-utils/patches/patch-lib_libmtd_legacy_c11
-rw-r--r--package/mtd-utils/patches/patch-mkfs_jffs2_c15
-rw-r--r--package/mtd-utils/patches/patch-rbtree_h12
-rw-r--r--package/pcre/Makefile4
-rw-r--r--package/squashfs/Makefile37
-rw-r--r--package/squashfs/patches/patch-squashfs-tools_Makefile (renamed from tools/squashfs/patches/cppflags.patch)5
-rw-r--r--package/squashfs/patches/patch-squashfs-tools_mksquashfs_c47
-rw-r--r--package/squashfs/patches/patch-squashfs-tools_unsquashfs_c39
-rw-r--r--package/syslinux/Makefile35
-rw-r--r--package/xz/Makefile5
-rwxr-xr-xscripts/adkprepare.sh10
-rw-r--r--scripts/scan-tools.sh108
-rw-r--r--target/config/Config.in5
-rw-r--r--target/config/Config.in.runtime2
-rw-r--r--target/config/Config.in.tools98
-rw-r--r--target/microblaze/sys-available/qemu-microblaze1
-rw-r--r--target/microblaze/sys-available/qemu-microblazeel1
-rw-r--r--toolchain/binutils/Makefile.inc3
-rw-r--r--toolchain/gcc/Makefile.inc3
-rw-r--r--toolchain/gdb/Makefile.inc3
-rw-r--r--toolchain/uClibc/Makefile.inc4
-rw-r--r--tools/Makefile57
-rw-r--r--tools/addpattern/Makefile4
-rw-r--r--tools/addpattern/addpattern.c252
-rw-r--r--tools/bc/Makefile25
-rw-r--r--tools/bzip2/Makefile24
-rw-r--r--tools/ccache/Makefile25
-rw-r--r--tools/cdrtools/Makefile25
-rw-r--r--tools/cpio/Makefile32
-rw-r--r--tools/flex/Makefile25
-rw-r--r--tools/genext2fs/Makefile25
-rw-r--r--tools/lzma/Makefile25
-rw-r--r--tools/lzo/Makefile28
-rw-r--r--tools/lzop/Makefile30
-rw-r--r--tools/m4/Makefile25
-rw-r--r--tools/mkcrypt/Makefile11
-rw-r--r--tools/mkfimage/Makefile4
-rw-r--r--tools/mkfimage/mkfimage.c72
-rw-r--r--tools/mkimage/Makefile11
-rwxr-xr-xtools/mkimage/mkimagebin23424 -> 0 bytes
-rw-r--r--tools/mksh/Makefile29
-rw-r--r--tools/mtd-utils/Makefile24
-rw-r--r--tools/mtd-utils/patches/darwin.patch261
-rw-r--r--tools/pcre/Makefile30
-rw-r--r--tools/rules.mk7
-rw-r--r--tools/squashfs/Makefile29
-rw-r--r--tools/squashfs/patches/darwin.patch88
-rw-r--r--tools/srec2bin/Makefile4
-rw-r--r--tools/srec2bin/srec2bin.c521
-rw-r--r--tools/syslinux/Makefile37
-rw-r--r--tools/trx/Makefile4
-rw-r--r--tools/trx/trx.c366
-rw-r--r--tools/xz/Makefile28
215 files changed, 935 insertions, 2366 deletions
diff --git a/.gitignore b/.gitignore
index b2a8d1a21..7fb0daba9 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
@@ -53,4 +55,5 @@
/target/config/Config.in.system
/target/config/Config.in.native
/target/config/Config.in.arch
+/target/config/Config.in.prereq
/target/m68k/aranym.cfg
diff --git a/README b/README
index 11c21e5a3..81ebd7798 100644
--- a/README
+++ b/README
@@ -11,7 +11,6 @@ Before you can start you need to install some tools:
- GNU make
- GNU awk
- GNU sed
-- findutils (find, xargs)
- tar
- patch
- gzip
diff --git a/config/Config.in b/adk/config/Config.in
index 9a7778310..9a7778310 100644
--- a/config/Config.in
+++ b/adk/config/Config.in
diff --git a/config/Kconfig-language.txt b/adk/config/Kconfig-language.txt
index c412c2458..c412c2458 100644
--- a/config/Kconfig-language.txt
+++ b/adk/config/Kconfig-language.txt
diff --git a/config/Makefile b/adk/config/Makefile
index 9dc08d3ac..9dc08d3ac 100644
--- a/config/Makefile
+++ b/adk/config/Makefile
diff --git a/config/Makefile.in b/adk/config/Makefile.in
index 0b3ac40a9..0b3ac40a9 100644
--- a/config/Makefile.in
+++ b/adk/config/Makefile.in
diff --git a/config/check.sh b/adk/config/check.sh
index fa59cbf9d..fa59cbf9d 100755
--- a/config/check.sh
+++ b/adk/config/check.sh
diff --git a/config/conf.c b/adk/config/conf.c
index 412656fec..412656fec 100644
--- a/config/conf.c
+++ b/adk/config/conf.c
diff --git a/config/confdata.c b/adk/config/confdata.c
index 4a79c72bb..4a79c72bb 100644
--- a/config/confdata.c
+++ b/adk/config/confdata.c
diff --git a/config/expr.c b/adk/config/expr.c
index 579ece4fa..579ece4fa 100644
--- a/config/expr.c
+++ b/adk/config/expr.c
diff --git a/config/expr.h b/adk/config/expr.h
index 6408fefae..6408fefae 100644
--- a/config/expr.h
+++ b/adk/config/expr.h
diff --git a/config/gconf.c b/adk/config/gconf.c
index 681125e11..681125e11 100644
--- a/config/gconf.c
+++ b/adk/config/gconf.c
diff --git a/config/gconf.glade b/adk/config/gconf.glade
index b1c86c192..b1c86c192 100644
--- a/config/gconf.glade
+++ b/adk/config/gconf.glade
diff --git a/config/images.c b/adk/config/images.c
index d4f84bd4a..d4f84bd4a 100644
--- a/config/images.c
+++ b/adk/config/images.c
diff --git a/config/kconfig_load.c b/adk/config/kconfig_load.c
index dbdcaad82..dbdcaad82 100644
--- a/config/kconfig_load.c
+++ b/adk/config/kconfig_load.c
diff --git a/config/kxgettext.c b/adk/config/kxgettext.c
index 8d9ce22b0..8d9ce22b0 100644
--- a/config/kxgettext.c
+++ b/adk/config/kxgettext.c
diff --git a/config/lex.zconf.c_shipped b/adk/config/lex.zconf.c_shipped
index dc3e81807..dc3e81807 100644
--- a/config/lex.zconf.c_shipped
+++ b/adk/config/lex.zconf.c_shipped
diff --git a/config/lkc.h b/adk/config/lkc.h
index f379b0bf8..f379b0bf8 100644
--- a/config/lkc.h
+++ b/adk/config/lkc.h
diff --git a/config/lkc_proto.h b/adk/config/lkc_proto.h
index 8e6946131..8e6946131 100644
--- a/config/lkc_proto.h
+++ b/adk/config/lkc_proto.h
diff --git a/config/lxdialog/.gitignore b/adk/config/lxdialog/.gitignore
index 90b08ff02..90b08ff02 100644
--- a/config/lxdialog/.gitignore
+++ b/adk/config/lxdialog/.gitignore
diff --git a/config/lxdialog/BIG.FAT.WARNING b/adk/config/lxdialog/BIG.FAT.WARNING
index a8999d82b..a8999d82b 100644
--- a/config/lxdialog/BIG.FAT.WARNING
+++ b/adk/config/lxdialog/BIG.FAT.WARNING
diff --git a/config/lxdialog/check-lxdialog.sh b/adk/config/lxdialog/check-lxdialog.sh
index fcef0f59d..fcef0f59d 100644
--- a/config/lxdialog/check-lxdialog.sh
+++ b/adk/config/lxdialog/check-lxdialog.sh
diff --git a/config/lxdialog/checklist.c b/adk/config/lxdialog/checklist.c
index bcc6f19c3..bcc6f19c3 100644
--- a/config/lxdialog/checklist.c
+++ b/adk/config/lxdialog/checklist.c
diff --git a/config/lxdialog/dialog.h b/adk/config/lxdialog/dialog.h
index b5211fce0..b5211fce0 100644
--- a/config/lxdialog/dialog.h
+++ b/adk/config/lxdialog/dialog.h
diff --git a/config/lxdialog/inputbox.c b/adk/config/lxdialog/inputbox.c
index 616c60138..616c60138 100644
--- a/config/lxdialog/inputbox.c
+++ b/adk/config/lxdialog/inputbox.c
diff --git a/config/lxdialog/menubox.c b/adk/config/lxdialog/menubox.c
index fa9d633f2..fa9d633f2 100644
--- a/config/lxdialog/menubox.c
+++ b/adk/config/lxdialog/menubox.c
diff --git a/config/lxdialog/textbox.c b/adk/config/lxdialog/textbox.c
index c704712d0..c704712d0 100644
--- a/config/lxdialog/textbox.c
+++ b/adk/config/lxdialog/textbox.c
diff --git a/config/lxdialog/util.c b/adk/config/lxdialog/util.c
index f2375ad7e..f2375ad7e 100644
--- a/config/lxdialog/util.c
+++ b/adk/config/lxdialog/util.c
diff --git a/config/lxdialog/yesno.c b/adk/config/lxdialog/yesno.c
index 4e6e8090c..4e6e8090c 100644
--- a/config/lxdialog/yesno.c
+++ b/adk/config/lxdialog/yesno.c
diff --git a/config/mconf.c b/adk/config/mconf.c
index 6aa2c0d88..6aa2c0d88 100644
--- a/config/mconf.c
+++ b/adk/config/mconf.c
diff --git a/config/menu.c b/adk/config/menu.c
index 3e6405ac2..3e6405ac2 100644
--- a/config/menu.c
+++ b/adk/config/menu.c
diff --git a/config/symbol.c b/adk/config/symbol.c
index 18f3e5c33..18f3e5c33 100644
--- a/config/symbol.c
+++ b/adk/config/symbol.c
diff --git a/config/util.c b/adk/config/util.c
index b6b2a46af..b6b2a46af 100644
--- a/config/util.c
+++ b/adk/config/util.c
diff --git a/config/zconf.gperf b/adk/config/zconf.gperf
index 25ef5d01c..25ef5d01c 100644
--- a/config/zconf.gperf
+++ b/adk/config/zconf.gperf
diff --git a/config/zconf.hash.c_shipped b/adk/config/zconf.hash.c_shipped
index 5c73d5133..5c73d5133 100644
--- a/config/zconf.hash.c_shipped
+++ b/adk/config/zconf.hash.c_shipped
diff --git a/config/zconf.l b/adk/config/zconf.l
index 21ff69c9a..21ff69c9a 100644
--- a/config/zconf.l
+++ b/adk/config/zconf.l
diff --git a/config/zconf.tab.c_shipped b/adk/config/zconf.tab.c_shipped
index 3bdcb3a97..3bdcb3a97 100644
--- a/config/zconf.tab.c_shipped
+++ b/adk/config/zconf.tab.c_shipped
diff --git a/config/zconf.tab.h_shipped b/adk/config/zconf.tab.h_shipped
index 1b17df414..1b17df414 100644
--- a/config/zconf.tab.h_shipped
+++ b/adk/config/zconf.tab.h_shipped
diff --git a/config/zconf.y b/adk/config/zconf.y
index b4240c846..b4240c846 100644
--- a/config/zconf.y
+++ b/adk/config/zconf.y
diff --git a/tests/adk.exp.in b/adk/tests/adk.exp.in
index c5a7b8948..c5a7b8948 100644
--- a/tests/adk.exp.in
+++ b/adk/tests/adk.exp.in
diff --git a/tests/master.exp.in b/adk/tests/master.exp.in
index 72d8ab9e6..72d8ab9e6 100644
--- a/tests/master.exp.in
+++ b/adk/tests/master.exp.in
diff --git a/tools/adk/Makefile b/adk/tools/Makefile
index edd559f85..edd559f85 100644
--- a/tools/adk/Makefile
+++ b/adk/tools/Makefile
diff --git a/tools/adk/depmaker.c b/adk/tools/depmaker.c
index 023e58504..9682fb969 100644
--- a/tools/adk/depmaker.c
+++ b/adk/tools/depmaker.c
@@ -174,6 +174,7 @@ int main() {
!(strncmp(pkgdirp->d_name, "glibc", 5) == 0)) {
/* print result to stdout */
printf("package-$(ADK_COMPILE_%s) += %s\n", pkgvar, pkgdirp->d_name);
+ printf("hostpackage-$(ADK_HOST_BUILD_%s) += %s\n", pkgvar, pkgdirp->d_name);
}
if ((pkgdeps = malloc(MAXLINE)) != NULL)
diff --git a/tools/adk/dkgetsz.c b/adk/tools/dkgetsz.c
index b8315be70..b8315be70 100644
--- a/tools/adk/dkgetsz.c
+++ b/adk/tools/dkgetsz.c
diff --git a/tools/adk/pkgmaker.c b/adk/tools/pkgmaker.c
index 51d31aa70..51d31aa70 100644
--- a/tools/adk/pkgmaker.c
+++ b/adk/tools/pkgmaker.c
diff --git a/tools/adk/pkgrebuild.c b/adk/tools/pkgrebuild.c
index e7f037ae5..e7f037ae5 100644
--- a/tools/adk/pkgrebuild.c
+++ b/adk/tools/pkgrebuild.c
diff --git a/tools/adk/sortfile.c b/adk/tools/sortfile.c
index 1e9fc9623..1e9fc9623 100644
--- a/tools/adk/sortfile.c
+++ b/adk/tools/sortfile.c
diff --git a/tools/adk/sortfile.h b/adk/tools/sortfile.h
index c54294e69..c54294e69 100644
--- a/tools/adk/sortfile.h
+++ b/adk/tools/sortfile.h
diff --git a/tools/adk/strmap.c b/adk/tools/strmap.c
index f2c660e1f..f2c660e1f 100644
--- a/tools/adk/strmap.c
+++ b/adk/tools/strmap.c
diff --git a/tools/adk/strmap.h b/adk/tools/strmap.h
index 99687b236..99687b236 100644
--- a/tools/adk/strmap.h
+++ b/adk/tools/strmap.h
diff --git a/docs/how-openadk-works.txt b/docs/how-openadk-works.txt
index a8634d8c3..e86251196 100644
--- a/docs/how-openadk-works.txt
+++ b/docs/how-openadk-works.txt
@@ -6,7 +6,7 @@ How OpenADK works
As mentioned above, OpenADK is basically a set of Makefiles that
download, configure, and compile software with the correct options. It
-also includes patches for various software packages and the linux kernel.
+also includes patches for various software packages and the Linux kernel.
There is basically one Makefile per software package. Makefiles are split into
many different parts.
@@ -22,28 +22,20 @@ many different parts.
the kernel patches
* The +package/+ directory contains the Makefiles and
- associated files for all user-space tools and libraries that OpenADK
- can compile and add to the target root filesystem. There is one
- sub-directory per package.
+ associated files for all user-space tools and libraries that OpenADK can
+ compile and add to the target root filesystem or to the host directory. There
+ is one sub-directory per package.
* The +mk/+ directory contains some globally used Makefiles with
the suffix +.mk+, these are used in all other Makefile via include
-* The +tools/+ directory contains the Makefiles and
+* The +adk/+ directory contains the Makefiles and
associated files for software related to the generation of the
- host tools needed for different tasks (compression tools, ..).
-
-There are three other directories in the top level directory of OpenADK:
+ host tools needed for +make menuconfig+ system
* The +scripts/+ directory contains shell scripts for the creation of
meta-data in OpenADK, install scripts and image creation scripts
-* The +config/+ directory contains the application used for the
- +make menuconfig+ system
-
-* The +tests/+ directory contains some data for the +make check+ target,
- to run the gcc testsuite
-
The main Makefile performs the following steps before the configuration
is done:
@@ -69,12 +61,13 @@ configuration is done (it is mainly a wrapper for +mk/build.mk+):
available systems and package collections
* Generate the host tools required for different tasks (encrypting passwords,
- compressing data, extracting archives, ..)
+ compressing data, extracting archives, creating images, ..)
* Generate the cross-compilation toolchain (binutils, gcc, libc, gdb)
-* Compile the linux kernel
+* Compile the Linux kernel
* Compile all the userspace packages, the boot loader and external kernel modules
* Generate the firmware images or archives
+
diff --git a/docs/make-tips.txt b/docs/make-tips.txt
index f508633e9..dcfbe22e0 100644
--- a/docs/make-tips.txt
+++ b/docs/make-tips.txt
@@ -43,7 +43,7 @@ and pkg trees, the firmware and the toolchain for all targets):
--------------------
If you even want to clean any downloaded source and your
-confiuration +.config+:
+configuration +.config+:
--------------------
$ make distclean
@@ -60,7 +60,7 @@ This is automatically triggered if you change the kernel version in
your configuration.
If you just want to clean all packages and wants to rebuild the firmware,
-(the tools/toolchain is not deleted) just use:
+(the toolchain is not deleted) just use:
--------------------
$ make clean
diff --git a/docs/prerequisite.txt b/docs/prerequisite.txt
index 8a9670066..d7ffcc544 100644
--- a/docs/prerequisite.txt
+++ b/docs/prerequisite.txt
@@ -23,8 +23,8 @@ package names may vary between host systems.
** +bash+
** +binutils+
-** +gcc+
-** `g++`
+** +C compiler (gcc or clang)+
+** `C++ compiler (g++ or clang++)`
** +GNU sed+
** +GNU awk+
** +GNU make+
@@ -33,10 +33,9 @@ package names may vary between host systems.
** +perl+
** +tar+
** +wget+
-** +findutils (find, xargs)+
-** +ncurses5 development+
-** +zlib development+
-** +libc development+
+** +ncurses5 development files+
+** +zlib development files+
+** +libc development files+
There is a check for the required versions of these tools in advance,
though. To re-issue the checks, use +make prereq+.
diff --git a/mk/build.mk b/mk/build.mk
index 0b0694e62..c13ba95b4 100644
--- a/mk/build.mk
+++ b/mk/build.mk
@@ -9,7 +9,7 @@ $(error your umask is not 022)
endif
CONFIG_CONFIG_IN = Config.in
-CONFIG = config
+CONFIG = adk/config
DEFCONFIG= ADK_DEBUG=n \
ADK_STATIC=n \
ADK_WGET_TIMEOUT=180 \
@@ -93,7 +93,7 @@ POSTCONFIG= -@\
if [ -f .adkinit ];then rm .adkinit;\
else \
if [ -f .config.old ];then \
- $(TOPDIR)/host_$(GNU_HOST_NAME)/usr/bin/pkgrebuild;\
+ $(TOPDIR)/adk/tools/pkgrebuild;\
rebuild=0; \
if [ "$$(grep ^BUSYBOX .config|md5sum)" != "$$(grep ^BUSYBOX .config.old|md5sum)" ];then \
touch .rebuild.busybox;\
@@ -139,27 +139,26 @@ include $(TOPDIR)/rules.mk
all: world
-${TOPDIR}/package/Depends.mk: ${TOPDIR}/.config $(wildcard ${TOPDIR}/package/*/Makefile)
- $(STAGING_HOST_DIR)/usr/bin/depmaker > ${TOPDIR}/package/Depends.mk
+${TOPDIR}/package/Depends.mk: ${TOPDIR}/.config $(wildcard ${TOPDIR}/package/*/Makefile) $(TOPDIR)/adk/tools/depmaker
+ $(TOPDIR)/adk/tools/depmaker > ${TOPDIR}/package/Depends.mk
.NOTPARALLEL:
.PHONY: all world clean cleandir cleantoolchain distclean image_clean
world:
mkdir -p $(DL_DIR) $(BUILD_DIR) $(TARGET_DIR) $(FW_DIR) \
- $(TOOLS_BUILD_DIR) $(STAGING_HOST_DIR)/usr/bin \
- $(TOOLCHAIN_BUILD_DIR) $(STAGING_PKG_DIR)/stamps
+ $(STAGING_HOST_DIR) $(TOOLCHAIN_BUILD_DIR) $(STAGING_PKG_DIR)/stamps
${BASH} ${TOPDIR}/scripts/scan-pkgs.sh
${BASH} ${TOPDIR}/scripts/update-sys
${BASH} ${TOPDIR}/scripts/update-pkg
ifeq ($(ADK_TOOLCHAIN),y)
ifeq ($(ADK_TOOLCHAIN_ONLY),y)
- $(MAKE) -f mk/build.mk tools/install toolchain/fixup package/compile
+ $(MAKE) -f mk/build.mk package/hostcompile toolchain/fixup package/compile
else
- $(MAKE) -f mk/build.mk tools/install toolchain/fixup package/compile root_clean package/install
+ $(MAKE) -f mk/build.mk package/hostcompile toolchain/fixup package/compile root_clean package/install
endif
else
- $(MAKE) -f mk/build.mk tools/install toolchain/fixup target/config-prepare target/compile package/compile root_clean package/install target/install package_index
+ $(MAKE) -f mk/build.mk package/hostcompile toolchain/fixup target/config-prepare target/compile package/compile root_clean package/install target/install package_index
endif
package_index:
@@ -191,9 +190,6 @@ target/%:
toolchain/%: ${STAGING_TARGET_DIR}
$(MAKE) -C toolchain $(patsubst toolchain/%,%,$@)
-tools/%:
- $(MAKE) -C tools $(patsubst tools/%,%,$@)
-
image:
$(MAKE) -C target image
@@ -266,7 +262,7 @@ cleandir:
@$(MAKE) -C $(CONFIG) clean $(MAKE_TRACE)
rm -rf $(BUILD_DIR_PFX) $(FW_DIR_PFX) $(TARGET_DIR_PFX) \
${TOPDIR}/package/pkglist.d ${TOPDIR}/package/pkgconfigs.d
- rm -rf $(TOOLCHAIN_DIR_PFX) $(STAGING_HOST_DIR_PFX) $(TOOLS_BUILD_DIR)
+ rm -rf $(TOOLCHAIN_DIR_PFX) $(STAGING_HOST_DIR_PFX)
rm -rf $(STAGING_TARGET_DIR_PFX) $(STAGING_PKG_DIR_PFX)
rm -f .menu .tmpconfig.h .rebuild* ${TOPDIR}/package/Depends.mk ${TOPDIR}/prereq.mk
@@ -274,7 +270,7 @@ cleantoolchain:
@$(TRACE) cleantoolchain
@rm -rf $(BUILD_DIR_PFX) $(TARGET_DIR_PFX) \
${TOPDIR}/package/pkglist.d ${TOPDIR}/package/pkgconfigs.d
- @rm -rf $(TOOLCHAIN_DIR_PFX) $(STAGING_HOST_DIR_PFX) $(TOOLS_BUILD_DIR)
+ @rm -rf $(TOOLCHAIN_DIR_PFX) $(STAGING_HOST_DIR_PFX)
@rm -rf $(STAGING_TARGET_DIR_PFX) $(STAGING_PKG_DIR_PFX)
@rm -f .menu .tmpconfig.h .rebuild* ${TOPDIR}/package/Depends.mk
@@ -283,7 +279,7 @@ distclean:
@$(MAKE) -C $(CONFIG) clean $(MAKE_TRACE)
@rm -rf $(BUILD_DIR_PFX) $(FW_DIR_PFX) $(TARGET_DIR_PFX) $(DL_DIR) \
${TOPDIR}/package/pkglist.d ${TOPDIR}/package/pkgconfigs.d
- @rm -rf $(TOOLCHAIN_DIR_PFX) $(STAGING_HOST_DIR_PFX) $(TOOLS_BUILD_DIR)
+ @rm -rf $(TOOLCHAIN_DIR_PFX) $(STAGING_HOST_DIR_PFX)
@rm -rf $(STAGING_TARGET_DIR_PFX) $(STAGING_PKG_DIR_PFX)
@rm -f .adkinit .config* .defconfig .tmpconfig.h all.config ${TOPDIR}/prereq.mk \
.menu ${TOPDIR}/package/Depends.mk .ADK_HAVE_DOT_CONFIG .rebuild.*
@@ -456,7 +452,7 @@ distclean:
@$(MAKE) -C $(CONFIG) clean
@rm -rf $(BUILD_DIR_PFX) $(FW_DIR_PFX) $(TARGET_DIR_PFX) $(DL_DIR) \
${TOPDIR}/package/pkglist.d ${TOPDIR}/package/pkgconfigs.d
- @rm -rf $(TOOLCHAIN_DIR_PFX) $(STAGING_TARGET_DIR_PFX) $(TOOLS_BUILD_DIR)
+ @rm -rf $(TOOLCHAIN_DIR_PFX) $(STAGING_TARGET_DIR_PFX)
@rm -rf $(STAGING_HOST_DIR_PFX) $(STAGING_TARGET_DIR_PFX) $(STAGING_PKG_DIR_PFX)
@rm -f .adkinit .config* .defconfig .tmpconfig.h all.config ${TOPDIR}/prereq.mk \
.menu .rebuild.* ${TOPDIR}/package/Depends.mk .ADK_HAVE_DOT_CONFIG
@@ -600,45 +596,42 @@ bulkallmod:
if [ -f .exit ];then echo "Bulk build failed!"; cat .exit;rm .exit; exit 1;fi \
done
-$(TOPDIR)/host_$(GNU_HOST_NAME)/usr/bin/pkgmaker: $(TOPDIR)/tools/adk/pkgmaker.c $(TOPDIR)/tools/adk/sortfile.c $(TOPDIR)/tools/adk/strmap.c
- @mkdir -p host_$(GNU_HOST_NAME)/usr/bin
- @$(CC_FOR_BUILD) -g -o $@ tools/adk/pkgmaker.c tools/adk/sortfile.c tools/adk/strmap.c
+$(TOPDIR)/adk/tools/pkgmaker: $(TOPDIR)/adk/tools/pkgmaker.c $(TOPDIR)/adk/tools/sortfile.c $(TOPDIR)/adk/tools/strmap.c
+ @$(CC_FOR_BUILD) -g -o $@ adk/tools/pkgmaker.c adk/tools/sortfile.c adk/tools/strmap.c
-$(TOPDIR)/host_$(GNU_HOST_NAME)/usr/bin/pkgrebuild: $(TOPDIR)/tools/adk/pkgrebuild.c $(TOPDIR)/tools/adk/strmap.c
- @$(CC_FOR_BUILD) -g -o $@ tools/adk/pkgrebuild.c tools/adk/strmap.c
+$(TOPDIR)/adk/tools/pkgrebuild: $(TOPDIR)/adk/tools/pkgrebuild.c $(TOPDIR)/adk/tools/strmap.c
+ @$(CC_FOR_BUILD) -g -o $@ adk/tools/pkgrebuild.c adk/tools/strmap.c
-package/Config.in.auto menu .menu: $(wildcard ${TOPDIR}/package/*/Makefile) $(TOPDIR)/host_$(GNU_HOST_NAME)/usr/bin/pkgmaker $(TOPDIR)/host_$(GNU_HOST_NAME)/usr/bin/pkgrebuild
+package/Config.in.auto menu .menu: $(wildcard ${TOPDIR}/package/*/Makefile) $(TOPDIR)/adk/tools/pkgmaker $(TOPDIR)/adk/tools/pkgrebuild
@echo "Generating menu structure ..."
- @$(TOPDIR)/host_$(GNU_HOST_NAME)/usr/bin/pkgmaker
+ @$(TOPDIR)/adk/tools/pkgmaker
@:>.menu
-$(TOPDIR)/host_$(GNU_HOST_NAME)/usr/bin/depmaker: $(TOPDIR)/tools/adk/depmaker.c
- @mkdir -p host_$(GNU_HOST_NAME)/usr/bin
- $(CC_FOR_BUILD) -g -o $@ $(TOPDIR)/tools/adk/depmaker.c
+$(TOPDIR)/adk/tools/depmaker: $(TOPDIR)/adk/tools/depmaker.c
+ $(CC_FOR_BUILD) -g -o $@ $(TOPDIR)/adk/tools/depmaker.c
-dep: $(TOPDIR)/host_$(GNU_HOST_NAME)/usr/bin/depmaker
+dep: $(TOPDIR)/adk/tools/depmaker
@echo "Generating dependencies ..."
- @$(TOPDIR)/host_$(GNU_HOST_NAME)/usr/bin/depmaker > ${TOPDIR}/package/Depends.mk
+ @$(TOPDIR)/adk/tools/depmaker > ${TOPDIR}/package/Depends.mk
.PHONY: menu dep
include $(TOPDIR)/toolchain/gcc/Makefile.inc
check-dejagnu:
- @-rm tests/adk.exp tests/master.exp >/dev/null 2>&1
- @sed -e "s#@ADK_TARGET_IP@#$(ADK_TARGET_IP)#" tests/adk.exp.in > \
- tests/adk.exp.in.tmp
- @sed -e "s#@ADK_TARGET_PORT@#$(ADK_TARGET_PORT)#" tests/adk.exp.in.tmp > \
- tests/adk.exp
- @sed -e "s#@TOPDIR@#$(TOPDIR)#" tests/master.exp.in > \
- tests/master.exp
+ @-rm adk/tests/adk.exp adk/tests/master.exp >/dev/null 2>&1
+ @sed -e "s#@ADK_TARGET_IP@#$(ADK_TARGET_IP)#" \
+ -e "s#@ADK_TARGET_PORT@#$(ADK_TARGET_PORT)#" \
+ adk/tests/adk.exp.in > adk/tests/adk.exp
+ @sed -e "s#@TOPDIR@#$(TOPDIR)#" adk/tests/master.exp.in > \
+ adk/tests/master.exp
check-gcc: check-dejagnu
- env DEJAGNU=$(TOPDIR)/tests/master.exp \
+ env DEJAGNU=$(TOPDIR)/adk/tests/master.exp \
$(MAKE) -C $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)/$(PKG_NAME)-$(PKG_VERSION)-final/gcc check-gcc
check-g++: check-dejagnu
- env DEJAGNU=$(TOPDIR)/tests/master.exp \
+ env DEJAGNU=$(TOPDIR)/adk/tests/master.exp \
$(MAKE) -C $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)/$(PKG_NAME)-$(PKG_VERSION)-final/gcc check-g++
check: check-gcc check-g++
diff --git a/mk/buildhlp.mk b/mk/buildhlp.mk
index 701f0f4a2..5b76fe5e1 100644
--- a/mk/buildhlp.mk
+++ b/mk/buildhlp.mk
@@ -46,7 +46,7 @@ endif
ifeq ($(EXTRACT_OVERRIDE),1)
${MAKE} do-extract
else
- ${EXTRACT_CMD}
+ PATH='${HOST_PATH}' ${EXTRACT_CMD}
endif
@${MAKE} post-extract $(MAKE_TRACE)
touch $@
@@ -62,7 +62,7 @@ endif
ifeq ($(EXTRACT_OVERRIDE),1)
${MAKE} do-extract
else
- ${EXTRACT_CMD}
+ PATH='${HOST_PATH}' ${EXTRACT_CMD}
endif
@${MAKE} post-extract $(MAKE_TRACE)
touch $@
@@ -81,7 +81,7 @@ ${WRKDIST}/.prepared: ${WRKDIST}/.extract_done
touch $@
endif
-update-patches:
+update-patches host-update-patches:
@test ! -d ${WRKDIR}.orig || rm -rf ${WRKDIR}.orig
@test ! -d ${WRKDIR}.orig
ifeq ($(strip ${_IN_PACKAGE})$(strip ${_IN_CVTC}),1)
@@ -115,4 +115,4 @@ endif
rm -rf ${WRKDIR}.orig; \
[[ $$toedit != FAIL ]]
-.PHONY: update-patches
+.PHONY: update-patches host-update-patches
diff --git a/mk/fetch.mk b/mk/fetch.mk
index 6382571b3..ee24f0b60 100644
--- a/mk/fetch.mk
+++ b/mk/fetch.mk
@@ -26,7 +26,6 @@ refetch:
-rm -f ${FULLDISTFILES}
${MAKE} fetch
-# XXX for now
_CHECKSUM_COOKIE?= ${WRKDIR}/.checksum_done
checksum: ${_CHECKSUM_COOKIE}
ifeq ($(strip ${NO_CHECKSUM}),)
diff --git a/mk/host.mk b/mk/host.mk
index 5f9539aef..8d3e7d74e 100644
--- a/mk/host.mk
+++ b/mk/host.mk
@@ -10,6 +10,7 @@ HOST_CONFIGURE_ENV+= AUTOM4TE=${STAGING_HOST_DIR}/usr/bin/autom4te \
CONFIG_SHELL='$(strip ${SHELL})' \
PKG_CONFIG_LIBDIR='${STAGING_HOST_DIR}/usr/lib/pkgconfig' \
PATH='${HOST_PATH}' \
+ CC='$(strip ${CC_FOR_BUILD})' \
CFLAGS='$(strip ${CFLAGS_FOR_BUILD})' \
CXXFLAGS='$(strip ${CXXFLAGS_FOR_BUILD})' \
CPPFLAGS='$(strip ${CPPFLAGS_FOR_BUILD})' \
@@ -28,6 +29,7 @@ HOST_INSTALL_TARGET?= install
HOST_MAKE_ENV+= PATH='${HOST_PATH}' \
PKG_CONFIG_LIBDIR='${STAGING_HOST_DIR}/usr/lib/pkgconfig' \
+ CC='$(strip ${CC_FOR_BUILD})' \
CFLAGS='$(strip ${CFLAGS_FOR_BUILD})' \
CXXFLAGS='$(strip ${CXXFLAGS_FOR_BUILD})' \
CPPFLAGS='$(strip ${CPPFLAGS_FOR_BUILD})' \
diff --git a/mk/image.mk b/mk/image.mk
index 6a4d7863d..2ce1b3444 100644
--- a/mk/image.mk
+++ b/mk/image.mk
@@ -127,7 +127,7 @@ ROOTFSSQUASHFS= ${ADK_TARGET_SYSTEM}-$(CPU_ARCH)-${ADK_TARGET_LIBC}-${ADK_TARGE
ROOTFSJFFS2= ${ADK_TARGET_SYSTEM}-$(CPU_ARCH)-${ADK_TARGET_LIBC}-jffs2.img
ROOTFSTARBALL= ${ADK_TARGET_SYSTEM}-$(CPU_ARCH)-${ADK_TARGET_LIBC}-${ADK_TARGET_FS}+kernel.tar.gz
ROOTFSUSERTARBALL= ${ADK_TARGET_SYSTEM}-$(CPU_ARCH)-${ADK_TARGET_LIBC}-${ADK_TARGET_FS}.tar.gz
-ROOTFSISO= ${ADK_TARGET_SYSTEM}-$(CPU_ARCH)-${ADK_TARGET_LIBC}-${ADK_TARGET_FS}.iso
+ROOTFSISO= ${ADK_TARGET_SYSTEM}-$(CPU_ARCH)-${ADK_TARGET_LIBC}.iso
else
TARGET_KERNEL= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_FS}-kernel
INITRAMFS= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_LIBC}-${ADK_TARGET_FS}
@@ -135,7 +135,7 @@ ROOTFSSQUASHFS= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_LIBC}-${ADK_TARGET_FS}.img
ROOTFSJFFS2= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_LIBC}-jffs2.img
ROOTFSTARBALL= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_LIBC}-${ADK_TARGET_FS}+kernel.tar.gz
ROOTFSUSERTARBALL= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_LIBC}-${ADK_TARGET_FS}.tar.gz
-ROOTFSISO= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_LIBC}-${ADK_TARGET_FS}.iso
+ROOTFSISO= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_LIBC}.iso
endif
${FW_DIR}/${ROOTFSTARBALL}: ${TARGET_DIR} kernel-package
@@ -236,7 +236,7 @@ ${FW_DIR}/${ROOTFSISO}: ${TARGET_DIR} kernel-package
mkdir -p ${TARGET_DIR}/boot/syslinux
cp ${STAGING_HOST_DIR}/usr/share/syslinux/{isolinux.bin,ldlinux.c32} \
${TARGET_DIR}/boot/syslinux
- echo 'DEFAULT /boot/kernel root=/dev/sr0 init=/init' > \
+ echo 'DEFAULT /boot/kernel root=/dev/sr0' > \
${TARGET_DIR}/boot/syslinux/isolinux.cfg
${STAGING_HOST_DIR}/usr/bin/mkisofs -R -uid 0 -gid 0 -o $@ \
-b boot/syslinux/isolinux.bin \
diff --git a/mk/pkg-bottom.mk b/mk/pkg-bottom.mk
index 3e454ee5a..2cec6ac2c 100644
--- a/mk/pkg-bottom.mk
+++ b/mk/pkg-bottom.mk
@@ -125,6 +125,8 @@ do-install:
post-install:
spkg-install: ${ALL_POSTINST}
${_FAKE_COOKIE}: ${_BUILD_COOKIE}
+ echo FOO
+ echo $(HOST_WRKDIR)
@-rm -f ${_ALL_CONTROLS}
@mkdir -p '${STAGING_PKG_DIR}/stamps' ${WRKINST} '${STAGING_TARGET_DIR}/scripts'
@${MAKE} ${_ALL_CONTROLS} $(MAKE_TRACE)
diff --git a/mk/vars.mk b/mk/vars.mk
index 9da5f3ad3..3cf0a9344 100644
--- a/mk/vars.mk
+++ b/mk/vars.mk
@@ -17,7 +17,6 @@ DL_DIR?= $(BASE_DIR)/dl
else
DL_DIR?= $(ADK_DL_DIR)
endif
-TOOLS_BUILD_DIR= $(BASE_DIR)/tools_build
SCRIPT_DIR:= $(BASE_DIR)/scripts
STAGING_HOST_DIR:= ${BASE_DIR}/host_${GNU_HOST_NAME}
TOOLCHAIN_DIR:= ${BASE_DIR}/toolchain_${GNU_HOST_NAME}
@@ -71,7 +70,7 @@ CONFIGURE_TRIPLE:= --build=${GNU_HOST_NAME} \
--target=${GNU_TARGET_NAME}
ifneq ($(strip ${ADK_USE_CCACHE}),)
-TARGET_COMPILER_PREFIX=ccache ${TARGET_CROSS}
+TARGET_COMPILER_PREFIX=$(STAGING_HOST_DIR)/usr/bin/ccache ${TARGET_CROSS}
endif
# target tools
@@ -212,21 +211,21 @@ EXTRACT_CMD= mkdir -p ${WRKDIR}; \
cd ${WRKDIR} && \
for file in ${FULLDISTFILES}; do case $$file in \
*.cpio) \
- cat $$file | $(STAGING_HOST_DIR)/usr/bin/cpio -i -d ;; \
+ cat $$file | cpio -i -d ;; \
*.tar) \
tar -xf $$file ;; \
*.cpio.Z | *.cpio.gz | *.cgz | *.mcz) \
- gzip -dc $$file | $(STAGING_HOST_DIR)/usr/bin/cpio -i -d ;; \
+ gzip -dc $$file | cpio -i -d ;; \
*.tar.xz | *.txz) \
- $(STAGING_HOST_DIR)/usr/bin/xz -dc $$file | tar -xf - ;; \
+ xz -dc $$file | tar -xf - ;; \
*.tar.Z | *.tar.gz | *.taz | *.tgz) \
gzip -dc $$file | tar -xf - ;; \
*.cpio.bz2 | *.cbz) \
- $(STAGING_HOST_DIR)/usr/bin/bzip2 -dc $$file | $(STAGING_HOST_DIR)/usr/bin/cpio -i -d ;; \
+ bzip2 -dc $$file | cpio -i -d ;; \
*.tar.bz2 | *.tbz | *.tbz2) \
- $(STAGING_HOST_DIR)/usr/bin/bzip2 -dc $$file | tar -xf - ;; \
+ bzip2 -dc $$file | tar -xf - ;; \
*.zip) \
- cat $$file | $(STAGING_HOST_DIR)/usr/bin/cpio -ivd -H zip ;; \
+ cat $$file | cpio -ivd -H zip ;; \
*.arm) \
cp $$file ${WRKDIR} ;; \
*) \
diff --git a/package/Makefile b/package/Makefile
index 1b8cc97f3..c2b7d5285 100644
--- a/package/Makefile
+++ b/package/Makefile
@@ -28,11 +28,13 @@ include $(TOPDIR)/package/Depends.mk
DOWNLOAD:=$(patsubst %,%-download,$(package-y) $(package-m))
REBUILD_PACKAGES:=$(patsubst %,%-rebuild,$(package-y) $(package-m))
COMPILE_PACKAGES:=$(patsubst %,%-compile,$(package-y) $(package-m))
+HOST_COMPILE_PACKAGES:=$(patsubst %,%-host-compile,$(hostpackage-y))
INSTALL_PACKAGES:=$(patsubst %,%-install,$(package-y))
all: compile
download: $(DOWNLOAD)
clean: $(patsubst %,%-clean,$(package-) $(package-y) $(package-m) base-files)
+hostcompile: $(HOST_COMPILE_PACKAGES)
ifeq ($(ADK_TOOLCHAIN_ONLY),y)
compile: $(REBUILD_PACKAGES) $(COMPILE_PACKAGES)
install: $(INSTALL_PACKAGES)
diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index e01edb042..2d3525b58 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -6,10 +6,9 @@ include $(TOPDIR)/mk/rootfs.mk
PKG_NAME:= base-files
PKG_VERSION:= 1.0
-PKG_RELEASE:= 80
+PKG_RELEASE:= 81
PKG_SECTION:= base
PKG_DESCR:= basic files and scripts
-PKG_BUILDDEP:= pkgconf-host file-host
WRKDIST= ${WRKDIR}/base-files
NO_DISTFILES:= 1
@@ -55,7 +54,6 @@ endif
mkdir -p $(IDIR_BASE_FILES)/{dev,boot,root,sys,proc,tmp,mnt}
mkdir -p $(IDIR_BASE_FILES)/etc/network/{if-pre-up.d,if-up.d,if-down.d,if-post-down.d}
mkdir -p $(IDIR_BASE_FILES)/usr/{lib,bin}
- chmod 755 $(IDIR_BASE_FILES)/lib/mdev/init
chmod 600 $(IDIR_BASE_FILES)/etc/shadow
chmod 600 $(IDIR_BASE_FILES)/etc/network/interfaces
(cd $(IDIR_BASE_FILES)/etc; ln -sf ../tmp/resolv.conf .)
diff --git a/package/base-files/src/etc/mdev.conf b/package/base-files/src/etc/mdev.conf
index fc63d80d9..0a24ef04b 100644
--- a/package/base-files/src/etc/mdev.conf
+++ b/package/base-files/src/etc/mdev.conf
@@ -15,4 +15,3 @@ snd/controlC0 root:audio 660
snd/pcmC0D0c root:audio 660
snd/pcmC0D0p root:audio 660
msr0 root:root 660 @(mkdir -p /dev/cpu/0 && ln -sf /dev/msr0 /dev/cpu/0/msr)
-.* 0:0 644 @/lib/mdev/init
diff --git a/package/base-files/src/lib/mdev/init b/package/base-files/src/lib/mdev/init
deleted file mode 100644
index a478abecd..000000000
--- a/package/base-files/src/lib/mdev/init
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-if [ "$SUBSYSTEM" == "pcmcia_socket" ];then
- logger "Setting up PCMCIA socket resource database"
- if [ "$ACTION" == "add" ];then
- /usr/sbin/pcmcia-socket-startup
- fi
-fi
-if [ "$SUBSYSTEM" == "usb" ];then
- if [ "$ACTION" == "add" ];then
- if [ "$DEVTYPE" == "usb_device" ];then
- if [ "$PRODUCT" == "12d1/1003/0" ];then
- if [ ! -f /tmp/.huawei ];then
- logger "USB device added with: $PRODUCT"
- usbmods=$(lsmod|grep ^usbserial|awk '{ print $4 }'|sed -e 's/,/ /g')
- for i in $usbmods;do rmmod $i;done
- rmmod usbserial
- lsmod >> /tmp/debug
- test -x /sbin/huawei && /sbin/huawei >> /tmp/debug
- insmod /lib/modules/$(uname -r)/usbserial.ko product=0x1003 vendor=0x12d1
- for i in $usbmods;do insmod /lib/modules/$(uname -r)/$i.ko; done
-
- touch /tmp/.huawei
- fi
- fi
- fi
- fi
-fi
diff --git a/package/bc/Makefile b/package/bc/Makefile
index 2a5c59900..d35659ed8 100644
--- a/package/bc/Makefile
+++ b/package/bc/Makefile
@@ -7,7 +7,7 @@ PKG_NAME:= bc
PKG_VERSION:= 1.06
PKG_RELEASE:= 1
PKG_MD5SUM:= d44b5dddebd8a7a7309aea6c36fda117
-PKG_DESCR:= An arbitrary precision calculator language
+PKG_DESCR:= arbitrary precision calculator language
PKG_SECTION:= utils
PKG_BUILDDEP:= m4-host flex-host
PKG_URL:= http://www.gnu.org/software/bc/
@@ -15,11 +15,15 @@ PKG_SITES:= http://ftp.gnu.org/pub/gnu/bc/
PKG_SUBPKGS:= BC DC
+include ${TOPDIR}/mk/host.mk
include ${TOPDIR}/mk/package.mk
+$(eval $(call HOST_template,BC,bc,${PKG_VERSION}-${PKG_RELEASE}))
$(eval $(call PKG_template,BC,bc,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
$(eval $(call PKG_template,DC,dc,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+HOST_STYLE:= auto
+
bc-install:
${INSTALL_DIR} ${IDIR_BC}/usr/bin
${INSTALL_BIN} ${WRKBUILD}/bc/bc ${IDIR_BC}/usr/bin/bc
@@ -28,4 +32,5 @@ dc-install:
${INSTALL_DIR} ${IDIR_DC}/usr/bin
${INSTALL_BIN} ${WRKBUILD}/dc/dc ${IDIR_DC}/usr/bin/dc
+include ${TOPDIR}/mk/host-bottom.mk
include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/busybox/Makefile b/package/busybox/Makefile
index c1923708e..fce16fa32 100644
--- a/package/busybox/Makefile
+++ b/package/busybox/Makefile
@@ -9,6 +9,7 @@ PKG_RELEASE:= 5
PKG_MD5SUM:= 795394f83903b5eec6567d51eebb417e
PKG_DESCR:= core utilities for embedded systems
PKG_SECTION:= base
+PKG_BUILDDEP:= bzip2-host
PKG_URL:= http://www.busybox.net/
PKG_SITES:= http://www.busybox.net/downloads/
diff --git a/package/bzip2/Makefile b/package/bzip2/Makefile
index 5585ae0c1..b73fde65f 100644
--- a/package/bzip2/Makefile
+++ b/package/bzip2/Makefile
@@ -43,8 +43,10 @@ host-build:
PREFIX=${HOST_WRKINST}/usr ${HOST_ALL_TARGET})
bzip2-hostinstall:
+ ${INSTALL_DIR} ${STAGING_HOST_DIR}/usr/bin
${INSTALL_DIR} ${STAGING_HOST_DIR}/usr/lib
${INSTALL_DIR} $(STAGING_HOST_DIR)/usr/include
+ $(INSTALL_BIN) ${WRKBUILD}/bzip2-shared ${STAGING_HOST_DIR}/usr/bin/bzip2
$(CP) ${WRKBUILD}/libbz2.so* \
${STAGING_HOST_DIR}/usr/lib
(cd ${STAGING_HOST_DIR}/usr/lib; ln -sf libbz2.so.1.0.6 libbz2.so)
diff --git a/package/ccache/Makefile b/package/ccache/Makefile
new file mode 100644
index 000000000..c61f1c4d9
--- /dev/null
+++ b/package/ccache/Makefile
@@ -0,0 +1,24 @@
+# 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:= ccache
+PKG_VERSION:= 3.1.9
+PKG_RELEASE:= 1
+PKG_MD5SUM:= 367916e4ecba4968f77f59a378e61458
+PKG_DESCR:= ccache utility
+PKG_SECTION:= misc
+PKG_SITES:= http://samba.org/ftp/ccache/
+
+PKG_CFLINE_CCACHE:= depends on ADK_HOST_ONLY
+
+include $(TOPDIR)/mk/host.mk
+include $(TOPDIR)/mk/package.mk
+
+$(eval $(call HOST_template,CCACHE,ccache,$(PKG_VERSION)-${PKG_RELEASE}))
+
+HOST_STYLE:= auto
+
+include ${TOPDIR}/mk/host-bottom.mk
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/cdrtools/Makefile b/package/cdrtools/Makefile
index 6bf16ab17..612a553bc 100644
--- a/package/cdrtools/Makefile
+++ b/package/cdrtools/Makefile
@@ -8,28 +8,27 @@ PKG_VERSION:= 3.01
PKG_RELEASE:= 1
PKG_MD5SUM:= afd4563e335a614a11e042c7b6734d66
PKG_DESCR:= cdrtools
-PKG_SECTION:= misc
+PKG_SECTION:= fs
PKG_URL:= http://cdrecord.berlios.de/private/cdrecord.html
-PKG_SITES:= http://openadk.org/
+PKG_SITES:= ftp://ftp.berlios.de/pub/cdrecord/
-PKG_CFLINE_CDRTOOLS:= depends on ADK_BROKEN
+PKG_CFLINE_CDRTOOLS:= depends on ADK_HOST_ONLY
+include $(TOPDIR)/mk/host.mk
include $(TOPDIR)/mk/package.mk
-$(eval $(call PKG_template,CDRTOOLS,cdrtools,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+$(eval $(call HOST_template,CDRTOOLS,cdrtools,$(PKG_VERSION)-${PKG_RELEASE}))
-CONFIG_STYLE:= manual
-XAKE_FLAGS+= GCC_HONOUR_COPTS=s
+HOST_STYLE:= manual
-cdrtools-install:
- $(INSTALL_DIR) $(IDIR_CDRTOOLS)/usr/bin
- $(INSTALL_BIN) $(WRKINST)/opt/schily/bin/cdrecord \
- $(IDIR_CDRTOOLS)/usr/bin
- $(INSTALL_BIN) $(WRKINST)/opt/schily/bin/readcd \
- $(IDIR_CDRTOOLS)/usr/bin
- $(INSTALL_BIN) $(WRKINST)/opt/schily/bin/mkisofs \
- $(IDIR_CDRTOOLS)/usr/bin
- $(INSTALL_BIN) $(WRKINST)/opt/schily/bin/cdda2wav \
- $(IDIR_CDRTOOLS)/usr/bin
+host-build:
+ (cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
+ ${HOST_MAKE_FLAGS} ${HOST_ALL_TARGET})
+cdrtools-hostinstall:
+ $(INSTALL_DIR) $(STAGING_HOST_DIR)/usr/bin
+ $(INSTALL_BIN) $(WRKBUILD)/mkisofs/OBJ/*/mkisofs \
+ $(STAGING_HOST_DIR)/usr/bin
+
+include ${TOPDIR}/mk/host-bottom.mk
include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/cfgfs/Makefile b/package/cfgfs/Makefile
index 70b323a76..3d1d41410 100644
--- a/package/cfgfs/Makefile
+++ b/package/cfgfs/Makefile
@@ -15,7 +15,7 @@ PKG_CFLINE_CFGFS:= select BUSYBOX_DIFF@
PKG_CFLINE_CFGFS+= select BUSYBOX_MD5SUM@
PKG_CFLINE_CFGFS+= select BUSYBOX_XARGS@
PKG_CFLINE_CFGFS+= select BUSYBOX_FEATURE_SORT_BIG@
-PKG_CFLINE_CFGFS+= depends on !ADK_TARGET_ROOTFS_NFSROOT && !ADK_TARGET_ROOTFS_INITRAMFS_PIGGYBACK && !ADK_TARGET_ROOTFS_INITRAMFS && !ADK_TARGET_ROOTFS_JFFS2 && !ADK_TARGET_ROOTFS_SQUASHFS
+PKG_CFLINE_CFGFS+= depends on !ADK_TARGET_ROOTFS_NFSROOT && !ADK_TARGET_ROOTFS_INITRAMFS_PIGGYBACK && !ADK_TARGET_ROOTFS_INITRAMFS && !ADK_TARGET_ROOTFS_JFFS2 && !ADK_TARGET_ROOTFS_SQUASHFS && !ADK_TARGET_ROOTFS_ISO
PKG_DFLT_CFGFS:= y if !(ADK_TOOLCHAIN_ONLY || ADK_TOOLCHAIN_ARCHIVE || ADK_PKG_TEST)
WRKDIST= ${WRKDIR}/${PKG_NAME}-${PKG_VERSION}
diff --git a/package/findutils/Makefile b/package/findutils/Makefile
index d89ca77ea..57fdf77b3 100644
--- a/package/findutils/Makefile
+++ b/package/findutils/Makefile
@@ -7,7 +7,7 @@ PKG_NAME:= findutils
PKG_VERSION:= 4.4.2
PKG_RELEASE:= 4
PKG_MD5SUM:= 351cc4adb07d54877fa15f75fb77d39f
-PKG_DESCR:= GNU utilities for finding files
+PKG_DESCR:= utilities for finding files
PKG_SECTION:= utils
PKG_DEPENDS:= libpthread
PKG_BUILDDEP:= autotool
@@ -18,12 +18,15 @@ PKG_SUBPKGS:= FIND XARGS LOCATE
PKGSD_LOCATE:= locate utility
PKGSD_XARGS:= xargs utility
+include $(TOPDIR)/mk/host.mk
include $(TOPDIR)/mk/package.mk
+$(eval $(call HOST_template,FINDUTILS,findutils,$(PKG_VERSION)-${PKG_RELEASE}))
$(eval $(call PKG_template,FIND,find,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
$(eval $(call PKG_template,XARGS,xargs,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_XARGS},${PKG_SECTION}))
$(eval $(call PKG_template,LOCATE,locate,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LOCATE},${PKG_SECTION}))
+HOST_STYLE:= auto
AUTOTOOL_STYLE:= autoreconf
CONFIGURE_ENV+= gl_cv_func_wcwidth_works=yes \
ac_cv_func_working_mktime=yes
@@ -44,4 +47,5 @@ locate-install:
$(INSTALL_BIN) $(WRKINST)/usr/libexec/{bigram,code,frcode} \
$(IDIR_LOCATE)/usr/libexec
+include ${TOPDIR}/mk/host-bottom.mk
include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/genext2fs/Makefile b/package/genext2fs/Makefile
new file mode 100644
index 000000000..4e8fea5bd
--- /dev/null
+++ b/package/genext2fs/Makefile
@@ -0,0 +1,24 @@
+# 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:= genext2fs
+PKG_VERSION:= 1.4.1
+PKG_RELEASE:= 1
+PKG_MD5SUM:= b7b6361bcce2cedff1ae437fadafe53b
+PKG_DESCR:= genext2fs utility
+PKG_SECTION:= fs
+PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=genext2fs/}
+
+PKG_CFLINE_GENEXT2FS:= depends on ADK_HOST_ONLY
+
+include $(TOPDIR)/mk/host.mk
+include $(TOPDIR)/mk/package.mk
+
+$(eval $(call HOST_template,GENEXT2FS,genext2fs,$(PKG_VERSION)-${PKG_RELEASE}))
+
+HOST_STYLE:= auto
+
+include ${TOPDIR}/mk/host-bottom.mk
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/heirloom-cpio/Makefile b/package/heirloom-cpio/Makefile
new file mode 100644
index 000000000..a91b71ecf
--- /dev/null
+++ b/package/heirloom-cpio/Makefile
@@ -0,0 +1,32 @@
+# 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:= heirloom-cpio
+PKG_VERSION:= 1.0
+PKG_RELEASE:= 1
+PKG_DESCR:= patched version of heirloom cpio
+PKG_SECTION:= archive
+
+PKG_CFLINE_HEIRLOOM_CPIO:= depends on ADK_HOST_ONLY
+
+NO_DISTFILES:= 1
+
+include ${TOPDIR}/mk/host.mk
+include ${TOPDIR}/mk/package.mk
+
+$(eval $(call HOST_template,HEIRLOOM_CPIO,heirloom-cpio,${PKG_VERSION}-${PKG_RELEASE}))
+
+HOST_STYLE:= manual
+
+host-build:
+ (cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
+ ${HOST_MAKE_FLAGS} ${HOST_ALL_TARGET})
+
+heirloom-cpio-hostinstall:
+ ${INSTALL_DIR} ${STAGING_HOST_DIR}/usr/bin
+ ${INSTALL_BIN} ${WRKBUILD}/cpio ${STAGING_HOST_DIR}/usr/bin
+
+include ${TOPDIR}/mk/host-bottom.mk
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/heirloom-cpio/src/Makefile b/package/heirloom-cpio/src/Makefile
new file mode 100644
index 000000000..ecaf82243
--- /dev/null
+++ b/package/heirloom-cpio/src/Makefile
@@ -0,0 +1,28 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+all: cpio
+
+SRCS:= ib_open.c \
+ ib_close.c \
+ ib_read.c \
+ ib_alloc.c \
+ ib_free.c \
+ ib_getlin.c \
+ sfile.c \
+ gmatch.c \
+ sigset.c \
+ memalign.c \
+ version.c \
+ blast.c \
+ crc32.c \
+ expand.c \
+ explode.c \
+ flags.c \
+ inflate.c \
+ unshrink.c \
+ nonpax.c \
+ cpio.c
+
+cpio: ${SRCS}
+ $(CC) $(CFLAGS_FOR_BUILD) -D_GNU_SOURCE -I. -o $@ $^
diff --git a/tools/cpio/src/_alloca.h b/package/heirloom-cpio/src/_alloca.h
index dc2afe5b4..dc2afe5b4 100644
--- a/tools/cpio/src/_alloca.h
+++ b/package/heirloom-cpio/src/_alloca.h
diff --git a/tools/cpio/src/_malloc.h b/package/heirloom-cpio/src/_malloc.h
index 1693e3673..1693e3673 100644
--- a/tools/cpio/src/_malloc.h
+++ b/package/heirloom-cpio/src/_malloc.h
diff --git a/tools/cpio/src/_utmpx.h b/package/heirloom-cpio/src/_utmpx.h
index c32bd9527..c32bd9527 100644
--- a/tools/cpio/src/_utmpx.h
+++ b/package/heirloom-cpio/src/_utmpx.h
diff --git a/tools/cpio/src/asciitype.c b/package/heirloom-cpio/src/asciitype.c
index f7f322173..f7f322173 100644
--- a/tools/cpio/src/asciitype.c
+++ b/package/heirloom-cpio/src/asciitype.c
diff --git a/tools/cpio/src/asciitype.h b/package/heirloom-cpio/src/asciitype.h
index 6ac1961a1..6ac1961a1 100644
--- a/tools/cpio/src/asciitype.h
+++ b/package/heirloom-cpio/src/asciitype.h
diff --git a/tools/cpio/src/atoll.h b/package/heirloom-cpio/src/atoll.h
index 8283aff64..8283aff64 100644
--- a/tools/cpio/src/atoll.h
+++ b/package/heirloom-cpio/src/atoll.h
diff --git a/tools/cpio/src/blank.h b/package/heirloom-cpio/src/blank.h
index 1ab3d57b8..1ab3d57b8 100644
--- a/tools/cpio/src/blank.h
+++ b/package/heirloom-cpio/src/blank.h
diff --git a/tools/cpio/src/blast.c b/package/heirloom-cpio/src/blast.c
index b62efd585..b62efd585 100644
--- a/tools/cpio/src/blast.c
+++ b/package/heirloom-cpio/src/blast.c
diff --git a/tools/cpio/src/blast.h b/package/heirloom-cpio/src/blast.h
index 0c16d1391..0c16d1391 100644
--- a/tools/cpio/src/blast.h
+++ b/package/heirloom-cpio/src/blast.h
diff --git a/tools/cpio/src/cpio.1 b/package/heirloom-cpio/src/cpio.1
index 9c8b1f98c..9c8b1f98c 100644
--- a/tools/cpio/src/cpio.1
+++ b/package/heirloom-cpio/src/cpio.1
diff --git a/tools/cpio/src/cpio.c b/package/heirloom-cpio/src/cpio.c
index e5090e4c9..e5090e4c9 100644
--- a/tools/cpio/src/cpio.c
+++ b/package/heirloom-cpio/src/cpio.c
diff --git a/tools/cpio/src/cpio.h b/package/heirloom-cpio/src/cpio.h
index 131a3d388..131a3d388 100644
--- a/tools/cpio/src/cpio.h
+++ b/package/heirloom-cpio/src/cpio.h
diff --git a/tools/cpio/src/crc32.c b/package/heirloom-cpio/src/crc32.c
index 084cb52cf..084cb52cf 100644
--- a/tools/cpio/src/crc32.c
+++ b/package/heirloom-cpio/src/crc32.c
diff --git a/tools/cpio/src/expand.c b/package/heirloom-cpio/src/expand.c
index 5a5233f3e..5a5233f3e 100644
--- a/tools/cpio/src/expand.c
+++ b/package/heirloom-cpio/src/expand.c
diff --git a/tools/cpio/src/explode.c b/package/heirloom-cpio/src/explode.c
index 863dbf672..863dbf672 100644
--- a/tools/cpio/src/explode.c
+++ b/package/heirloom-cpio/src/explode.c
diff --git a/tools/cpio/src/flags.c b/package/heirloom-cpio/src/flags.c
index e06c8e80d..e06c8e80d 100644
--- a/tools/cpio/src/flags.c
+++ b/package/heirloom-cpio/src/flags.c
diff --git a/tools/cpio/src/getdir.c b/package/heirloom-cpio/src/getdir.c
index 245b7641e..245b7641e 100644
--- a/tools/cpio/src/getdir.c
+++ b/package/heirloom-cpio/src/getdir.c
diff --git a/tools/cpio/src/getdir.h b/package/heirloom-cpio/src/getdir.h
index 29d107b6f..29d107b6f 100644
--- a/tools/cpio/src/getdir.h
+++ b/package/heirloom-cpio/src/getdir.h
diff --git a/tools/cpio/src/getopt.c b/package/heirloom-cpio/src/getopt.c
index 0a68ac8e9..0a68ac8e9 100644
--- a/tools/cpio/src/getopt.c
+++ b/package/heirloom-cpio/src/getopt.c
diff --git a/tools/cpio/src/gmatch.c b/package/heirloom-cpio/src/gmatch.c
index a2c5eb7ba..a2c5eb7ba 100644
--- a/tools/cpio/src/gmatch.c
+++ b/package/heirloom-cpio/src/gmatch.c
diff --git a/tools/cpio/src/ib_alloc.c b/package/heirloom-cpio/src/ib_alloc.c
index 4020940ce..4020940ce 100644
--- a/tools/cpio/src/ib_alloc.c
+++ b/package/heirloom-cpio/src/ib_alloc.c
diff --git a/tools/cpio/src/ib_close.c b/package/heirloom-cpio/src/ib_close.c
index 946bb9ef6..946bb9ef6 100644
--- a/tools/cpio/src/ib_close.c
+++ b/package/heirloom-cpio/src/ib_close.c
diff --git a/tools/cpio/src/ib_free.c b/package/heirloom-cpio/src/ib_free.c
index 72143afef..72143afef 100644
--- a/tools/cpio/src/ib_free.c
+++ b/package/heirloom-cpio/src/ib_free.c
diff --git a/tools/cpio/src/ib_getlin.c b/package/heirloom-cpio/src/ib_getlin.c
index ddee226b4..ddee226b4 100644
--- a/tools/cpio/src/ib_getlin.c
+++ b/package/heirloom-cpio/src/ib_getlin.c
diff --git a/tools/cpio/src/ib_getw.c b/package/heirloom-cpio/src/ib_getw.c
index b7f2e6762..b7f2e6762 100644
--- a/tools/cpio/src/ib_getw.c
+++ b/package/heirloom-cpio/src/ib_getw.c
diff --git a/tools/cpio/src/ib_open.c b/package/heirloom-cpio/src/ib_open.c
index 18e09c776..18e09c776 100644
--- a/tools/cpio/src/ib_open.c
+++ b/package/heirloom-cpio/src/ib_open.c
diff --git a/tools/cpio/src/ib_popen.c b/package/heirloom-cpio/src/ib_popen.c
index 9aa873042..9aa873042 100644
--- a/tools/cpio/src/ib_popen.c
+++ b/package/heirloom-cpio/src/ib_popen.c
diff --git a/tools/cpio/src/ib_read.c b/package/heirloom-cpio/src/ib_read.c
index 3794f3e95..3794f3e95 100644
--- a/tools/cpio/src/ib_read.c
+++ b/package/heirloom-cpio/src/ib_read.c
diff --git a/tools/cpio/src/ib_seek.c b/package/heirloom-cpio/src/ib_seek.c
index 48b2f99bc..48b2f99bc 100644
--- a/tools/cpio/src/ib_seek.c
+++ b/package/heirloom-cpio/src/ib_seek.c
diff --git a/tools/cpio/src/iblok.h b/package/heirloom-cpio/src/iblok.h
index 66964627f..66964627f 100644
--- a/tools/cpio/src/iblok.h
+++ b/package/heirloom-cpio/src/iblok.h
diff --git a/tools/cpio/src/inflate.c b/package/heirloom-cpio/src/inflate.c
index 2c6d3e59f..2c6d3e59f 100644
--- a/tools/cpio/src/inflate.c
+++ b/package/heirloom-cpio/src/inflate.c
diff --git a/tools/cpio/src/mbtowi.h b/package/heirloom-cpio/src/mbtowi.h
index 525ad08d1..525ad08d1 100644
--- a/tools/cpio/src/mbtowi.h
+++ b/package/heirloom-cpio/src/mbtowi.h
diff --git a/tools/cpio/src/memalign.c b/package/heirloom-cpio/src/memalign.c
index 268949b20..268949b20 100644
--- a/tools/cpio/src/memalign.c
+++ b/package/heirloom-cpio/src/memalign.c
diff --git a/tools/cpio/src/memalign.h b/package/heirloom-cpio/src/memalign.h
index edaef031b..edaef031b 100644
--- a/tools/cpio/src/memalign.h
+++ b/package/heirloom-cpio/src/memalign.h
diff --git a/tools/cpio/src/msgselect.h b/package/heirloom-cpio/src/msgselect.h
index 94a5daa9f..94a5daa9f 100644
--- a/tools/cpio/src/msgselect.h
+++ b/package/heirloom-cpio/src/msgselect.h
diff --git a/tools/cpio/src/nonpax.c b/package/heirloom-cpio/src/nonpax.c
index d0eb585b7..d0eb585b7 100644
--- a/tools/cpio/src/nonpax.c
+++ b/package/heirloom-cpio/src/nonpax.c
diff --git a/tools/cpio/src/oblok.c b/package/heirloom-cpio/src/oblok.c
index 38859ba6d..38859ba6d 100644
--- a/tools/cpio/src/oblok.c
+++ b/package/heirloom-cpio/src/oblok.c
diff --git a/tools/cpio/src/oblok.h b/package/heirloom-cpio/src/oblok.h
index 1ee91b1c5..1ee91b1c5 100644
--- a/tools/cpio/src/oblok.h
+++ b/package/heirloom-cpio/src/oblok.h
diff --git a/tools/cpio/src/pathconf.c b/package/heirloom-cpio/src/pathconf.c
index a6b91ef86..a6b91ef86 100644
--- a/tools/cpio/src/pathconf.c
+++ b/package/heirloom-cpio/src/pathconf.c
diff --git a/tools/cpio/src/pathconf.h b/package/heirloom-cpio/src/pathconf.h
index 79696b6da..79696b6da 100644
--- a/tools/cpio/src/pathconf.h
+++ b/package/heirloom-cpio/src/pathconf.h
diff --git a/tools/cpio/src/pax.1 b/package/heirloom-cpio/src/pax.1
index 4fb9206f9..4fb9206f9 100644
--- a/tools/cpio/src/pax.1
+++ b/package/heirloom-cpio/src/pax.1
diff --git a/tools/cpio/src/pax.c b/package/heirloom-cpio/src/pax.c
index 50632b6b1..50632b6b1 100644
--- a/tools/cpio/src/pax.c
+++ b/package/heirloom-cpio/src/pax.c
diff --git a/tools/cpio/src/pfmt.c b/package/heirloom-cpio/src/pfmt.c
index 8adc22f23..8adc22f23 100644
--- a/tools/cpio/src/pfmt.c
+++ b/package/heirloom-cpio/src/pfmt.c
diff --git a/tools/cpio/src/pfmt.h b/package/heirloom-cpio/src/pfmt.h
index 012667b0b..012667b0b 100644
--- a/tools/cpio/src/pfmt.h
+++ b/package/heirloom-cpio/src/pfmt.h
diff --git a/tools/cpio/src/pfmt_label.c b/package/heirloom-cpio/src/pfmt_label.c
index 5b1a53f0a..5b1a53f0a 100644
--- a/tools/cpio/src/pfmt_label.c
+++ b/package/heirloom-cpio/src/pfmt_label.c
diff --git a/tools/cpio/src/regexp.h b/package/heirloom-cpio/src/regexp.h
index 5b1fee5e6..5b1fee5e6 100644
--- a/tools/cpio/src/regexp.h
+++ b/package/heirloom-cpio/src/regexp.h
diff --git a/tools/cpio/src/regexpr.c b/package/heirloom-cpio/src/regexpr.c
index 40dceb525..40dceb525 100644
--- a/tools/cpio/src/regexpr.c
+++ b/package/heirloom-cpio/src/regexpr.c
diff --git a/tools/cpio/src/regexpr.h b/package/heirloom-cpio/src/regexpr.h
index 74f4a1426..74f4a1426 100644
--- a/tools/cpio/src/regexpr.h
+++ b/package/heirloom-cpio/src/regexpr.h
diff --git a/tools/cpio/src/setlabel.c b/package/heirloom-cpio/src/setlabel.c
index a1db0646e..a1db0646e 100644
--- a/tools/cpio/src/setlabel.c
+++ b/package/heirloom-cpio/src/setlabel.c
diff --git a/tools/cpio/src/setuxlabel.c b/package/heirloom-cpio/src/setuxlabel.c
index 9d304869e..9d304869e 100644
--- a/tools/cpio/src/setuxlabel.c
+++ b/package/heirloom-cpio/src/setuxlabel.c
diff --git a/tools/cpio/src/sfile.c b/package/heirloom-cpio/src/sfile.c
index 089d85fdf..089d85fdf 100644
--- a/tools/cpio/src/sfile.c
+++ b/package/heirloom-cpio/src/sfile.c
diff --git a/tools/cpio/src/sfile.h b/package/heirloom-cpio/src/sfile.h
index 53d832a6f..53d832a6f 100644
--- a/tools/cpio/src/sfile.h
+++ b/package/heirloom-cpio/src/sfile.h
diff --git a/tools/cpio/src/sighold.c b/package/heirloom-cpio/src/sighold.c
index bae3bc393..bae3bc393 100644
--- a/tools/cpio/src/sighold.c
+++ b/package/heirloom-cpio/src/sighold.c
diff --git a/tools/cpio/src/sigignore.c b/package/heirloom-cpio/src/sigignore.c
index 6938ef676..6938ef676 100644
--- a/tools/cpio/src/sigignore.c
+++ b/package/heirloom-cpio/src/sigignore.c
diff --git a/tools/cpio/src/signal.c b/package/heirloom-cpio/src/signal.c
index 1f9d51cb7..1f9d51cb7 100644
--- a/tools/cpio/src/signal.c
+++ b/package/heirloom-cpio/src/signal.c
diff --git a/tools/cpio/src/sigpause.c b/package/heirloom-cpio/src/sigpause.c
index 504a5ed4d..504a5ed4d 100644
--- a/tools/cpio/src/sigpause.c
+++ b/package/heirloom-cpio/src/sigpause.c
diff --git a/tools/cpio/src/sigrelse.c b/package/heirloom-cpio/src/sigrelse.c
index d74de74bf..d74de74bf 100644
--- a/tools/cpio/src/sigrelse.c
+++ b/package/heirloom-cpio/src/sigrelse.c
diff --git a/tools/cpio/src/sigset.c b/package/heirloom-cpio/src/sigset.c
index d561d541d..d561d541d 100644
--- a/tools/cpio/src/sigset.c
+++ b/package/heirloom-cpio/src/sigset.c
diff --git a/tools/cpio/src/sigset.h b/package/heirloom-cpio/src/sigset.h
index ada73a884..ada73a884 100644
--- a/tools/cpio/src/sigset.h
+++ b/package/heirloom-cpio/src/sigset.h
diff --git a/tools/cpio/src/strtol.c b/package/heirloom-cpio/src/strtol.c
index cd8ecfe7a..cd8ecfe7a 100644
--- a/tools/cpio/src/strtol.c
+++ b/package/heirloom-cpio/src/strtol.c
diff --git a/tools/cpio/src/unshrink.c b/package/heirloom-cpio/src/unshrink.c
index 61f5c507c..61f5c507c 100644
--- a/tools/cpio/src/unshrink.c
+++ b/package/heirloom-cpio/src/unshrink.c
diff --git a/tools/cpio/src/unzip.h b/package/heirloom-cpio/src/unzip.h
index d53f81024..d53f81024 100644
--- a/tools/cpio/src/unzip.h
+++ b/package/heirloom-cpio/src/unzip.h
diff --git a/tools/cpio/src/utmpx.c b/package/heirloom-cpio/src/utmpx.c
index d88a627a7..d88a627a7 100644
--- a/tools/cpio/src/utmpx.c
+++ b/package/heirloom-cpio/src/utmpx.c
diff --git a/tools/cpio/src/version.c b/package/heirloom-cpio/src/version.c
index a9d4a4681..a9d4a4681 100644
--- a/tools/cpio/src/version.c
+++ b/package/heirloom-cpio/src/version.c
diff --git a/tools/cpio/src/vpfmt.c b/package/heirloom-cpio/src/vpfmt.c
index fdbb4ccb0..fdbb4ccb0 100644
--- a/tools/cpio/src/vpfmt.c
+++ b/package/heirloom-cpio/src/vpfmt.c
diff --git a/package/liblzo/Makefile b/package/liblzo/Makefile
index 3f79d0317..cd6783111 100644
--- a/package/liblzo/Makefile
+++ b/package/liblzo/Makefile
@@ -9,7 +9,6 @@ PKG_RELEASE:= 1
PKG_MD5SUM:= 95380bd4081f85ef08c5209f4107e9f8
PKG_DESCR:= a real-time data compression library
PKG_SECTION:= libs
-PKG_BUILDDEP:= liblzo-host
PKG_URL:= http://www.oberhumer.com/opensource/lzo
PKG_SITES:= http://www.oberhumer.com/opensource/lzo/download/
PKG_LIBNAME:= liblzo
diff --git a/package/libpthread/Makefile b/package/libpthread/Makefile
index cdb84d5fe..9d7806bc5 100644
--- a/package/libpthread/Makefile
+++ b/package/libpthread/Makefile
@@ -36,6 +36,7 @@ libpthread-install:
ifeq ($(ADK_TARGET_LIB_MUSL),)
${INSTALL_DIR} ${IDIR_LIBPTHREAD}/$(ADK_TARGET_LIBC_PATH)
${CP} ${STAGING_TARGET_DIR}/lib/libpthread*.so* ${IDIR_LIBPTHREAD}/$(ADK_TARGET_LIBC_PATH)
+ (cd ${IDIR_LIBPTHREAD}/$(ADK_TARGET_LIBC_PATH); ln -sf libpthread.so.0 libpthread.so)
endif
include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/libpthread/files/libpthread.postinst b/package/libpthread/files/libpthread.postinst
deleted file mode 100644
index 76a6c81a4..000000000
--- a/package/libpthread/files/libpthread.postinst
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-if [ ! -z $IPKG_INSTROOT ];then
- (cd $IPKG_INSTROOT/lib && ln -sf libpthread.so.0 libpthread.so)
-fi
diff --git a/package/lzma/Makefile b/package/lzma/Makefile
new file mode 100644
index 000000000..7d2a2e653
--- /dev/null
+++ b/package/lzma/Makefile
@@ -0,0 +1,28 @@
+# 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:= lzma
+PKG_VERSION:= 4.32.7
+PKG_RELEASE:= 1
+PKG_MD5SUM:= 2a748b77a2f8c3cbc322dbd0b4c9d06a
+PKG_DESCR:= LZMA compression utility
+PKG_SECTION:= archive
+PKG_URL:= http://tukaani.org/lzma/
+PKG_SITES:= http://tukaani.org/lzma/
+
+include $(TOPDIR)/mk/host.mk
+include $(TOPDIR)/mk/package.mk
+
+$(eval $(call HOST_template,LZMA,lzma,$(PKG_VERSION)-${PKG_RELEASE}))
+$(eval $(call PKG_template,LZMA,lzma,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+
+HOST_STYLE:= auto
+
+lzma-install:
+ $(INSTALL_DIR) $(IDIR_LZMA)/usr/bin
+ $(INSTALL_BIN) $(WRKINST)/usr/bin/lzma $(IDIR_LZMA)/usr/bin
+
+include ${TOPDIR}/mk/host-bottom.mk
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/lzop/Makefile b/package/lzop/Makefile
index f939092a5..95278fcd3 100644
--- a/package/lzop/Makefile
+++ b/package/lzop/Makefile
@@ -11,15 +11,21 @@ PKG_DESCR:= LZO compression utility
PKG_SECTION:= archive
PKG_DEPENDS:= liblzo
PKG_BUILDDEP:= liblzo
+HOST_BUILDDEP:= liblzo-host
PKG_URL:= http://www.lzop.org/
PKG_SITES:= http://www.lzop.org/download/
+include $(TOPDIR)/mk/host.mk
include $(TOPDIR)/mk/package.mk
+$(eval $(call HOST_template,LZOP,lzop,$(PKG_VERSION)-${PKG_RELEASE}))
$(eval $(call PKG_template,LZOP,lzop,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+HOST_STYLE:= auto
+
lzop-install:
$(INSTALL_DIR) $(IDIR_LZOP)/usr/bin
$(INSTALL_BIN) $(WRKINST)/usr/bin/lzop $(IDIR_LZOP)/usr/bin
+include ${TOPDIR}/mk/host-bottom.mk
include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/mkcrypt/Makefile b/package/mkcrypt/Makefile
new file mode 100644
index 000000000..6f8f873a7
--- /dev/null
+++ b/package/mkcrypt/Makefile
@@ -0,0 +1,31 @@
+# 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:= mkcrypt
+PKG_VERSION:= 1.0
+PKG_RELEASE:= 1
+PKG_DESCR:= mkcrypt utility
+PKG_SECTION:= misc
+
+PKG_CFLINE_MKCRYPT:= depends on ADK_HOST_ONLY
+
+NO_DISTFILES:= 1
+
+include ${TOPDIR}/mk/host.mk
+include ${TOPDIR}/mk/package.mk
+
+$(eval $(call HOST_template,MKCRYPT,mkcrypt,${PKG_VERSION}-${PKG_RELEASE}))
+
+HOST_STYLE:= manual
+
+host-build:
+ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -o ${WRKBUILD}/mkcrypt ${WRKBUILD}/mkcrypt.c
+
+mkcrypt-hostinstall:
+ ${INSTALL_DIR} ${STAGING_HOST_DIR}/usr/bin
+ ${INSTALL_BIN} ${WRKBUILD}/mkcrypt ${STAGING_HOST_DIR}/usr/bin
+
+include ${TOPDIR}/mk/host-bottom.mk
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/tools/mkcrypt/mkcrypt.c b/package/mkcrypt/src/mkcrypt.c
index a856759df..a856759df 100644
--- a/tools/mkcrypt/mkcrypt.c
+++ b/package/mkcrypt/src/mkcrypt.c
diff --git a/package/mkimage/Makefile b/package/mkimage/Makefile
new file mode 100644
index 000000000..3d6fbc45d
--- /dev/null
+++ b/package/mkimage/Makefile
@@ -0,0 +1,33 @@
+# 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:= mkimage
+PKG_VERSION:= 0.1
+PKG_RELEASE:= 1
+PKG_MD5SUM:= 1b7a781fb4cf8938842279bd3e8ee852
+PKG_DESCR:= stripped down mkimage utility
+PKG_SECTION:= misc
+
+NO_DISTFILES:= 1
+
+PKG_CFLINE_MKIMAGE:= depends on ADK_HOST_ONLY
+
+include $(TOPDIR)/mk/host.mk
+include $(TOPDIR)/mk/package.mk
+
+$(eval $(call HOST_template,MKIMAGE,mkimage,$(PKG_VERSION)-${PKG_RELEASE}))
+
+HOST_STYLE:= manual
+
+host-build:
+ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -o ${WRKBUILD}/mkimage ${WRKBUILD}/mkimage.c ${WRKBUILD}/crc32.c
+
+mkimage-hostinstall:
+ ${INSTALL_DIR} ${STAGING_HOST_DIR}/usr/bin
+ ${INSTALL_BIN} ${WRKBUILD}/mkimage \
+ ${STAGING_HOST_DIR}/usr/bin
+
+include ${TOPDIR}/mk/host-bottom.mk
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/tools/mkimage/crc32.c b/package/mkimage/src/crc32.c
index 067b3106c..067b3106c 100644
--- a/tools/mkimage/crc32.c
+++ b/package/mkimage/src/crc32.c
diff --git a/tools/mkimage/image.h b/package/mkimage/src/image.h
index cb62cde5b..cb62cde5b 100644
--- a/tools/mkimage/image.h
+++ b/package/mkimage/src/image.h
diff --git a/tools/mkimage/mkimage.c b/package/mkimage/src/mkimage.c
index 7c0432bad..7c0432bad 100644
--- a/tools/mkimage/mkimage.c
+++ b/package/mkimage/src/mkimage.c
diff --git a/package/mksh/Makefile b/package/mksh/Makefile
index 63d391e18..4f65a97f7 100644
--- a/package/mksh/Makefile
+++ b/package/mksh/Makefile
@@ -17,9 +17,11 @@ PKG_DFLT_MKSH:= y if !ADK_TOOLCHAIN_ONLY
DISTFILES= ${PKG_NAME}-R${PKG_VERSION}.tgz
WRKDIST= ${WRKDIR}/${PKG_NAME}
+include ${TOPDIR}/mk/host.mk
include ${TOPDIR}/mk/package.mk
-$(eval $(call PKG_template,MKSH,mksh,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+$(eval $(call HOST_template,MKSH,mksh,${PKG_VERSION}-${PKG_RELEASE}))
+$(eval $(call PKG_template,MKSH,mksh,${PKG_VERSION}-${PKG_RELEASE},,${PKG_DESCR},${PKG_SECTION}))
ifeq ($(ADK_STATIC),y)
TARGET_CFLAGS+= -static
@@ -28,19 +30,31 @@ endif
TARGET_CPPFLAGS+= -DMKSH_SMALL=1
TARGET_LDFLAGS+= -static-libgcc
+
+HOST_STYLE:= manual
CONFIG_STYLE:= manual
BUILD_STYLE:= manual
INSTALL_STYLE:= manual
+host-build:
+ cd ${WRKBUILD} && HAVE_CAN_FSTACKPROTECTORALL=0 \
+ TARGET_OS=Linux ${BASH} ${WRKSRC}/Build.sh -Q -r -c lto
+
+mksh-hostinstall:
+ ${INSTALL_DIR} ${STAGING_HOST_DIR}/usr/bin
+ ${INSTALL_BIN} ${WRKBUILD}/mksh \
+ ${STAGING_HOST_DIR}/usr/bin
+
do-build:
cd ${WRKBUILD} && CC='${TARGET_CC}' CFLAGS='${TARGET_CFLAGS}' \
CPPFLAGS='${TARGET_CPPFLAGS}' LDFLAGS='${TARGET_LDFLAGS}' \
HAVE_CAN_FSTACKPROTECTORALL=0 \
TARGET_OS=Linux ${BASH} ${WRKSRC}/Build.sh -Q -r -c lto
-do-install:
+mksh-install:
${INSTALL_DIR} ${IDIR_MKSH}/bin ${IDIR_MKSH}/root
${INSTALL_BIN} ${WRKBUILD}/mksh ${IDIR_MKSH}/bin/
${CP} ${WRKSRC}/dot.mkshrc ${IDIR_MKSH}/root/.mkshrc
+include ${TOPDIR}/mk/host-bottom.mk
include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/mtd-utils/Makefile b/package/mtd-utils/Makefile
new file mode 100644
index 000000000..19c81ae4a
--- /dev/null
+++ b/package/mtd-utils/Makefile
@@ -0,0 +1,35 @@
+# 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:= mtd-utils
+PKG_VERSION:= 1.5.0
+PKG_RELEASE:= 1
+PKG_MD5SUM:= a4df1ad29684be79b0fa699bdae01faf
+PKG_DESCR:= mtd-utils filesystem utilities
+PKG_SECTION:= fs
+HOST_BUILDDEP:= liblzo-host
+PKG_SITES:= http://openadk.org/distfiles/
+
+PKG_CFLINE_MTD_UTILS:= depends on ADK_HOST_ONLY
+
+include $(TOPDIR)/mk/host.mk
+include $(TOPDIR)/mk/package.mk
+
+$(eval $(call HOST_template,MTD_UTILS,mtd-utils,$(PKG_VERSION)-${PKG_RELEASE}))
+
+HOST_STYLE:= manual
+CPPFLAGS_FOR_BUILD+= -DWITHOUT_XATTR=1 -I./include
+
+host-build:
+ (cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
+ ${HOST_MAKE_FLAGS} ${HOST_ALL_TARGET})
+
+mtd-utils-hostinstall:
+ ${INSTALL_DIR} ${STAGING_HOST_DIR}/usr/bin
+ ${INSTALL_BIN} ${WRKBUILD}/mkfs.jffs2 \
+ ${STAGING_HOST_DIR}/usr/bin
+
+include ${TOPDIR}/mk/host-bottom.mk
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/tools/mtd-utils/patches/lzo.patch b/package/mtd-utils/patches/patch-Makefile
index 52f16146c..53ed8640e 100644
--- a/tools/mtd-utils/patches/lzo.patch
+++ b/package/mtd-utils/patches/patch-Makefile
@@ -1,29 +1,6 @@
-diff -Nur mtd-utils-1.5.0.orig/compr.c mtd-utils-1.5.0/compr.c
---- mtd-utils-1.5.0.orig/compr.c 2012-05-07 09:19:39.000000000 +0200
-+++ mtd-utils-1.5.0/compr.c 2014-02-25 21:05:20.000000000 +0100
-@@ -517,9 +517,6 @@
- #ifdef CONFIG_JFFS2_RTIME
- jffs2_rtime_init();
- #endif
--#ifdef CONFIG_JFFS2_LZO
-- jffs2_lzo_init();
--#endif
- return 0;
- }
-
-@@ -531,8 +528,5 @@
- #ifdef CONFIG_JFFS2_ZLIB
- jffs2_zlib_exit();
- #endif
--#ifdef CONFIG_JFFS2_LZO
-- jffs2_lzo_exit();
--#endif
- return 0;
- }
-diff -Nur mtd-utils-1.5.0.orig/Makefile mtd-utils-1.5.0/Makefile
--- mtd-utils-1.5.0.orig/Makefile 2012-05-07 09:19:39.000000000 +0200
-+++ mtd-utils-1.5.0/Makefile 2014-02-25 21:13:03.000000000 +0100
-@@ -16,27 +16,13 @@
++++ mtd-utils-1.5.0/Makefile 2014-03-30 15:49:30.000000000 +0200
+@@ -16,27 +16,13 @@ endif
TESTS = tests
@@ -52,7 +29,7 @@ diff -Nur mtd-utils-1.5.0.orig/Makefile mtd-utils-1.5.0/Makefile
OBJDEPS = $(BUILDDIR)/include/version.h
-@@ -83,12 +69,12 @@
+@@ -83,12 +69,12 @@ $(BUILDDIR)/include/version.h.tmp:
#
# Utils in top level
#
@@ -70,7 +47,7 @@ diff -Nur mtd-utils-1.5.0.orig/Makefile mtd-utils-1.5.0/Makefile
$(foreach v,$(MTD_BINS),$(eval $(call mkdep,,$(v))))
-@@ -103,7 +89,7 @@
+@@ -103,7 +89,7 @@ $(call _mkdep,lib/,libmtd.a)
#
obj-mkfs.ubifs = crc16.o lpt.o compr.o devtable.o \
hashtable/hashtable.o hashtable/hashtable_itr.o
@@ -79,7 +56,7 @@ diff -Nur mtd-utils-1.5.0.orig/Makefile mtd-utils-1.5.0/Makefile
$(call mkdep,mkfs.ubifs/,mkfs.ubifs,,ubi-utils/libubi.a)
#
-@@ -117,6 +103,3 @@
+@@ -117,6 +103,3 @@ obj-libubigen.a = libubigen.o
obj-mtdinfo = libubigen.a
obj-ubinize = libubigen.a libiniparser.a
obj-ubiformat = libubigen.a libscan.a
diff --git a/package/mtd-utils/patches/patch-common_mk b/package/mtd-utils/patches/patch-common_mk
new file mode 100644
index 000000000..6881db87e
--- /dev/null
+++ b/package/mtd-utils/patches/patch-common_mk
@@ -0,0 +1,11 @@
+--- mtd-utils-1.5.0.orig/common.mk 2012-05-07 09:19:39.000000000 +0200
++++ mtd-utils-1.5.0/common.mk 2014-03-30 15:49:26.000000000 +0200
+@@ -13,8 +13,6 @@ WFLAGS := -Wall \
+ $(call cc-option,-Wwrite-strings) \
+ $(call cc-option,-Wno-sign-compare)
+ CFLAGS += $(WFLAGS)
+-SECTION_CFLAGS := $(call cc-option,-ffunction-sections -fdata-sections -Wl$(comma)--gc-sections)
+-CFLAGS += $(SECTION_CFLAGS)
+
+ ifneq ($(WITHOUT_LARGEFILE), 1)
+ CPPFLAGS += -D_FILE_OFFSET_BITS=64
diff --git a/package/mtd-utils/patches/patch-compr_c b/package/mtd-utils/patches/patch-compr_c
new file mode 100644
index 000000000..c69e133b9
--- /dev/null
+++ b/package/mtd-utils/patches/patch-compr_c
@@ -0,0 +1,21 @@
+--- mtd-utils-1.5.0.orig/compr.c 2012-05-07 09:19:39.000000000 +0200
++++ mtd-utils-1.5.0/compr.c 2014-03-30 15:49:30.000000000 +0200
+@@ -517,9 +517,6 @@ int jffs2_compressors_init(void)
+ #ifdef CONFIG_JFFS2_RTIME
+ jffs2_rtime_init();
+ #endif
+-#ifdef CONFIG_JFFS2_LZO
+- jffs2_lzo_init();
+-#endif
+ return 0;
+ }
+
+@@ -531,8 +528,5 @@ int jffs2_compressors_exit(void)
+ #ifdef CONFIG_JFFS2_ZLIB
+ jffs2_zlib_exit();
+ #endif
+-#ifdef CONFIG_JFFS2_LZO
+- jffs2_lzo_exit();
+-#endif
+ return 0;
+ }
diff --git a/package/mtd-utils/patches/patch-compr_lzo_c b/package/mtd-utils/patches/patch-compr_lzo_c
new file mode 100644
index 000000000..98f235c5b
--- /dev/null
+++ b/package/mtd-utils/patches/patch-compr_lzo_c
@@ -0,0 +1,10 @@
+--- mtd-utils-1.5.0.orig/compr_lzo.c 2012-05-07 09:19:39.000000000 +0200
++++ mtd-utils-1.5.0/compr_lzo.c 2014-03-30 15:49:26.000000000 +0200
+@@ -26,7 +26,6 @@
+ #include <string.h>
+
+ #ifndef WITHOUT_LZO
+-#include <asm/types.h>
+ #include <linux/jffs2.h>
+ #include <lzo/lzo1x.h>
+ #include "compr.h"
diff --git a/package/mtd-utils/patches/patch-compr_zlib_c b/package/mtd-utils/patches/patch-compr_zlib_c
new file mode 100644
index 000000000..200bb55ce
--- /dev/null
+++ b/package/mtd-utils/patches/patch-compr_zlib_c
@@ -0,0 +1,10 @@
+--- mtd-utils-1.5.0.orig/compr_zlib.c 2012-05-07 09:19:39.000000000 +0200
++++ mtd-utils-1.5.0/compr_zlib.c 2014-03-30 15:49:26.000000000 +0200
+@@ -39,7 +39,6 @@
+ #include <zlib.h>
+ #undef crc32
+ #include <stdio.h>
+-#include <asm/types.h>
+ #include <linux/jffs2.h>
+ #include "common.h"
+ #include "compr.h"
diff --git a/package/mtd-utils/patches/patch-include_mtd_jffs2-user_h b/package/mtd-utils/patches/patch-include_mtd_jffs2-user_h
new file mode 100644
index 000000000..1373b66f2
--- /dev/null
+++ b/package/mtd-utils/patches/patch-include_mtd_jffs2-user_h
@@ -0,0 +1,16 @@
+--- mtd-utils-1.5.0.orig/include/mtd/jffs2-user.h 2012-05-07 09:19:39.000000000 +0200
++++ mtd-utils-1.5.0/include/mtd/jffs2-user.h 2014-03-30 15:49:26.000000000 +0200
+@@ -9,8 +9,13 @@
+
+ /* This file is blessed for inclusion by userspace */
+ #include <linux/jffs2.h>
++#if defined(__APPLE__)
++#include "endian.h"
++#include "byteswap.h"
++#else
+ #include <endian.h>
+ #include <byteswap.h>
++#endif
+
+ #undef cpu_to_je16
+ #undef cpu_to_je32
diff --git a/package/mtd-utils/patches/patch-include_mtd_mtd-abi_h b/package/mtd-utils/patches/patch-include_mtd_mtd-abi_h
new file mode 100644
index 000000000..9a95c4127
--- /dev/null
+++ b/package/mtd-utils/patches/patch-include_mtd_mtd-abi_h
@@ -0,0 +1,14 @@
+--- mtd-utils-1.5.0.orig/include/mtd/mtd-abi.h 2012-05-07 09:19:39.000000000 +0200
++++ mtd-utils-1.5.0/include/mtd/mtd-abi.h 2014-03-30 15:49:26.000000000 +0200
+@@ -171,9 +171,9 @@ struct otp_info {
+ /* Get info about OOB modes (e.g., RAW, PLACE, AUTO) - legacy interface */
+ #define MEMGETOOBSEL _IOR('M', 10, struct nand_oobinfo)
+ /* Check if an eraseblock is bad */
+-#define MEMGETBADBLOCK _IOW('M', 11, __kernel_loff_t)
++#define MEMGETBADBLOCK _IOW('M', 11, off_t)
+ /* Mark an eraseblock as bad */
+-#define MEMSETBADBLOCK _IOW('M', 12, __kernel_loff_t)
++#define MEMSETBADBLOCK _IOW('M', 12, off_t)
+ /* Set OTP (One-Time Programmable) mode (factory vs. user) */
+ #define OTPSELECT _IOR('M', 13, int)
+ /* Get number of OTP (One-Time Programmable) regions */
diff --git a/package/mtd-utils/patches/patch-include_mtd_ubi-media_h b/package/mtd-utils/patches/patch-include_mtd_ubi-media_h
new file mode 100644
index 000000000..33feabf92
--- /dev/null
+++ b/package/mtd-utils/patches/patch-include_mtd_ubi-media_h
@@ -0,0 +1,18 @@
+--- mtd-utils-1.5.0.orig/include/mtd/ubi-media.h 2012-05-07 09:19:39.000000000 +0200
++++ mtd-utils-1.5.0/include/mtd/ubi-media.h 2014-03-30 15:49:26.000000000 +0200
+@@ -30,7 +30,15 @@
+ #ifndef __UBI_MEDIA_H__
+ #define __UBI_MEDIA_H__
+
++#ifdef __linux__
+ #include <asm/byteorder.h>
++#else
++#include <stdint.h>
++typedef uint8_t __u8;
++typedef uint16_t __be16;
++typedef uint32_t __be32;
++typedef uint64_t __be64;
++#endif
+
+ /* The version of UBI images supported by this implementation */
+ #define UBI_VERSION 1
diff --git a/package/mtd-utils/patches/patch-lib_libfec_c b/package/mtd-utils/patches/patch-lib_libfec_c
new file mode 100644
index 000000000..7b198d0fb
--- /dev/null
+++ b/package/mtd-utils/patches/patch-lib_libfec_c
@@ -0,0 +1,20 @@
+--- mtd-utils-1.5.0.orig/lib/libfec.c 2012-05-07 09:19:39.000000000 +0200
++++ mtd-utils-1.5.0/lib/libfec.c 2014-03-30 15:49:26.000000000 +0200
+@@ -61,8 +61,6 @@ struct timeval {
+ };
+ #define gettimeofday(x, dummy) { (x)->ticks = clock() ; }
+ #define DIFF_T(a,b) (1+ 1000000*(a.ticks - b.ticks) / CLOCKS_PER_SEC )
+-typedef unsigned long u_long ;
+-typedef unsigned short u_short ;
+ #else /* typically, unix systems */
+ #include <sys/time.h>
+ #define DIFF_T(a,b) \
+@@ -625,7 +623,7 @@ init_fec(void)
+ #define FEC_MAGIC 0xFECC0DEC
+
+ struct fec_parms {
+- u_long magic ;
++ unsigned long magic ;
+ int k, n ; /* parameters of the code */
+ gf *enc_matrix ;
+ } ;
diff --git a/package/mtd-utils/patches/patch-lib_libmtd_c b/package/mtd-utils/patches/patch-lib_libmtd_c
new file mode 100644
index 000000000..af0f9a837
--- /dev/null
+++ b/package/mtd-utils/patches/patch-lib_libmtd_c
@@ -0,0 +1,38 @@
+--- mtd-utils-1.5.0.orig/lib/libmtd.c 2012-05-07 09:19:39.000000000 +0200
++++ mtd-utils-1.5.0/lib/libmtd.c 2014-03-30 15:49:26.000000000 +0200
+@@ -1006,7 +1006,7 @@ out:
+ int mtd_is_bad(const struct mtd_dev_info *mtd, int fd, int eb)
+ {
+ int ret;
+- loff_t seek;
++ off_t seek;
+
+ ret = mtd_valid_erase_block(mtd, eb);
+ if (ret)
+@@ -1015,7 +1015,7 @@ int mtd_is_bad(const struct mtd_dev_info
+ if (!mtd->bb_allowed)
+ return 0;
+
+- seek = (loff_t)eb * mtd->eb_size;
++ seek = (off_t)eb * mtd->eb_size;
+ ret = ioctl(fd, MEMGETBADBLOCK, &seek);
+ if (ret == -1)
+ return mtd_ioctl_error(mtd, eb, "MEMGETBADBLOCK");
+@@ -1025,7 +1025,7 @@ int mtd_is_bad(const struct mtd_dev_info
+ int mtd_mark_bad(const struct mtd_dev_info *mtd, int fd, int eb)
+ {
+ int ret;
+- loff_t seek;
++ off_t seek;
+
+ if (!mtd->bb_allowed) {
+ errno = EINVAL;
+@@ -1036,7 +1036,7 @@ int mtd_mark_bad(const struct mtd_dev_in
+ if (ret)
+ return ret;
+
+- seek = (loff_t)eb * mtd->eb_size;
++ seek = (off_t)eb * mtd->eb_size;
+ ret = ioctl(fd, MEMSETBADBLOCK, &seek);
+ if (ret == -1)
+ return mtd_ioctl_error(mtd, eb, "MEMSETBADBLOCK");
diff --git a/package/mtd-utils/patches/patch-lib_libmtd_legacy_c b/package/mtd-utils/patches/patch-lib_libmtd_legacy_c
new file mode 100644
index 000000000..bcd66374f
--- /dev/null
+++ b/package/mtd-utils/patches/patch-lib_libmtd_legacy_c
@@ -0,0 +1,11 @@
+--- mtd-utils-1.5.0.orig/lib/libmtd_legacy.c 2012-05-07 09:19:39.000000000 +0200
++++ mtd-utils-1.5.0/lib/libmtd_legacy.c 2014-03-30 15:49:26.000000000 +0200
+@@ -234,7 +234,7 @@ int legacy_get_dev_info(const char *node
+ struct stat st;
+ struct mtd_info_user ui;
+ int fd, ret;
+- loff_t offs = 0;
++ off_t offs = 0;
+ struct proc_parse_info pi;
+
+ if (stat(node, &st)) {
diff --git a/package/mtd-utils/patches/patch-mkfs_jffs2_c b/package/mtd-utils/patches/patch-mkfs_jffs2_c
new file mode 100644
index 000000000..766e2204a
--- /dev/null
+++ b/package/mtd-utils/patches/patch-mkfs_jffs2_c
@@ -0,0 +1,15 @@
+--- mtd-utils-1.5.0.orig/mkfs.jffs2.c 2012-05-07 09:19:39.000000000 +0200
++++ mtd-utils-1.5.0/mkfs.jffs2.c 2014-03-30 15:49:26.000000000 +0200
+@@ -70,7 +70,12 @@
+ #include <sys/xattr.h>
+ #include <sys/acl.h>
+ #endif
++#if defined(__APPLE__)
++#include "endian.h"
++#include "byteswap.h"
++#else
+ #include <byteswap.h>
++#endif
+ #include <crc32.h>
+ #include <inttypes.h>
+
diff --git a/package/mtd-utils/patches/patch-rbtree_h b/package/mtd-utils/patches/patch-rbtree_h
new file mode 100644
index 000000000..b7d34b937
--- /dev/null
+++ b/package/mtd-utils/patches/patch-rbtree_h
@@ -0,0 +1,12 @@
+--- mtd-utils-1.5.0.orig/rbtree.h 2012-05-07 09:19:39.000000000 +0200
++++ mtd-utils-1.5.0/rbtree.h 2014-03-30 15:49:26.000000000 +0200
+@@ -94,8 +94,7 @@ static inline struct page * rb_insert_pa
+ #ifndef _LINUX_RBTREE_H
+ #define _LINUX_RBTREE_H
+
+-#include <linux/kernel.h>
+-#include <linux/stddef.h>
++#include <stddef.h>
+
+ struct rb_node
+ {
diff --git a/package/pcre/Makefile b/package/pcre/Makefile
index 211f8f375..174315a81 100644
--- a/package/pcre/Makefile
+++ b/package/pcre/Makefile
@@ -22,11 +22,14 @@ ifeq ($(ADK_STATIC),y)
PKG_OPTS+= libmix
endif
+include ${TOPDIR}/mk/host.mk
include ${TOPDIR}/mk/package.mk
+$(eval $(call HOST_template,PCRE,pcre,${PKG_VERSION}-${PKG_RELEASE}))
$(eval $(call PKG_template,LIBPCRE,libpcre,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
$(eval $(call PKG_template,LIBPCRECPP,libpcrecpp,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIBPCRECPP},${PKG_SECTION}))
+HOST_STYLE:= auto
CONFIGURE_ARGS+= --enable-utf
XAKE_FLAGS+= ${TARGET_CONFIGURE_OPTS}
@@ -38,4 +41,5 @@ libpcrecpp-install:
${INSTALL_DIR} ${IDIR_LIBPCRECPP}/usr/lib
${CP} ${WRKINST}/usr/lib/libpcrecpp.so* ${IDIR_LIBPCRECPP}/usr/lib
+include ${TOPDIR}/mk/host-bottom.mk
include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/squashfs/Makefile b/package/squashfs/Makefile
new file mode 100644
index 000000000..575849acd
--- /dev/null
+++ b/package/squashfs/Makefile
@@ -0,0 +1,37 @@
+# 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:= squashfs
+PKG_VERSION:= 4.2
+PKG_RELEASE:= 1
+PKG_MD5SUM:= 1b7a781fb4cf8938842279bd3e8ee852
+PKG_DESCR:= squashfs filesystem utilities
+PKG_SECTION:= fs
+PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=squashfs/}
+
+DISTFILES:= ${PKG_NAME}${PKG_VERSION}.tar.gz
+WRKDIST= ${WRKDIR}/$(PKG_NAME)${PKG_VERSION}
+
+PKG_CFLINE_SQUASHFS:= depends on ADK_HOST_ONLY
+
+include $(TOPDIR)/mk/host.mk
+include $(TOPDIR)/mk/package.mk
+
+$(eval $(call HOST_template,SQUASHFS,squashfs,$(PKG_VERSION)-${PKG_RELEASE}))
+
+HOST_STYLE:= manual
+HOST_MAKE_FLAGS+= XATTR_SUPPORT=0 XZ_SUPPORT=1 EXTRA_LDFLAGS=$(LDFLAGS_FOR_BUILD)
+
+host-build:
+ (cd ${WRKBUILD}/squashfs-tools && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
+ ${HOST_MAKE_FLAGS} ${HOST_ALL_TARGET})
+
+squashfs-hostinstall:
+ ${INSTALL_DIR} ${STAGING_HOST_DIR}/usr/bin
+ ${INSTALL_BIN} ${WRKBUILD}/squashfs-tools/mksquashfs \
+ ${STAGING_HOST_DIR}/usr/bin
+
+include ${TOPDIR}/mk/host-bottom.mk
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/tools/squashfs/patches/cppflags.patch b/package/squashfs/patches/patch-squashfs-tools_Makefile
index 1432ea3cf..cc764141f 100644
--- a/tools/squashfs/patches/cppflags.patch
+++ b/package/squashfs/patches/patch-squashfs-tools_Makefile
@@ -1,7 +1,6 @@
-diff -Nur squashfs4.2.orig/squashfs-tools/Makefile squashfs4.2/squashfs-tools/Makefile
--- squashfs4.2.orig/squashfs-tools/Makefile 2011-02-28 21:04:15.000000000 +0100
-+++ squashfs4.2/squashfs-tools/Makefile 2013-12-27 13:49:22.000000000 +0100
-@@ -93,7 +93,7 @@
++++ squashfs4.2/squashfs-tools/Makefile 2014-03-29 15:02:11.000000000 +0100
+@@ -93,7 +93,7 @@ XATTR_DEFAULT = 1
# End of BUILD options section #
###############################################
diff --git a/package/squashfs/patches/patch-squashfs-tools_mksquashfs_c b/package/squashfs/patches/patch-squashfs-tools_mksquashfs_c
new file mode 100644
index 000000000..877894c6c
--- /dev/null
+++ b/package/squashfs/patches/patch-squashfs-tools_mksquashfs_c
@@ -0,0 +1,47 @@
+--- squashfs4.2.orig/squashfs-tools/mksquashfs.c 2011-02-28 23:24:09.000000000 +0100
++++ squashfs4.2/squashfs-tools/mksquashfs.c 2014-03-29 15:02:16.000000000 +0100
+@@ -60,6 +60,10 @@
+ #include <sys/sysinfo.h>
+ #endif
+
++#ifndef FNM_EXTMATCH
++#define FNM_EXTMATCH 0
++#endif
++
+ #ifdef SQUASHFS_TRACE
+ #define TRACE(s, args...) \
+ do { \
+@@ -721,13 +725,13 @@ void cache_block_put(struct file_buffer
+ + (((char *)A) - data_cache)))
+
+
+-inline void inc_progress_bar()
++static inline void inc_progress_bar()
+ {
+ cur_uncompressed ++;
+ }
+
+
+-inline void update_progress_bar()
++static inline void update_progress_bar()
+ {
+ pthread_mutex_lock(&progress_mutex);
+ pthread_cond_signal(&progress_wait);
+@@ -735,7 +739,7 @@ inline void update_progress_bar()
+ }
+
+
+-inline void waitforthread(int i)
++static inline void waitforthread(int i)
+ {
+ TRACE("Waiting for thread %d\n", i);
+ while(thread[i] != 0)
+@@ -3340,7 +3344,7 @@ struct inode_info *lookup_inode(struct s
+ }
+
+
+-inline void add_dir_entry(char *name, char *pathname, struct dir_info *sub_dir,
++static inline void add_dir_entry(char *name, char *pathname, struct dir_info *sub_dir,
+ struct inode_info *inode_info, struct dir_info *dir)
+ {
+ if((dir->count % DIR_ENTRIES) == 0) {
diff --git a/package/squashfs/patches/patch-squashfs-tools_unsquashfs_c b/package/squashfs/patches/patch-squashfs-tools_unsquashfs_c
new file mode 100644
index 000000000..d57b184de
--- /dev/null
+++ b/package/squashfs/patches/patch-squashfs-tools_unsquashfs_c
@@ -0,0 +1,39 @@
+--- squashfs4.2.orig/squashfs-tools/unsquashfs.c 2011-02-28 23:27:06.000000000 +0100
++++ squashfs4.2/squashfs-tools/unsquashfs.c 2014-03-29 15:02:16.000000000 +0100
+@@ -29,7 +29,13 @@
+ #include "compressor.h"
+ #include "xattr.h"
+
++#ifndef FNM_EXTMATCH
++#define FNM_EXTMATCH 0
++#endif
++
++#ifdef __linux__
+ #include <sys/sysinfo.h>
++#endif
+ #include <sys/types.h>
+
+ struct cache *fragment_cache, *data_cache;
+@@ -1810,7 +1816,7 @@ void initialise_threads(int fragment_buf
+ "\n");
+
+ if(processors == -1) {
+-#ifndef linux
++#if 0
+ int mib[2];
+ size_t len = sizeof(processors);
+
+@@ -1821,11 +1827,13 @@ void initialise_threads(int fragment_buf
+ mib[1] = HW_NCPU;
+ #endif
+
++#ifdef __linux__
+ if(sysctl(mib, 2, &processors, &len, NULL, 0) == -1) {
+ ERROR("Failed to get number of available processors. "
+ "Defaulting to 1\n");
+ processors = 1;
+ }
++#endif
+ #else
+ processors = sysconf(_SC_NPROCESSORS_ONLN);
+ #endif
diff --git a/package/syslinux/Makefile b/package/syslinux/Makefile
index b84c0b9ad..00168274b 100644
--- a/package/syslinux/Makefile
+++ b/package/syslinux/Makefile
@@ -4,29 +4,36 @@
include $(TOPDIR)/rules.mk
PKG_NAME:= syslinux
-PKG_VERSION:= 4.03
+PKG_VERSION:= 6.02
PKG_RELEASE:= 1
-PKG_MD5SUM:= 086ac1c569d226a5e2ae3d605de09a1d
+PKG_MD5SUM:= 1df6ff6e4a82b9d7d71a9e7cb5851a5f
PKG_DESCR:= lightweight bootloaders
-PKG_SECTION:= misc
-PKG_BUILDDEP:= nasm
+PKG_SECTION:= boot
+HOST_BUILDDEP:= nasm-host
PKG_URL:= http://syslinux.zytor.com/wiki/index.php/The_Syslinux_Project
PKG_SITES:= http://www.kernel.org/pub/linux/utils/boot/syslinux/
-PKG_ARCH_DEPENDS:= native
-PKG_HOST_DEPENDS:= !darwin !netbsd !openbsd !cygwin !freebsd
+PKG_CFLINE_SYSLINUX:= depends on ADK_HOST_ONLY
+include $(TOPDIR)/mk/host.mk
include $(TOPDIR)/mk/package.mk
-$(eval $(call PKG_template,SYSLINUX,syslinux,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+$(eval $(call HOST_template,SYSLINUX,syslinux,$(PKG_VERSION)-${PKG_RELEASE}))
-CONFIG_STYLE:= manual
-FAKE_FLAGS+= INSTALLROOT=${WRKINST}
-TARGET_CFLAGS+= -std=c99
+HOST_STYLE:= manual
+HOST_ALL_TARGET:= bios installer
-syslinux-install:
- $(INSTALL_DIR) $(IDIR_SYSLINUX)/usr/bin
- $(INSTALL_BIN) $(WRKINST)/usr/bin/syslinux \
- $(IDIR_SYSLINUX)/usr/bin
+host-build:
+ (cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
+ ${HOST_MAKE_FLAGS} ${HOST_ALL_TARGET})
+syslinux-hostinstall:
+ $(INSTALL_DIR) $(STAGING_HOST_DIR)/usr/bin
+ $(INSTALL_DIR) $(STAGING_HOST_DIR)/usr/share/syslinux
+ $(CP) $(WRKBUILD)/bios/core/isolinux.bin \
+ $(STAGING_HOST_DIR)/usr/share/syslinux
+ $(CP) $(WRKBUILD)/bios/com32/elflink/ldlinux/ldlinux.c32 \
+ $(STAGING_HOST_DIR)/usr/share/syslinux
+
+include ${TOPDIR}/mk/host-bottom.mk
include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/xz/Makefile b/package/xz/Makefile
index 1793f8eaf..ac68ff653 100644
--- a/package/xz/Makefile
+++ b/package/xz/Makefile
@@ -13,13 +13,18 @@ PKG_URL:= http://tukaani.org/xz/
PKG_SITES:= http://tukaani.org/xz/
PKG_OPTS:= dev
+include ${TOPDIR}/mk/host.mk
include ${TOPDIR}/mk/package.mk
+$(eval $(call HOST_template,XZ,xz,${PKG_VERSION}-${PKG_RELEASE}))
$(eval $(call PKG_template,XZ,xz,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
+HOST_STYLE:= auto
+
xz-install:
${INSTALL_DIR} ${IDIR_XZ}/usr/bin ${IDIR_XZ}/usr/lib
${CP} ${WRKINST}/usr/bin/* ${IDIR_XZ}/usr/bin
${CP} ${WRKINST}/usr/lib/*.so* ${IDIR_XZ}/usr/lib
+include ${TOPDIR}/mk/host-bottom.mk
include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/scripts/adkprepare.sh b/scripts/adkprepare.sh
index 08d1ee1a1..5b18d30e3 100755
--- a/scripts/adkprepare.sh
+++ b/scripts/adkprepare.sh
@@ -21,36 +21,28 @@ openbsd() {
PKG_PATH="ftp://ftp.openbsd.org/pub/OpenBSD/${ver}/packages/${arch}/"
export PKG_PATH
pkg_add -v gmake
- pkg_add -v git
pkg_add -v bash
pkg_add -v wget
pkg_add -v gtar--
pkg_add -v gawk
pkg_add -v gsed
- pkg_add -v screen--
- pkg_add -v vim--no_x11
- pkg_add -v py-libxml
}
netbsd() {
echo "Preparing NetBSD for OpenADK"
PKG_PATH="ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/${arch}/${ver}/All/"
export PKG_PATH
- pkg_add -vu scmgit
pkg_add -vu gmake
pkg_add -vu bash
pkg_add -vu wget
pkg_add -vu gtar
pkg_add -vu gsed
pkg_add -vu gawk
- pkg_add -vu vim
- pkg_add -vu screen
- pkg_add -vu mksh
}
freebsd() {
echo "Preparing FreeBSD for OpenADK"
- pkg_add -r git gmake bash wget gtar gsed gawk screen mksh vim
+ pkg_add -r gmake bash wget gtar gsed gawk
}
case $os in
diff --git a/scripts/scan-tools.sh b/scripts/scan-tools.sh
index c16aff609..c9b8029d5 100644
--- a/scripts/scan-tools.sh
+++ b/scripts/scan-tools.sh
@@ -196,18 +196,114 @@ if ! which perl >/dev/null 2>&1; then
out=1
fi
-if ! which xargs >/dev/null 2>&1; then
- echo "You need xargs to continue."
- echo
- out=1
-fi
-
if ! which g++ >/dev/null 2>&1; then
echo "You need g++ (GNU C++ compiler) to continue."
echo
out=1
fi
+# always required, but can be provided by host
+host_build_bc=0
+if ! which bc >/dev/null 2>&1; then
+ echo "No bc found, will build one."
+ host_build_bc=1
+fi
+
+host_build_bison=0
+if ! which bison >/dev/null 2>&1; then
+ echo "No bison found, will build one."
+ host_build_bison=1
+fi
+
+host_build_bzip2=0
+if ! which bzip2 >/dev/null 2>&1; then
+ echo "No bzip2 found, will build one."
+ host_build_bzip2=1
+fi
+
+host_build_file=0
+if ! which file >/dev/null 2>&1; then
+ echo "No file found, will build one."
+ host_build_file=1
+fi
+
+host_build_flex=0
+if ! which flex >/dev/null 2>&1; then
+ echo "No flex found, will build one."
+ host_build_m4=1
+fi
+
+host_build_m4=0
+if ! which m4 >/dev/null 2>&1; then
+ echo "No m4 found, will build one."
+ host_build_m4=1
+fi
+
+host_build_pkgconf=0
+if ! which pkgconf >/dev/null 2>&1; then
+ echo "No pkgconf found, will build one."
+ host_build_pkgconf=1
+fi
+
+host_build_findutils=0
+if ! which gxargs >/dev/null 2>&1; then
+ if ! which xargs >/dev/null 2>&1; then
+ echo "No xargs found, will build one."
+ host_build_findutils=1
+ fi
+fi
+
+if ! which gfind >/dev/null 2>&1; then
+ if ! which find >/dev/null 2>&1; then
+ echo "No find found, will build one."
+ host_build_findutils=1
+ fi
+fi
+
+host_build_xz=0
+if ! which xz >/dev/null 2>&1; then
+ echo "No xz found, will build one."
+ host_build_xz=1
+fi
+
+# optional
+host_build_ccache=0
+if ! which ccache >/dev/null 2>&1; then
+ echo "No ccache found, will build one when required."
+ host_build_ccache=1
+fi
+
+host_build_lzma=0
+if ! which lzma >/dev/null 2>&1; then
+ echo "No lzma found, will build one when required."
+ host_build_lzma=1
+fi
+
+host_build_lzop=0
+if ! which lzop >/dev/null 2>&1; then
+ echo "No lzop found, will build one when required."
+ host_build_lzop=1
+fi
+
+
+echo "config ADK_HOST_BUILD_TOOLS" > $topdir/target/config/Config.in.prereq
+printf "\t%s\n" "boolean" >> $topdir/target/config/Config.in.prereq
+printf "\t%s\n" "default y" >> $topdir/target/config/Config.in.prereq
+# always required
+if [ $host_build_bc -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_BC" >> $topdir/target/config/Config.in.prereq ;fi
+if [ $host_build_bison -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_BISON" >> $topdir/target/config/Config.in.prereq ;fi
+if [ $host_build_bzip2 -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_BZIP2" >> $topdir/target/config/Config.in.prereq ;fi
+if [ $host_build_file -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_FILE" >> $topdir/target/config/Config.in.prereq ;fi
+if [ $host_build_flex -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_FLEX" >> $topdir/target/config/Config.in.prereq ;fi
+if [ $host_build_m4 -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_M4" >> $topdir/target/config/Config.in.prereq ;fi
+if [ $host_build_pkgconf -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_PKGCONF" >> $topdir/target/config/Config.in.prereq ;fi
+if [ $host_build_findutils -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_FINDUTILS" >> $topdir/target/config/Config.in.prereq ;fi
+if [ $host_build_xz -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_XZ" >> $topdir/target/config/Config.in.prereq ;fi
+# optional
+if [ $host_build_ccache -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_CCACHE if ADK_HOST_NEED_CCACHE" >> $topdir/target/config/Config.in.prereq ;fi
+if [ $host_build_lzma -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_LZMA if ADK_HOST_NEED_LZMA" >> $topdir/target/config/Config.in.prereq ;fi
+if [ $host_build_lzop -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_LZOP if ADK_HOST_NEED_LZOP" >> $topdir/target/config/Config.in.prereq ;fi
+
cd $topdir
rm -rf tmp
diff --git a/target/config/Config.in b/target/config/Config.in
index 5c1874264..498c5d9e4 100644
--- a/target/config/Config.in
+++ b/target/config/Config.in
@@ -787,7 +787,7 @@ config ADK_TARGET_ROOTFS_SQUASHFS
config ADK_TARGET_ROOTFS_JFFS2
bool "Compressed read-write root filesystem (jffs2)"
select ADK_KERNEL_JFFS2_FS
- select ADK_HOST_NEED_JFFS2
+ select ADK_HOST_NEED_MTD_UTILS
select ADK_TARGET_QEMU_WITH_BLOCK if ADK_HARDWARE_QEMU
depends on ADK_TARGET_WITH_MTD
help
@@ -868,8 +868,9 @@ config ADK_TARGET_ROOTFS_ISO
select ADK_KERNEL_JOLIET
select ADK_KERNEL_SCSI
select ADK_KERNEL_BLK_DEV_SR
- select ADK_HOST_NEED_MKISOFS
+ select ADK_HOST_NEED_CDRTOOLS
select ADK_HOST_NEED_SYSLINUX
+ select ADK_TARGET_QEMU_WITH_BLOCK if ADK_HARDWARE_QEMU
depends on ADK_HOST_LINUX
depends on ADK_LINUX_X86
help
diff --git a/target/config/Config.in.runtime b/target/config/Config.in.runtime
index a6f504a49..776a1a6f9 100644
--- a/target/config/Config.in.runtime
+++ b/target/config/Config.in.runtime
@@ -38,8 +38,8 @@ config ADK_RUNTIME_TIMEZONE
choice
prompt "Start getty or shell after bootup"
-default ADK_RUNTIME_GETTY
default ADK_RUNTIME_SHELL if ADK_PKG_TEST
+default ADK_RUNTIME_GETTY
config ADK_RUNTIME_GETTY
boolean "start a getty after bootup"
diff --git a/target/config/Config.in.tools b/target/config/Config.in.tools
index b232a3674..92bbae9d6 100644
--- a/target/config/Config.in.tools
+++ b/target/config/Config.in.tools
@@ -1,16 +1,67 @@
-config ADK_HOST_NEED_MKISOFS
+# always required from OpenADK
+config ADK_HOST_BUILD_HEIRLOOM_CPIO
+ boolean
+ default y
+
+config ADK_HOST_BUILD_MKCRYPT
+ boolean
+ default y
+
+# always required, but can be provided by host
+config ADK_HOST_BUILD_BASH
boolean
default n
-config ADK_HOST_NEED_SYSLINUX
+config ADK_HOST_BUILD_BC
+ boolean
+ default n
+
+config ADK_HOST_BUILD_BISON
+ boolean
+ default n
+
+config ADK_HOST_BUILD_BZIP2
+ boolean
+ default n
+
+config ADK_HOST_BUILD_FILE
+ boolean
+ default n
+
+config ADK_HOST_BUILD_FINDUTILS
+ boolean
+ default n
+
+config ADK_HOST_BUILD_FLEX
+ boolean
+ default n
+
+config ADK_HOST_BUILD_M4
boolean
default n
-config ADK_HOST_NEED_SQUASHFS
+config ADK_HOST_BUILD_PKGCONF
+ boolean
+ default n
+
+config ADK_HOST_BUILD_XZ
+ boolean
+ default n
+
+# optional, but can be provided by host
+config ADK_HOST_NEED_CCACHE
boolean
default n
-config ADK_HOST_NEED_JFFS2
+config ADK_HOST_BUILD_CCACHE
+ boolean
+ default n
+
+config ADK_HOST_NEED_CDRTOOLS
+ boolean
+ default n
+
+config ADK_HOST_BUILD_CDRTOOLS
boolean
default n
@@ -18,7 +69,7 @@ config ADK_HOST_NEED_GENEXT2FS
boolean
default n
-config ADK_HOST_NEED_LZOP
+config ADK_HOST_BUILD_GENEXT2FS
boolean
default n
@@ -26,23 +77,50 @@ config ADK_HOST_NEED_LZMA
boolean
default n
-config ADK_HOST_NEED_BZIP2
+config ADK_HOST_BUILD_LZMA
boolean
default n
-config ADK_HOST_NEED_XZ
+config ADK_HOST_NEED_LZOP
boolean
default n
-config ADK_HOST_NEED_CCACHE
+config ADK_HOST_BUILD_LZOP
boolean
default n
-config ADK_HOST_NEED_MKIMAGE
+config ADK_HOST_NEED_MKSH
boolean
default n
-config ADK_HOST_NEED_PCRE
+config ADK_HOST_BUILD_MKSH
+ boolean
+ default n
+
+config ADK_HOST_NEED_SYSLINUX
+ boolean
+ default n
+
+config ADK_HOST_BUILD_SYSLINUX
+ boolean
+ default n
+
+# optional, must be used from OpenADK
+config ADK_HOST_BUILD_MTD_UTILS
+ boolean
+ default n
+
+config ADK_HOST_BUILD_SQUASHFS
+ boolean
+ default n
+
+config ADK_HOST_BUILD_MKIMAGE
+ boolean
+ default n
+
+config ADK_HOST_BUILD_PCRE
boolean
default y if ADK_HOST_DARWIN
default n
+
+source "target/config/Config.in.prereq"
diff --git a/target/microblaze/sys-available/qemu-microblaze b/target/microblaze/sys-available/qemu-microblaze
index a5bdb65e8..ee9cb6a52 100644
--- a/target/microblaze/sys-available/qemu-microblaze
+++ b/target/microblaze/sys-available/qemu-microblaze
@@ -6,7 +6,6 @@ config ADK_TARGET_SYSTEM_QEMU_MICROBLAZE
select ADK_HARDWARE_QEMU
select ADK_TARGET_WITH_MTD
select ADK_TARGET_KERNEL_LINUXBIN
- select ADK_HOST_NEED_MKIMAGE
help
Qemu support for microblaze big endian architecture.
diff --git a/target/microblaze/sys-available/qemu-microblazeel b/target/microblaze/sys-available/qemu-microblazeel
index 4d752a942..8dff0e260 100644
--- a/target/microblaze/sys-available/qemu-microblazeel
+++ b/target/microblaze/sys-available/qemu-microblazeel
@@ -6,7 +6,6 @@ config ADK_TARGET_SYSTEM_QEMU_MICROBLAZEEL
select ADK_HARDWARE_QEMU
select ADK_TARGET_WITH_MTD
select ADK_TARGET_KERNEL_LINUXBIN
- select ADK_HOST_NEED_MKIMAGE
help
Qemu support for microblaze little endian architecture.
diff --git a/toolchain/binutils/Makefile.inc b/toolchain/binutils/Makefile.inc
index 16cfc47df..a7a2c3980 100644
--- a/toolchain/binutils/Makefile.inc
+++ b/toolchain/binutils/Makefile.inc
@@ -3,7 +3,6 @@
PKG_NAME:= binutils
PKG_VERSION:= 2.24
-PKG_MD5SUM:= e0f71a7b2ddab0f8612336ac81d9636b
+PKG_MD5SUM:= a5dd5dd2d212a282cc1d4a84633e0d88
PKG_RELEASE:= 1
PKG_SITES:= ${MASTER_SITE_GNU:=binutils/}
-DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tar.bz2
diff --git a/toolchain/gcc/Makefile.inc b/toolchain/gcc/Makefile.inc
index 25e51178a..21720e4aa 100644
--- a/toolchain/gcc/Makefile.inc
+++ b/toolchain/gcc/Makefile.inc
@@ -7,8 +7,7 @@ PKG_VERSION:= 4.7.3
PKG_MD5SUM:= 86f428a30379bdee0224e353ee2f999e
else
PKG_VERSION:= 4.8.2
-PKG_MD5SUM:= a3d7d63b9cb6b6ea049469a0c4a43c9d
+PKG_MD5SUM:= deca88241c1135e2ff9fa5486ab5957b
endif
PKG_RELEASE:= 1
PKG_SITES:= ${MASTER_SITE_GNU:=gcc/gcc-${PKG_VERSION}/}
-DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tar.bz2
diff --git a/toolchain/gdb/Makefile.inc b/toolchain/gdb/Makefile.inc
index 23912e1e6..c3807f8fe 100644
--- a/toolchain/gdb/Makefile.inc
+++ b/toolchain/gdb/Makefile.inc
@@ -3,7 +3,6 @@
PKG_NAME:= gdb
PKG_VERSION:= 7.7
-PKG_MD5SUM:= 271a18f41858a7e98b28ae4eb91287c9
+PKG_MD5SUM:= 40051ff95b39bd57b14b1809e2c16152
PKG_RELEASE:= 1
PKG_SITES:= ${MASTER_SITE_GNU:=gdb/}
-DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tar.bz2
diff --git a/toolchain/uClibc/Makefile.inc b/toolchain/uClibc/Makefile.inc
index 60e87966c..eff931e2b 100644
--- a/toolchain/uClibc/Makefile.inc
+++ b/toolchain/uClibc/Makefile.inc
@@ -5,6 +5,6 @@ PKG_NAME:= uClibc
PKG_VERSION:= 0.9.33.2
GIT_VERSION:= 0.9.34-git
PKG_RELEASE:= 1
-PKG_MD5SUM:= a338aaffc56f0f5040e6d9fa8a12eda1
+PKG_MD5SUM:= 73e6fe215648d02246f4d195b25fb17e
PKG_SITES:= http://uclibc.org/downloads/
-DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tar.bz2
+DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tar.xz
diff --git a/tools/Makefile b/tools/Makefile
deleted file mode 100644
index bfed325e0..000000000
--- a/tools/Makefile
+++ /dev/null
@@ -1,57 +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
-
-TARGETS:=adk mksh mkcrypt cpio m4 flex bc bzip2 xz
-
-ifeq ($(ADK_HOST_NEED_GENEXT2FS),y)
-TARGETS+=genext2fs
-endif
-ifeq ($(ADK_HOST_NEED_MKIMAGE),y)
-TARGETS+=mkimage
-endif
-ifeq ($(ADK_HOST_NEED_MKISOFS),y)
-TARGETS+=cdrtools
-endif
-ifeq ($(ADK_HOST_NEED_SYSLINUX),y)
-TARGETS+=syslinux
-endif
-ifeq ($(ADK_HOST_NEED_JFFS2),y)
-TARGETS+=mtd-utils
-endif
-ifeq ($(ADK_HOST_NEED_SQUASHFS),y)
-TARGETS+=squashfs
-endif
-ifeq ($(ADK_HOST_NEED_LZOP),y)
-TARGETS+=lzo lzop
-endif
-ifeq ($(ADK_HOST_NEED_LZMA),y)
-TARGETS+=lzma
-endif
-ifeq ($(ADK_HOST_NEED_CCACHE),y)
-TARGETS+=ccache
-endif
-ifeq ($(ADK_HOST_NEED_PCRE),y)
-TARGETS+=pcre
-endif
-
-TARGETS_INSTALL:=$(patsubst %,%-install,$(TARGETS))
-TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS))
-
-all: install
-compile:
-install: $(TARGETS_INSTALL)
-clean: $(TARGETS_CLEAN)
-
-%-compile: $(TOOLS_BUILD_DIR)
- $(TRACE) "tools/$(patsubst %-compile,%,$@)/compile "
- $(MAKE) -C $(patsubst %-compile,%,$@) compile $(MAKE_TRACE)
-
-%-install:
- $(TRACE) "tools/$(patsubst %-install,%,$@)/install "
- $(MAKE) -C $(patsubst %-install,%,$@) install $(MAKE_TRACE)
-
-%-clean:
- $(TRACE) "tools/$(patsubst %-clean,%,$@)/clean "
- $(MAKE) -C $(patsubst %-clean,%,$@) clean
diff --git a/tools/addpattern/Makefile b/tools/addpattern/Makefile
deleted file mode 100644
index 10ba05933..000000000
--- a/tools/addpattern/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-include $(TOPDIR)/rules.mk
-
-all: addpattern.c
- $(CC_FOR_BUILD) $(FLAGS_FOR_BUILD) -o ${STAGING_HOST_DIR}/usr/bin/addpattern addpattern.c
diff --git a/tools/addpattern/addpattern.c b/tools/addpattern/addpattern.c
deleted file mode 100644
index 8133bf26e..000000000
--- a/tools/addpattern/addpattern.c
+++ /dev/null
@@ -1,252 +0,0 @@
-/*
- * Copyright (C) 2004 Manuel Novoa III <mjn3@codepoet.org>
- *
- * 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 'addpattern' utility used to
- * create wrt54g .bin firmware files. It isn't pretty, but it does
- * the job for me.
- *
- * Extensions:
- * -v allows setting the version string on the command line.
- * -{0|1} sets the (currently ignored) hw_ver flag in the header
- * to 0 or 1 respectively.
- */
-
-/* January 12, 2005
- *
- * Modified by rodent at rodent dot za dot net
- * Support added for the new WRT54G v2.2 and WRT54GS v1.1 "flags"
- * Without the flags set to 0x7, the above units will refuse to flash.
- *
- * Extensions:
- * -{0|1|2} sets {0|1} sets hw_ver flag to 0/1. {2} sets hw_ver to 1
- * and adds the new hardware "flags" for the v2.2/v1.1 units
-*/
-
-/* January 1, 2007
- *
- * Modified by juan.i.gonzalez at subdown dot net
- * Support added for the AG241v2 and similar
- *
- * Extensions:
- * -r #.# adds revision hardware flags. AG241v2 and similar.
- *
- * AG241V2 firmware sets the hw_ver to 0x44.
- *
- * Example: -r 2.0
- *
- * Convert 2.0 to 20 to be an integer, and add 0x30 to skip special ASCII
- * #define HW_Version ((HW_REV * 10) + 0x30) -> from cyutils.h
-*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-#include <unistd.h>
-#include <sys/stat.h>
-
-/**********************************************************************/
-
-#define CODE_ID "U2ND" /* from code_pattern.h */
-#define CODE_PATTERN "W54S" /* from code_pattern.h */
-#define PBOT_PATTERN "PBOT"
-
-#define CYBERTAN_VERSION "v3.37.2" /* from cyutils.h */
-
-/* WRT54G v2.2 and WRT54GS v1.1 "flags" (from 3.37.32 firmware cyutils.h) */
-#define SUPPORT_4712_CHIP 0x0001
-#define SUPPORT_INTEL_FLASH 0x0002
-#define SUPPORT_5325E_SWITCH 0x0004
-
-struct code_header { /* from cyutils.h */
- char magic[4];
- char res1[4]; /* for extra magic */
- char fwdate[3];
- char fwvern[3];
- char id[4]; /* U2ND */
- char hw_ver; /* 0: for 4702, 1: for 4712 -- new in 2.04.3 */
- char unused;
- unsigned char flags[2]; /* SUPPORT_ flags new for 3.37.2 (WRT54G v2.2 and WRT54GS v1.1) */
- unsigned char res2[10];
-} ;
-
-/**********************************************************************/
-
-void usage(void) __attribute__ (( __noreturn__ ));
-
-void usage(void)
-{
- fprintf(stderr, "Usage: addpattern [-i trxfile] [-o binfile] [-p pattern] [-g] [-b] [-v v#.#.#] [-r #.#] [-{0|1|2|4}] -h\n");
- exit(EXIT_FAILURE);
-}
-
-int main(int argc, char **argv)
-{
- char buf[1024]; /* keep this at 1k or adjust garbage calc below */
- struct code_header *hdr;
- FILE *in = stdin;
- FILE *out = stdout;
- char *ifn = NULL;
- char *ofn = NULL;
- char *pattern = CODE_PATTERN;
- char *pbotpat = PBOT_PATTERN;
- char *version = CYBERTAN_VERSION;
- int gflag = 0;
- int pbotflag = 0;
- int c;
- int v0, v1, v2;
- size_t off, n;
- time_t t;
- struct tm *ptm;
-
- hdr = (struct code_header *) buf;
- memset(hdr, 0, sizeof(struct code_header));
-
- while ((c = getopt(argc, argv, "i:o:p:gbv:0124hr:")) != -1) {
- switch (c) {
- case 'i':
- ifn = optarg;
- break;
- case 'o':
- ofn = optarg;
- break;
- case 'p':
- pattern = optarg;
- break;
- case 'g':
- gflag = 1;
- break;
- case 'b':
- pbotflag = 1;
- break;
- case 'v': /* extension to allow setting version */
- version = optarg;
- break;
- case '0':
- hdr->hw_ver = 0;
- break;
- case '1':
- hdr->hw_ver = 1;
- break;
- case '2': /* new 54G v2.2 and 54GS v1.1 flags */
- hdr->hw_ver = 1;
- hdr->flags[0] |= SUPPORT_4712_CHIP;
- hdr->flags[0] |= SUPPORT_INTEL_FLASH;
- hdr->flags[0] |= SUPPORT_5325E_SWITCH;
- break;
- case '4':
- /* V4 firmware sets the flags to 0x1f */
- hdr->hw_ver = 0;
- hdr->flags[0] = 0x1f;
- break;
- case 'r':
- hdr->hw_ver = (char)(atof(optarg)*10)+0x30;
- break;
-
- case 'h':
- default:
- usage();
- }
- }
-
- if (optind != argc || optind == 1) {
- fprintf(stderr, "illegal arg \"%s\"\n", argv[optind]);
- usage();
- }
-
- if (strlen(pattern) != 4) {
- fprintf(stderr, "illegal pattern \"%s\": length != 4\n", pattern);
- usage();
- }
-
- if (ifn && !(in = fopen(ifn, "r"))) {
- fprintf(stderr, "can not open \"%s\" for reading\n", ifn);
- usage();
- }
-
- if (ofn && !(out = fopen(ofn, "w"))) {
- fprintf(stderr, "can not open \"%s\" for writing\n", ofn);
- usage();
- }
-
- if (time(&t) == (time_t)(-1)) {
- fprintf(stderr, "time call failed\n");
- return EXIT_FAILURE;
- }
-
- ptm = localtime(&t);
-
- if (3 != sscanf(version, "v%d.%d.%d", &v0, &v1, &v2)) {
- fprintf(stderr, "bad version string \"%s\"\n", version);
- return EXIT_FAILURE;
- }
-
- memcpy(&hdr->magic, pattern, 4);
- if (pbotflag)
- memcpy(&hdr->res1, pbotpat, 4);
- hdr->fwdate[0] = ptm->tm_year % 100;
- hdr->fwdate[1] = ptm->tm_mon + 1;
- hdr->fwdate[2] = ptm->tm_mday;
- hdr->fwvern[0] = v0;
- hdr->fwvern[1] = v1;
- hdr->fwvern[2] = v2;
- memcpy(&hdr->id, CODE_ID, strlen(CODE_ID));
-
- off = sizeof(struct code_header);
-
- fprintf(stderr, "writing firmware v%d.%d.%d on %d/%d/%d (y/m/d)\n",
- v0, v1, v2,
- hdr->fwdate[0], hdr->fwdate[1], hdr->fwdate[2]);
-
-
- while ((n = fread(buf + off, 1, sizeof(buf)-off, in) + off) > 0) {
- off = 0;
- if (n < sizeof(buf)) {
- if (ferror(in)) {
- FREAD_ERROR:
- fprintf(stderr, "fread error\n");
- return EXIT_FAILURE;
- }
- if (gflag) {
- gflag = sizeof(buf) - n;
- memset(buf + n, 0xff, gflag);
- n = sizeof(buf);
- }
- }
- if (!fwrite(buf, n, 1, out)) {
- FWRITE_ERROR:
- fprintf(stderr, "fwrite error\n");
- return EXIT_FAILURE;
- }
- }
-
- if (ferror(in)) {
- goto FREAD_ERROR;
- }
-
- if (fflush(out)) {
- goto FWRITE_ERROR;
- }
-
- fclose(in);
- fclose(out);
-
- return EXIT_SUCCESS;
-}
diff --git a/tools/bc/Makefile b/tools/bc/Makefile
deleted file mode 100644
index 8b984e734..000000000
--- a/tools/bc/Makefile
+++ /dev/null
@@ -1,25 +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:= bc
-PKG_VERSION:= 1.06
-PKG_RELEASE:= 1
-PKG_MD5SUM:= d44b5dddebd8a7a7309aea6c36fda117
-PKG_SITES:= http://ftp.gnu.org/pub/gnu/bc/
-
-include ../rules.mk
-
-install: ${STAGING_HOST_DIR}/usr/bin/bc
-
-$(WRKBUILD)/.compiled: ${WRKDIST}/.prepared
- (cd ${WRKBUILD}; PATH="$(STAGING_HOST_DIR)/usr/bin:$$PATH" ./configure)
- ${MAKE} -C ${WRKBUILD} CC='${CC_FOR_BUILD}'
- touch $@
-
-${STAGING_HOST_DIR}/usr/bin/bc: $(WRKBUILD)/.compiled
- $(INSTALL_BIN) $(WRKBUILD)/bc/bc \
- ${STAGING_HOST_DIR}/usr/bin
-
-include $(TOPDIR)/mk/tools.mk
diff --git a/tools/bzip2/Makefile b/tools/bzip2/Makefile
deleted file mode 100644
index a739f8d5f..000000000
--- a/tools/bzip2/Makefile
+++ /dev/null
@@ -1,24 +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:= bzip2
-PKG_VERSION:= 1.0.6
-PKG_RELEASE:= 1
-PKG_MD5SUM:= 00b516f4704d4a7cb50a1d97e6e8e15b
-PKG_SITES:= http://www.bzip.org/${PKG_VERSION}/
-
-include ../rules.mk
-
-install: ${STAGING_HOST_DIR}/usr/bin/bzip2
-
-$(WRKBUILD)/.compiled: ${WRKDIST}/.prepared
- ${MAKE} -C ${WRKBUILD} CC='${CC_FOR_BUILD}' PREFIX=$(STAGING_HOST_DIR)/usr
- touch $@
-
-${STAGING_HOST_DIR}/usr/bin/bzip2: $(WRKBUILD)/.compiled
- $(INSTALL_BIN) $(WRKBUILD)/bzip2 \
- ${STAGING_HOST_DIR}/usr/bin
-
-include $(TOPDIR)/mk/tools.mk
diff --git a/tools/ccache/Makefile b/tools/ccache/Makefile
deleted file mode 100644
index fde838067..000000000
--- a/tools/ccache/Makefile
+++ /dev/null
@@ -1,25 +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:= ccache
-PKG_VERSION:= 3.1.9
-PKG_RELEASE:= 1
-PKG_MD5SUM:= a5e9954b1dae036762f7b13673a2cf76
-PKG_SITES:= http://samba.org/ftp/ccache/
-
-include ../rules.mk
-
-install: ${STAGING_HOST_DIR}/usr/bin/ccache
-
-$(WRKBUILD)/.compiled: ${WRKDIST}/.prepared
- (cd ${WRKBUILD}; ./configure --prefix=$(STAGING_HOST_DIR)/usr)
- ${MAKE} -C ${WRKBUILD} CC='${CC_FOR_BUILD}'
- touch $@
-
-${STAGING_HOST_DIR}/usr/bin/ccache: $(WRKBUILD)/.compiled
- $(INSTALL_BIN) $(WRKBUILD)/ccache \
- ${STAGING_HOST_DIR}/usr/bin
-
-include $(TOPDIR)/mk/tools.mk
diff --git a/tools/cdrtools/Makefile b/tools/cdrtools/Makefile
deleted file mode 100644
index 6522b5760..000000000
--- a/tools/cdrtools/Makefile
+++ /dev/null
@@ -1,25 +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:= cdrtools
-PKG_VERSION:= 3.00
-PKG_RELEASE:= 1
-PKG_MD5SUM:= bb21cefefcfbb76cf249120e8978ffdd
-PKG_SITES:= ftp://ftp.berlios.de/pub/cdrecord/
-
-include ../rules.mk
-
-install: ${STAGING_HOST_DIR}/usr/bin/mkisofs
-
-$(WRKBUILD)/.compiled: ${WRKDIST}/.prepared
- #(cd ${WRKBUILD}; ./configure)
- ${MAKE} -C ${WRKBUILD} CC='${CC_FOR_BUILD}'
- touch $@
-
-${STAGING_HOST_DIR}/usr/bin/mkisofs: $(WRKBUILD)/.compiled
- $(INSTALL_BIN) $(WRKBUILD)/mkisofs/OBJ/*/mkisofs \
- ${STAGING_HOST_DIR}/usr/bin
-
-include $(TOPDIR)/mk/tools.mk
diff --git a/tools/cpio/Makefile b/tools/cpio/Makefile
deleted file mode 100644
index ffccd1480..000000000
--- a/tools/cpio/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
-
-install: ${STAGING_HOST_DIR}/usr/bin/cpio
-
-SRCS:= src/ib_open.c \
- src/ib_close.c \
- src/ib_read.c \
- src/ib_alloc.c \
- src/ib_free.c \
- src/ib_getlin.c \
- src/sfile.c \
- src/gmatch.c \
- src/sigset.c \
- src/memalign.c \
- src/version.c \
- src/blast.c \
- src/crc32.c \
- src/expand.c \
- src/explode.c \
- src/flags.c \
- src/inflate.c \
- src/unshrink.c \
- src/nonpax.c \
- src/cpio.c
-
-${STAGING_HOST_DIR}/usr/bin/cpio: ${SRCS}
- ${CC_FOR_BUILD} ${FLAGS_FOR_BUILD} -D_GNU_SOURCE -Isrc -o $@ $^
-
-include $(TOPDIR)/mk/tools.mk
diff --git a/tools/flex/Makefile b/tools/flex/Makefile
deleted file mode 100644
index 235f785b4..000000000
--- a/tools/flex/Makefile
+++ /dev/null
@@ -1,25 +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:= flex
-PKG_VERSION:= 2.5.35
-PKG_RELEASE:= 1
-PKG_MD5SUM:= 201d3f38758d95436cbc64903386de0b
-PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=${PKG_NAME}/}
-
-include ../rules.mk
-
-install: ${STAGING_HOST_DIR}/usr/bin/flex
-
-$(WRKBUILD)/.compiled: ${WRKDIST}/.prepared
- (cd ${WRKBUILD}; PATH="$(STAGING_HOST_DIR)/usr/bin:$$PATH" ./configure)
- ${MAKE} -C ${WRKBUILD} CC='${CC_FOR_BUILD}'
- touch $@
-
-${STAGING_HOST_DIR}/usr/bin/flex: $(WRKBUILD)/.compiled
- $(INSTALL_BIN) $(WRKBUILD)/flex \
- ${STAGING_HOST_DIR}/usr/bin
-
-include $(TOPDIR)/mk/tools.mk
diff --git a/tools/genext2fs/Makefile b/tools/genext2fs/Makefile
deleted file mode 100644
index 07e24d028..000000000
--- a/tools/genext2fs/Makefile
+++ /dev/null
@@ -1,25 +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:= genext2fs
-PKG_VERSION:= 1.4.1
-PKG_RELEASE:= 1
-PKG_MD5SUM:= b7b6361bcce2cedff1ae437fadafe53b
-PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=genext2fs/}
-
-include ../rules.mk
-
-install: ${STAGING_HOST_DIR}/usr/bin/genext2fs
-
-$(WRKBUILD)/.compiled: ${WRKDIST}/.prepared
- (cd ${WRKBUILD}; ./configure)
- ${MAKE} -C ${WRKBUILD} CC='${CC_FOR_BUILD}'
- touch $@
-
-${STAGING_HOST_DIR}/usr/bin/genext2fs: $(WRKBUILD)/.compiled
- $(INSTALL_BIN) $(WRKBUILD)/genext2fs \
- ${STAGING_HOST_DIR}/usr/bin
-
-include $(TOPDIR)/mk/tools.mk
diff --git a/tools/lzma/Makefile b/tools/lzma/Makefile
deleted file mode 100644
index 3544aaca2..000000000
--- a/tools/lzma/Makefile
+++ /dev/null
@@ -1,25 +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:= lzma
-PKG_VERSION:= 4.32.7
-PKG_RELEASE:= 1
-PKG_MD5SUM:= 434e51a018b4c8ef377bf81520a53af0
-PKG_SITES:= http://tukaani.org/lzma/
-
-include ../rules.mk
-
-install: ${STAGING_HOST_DIR}/usr/bin/lzma
-
-$(WRKBUILD)/.compiled: ${WRKDIST}/.prepared
- (cd ${WRKBUILD}; PATH="$(STAGING_HOST_DIR)/usr/bin:$$PATH" ./configure)
- ${MAKE} -C ${WRKBUILD} CC='${CC_FOR_BUILD}'
- touch $@
-
-${STAGING_HOST_DIR}/usr/bin/lzma: $(WRKBUILD)/.compiled
- $(INSTALL_BIN) $(WRKBUILD)/src/lzma/lzma \
- $(STAGING_HOST_DIR)/usr/bin/lzma
-
-include $(TOPDIR)/mk/tools.mk
diff --git a/tools/lzo/Makefile b/tools/lzo/Makefile
deleted file mode 100644
index 8f965d7ea..000000000
--- a/tools/lzo/Makefile
+++ /dev/null
@@ -1,28 +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:= lzo
-PKG_VERSION:= 2.06
-PKG_RELEASE:= 1
-PKG_MD5SUM:= 95380bd4081f85ef08c5209f4107e9f8
-PKG_SITES:= http://www.oberhumer.com/opensource/lzo/download/
-
-include ../rules.mk
-
-install: $(WRKBUILD)/.installed
-
-$(WRKBUILD)/.configured: ${WRKDIST}/.prepared
- (cd ${WRKBUILD}; ./configure --prefix=$(STAGING_HOST_DIR)/usr)
- @touch $@
-
-$(WRKBUILD)/.compiled: $(WRKBUILD)/.configured
- ${MAKE} -C ${WRKBUILD}
- @touch $@
-
-$(WRKBUILD)/.installed: $(WRKBUILD)/.compiled
- ${MAKE} -C ${WRKBUILD} install
- @touch $@
-
-include $(TOPDIR)/mk/tools.mk
diff --git a/tools/lzop/Makefile b/tools/lzop/Makefile
deleted file mode 100644
index af08536c4..000000000
--- a/tools/lzop/Makefile
+++ /dev/null
@@ -1,30 +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:= lzop
-PKG_VERSION:= 1.03
-PKG_RELEASE:= 1
-PKG_MD5SUM:= 006c5e27fb78cdd14a628fdfa5aa1905
-PKG_SITES:= http://www.lzop.org/download/
-
-include ../rules.mk
-
-install: $(WRKBUILD)/.installed
-
-$(WRKBUILD)/.configured: ${WRKDIST}/.prepared
- (cd ${WRKBUILD}; CPPFLAGS='$(CPPFLAGS_FOR_BUILD)' \
- LDFLAGS='$(LDFLAGS_FOR_BUILD)' \
- ./configure --prefix=$(STAGING_HOST_DIR)/usr)
- @touch $@
-
-$(WRKBUILD)/.compiled: $(WRKBUILD)/.configured
- ${MAKE} -C ${WRKBUILD}
- @touch $@
-
-$(WRKBUILD)/.installed: $(WRKBUILD)/.compiled
- ${MAKE} -C ${WRKBUILD} install
- @touch $@
-
-include $(TOPDIR)/mk/tools.mk
diff --git a/tools/m4/Makefile b/tools/m4/Makefile
deleted file mode 100644
index f4a1bae1a..000000000
--- a/tools/m4/Makefile
+++ /dev/null
@@ -1,25 +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:= m4
-PKG_VERSION:= 1.4.17
-PKG_RELEASE:= 1
-PKG_MD5SUM:= a5e9954b1dae036762f7b13673a2cf76
-PKG_SITES:= ${MASTER_SITE_GNU:=m4/}
-
-include ../rules.mk
-
-install: ${STAGING_HOST_DIR}/usr/bin/m4
-
-$(WRKBUILD)/.compiled: ${WRKDIST}/.prepared
- (cd ${WRKBUILD}; ./configure --prefix=$(STAGING_HOST_DIR)/usr)
- ${MAKE} -C ${WRKBUILD} CC='${CC_FOR_BUILD}'
- touch $@
-
-${STAGING_HOST_DIR}/usr/bin/m4: $(WRKBUILD)/.compiled
- $(INSTALL_BIN) $(WRKBUILD)/src/m4 \
- ${STAGING_HOST_DIR}/usr/bin
-
-include $(TOPDIR)/mk/tools.mk
diff --git a/tools/mkcrypt/Makefile b/tools/mkcrypt/Makefile
deleted file mode 100644
index 089c6ad7b..000000000
--- a/tools/mkcrypt/Makefile
+++ /dev/null
@@ -1,11 +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
-
-install: ${STAGING_HOST_DIR}/usr/bin/mkcrypt
-
-${STAGING_HOST_DIR}/usr/bin/mkcrypt:
- $(CC_FOR_BUILD) ${FLAGS_FOR_BUILD} -o $@ mkcrypt.c
-
-include $(TOPDIR)/mk/tools.mk
diff --git a/tools/mkfimage/Makefile b/tools/mkfimage/Makefile
deleted file mode 100644
index 195614f2b..000000000
--- a/tools/mkfimage/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-include $(TOPDIR)/rules.mk
-
-all: mkfimage.c
- $(CC_FOR_BUILD) ${FLAGS_FOR_BUILD} -o ${STAGING_HOST_DIR}/usr/bin/mkfimage mkfimage.c $(MAKE_TRACE)
diff --git a/tools/mkfimage/mkfimage.c b/tools/mkfimage/mkfimage.c
deleted file mode 100644
index b1897fbd7..000000000
--- a/tools/mkfimage/mkfimage.c
+++ /dev/null
@@ -1,72 +0,0 @@
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <string.h>
-#include <stdlib.h>
-
-int main(int argc, char **argv){
- unsigned char *buffer = malloc(64 * 1024);
- struct stat s;
- unsigned int size_vmlinux = 0, real_size_vmlinux = 0;
- const unsigned char *magic_str = "ACME_PART_MAGIC";
- unsigned int loop;
- unsigned char *magic;
-
- if(argc != 3){
- printf("%s in out\n", argv[0]);
- return 1;
- }
-
- printf("Generating image\n");
-
- FILE *vmlinux = fopen(argv[1], "r");
- FILE *vmlinux_out = fopen(argv[2], "w");
- if((!vmlinux) || (!vmlinux_out)){
- printf("Error opening a file\n");
- return 1;
- }
-
- stat(argv[1], &s);
- size_vmlinux = s.st_size;
- real_size_vmlinux = (size_vmlinux & 0xffff0000) + 0x10000;
-
- printf("vmlinux = 0x%.08X / 0x%.08X\n", size_vmlinux, real_size_vmlinux);
-
- unsigned int t = fread(buffer, 1, 64 * 1024, vmlinux);
- for(loop = 0; loop < (64 * 1024) - sizeof(magic_str); loop++){
- if(buffer[loop] == magic_str[0]){
- if((magic = strstr(&buffer[loop], magic_str))){
- //printf("Magic at 0x%.08X %p %p\n", magic - buffer, magic, buffer);
- printf("Found Magic %X%X%X%X\n",
- buffer[loop + strlen(magic_str)],
- buffer[loop + strlen(magic_str) + 2],
- buffer[loop + strlen(magic_str) + 1],
- buffer[loop + strlen(magic_str) + 3]);
-
- buffer[loop + strlen(magic_str)] = real_size_vmlinux >> 24;
- buffer[loop + strlen(magic_str) + 2] = (real_size_vmlinux >> 16) & 0xff;
- buffer[loop + strlen(magic_str) + 1] = (real_size_vmlinux >> 8) & 0xff;
- buffer[loop + strlen(magic_str) + 3] = (real_size_vmlinux) & 0xff;
-
- printf("Replaced with %.02X%.02X%.02X%.02X\n",
- buffer[loop + strlen(magic_str)],
- buffer[loop + strlen(magic_str) + 2],
- buffer[loop + strlen(magic_str) + 1],
- buffer[loop + strlen(magic_str) + 3]);
-
- }
- }
- }
-
- fwrite(buffer, 1, 64 * 1024, vmlinux_out);
- real_size_vmlinux -= 64 * 1024;
- do {
- real_size_vmlinux -= 64 * 1024;
- memset(buffer, 0, 64 * 1024);
- fread(buffer, 1, 64 * 1024, vmlinux);
- fwrite(buffer, 1, 64 * 1024, vmlinux_out);
- } while (real_size_vmlinux);
-
- return 0;
-}
diff --git a/tools/mkimage/Makefile b/tools/mkimage/Makefile
deleted file mode 100644
index db2e42c3f..000000000
--- a/tools/mkimage/Makefile
+++ /dev/null
@@ -1,11 +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
-
-install: ${STAGING_HOST_DIR}/usr/bin/mkimage
-
-${STAGING_HOST_DIR}/usr/bin/mkimage: mkimage.c crc32.c
- $(CC_FOR_BUILD) ${FLAGS_FOR_BUILD} -o $@ mkimage.c crc32.c
-
-include $(TOPDIR)/mk/tools.mk
diff --git a/tools/mkimage/mkimage b/tools/mkimage/mkimage
deleted file mode 100755
index 87ed9a473..000000000
--- a/tools/mkimage/mkimage
+++ /dev/null
Binary files differ
diff --git a/tools/mksh/Makefile b/tools/mksh/Makefile
deleted file mode 100644
index 2c912e52b..000000000
--- a/tools/mksh/Makefile
+++ /dev/null
@@ -1,29 +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:= mksh
-PKG_VERSION:= 49
-PKG_RELEASE:= 1
-PKG_MD5SUM:= e8c205cac72c3dc8540bbc3897421422
-PKG_SITES:= ${MASTER_SITE_MIRBSD:distfiles/=dist/mir/mksh/}
-
-DISTFILES= ${PKG_NAME}-R${PKG_VERSION}.tgz
-WRKDIST= ${WRKDIR}/${PKG_NAME}
-
-include ../rules.mk
-
-install: ${STAGING_HOST_DIR}/usr/bin/mksh
-
-$(WRKBUILD)/.compiled: ${WRKDIST}/.prepared
- cd ${WRKBUILD} && CC='${CC_FOR_BUILD}' CFLAGS='${CFLAGS_FOR_BUILD}' \
- HAVE_CAN_FSTACKPROTECTORALL=0 \
- TARGET_OS=Linux ${BASH} ${WRKSRC}/Build.sh -Q -r -c lto
- touch $@
-
-${STAGING_HOST_DIR}/usr/bin/mksh: $(WRKBUILD)/.compiled
- ${INSTALL_BIN} ${WRKBUILD}/mksh \
- ${STAGING_HOST_DIR}/usr/bin
-
-include $(TOPDIR)/mk/tools.mk
diff --git a/tools/mtd-utils/Makefile b/tools/mtd-utils/Makefile
deleted file mode 100644
index 0152a41ac..000000000
--- a/tools/mtd-utils/Makefile
+++ /dev/null
@@ -1,24 +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:= mtd-utils
-PKG_VERSION:= 1.5.0
-PKG_RELEASE:= 1
-PKG_MD5SUM:= a4df1ad29684be79b0fa699bdae01faf
-PKG_SITES:= http://openadk.org/distfiles/
-
-include ../rules.mk
-
-install: ${STAGING_HOST_DIR}/usr/bin/mkfs.jffs2
-
-$(WRKBUILD)/.compiled: ${WRKDIST}/.prepared
- ${MAKE} -C ${WRKBUILD} CC='${CC_FOR_BUILD}' CPPFLAGS='-DWITHOUT_XATTR=1 -I./include'
- touch $@
-
-${STAGING_HOST_DIR}/usr/bin/mkfs.jffs2: $(WRKBUILD)/.compiled
- $(INSTALL_BIN) $(WRKBUILD)/mkfs.jffs2 \
- ${STAGING_HOST_DIR}/usr/bin
-
-include $(TOPDIR)/mk/tools.mk
diff --git a/tools/mtd-utils/patches/darwin.patch b/tools/mtd-utils/patches/darwin.patch
deleted file mode 100644
index 1df2ccba2..000000000
--- a/tools/mtd-utils/patches/darwin.patch
+++ /dev/null
@@ -1,261 +0,0 @@
-diff -Nur mtd-utils-1.5.0.orig/common.mk mtd-utils-1.5.0/common.mk
---- mtd-utils-1.5.0.orig/common.mk 2012-05-07 09:19:39.000000000 +0200
-+++ mtd-utils-1.5.0/common.mk 2014-03-22 11:25:31.000000000 +0100
-@@ -13,8 +13,6 @@
- $(call cc-option,-Wwrite-strings) \
- $(call cc-option,-Wno-sign-compare)
- CFLAGS += $(WFLAGS)
--SECTION_CFLAGS := $(call cc-option,-ffunction-sections -fdata-sections -Wl$(comma)--gc-sections)
--CFLAGS += $(SECTION_CFLAGS)
-
- ifneq ($(WITHOUT_LARGEFILE), 1)
- CPPFLAGS += -D_FILE_OFFSET_BITS=64
-diff -Nur mtd-utils-1.5.0.orig/compr_lzo.c mtd-utils-1.5.0/compr_lzo.c
---- mtd-utils-1.5.0.orig/compr_lzo.c 2012-05-07 09:19:39.000000000 +0200
-+++ mtd-utils-1.5.0/compr_lzo.c 2014-03-22 11:12:06.000000000 +0100
-@@ -26,7 +26,6 @@
- #include <string.h>
-
- #ifndef WITHOUT_LZO
--#include <asm/types.h>
- #include <linux/jffs2.h>
- #include <lzo/lzo1x.h>
- #include "compr.h"
-diff -Nur mtd-utils-1.5.0.orig/compr_zlib.c mtd-utils-1.5.0/compr_zlib.c
---- mtd-utils-1.5.0.orig/compr_zlib.c 2012-05-07 09:19:39.000000000 +0200
-+++ mtd-utils-1.5.0/compr_zlib.c 2014-03-22 11:11:57.000000000 +0100
-@@ -39,7 +39,6 @@
- #include <zlib.h>
- #undef crc32
- #include <stdio.h>
--#include <asm/types.h>
- #include <linux/jffs2.h>
- #include "common.h"
- #include "compr.h"
-diff -Nur mtd-utils-1.5.0.orig/include/byteswap.h mtd-utils-1.5.0/include/byteswap.h
---- mtd-utils-1.5.0.orig/include/byteswap.h 1970-01-01 01:00:00.000000000 +0100
-+++ mtd-utils-1.5.0/include/byteswap.h 2014-03-22 10:52:15.000000000 +0100
-@@ -0,0 +1,25 @@
-+#ifndef _BYTESWAP_H
-+#define _BYTESWAP_H
-+
-+#include <stdint.h>
-+
-+static __inline uint16_t __bswap_16(uint16_t __x)
-+{
-+ return __x<<8 | __x>>8;
-+}
-+
-+static __inline uint32_t __bswap_32(uint32_t __x)
-+{
-+ return __x>>24 | __x>>8&0xff00 | __x<<8&0xff0000 | __x<<24;
-+}
-+
-+static __inline uint64_t __bswap_64(uint64_t __x)
-+{
-+ return __bswap_32(__x)+0ULL<<32 | __bswap_32(__x>>32);
-+}
-+
-+#define bswap_16(x) __bswap_16(x)
-+#define bswap_32(x) __bswap_32(x)
-+#define bswap_64(x) __bswap_64(x)
-+
-+#endif
-diff -Nur mtd-utils-1.5.0.orig/include/endian.h mtd-utils-1.5.0/include/endian.h
---- mtd-utils-1.5.0.orig/include/endian.h 1970-01-01 01:00:00.000000000 +0100
-+++ mtd-utils-1.5.0/include/endian.h 2014-03-22 11:09:57.000000000 +0100
-@@ -0,0 +1,20 @@
-+#ifndef _ENDIAN_H
-+#define _ENDIAN_H
-+
-+#ifndef __BIG_ENDIAN
-+#define __BIG_ENDIAN 4321
-+#endif
-+
-+ #ifndef __LITTLE_ENDIAN
-+ #define __LITTLE_ENDIAN 1234
-+ #endif
-+
-+#ifndef __BYTE_ORDER
-+#define __BYTE_ORDER __LITTLE_ENDIAN
-+#endif
-+
-+#ifndef BYTE_ORDER
-+#define BYTE_ORDER __LITTLE_ENDIAN
-+#endif
-+
-+#endif
-diff -Nur mtd-utils-1.5.0.orig/include/linux/types.h mtd-utils-1.5.0/include/linux/types.h
---- mtd-utils-1.5.0.orig/include/linux/types.h 1970-01-01 01:00:00.000000000 +0100
-+++ mtd-utils-1.5.0/include/linux/types.h 2014-03-22 11:17:12.000000000 +0100
-@@ -0,0 +1,18 @@
-+#ifndef _LINUX_TYPES_H
-+#define _LINUX_TYPES_H
-+
-+#include <mtd/ubi-media.h>
-+
-+typedef uint16_t __u16;
-+typedef uint32_t __u32;
-+typedef uint64_t __u64;
-+
-+typedef __u16 __le16;
-+typedef __u32 __le32;
-+typedef __u64 __le64;
-+typedef __u64 off64_t;
-+
-+typedef __u16 __sum16;
-+typedef __u32 __wsum;
-+
-+#endif /* _LINUX_TYPES_H */
-diff -Nur mtd-utils-1.5.0.orig/include/mtd/jffs2-user.h mtd-utils-1.5.0/include/mtd/jffs2-user.h
---- mtd-utils-1.5.0.orig/include/mtd/jffs2-user.h 2012-05-07 09:19:39.000000000 +0200
-+++ mtd-utils-1.5.0/include/mtd/jffs2-user.h 2014-03-22 11:01:37.000000000 +0100
-@@ -9,8 +9,13 @@
-
- /* This file is blessed for inclusion by userspace */
- #include <linux/jffs2.h>
-+#if defined(__APPLE__)
-+#include "endian.h"
-+#include "byteswap.h"
-+#else
- #include <endian.h>
- #include <byteswap.h>
-+#endif
-
- #undef cpu_to_je16
- #undef cpu_to_je32
-diff -Nur mtd-utils-1.5.0.orig/include/mtd/mtd-abi.h mtd-utils-1.5.0/include/mtd/mtd-abi.h
---- mtd-utils-1.5.0.orig/include/mtd/mtd-abi.h 2012-05-07 09:19:39.000000000 +0200
-+++ mtd-utils-1.5.0/include/mtd/mtd-abi.h 2014-03-22 11:21:06.000000000 +0100
-@@ -171,9 +171,9 @@
- /* Get info about OOB modes (e.g., RAW, PLACE, AUTO) - legacy interface */
- #define MEMGETOOBSEL _IOR('M', 10, struct nand_oobinfo)
- /* Check if an eraseblock is bad */
--#define MEMGETBADBLOCK _IOW('M', 11, __kernel_loff_t)
-+#define MEMGETBADBLOCK _IOW('M', 11, off_t)
- /* Mark an eraseblock as bad */
--#define MEMSETBADBLOCK _IOW('M', 12, __kernel_loff_t)
-+#define MEMSETBADBLOCK _IOW('M', 12, off_t)
- /* Set OTP (One-Time Programmable) mode (factory vs. user) */
- #define OTPSELECT _IOR('M', 13, int)
- /* Get number of OTP (One-Time Programmable) regions */
-diff -Nur mtd-utils-1.5.0.orig/include/mtd/ubi-media.h mtd-utils-1.5.0/include/mtd/ubi-media.h
---- mtd-utils-1.5.0.orig/include/mtd/ubi-media.h 2012-05-07 09:19:39.000000000 +0200
-+++ mtd-utils-1.5.0/include/mtd/ubi-media.h 2014-03-22 11:18:03.000000000 +0100
-@@ -30,7 +30,15 @@
- #ifndef __UBI_MEDIA_H__
- #define __UBI_MEDIA_H__
-
-+#ifdef __linux__
- #include <asm/byteorder.h>
-+#else
-+#include <stdint.h>
-+typedef uint8_t __u8;
-+typedef uint16_t __be16;
-+typedef uint32_t __be32;
-+typedef uint64_t __be64;
-+#endif
-
- /* The version of UBI images supported by this implementation */
- #define UBI_VERSION 1
-diff -Nur mtd-utils-1.5.0.orig/lib/libfec.c mtd-utils-1.5.0/lib/libfec.c
---- mtd-utils-1.5.0.orig/lib/libfec.c 2012-05-07 09:19:39.000000000 +0200
-+++ mtd-utils-1.5.0/lib/libfec.c 2014-03-22 11:24:15.000000000 +0100
-@@ -61,8 +61,6 @@
- };
- #define gettimeofday(x, dummy) { (x)->ticks = clock() ; }
- #define DIFF_T(a,b) (1+ 1000000*(a.ticks - b.ticks) / CLOCKS_PER_SEC )
--typedef unsigned long u_long ;
--typedef unsigned short u_short ;
- #else /* typically, unix systems */
- #include <sys/time.h>
- #define DIFF_T(a,b) \
-@@ -625,7 +623,7 @@
- #define FEC_MAGIC 0xFECC0DEC
-
- struct fec_parms {
-- u_long magic ;
-+ unsigned long magic ;
- int k, n ; /* parameters of the code */
- gf *enc_matrix ;
- } ;
-diff -Nur mtd-utils-1.5.0.orig/lib/libmtd.c mtd-utils-1.5.0/lib/libmtd.c
---- mtd-utils-1.5.0.orig/lib/libmtd.c 2012-05-07 09:19:39.000000000 +0200
-+++ mtd-utils-1.5.0/lib/libmtd.c 2014-03-22 11:15:49.000000000 +0100
-@@ -1006,7 +1006,7 @@
- int mtd_is_bad(const struct mtd_dev_info *mtd, int fd, int eb)
- {
- int ret;
-- loff_t seek;
-+ off_t seek;
-
- ret = mtd_valid_erase_block(mtd, eb);
- if (ret)
-@@ -1015,7 +1015,7 @@
- if (!mtd->bb_allowed)
- return 0;
-
-- seek = (loff_t)eb * mtd->eb_size;
-+ seek = (off_t)eb * mtd->eb_size;
- ret = ioctl(fd, MEMGETBADBLOCK, &seek);
- if (ret == -1)
- return mtd_ioctl_error(mtd, eb, "MEMGETBADBLOCK");
-@@ -1025,7 +1025,7 @@
- int mtd_mark_bad(const struct mtd_dev_info *mtd, int fd, int eb)
- {
- int ret;
-- loff_t seek;
-+ off_t seek;
-
- if (!mtd->bb_allowed) {
- errno = EINVAL;
-@@ -1036,7 +1036,7 @@
- if (ret)
- return ret;
-
-- seek = (loff_t)eb * mtd->eb_size;
-+ seek = (off_t)eb * mtd->eb_size;
- ret = ioctl(fd, MEMSETBADBLOCK, &seek);
- if (ret == -1)
- return mtd_ioctl_error(mtd, eb, "MEMSETBADBLOCK");
-diff -Nur mtd-utils-1.5.0.orig/lib/libmtd_legacy.c mtd-utils-1.5.0/lib/libmtd_legacy.c
---- mtd-utils-1.5.0.orig/lib/libmtd_legacy.c 2012-05-07 09:19:39.000000000 +0200
-+++ mtd-utils-1.5.0/lib/libmtd_legacy.c 2014-03-22 11:22:18.000000000 +0100
-@@ -234,7 +234,7 @@
- struct stat st;
- struct mtd_info_user ui;
- int fd, ret;
-- loff_t offs = 0;
-+ off_t offs = 0;
- struct proc_parse_info pi;
-
- if (stat(node, &st)) {
-diff -Nur mtd-utils-1.5.0.orig/mkfs.jffs2.c mtd-utils-1.5.0/mkfs.jffs2.c
---- mtd-utils-1.5.0.orig/mkfs.jffs2.c 2012-05-07 09:19:39.000000000 +0200
-+++ mtd-utils-1.5.0/mkfs.jffs2.c 2014-03-22 11:11:15.000000000 +0100
-@@ -70,7 +70,12 @@
- #include <sys/xattr.h>
- #include <sys/acl.h>
- #endif
-+#if defined(__APPLE__)
-+#include "endian.h"
-+#include "byteswap.h"
-+#else
- #include <byteswap.h>
-+#endif
- #include <crc32.h>
- #include <inttypes.h>
-
-diff -Nur mtd-utils-1.5.0.orig/rbtree.h mtd-utils-1.5.0/rbtree.h
---- mtd-utils-1.5.0.orig/rbtree.h 2012-05-07 09:19:39.000000000 +0200
-+++ mtd-utils-1.5.0/rbtree.h 2014-03-22 11:07:58.000000000 +0100
-@@ -94,8 +94,7 @@
- #ifndef _LINUX_RBTREE_H
- #define _LINUX_RBTREE_H
-
--#include <linux/kernel.h>
--#include <linux/stddef.h>
-+#include <stddef.h>
-
- struct rb_node
- {
diff --git a/tools/pcre/Makefile b/tools/pcre/Makefile
deleted file mode 100644
index f88fe230a..000000000
--- a/tools/pcre/Makefile
+++ /dev/null
@@ -1,30 +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:= pcre
-PKG_VERSION:= 8.34
-PKG_RELEASE:= 1
-PKG_MD5SUM:= 006c5e27fb78cdd14a628fdfa5aa1905
-PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=pcre/}
-
-include ../rules.mk
-
-install: $(WRKBUILD)/.installed
-
-$(WRKBUILD)/.configured: ${WRKDIST}/.prepared
- (cd ${WRKBUILD}; CPPFLAGS='$(CPPFLAGS_FOR_BUILD)' \
- LDFLAGS='$(LDFLAGS_FOR_BUILD)' \
- ./configure --prefix=$(STAGING_HOST_DIR)/usr)
- @touch $@
-
-$(WRKBUILD)/.compiled: $(WRKBUILD)/.configured
- ${MAKE} -C ${WRKBUILD}
- @touch $@
-
-$(WRKBUILD)/.installed: $(WRKBUILD)/.compiled
- ${MAKE} -C ${WRKBUILD} install
- @touch $@
-
-include $(TOPDIR)/mk/tools.mk
diff --git a/tools/rules.mk b/tools/rules.mk
deleted file mode 100644
index a6a3684ac..000000000
--- a/tools/rules.mk
+++ /dev/null
@@ -1,7 +0,0 @@
-# This file is part of the OpenADK project. OpenADK is copyrighted
-# material, please see the LICENCE file in the top-level directory.
-
-WRKDIR_BASE= ${TOOLS_BUILD_DIR}
-WRKDIR= ${WRKDIR_BASE}
-
-include ${TOPDIR}/mk/buildhlp.mk
diff --git a/tools/squashfs/Makefile b/tools/squashfs/Makefile
deleted file mode 100644
index 06e4215b7..000000000
--- a/tools/squashfs/Makefile
+++ /dev/null
@@ -1,29 +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:= squashfs
-PKG_VERSION:= 4.2
-PKG_RELEASE:= 1
-PKG_MD5SUM:= 1b7a781fb4cf8938842279bd3e8ee852
-PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=squashfs/}
-
-DISTFILES:= ${PKG_NAME}${PKG_VERSION}.tar.gz
-WRKDIST= ${WRKDIR}/$(PKG_NAME)${PKG_VERSION}
-
-include ../rules.mk
-
-install: ${STAGING_HOST_DIR}/usr/bin/mksquashfs
-
-$(WRKBUILD)/.compiled: ${WRKDIST}/.prepared
- ${MAKE} -C ${WRKBUILD}/squashfs-tools CC='${CC_FOR_BUILD}' \
- XATTR_SUPPORT=0 XZ_SUPPORT=1 CPPFLAGS_FOR_BUILD=$(CPPFLAGS_FOR_BUILD) \
- EXTRA_LDFLAGS=$(LDFLAGS_FOR_BUILD)
- @touch $@
-
-${STAGING_HOST_DIR}/usr/bin/mksquashfs: $(WRKBUILD)/.compiled
- $(INSTALL_BIN) $(WRKBUILD)/squashfs-tools/mksquashfs \
- ${STAGING_HOST_DIR}/usr/bin
-
-include $(TOPDIR)/mk/tools.mk
diff --git a/tools/squashfs/patches/darwin.patch b/tools/squashfs/patches/darwin.patch
deleted file mode 100644
index b1d2ebd2e..000000000
--- a/tools/squashfs/patches/darwin.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-diff -Nur squashfs4.2.orig/squashfs-tools/mksquashfs.c squashfs4.2/squashfs-tools/mksquashfs.c
---- squashfs4.2.orig/squashfs-tools/mksquashfs.c 2011-02-28 23:24:09.000000000 +0100
-+++ squashfs4.2/squashfs-tools/mksquashfs.c 2014-03-22 11:32:00.000000000 +0100
-@@ -60,6 +60,10 @@
- #include <sys/sysinfo.h>
- #endif
-
-+#ifndef FNM_EXTMATCH
-+#define FNM_EXTMATCH 0
-+#endif
-+
- #ifdef SQUASHFS_TRACE
- #define TRACE(s, args...) \
- do { \
-@@ -721,13 +725,13 @@
- + (((char *)A) - data_cache)))
-
-
--inline void inc_progress_bar()
-+static inline void inc_progress_bar()
- {
- cur_uncompressed ++;
- }
-
-
--inline void update_progress_bar()
-+static inline void update_progress_bar()
- {
- pthread_mutex_lock(&progress_mutex);
- pthread_cond_signal(&progress_wait);
-@@ -735,7 +739,7 @@
- }
-
-
--inline void waitforthread(int i)
-+static inline void waitforthread(int i)
- {
- TRACE("Waiting for thread %d\n", i);
- while(thread[i] != 0)
-@@ -3340,7 +3344,7 @@
- }
-
-
--inline void add_dir_entry(char *name, char *pathname, struct dir_info *sub_dir,
-+static inline void add_dir_entry(char *name, char *pathname, struct dir_info *sub_dir,
- struct inode_info *inode_info, struct dir_info *dir)
- {
- if((dir->count % DIR_ENTRIES) == 0) {
-diff -Nur squashfs4.2.orig/squashfs-tools/unsquashfs.c squashfs4.2/squashfs-tools/unsquashfs.c
---- squashfs4.2.orig/squashfs-tools/unsquashfs.c 2011-02-28 23:27:06.000000000 +0100
-+++ squashfs4.2/squashfs-tools/unsquashfs.c 2014-03-22 11:36:27.000000000 +0100
-@@ -29,7 +29,13 @@
- #include "compressor.h"
- #include "xattr.h"
-
-+#ifndef FNM_EXTMATCH
-+#define FNM_EXTMATCH 0
-+#endif
-+
-+#ifdef __linux__
- #include <sys/sysinfo.h>
-+#endif
- #include <sys/types.h>
-
- struct cache *fragment_cache, *data_cache;
-@@ -1810,7 +1816,7 @@
- "\n");
-
- if(processors == -1) {
--#ifndef linux
-+#if 0
- int mib[2];
- size_t len = sizeof(processors);
-
-@@ -1821,11 +1827,13 @@
- mib[1] = HW_NCPU;
- #endif
-
-+#ifdef __linux__
- if(sysctl(mib, 2, &processors, &len, NULL, 0) == -1) {
- ERROR("Failed to get number of available processors. "
- "Defaulting to 1\n");
- processors = 1;
- }
-+#endif
- #else
- processors = sysconf(_SC_NPROCESSORS_ONLN);
- #endif
diff --git a/tools/srec2bin/Makefile b/tools/srec2bin/Makefile
deleted file mode 100644
index 01021c8ff..000000000
--- a/tools/srec2bin/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-include $(TOPDIR)/rules.mk
-
-all: srec2bin.c
- $(CC_FOR_BUILD) $(FLAGS_FOR_BUILD) -o ${STAGING_HOST_DIR}/usr/bin/srec2bin srec2bin.c
diff --git a/tools/srec2bin/srec2bin.c b/tools/srec2bin/srec2bin.c
deleted file mode 100644
index 8ba4387e6..000000000
--- a/tools/srec2bin/srec2bin.c
+++ /dev/null
@@ -1,521 +0,0 @@
-#include <stdio.h>
-#include <ctype.h>
-#include <string.h>
-
-//Rev 0.1 Original
-// 8 Jan 2001 MJH Added code to write data to Binary file
-// note: outputfile is name.bin, where name is first part
-// of input file. ie tmp.rec -> tmp.bin
-//
-// srec2bin <input SREC file> <Output Binary File> <If Present, Big Endian>
-//
-// TAG
-// bit32u TAG_BIG = 0xDEADBE42;
-// bit32u TAG_LITTLE = 0xFEEDFA42;
-//
-// File Structure
-//
-// TAG : 32 Bits
-// [DATA RECORDS]
-//
-// Data Records Structure
-//
-// LENGTH : 32 Bits <- Length of DATA, excludes ADDRESS and CHECKSUM
-// ADDRESS : 32 Bits
-// DATA : 8 Bits * LENGTH
-// CHECKSUM: 32 Bits <- 0 - (Sum of Length --> End of Data)
-//
-// Note : If Length == 0, Address will be Program Start
-//
-//
-//
-//
-//
-
-#define MajRevNum 0
-#define MinRevNum 2
-
-
-#define EndianSwitch(x) ((x >> 24) | (x << 24) | ((x << 8) & (0x00FF0000)) | ((x >> 8) & (0x0000FF00)) )
-
-typedef unsigned char bit8u;
-typedef unsigned int bit32u;
-typedef int bit32;
-
-#define FALSE 0
-#define TRUE (!FALSE)
-
-
-bit32u CheckSum;
-int RecStart;
-int debug;
-int verbose;
-
-FILE *OpenOutputFile( char *Name );
-FILE *fOut;
-bit32u RecLength=0;
-
-bit32u AddressCurrent;
-
-bit32u gh(char *cp,int nibs);
-
-int BigEndian;
-
-int inputline;
-
-// char buf[16*1024];
-
-char buffer[2048];
-char *cur_ptr;
-int cur_line=0;
-int cur_len=0;
-
-int s1s2s3_total=0;
-
-bit32u PBVal;
-int PBValid;
-bit32u PBAdr;
-
-
-void dumpfTell(char *s, bit32u Value)
-{
- int Length;
- Length = (int) RecLength;
- if (debug)
- printf("[%s ] ftell()[0x%08lX] Length[0x%4X] Length[%4d] Value[0x%08x]\n",
- s, ftell(fOut), Length, Length, Value);
-}
-
-void DispHex(bit32u Hex)
-{
-// printf("%X", Hex);
-}
-
-void WaitDisplay(void)
-{
- static int Count=0;
- static int Index=0;
- char iline[]={"-\\|/"};
-
- Count++;
- if ((Count % 32)==0)
- {
- if (verbose)
- printf("%c%c",iline[Index++],8);
- Index &= 3;
- }
-}
-
-
-void binOut32 ( bit32u Data )
-{
-// On UNIX machine all 32bit writes need ENDIAN switched
-// Data = EndianSwitch(Data);
-// fwrite( &Data, sizeof(bit32u), 1, fOut);
-
- char sdat[4];
- int i;
-
- for(i=0;i<4;i++)
- sdat[i]=(char)(Data>>(i*8));
- fwrite( sdat, 1, 4, fOut);
- dumpfTell("Out32" , Data);
-}
-
-// Only update RecLength on Byte Writes
-// All 32 bit writes will be for Length etc
-
-void binOut8 ( bit8u Data )
-{
- int n;
- dumpfTell("B4Data" , (bit32u) (Data & 0xFF) );
- n = fwrite( &Data, sizeof(bit8u), 1, fOut);
- if (n != 1)
- printf("Error in writing %X for Address 0x%8X\n", Data, AddressCurrent);
- RecLength += 1;
-}
-
-// Currently ONLY used for outputting Program Start
-
-void binRecStart(bit32u Address)
-{
- RecLength = 0;
- CheckSum = Address;
- RecStart = TRUE;
-
- if (debug)
- printf("[RecStart] CheckSum[0x%08X] Length[%4d] Address[0x%08X]\n",
- CheckSum, RecLength, Address);
-
-
- dumpfTell("RecLength", RecLength);
- binOut32( RecLength );
- dumpfTell("Address", Address);
- binOut32( Address );
-}
-
-void binRecEnd(void)
-{
- long RecEnd;
-
- if (!RecStart) // if no record started, do not end it
- {
- return;
- }
-
- RecStart = FALSE;
-
-
- RecEnd = ftell(fOut); // Save Current position
-
- if (debug)
- printf("[RecEnd ] CheckSum[0x%08X] Length[%4d] Length[0x%X] RecEnd[0x%08lX]\n",
- CheckSum, RecLength, RecLength, RecEnd);
-
- fseek( fOut, -((long) RecLength), SEEK_CUR); // move back Start Of Data
-
- dumpfTell("Data ", -1);
-
- fseek( fOut, -4, SEEK_CUR); // move back Start Of Address
-
- dumpfTell("Address ", -1);
-
- fseek( fOut, -4, SEEK_CUR); // move back Start Of Length
-
- dumpfTell("Length ", -1);
-
- binOut32( RecLength );
-
- fseek( fOut, RecEnd, SEEK_SET); // move to end of Record
-
- CheckSum += RecLength;
-
- CheckSum = ~CheckSum + 1; // Two's complement
-
- binOut32( CheckSum );
-
- if (verbose)
- printf("[Created Record of %d Bytes with CheckSum [0x%8X]\n", RecLength, CheckSum);
-}
-
-void binRecOutProgramStart(bit32u Address)
-{
- if (Address != (AddressCurrent+1))
- {
- binRecEnd();
- binRecStart(Address);
- }
- AddressCurrent = Address;
-}
-void binRecOutByte(bit32u Address, bit8u Data)
-{
- // If Address is one after Current Address, output Byte
- // If not, close out last record, update Length, write checksum
- // Then Start New Record, updating Current Address
-
- if (Address != (AddressCurrent+1))
- {
- binRecEnd();
- binRecStart(Address);
- }
- AddressCurrent = Address;
- CheckSum += Data;
- binOut8( Data );
-}
-
-//=============================================================================
-// SUPPORT FUNCTIONS
-//=============================================================================
-int readline(FILE *fil,char *buf,int len)
-{
- int rlen;
-
- rlen=0;
- if (len==0) return(0);
- while(1)
- {
- if (cur_len==0)
- {
- cur_len=fread(buffer, 1, sizeof(buffer), fil);
- if (cur_len==0)
- {
- if (rlen)
- {
- *buf=0;
- return(rlen);
- }
- return(-1);
- }
- cur_ptr=buffer;
- }
- if (cur_len)
- {
- if (*cur_ptr=='\n')
- {
- *buf=0;
- cur_ptr++;
- cur_len--;
- return(rlen);
- }
- else
- {
- if ((len>1)&&(*cur_ptr!='\r'))
- {
- *buf++=*cur_ptr++;
- len--;
- }
- else
- cur_ptr++;
-
- rlen++;
- cur_len--;
- }
- }
- else
- {
- *buf=0;
- cur_ptr++;
- cur_len--;
- return(rlen);
- }
- }
-}
-
-
-int SRLerrorout(char *c1,char *c2)
-{
- printf("\nERROR: %s - '%s'.",c1,c2);
- return(FALSE);
-}
-
-
-int checksum(char *cp,int count)
-{
- char *scp;
- int cksum;
- int dum;
-
- scp=cp;
- while(*scp)
- {
- if (!isxdigit(*scp++))
- return(SRLerrorout("Invalid hex digits",cp));
- }
- scp=cp;
-
- cksum=count;
-
- while(count)
- {
- cksum += gh(scp,2);
- if (count == 2)
- dum = ~cksum;
- scp += 2;
- count--;
- }
- cksum&=0x0ff;
- // printf("\nCk:%02x",cksum);
- return(cksum==0x0ff);
-}
-
-bit32u gh(char *cp,int nibs)
-{
- int i;
- bit32u j;
-
- j=0;
-
- for(i=0;i<nibs;i++)
- {
- j<<=4;
- if ((*cp>='a')&&(*cp<='z')) *cp &= 0x5f;
- if ((*cp>='0')&&(*cp<='9'))
- j += (*cp-0x30);
- else
- if ((*cp>='A')&&(*cp<='F'))
- j += (*cp-0x37);
- else
- SRLerrorout("Bad Hex char", cp);
- cp++;
- }
- return(j);
-}
-
-
-//=============================================================================
-// PROCESS SREC LINE
-//=============================================================================
-
-int srecLine(char *pSrecLine)
-{
- char *scp,ch;
- int itmp,count,dat;
- bit32u adr;
- static bit32u RecordCounter=0;
-
- cur_line++;
- scp=pSrecLine;
-
- if (*pSrecLine!='S')
- return(SRLerrorout("Not an Srecord file",scp));
- pSrecLine++;
- if (strlen(pSrecLine)<4)
- return(SRLerrorout("Srecord too short",scp));
-
- ch=*pSrecLine++;
-
- count=gh(pSrecLine,2);
-
- pSrecLine += 2;
-
- // if(debug)
- // printf("count %d, strlen(pSrecLine) = %d, pSrecLine =[%s]\n", count, strlen(pSrecLine), pSrecLine);
- RecordCounter++;
- DispHex(RecordCounter);
-
- if ((count*2) != strlen(pSrecLine)) return(SRLerrorout("Count field larger than record",scp));
-
- if (!checksum(pSrecLine, count)) return(SRLerrorout("Bad Checksum",scp));
-
- switch(ch)
- {
- case '0': if (count<3) return(SRLerrorout("Invalid Srecord count field",scp));
- itmp=gh(pSrecLine,4); pSrecLine+=4; count-=2;
- if (itmp) return(SRLerrorout("Srecord 1 address not zero",scp));
- break;
- case '1': if (count<3) return(SRLerrorout("Invalid Srecord count field",scp));
- return(SRLerrorout("Srecord Not valid for MIPS",scp));
- break;
- case '2': if (count<4) return(SRLerrorout("Invalid Srecord count field",scp));
- return(SRLerrorout("Srecord Not valid for MIPS",scp));
- break;
- case '3': if (count<5) return(SRLerrorout("Invalid Srecord count field",scp));
- adr=gh(pSrecLine,8); pSrecLine+=8; count-=4;
- count--;
- while(count)
- {
- dat=gh(pSrecLine,2); pSrecLine+=2; count--;
- binRecOutByte(adr, (char) (dat & 0xFF));
- adr++;
- }
- s1s2s3_total++;
- break;
- case '4': return(SRLerrorout("Invalid Srecord type",scp));
- break;
- case '5': if (count<3) return(SRLerrorout("Invalid Srecord count field",scp));
- itmp=gh(pSrecLine,4); pSrecLine+=4; count-=2;
- if (itmp|=s1s2s3_total) return(SRLerrorout("Incorrect number of S3 Record processed",scp));
- break;
- case '6': return(SRLerrorout("Invalid Srecord type",scp));
- break;
- case '7': // PROGRAM START
- if (count<5) return(SRLerrorout("Invalid Srecord count field",scp));
- adr=gh(pSrecLine,8); pSrecLine+=8; count-=4;
- if (count!=1) return(SRLerrorout("Invalid Srecord count field",scp));
- binRecOutProgramStart(adr);
- break;
- case '8': if (count<4) return(SRLerrorout("Invalid Srecord count field",scp));
- return(SRLerrorout("Srecord Not valid for MIPS",scp));
- break;
- case '9': if (count<3) return(SRLerrorout("Invalid Srecord count field",scp));
- return(SRLerrorout("Srecord Not valid for MIPS",scp));
- break;
- default:
- break;
- }
- return(TRUE);
-}
-
-
-//=============================================================================
-// MAIN LOGIC, READS IN LINE AND OUTPUTS BINARY
-//=============================================================================
-
-int srec2bin(int argc,char *argv[],int verbose)
-{
- int rlen,sts;
- FILE *fp;
- char buff[256];
- bit32u TAG_BIG = 0xDEADBE42;
- bit32u TAG_LITTLE = 0xFEEDFA42;
-
- bit32u Tag;
-
-
- if(argc < 3)
- {
- printf("\nError: <srec2bin <srec input file> <bin output file>\n\n");
- return(0);
- }
-
- if (argc > 3) BigEndian=TRUE; else BigEndian=FALSE;
-
- if (BigEndian)
- Tag = TAG_BIG;
- else
- Tag = TAG_LITTLE;
-
- if (verbose)
- printf("\nEndian: %s, Tag is 0x%8X\n",(BigEndian)?"BIG":"LITTLE", Tag);
-
- fp = fopen(argv[1],"rt");
-
- if (fp==NULL)
- {
- printf("\nError: Opening input file, %s.", argv[1]);
- return(0);
- }
-
- fOut = fopen( argv[2], "wb");
-
- if (fOut==NULL)
- {
- printf("\nError: Opening Output file, %s.", argv[2]);
- if(fp) fclose(fp);
- return(0);
- }
-
- RecStart = FALSE;
-
- AddressCurrent = 0xFFFFFFFFL;
-
- // Setup Tag
-
- dumpfTell("Tag", Tag);
-
- binOut32(Tag);
-
-
- inputline=0;
- sts=TRUE;
-
- rlen = readline(fp,buff,sizeof buff);
-
- while( (sts) && (rlen != -1))
- {
- if (strlen(buff))
- {
- sts &= srecLine(buff);
- WaitDisplay();
- }
- rlen = readline(fp,buff,sizeof buff);
- }
-
-
- // printf("PC: 0x%08X, Length 0x%08X, Tag 0x%08X\n", ProgramStart, RecLength, TAG_LITTLE);
-
- binRecEnd();
-
- if(fp) fclose(fp);
- if(fOut) fclose(fOut);
-
- return(1);
-}
-
-int main(int argc, char *argv[])
-{
- debug = FALSE;
- verbose = FALSE;
- srec2bin(argc,argv,verbose);
- return 0;
-}
diff --git a/tools/syslinux/Makefile b/tools/syslinux/Makefile
deleted file mode 100644
index 1344538d1..000000000
--- a/tools/syslinux/Makefile
+++ /dev/null
@@ -1,37 +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:= syslinux
-PKG_VERSION:= 6.02
-PKG_RELEASE:= 1
-PKG_MD5SUM:= 086ac1c569d226a5e2ae3d605de09a1d
-PKG_SITES:= http://www.kernel.org/pub/linux/utils/boot/syslinux/
-
-include ../rules.mk
-WRKINST:= ${WRKBUILD}/openadk_installroot
-
-install: ${STAGING_HOST_DIR}/usr/bin/extlinux ${STAGING_HOST_DIR}/usr/share/syslinux/.installed
-
-$(WRKBUILD)/.compiled: ${WRKDIST}/.prepared
- ${MAKE} -C ${WRKBUILD} CC='${CC_FOR_BUILD}' bios installer
- @touch $@
-
-$(WRKBUILD)/.installed: ${WRKBUILD}/.compiled
- mkdir -p ${WRKINST}
- ${MAKE} -C ${WRKBUILD} CC='${CC_FOR_BUILD}' \
- INSTALLROOT='${WRKINST}' \
- bios install
- @touch $@
-
-${STAGING_HOST_DIR}/usr/bin/extlinux: $(WRKBUILD)/.installed
- $(INSTALL_BIN) ${WRKINST}/sbin/extlinux \
- ${STAGING_HOST_DIR}/usr/bin
-
-${STAGING_HOST_DIR}/usr/share/syslinux/.installed: ${WRKBUILD}/.installed
- mkdir -p ${STAGING_HOST_DIR}/usr/share
- ${CP} ${WRKINST}/usr/share/syslinux ${STAGING_HOST_DIR}/usr/share
- @touch ${STAGING_HOST_DIR}/usr/share/syslinux/.installed
-
-include $(TOPDIR)/mk/tools.mk
diff --git a/tools/trx/Makefile b/tools/trx/Makefile
deleted file mode 100644
index 25e2b02db..000000000
--- a/tools/trx/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-include $(TOPDIR)/rules.mk
-
-all: trx.c
- $(CC_FOR_BUILD) $(FLAGS_FOR_BUILD) -o ${STAGING_HOST_DIR}/usr/bin/trx trx.c
diff --git a/tools/trx/trx.c b/tools/trx/trx.c
deleted file mode 100644
index 9e4d521ca..000000000
--- a/tools/trx/trx.c
+++ /dev/null
@@ -1,366 +0,0 @@
-/*
- * Copyright (C) 2004 Manuel Novoa III <mjn3@codepoet.org>
- * Copyright (C) 2005 Konstantin A. Klubnichkin and Oleg I. Vdovikin
- * Copyright (C) 2006 OpenWrt developers <openwrt-developers@openwrt.org>
- * Copyright (C) 2011 Waldemar Brodkorb <wbx@openadk.org>
- *
- * 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
- */
-
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stddef.h>
-#include <stdint.h>
-#include <string.h>
-#include <errno.h>
-#include <unistd.h>
-
-uint32_t crc32buf(char *buf, size_t len);
-
-/**********************************************************************/
-/* from trxhdr.h */
-
-#define TRX_MAGIC 0x30524448 /* "HDR0" */
-#define TRX_VERSION 1
-#define TRX_MAX_LEN 0x697800
-#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 [-p product_id] [-v version] [-o outfile] [-m maxlen] [-a align] [-b offset] -f file [-f file [-f 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;
- uint32_t cur_len;
- unsigned long maxlen = TRX_MAX_LEN;
- struct trx_header *p;
-
- struct {
- uint8_t version[4]; /* Firmware version */
- uint8_t prod_id[12]; /* Product Id */
- uint8_t comp_hw[4][4]; /* Compatible hw list maj-min min/maj-min max */
- uint8_t pad[32]; /* Padding */
- } asus = {
- .version = { 1, 9, 2, 7 }, /* version is set to 1.9.2.7 by default */
- .comp_hw[0] = { 0, 2, 2, 99 } /* hardcoded hw compat list 0.02 - 2.99 */
- };
-
-
- if (!(buf = malloc(maxlen))) {
- fprintf(stderr, "malloc failed\n");
- return EXIT_FAILURE;
- }
-
- p = (struct trx_header *) buf;
-
- p->magic = TRX_MAGIC;
- cur_len = sizeof(struct trx_header);
- p->flag_version = (TRX_VERSION << 16);
-
- in = NULL;
- i = 0;
-
- while ((c = getopt(argc, argv, "-:o:p:v:m:a:b:f:")) != -1) {
- switch (c) {
- case 'f':
- p->offsets[i++] = cur_len;
-
- if (!(in = fopen(optarg, "r"))) {
- fprintf(stderr, "can not open \"%s\" for reading\n", optarg);
- usage();
- }
- n = fread(buf + cur_len, 1, maxlen - cur_len, in);
- if (!feof(in)) {
- fprintf(stderr, "fread failure or file \"%s\" too large\n",optarg);
- fclose(in);
- return EXIT_FAILURE;
- }
- fclose(in);
-#undef ROUND
-#define ROUND 4
- if (n & (ROUND-1)) {
- memset(buf + cur_len + n, 0, ROUND - (n & (ROUND-1)));
- n += ROUND - (n & (ROUND-1));
- }
- cur_len += n;
- /* reserve space for asus footer */
- if (asus.prod_id[0]) {
- cur_len += sizeof(asus);
- }
- break;
- case 'o':
- ofn = optarg;
- if (ofn && !(out = fopen(ofn, "w"))) {
- fprintf(stderr, "can not open \"%s\" for writing\n", ofn);
- usage();
- }
-
- 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();
- }
- if (maxlen > TRX_MAX_LEN) {
- fprintf(stderr, "WARNING: maxlen exceeds default maximum! Beware of overwriting nvram!\n");
- }
- if (!(buf = realloc(buf,maxlen))) {
- fprintf(stderr, "realloc failed");
- return EXIT_FAILURE;
- }
- break;
- case 'a':
- errno = 0;
- n = strtoul(optarg, &e, 0);
- if (errno || (e == optarg) || *e) {
- fprintf(stderr, "illegal numeric string\n");
- usage();
- }
- if (cur_len & (n-1)) {
- n = n - (cur_len & (n-1));
- memset(buf + cur_len, 0, n);
- cur_len += n;
- }
- break;
- case 'b':
- errno = 0;
- n = strtoul(optarg, &e, 0);
- if (errno || (e == optarg) || *e) {
- fprintf(stderr, "illegal numeric string\n");
- usage();
- }
- if (n < cur_len) {
- fprintf(stderr, "WARNING: current length exceeds -b %d offset\n",(int)n);
- } else {
- memset(buf + cur_len, 0, n - cur_len);
- cur_len = n;
- }
- break;
- case 'p':
- if ((n = strlen(optarg)) > sizeof(asus.prod_id)) {
- fprintf(stderr, "product id too long\n");
- usage();
- }
- memset(asus.prod_id, ' ', sizeof(asus.prod_id));
- memcpy(asus.prod_id, optarg, n);
- break;
- case 'v':
- for (n = 0; n < sizeof(asus.version) / sizeof(asus.version[0]); n++)
- {
- if (n != 0 && optarg[0] == '.' && optarg[1]) optarg++;
- else if (n != 0) break;
-
- asus.version[n] = strtoul(optarg, &optarg, 10);
- }
- if (*optarg)
- {
- fprintf(stderr, "invalid version string\n");
- usage();
- }
- break;
- default:
- usage();
- }
- }
-
- if (!in) {
- fprintf(stderr, "we require at least one filename\n");
- usage();
- }
-
-#undef ROUND
-#define ROUND 0x1000
- n = cur_len & (ROUND-1);
- if (n) {
- memset(buf + cur_len, 0, ROUND - n);
- cur_len += ROUND - n;
- }
- /* add asus footer */
- if (asus.prod_id[0]) {
- memcpy(buf + cur_len - sizeof(asus), &asus, sizeof(asus));
- }
-
- p->crc32 = crc32buf((char *) &p->flag_version,
- cur_len - offsetof(struct trx_header, flag_version));
- p->crc32 = p->crc32;
-
- p->len = cur_len;
-
- if (!fwrite(buf, cur_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/tools/xz/Makefile b/tools/xz/Makefile
deleted file mode 100644
index fa4c51f92..000000000
--- a/tools/xz/Makefile
+++ /dev/null
@@ -1,28 +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:= xz
-PKG_VERSION:= 5.0.5
-PKG_RELEASE:= 1
-PKG_MD5SUM:= 1b7a781fb4cf8938842279bd3e8ee852
-PKG_SITES:= http://tukaani.org/xz/
-
-include ../rules.mk
-
-install: $(WRKBUILD)/.installed
-
-$(WRKBUILD)/.configured: ${WRKDIST}/.prepared
- (cd ${WRKBUILD}; ./configure --prefix=$(STAGING_HOST_DIR)/usr)
- @touch $@
-
-$(WRKBUILD)/.compiled: $(WRKBUILD)/.configured
- ${MAKE} -C ${WRKBUILD}
- @touch $@
-
-$(WRKBUILD)/.installed: $(WRKBUILD)/.compiled
- ${MAKE} -C ${WRKBUILD} install
- @touch $@
-
-include $(TOPDIR)/mk/tools.mk