summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore48
-rw-r--r--BUGS2
-rw-r--r--Config.in36
-rw-r--r--Makefile1
-rw-r--r--README5
-rw-r--r--TODO10
-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/pkgmaker.c (renamed from tools/adk/pkgmaker.c)66
-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/adding-packages-host.txt14
-rw-r--r--docs/contribute.txt1
-rw-r--r--docs/getting.txt6
-rw-r--r--docs/how-openadk-works.txt25
-rw-r--r--docs/introduction.txt6
-rw-r--r--docs/make-tips.txt4
-rw-r--r--docs/patch-policy.txt12
-rw-r--r--docs/prerequisite.txt11
-rw-r--r--mk/build.mk124
-rw-r--r--mk/buildhlp.mk8
-rw-r--r--mk/fetch.mk1
-rw-r--r--mk/host-bottom.mk9
-rw-r--r--mk/host.mk4
-rw-r--r--mk/image.mk35
-rw-r--r--mk/kernel-build.mk1
-rw-r--r--mk/kernel-ver.mk28
-rw-r--r--mk/package.mk7
-rw-r--r--mk/pkg-bottom.mk2
-rw-r--r--mk/rootfs.mk13
-rw-r--r--mk/vars.mk46
-rw-r--r--package/Makefile2
-rw-r--r--package/adk-helper/Makefile33
-rw-r--r--package/adk-helper/src/dkgetsz.c (renamed from tools/adk/dkgetsz.c)0
-rw-r--r--package/adk-helper/src/mkcrypt.c (renamed from tools/mkcrypt/mkcrypt.c)0
-rw-r--r--package/adk-test-tools/Makefile2
-rwxr-xr-xpackage/adk-test-tools/files/test.init6
-rw-r--r--package/asterisk/Makefile2
-rw-r--r--package/avahi/Makefile2
-rw-r--r--package/base-files/Makefile36
-rw-r--r--package/base-files/files/inittab.shell2
-rw-r--r--package/base-files/src/etc/init.d/boot8
-rw-r--r--package/base-files/src/etc/init.d/fs58
-rw-r--r--package/base-files/src/etc/inittab2
-rw-r--r--package/base-files/src/etc/ipkg.conf2
-rw-r--r--package/base-files/src/etc/mdev.conf1
-rw-r--r--package/base-files/src/lib/mdev/init27
-rwxr-xr-xpackage/base-files/src/usr/share/udhcpc/default.script4
-rw-r--r--package/bash/Makefile6
-rw-r--r--package/bash/patches/patch-Makefile_in13
-rw-r--r--package/bash/patches/patch-builtins_Makefile_in11
-rw-r--r--package/bc/Makefile7
-rw-r--r--package/bcm2835-bootloader/Makefile6
-rw-r--r--package/bcm2835-vc/Makefile11
-rw-r--r--package/binutils/Makefile4
-rw-r--r--package/bison/Makefile8
-rw-r--r--package/busybox/Makefile7
-rw-r--r--package/busybox/config/miscutils/Config.in6
-rw-r--r--package/busybox/config/networking/Config.in2
-rw-r--r--package/busybox/config/networking/udhcp/Config.in2
-rw-r--r--package/busybox/files/busybox.postinst3
-rw-r--r--package/busybox/files/network (renamed from package/busybox/files/network.init)0
-rw-r--r--package/busybox/files/syslogd.init (renamed from package/busybox/files/syslog.init)0
-rw-r--r--package/busybox/files/udhcpd.init2
-rw-r--r--package/busybox/patches/001-ipkg.patch163
-rw-r--r--package/bzip2/Makefile11
-rw-r--r--package/ccache/Makefile24
-rw-r--r--package/cdrtools/Makefile31
-rw-r--r--package/cfgfs/Makefile2
-rw-r--r--package/check/Makefile26
-rw-r--r--package/collectd/Makefile21
-rw-r--r--package/collectd/patches/patch-configure29
-rw-r--r--package/collectd/patches/patch-src_Makefile_in11
-rw-r--r--package/conntrack-tools/Makefile25
-rw-r--r--package/conntrack-tools/patches/patch-include_bitops_h41
-rw-r--r--package/conntrack-tools/patches/patch-include_mcast_h10
-rw-r--r--package/conntrack-tools/patches/patch-include_tcp_h10
-rw-r--r--package/conntrack-tools/patches/patch-include_udp_h10
-rw-r--r--package/curl/Makefile20
-rw-r--r--package/curl/patches/patch-ltmain_sh11
-rw-r--r--package/curl/patches/patch-src_tool_operate_c13
-rw-r--r--package/dansguardian/Makefile2
-rw-r--r--package/dbus-python/Makefile2
-rw-r--r--package/dmidecode/Makefile2
-rw-r--r--package/dosfstools/Makefile2
-rw-r--r--package/dosfstools/patches/patch-src_boot_c77
-rw-r--r--package/dosfstools/patches/patch-src_boot_h11
-rw-r--r--package/dosfstools/patches/patch-src_check_c49
-rw-r--r--package/dosfstools/patches/patch-src_check_h11
-rw-r--r--package/dosfstools/patches/patch-src_fat_c32
-rw-r--r--package/dosfstools/patches/patch-src_fat_h11
-rw-r--r--package/dosfstools/patches/patch-src_fatlabel_c11
-rw-r--r--package/dosfstools/patches/patch-src_fsck_fat_h38
-rw-r--r--package/dosfstools/patches/patch-src_io_c59
-rw-r--r--package/dosfstools/patches/patch-src_io_h35
-rw-r--r--package/dosfstools/patches/patch-src_lfn_c74
-rw-r--r--package/dosfstools/patches/patch-src_lfn_h20
-rw-r--r--package/dosfstools/patches/patch-src_mkfs_fat_c56
-rw-r--r--package/dovecot/Makefile30
-rw-r--r--package/dovecot/patches/patch-ltmain_sh11
-rw-r--r--package/dropbear/Makefile3
-rw-r--r--package/dropbear/files/dropbear.postinst4
-rw-r--r--package/e2fsprogs/Makefile10
-rw-r--r--package/ebtables/Makefile2
-rw-r--r--package/ebtables/patches/patch-Makefile6
-rw-r--r--package/ebtables/patches/patch-extensions_ebt_among_c10
-rw-r--r--package/ebtables/patches/patch-extensions_ebt_arpreply_c10
-rw-r--r--package/ebtables/patches/patch-extensions_ebt_ip6_c10
-rw-r--r--package/ebtables/patches/patch-extensions_ebt_limit_c10
-rw-r--r--package/ebtables/patches/patch-extensions_ebt_nat_c10
-rw-r--r--package/ebtables/patches/patch-include_ethernetdb_h29
-rw-r--r--package/ebtables/patches/patch-useful_functions_c10
-rw-r--r--package/ethtool/Makefile12
-rw-r--r--package/ethtool/patches/patch-internal_h33
-rw-r--r--package/eudev/Makefile26
-rw-r--r--package/eudev/patches/patch-rule_generator_write_cd_rules11
-rw-r--r--package/eudev/patches/patch-rule_generator_write_net_rules11
-rw-r--r--package/eudev/patches/patch-src_accelerometer_accelerometer_c13
-rw-r--r--package/eudev/patches/patch-src_accelerometer_accelerometer_c.orig13
-rw-r--r--package/eudev/patches/patch-src_ata_id_ata_id_c11
-rw-r--r--package/eudev/patches/patch-src_ata_id_ata_id_c.orig13
-rw-r--r--package/eudev/patches/patch-src_collect_collect_c11
-rw-r--r--package/eudev/patches/patch-src_mtd_probe_mtd_probe_c11
-rw-r--r--package/eudev/patches/patch-src_scsi_id_scsi_serial_c11
-rw-r--r--package/exmap/Makefile31
-rw-r--r--package/fbsplash/Makefile28
-rw-r--r--package/feh/Makefile4
-rw-r--r--package/fetchmail/Makefile4
-rw-r--r--package/ffmpeg/Makefile11
-rw-r--r--package/findutils/Makefile32
-rw-r--r--package/findutils/patches/patch-configure_ac11
-rw-r--r--package/findutils/patches/patch-gnulib_lib_freadahead_c15
-rw-r--r--package/findutils/patches/patch-gnulib_lib_freadahead_h24
-rw-r--r--package/findutils/patches/patch-gnulib_lib_fseeko_c18
-rw-r--r--package/findutils/patches/patch-gnulib_m4_fflush_m425
-rw-r--r--package/fltk/Makefile2
-rw-r--r--package/fping/Makefile14
-rw-r--r--package/freetype/Makefile14
-rw-r--r--package/gcc/Makefile9
-rw-r--r--package/gdb/Makefile23
-rw-r--r--package/gdb/patches/microblaze.patch1842
-rw-r--r--package/genext2fs/Makefile24
-rw-r--r--package/gkrellm/Makefile6
-rw-r--r--package/gkrellm/patches/patch-server_Makefile30
-rw-r--r--package/gkrellm/patches/patch-server_main_c24
-rw-r--r--package/gkrellm/patches/patch-server_sysdeps-unix_c10
-rw-r--r--package/glib/Makefile8
-rw-r--r--package/glibc/files/libc.so.sh45
-rw-r--r--package/gnutls/Makefile5
-rw-r--r--package/gpsd/Makefile2
-rw-r--r--package/grub-bin/Makefile1
-rw-r--r--package/grub/Makefile53
-rw-r--r--package/grub/patches/patch-conf_common_mk11
-rw-r--r--package/grub/patches/patch-configure11
-rw-r--r--package/grub/patches/patch-grub-core_gnulib_stdio_in_h14
-rw-r--r--package/grub/patches/patch-grub-core_kern_emu_hostdisk_c36
-rw-r--r--package/grub/patches/patch-include_grub_i18n_h11
-rw-r--r--package/grub/patches/patch-include_grub_misc_h17
-rw-r--r--package/grub/patches/patch-kern_misc_c54
-rw-r--r--package/grub/patches/patch-lib_libgcrypt-grub_cipher_camellia_c29
-rw-r--r--package/grub/patches/patch-lib_libgcrypt-grub_cipher_des_c11
-rw-r--r--package/grub/patches/patch-lib_libgcrypt-grub_cipher_dsa_c29
-rw-r--r--package/grub/patches/patch-lib_libgcrypt-grub_cipher_elgamal_c20
-rw-r--r--package/grub/patches/patch-lib_libgcrypt-grub_cipher_md4_c11
-rw-r--r--package/grub/patches/patch-lib_libgcrypt-grub_cipher_md5_c11
-rw-r--r--package/grub/patches/patch-lib_libgcrypt-grub_cipher_primegen_c38
-rw-r--r--package/grub/patches/patch-lib_libgcrypt-grub_cipher_rijndael_c53
-rw-r--r--package/grub/patches/patch-lib_libgcrypt-grub_cipher_rmd160_c11
-rw-r--r--package/grub/patches/patch-lib_libgcrypt-grub_cipher_serpent_c20
-rw-r--r--package/grub/patches/patch-lib_libgcrypt-grub_cipher_sha1_c11
-rw-r--r--package/grub/patches/patch-lib_libgcrypt-grub_cipher_sha256_c11
-rw-r--r--package/grub/patches/patch-lib_libgcrypt-grub_cipher_sha512_c11
-rw-r--r--package/grub/patches/patch-lib_libgcrypt-grub_cipher_tiger_c11
-rw-r--r--package/grub/patches/patch-lib_libgcrypt-grub_cipher_twofish_c20
-rw-r--r--package/grub/patches/patch-lib_libgcrypt-grub_cipher_whirlpool_c11
-rw-r--r--package/grub/patches/patch-util_grub-install_in11
-rw-r--r--package/grub/patches/patch-util_grub-mkconfig_lib_in11
-rw-r--r--package/grub/patches/patch-util_grub_d_10_linux_in20
-rw-r--r--package/hdparm/Makefile2
-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/id3lib/Makefile2
-rw-r--r--package/igmpproxy/patches/patch-src_igmpproxy_h10
-rw-r--r--package/ipcad/Makefile2
-rw-r--r--package/ipcad/patches/patch-Makefile169
-rw-r--r--package/ipcad/patches/patch-Makefile_in11
-rw-r--r--package/ipcad/patches/patch-cfg_y60
-rw-r--r--package/iperf/Makefile2
-rw-r--r--package/iproute2/Makefile2
-rw-r--r--package/iproute2/patches/patch-include_iptables_common_h25
-rw-r--r--package/iproute2/patches/patch-include_iptables_h38
-rw-r--r--package/iproute2/patches/patch-include_libiptc_ipt_kernel_headers_h25
-rw-r--r--package/iptables-snmp/Makefile2
-rw-r--r--package/iptables/Makefile26
-rwxr-xr-xpackage/iptables/files/firewall6.init2
-rw-r--r--package/iptables/files/ip6tables.postinst (renamed from package/osiris/files/osirisd.postinst)3
-rw-r--r--package/iptables/files/iptables.postinst1
-rw-r--r--package/iptables/patches/patch-extensions_GNUmakefile_in28
-rw-r--r--package/iptables/patches/patch-libxtables_Makefile_am11
-rw-r--r--package/kbd/Makefile13
-rw-r--r--package/kbd/patches/patch-src_dumpkeys_c11
-rw-r--r--package/kbd/patches/patch-src_kbdinfo_c46
-rw-r--r--package/kbd/patches/patch-src_kbdrate_c10
-rw-r--r--package/kbd/patches/patch-src_libkeymap_analyze_l11
-rw-r--r--package/kbd/patches/patch-src_libkeymap_common_c8
-rw-r--r--package/kbd/patches/patch-src_libkeymap_dump_c12
-rw-r--r--package/kbd/patches/patch-src_libkeymap_kernel_c13
-rw-r--r--package/kbd/patches/patch-src_libkeymap_kmap_c10
-rw-r--r--package/kbd/patches/patch-src_libkeymap_ksyms_c8
-rw-r--r--package/kbd/patches/patch-src_libkeymap_loadkeys_c8
-rw-r--r--package/kbd/patches/patch-src_libkeymap_parser_y11
-rw-r--r--package/kbd/patches/patch-src_libkeymap_summary_c13
-rw-r--r--package/kbd/patches/patch-src_loadkeys_c10
-rw-r--r--package/kbd/patches/patch-src_openvt_c8
-rw-r--r--package/kbd/patches/patch-src_setvtrgb_c70
-rw-r--r--package/kbd/patches/patch-tests_libkeymap-bkeymap_c7
-rw-r--r--package/kbd/patches/patch-tests_libkeymap-charset_c7
-rw-r--r--package/kbd/patches/patch-tests_libkeymap-dumpkeys_c7
-rw-r--r--package/kbd/patches/patch-tests_libkeymap-init_c7
-rw-r--r--package/kbd/patches/patch-tests_libkeymap-keys_c7
-rw-r--r--package/kbd/patches/patch-tests_libkeymap-kmap_c7
-rw-r--r--package/kbd/patches/patch-tests_libkeymap-mktable_c7
-rw-r--r--package/kbd/patches/patch-tests_libkeymap-parse_c7
-rw-r--r--package/kbd/patches/patch-tests_libkeymap-showmaps_c7
-rw-r--r--package/libatomic_ops/Makefile30
-rw-r--r--package/libcdio/Makefile9
-rw-r--r--package/libcec/Makefile4
-rw-r--r--package/libffi/Makefile1
-rw-r--r--package/libgc/Makefile35
-rw-r--r--package/libgc/patches/patch-os_dep_c39
-rw-r--r--package/libjasper/Makefile2
-rw-r--r--package/liblzo/Makefile1
-rw-r--r--package/libmodplug/Makefile8
-rw-r--r--package/libnetfilter_conntrack/Makefile8
-rw-r--r--package/libnetfilter_conntrack/patches/patch-include_libnetfilter_conntrack_libnetfilter_conntrack_h228
-rw-r--r--package/libnetfilter_conntrack/patches/patch-src_main_c20
-rw-r--r--package/libnetfilter_queue/Makefile2
-rw-r--r--package/libnfnetlink/Makefile4
-rw-r--r--package/libnfnetlink/patches/patch-include_libnfnetlink_libnfnetlink_h71
-rw-r--r--package/libnfnetlink/patches/patch-include_libnfnetlink_linux_nfnetlink_compat_h22
-rw-r--r--package/libnfnetlink/patches/patch-include_libnfnetlink_linux_nfnetlink_h41
-rw-r--r--package/libnfnetlink/patches/patch-src_libnfnetlink_c233
-rw-r--r--package/libnfs/Makefile4
-rw-r--r--package/libpciaccess/Makefile6
-rw-r--r--package/libpciaccess/patches/patch-src_freebsd_pci_c18
-rw-r--r--package/libpciaccess/patches/patch-src_linux_sysfs_c139
-rw-r--r--package/libpciaccess/patches/patch-src_netbsd_pci_c18
-rw-r--r--package/libpciaccess/patches/patch-src_openbsd_pci_c26
-rw-r--r--package/libpciaccess/patches/patch-src_pciaccess_private_h10
-rw-r--r--package/libpciaccess/patches/patch-src_solx_devfs_c10
-rw-r--r--package/libpciaccess/patches/patch-src_x86_pci_c10
-rw-r--r--package/libpthread/Makefile3
-rw-r--r--package/libpthread/files/libpthread.postinst4
-rw-r--r--package/librt/Makefile2
-rw-r--r--package/libssp/Makefile4
-rw-r--r--package/libstdcxx/Makefile2
-rw-r--r--package/libthread_db/Makefile2
-rw-r--r--package/libtirpc/Makefile4
-rw-r--r--package/libtirpc/patches/patch-src_auth_des_c18
-rw-r--r--package/libtirpc/patches/patch-src_auth_none_c10
-rw-r--r--package/libtirpc/patches/patch-src_auth_time_c18
-rw-r--r--package/libtirpc/patches/patch-src_auth_unix_c10
-rw-r--r--package/libtirpc/patches/patch-src_authdes_prot_c7
-rw-r--r--package/libtirpc/patches/patch-src_authunix_prot_c10
-rw-r--r--package/libtirpc/patches/patch-src_bindresvport_c18
-rw-r--r--package/libtirpc/patches/patch-src_clnt_bcast_c22
-rw-r--r--package/libtirpc/patches/patch-src_clnt_perror_c10
-rw-r--r--package/libtirpc/patches/patch-src_clnt_simple_c10
-rw-r--r--package/libtirpc/patches/patch-src_crypt_client_c10
-rw-r--r--package/libtirpc/patches/patch-src_des_crypt_c10
-rw-r--r--package/libtirpc/patches/patch-src_des_soft_c9
-rw-r--r--package/libtirpc/patches/patch-src_getnetconfig_c10
-rw-r--r--package/libtirpc/patches/patch-src_getnetpath_c16
-rw-r--r--package/libtirpc/patches/patch-src_getpeereid_c10
-rw-r--r--package/libtirpc/patches/patch-src_getpublickey_c10
-rw-r--r--package/libtirpc/patches/patch-src_key_call_c10
-rw-r--r--package/libtirpc/patches/patch-src_key_prot_xdr_c10
-rw-r--r--package/libtirpc/patches/patch-src_mt_misc_c8
-rw-r--r--package/libtirpc/patches/patch-src_pmap_clnt_c10
-rw-r--r--package/libtirpc/patches/patch-src_pmap_getmaps_c10
-rw-r--r--package/libtirpc/patches/patch-src_rpc_com_h31
-rw-r--r--package/libtirpc/patches/patch-src_rpc_generic_c10
-rw-r--r--package/libtirpc/patches/patch-src_rpcb_st_xdr_c10
-rw-r--r--package/libtirpc/patches/patch-src_rpcdname_c10
-rw-r--r--package/libtirpc/patches/patch-src_svc_dg_c10
-rw-r--r--package/libtirpc/patches/patch-src_svc_simple_c10
-rw-r--r--package/libtirpc/patches/patch-src_svc_vc_c10
-rw-r--r--package/libtirpc/patches/patch-src_xdr_array_c10
-rw-r--r--package/libtirpc/patches/patch-src_xdr_c10
-rw-r--r--package/libtirpc/patches/patch-src_xdr_float_c10
-rw-r--r--package/libtirpc/patches/patch-src_xdr_mem_c10
-rw-r--r--package/libtirpc/patches/patch-src_xdr_rec_c11
-rw-r--r--package/libtirpc/patches/patch-src_xdr_reference_c11
-rw-r--r--package/libtirpc/patches/patch-src_xdr_sizeof_c10
-rw-r--r--package/libtirpc/patches/patch-src_xdr_stdio_c10
-rw-r--r--package/libtirpc/patches/patch-tirpc_misc_event_h24
-rw-r--r--package/libtirpc/patches/patch-tirpc_netconfig_h23
-rw-r--r--package/libtirpc/patches/patch-tirpc_rpc_auth_des_h32
-rw-r--r--package/libtirpc/patches/patch-tirpc_rpc_auth_gss_h53
-rw-r--r--package/libtirpc/patches/patch-tirpc_rpc_auth_h192
-rw-r--r--package/libtirpc/patches/patch-tirpc_rpc_auth_unix_h26
-rw-r--r--package/libtirpc/patches/patch-tirpc_rpc_clnt_h132
-rw-r--r--package/libtirpc/patches/patch-tirpc_rpc_clnt_soc_h78
-rw-r--r--package/libtirpc/patches/patch-tirpc_rpc_des_crypt_h52
-rw-r--r--package/libtirpc/patches/patch-tirpc_rpc_nettype_h20
-rw-r--r--package/libtirpc/patches/patch-tirpc_rpc_pmap_clnt_h25
-rw-r--r--package/libtirpc/patches/patch-tirpc_rpc_pmap_prot_h27
-rw-r--r--package/libtirpc/patches/patch-tirpc_rpc_pmap_rmt_h26
-rw-r--r--package/libtirpc/patches/patch-tirpc_rpc_rpc_com_h31
-rw-r--r--package/libtirpc/patches/patch-tirpc_rpc_rpc_h44
-rw-r--r--package/libtirpc/patches/patch-tirpc_rpc_rpc_msg_h23
-rw-r--r--package/libtirpc/patches/patch-tirpc_rpc_rpcb_clnt_h23
-rw-r--r--package/libtirpc/patches/patch-tirpc_rpc_rpcent_h31
-rw-r--r--package/libtirpc/patches/patch-tirpc_rpc_svc_auth_h20
-rw-r--r--package/libtirpc/patches/patch-tirpc_rpc_svc_h152
-rw-r--r--package/libtirpc/patches/patch-tirpc_rpc_svc_soc_h102
-rw-r--r--package/libtirpc/patches/patch-tirpc_rpc_xdr_h53
-rw-r--r--package/libtirpc/patches/patch-tirpc_rpcsvc_crypt_x12
-rw-r--r--package/libtirpc/src/src/queue.h574
-rw-r--r--package/libxml2/Makefile3
-rw-r--r--package/logrotate/Makefile4
-rw-r--r--package/logrotate/patches/patch-Makefile57
-rw-r--r--package/logrotate/patches/patch-config_c8
-rw-r--r--package/logrotate/patches/patch-logrotate_c8
-rw-r--r--package/logrotate/patches/patch-logrotate_h11
-rw-r--r--package/logrotate/src/queue.h574
-rw-r--r--package/lynx/Makefile6
-rw-r--r--package/lynx/patches/patch-WWW_Library_Implementation_HTUtils_h14
-rw-r--r--package/lynx/patches/patch-makefile_in11
-rw-r--r--package/lynx/patches/patch-src_chrtrans_makeuctb_c19
-rw-r--r--package/lzma/Makefile28
-rw-r--r--package/lzop/Makefile6
-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/Makefile23
-rw-r--r--package/moc/Makefile5
-rw-r--r--package/mpd/Makefile2
-rw-r--r--package/mpd/patches/patch-src_db_SimpleDatabasePlugin_cxx91
-rw-r--r--package/mpd/patches/patch-src_thread_Id_hxx4
-rw-r--r--package/mpg123/Makefile4
-rw-r--r--package/mplayer/Makefile5
-rw-r--r--package/mrd6/Makefile2
-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/mutt/Makefile11
-rw-r--r--package/mutt/patches/patch-Makefile_in14
-rw-r--r--package/mutt/patches/patch-mutt_ssl_c20
-rw-r--r--package/mysql/Makefile122
-rw-r--r--package/mysql/patches/patch-cmake_os_Linux_cmake17
-rw-r--r--package/mysql/patches/patch-cmd-line-utils_libedit_chartype_h22
-rw-r--r--package/mysql/patches/patch-configure365
-rw-r--r--package/mysql/patches/patch-include_config_h_in21
-rw-r--r--package/mysql/patches/patch-include_my_global_h54
-rw-r--r--package/mysql/patches/patch-ltmain_sh11
-rw-r--r--package/mysql/patches/patch-scripts_mysql_config_sh11
-rw-r--r--package/mysql/patches/patch-sql_sql_builtin_cc15
-rw-r--r--package/nasm/Makefile4
-rw-r--r--package/net-tools/Makefile2
-rw-r--r--package/nginx/Makefile6
-rw-r--r--package/nmap/Makefile2
-rw-r--r--package/ntfs-3g/Makefile4
-rw-r--r--package/ntfs-3g/patches/patch-libfuse-lite_fusermount_c10
-rw-r--r--package/ntfs-3g/patches/patch-libfuse-lite_mount_util_c10
-rw-r--r--package/omxplayer/Makefile8
-rw-r--r--package/omxplayer/patches/patch-Makefile14
-rw-r--r--package/openldap/Makefile4
-rw-r--r--package/openssh/Makefile6
-rw-r--r--package/openssh/patches/patch-digest-openssl_c (renamed from package/openssh/patches/patch-digest_c)4
-rw-r--r--package/openssh/patches/patch-mac_c24
-rw-r--r--package/openssl/Makefile8
-rw-r--r--package/openswan/Makefile3
-rw-r--r--package/openswan/patches/patch-include_arpa_nameser_h128
-rw-r--r--package/openswan/patches/patch-lib_libipsecconf_cmp_c11
-rw-r--r--package/openswan/patches/patch-lib_libipsecconf_confread_c11
-rw-r--r--package/openswan/patches/patch-lib_libipsecconf_confwrite_c11
-rw-r--r--package/openswan/patches/patch-lib_libipsecconf_parser_l11
-rw-r--r--package/openswan/patches/patch-lib_libipsecconf_parser_y11
-rw-r--r--package/openswan/patches/patch-lib_libipsecconf_starterwhack_c11
-rw-r--r--package/openswan/patches/patch-lib_libopenswan_kernel_alg_c11
-rw-r--r--package/openswan/patches/patch-lib_libopenswan_oswlog_c11
-rw-r--r--package/openswan/src/ports/linux/include/queue.h574
-rw-r--r--package/osiris/Makefile39
-rw-r--r--package/osiris/files/osirisd.init28
-rw-r--r--package/osiris/patches/patch-configure113
-rw-r--r--package/osiris/patches/patch-src_db-4_2_52_dist_configure12
-rw-r--r--package/osiris/patches/patch-src_db-4_2_52_dist_ltmain_sh11
-rw-r--r--package/osiris/patches/patch-src_libosiris_Makefile_in41
-rw-r--r--package/osiris/patches/patch-src_libosiris_configuration_c27
-rw-r--r--package/osiris/patches/patch-src_libosiris_configuration_h13
-rw-r--r--package/osiris/patches/patch-src_libosiris_filter_c35
-rw-r--r--package/osiris/patches/patch-src_libosiris_filter_h23
-rw-r--r--package/osiris/patches/patch-src_libosiris_osi_common_h10
-rw-r--r--package/osiris/patches/patch-src_libosiris_ssl_utilities_c30
-rw-r--r--package/osiris/patches/patch-src_libosiris_ssl_utilities_h14
-rw-r--r--package/osiris/patches/patch-src_libosiris_utilities_c13
-rw-r--r--package/osiris/patches/patch-src_osirisd_modules_Makefile_am11
-rw-r--r--package/osiris/patches/patch-src_osirisd_modules_Makefile_in11
-rw-r--r--package/osiris/patches/patch-src_osirisd_scanner_c33
-rw-r--r--package/osiris/patches/patch-src_osirismd_md_control_c16
-rw-r--r--package/pcre/Makefile11
-rw-r--r--package/php/Makefile4
-rw-r--r--package/pixman/Makefile8
-rw-r--r--package/pixman/patches/patch-Makefile_in11
-rw-r--r--package/pkgconf/Makefile7
-rw-r--r--package/postfix/Makefile4
-rw-r--r--package/postfix/patches/patch-makedefs8
-rw-r--r--package/postfix/patches/patch-src_posttls-finger_posttls-finger_c10
-rw-r--r--package/postfix/patches/patch-src_util_sys_defs_h26
-rw-r--r--package/postgresql/Makefile8
-rw-r--r--package/python2/Makefile17
-rw-r--r--package/python3/Makefile34
-rw-r--r--package/python3/patches/patch-Makefile_pre_in70
-rw-r--r--package/python3/patches/patch-Modules_posixmodule_c20
-rw-r--r--package/qemu/Makefile33
-rw-r--r--package/qemu/patches/patch-linux-user_syscall_c25
-rw-r--r--package/qemu/patches/patch-util_qemu-openpty_c11
-rw-r--r--package/radvd/Makefile4
-rw-r--r--package/rdate/Makefile2
-rw-r--r--package/rng-tools/Makefile11
-rw-r--r--package/rrdcollect/Makefile10
-rw-r--r--package/samba/Makefile28
-rw-r--r--package/scons/Makefile7
-rw-r--r--package/shat/Makefile4
-rw-r--r--package/siproxd/Makefile8
-rw-r--r--package/siproxd/patches/patch-libltdl_ltmain_sh11
-rw-r--r--package/siproxd/patches/patch-scripts_ltmain_sh11
-rw-r--r--package/siproxd/patches/patch-src_resolve_c10
-rw-r--r--package/socat/Makefile6
-rw-r--r--package/socat/patches/patch-Makefile_in (renamed from package/socat/patches/501-honor_ldflags.patch)5
-rw-r--r--package/socat/patches/patch-configure23
-rw-r--r--package/sox/Makefile8
-rw-r--r--package/sox/patches/patch-ltmain_sh11
-rw-r--r--package/sox/patches/patch-src_formats_c18
-rw-r--r--package/squashfs/Makefile38
-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/squid/Makefile2
-rw-r--r--package/squid/patches/patch-lib_rfcnb_rfcnb-io_c11
-rw-r--r--package/sudo/Makefile15
-rw-r--r--package/sudo/patches/patch-compat_Makefile_in15
-rw-r--r--package/sudo/patches/patch-plugins_sudoers_match_c54
-rw-r--r--package/syslinux/Makefile35
-rw-r--r--package/tcl/Makefile8
-rw-r--r--package/tcl/patches/patch-unix_Makefile_in21
-rw-r--r--package/tinyproxy/Makefile26
-rw-r--r--package/tinyproxy/patches/patch-Makefile_am10
-rw-r--r--package/tinyproxy/patches/patch-configure24
-rw-r--r--package/tinyproxy/patches/patch-configure_ac27
-rw-r--r--package/uclibc/Makefile2
-rw-r--r--package/vlc/Makefile7
-rw-r--r--package/vlc/patches/patch-modules_text_renderer_freetype_c11
-rw-r--r--package/w3m/Makefile31
-rw-r--r--package/w3m/patches/patch-Makefile_in35
-rw-r--r--package/w3m/patches/patch-istream_c38
-rw-r--r--package/w3m/patches/patch-istream_h20
-rw-r--r--package/w3m/patches/patch-main_c11
-rw-r--r--package/watchdog/Makefile7
-rw-r--r--package/watchdog/patches/patch-include_extern_h9
-rw-r--r--package/watchdog/patches/patch-src_memory_c11
-rw-r--r--package/watchdog/patches/patch-src_mntent_c11
-rw-r--r--package/watchdog/patches/patch-src_net_c10
-rw-r--r--package/watchdog/patches/patch-src_shutdown_c18
-rw-r--r--package/watchdog/patches/patch-src_umount_c11
-rw-r--r--package/xbmc/Makefile1
-rw-r--r--package/xf86-video-fbdev/Makefile4
-rw-r--r--package/xinetd/Makefile7
-rw-r--r--package/xinetd/patches/patch-Makefile_in13
-rw-r--r--package/xinetd/patches/patch-xinetd_confparse_c18
-rw-r--r--package/xterm/Makefile6
-rw-r--r--package/xz/Makefile5
-rw-r--r--package/zile/Makefile31
-rw-r--r--package/zile/patches/patch-Makefile_am23
-rw-r--r--rules.mk1
-rwxr-xr-xscripts/adkprepare.sh10
-rwxr-xr-xscripts/create.sh13
-rwxr-xr-xscripts/find9
-rw-r--r--scripts/gcc-bisect.sh206
-rwxr-xr-xscripts/install-rpi.sh156
-rw-r--r--scripts/scan-tools.sh134
-rwxr-xr-xscripts/tarpkg4
-rw-r--r--scripts/toolchain.cmake.in10
-rwxr-xr-xscripts/xargs9
-rw-r--r--target/arm/Makefile4
-rw-r--r--target/arm/cubox-i/patches/3.10.34/solidrun-cubox-i.patch (renamed from target/arm/cubox-i/patches/3.10.33/solidrun-cubox-i.patch)0
-rw-r--r--target/arm/kernel/qemu-arm-versatilepb1
-rw-r--r--target/arm/kernel/qemu-arm-vexpress-a91
-rw-r--r--target/arm/raspberry-pi/patches/3.10.34/raspberry-pi.patch (renamed from target/arm/raspberry-pi/patches/3.10.33/raspberry-pi.patch)0
-rw-r--r--target/arm/sys-available/acmesystems-foxg201
-rw-r--r--target/arm/sys-available/cubox-i2
-rw-r--r--target/arm/sys-available/qemu-arm1
-rw-r--r--target/arm/sys-available/raspberry-pi2
-rw-r--r--target/arm/sys-available/toolchain-arm2
-rw-r--r--target/arm/sys-available/toolchain-armhf2
-rw-r--r--target/arm/target.mk1
-rw-r--r--target/config/Config.in110
-rw-r--r--target/config/Config.in.adk14
-rw-r--r--target/config/Config.in.runtime12
-rw-r--r--target/config/Config.in.tools124
-rw-r--r--target/linux/config/Config.in.audio2
-rw-r--r--target/linux/config/Config.in.block2
-rw-r--r--target/linux/config/Config.in.debug2
-rw-r--r--target/linux/config/Config.in.flash9
-rw-r--r--target/linux/config/Config.in.fs33
-rw-r--r--target/linux/config/Config.in.graphics8
-rw-r--r--target/linux/config/Config.in.kernel2
-rw-r--r--target/linux/config/Config.in.netdevice23
-rw-r--r--target/linux/config/Config.in.netfilter.ip416
-rw-r--r--target/linux/config/Config.in.network2
-rw-r--r--target/linux/config/Config.in.spi6
-rw-r--r--target/linux/config/Config.in.usb6
-rw-r--r--target/linux/patches/3.10.34/bsd-compatibility.patch (renamed from target/linux/patches/3.10.33/bsd-compatibility.patch)0
-rw-r--r--target/linux/patches/3.10.34/startup.patch (renamed from target/linux/patches/3.10.33/startup.patch)0
-rw-r--r--target/linux/patches/3.12.14/bsd-compatibility.patch (renamed from target/linux/patches/3.12.13/bsd-compatibility.patch)0
-rw-r--r--target/linux/patches/3.12.14/defaults.patch (renamed from target/linux/patches/3.12.13/defaults.patch)0
-rw-r--r--target/linux/patches/3.12.14/disable-netfilter.patch (renamed from target/linux/patches/3.12.13/disable-netfilter.patch)0
-rw-r--r--target/linux/patches/3.12.14/export-symbol-for-exmap.patch (renamed from target/linux/patches/3.12.13/export-symbol-for-exmap.patch)0
-rw-r--r--target/linux/patches/3.12.14/gemalto.patch (renamed from target/linux/patches/3.12.13/gemalto.patch)0
-rw-r--r--target/linux/patches/3.12.14/lemote-rfkill.patch (renamed from target/linux/patches/3.12.13/lemote-rfkill.patch)0
-rw-r--r--target/linux/patches/3.12.14/microblaze-ethernet.patch (renamed from target/linux/patches/3.12.13/microblaze-ethernet.patch)0
-rw-r--r--target/linux/patches/3.12.14/microblaze-setup.patch (renamed from target/linux/patches/3.12.13/microblaze-setup.patch)0
-rw-r--r--target/linux/patches/3.12.14/mips-lzo-fix.patch (renamed from target/linux/patches/3.12.13/mips-lzo-fix.patch)0
-rw-r--r--target/linux/patches/3.12.14/mtd-rootfs.patch (renamed from target/linux/patches/3.12.13/mtd-rootfs.patch)0
-rw-r--r--target/linux/patches/3.12.14/non-static.patch (renamed from target/linux/patches/3.12.13/non-static.patch)0
-rw-r--r--target/linux/patches/3.12.14/ppc64-missing-zlib.patch (renamed from target/linux/patches/3.12.13/ppc64-missing-zlib.patch)0
-rw-r--r--target/linux/patches/3.12.14/raspberry.patch (renamed from target/linux/patches/3.12.13/raspberry.patch)0
-rw-r--r--target/linux/patches/3.12.14/startup.patch (renamed from target/linux/patches/3.12.13/startup.patch)0
-rw-r--r--target/linux/patches/3.12.14/usb-defaults-off.patch (renamed from target/linux/patches/3.12.13/usb-defaults-off.patch)0
-rw-r--r--target/linux/patches/3.12.14/uuid.patch (renamed from target/linux/patches/3.12.13/uuid.patch)0
-rw-r--r--target/linux/patches/3.12.14/vga-cons-default-off.patch (renamed from target/linux/patches/3.12.13/vga-cons-default-off.patch)0
-rw-r--r--target/linux/patches/3.12.14/wlan-cf.patch (renamed from target/linux/patches/3.12.13/wlan-cf.patch)0
-rw-r--r--target/linux/patches/3.12.14/xargs.patch (renamed from target/linux/patches/3.12.13/xargs.patch)0
-rw-r--r--target/linux/patches/3.12.14/zlib-inflate.patch (renamed from target/linux/patches/3.12.13/zlib-inflate.patch)0
-rw-r--r--target/linux/patches/3.13.7/bsd-compatibility.patch (renamed from target/linux/patches/3.13.6/bsd-compatibility.patch)0
-rw-r--r--target/linux/patches/3.13.7/defaults.patch (renamed from target/linux/patches/3.13.6/defaults.patch)0
-rw-r--r--target/linux/patches/3.13.7/disable-netfilter.patch (renamed from target/linux/patches/3.13.6/disable-netfilter.patch)0
-rw-r--r--target/linux/patches/3.13.7/export-symbol-for-exmap.patch (renamed from target/linux/patches/3.13.6/export-symbol-for-exmap.patch)0
-rw-r--r--target/linux/patches/3.13.7/fblogo.patch2097
-rw-r--r--target/linux/patches/3.13.7/gemalto.patch (renamed from target/linux/patches/3.13.6/gemalto.patch)0
-rw-r--r--target/linux/patches/3.13.7/lemote-rfkill.patch (renamed from target/linux/patches/3.13.6/lemote-rfkill.patch)0
-rw-r--r--target/linux/patches/3.13.7/microblaze-axi.patch (renamed from target/linux/patches/3.13.6/microblaze-axi.patch)0
-rw-r--r--target/linux/patches/3.13.7/microblaze-early-printk.patch (renamed from target/linux/patches/3.13.6/microblaze-early-printk.patch)0
-rw-r--r--target/linux/patches/3.13.7/microblaze-ethernet.patch (renamed from target/linux/patches/3.13.6/microblaze-ethernet.patch)0
-rw-r--r--target/linux/patches/3.13.7/microblaze-setup.patch (renamed from target/linux/patches/3.13.6/microblaze-setup.patch)0
-rw-r--r--target/linux/patches/3.13.7/mtd-rootfs.patch (renamed from target/linux/patches/3.13.6/mtd-rootfs.patch)0
-rw-r--r--target/linux/patches/3.13.7/non-static.patch (renamed from target/linux/patches/3.13.6/non-static.patch)0
-rw-r--r--target/linux/patches/3.13.7/ppc64-missing-zlib.patch (renamed from target/linux/patches/3.13.6/ppc64-missing-zlib.patch)0
-rw-r--r--target/linux/patches/3.13.7/ppc64-missing_arch_random.patch (renamed from target/linux/patches/3.13.6/ppc64-missing_arch_random.patch)0
-rw-r--r--target/linux/patches/3.13.7/raspberry.patch (renamed from target/linux/patches/3.13.6/raspberry.patch)0
-rw-r--r--target/linux/patches/3.13.7/startup.patch (renamed from target/linux/patches/3.13.6/startup.patch)0
-rw-r--r--target/linux/patches/3.13.7/uuid.patch (renamed from target/linux/patches/3.13.6/uuid.patch)0
-rw-r--r--target/linux/patches/3.13.7/vga-cons-default-off.patch (renamed from target/linux/patches/3.13.6/vga-cons-default-off.patch)0
-rw-r--r--target/linux/patches/3.13.7/wlan-cf.patch (renamed from target/linux/patches/3.13.6/wlan-cf.patch)0
-rw-r--r--target/linux/patches/3.13.7/xargs.patch (renamed from target/linux/patches/3.13.6/xargs.patch)0
-rw-r--r--target/linux/patches/3.13.7/zlib-inflate.patch (renamed from target/linux/patches/3.13.6/zlib-inflate.patch)0
-rw-r--r--target/linux/patches/3.4.84/bsd-compatibility.patch (renamed from target/linux/patches/3.4.82/bsd-compatibility.patch)0
-rw-r--r--target/linux/patches/3.4.84/defaults.patch (renamed from target/linux/patches/3.4.82/defaults.patch)0
-rw-r--r--target/linux/patches/3.4.84/gemalto.patch (renamed from target/linux/patches/3.4.82/gemalto.patch)0
-rw-r--r--target/linux/patches/3.4.84/lemote-rfkill.patch (renamed from target/linux/patches/3.4.82/lemote-rfkill.patch)0
-rw-r--r--target/linux/patches/3.4.84/mips-error.patch (renamed from target/linux/patches/3.4.82/mips-error.patch)0
-rw-r--r--target/linux/patches/3.4.84/module-alloc-size-check.patch (renamed from target/linux/patches/3.4.82/module-alloc-size-check.patch)0
-rw-r--r--target/linux/patches/3.4.84/non-static.patch (renamed from target/linux/patches/3.4.82/non-static.patch)0
-rw-r--r--target/linux/patches/3.4.84/sparc-include.patch (renamed from target/linux/patches/3.4.82/sparc-include.patch)0
-rw-r--r--target/linux/patches/3.4.84/startup.patch (renamed from target/linux/patches/3.4.82/startup.patch)0
-rw-r--r--target/linux/patches/3.4.84/usb-defaults-off.patch (renamed from target/linux/patches/3.4.82/usb-defaults-off.patch)0
-rw-r--r--target/linux/patches/3.4.84/uuid.patch (renamed from target/linux/patches/3.4.82/uuid.patch)0
-rw-r--r--target/linux/patches/3.4.84/vga-cons-default-off.patch (renamed from target/linux/patches/3.4.82/vga-cons-default-off.patch)0
-rw-r--r--target/linux/patches/3.4.84/wlan-cf.patch (renamed from target/linux/patches/3.4.82/wlan-cf.patch)0
-rw-r--r--target/linux/patches/3.4.84/zlib-inflate.patch (renamed from target/linux/patches/3.4.82/zlib-inflate.patch)0
-rw-r--r--target/m68k/Makefile8
-rw-r--r--target/m68k/aranym.cfg.in195
-rw-r--r--target/m68k/kernel/aranym-m68k8
-rw-r--r--target/m68k/sys-available/toolchain-m68k2
-rw-r--r--target/m68k/target.mk1
-rw-r--r--target/microblaze/Makefile16
-rw-r--r--target/microblaze/kernel/qemu-microblaze-ml6051
-rw-r--r--target/microblaze/kernel/qemu-microblaze-s3adsp18001
-rw-r--r--target/microblaze/s3adsp1800.dtbbin0 -> 8369 bytes
-rw-r--r--target/microblaze/s3adsp1800.dts287
-rw-r--r--target/microblaze/sys-available/qemu-microblaze1
-rw-r--r--target/microblaze/sys-available/qemu-microblazeel3
-rw-r--r--target/microblaze/sys-available/toolchain-microblaze2
-rw-r--r--target/microblaze/sys-available/toolchain-microblazeel2
-rw-r--r--target/microblaze/target.mk1
-rw-r--r--target/mips/Makefile2
-rw-r--r--target/mips/kernel/qemu-mips1
-rw-r--r--target/mips/kernel/qemu-mips641
-rw-r--r--target/mips/kernel/qemu-mips64el1
-rw-r--r--target/mips/kernel/qemu-mipsel1
-rw-r--r--target/mips/sys-available/lemote-yeelong1
-rw-r--r--target/mips/sys-available/mikrotik-rb5321
-rw-r--r--target/mips/sys-available/qemu-mips4
-rw-r--r--target/mips/sys-available/qemu-mips645
-rw-r--r--target/mips/sys-available/qemu-mips64el5
-rw-r--r--target/mips/sys-available/qemu-mips64eln3212
-rw-r--r--target/mips/sys-available/qemu-mips64eln6412
-rw-r--r--target/mips/sys-available/qemu-mips64n3213
-rw-r--r--target/mips/sys-available/qemu-mips64n6413
-rw-r--r--target/mips/sys-available/qemu-mipsel4
-rw-r--r--target/mips/sys-available/toolchain-mips6
-rw-r--r--target/mips/sys-available/toolchain-mips642
-rw-r--r--target/mips/sys-available/toolchain-mips64el2
-rw-r--r--target/mips/sys-available/toolchain-mips64eln322
-rw-r--r--target/mips/sys-available/toolchain-mips64eln642
-rw-r--r--target/mips/sys-available/toolchain-mips64n322
-rw-r--r--target/mips/sys-available/toolchain-mips64n642
-rw-r--r--target/mips/sys-available/toolchain-mipsel6
-rw-r--r--target/mips/target.mk1
-rw-r--r--target/packages/pkg-available/console1
-rw-r--r--target/packages/pkg-available/mpdbox10
-rw-r--r--target/packages/pkg-available/test2
-rw-r--r--target/ppc/Makefile2
-rw-r--r--target/ppc/sys-available/toolchain-ppc2
-rw-r--r--target/ppc/target.mk1
-rw-r--r--target/ppc64/Makefile2
-rw-r--r--target/ppc64/sys-available/qemu-ppc641
-rw-r--r--target/ppc64/sys-available/toolchain-ppc643
-rw-r--r--target/ppc64/target.mk1
-rw-r--r--target/sh/Makefile2
-rw-r--r--target/sh/sys-available/toolchain-sh2
-rw-r--r--target/sh/sys-available/toolchain-sh411
-rw-r--r--target/sh/sys-available/toolchain-sh4eb11
-rw-r--r--target/sh/sys-available/toolchain-sheb2
-rw-r--r--target/sh/target.mk1
-rw-r--r--target/sparc/Makefile2
-rw-r--r--target/sparc/sys-available/toolchain-sparc2
-rw-r--r--target/sparc/target.mk1
-rw-r--r--target/sparc64/Makefile2
-rw-r--r--target/sparc64/sys-available/qemu-sparc641
-rw-r--r--target/sparc64/sys-available/toolchain-sparc643
-rw-r--r--target/sparc64/target.mk1
-rw-r--r--target/tarch.lst5
-rw-r--r--target/x86/Makefile11
-rw-r--r--target/x86/kernel/generic-pc23
-rw-r--r--target/x86/kernel/qemu-x86 (renamed from target/x86/kernel/qemu-i686)0
-rw-r--r--target/x86/sys-available/generic-pc9
-rw-r--r--target/x86/sys-available/ibm-x403
-rw-r--r--target/x86/sys-available/pcengines-alix1c1
-rw-r--r--target/x86/sys-available/pcengines-alix2d131
-rw-r--r--target/x86/sys-available/pcengines-alix2d21
-rw-r--r--target/x86/sys-available/pcengines-wrap1
-rw-r--r--target/x86/sys-available/qemu-i48610
-rw-r--r--target/x86/sys-available/qemu-i6862
-rw-r--r--target/x86/sys-available/toolchain-i6862
-rw-r--r--target/x86/target.mk1
-rw-r--r--target/x86_64/sys-available/qemu-x86_641
-rw-r--r--target/x86_64/sys-available/qemu-x86_64_x3212
-rw-r--r--target/x86_64/sys-available/toolchain-x86_644
-rw-r--r--target/x86_64/sys-available/toolchain-x86_64_3212
-rw-r--r--target/x86_64/sys-available/toolchain-x86_64_x3212
-rw-r--r--target/x86_64/target.mk1
-rw-r--r--toolchain/Config.in28
-rw-r--r--toolchain/Makefile4
-rw-r--r--toolchain/binutils/Makefile16
-rw-r--r--toolchain/binutils/Makefile.inc3
-rw-r--r--toolchain/gcc/Makefile15
-rw-r--r--toolchain/gcc/Makefile.inc8
-rw-r--r--toolchain/gcc/patches/4.8.2/abi32.patch54
-rw-r--r--toolchain/gcc/patches/4.8.2/miscompile.sparc154
-rw-r--r--toolchain/gdb/Makefile.inc3
-rw-r--r--toolchain/glibc/Makefile.inc2
-rw-r--r--toolchain/glibc/tarch.lst22
-rw-r--r--toolchain/kernel-headers/patches/3.10.34/cleankernel.patch (renamed from toolchain/kernel-headers/patches/3.10.33/cleankernel.patch)0
-rw-r--r--toolchain/kernel-headers/patches/3.10.34/mkpiggy.patch (renamed from toolchain/kernel-headers/patches/3.10.33/mkpiggy.patch)0
-rw-r--r--toolchain/kernel-headers/patches/3.10.34/relocs.patch (renamed from toolchain/kernel-headers/patches/3.10.33/relocs.patch)0
-rw-r--r--toolchain/kernel-headers/patches/3.10.34/sgidefs.patch (renamed from toolchain/kernel-headers/patches/3.10.33/sgidefs.patch)0
-rw-r--r--toolchain/kernel-headers/patches/3.10.34/sortext.patch (renamed from toolchain/kernel-headers/patches/3.10.33/sortext.patch)0
-rw-r--r--toolchain/kernel-headers/patches/3.11.10/microperl.patch13
-rw-r--r--toolchain/kernel-headers/patches/3.12.13/microperl.patch13
-rw-r--r--toolchain/kernel-headers/patches/3.12.14/cleankernel.patch (renamed from toolchain/kernel-headers/patches/3.12.13/cleankernel.patch)0
-rw-r--r--toolchain/kernel-headers/patches/3.12.14/mkpiggy.patch (renamed from toolchain/kernel-headers/patches/3.12.13/mkpiggy.patch)0
-rw-r--r--toolchain/kernel-headers/patches/3.12.14/relocs.patch (renamed from toolchain/kernel-headers/patches/3.12.13/relocs.patch)0
-rw-r--r--toolchain/kernel-headers/patches/3.12.14/sgidefs.patch (renamed from toolchain/kernel-headers/patches/3.12.13/sgidefs.patch)0
-rw-r--r--toolchain/kernel-headers/patches/3.12.14/sortext.patch (renamed from toolchain/kernel-headers/patches/3.12.13/sortext.patch)0
-rw-r--r--toolchain/kernel-headers/patches/3.13.6/microperl.patch13
-rw-r--r--toolchain/kernel-headers/patches/3.13.7/cleankernel.patch (renamed from toolchain/kernel-headers/patches/3.13.6/cleankernel.patch)0
-rw-r--r--toolchain/kernel-headers/patches/3.13.7/mkpiggy.patch (renamed from toolchain/kernel-headers/patches/3.13.6/mkpiggy.patch)0
-rw-r--r--toolchain/kernel-headers/patches/3.13.7/relocs.patch (renamed from toolchain/kernel-headers/patches/3.13.6/relocs.patch)0
-rw-r--r--toolchain/kernel-headers/patches/3.13.7/sgidefs.patch (renamed from toolchain/kernel-headers/patches/3.13.6/sgidefs.patch)0
-rw-r--r--toolchain/kernel-headers/patches/3.13.7/sortext.patch (renamed from toolchain/kernel-headers/patches/3.13.6/sortext.patch)0
-rw-r--r--toolchain/kernel-headers/patches/3.4.82/microperl.patch24
-rw-r--r--toolchain/kernel-headers/patches/3.4.84/aufs2.patch (renamed from toolchain/kernel-headers/patches/3.4.82/aufs2.patch)0
-rw-r--r--toolchain/kernel-headers/patches/3.4.84/linux-gcc-check.patch (renamed from toolchain/kernel-headers/patches/3.4.82/linux-gcc-check.patch)0
-rw-r--r--toolchain/kernel-headers/patches/3.4.84/mkpiggy.patch (renamed from toolchain/kernel-headers/patches/3.4.82/mkpiggy.patch)0
-rw-r--r--toolchain/kernel-headers/patches/3.4.84/relocs.patch (renamed from toolchain/kernel-headers/patches/3.4.82/relocs.patch)0
-rw-r--r--toolchain/musl/Makefile21
-rw-r--r--toolchain/musl/Makefile.inc5
-rw-r--r--toolchain/musl/patches/musl-git-20140319.patch8864
-rw-r--r--toolchain/musl/tarch.lst12
-rw-r--r--toolchain/uclibc/Makefile (renamed from toolchain/uClibc/Makefile)3
-rw-r--r--toolchain/uclibc/Makefile.inc (renamed from toolchain/uClibc/Makefile.inc)4
-rw-r--r--toolchain/uclibc/patches/uclibc-git-20140313.patch (renamed from toolchain/uClibc/patches/uclibc-git-20140313.patch)0
-rw-r--r--toolchain/uclibc/patches/xxx-origin.patch (renamed from toolchain/uClibc/patches/xxx-origin.patch)0
-rw-r--r--toolchain/uclibc/patches/xxx-sparc-wait4.patch (renamed from toolchain/uClibc/patches/xxx-sparc-wait4.patch)0
-rw-r--r--toolchain/uclibc/tarch.lst16
-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/pcre/Makefile30
-rw-r--r--tools/rules.mk7
-rw-r--r--tools/squashfs/Makefile29
-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
846 files changed, 14236 insertions, 14020 deletions
diff --git a/.gitignore b/.gitignore
index 55f82fdd7..68214f10b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,20 +1,28 @@
-/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/tools/depmaker.dSYM/
+/adk/tools/pkgmaker.dSYM/
+/adk/tools/pkgrebuild.dSYM/
+/adk/tests/master.exp
+/adk/tests/adk.exp
+/adk/tests/adk.exp.in.tmp
/prereq.mk
/toolchain_*/
/.ADK_HAVE_DOT_CONFIG
@@ -32,8 +40,6 @@
/root_*/
/firmware/
/build_*/
-/config/*.o
-/config/lxdialog/*.o
/make.log
/dl
/package/Config.in.auto*
@@ -41,7 +47,6 @@
/package/*/Config.in
/package/*/Config.in.lib
/package/*/Config.in.kmod
-/tools_build/
/extra/
/.menu
/.adkinit
@@ -51,5 +56,8 @@
/target/packages/Config.in
/target/config/Config.in.system.default
/target/config/Config.in.system
+/target/config/Config.in.scripts
/target/config/Config.in.native
/target/config/Config.in.arch
+/target/config/Config.in.prereq
+/target/m68k/aranym.cfg
diff --git a/BUGS b/BUGS
index 70759ad05..38c61307f 100644
--- a/BUGS
+++ b/BUGS
@@ -2,4 +2,4 @@
- qemu-sh4: usb keyboard is broken
- qemu-arm: thumb mode with glibc does not boot
- qemu-sparc64: ide driver not working, only virtio (but unstable)
-- qemu-microblaze: network card emulation fails, little endian works
+- qemu-microblaze: ml605 early printk and network card emulation fails, little endian works
diff --git a/Config.in b/Config.in
index acea6b6b2..01e64ae07 100644
--- a/Config.in
+++ b/Config.in
@@ -32,11 +32,6 @@ config ADK_CHOOSE_TARGET_SYSTEM
source "target/config/Config.in"
-menu "Runtime configuration"
-depends on !ADK_CHOOSE_TARGET_ARCH && !ADK_CHOOSE_TARGET_SYSTEM
-source "target/config/Config.in.runtime"
-endmenu
-
menu "Package collection"
depends on !ADK_CHOOSE_TARGET_ARCH && !ADK_CHOOSE_TARGET_SYSTEM
source "target/packages/Config.in"
@@ -89,12 +84,17 @@ source "package/Config.in.auto.global"
source "package/Config.in.auto"
endmenu
+menu "Runtime configuration"
+depends on !ADK_CHOOSE_TARGET_ARCH && !ADK_CHOOSE_TARGET_SYSTEM
+source "target/config/Config.in.runtime"
+endmenu
+
choice
prompt "Kernel Version"
depends on ADK_TOOLCHAIN_ONLY
config ADK_KERNEL_VERSION_TOOLCHAIN
- prompt "3.13.6"
+ prompt "3.13.7"
boolean
depends on ADK_TOOLCHAIN_ONLY
@@ -106,35 +106,35 @@ depends on !ADK_TOOLCHAIN_ONLY && !ADK_CHOOSE_TARGET_ARCH && !ADK_CHOOSE_TARGET_
choice
prompt "Kernel Version"
-config ADK_KERNEL_VERSION_3_13_6
- prompt "3.13.6"
+config ADK_KERNEL_VERSION_3_13_7
+ prompt "3.13.7"
boolean
-config ADK_KERNEL_VERSION_3_12_13
- prompt "3.12.13"
+config ADK_KERNEL_VERSION_3_12_14
+ prompt "3.12.14"
boolean
config ADK_KERNEL_VERSION_3_11_10
prompt "3.11.10"
boolean
-config ADK_KERNEL_VERSION_3_10_33
- prompt "3.10.33"
+config ADK_KERNEL_VERSION_3_10_34
+ prompt "3.10.34"
boolean
-config ADK_KERNEL_VERSION_3_4_82
- prompt "3.4.82"
+config ADK_KERNEL_VERSION_3_4_84
+ prompt "3.4.84"
boolean
endchoice
config ADK_KERNEL_VERSION
string
- default "3.13.6" if ADK_KERNEL_VERSION_3_13_6
- default "3.12.13" if ADK_KERNEL_VERSION_3_12_13
+ default "3.13.7" if ADK_KERNEL_VERSION_3_13_7
+ default "3.12.14" if ADK_KERNEL_VERSION_3_12_14
default "3.11.10" if ADK_KERNEL_VERSION_3_11_10
- default "3.10.33" if ADK_KERNEL_VERSION_3_10_33
- default "3.4.82" if ADK_KERNEL_VERSION_3_4_82
+ default "3.10.34" if ADK_KERNEL_VERSION_3_10_34
+ default "3.4.84" if ADK_KERNEL_VERSION_3_4_84
help
config ADK_KERNEL_COMP_GZIP_RASPBERRY_PI
diff --git a/Makefile b/Makefile
index 8c603e196..396675ac2 100644
--- a/Makefile
+++ b/Makefile
@@ -224,6 +224,7 @@ NO_ERROR=0
@echo "_PATH:=$$PATH" >>prereq.mk
@echo "PATH:=\$${TOPDIR}/scripts:/usr/sbin:$$PATH" >>prereq.mk
@echo "SHELL:=$$(which bash)" >>prereq.mk
+ @echo "GIT:=$$(which git 2>/dev/null)" >>prereq.mk
@env NO_ERROR=${NO_ERROR} BASH="$$(which bash)" \
CC='${CC}' CPPFLAGS='${CPPFLAGS}' \
bash scripts/scan-tools.sh
diff --git a/README b/README
index 65011f0ad..81ebd7798 100644
--- a/README
+++ b/README
@@ -5,12 +5,12 @@ This is a menu based buildsystem for your home made embedded Linux system.
Before you can start you need to install some tools:
- bash
-- gcc
+- gcc or clang
+- g++ or clang++
- binutils
- GNU make
- GNU awk
- GNU sed
-- findutils (find, xargs)
- tar
- patch
- gzip
@@ -19,7 +19,6 @@ Before you can start you need to install some tools:
- ncurses5 headers
- zlib headers
- perl
-- git
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/TODO b/TODO
index 6b54af848..a0428ef4e 100644
--- a/TODO
+++ b/TODO
@@ -1,13 +1,16 @@
+- hash-style=gnu for non-mips and non-musl
+- fix libiberty.a mess
- check gold for mozilla compile
+- check for gcc and SSP again
+- config.site/config.cache usage for speedup?
+ http://lists.gnu.org/archive/html/autoconf/2014-03/msg00031.html
- add daemon() function to functions.sh
- add printing of OK/FAIL (optional verbose bootup)
- fixup rework libgcc --export-symbols
- libgcc static?
- static toolchain support
-- toolchain in /usr , check gcj
- try Preset Loops per Jiffy for faster bootup via lpj=
- port uuterm
-- hash-style=gnu for non-mips and non-musl
- add fb full screen logo
- port opkg with gpg signing
- restart network (kill wpa_supplicant)
@@ -15,7 +18,6 @@
- add grsec kernel patch
- microblaze: add cfgfs partition to dts, add partition to spartan dts
- evaluate libguestfs for image creation
-- check for gcc and SSP again
-- port w3m
+- port msmtp
- rutorrent porting
- lms perl
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/pkgmaker.c b/adk/tools/pkgmaker.c
index 51d31aa70..6997f3def 100644
--- a/tools/adk/pkgmaker.c
+++ b/adk/tools/pkgmaker.c
@@ -304,13 +304,18 @@ static char *toupperstr(char *string) {
int main() {
- DIR *pkgdir, *pkglistdir;
+ DIR *pkgdir, *pkglistdir, *scriptdir;
struct dirent *pkgdirp;
- FILE *pkg, *cfg, *menuglobal, *section;
+ struct dirent *scriptdirp;
+ size_t len;
+ FILE *pkg, *cfg, *menuglobal, *section, *initscript, *icfg;
char hvalue[MAXVALUE];
char buf[MAXPATH];
+ char ibuf[MAXPATH];
char tbuf[MAXPATH];
char path[MAXPATH];
+ char script[MAXPATH];
+ char script2[MAXPATH];
char spath[MAXPATH];
char dir[MAXPATH];
char variable[2*MAXVAR];
@@ -320,9 +325,10 @@ int main() {
char *pkg_need_cxx, *pkg_need_java, *pkgname, *sysname, *pkg_debug;
char *pkg_libc_depends, *pkg_host_depends, *pkg_system_depends, *pkg_arch_depends, *pkg_flavours, *pkg_flavours_string, *pkg_choices, *pseudo_name;
char *packages, *pkg_name_u, *pkgs, *pkg_opts, *pkg_libname;
- char *saveptr, *p_ptr, *s_ptr, *pkg_helper;
+ char *saveptr, *p_ptr, *s_ptr, *pkg_helper, *sname, *sname2;
int result;
StrMap *pkgmap, *sectionmap;
+ const char runtime[] = "target/config/Config.in.scripts";
pkg_name = NULL;
pkg_descr = NULL;
@@ -355,6 +361,7 @@ int main() {
s_ptr = NULL;
unlink("package/Config.in.auto");
+ unlink(runtime);
/* open global sectionfile */
menuglobal = fopen("package/Config.in.auto.global", "w");
if (menuglobal == NULL)
@@ -410,6 +417,7 @@ int main() {
fprintf(cfg, "\t C library header files.\n\n");
fclose(cfg);
+
/* read Makefile's for all packages */
pkgdir = opendir("package");
while ((pkgdirp = readdir(pkgdir)) != NULL) {
@@ -421,6 +429,57 @@ int main() {
if (pkg == NULL)
continue;
+ /* runtime configuration */
+ if (snprintf(script, MAXPATH, "package/%s/files", pkgdirp->d_name) < 0)
+ fatal_error("script variable creation failed.");
+ scriptdir = opendir(script);
+ if (scriptdir != NULL) {
+ while ((scriptdirp = readdir(scriptdir)) != NULL) {
+ /* skip dotfiles */
+ if (strncmp(scriptdirp->d_name, ".", 1) > 0) {
+ len = strlen(scriptdirp->d_name);
+ if (strlen(".init") > len)
+ continue;
+ if (strncmp(scriptdirp->d_name + len - strlen(".init"), ".init", strlen(".init")) == 0) {
+ if (snprintf(script, MAXPATH, "package/%s/files/%s", pkgdirp->d_name, scriptdirp->d_name) < 0)
+ fatal_error("script variable creation failed.");
+ initscript = fopen(script, "r");
+ if (initscript == NULL)
+ continue;
+
+ while (fgets(ibuf, MAXPATH, initscript) != NULL) {
+ if (strncmp("#PKG", ibuf, 4) == 0) {
+ sname = strdup(ibuf+5);
+ sname[strlen(sname)-1] = '\0';
+ sname2 = strdup(scriptdirp->d_name);
+ sname2[strlen(sname2)-5] = '\0';
+ icfg = fopen(runtime, "a");
+ if (icfg == NULL)
+ continue;
+ if (strncmp("busybox", sname, 7) == 0)
+ fprintf(icfg, "config ADK_RUNTIME_START_%s_%s\n", toupperstr(sname), toupperstr(sname2));
+ else
+ fprintf(icfg, "config ADK_RUNTIME_START_%s\n", toupperstr(sname));
+ fprintf(icfg, "\tprompt \"Start %s on boot\"\n", sname2);
+ fprintf(icfg, "\tboolean\n");
+ if (strncmp("busybox", sname, 7) == 0)
+ fprintf(icfg, "\tdepends on BUSYBOX_%s\n", toupperstr(sname2));
+ else
+ fprintf(icfg, "\tdepends on ADK_PACKAGE_%s\n", toupperstr(sname));
+ fprintf(icfg, "\tdepends on ADK_RUNTIME_START_SERVICES\n");
+ fprintf(icfg, "\tdefault n\n\n");
+ fclose(icfg);
+ }
+ continue;
+ free(sname);
+ free(sname2);
+ }
+ }
+ }
+ }
+ closedir(scriptdir);
+ }
+
/* skip manually maintained packages */
if (snprintf(path, MAXPATH, "package/%s/Config.in.manual", pkgdirp->d_name) < 0)
fatal_error("can not create path variable.");
@@ -621,7 +680,6 @@ int main() {
fclose(cfg);
free(pkgs);
-
/* skip packages without binary package output */
if (nobinpkgs == 1)
continue;
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/adding-packages-host.txt b/docs/adding-packages-host.txt
index a858d4563..c9eba6d02 100644
--- a/docs/adding-packages-host.txt
+++ b/docs/adding-packages-host.txt
@@ -75,18 +75,12 @@ Following mix between host and target package is possible, too:
29: include ${TOPDIR}/mk/pkg-bottom.mk
------------------------
-It is important to have foo-host as package build dependency, see line 12, so that the order is always build the host package
-and then the target package.
-If you need to rebuild a mixed package, you are advised to use:
+If you need to rebuild a mixed package, you can do:
------------
- $ make package=<package> clean hostpackage package
+ $ make package=<package> hostclean hostpackage clean package
------------
-At the moment there is one limitation regarding the recursive dependency resolving. It is just not implemented, yet.
-So you always need to set +PKG_BUILDDEP+ to all host tools dependencies in the right order. If package foo needs host
-tool bar, and host tool bar needs host library libbaz, you have to use following +PKG_BUILDDEP+ variable:
+If your host package have some dependencies, use following:
------------
- PKG_BUILDDEP:=libbaz-host bar-host
+ HOST_BUILDDEP:=libbaz-host bar-host
------------
-
-
diff --git a/docs/contribute.txt b/docs/contribute.txt
index 909263886..5a8e1fdd8 100644
--- a/docs/contribute.txt
+++ b/docs/contribute.txt
@@ -82,6 +82,7 @@ Here is a short list of details to provide in such case:
* target for which the build fails
* package(s) which the build fails
* the command that fails and its output
+* the make.log file, generated when make v is used
* any information you think that may be relevant
Additionally, you can add the +.config+ file.
diff --git a/docs/getting.txt b/docs/getting.txt
index 534ba99c9..0902bb6e0 100644
--- a/docs/getting.txt
+++ b/docs/getting.txt
@@ -5,8 +5,9 @@
Getting OpenADK
---------------
-OpenADK does not have any releases. Only direct Git
-access is possible.
+OpenADK does not have any releases. We are following the
+http://en.wikipedia.org/wiki/Rolling_release[rolling release]
+development model.
To download OpenADK using Git just do:
@@ -20,3 +21,4 @@ Or if you prefer HTTP or using Git behind a proxy:
$ git clone http://git.openadk.org/openadk.git
---------------------
+Or you can get a http://www.openadk.org/snapshots/[snapshot].
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/introduction.txt b/docs/introduction.txt
index 991747672..3489c9d5f 100644
--- a/docs/introduction.txt
+++ b/docs/introduction.txt
@@ -24,3 +24,9 @@ processors, MIPS processors, ARM processors, etc.
OpenADK supports numerous processors and their variants; it also comes
with default configurations for some embedded systems and netbooks.
(Raspberry PI, Sharp Zaurus, Lemote Yeelong, IBM X40 and more)
+
+OpenADK is not a Linux distribution and there are no releases or binary
+packages available. If you need something like that, better switch to
+something else. OpenADK builds everything from source. There are only a
+few exceptions to this rule (f.e. some bootloaders and firmware files for
+wireless network cards).
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/patch-policy.txt b/docs/patch-policy.txt
index b5a585b5e..e948661cf 100644
--- a/docs/patch-policy.txt
+++ b/docs/patch-policy.txt
@@ -10,8 +10,8 @@ While integrating a new package or updating an existing one, it may be
necessary to patch the source of the software to get it cross-built within
OpenADK. OpenADK offers an infrastructure to automatically handle this during
the builds. Patches are provided within OpenADK, in the package directory;
-these typically aim to fix cross-compilation, libc support, or other such
-issues.
+these typically aim to fix cross-compilation, libc support, portability issues
+or other things.
Normally the patches are autogenerated via:
------------
@@ -80,3 +80,11 @@ Fetch from: <some url>
It is also sensible to add a few words about any changes to the patch
that may have been necessary.
+
+Upstreaming patches
+~~~~~~~~~~~~~~~~~~~
+
+OpenADK tries to avoid any patches to the source code. If a patch could
+not be avoided, it should be tried to make the patch of a good quality to
+get it upstream. OpenADK tries to report any found issues and try to send
+in any upstream compatible patches.
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 4cdccd8fd..13e287d89 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 \
@@ -18,6 +18,7 @@ DEFCONFIG= ADK_DEBUG=n \
ADK_LEAVE_ETC_ALONE=n \
ADK_SIMPLE_NETWORK_CONFIG=n \
ADK_USE_CCACHE=n \
+ ADK_RUNTIME_START_SERVICES=n \
ADK_PACKAGE_BASE_FILES=y \
ADK_PACKAGE_E2FSCK_STATIC=n \
ADK_PACKAGE_KEXECINIT=n \
@@ -41,8 +42,10 @@ DEFCONFIG= ADK_DEBUG=n \
ADK_PKG_TEST=n \
ADK_PKG_MPDBOX=n \
ADK_PKG_DEVELOPMENT=n \
- ADK_TOOLCHAIN_GCC_USE_SSP=n \
- ADK_TOOLCHAIN_GCC_USE_LTO=n \
+ ADK_TOOLCHAIN_USE_SSP=n \
+ ADK_TOOLCHAIN_USE_LTO=n \
+ ADK_TOOLCHAIN_GOLD=n \
+ ADK_TOOLCHAIN_USE_GOLD=n \
BUSYBOX_IFPLUGD=n \
BUSYBOX_EXTRA_COMPAT=n \
BUSYBOX_FEATURE_IFCONFIG_SLIP=n \
@@ -79,6 +82,7 @@ DEFCONFIG= ADK_DEBUG=n \
BUSYBOX_FEATURE_VI_REGEX_SEARCH=n \
ADK_KERNEL_RT2X00_DEBUG=n \
ADK_KERNEL_ATH5K_DEBUG=n \
+ ADK_KERNEL_BUG=n \
ADK_KERNEL_DEBUG_WITH_KGDB=n
noconfig_targets:= menuconfig \
@@ -92,13 +96,13 @@ 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;\
rebuild=1;\
fi; \
- for i in ADK_RUNTIME_PASSWORD ADK_RUNTIME_TMPFS_SIZE ADK_RUNTIME_HOSTNAME ADK_TARGET_ROOTFS ADK_RUNTIME_GETTY ADK_RUNTIME_SHELL;do \
+ for i in ADK_RUNTIME_PASSWORD ADK_RUNTIME_TMPFS_SIZE ADK_RUNTIME_HOSTNAME ADK_TARGET_ROOTFS ADK_RUNTIME_CONSOLE ADK_RUNTIME_GETTY ADK_RUNTIME_SHELL;do \
if [ "$$(grep ^$$i .config|md5sum)" != "$$(grep ^$$i .config.old|md5sum)" ];then \
touch .rebuild.base-files;\
rebuild=1;\
@@ -138,27 +142,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) \
- $(PACKAGE_DIR) $(TOOLS_BUILD_DIR) $(STAGING_HOST_DIR)/usr/bin \
- $(TOOLCHAIN_BUILD_DIR) $(STAGING_PKG_DIR)/stamps
+ mkdir -p $(DL_DIR) $(HOST_BUILD_DIR) $(BUILD_DIR) $(TARGET_DIR) $(FW_DIR) \
+ $(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:
@@ -169,9 +172,10 @@ endif
${STAGING_TARGET_DIR} ${STAGING_TARGET_DIR}/etc ${STAGING_HOST_DIR}:
mkdir -p ${STAGING_TARGET_DIR}/{bin,etc,lib,usr/bin,usr/include,usr/lib/pkgconfig} \
- ${STAGING_HOST_DIR}/{bin,lib,usr/bin,usr/lib,usr/include}
+ ${STAGING_HOST_DIR}/{usr/bin,usr/lib,usr/include}
for i in lib64 lib32 libx32;do \
cd ${STAGING_TARGET_DIR}/; ln -sf lib $$i; \
+ cd ${STAGING_TARGET_DIR}/usr; ln -sf lib $$i; \
done
${STAGING_TARGET_DIR}/etc/ipkg.conf: ${STAGING_TARGET_DIR}/etc
@@ -189,9 +193,6 @@ target/%:
toolchain/%: ${STAGING_TARGET_DIR}
$(MAKE) -C toolchain $(patsubst toolchain/%,%,$@)
-tools/%:
- $(MAKE) -C tools $(patsubst tools/%,%,$@)
-
image:
$(MAKE) -C target image
@@ -236,6 +237,7 @@ root_clean:
@$(TRACE) root_clean
rm -rf $(TARGET_DIR)
mkdir -p $(TARGET_DIR)
+ touch $(TARGET_DIR)/.adk
# Do a per-package clean here, too. This way stale headers and
# libraries from target_*/ get wiped away, which keeps
@@ -264,7 +266,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
@@ -272,7 +274,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
@@ -281,7 +283,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.*
@@ -454,7 +456,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
@@ -473,21 +475,21 @@ bulktoolchain:
while read arch; do \
mkdir -p ${TOPDIR}/firmware; \
( \
- echo === building $$arch $$libc toolchain-$$arch on $$(date); \
- tarch=$$(echo $$arch|sed -e "s#el##" -e "s#eb##" -e "s#mips64.*#mips#" -e "s#hf##"); \
- if [ -f ${TOPDIR}/firmware/toolchain_$${arch}_$${libc}.tar.xz ];then exit;fi; \
- $(GMAKE) prereq && \
+ tarch=$$(echo $$arch|sed -e "s#sh4.*#sh#" -e "s#el##" -e "s#eb##" -e "s#mips64.*#mips#" -e "s#hf##" -e "s#x86_64.*#x86_64#" ); \
+ carch=$$(echo $$arch|sed -e "s#hf##" -e "s#mips64n.*#mips64#" -e "s#mips64el.*#mips64el#" -e 's#x86$$#i686#' -e "s#x86_64.*#x86_64#" ); \
+ echo === building $$tarch $$libc toolchain-$$arch on $$(date); \
$(GMAKE) ARCH=$$tarch SYSTEM=toolchain-$$arch LIBC=$$libc defconfig; \
- $(GMAKE) VERBOSE=1 all; if [ $$? -ne 0 ]; then touch .exit; break;fi; \
- if [ $$arch = "armhf" ];then arch=arm; else arch=$$arch;fi; \
tabi=$$(grep ^ADK_TARGET_ABI= .config|cut -d \" -f 2);\
+ if [ $$arch = "armhf" ];then arch=arm; else arch=$$arch;fi; \
if [ -z $$tabi ];then abi="";else abi=_$$tabi;fi; \
- tar -cvJf ${TOPDIR}/firmware/toolchain_$${arch}_$${libc}$${abi}.tar.xz toolchain_${GNU_HOST_NAME} target_$${arch}_$${libc}$${abi}; \
+ if [ -f ${TOPDIR}/firmware/toolchain_$${carch}_$${libc}$${abi}.tar.xz ];then exit;fi; \
+ $(GMAKE) VERBOSE=1 all; if [ $$? -ne 0 ]; then touch .exit; break;fi; \
+ tar -cvJf ${TOPDIR}/firmware/toolchain_$${carch}_$${libc}$${abi}.tar.xz toolchain_${GNU_HOST_NAME} target_$${carch}_$${libc}$${abi}; \
$(GMAKE) cleantoolchain; \
rm .config; \
- ) 2>&1 | tee $(TOPDIR)/firmware/toolchain_build.log; \
+ ) 2>&1 | tee -a $(TOPDIR)/firmware/toolchain_build.log; \
if [ -f .exit ];then break;fi \
- done <${TOPDIR}/target/tarch.lst ;\
+ done <${TOPDIR}/toolchain/$$libc/tarch.lst ;\
if [ -f .exit ];then echo "Bulk build failed!"; rm .exit; exit 1;fi \
done
@@ -500,15 +502,15 @@ test-framework:
for libc in $$libc;do \
( \
mkdir -p $(TOPDIR)/firmware/; \
- for arch in arm armhf microblaze microblazeel mips mipsel mips64 mips64el ppc ppc64 sh4 sh4eb sparc sparc64 i686 x86_64;do \
- tarch=$$(echo $$arch|sed -e "s#el##" -e "s#eb##" -e "s#mips64.*#mips#" -e "s#i686#x86#" -e "s#sh4#sh#" -e "s#hf##"); \
+ for arch in $$(grep -v m68k target/tarch.lst|xargs);do \
+ tarch=$$(echo $$arch|sed -e "s#el##" -e "s#eb##" -e "s#mips64.*#mips#" -e "s#i686#x86#" -e "s#sh4#sh#" -e "s#hf##" -e "s#x86_64.*#x86_64#"); \
+ arch=$$(echo $$arch|sed -e 's#x86$$#i686#'); \
echo === building qemu-$$arch for $$libc with $$tarch on $$(date); \
- $(GMAKE) prereq && \
$(GMAKE) ARCH=$$tarch SYSTEM=qemu-$$arch LIBC=$$libc FS=initramfsarchive COLLECTION=test defconfig; \
$(GMAKE) VERBOSE=1 all; if [ $$? -ne 0 ]; then touch .exit; exit 1;fi; \
tabi=$$(grep ^ADK_TARGET_ABI= .config|cut -d \" -f 2);\
if [ -z $$tabi ];then abi="";else abi=_$$tabi;fi; \
- if [ $$arch = "armhf" ];then qarch=arm; else qarch=$$arch;fi; \
+ qarch=$$(echo $$arch|sed -e "s#armhf#arm#" -e 's#mips64n.*$$#mips64#' -e 's#mips64eln.*$$#mips64el#' -e "s#x86_64.*#x86_64#"); \
cp -a root_qemu_$${qarch}_$${libc}$${abi} root; \
mkdir -p $(TOPDIR)/firmware/qemu/$$arch; \
tar cJvf $(TOPDIR)/firmware/qemu/$$arch/root.tar.xz root; \
@@ -524,14 +526,13 @@ test-framework:
release:
for libc in uclibc glibc musl;do \
- mkdir -p $(TOPDIR)/firmware/$(SYSTEM)_$(ARCH)_$$libc; \
( \
echo === building $$libc on $$(date); \
$(GMAKE) prereq && \
$(GMAKE) ARCH=$(ARCH) SYSTEM=$(SYSTEM) LIBC=$$libc FS=archive allmodconfig; \
$(GMAKE) VERBOSE=1 all; if [ $$? -ne 0 ]; then touch .exit; exit 1;fi; \
rm .config; \
- ) 2>&1 | tee $(TOPDIR)/firmware/$(SYSTEM)_$(ARCH)_$$libc/build.log; \
+ ) 2>&1 | tee $(TOPDIR)/firmware/release-build.log; \
if [ -f .exit ];then echo "Bulk build failed!"; break;fi \
done
if [ -f .exit ];then rm .exit;exit 1;fi
@@ -542,14 +543,14 @@ bulk:
while read arch; do \
systems=$$(./scripts/getsystems $$arch|grep -v toolchain); \
for system in $$systems;do \
- mkdir -p $(TOPDIR)/firmware/$${system}_$${arch}_$$libc; \
+ mkdir -p $(TOPDIR)/firmware; \
( \
echo === building $$arch $$system $$libc on $$(date); \
$(GMAKE) prereq && \
$(GMAKE) ARCH=$$arch SYSTEM=$$system LIBC=$$libc FS=archive defconfig; \
$(GMAKE) VERBOSE=1 all; if [ $$? -ne 0 ]; then touch .exit; exit 1;fi; \
rm .config; \
- ) 2>&1 | tee $(TOPDIR)/firmware/$${system}_$${arch}_$$libc/build.log; \
+ ) 2>&1 | tee $(TOPDIR)/firmware/bulkbuild.log; \
if [ -f .exit ]; then break;fi \
done; \
if [ -f .exit ]; then break;fi \
@@ -562,14 +563,14 @@ bulkall:
while read arch; do \
systems=$$(./scripts/getsystems $$arch| grep -v toolchain); \
for system in $$systems;do \
- mkdir -p $(TOPDIR)/firmware/$${system}_$${arch}_$$libc; \
+ mkdir -p $(TOPDIR)/firmware; \
( \
echo === building $$arch $$system $$libc on $$(date); \
$(GMAKE) prereq && \
$(GMAKE) ARCH=$$arch SYSTEM=$$system LIBC=$$libc FS=archive allconfig; \
$(GMAKE) VERBOSE=1 all; if [ $$? -ne 0 ]; then touch .exit; exit 1;fi; \
rm .config; \
- ) 2>&1 | tee $(TOPDIR)/firmware/$${system}_$${arch}_$$libc/build.log; \
+ ) 2>&1 | tee $(TOPDIR)/firmware/bulkallbuild.log; \
if [ -f .exit ]; then break;fi \
done; \
if [ -f .exit ]; then break;fi \
@@ -582,7 +583,7 @@ bulkallmod:
while read arch; do \
systems=$$(./scripts/getsystems $$arch| grep -v toolchain); \
for system in $$systems;do \
- mkdir -p $(TOPDIR)/firmware/$${system}_$${arch}_$$libc; \
+ mkdir -p $(TOPDIR)/firmware; \
( \
echo === building $$arch $$system $$libc on $$(date); \
$(GMAKE) prereq && \
@@ -590,7 +591,7 @@ bulkallmod:
$(GMAKE) VERBOSE=1 all; if [ $$? -ne 0 ]; then echo $$system-$$libc >.exit; exit 1;fi; \
$(GMAKE) clean; \
rm .config; \
- ) 2>&1 | tee $(TOPDIR)/firmware/$${system}_$${arch}_$$libc/build.log; \
+ ) 2>&1 | tee $(TOPDIR)/firmware/bulkallmodbuild.log; \
if [ -f .exit ]; then break;fi \
done; \
if [ -f .exit ]; then break;fi \
@@ -598,45 +599,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..c8acd2ae6 100644
--- a/mk/buildhlp.mk
+++ b/mk/buildhlp.mk
@@ -72,16 +72,16 @@ ifeq ($(strip ${__use_generic_patch_target}),42)
post-patch:
${WRKDIST}/.prepared: ${WRKDIST}/.extract_done
[ ! -d ./patches/${PKG_VERSION} ] || ${PREVENT_PATCH} ${PATCH} ${WRKDIST} ./patches/${PKG_VERSION} \
- '{patch-!(*.orig),*.patch}' $(MAKE_TRACE)
+ '{patch-!(*.orig),*.patch,*.${ARCH}}' $(MAKE_TRACE)
[ ! -d ./patches ] || ${PREVENT_PATCH} ${PATCH} ${WRKDIST} ./patches \
- '{patch-!(*.orig),*.patch}' $(MAKE_TRACE)
+ '{patch-!(*.orig),*.patch,*.${ARCH}}' $(MAKE_TRACE)
[ ! -d ./src ] || (cd src; $(PREVENT_PATCH) cp -Rp . ${WRKDIST}/) \
$(MAKE_TRACE)
@${MAKE} post-patch $(MAKE_TRACE)
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-bottom.mk b/mk/host-bottom.mk
index 43a622c0f..8ef4a868e 100644
--- a/mk/host-bottom.mk
+++ b/mk/host-bottom.mk
@@ -3,6 +3,7 @@
host-extract: ${_HOST_PATCH_COOKIE}
+hostpre-configure:
host-configure:
${_HOST_CONFIGURE_COOKIE}: ${_HOST_PATCH_COOKIE}
@mkdir -p ${WRKBUILD}
@@ -25,6 +26,7 @@ endif
${CP} ${SCRIPT_DIR}/config.guess $$i; \
fi; \
done;
+ @${MAKE} hostpre-configure $(MAKE_TRACE)
ifneq (${HOST_STYLE},manual)
ifeq ($(strip ${HOST_STYLE}),)
cd ${WRKBUILD}; rm -f config.{cache,status}; \
@@ -75,8 +77,7 @@ endif
touch $@
hostpost-install:
-hpkg-install: ${ALL_HOSTINST}
-host-install:
+host-install: ${ALL_HOSTINST}
${_HOST_FAKE_COOKIE}: ${_HOST_BUILD_COOKIE}
@$(CMD_TRACE) "host installing... "
@mkdir -p ${HOST_WRKINST}
@@ -84,13 +85,13 @@ ifneq (${HOST_STYLE},manual)
ifeq ($(strip ${HOST_STYLE}),)
cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
DESTDIR='${HOST_WRKINST}' ${HOST_FAKE_FLAGS} ${HOST_INSTALL_TARGET} $(MAKE_TRACE)
- env ${HOST_MAKE_ENV} ${MAKE} hpkg-install $(MAKE_TRACE)
+ env ${HOST_MAKE_ENV} ${MAKE} host-install $(MAKE_TRACE)
else
cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
DESTDIR='' ${HOST_FAKE_FLAGS} ${HOST_INSTALL_TARGET} $(MAKE_TRACE)
endif
else
- env ${HOST_MAKE_ENV} ${MAKE} hpkg-install $(MAKE_TRACE)
+ env ${HOST_MAKE_ENV} ${MAKE} host-install $(MAKE_TRACE)
endif
env ${HOST_MAKE_ENV} ${MAKE} hostpost-install $(MAKE_TRACE)
@touch $@
diff --git a/mk/host.mk b/mk/host.mk
index 5f9539aef..88f8d2e01 100644
--- a/mk/host.mk
+++ b/mk/host.mk
@@ -3,13 +3,14 @@
# This is where all package operation is done in
ifneq (,$(findstring host,$(MAKECMDGOALS)))
-WRKDIR?= ${WRKDIR_BASE}/w-${PKG_NAME}-${PKG_VERSION}-${PKG_RELEASE}-host
+WRKDIR?= ${HOST_BUILD_DIR}/w-${PKG_NAME}-${PKG_VERSION}-${PKG_RELEASE}-host
endif
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 ff95c5cb0..9f3fd5eef 100644
--- a/mk/image.mk
+++ b/mk/image.mk
@@ -34,6 +34,9 @@ imageprepare: image-prepare-post extra-install
# if an extra directory exist in TOPDIR, copy all content over the
# root directory, do the same if make extra=/dir/to/extra is used
extra-install:
+ @-if [ -h ${TARGET_DIR}/etc/resolv.conf -a -f $(TOPDIR)/extra/etc/resolv.conf ];then \
+ rm ${TARGET_DIR}/etc/resolv.conf;\
+ fi
@if [ -d $(TOPDIR)/extra ];then $(CP) $(TOPDIR)/extra/* ${TARGET_DIR};fi
@if [ ! -z $(extra) ];then $(CP) $(extra)/* ${TARGET_DIR};fi
@@ -51,22 +54,24 @@ image-prepare-post:
-rm -f ${TARGET_DIR}/bin/sh
ln -sf ${BINSH} ${TARGET_DIR}/bin/sh
ifeq ($(ADK_LINUX_X86_64),y)
+ifeq ($(ADK_TARGET_ABI_32),)
# fixup lib dirs
mv ${TARGET_DIR}/lib/* ${TARGET_DIR}/${ADK_TARGET_LIBC_PATH}
rm -rf ${TARGET_DIR}/lib/
ln -sf /${ADK_TARGET_LIBC_PATH} ${TARGET_DIR}/lib
-mkdir ${TARGET_DIR}/usr/${ADK_TARGET_LIBC_PATH} 2>/dev/null
- mv ${TARGET_DIR}/usr/lib/* ${TARGET_DIR}/usr/${ADK_TARGET_LIBC_PATH}
+ -mv ${TARGET_DIR}/usr/lib/* ${TARGET_DIR}/usr/${ADK_TARGET_LIBC_PATH}
rm -rf ${TARGET_DIR}/usr/lib/
(cd ${TARGET_DIR}/usr ; ln -sf ${ADK_TARGET_LIBC_PATH} lib)
endif
+endif
ifeq ($(ADK_LINUX_PPC64),y)
# fixup lib dirs
mv ${TARGET_DIR}/lib/* ${TARGET_DIR}/${ADK_TARGET_LIBC_PATH}
rm -rf ${TARGET_DIR}/lib/
ln -sf /${ADK_TARGET_LIBC_PATH} ${TARGET_DIR}/lib
-mkdir ${TARGET_DIR}/usr/${ADK_TARGET_LIBC_PATH} 2>/dev/null
- mv ${TARGET_DIR}/usr/lib/* ${TARGET_DIR}/usr/${ADK_TARGET_LIBC_PATH}
+ -mv ${TARGET_DIR}/usr/lib/* ${TARGET_DIR}/usr/${ADK_TARGET_LIBC_PATH}
rm -rf ${TARGET_DIR}/usr/lib/
(cd ${TARGET_DIR}/usr ; ln -sf ${ADK_TARGET_LIBC_PATH} lib)
endif
@@ -76,7 +81,7 @@ ifeq ($(ADK_LINUX_SPARC64),y)
rm -rf ${TARGET_DIR}/lib/
ln -sf /${ADK_TARGET_LIBC_PATH} ${TARGET_DIR}/lib
-mkdir ${TARGET_DIR}/usr/${ADK_TARGET_LIBC_PATH} 2>/dev/null
- mv ${TARGET_DIR}/usr/lib/* ${TARGET_DIR}/usr/${ADK_TARGET_LIBC_PATH}
+ -mv ${TARGET_DIR}/usr/lib/* ${TARGET_DIR}/usr/${ADK_TARGET_LIBC_PATH}
rm -rf ${TARGET_DIR}/usr/lib/
(cd ${TARGET_DIR}/usr ; ln -sf ${ADK_TARGET_LIBC_PATH} lib)
endif
@@ -86,7 +91,7 @@ ifeq ($(ADK_TARGET_ABI_N32),y)
rm -rf ${TARGET_DIR}/lib/
ln -sf /${ADK_TARGET_LIBC_PATH} ${TARGET_DIR}/lib
-mkdir ${TARGET_DIR}/usr/${ADK_TARGET_LIBC_PATH} 2>/dev/null
- mv ${TARGET_DIR}/usr/lib/* ${TARGET_DIR}/usr/${ADK_TARGET_LIBC_PATH}
+ -mv ${TARGET_DIR}/usr/lib/* ${TARGET_DIR}/usr/${ADK_TARGET_LIBC_PATH}
rm -rf ${TARGET_DIR}/usr/lib/
(cd ${TARGET_DIR}/usr ; ln -sf ${ADK_TARGET_LIBC_PATH} lib)
endif
@@ -96,7 +101,7 @@ ifeq ($(ADK_TARGET_ABI_N64),y)
rm -rf ${TARGET_DIR}/lib/
ln -sf /${ADK_TARGET_LIBC_PATH} ${TARGET_DIR}/lib
-mkdir ${TARGET_DIR}/usr/${ADK_TARGET_LIBC_PATH} 2>/dev/null
- mv ${TARGET_DIR}/usr/lib/* ${TARGET_DIR}/usr/${ADK_TARGET_LIBC_PATH}
+ -mv ${TARGET_DIR}/usr/lib/* ${TARGET_DIR}/usr/${ADK_TARGET_LIBC_PATH}
rm -rf ${TARGET_DIR}/usr/lib/
(cd ${TARGET_DIR}/usr ; ln -sf ${ADK_TARGET_LIBC_PATH} lib)
endif
@@ -122,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}
@@ -130,34 +135,34 @@ 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
+${FW_DIR}/${ROOTFSTARBALL}: ${TARGET_DIR}/.adk kernel-package
cd ${TARGET_DIR}; find . | sed -n '/^\.\//s///p' | \
sed "s#\(.*\)#:0:0::::::\1#" | sort | \
${STAGING_HOST_DIR}/usr/bin/cpio -o -Hustar -P | gzip -n9 >$@
-${FW_DIR}/${ROOTFSUSERTARBALL}: ${TARGET_DIR}
+${FW_DIR}/${ROOTFSUSERTARBALL}: ${TARGET_DIR}/.adk
cd ${TARGET_DIR}; find . | grep -v ./boot/ | sed -n '/^\.\//s///p' | \
sed "s#\(.*\)#:0:0::::::\1#" | sort | \
${STAGING_HOST_DIR}/usr/bin/cpio -o -Hustar -P | gzip -n9 >$@
-${STAGING_TARGET_DIR}/${INITRAMFS}_list: ${TARGET_DIR}
- $(BASH) ${LINUX_DIR}/scripts/gen_initramfs_list.sh -u squash -g squash \
+${STAGING_TARGET_DIR}/${INITRAMFS}_list: ${TARGET_DIR}/.adk
+ env PATH='${HOST_PATH}' $(BASH) ${LINUX_DIR}/scripts/gen_initramfs_list.sh -u squash -g squash \
${TARGET_DIR}/ >$@
${FW_DIR}/${INITRAMFS}: ${STAGING_TARGET_DIR}/${INITRAMFS}_list
${LINUX_DIR}/usr/gen_init_cpio ${STAGING_TARGET_DIR}/${INITRAMFS}_list | \
${ADK_COMPRESSION_TOOL} -c >$@
-${BUILD_DIR}/root.squashfs: ${TARGET_DIR}
+${BUILD_DIR}/root.squashfs: ${TARGET_DIR}/.adk
${STAGING_HOST_DIR}/usr/bin/mksquashfs ${TARGET_DIR} \
${BUILD_DIR}/root.squashfs -comp xz \
-nopad -noappend -root-owned $(MAKE_TRACE)
${FW_DIR}/${ROOTFSJFFS2}: ${TARGET_DIR}
- ${STAGING_HOST_DIR}/usr/bin/mkfs.jffs2 $(ADK_JFFS2_OPTS) -q -r ${TARGET_DIR} \
+ ${STAGING_HOST_DIR}/usr/bin/mkfs.jffs2 $(ADK_JFFS2_OPTS) -q -X zlib -r ${TARGET_DIR} \
--pad=$(ADK_TARGET_MTD_SIZE) -o ${FW_DIR}/${ROOTFSJFFS2} $(MAKE_TRACE)
createinitramfs: ${STAGING_TARGET_DIR}/${INITRAMFS}_list
@@ -231,9 +236,9 @@ ${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 $@ \
+ PATH='${HOST_PATH}' mkisofs -R -uid 0 -gid 0 -o $@ \
-b boot/syslinux/isolinux.bin \
-c boot/syslinux/boot.cat -no-emul-boot \
-boot-load-size 4 -boot-info-table ${TARGET_DIR}
diff --git a/mk/kernel-build.mk b/mk/kernel-build.mk
index ffb612334..448c133c3 100644
--- a/mk/kernel-build.mk
+++ b/mk/kernel-build.mk
@@ -54,6 +54,7 @@ $(LINUX_BUILD_DIR)/modules: $(LINUX_DIR)/$(KERNEL_FILE)
LOCALVERSION="" \
modules_install $(MAKE_TRACE)
$(TRACE) target/$(ADK_TARGET_ARCH)-create-packages
+ @mkdir -p ${PACKAGE_DIR}
ifneq ($(strip $(TARGETS)),)
$(MAKE) $(TARGETS)
endif
diff --git a/mk/kernel-ver.mk b/mk/kernel-ver.mk
index 6355af1d8..7cfb5998b 100644
--- a/mk/kernel-ver.mk
+++ b/mk/kernel-ver.mk
@@ -1,20 +1,20 @@
ifeq ($(ADK_KERNEL_VERSION_TOOLCHAIN),y)
-KERNEL_VERSION:= 3.13.6
+KERNEL_VERSION:= 3.13.7
KERNEL_MOD_VERSION:= $(KERNEL_VERSION)
KERNEL_RELEASE:= 1
-KERNEL_MD5SUM:= 445aa27da818617409982f42902a6e41
+KERNEL_MD5SUM:= 370adced5e5c1cb1d0d621c2dae2723f
endif
-ifeq ($(ADK_KERNEL_VERSION_3_13_6),y)
-KERNEL_VERSION:= 3.13.6
+ifeq ($(ADK_KERNEL_VERSION_3_13_7),y)
+KERNEL_VERSION:= 3.13.7
KERNEL_MOD_VERSION:= $(KERNEL_VERSION)
KERNEL_RELEASE:= 1
-KERNEL_MD5SUM:= 445aa27da818617409982f42902a6e41
+KERNEL_MD5SUM:= 370adced5e5c1cb1d0d621c2dae2723f
endif
-ifeq ($(ADK_KERNEL_VERSION_3_12_13),y)
-KERNEL_VERSION:= 3.12.13
+ifeq ($(ADK_KERNEL_VERSION_3_12_14),y)
+KERNEL_VERSION:= 3.12.14
KERNEL_MOD_VERSION:= $(KERNEL_VERSION)
KERNEL_RELEASE:= 1
-KERNEL_MD5SUM:= 345f5883cfb906dac4aef87e303d3a2d
+KERNEL_MD5SUM:= 5575e68e287605ad63d3a1444e9b701d
endif
ifeq ($(ADK_KERNEL_VERSION_3_11_10),y)
KERNEL_VERSION:= 3.11.10
@@ -22,15 +22,15 @@ KERNEL_MOD_VERSION:= $(KERNEL_VERSION)
KERNEL_RELEASE:= 1
KERNEL_MD5SUM:= 59f352d3f4e2cdf6755f79e09fa09176
endif
-ifeq ($(ADK_KERNEL_VERSION_3_10_33),y)
-KERNEL_VERSION:= 3.10.33
+ifeq ($(ADK_KERNEL_VERSION_3_10_34),y)
+KERNEL_VERSION:= 3.10.34
KERNEL_MOD_VERSION:= $(KERNEL_VERSION)
KERNEL_RELEASE:= 1
-KERNEL_MD5SUM:= 01865f9c129f3c7eee51e25b3781a364
+KERNEL_MD5SUM:= 30991b495a3d75196d5608072d2e62e6
endif
-ifeq ($(ADK_KERNEL_VERSION_3_4_82),y)
-KERNEL_VERSION:= 3.4.82
+ifeq ($(ADK_KERNEL_VERSION_3_4_84),y)
+KERNEL_VERSION:= 3.4.84
KERNEL_MOD_VERSION:= $(KERNEL_VERSION)
KERNEL_RELEASE:= 1
-KERNEL_MD5SUM:= 9ee57efa65417a7a9ac931122c2b7377
+KERNEL_MD5SUM:= b99f88ca356b5003ce44e952baa3e6a3
endif
diff --git a/mk/package.mk b/mk/package.mk
index ed94e3539..c23530e17 100644
--- a/mk/package.mk
+++ b/mk/package.mk
@@ -178,6 +178,9 @@ $$(IDIR_$(1))/CONTROL/control: ${_PATCH_COOKIE}
@for file in conffiles preinst postinst prerm postrm; do \
[ ! -f ./files/$(2).$$$$file ] || cp ./files/$(2).$$$$file $$(IDIR_$(1))/CONTROL/$$$$file; \
done
+ifeq ($(ADK_RUNTIME_START_$(1)),y)
+ $(SED) "s#NO#YES#" $$(IDIR_$(1))/CONTROL/postinst
+endif
ifneq ($(ADK_DEBUG),y)
@echo "Package: $$(shell echo $(2) | tr '_' '-')-dbg" > $(WRKDIR)/.$(2)-dbg.control
@echo "Section: debug" >> $(WRKDIR)/.$(2)-dbg.control
@@ -195,10 +198,10 @@ endif
$$(IPKG_$(1)): $$(IDIR_$(1))/CONTROL/control $${_FAKE_COOKIE}
ifeq ($(ADK_DEBUG),)
- $${RSTRIP} $${IDIR_$(1)} $(MAKE_TRACE)
+ @$${RSTRIP} $${IDIR_$(1)} $(MAKE_TRACE)
endif
ifeq ($(ADK_DEBUG_STRIP),y)
- $${RSTRIP} $${IDIR_$(1)} $(MAKE_TRACE)
+ @$${RSTRIP} $${IDIR_$(1)} $(MAKE_TRACE)
endif
ifeq (${ADK_LEAVE_ETC_ALONE}$(filter force_etc,$(7)),y)
-rm -rf $${IDIR_$(1)}/etc
diff --git a/mk/pkg-bottom.mk b/mk/pkg-bottom.mk
index 3e454ee5a..2ccc6ff1e 100644
--- a/mk/pkg-bottom.mk
+++ b/mk/pkg-bottom.mk
@@ -184,7 +184,7 @@ ifneq (,$(filter dev,${PKG_OPTS}))
done
endif
@-cd ${WRKINST}; \
- if [ "${PKG_NAME}" != "uClibc" -a "${PKG_NAME}" != "glibc" -a "${PKG_NAME}" != "libpthread" -a "${PKG_NAME}" != "libstdcxx" -a "${PKG_NAME}" != "libgcc" -a "${PKG_NAME}" != "libthread-db" -a "${PKG_NAME}" != "musl" -a "${PKG_NAME}" != "pam" ];then \
+ if [ "${PKG_NAME}" != "uClibc" -a "${PKG_NAME}" != "glibc" -a "${PKG_NAME}" != "libpthread" -a "${PKG_NAME}" != "libstdcxx" -a "${PKG_NAME}" != "libgcc" -a "${PKG_NAME}" != "libthread-db" -a "${PKG_NAME}" != "musl" -a "${PKG_NAME}" != "pam" -a "${PKG_NAME}" != "tzdata" ];then \
find lib \( -name lib\*.so\* -o -name lib\*.a \) \
-exec echo 'WARNING: ${PKG_NAME} installs files in /lib -' \
' fix this!' >&2 \; -quit 2>/dev/null; fi;\
diff --git a/mk/rootfs.mk b/mk/rootfs.mk
index 43cfaa821..3c434b038 100644
--- a/mk/rootfs.mk
+++ b/mk/rootfs.mk
@@ -42,18 +42,15 @@ else
USB:= rootdelay=2
endif
-$(eval $(call rootfs_template,genext2fs,GENEXT2FS,$(ROOTFS)))
-$(eval $(call rootfs_template,cf,CF,$(ROOTFS)))
-$(eval $(call rootfs_template,mmc,MMC,$(ROOTFS)))
$(eval $(call rootfs_template,usb,USB,$(USB)))
$(eval $(call rootfs_template,archive,ARCHIVE,$(ROOTFS)))
-$(eval $(call rootfs_template,initramfsarchive,INITRAMFSARCHIVE))
-$(eval $(call rootfs_template,initramfs,INITRAMFS))
-$(eval $(call rootfs_template,initramfs-piggyback,INITRAMFS_PIGGYBACK))
-$(eval $(call rootfs_template,squashfs,SQUASHFS,$(ROOTFS)))
+$(eval $(call rootfs_template,initramfsarchive,INITRAMFSARCHIVE,rootfstype=tmpfs))
+$(eval $(call rootfs_template,initramfs,INITRAMFS,rootfstype=tmpfs))
+$(eval $(call rootfs_template,initramfs-piggyback,INITRAMFS_PIGGYBACK,rootfstype=tmpfs))
+$(eval $(call rootfs_template,squashfs,SQUASHFS,$(MTDDEV) rootfstype=squashfs))
$(eval $(call rootfs_template,yaffs,YAFFS,$(MTDDEV) panic=3))
$(eval $(call rootfs_template,jffs2,JFFS2,$(MTDDEV) rootfstype=jffs2))
-$(eval $(call rootfs_template,nfsroot,NFSROOT,root=/dev/nfs ip=dhcp init=/init))
+$(eval $(call rootfs_template,nfsroot,NFSROOT,root=/dev/nfs ip=dhcp))
$(eval $(call rootfs_template,encrypted,ENCRYPTED))
$(eval $(call rootfs_template,iso,ISO))
diff --git a/mk/vars.mk b/mk/vars.mk
index f22717c2e..f3911044f 100644
--- a/mk/vars.mk
+++ b/mk/vars.mk
@@ -17,10 +17,10 @@ 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}
+HOST_BUILD_DIR:= ${BASE_DIR}/host_build_${GNU_HOST_NAME}
# dirs for cleandir
FW_DIR_PFX:= $(BASE_DIR)/firmware
@@ -54,7 +54,7 @@ SCRIPT_TARGET_DIR:= ${STAGING_TARGET_DIR}/scripts
# PATH variables
TARGET_PATH= ${SCRIPT_DIR}:${STAGING_TARGET_DIR}/scripts:${TOOLCHAIN_DIR}/usr/bin:${STAGING_HOST_DIR}/usr/bin:${_PATH}
-HOST_PATH= ${SCRIPT_DIR}:${TOOLCHAIN_DIR}/bin:${STAGING_HOST_DIR}/usr/bin:${_PATH}
+HOST_PATH= ${SCRIPT_DIR}:${TOOLCHAIN_DIR}/usr/bin:${STAGING_HOST_DIR}/usr/bin:${_PATH}
AUTOTOOL_PATH= ${TOOLCHAIN_DIR}/usr/bin:${STAGING_HOST_DIR}/usr/bin:${STAGING_TARGET_DIR}/scripts:${_PATH}
ifeq ($(ADK_DISABLE_HONOUR_CFLAGS),)
@@ -71,7 +71,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
@@ -111,23 +111,38 @@ TARGET_LDFLAGS+= -Wl,--secure-plt
endif
endif
-ifneq ($(ADK_TOOLCHAIN_GCC_USE_SSP),)
+ifeq ($(ADK_STATIC),y)
+TARGET_CFLAGS+= -static
+TARGET_CXXFLAGS+= -static
+TARGET_LDFLAGS+= -static
+endif
+
+ifneq ($(ADK_TOOLCHAIN_USE_SSP),)
TARGET_CFLAGS+= -fstack-protector
TARGET_CXXFLAGS+= -fstack-protector
TARGET_LDFLAGS+= -fstack-protector
endif
-ifneq ($(ADK_TOOLCHAIN_GCC_USE_LTO),)
+ifneq ($(ADK_TOOLCHAIN_USE_LTO),)
TARGET_CFLAGS+= -flto
TARGET_CXXFLAGS+= -flto
TARGET_LDFLAGS+= -flto
endif
+ifeq ($(ADK_LINUX_MICROBLAZE),y)
+TARGET_CFLAGS+= -mxl-barrel-shift
+TARGET_CXX_FLAGS+= -mxl-barrel-shift
+endif
+
ifneq ($(ADK_DEBUG),)
-TARGET_CFLAGS+= -g3 -fno-omit-frame-pointer
+ifeq ($(ADK_DEBUG_OPTS),y)
+TARGET_CFLAGS+= -g3 -fno-omit-frame-pointer $(ADK_TARGET_CFLAGS_OPT)
+else
+TARGET_CFLAGS+= -O0 -g3 -fno-omit-frame-pointer
+endif
else
TARGET_CPPFLAGS+= -DNDEBUG
-TARGET_CFLAGS+= -fomit-frame-pointer $(TARGET_OPTIMIZATION)
+TARGET_CFLAGS+= -fomit-frame-pointer $(ADK_TARGET_CFLAGS_OPT)
# stop generating eh_frame stuff
TARGET_CFLAGS+= -fno-unwind-tables -fno-asynchronous-unwind-tables
# always add debug information
@@ -178,9 +193,10 @@ TARGET_CONFIGURE_OPTS= PATH='${TARGET_PATH}' \
CROSS_COMPILE='$(TARGET_CROSS)'
HOST_CONFIGURE_OPTS= CC_FOR_BUILD='${CC_FOR_BUILD}' \
- CPPFLAGS_FOR_BUILD='${CPPFLAGS_FOR_BUILD}' \
CXX_FOR_BUILD='${CXX_FOR_BUILD}' \
+ CPPFLAGS_FOR_BUILD='${CPPFLAGS_FOR_BUILD}' \
CFLAGS_FOR_BUILD='${CFLAGS_FOR_BUILD}' \
+ CXXFLAGS_FOR_BUILD='${CXXFLAGS_FOR_BUILD}' \
LDFLAGS_FOR_BUILD='${LDFLAGS_FOR_BUILD}'
PKG_SUFFIX:= $(strip $(subst ",, $(ADK_PACKAGE_SUFFIX)))
@@ -207,25 +223,25 @@ RSTRIP:= PATH="$(TARGET_PATH)" prefix='${TARGET_CROSS}' ${BASH} ${SCRIPT_DIR}/r
STATCMD:=$(shell if stat -qs .>/dev/null 2>&1; then echo 'stat -f %z';else echo 'stat -c %s';fi)
-EXTRACT_CMD= mkdir -p ${WRKDIR}; \
+EXTRACT_CMD= PATH='${HOST_PATH}'; 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/adk-helper/Makefile b/package/adk-helper/Makefile
new file mode 100644
index 000000000..d386bd508
--- /dev/null
+++ b/package/adk-helper/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:= adk-helper
+PKG_VERSION:= 1.0
+PKG_RELEASE:= 1
+PKG_DESCR:= adk helper utilities
+PKG_SECTION:= misc
+
+PKG_CFLINE_ADK_HELPER:= depends on ADK_HOST_ONLY
+
+NO_DISTFILES:= 1
+
+include ${TOPDIR}/mk/host.mk
+include ${TOPDIR}/mk/package.mk
+
+$(eval $(call HOST_template,ADK_HELPER,adk-helper,${PKG_VERSION}-${PKG_RELEASE}))
+
+HOST_STYLE:= manual
+
+host-build:
+ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -o ${WRKBUILD}/mkcrypt ${WRKBUILD}/mkcrypt.c
+ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -o ${WRKBUILD}/dkgetsz ${WRKBUILD}/dkgetsz.c
+
+adk-helper-hostinstall:
+ ${INSTALL_DIR} ${STAGING_HOST_DIR}/usr/bin
+ ${INSTALL_BIN} ${WRKBUILD}/mkcrypt ${STAGING_HOST_DIR}/usr/bin
+ ${INSTALL_BIN} ${WRKBUILD}/dkgetsz ${STAGING_HOST_DIR}/usr/bin
+
+include ${TOPDIR}/mk/host-bottom.mk
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/tools/adk/dkgetsz.c b/package/adk-helper/src/dkgetsz.c
index b8315be70..b8315be70 100644
--- a/tools/adk/dkgetsz.c
+++ b/package/adk-helper/src/dkgetsz.c
diff --git a/tools/mkcrypt/mkcrypt.c b/package/adk-helper/src/mkcrypt.c
index a856759df..a856759df 100644
--- a/tools/mkcrypt/mkcrypt.c
+++ b/package/adk-helper/src/mkcrypt.c
diff --git a/package/adk-test-tools/Makefile b/package/adk-test-tools/Makefile
index 0a60c5056..80be5a41b 100644
--- a/package/adk-test-tools/Makefile
+++ b/package/adk-test-tools/Makefile
@@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:= adk-test-tools
PKG_VERSION:= 0.1
-PKG_RELEASE:= 3
+PKG_RELEASE:= 6
PKG_DESCR:= helper tools and scripts for adk-test-framework
PKG_SECTION:= misc
PKG_URL:= http://openadk.org/
diff --git a/package/adk-test-tools/files/test.init b/package/adk-test-tools/files/test.init
index bb8fca527..773986dca 100755
--- a/package/adk-test-tools/files/test.init
+++ b/package/adk-test-tools/files/test.init
@@ -2,7 +2,13 @@
#PKG adk-test-tools
#INIT 90
[[ $1 = autostart ]] || exit 0
+echo "Setting time via network ..."
+rdate -nv pool.ntp.org
echo "Starting test script ..."
+grep shell /proc/cmdline > /dev/null 2&>1
+if [ $? -eq 0 ];then
+ exit 0
+fi
if [ -x /run.sh ];then
/run.sh
quit
diff --git a/package/asterisk/Makefile b/package/asterisk/Makefile
index 051ad3ea3..e43b4d275 100644
--- a/package/asterisk/Makefile
+++ b/package/asterisk/Makefile
@@ -105,7 +105,7 @@ TARGET_LDFLAGS+= -lm -ltinfo -ldl -lpthread
MAKE_ENV= ASTCFLAGS="${TARGET_CPPFLAGS} -DHAVE_STRTOQ" \
ASTLDFLAGS="${TARGET_LDFLAGS}"
MAKE_FLAGS+= DESTDIR="$(WRKINST)" \
- OPTIMIZE="${TARGET_OPTIMIZATION}" \
+ OPTIMIZE="${TARGET_CFLAGS}" \
NOISY_BUILD=1
ALL_TARGET:= all install samples
diff --git a/package/avahi/Makefile b/package/avahi/Makefile
index bd203e79e..a79afbb20 100644
--- a/package/avahi/Makefile
+++ b/package/avahi/Makefile
@@ -61,7 +61,7 @@ CONFIGURE_ARGS+= --enable-glib \
--with-avahi-user=avahi \
--with-avahi-group=avahi
-ifeq ($(ADK_TOOLCHAIN_GCC_USE_SSP),y)
+ifeq ($(ADK_TOOLCHAIN_USE_SSP),y)
CONFIGURE_ARGS+= --enable-stack-protector
else
CONFIGURE_ARGS+= --disable-stack-protector
diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index 0dee1aa94..c9a343d59 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:= 74
+PKG_RELEASE:= 82
PKG_SECTION:= base
PKG_DESCR:= basic files and scripts
-PKG_BUILDDEP:= pkgconf-host file-host
WRKDIST= ${WRKDIR}/base-files
NO_DISTFILES:= 1
@@ -27,11 +26,19 @@ do-install:
ifeq (${ADK_TARGET_ROOTFS_NFSROOT},y)
@echo "#" > $(IDIR_BASE_FILES)/etc/network/interfaces
endif
+ifeq (${ADK_TARGET_PACKAGE_IPKG},y)
$(SED) 's,@ARCH@,$(ADK_TARGET_CPU_ARCH),g' $(IDIR_BASE_FILES)/etc/ipkg.conf
$(SED) 's,@SYSTEM@,$(ADK_TARGET_SYSTEM),g' $(IDIR_BASE_FILES)/etc/ipkg.conf
$(SED) 's,@LIBC@,$(ADK_TARGET_LIBC),g' $(IDIR_BASE_FILES)/etc/ipkg.conf
+ifneq ($(ADK_TARGET_ABI),)
+ $(SED) 's,@ABI@,_$(ADK_TARGET_ABI),g' $(IDIR_BASE_FILES)/etc/ipkg.conf
+else
+ $(SED) 's,@ABI@,,g' $(IDIR_BASE_FILES)/etc/ipkg.conf
+endif
$(SED) 's,@HOST@,$(ADK_HOST),g' $(IDIR_BASE_FILES)/etc/ipkg.conf
$(SED) 's,@VENDOR@,$(ADK_VENDOR),g' $(IDIR_BASE_FILES)/etc/ipkg.conf
+ mkdir -p $(IDIR_BASE_FILES)/usr/lib/ipkg/lists
+endif
echo /bin/sh >${IDIR_BASE_FILES}/etc/shells
echo /bin/mksh >>${IDIR_BASE_FILES}/etc/shells
ifneq (${ADK_PACKAGE_ASH},)
@@ -43,14 +50,13 @@ endif
ifneq (${ADK_PACKAGE_ZSH},)
echo /bin/zsh >>${IDIR_BASE_FILES}/etc/shells
endif
- mkdir -p $(IDIR_BASE_FILES)/usr/lib/ipkg/lists
mkdir -p $(IDIR_BASE_FILES)/etc/crontabs
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 .)
chmod 1777 ${IDIR_BASE_FILES}/tmp
ln -sf ../proc/mounts $(IDIR_BASE_FILES)/etc/mtab
rm -rf $(IDIR_BASE_FILES)/var
@@ -61,7 +67,7 @@ endif
cat ./files/inittab.vga >> $(IDIR_BASE_FILES)/etc/inittab
test -z $(ADK_RUNTIME_GETTY_SERIAL) || \
cat ./files/inittab.serial >> $(IDIR_BASE_FILES)/etc/inittab
- $(SED) 's#@DEVICE@#$(ADK_RUNTIME_CONSOLE_SERIAL_DEVICE)#' $(IDIR_BASE_FILES)/etc/inittab
+ $(SED) 's#@DEVICE@#$(ADK_RUNTIME_CONSOLE_SERIAL_DEVICE)#g' $(IDIR_BASE_FILES)/etc/inittab
$(SED) 's#@SPEED@#$(ADK_RUNTIME_CONSOLE_SERIAL_SPEED)#' $(IDIR_BASE_FILES)/etc/inittab
test -z $(ADK_RUNTIME_HOSTNAME) || \
echo $(ADK_RUNTIME_HOSTNAME) > $(IDIR_BASE_FILES)/etc/hostname; \
@@ -71,7 +77,8 @@ endif
test -z $(ADK_RUNTIME_PASSWORD) || \
$(SED) 's,\*NP\*,'"$$($(STAGING_HOST_DIR)/usr/bin/mkcrypt \
${ADK_RUNTIME_PASSWORD}),g" $(IDIR_BASE_FILES)/etc/shadow
- git log -1|head -1|sed -e 's#commit ##' \
+ test -z $(GIT) || \
+ $(GIT) log -1|head -1|sed -e 's#commit ##' \
> $(IDIR_BASE_FILES)/etc/adkversion
test -z $(ADK_TARGET_SYSTEM) || \
echo $(ADK_TARGET_SYSTEM) > $(IDIR_BASE_FILES)/etc/adktarget
@@ -80,23 +87,20 @@ ifneq (${ADK_PACKAGE_CONFIG_IN_ETC},)
gzip -9c ${TOPDIR}/.config >$(IDIR_BASE_FILES)/etc/adkconfig.gz
chmod 600 $(IDIR_BASE_FILES)/etc/adkconfig.gz
endif
-ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI),y)
- echo 'export LD_LIBRARY_PATH=/opt/vc/lib' >> $(IDIR_BASE_FILES)/etc/profile
-ifneq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI)$(ADK_TARGET_SYSTEM_IBM_X40)$(ADK_TARGET_SYSTEM_LEMOTE_YEELONG),)
+ifeq ($(ADK_TARGET_WITH_ROOT_RW),y)
echo 'export IPKGTMPDIR=/root/.ipkg' >> $(IDIR_BASE_FILES)/etc/profile
else
- echo 'export IPKGTMPDIR=/tmp >> $(IDIR_BASE_FILES)/etc/profile
+ echo 'export IPKGTMPDIR=/tmp' >> $(IDIR_BASE_FILES)/etc/profile
endif
-
+ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI),y)
+ echo 'export LD_LIBRARY_PATH=/opt/vc/lib' >> $(IDIR_BASE_FILES)/etc/profile
endif
# simple network configuration
ifneq (${ADK_SIMPLE_NETWORK_CONFIG},)
${INSTALL_DIR} ${IDIR_BASE_FILES}/etc/network
-
# network config local
echo -e "auto lo\niface lo inet loopback" > ${IDIR_BASE_FILES}/etc/network/interfaces
-
# network config eth0
# configure nic with dhcp
ifeq (${SIMPLE_NETWORK_CONFIG_ETH0_TYPE_NIC},y)
@@ -123,12 +127,10 @@ ifeq (${SIMPLE_NETWORK_CONFIG_ETH0_TYPE_BRIDGE_IP},y)
echo -e " broadcast ${SIMPLE_NETWORK_CONFIG_ETH0_BC}" >> ${IDIR_BASE_FILES}/etc/network/interfaces
echo -e " bridge-ports ${SIMPLE_NETWORK_CONFIG_ETH0_BRIDGE}" >> ${IDIR_BASE_FILES}/etc/network/interfaces
endif
-
# network config wlan0
ifeq (${SIMPLE_NETWORK_CONFIG_WLAN0_TYPE_NIC},y)
echo -e "\nauto wlan0\niface wlan0 inet dhcp" >> ${IDIR_BASE_FILES}/etc/network/interfaces
endif
-
# network config eth1
# configure nic with dhcp
ifeq (${SIMPLE_NETWORK_CONFIG_ETH1_TYPE_NIC},y)
@@ -155,13 +157,11 @@ ifeq (${SIMPLE_NETWORK_CONFIG_ETH1_TYPE_BRIDGE_IP},y)
echo -e " broadcast ${SIMPLE_NETWORK_CONFIG_ETH1_BC}" >> ${IDIR_BASE_FILES}/etc/network/interfaces
echo -e " bridge-ports ${SIMPLE_NETWORK_CONFIG_ETH1_BRIDGE}" >> ${IDIR_BASE_FILES}/etc/network/interfaces
endif
-
# newline at the end of interfaces file
echo -en "\n" >> ${IDIR_BASE_FILES}/etc/network/interfaces
-
# resolver config
+ rm ${IDIR_BASE_FILES}/etc/resolv.conf
echo -e "nameserver ${SIMPLE_NETWORK_CONFIG_RESOLV}" > ${IDIR_BASE_FILES}/etc/resolv.conf
endif
-
include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/base-files/files/inittab.shell b/package/base-files/files/inittab.shell
index 55e5e429f..d12593ca1 100644
--- a/package/base-files/files/inittab.shell
+++ b/package/base-files/files/inittab.shell
@@ -1 +1 @@
-::askfirst:/bin/sh
+::askfirst:-/bin/sh
diff --git a/package/base-files/src/etc/init.d/boot b/package/base-files/src/etc/init.d/boot
index f52e8dc78..291bf6ab4 100644
--- a/package/base-files/src/etc/init.d/boot
+++ b/package/base-files/src/etc/init.d/boot
@@ -4,10 +4,6 @@
. /etc/functions.sh
-if [ -f /proc/sys/kernel/printk ];then
- echo 0 > /proc/sys/kernel/printk
-fi
-
# remount /dev with smaller size
mount -o remount,nosuid,size=128k,mode=0755 -t tmpfs mdev /dev
@@ -19,6 +15,8 @@ mount -o remount,nosuid,nodev,mode=1777,size=${size}k -t tmpfs tmpfs /tmp
# start mdev dynamic device node management
echo >/dev/mdev.seq
echo "/sbin/mdev" >/proc/sys/kernel/hotplug
+# creates f.e. /dev/root
+mdev -s
# seed some random
cat /etc/.rnd >/dev/urandom 2>&1
@@ -29,9 +27,9 @@ cat /etc/.rnd >/dev/urandom 2>&1
# create some useful directories in tmpfs
mkdir -p /var/log
mkdir -p /var/run
+mkdir -p /var/tmp
touch /var/log/lastlog
touch /var/log/wtmp
-ln -s /tmp /var/tmp
HOSTNAME=
[[ -s /etc/hostname ]] && HOSTNAME=$(cat /etc/hostname)
diff --git a/package/base-files/src/etc/init.d/fs b/package/base-files/src/etc/init.d/fs
index 8f4397897..e995422ee 100644
--- a/package/base-files/src/etc/init.d/fs
+++ b/package/base-files/src/etc/init.d/fs
@@ -8,46 +8,26 @@
# activate any logical volumes
[ -x /usr/sbin/lvm ] && { lvm vgscan; lvm vgchange -ay; }
+fstypes="ext2 ext3 ext4 xfs"
+
# filesystem checks
-[ -x /sbin/fsck.ext2 ] && {
- for i in $(grep -v "^#" /etc/fstab|grep ext2|awk '{ print $1}');do fsck.ext2 $i;done;
-}
-[ -x /sbin/fsck.ext3 ] && {
- for i in $(grep -v "^#" /etc/fstab|grep ext3|awk '{ print $1}');do fsck.ext3 $i;done;
-}
-[ -x /sbin/fsck.ext4 ] && {
- for i in $(grep -v "^#" /etc/fstab|grep ext4|awk '{ print $1}');do fsck.ext4 $i;done;
-}
-[ -x /sbin/fsck.xfs ] && {
- for i in $(grep -v "^#" /etc/fstab|grep xfs|awk '{ print $1}');do xfs_repair $i;done;
-}
-# local filesystems
-grep ext2 /proc/filesystems >/dev/null 2>&1
-if [ $? -eq 0 ];then
- grep -v "^#" /etc/fstab |grep ext2 >/dev/null 2>&1
- if [ $? -eq 0 ];then
- mount -a -t ext2
- fi
-fi
-grep ext3 /proc/filesystems >/dev/null 2>&1
-if [ $? -eq 0 ];then
- grep -v "^#" /etc/fstab |grep ext3 >/dev/null 2>&1
- if [ $? -eq 0 ];then
- mount -a -t ext3
- fi
-fi
-grep ext4 /proc/filesystems >/dev/null 2>&1
-if [ $? -eq 0 ];then
- grep -v "^#" /etc/fstab |grep ext4 >/dev/null 2>&1
- if [ $? -eq 0 ];then
- mount -a -t ext4
- fi
-fi
-grep xfs /proc/filesystems >/dev/null 2>&1
-if [ $? -eq 0 ];then
- grep -v "^#" /etc/fstab |grep xfs >/dev/null 2>&1
+for fs in $fstypes; do
+ [ -x /usr/sbin/fsck.$fs ] && {
+ for i in $(grep -v "^#" /etc/fstab|grep $fs|awk '{ print $1}');do
+ echo "Checking filesystem on $i with $fs"
+ fsck -p -t $fs $i
+ done
+ }
+done
+
+# mount local filesystems
+for fs in $fstypes; do
+ grep $fs /proc/filesystems >/dev/null 2>&1
if [ $? -eq 0 ];then
- mount -a -t xfs
+ grep -v "^#" /etc/fstab |grep $fs >/dev/null 2>&1
+ if [ $? -eq 0 ];then
+ mount -a -t $fs
+ fi
fi
-fi
+done
exit 0
diff --git a/package/base-files/src/etc/inittab b/package/base-files/src/etc/inittab
index f6183798e..e2ad18156 100644
--- a/package/base-files/src/etc/inittab
+++ b/package/base-files/src/etc/inittab
@@ -6,5 +6,5 @@ null::sysinit:/bin/mount -a -t devpts
null::sysinit:/bin/mount -a -t tmpfs
::sysinit:/etc/init.d/rcS
::shutdown:/etc/init.d/rcK
-null::shutdown:/bin/umount -a -r
+null::shutdown:/bin/umount -a -t ext4
null::shutdown:/sbin/swapoff -a
diff --git a/package/base-files/src/etc/ipkg.conf b/package/base-files/src/etc/ipkg.conf
index cef6d2845..9c5ae17d3 100644
--- a/package/base-files/src/etc/ipkg.conf
+++ b/package/base-files/src/etc/ipkg.conf
@@ -1,3 +1,3 @@
-src @VENDOR@ http://@HOST@/@SYSTEM@_@ARCH@_@LIBC@/packages
+src @VENDOR@ http://@HOST@/pkg/@SYSTEM@_@ARCH@_@LIBC@@ABI@/packages
dest root /
dest ram /tmp
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/base-files/src/usr/share/udhcpc/default.script b/package/base-files/src/usr/share/udhcpc/default.script
index 3744dfb09..55a6655ab 100755
--- a/package/base-files/src/usr/share/udhcpc/default.script
+++ b/package/base-files/src/usr/share/udhcpc/default.script
@@ -23,16 +23,12 @@ case $1 in
ip route add to default via $i
done
fi
-
- touch /tmp/resolv.conf
- ln -sf /tmp/resolv.conf $RESOLV_CONF
echo -n >$RESOLV_CONF
${domain:+echo search $domain} >>$RESOLV_CONF
for i in $dns; do
echo "adding dns $i"
echo "nameserver $i" >>$RESOLV_CONF
done
-
# user rules
[ -f /etc/udhcpc.user ] && . /etc/udhcpc.user
;;
diff --git a/package/bash/Makefile b/package/bash/Makefile
index dc5c5b911..801d5920a 100644
--- a/package/bash/Makefile
+++ b/package/bash/Makefile
@@ -4,9 +4,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:= bash
-PKG_VERSION:= 4.2
-PKG_RELEASE:= 2
-PKG_MD5SUM:= 3fb927c7c33022f1c327f14a81c0d4b0
+PKG_VERSION:= 4.3
+PKG_RELEASE:= 1
+PKG_MD5SUM:= 81348932d5da294953e15d4814c74dd1
PKG_DESCR:= Bourne-Again SHell
PKG_SECTION:= shells
PKG_URL:= http://www.gnu.org/software/bash/
diff --git a/package/bash/patches/patch-Makefile_in b/package/bash/patches/patch-Makefile_in
deleted file mode 100644
index 8e6cfb1ac..000000000
--- a/package/bash/patches/patch-Makefile_in
+++ /dev/null
@@ -1,13 +0,0 @@
---- bash-4.2.orig/Makefile.in 2010-12-01 01:22:42.000000000 +0100
-+++ bash-4.2/Makefile.in 2011-03-09 20:03:07.163370779 +0100
-@@ -710,8 +710,8 @@ pathnames.h: Makefile $(srcdir)/pathnam
- @${RM} pathnames.tmp
-
- # comment out for distribution
--$(srcdir)/configure: $(srcdir)/configure.in $(srcdir)/aclocal.m4 $(srcdir)/config.h.in
-- cd $(srcdir) && autoconf
-+#$(srcdir)/configure: $(srcdir)/configure.in $(srcdir)/aclocal.m4 $(srcdir)/config.h.in
-+# cd $(srcdir) && autoconf
-
- # for chet
- reconfig: force
diff --git a/package/bash/patches/patch-builtins_Makefile_in b/package/bash/patches/patch-builtins_Makefile_in
deleted file mode 100644
index 69c175663..000000000
--- a/package/bash/patches/patch-builtins_Makefile_in
+++ /dev/null
@@ -1,11 +0,0 @@
---- bash-4.0.orig/builtins/Makefile.in 2009-01-04 20:32:22.000000000 +0100
-+++ bash-4.0/builtins/Makefile.in 2009-10-21 13:17:04.681674304 +0200
-@@ -56,7 +56,7 @@ LIBBUILD = ${BUILD_DIR}/lib
-
- PROFILE_FLAGS = @PROFILE_FLAGS@
- CFLAGS = @CFLAGS@
--CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ @CROSS_COMPILE@
-+CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
- CPPFLAGS = @CPPFLAGS@
- CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@
- LOCAL_CFLAGS = @LOCAL_CFLAGS@ ${DEBUG}
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/bcm2835-bootloader/Makefile b/package/bcm2835-bootloader/Makefile
index 8cd28cdd3..b88cd7f08 100644
--- a/package/bcm2835-bootloader/Makefile
+++ b/package/bcm2835-bootloader/Makefile
@@ -4,11 +4,11 @@
include ${TOPDIR}/rules.mk
PKG_NAME:= bcm2835-bootloader
-# actually f46e6d9cb9a6bf419fe2a428a8a586239e93aa2d from 07.01.2014
+# actually 9953ce0847c04b587b694c79c5b5a4ac63f5c369 from 25.03.2014
# https://github.com/raspberrypi/firmware
-PKG_VERSION:= 0.6
+PKG_VERSION:= 0.7
PKG_RELEASE:= 1
-PKG_MD5SUM:= dba84ce20fc8a8c1bf473758d9350e19
+PKG_MD5SUM:= 7ad7e5d3ad311d88d1e82fc729042d87
PKG_DESCR:= bootloader for raspberry pi (bcm2835)
PKG_SECTION:= boot
PKG_SITES:= http://openadk.org/distfiles/
diff --git a/package/bcm2835-vc/Makefile b/package/bcm2835-vc/Makefile
index e6405bf38..12655228c 100644
--- a/package/bcm2835-vc/Makefile
+++ b/package/bcm2835-vc/Makefile
@@ -4,11 +4,12 @@
include ${TOPDIR}/rules.mk
PKG_NAME:= bcm2835-vc
-# actually f65a4eef05ee436976f9be219d3db841d3d6b8ec from 05.10.2013
-PKG_VERSION:= 0.3
-PKG_RELEASE:= 3
-PKG_MD5SUM:= 027d42d1ba803fabdc6bc4ec78d52e67
-PKG_DESCR:= vc tools for raspberry pi (bcm2835)
+# actually a8fbe2cd6a3d4455344295809f2e663373ad25cb from 25.03.2014
+# https://github.com/raspberrypi/userland
+PKG_VERSION:= 0.4
+PKG_RELEASE:= 1
+PKG_MD5SUM:= 091ae422e05a59ffc2b8908256047b7d
+PKG_DESCR:= vc tools and libraries for raspberry pi
PKG_SECTION:= base
PKG_DEPENDS:= libpthread
PKG_BUILDDEP:= cmake-host
diff --git a/package/binutils/Makefile b/package/binutils/Makefile
index 5734e198d..1a6014607 100644
--- a/package/binutils/Makefile
+++ b/package/binutils/Makefile
@@ -39,8 +39,8 @@ CONFIGURE_ARGS+= --disable-werror \
# disable honour cflags stuff
XAKE_FLAGS+= GCC_HONOUR_COPTS=s
-post-build:
- $(CP) ${WRKBUILD}/libiberty/libiberty.a $(STAGING_TARGET_DIR)/usr/lib
+pre-build:
+ @-rm $(STAGING_TARGET_DIR)/usr/lib/libiberty.a
libbfd-install:
${INSTALL_DIR} ${IDIR_LIBBFD}/usr/lib
diff --git a/package/bison/Makefile b/package/bison/Makefile
index 02c3ca31f..bae66f25b 100644
--- a/package/bison/Makefile
+++ b/package/bison/Makefile
@@ -4,18 +4,16 @@
include ${TOPDIR}/rules.mk
PKG_NAME:= bison
-PKG_VERSION:= 3.0.1
+PKG_VERSION:= 3.0.2
PKG_RELEASE:= 1
-PKG_MD5SUM:= 032a7b7b9f1a6e278ccde73f82cec5c2
-PKG_DESCR:= GNU parser generator
+PKG_MD5SUM:= 72c66879187c128d04f4ab7422e8072d
+PKG_DESCR:= parser generator
PKG_SECTION:= lang
PKG_BUILDDEP:= m4-host flex-host bison-host
HOST_BUILDDEP:= m4-host flex-host
PKG_URL:= http://www.gnu.org/software/bison/
PKG_SITES:= ${MASTER_SITE_GNU:=${PKG_NAME}/}
-DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.xz
-
include ${TOPDIR}/mk/host.mk
include ${TOPDIR}/mk/package.mk
diff --git a/package/busybox/Makefile b/package/busybox/Makefile
index c1923708e..6b07623b0 100644
--- a/package/busybox/Makefile
+++ b/package/busybox/Makefile
@@ -5,10 +5,11 @@ include $(TOPDIR)/rules.mk
PKG_NAME:= busybox
PKG_VERSION:= 1.21.1
-PKG_RELEASE:= 5
+PKG_RELEASE:= 6
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/
@@ -59,6 +60,10 @@ do-build:
do-install:
$(MAKE) ${BB_MAKE_FLAGS} install $(MAKE_TRACE)
$(CP) $(WRKINST)/* $(IDIR_BUSYBOX)/
+ifeq ($(BUSYBOX_IFUPDOWN),y)
+ $(INSTALL_DIR) $(IDIR_BUSYBOX)/etc/init.d
+ $(INSTALL_BIN) ./files/network $(IDIR_BUSYBOX)/etc/init.d
+endif
ifeq ($(ADK_DEBUG),y)
${INSTALL_BIN} $(WRKBUILD)/busybox_unstripped \
$(IDIR_BUSYBOX)/bin/busybox
diff --git a/package/busybox/config/miscutils/Config.in b/package/busybox/config/miscutils/Config.in
index 4c05e5dae..f13267eac 100644
--- a/package/busybox/config/miscutils/Config.in
+++ b/package/busybox/config/miscutils/Config.in
@@ -281,7 +281,7 @@ config BUSYBOX_CHRT
config BUSYBOX_CROND
bool "crond"
- default y
+ default n
select BUSYBOX_FEATURE_SYSLOG
help
Crond is a background daemon that parses individual crontab
@@ -301,7 +301,7 @@ config BUSYBOX_FEATURE_CROND_D
config BUSYBOX_FEATURE_CROND_CALL_SENDMAIL
bool "Report command output via email (using sendmail)"
- default y
+ default n
depends on BUSYBOX_CROND
help
Command output will be sent to corresponding user via email.
@@ -747,7 +747,7 @@ config BUSYBOX_WALL
config BUSYBOX_WATCHDOG
bool "watchdog"
- default y
+ default n
depends on !BUSYBOX_DISABLE_WATCHDOG
select BUSYBOX_PLATFORM_LINUX
help
diff --git a/package/busybox/config/networking/Config.in b/package/busybox/config/networking/Config.in
index e350a1b16..fa5a7cd47 100644
--- a/package/busybox/config/networking/Config.in
+++ b/package/busybox/config/networking/Config.in
@@ -748,7 +748,7 @@ config BUSYBOX_NSLOOKUP
config BUSYBOX_NTPD
bool "ntpd"
depends on !BUSYBOX_DISABLE_NTPD
- default y
+ default n
select BUSYBOX_PLATFORM_LINUX
help
The NTP client/server daemon.
diff --git a/package/busybox/config/networking/udhcp/Config.in b/package/busybox/config/networking/udhcp/Config.in
index 6ece73097..e0f20fc49 100644
--- a/package/busybox/config/networking/udhcp/Config.in
+++ b/package/busybox/config/networking/udhcp/Config.in
@@ -12,7 +12,7 @@ config BUSYBOX_UDHCPC6
config BUSYBOX_UDHCPD
bool "udhcp server (udhcpd)"
- default y
+ default n
select BUSYBOX_PLATFORM_LINUX
help
udhcpd is a DHCP server geared primarily toward embedded systems,
diff --git a/package/busybox/files/busybox.postinst b/package/busybox/files/busybox.postinst
index c71a536ce..d403ff481 100644
--- a/package/busybox/files/busybox.postinst
+++ b/package/busybox/files/busybox.postinst
@@ -5,7 +5,8 @@ add_rcconf network network YES
add_rcconf crond crond NO
add_rcconf watchdog watchdog NO
add_rcconf watchdog_flags watchdog_flags '-t 10 -T 20'
-add_rcconf 'use "-C32" normally, "NO" to disable' syslogd_flags '-C32'
+add_rcconf syslogd NO
+add_rcconf 'use "-C32" normally' syslogd_flags '-C32'
add_rcconf inetd inetd NO
add_rcconf ntpd ntpd NO
add_rcconf ntpd_flags ntpd_flags '-p time.fu-berlin.de'
diff --git a/package/busybox/files/network.init b/package/busybox/files/network
index 4989fcbcb..4989fcbcb 100644
--- a/package/busybox/files/network.init
+++ b/package/busybox/files/network
diff --git a/package/busybox/files/syslog.init b/package/busybox/files/syslogd.init
index 7a85430ca..7a85430ca 100644
--- a/package/busybox/files/syslog.init
+++ b/package/busybox/files/syslogd.init
diff --git a/package/busybox/files/udhcpd.init b/package/busybox/files/udhcpd.init
index f626fb732..edec3ac91 100644
--- a/package/busybox/files/udhcpd.init
+++ b/package/busybox/files/udhcpd.init
@@ -1,5 +1,5 @@
#!/bin/sh
-#PKG udhcpd
+#PKG busybox
#INIT 50
. /etc/rc.conf
diff --git a/package/busybox/patches/001-ipkg.patch b/package/busybox/patches/001-ipkg.patch
index 5f392d06b..1b65a5c90 100644
--- a/package/busybox/patches/001-ipkg.patch
+++ b/package/busybox/patches/001-ipkg.patch
@@ -1,6 +1,6 @@
diff -Nur busybox-1.21.1.orig/archival/Config.src busybox-1.21.1/archival/Config.src
--- busybox-1.21.1.orig/archival/Config.src 2013-05-12 01:30:43.000000000 +0200
-+++ busybox-1.21.1/archival/Config.src 2014-02-17 14:25:39.802534016 +0100
++++ busybox-1.21.1/archival/Config.src 2014-04-07 12:36:32.391575261 +0200
@@ -214,6 +214,12 @@
are actually slower than gzip at equivalent compression ratios
and take up 3.2K of code.
@@ -16,7 +16,7 @@ diff -Nur busybox-1.21.1.orig/archival/Config.src busybox-1.21.1/archival/Config
default y
diff -Nur busybox-1.21.1.orig/archival/ipkg.c busybox-1.21.1/archival/ipkg.c
--- busybox-1.21.1.orig/archival/ipkg.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/ipkg.c 2014-02-17 14:25:39.802534016 +0100
++++ busybox-1.21.1/archival/ipkg.c 2014-04-07 12:36:32.391575261 +0200
@@ -0,0 +1,28 @@
+/* ipkg.c - the itsy package management system
+
@@ -48,7 +48,7 @@ diff -Nur busybox-1.21.1.orig/archival/ipkg.c busybox-1.21.1/archival/ipkg.c
+}
diff -Nur busybox-1.21.1.orig/archival/Kbuild.src busybox-1.21.1/archival/Kbuild.src
--- busybox-1.21.1.orig/archival/Kbuild.src 2013-05-12 01:30:43.000000000 +0200
-+++ busybox-1.21.1/archival/Kbuild.src 2014-02-17 14:25:39.802534016 +0100
++++ busybox-1.21.1/archival/Kbuild.src 2014-04-07 12:36:32.391575261 +0200
@@ -22,6 +22,7 @@
lib-$(CONFIG_LZOP) += lzop.o bbunzip.o
lib-$(CONFIG_GZIP) += gzip.o bbunzip.o
@@ -59,7 +59,7 @@ diff -Nur busybox-1.21.1.orig/archival/Kbuild.src busybox-1.21.1/archival/Kbuild
lib-$(CONFIG_UNLZMA) += bbunzip.o
diff -Nur busybox-1.21.1.orig/archival/libarchive/Kbuild.src busybox-1.21.1/archival/libarchive/Kbuild.src
--- busybox-1.21.1.orig/archival/libarchive/Kbuild.src 2013-06-29 16:58:06.000000000 +0200
-+++ busybox-1.21.1/archival/libarchive/Kbuild.src 2014-02-17 14:25:39.802534016 +0100
++++ busybox-1.21.1/archival/libarchive/Kbuild.src 2014-04-07 12:36:32.391575261 +0200
@@ -25,14 +25,14 @@
\
data_align.o \
@@ -79,7 +79,7 @@ diff -Nur busybox-1.21.1.orig/archival/libarchive/Kbuild.src busybox-1.21.1/arch
diff -Nur busybox-1.21.1.orig/archival/libipkg/args.c busybox-1.21.1/archival/libipkg/args.c
--- busybox-1.21.1.orig/archival/libipkg/args.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/args.c 2014-02-17 14:25:39.826534090 +0100
++++ busybox-1.21.1/archival/libipkg/args.c 2014-04-07 12:36:32.391575261 +0200
@@ -0,0 +1,242 @@
+/* args.c - parse command-line args
+
@@ -325,7 +325,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/args.c busybox-1.21.1/archival/li
+}
diff -Nur busybox-1.21.1.orig/archival/libipkg/args.h busybox-1.21.1/archival/libipkg/args.h
--- busybox-1.21.1.orig/archival/libipkg/args.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/args.h 2014-02-17 14:25:39.826534090 +0100
++++ busybox-1.21.1/archival/libipkg/args.h 2014-04-07 12:36:32.391575261 +0200
@@ -0,0 +1,72 @@
+/* args.h - parse command-line args
+
@@ -401,7 +401,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/args.h busybox-1.21.1/archival/li
+#endif
diff -Nur busybox-1.21.1.orig/archival/libipkg/conffile.c busybox-1.21.1/archival/libipkg/conffile.c
--- busybox-1.21.1.orig/archival/libipkg/conffile.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/conffile.c 2014-02-17 14:25:39.826534090 +0100
++++ busybox-1.21.1/archival/libipkg/conffile.c 2014-04-07 12:36:32.391575261 +0200
@@ -0,0 +1,65 @@
+/* conffile.c - the itsy package management system
+
@@ -470,7 +470,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/conffile.c busybox-1.21.1/archiva
+}
diff -Nur busybox-1.21.1.orig/archival/libipkg/conffile.h busybox-1.21.1/archival/libipkg/conffile.h
--- busybox-1.21.1.orig/archival/libipkg/conffile.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/conffile.h 2014-02-17 14:25:39.826534090 +0100
++++ busybox-1.21.1/archival/libipkg/conffile.h 2014-04-07 12:36:32.391575261 +0200
@@ -0,0 +1,30 @@
+/* conffile.h - the itsy package management system
+
@@ -504,7 +504,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/conffile.h busybox-1.21.1/archiva
+
diff -Nur busybox-1.21.1.orig/archival/libipkg/conffile_list.c busybox-1.21.1/archival/libipkg/conffile_list.c
--- busybox-1.21.1.orig/archival/libipkg/conffile_list.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/conffile_list.c 2014-02-17 14:25:39.850534164 +0100
++++ busybox-1.21.1/archival/libipkg/conffile_list.c 2014-04-07 12:36:32.391575261 +0200
@@ -0,0 +1,47 @@
+/* conffile_list.c - the itsy package management system
+
@@ -555,7 +555,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/conffile_list.c busybox-1.21.1/ar
+
diff -Nur busybox-1.21.1.orig/archival/libipkg/conffile_list.h busybox-1.21.1/archival/libipkg/conffile_list.h
--- busybox-1.21.1.orig/archival/libipkg/conffile_list.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/conffile_list.h 2014-02-17 14:25:39.850534164 +0100
++++ busybox-1.21.1/archival/libipkg/conffile_list.h 2014-04-07 12:36:32.391575261 +0200
@@ -0,0 +1,36 @@
+/* conffile_list.h - the itsy package management system
+
@@ -595,7 +595,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/conffile_list.h busybox-1.21.1/ar
+
diff -Nur busybox-1.21.1.orig/archival/libipkg/file_util.c busybox-1.21.1/archival/libipkg/file_util.c
--- busybox-1.21.1.orig/archival/libipkg/file_util.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/file_util.c 2014-02-17 14:25:39.850534164 +0100
++++ busybox-1.21.1/archival/libipkg/file_util.c 2014-04-07 12:36:32.391575261 +0200
@@ -0,0 +1,186 @@
+/* file_util.c - convenience routines for common stat operations
+
@@ -785,7 +785,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/file_util.c busybox-1.21.1/archiv
+
diff -Nur busybox-1.21.1.orig/archival/libipkg/file_util.h busybox-1.21.1/archival/libipkg/file_util.h
--- busybox-1.21.1.orig/archival/libipkg/file_util.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/file_util.h 2014-02-17 14:25:39.850534164 +0100
++++ busybox-1.21.1/archival/libipkg/file_util.h 2014-04-07 12:36:32.391575261 +0200
@@ -0,0 +1,29 @@
+/* file_util.h - convenience routines for common file operations
+
@@ -818,7 +818,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/file_util.h busybox-1.21.1/archiv
+#endif
diff -Nur busybox-1.21.1.orig/archival/libipkg/hash_table.c busybox-1.21.1/archival/libipkg/hash_table.c
--- busybox-1.21.1.orig/archival/libipkg/hash_table.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/hash_table.c 2014-02-17 14:25:39.850534164 +0100
++++ busybox-1.21.1/archival/libipkg/hash_table.c 2014-04-07 12:36:32.391575261 +0200
@@ -0,0 +1,155 @@
+/* hash.c - hash tables for ipkg
+
@@ -977,7 +977,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/hash_table.c busybox-1.21.1/archi
+
diff -Nur busybox-1.21.1.orig/archival/libipkg/hash_table.h busybox-1.21.1/archival/libipkg/hash_table.h
--- busybox-1.21.1.orig/archival/libipkg/hash_table.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/hash_table.h 2014-02-17 14:25:39.854534176 +0100
++++ busybox-1.21.1/archival/libipkg/hash_table.h 2014-04-07 12:36:32.391575261 +0200
@@ -0,0 +1,44 @@
+/* hash.h - hash tables for ipkg
+
@@ -1025,7 +1025,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/hash_table.h busybox-1.21.1/archi
+#endif /* _HASH_TABLE_H_ */
diff -Nur busybox-1.21.1.orig/archival/libipkg/ipkg_cmd.c busybox-1.21.1/archival/libipkg/ipkg_cmd.c
--- busybox-1.21.1.orig/archival/libipkg/ipkg_cmd.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/ipkg_cmd.c 2014-02-17 14:25:39.858534188 +0100
++++ busybox-1.21.1/archival/libipkg/ipkg_cmd.c 2014-04-07 12:36:32.411575387 +0200
@@ -0,0 +1,1367 @@
+/* ipkg_cmd.c - the itsy package management system
+
@@ -2396,7 +2396,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/ipkg_cmd.c busybox-1.21.1/archiva
+
diff -Nur busybox-1.21.1.orig/archival/libipkg/ipkg_cmd.h busybox-1.21.1/archival/libipkg/ipkg_cmd.h
--- busybox-1.21.1.orig/archival/libipkg/ipkg_cmd.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/ipkg_cmd.h 2014-02-17 14:25:39.858534188 +0100
++++ busybox-1.21.1/archival/libipkg/ipkg_cmd.h 2014-04-07 12:36:32.411575387 +0200
@@ -0,0 +1,41 @@
+/* ipkg_cmd.h - the itsy package management system
+
@@ -2441,7 +2441,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/ipkg_cmd.h busybox-1.21.1/archiva
+#endif
diff -Nur busybox-1.21.1.orig/archival/libipkg/ipkg_conf.c busybox-1.21.1/archival/libipkg/ipkg_conf.c
--- busybox-1.21.1.orig/archival/libipkg/ipkg_conf.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/ipkg_conf.c 2014-02-17 19:29:30.303924578 +0100
++++ busybox-1.21.1/archival/libipkg/ipkg_conf.c 2014-04-07 12:36:32.411575387 +0200
@@ -0,0 +1,739 @@
+/* ipkg_conf.c - the itsy package management system
+
@@ -3184,7 +3184,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/ipkg_conf.c busybox-1.21.1/archiv
+}
diff -Nur busybox-1.21.1.orig/archival/libipkg/ipkg_conf.h busybox-1.21.1/archival/libipkg/ipkg_conf.h
--- busybox-1.21.1.orig/archival/libipkg/ipkg_conf.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/ipkg_conf.h 2014-02-17 14:25:39.858534188 +0100
++++ busybox-1.21.1/archival/libipkg/ipkg_conf.h 2014-04-07 12:36:32.411575387 +0200
@@ -0,0 +1,107 @@
+/* ipkg_conf.h - the itsy package management system
+
@@ -3295,7 +3295,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/ipkg_conf.h busybox-1.21.1/archiv
+#endif
diff -Nur busybox-1.21.1.orig/archival/libipkg/ipkg_configure.c busybox-1.21.1/archival/libipkg/ipkg_configure.c
--- busybox-1.21.1.orig/archival/libipkg/ipkg_configure.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/ipkg_configure.c 2014-02-17 14:25:39.858534188 +0100
++++ busybox-1.21.1/archival/libipkg/ipkg_configure.c 2014-04-07 12:36:32.411575387 +0200
@@ -0,0 +1,40 @@
+/* ipkg_configure.c - the itsy package management system
+
@@ -3339,7 +3339,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/ipkg_configure.c busybox-1.21.1/a
+
diff -Nur busybox-1.21.1.orig/archival/libipkg/ipkg_configure.h busybox-1.21.1/archival/libipkg/ipkg_configure.h
--- busybox-1.21.1.orig/archival/libipkg/ipkg_configure.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/ipkg_configure.h 2014-02-17 14:25:39.858534188 +0100
++++ busybox-1.21.1/archival/libipkg/ipkg_configure.h 2014-04-07 12:36:32.411575387 +0200
@@ -0,0 +1,25 @@
+/* ipkg_configure.h - the itsy package management system
+
@@ -3368,7 +3368,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/ipkg_configure.h busybox-1.21.1/a
+#endif
diff -Nur busybox-1.21.1.orig/archival/libipkg/ipkg_download.c busybox-1.21.1/archival/libipkg/ipkg_download.c
--- busybox-1.21.1.orig/archival/libipkg/ipkg_download.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/ipkg_download.c 2014-02-17 14:25:39.858534188 +0100
++++ busybox-1.21.1/archival/libipkg/ipkg_download.c 2014-04-07 12:36:32.411575387 +0200
@@ -0,0 +1,195 @@
+/* ipkg_download.c - the itsy package management system
+
@@ -3567,7 +3567,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/ipkg_download.c busybox-1.21.1/ar
+}
diff -Nur busybox-1.21.1.orig/archival/libipkg/ipkg_download.h busybox-1.21.1/archival/libipkg/ipkg_download.h
--- busybox-1.21.1.orig/archival/libipkg/ipkg_download.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/ipkg_download.h 2014-02-17 14:25:39.858534188 +0100
++++ busybox-1.21.1/archival/libipkg/ipkg_download.h 2014-04-07 12:36:32.411575387 +0200
@@ -0,0 +1,30 @@
+/* ipkg_download.h - the itsy package management system
+
@@ -3601,7 +3601,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/ipkg_download.h busybox-1.21.1/ar
+#endif
diff -Nur busybox-1.21.1.orig/archival/libipkg/ipkg.h busybox-1.21.1/archival/libipkg/ipkg.h
--- busybox-1.21.1.orig/archival/libipkg/ipkg.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/ipkg.h 2014-02-17 14:25:39.858534188 +0100
++++ busybox-1.21.1/archival/libipkg/ipkg.h 2014-04-07 12:36:32.411575387 +0200
@@ -0,0 +1,68 @@
+/* ipkg.h - the itsy package management system
+
@@ -3673,7 +3673,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/ipkg.h busybox-1.21.1/archival/li
+#endif
diff -Nur busybox-1.21.1.orig/archival/libipkg/ipkg_includes.h busybox-1.21.1/archival/libipkg/ipkg_includes.h
--- busybox-1.21.1.orig/archival/libipkg/ipkg_includes.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/ipkg_includes.h 2014-02-17 14:25:39.858534188 +0100
++++ busybox-1.21.1/archival/libipkg/ipkg_includes.h 2014-04-07 12:36:32.411575387 +0200
@@ -0,0 +1,82 @@
+#ifndef IPKG_INCLUDES_H
+#define IPKG_INCLUDES_H
@@ -3759,7 +3759,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/ipkg_includes.h busybox-1.21.1/ar
+#endif /* IPKG_INCLUDES_H */
diff -Nur busybox-1.21.1.orig/archival/libipkg/ipkg_install.c busybox-1.21.1/archival/libipkg/ipkg_install.c
--- busybox-1.21.1.orig/archival/libipkg/ipkg_install.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/ipkg_install.c 2014-02-17 14:25:39.858534188 +0100
++++ busybox-1.21.1/archival/libipkg/ipkg_install.c 2014-04-07 12:36:32.415575413 +0200
@@ -0,0 +1,1982 @@
+/* ipkg_install.c - the itsy package management system
+
@@ -5745,7 +5745,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/ipkg_install.c busybox-1.21.1/arc
+#endif
diff -Nur busybox-1.21.1.orig/archival/libipkg/ipkg_install.h busybox-1.21.1/archival/libipkg/ipkg_install.h
--- busybox-1.21.1.orig/archival/libipkg/ipkg_install.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/ipkg_install.h 2014-02-17 14:25:39.858534188 +0100
++++ busybox-1.21.1/archival/libipkg/ipkg_install.h 2014-04-07 12:36:32.415575413 +0200
@@ -0,0 +1,35 @@
+/* ipkg_install.h - the itsy package management system
+
@@ -5784,7 +5784,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/ipkg_install.h busybox-1.21.1/arc
+#endif
diff -Nur busybox-1.21.1.orig/archival/libipkg/ipkg_message.c busybox-1.21.1/archival/libipkg/ipkg_message.c
--- busybox-1.21.1.orig/archival/libipkg/ipkg_message.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/ipkg_message.c 2014-02-17 14:25:39.858534188 +0100
++++ busybox-1.21.1/archival/libipkg/ipkg_message.c 2014-04-07 12:36:32.415575413 +0200
@@ -0,0 +1,35 @@
+/* ipkg_message.c - the itsy package management system
+
@@ -5823,7 +5823,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/ipkg_message.c busybox-1.21.1/arc
+}
diff -Nur busybox-1.21.1.orig/archival/libipkg/ipkg_message.h busybox-1.21.1/archival/libipkg/ipkg_message.h
--- busybox-1.21.1.orig/archival/libipkg/ipkg_message.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/ipkg_message.h 2014-02-17 14:25:39.858534188 +0100
++++ busybox-1.21.1/archival/libipkg/ipkg_message.h 2014-04-07 12:36:32.415575413 +0200
@@ -0,0 +1,32 @@
+/* ipkg_message.h - the itsy package management system
+
@@ -5859,7 +5859,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/ipkg_message.h busybox-1.21.1/arc
+#endif /* _IPKG_MESSAGE_H_ */
diff -Nur busybox-1.21.1.orig/archival/libipkg/ipkg_remove.c busybox-1.21.1/archival/libipkg/ipkg_remove.c
--- busybox-1.21.1.orig/archival/libipkg/ipkg_remove.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/ipkg_remove.c 2014-02-17 14:25:39.858534188 +0100
++++ busybox-1.21.1/archival/libipkg/ipkg_remove.c 2014-04-07 12:36:32.415575413 +0200
@@ -0,0 +1,385 @@
+/* ipkg_remove.c - the itsy package management system
+
@@ -6248,7 +6248,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/ipkg_remove.c busybox-1.21.1/arch
+}
diff -Nur busybox-1.21.1.orig/archival/libipkg/ipkg_remove.h busybox-1.21.1/archival/libipkg/ipkg_remove.h
--- busybox-1.21.1.orig/archival/libipkg/ipkg_remove.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/ipkg_remove.h 2014-02-17 14:25:39.858534188 +0100
++++ busybox-1.21.1/archival/libipkg/ipkg_remove.h 2014-04-07 12:36:32.415575413 +0200
@@ -0,0 +1,33 @@
+/* ipkg_remove.h - the itsy package management system
+
@@ -6285,7 +6285,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/ipkg_remove.h busybox-1.21.1/arch
+#endif
diff -Nur busybox-1.21.1.orig/archival/libipkg/ipkg_upgrade.c busybox-1.21.1/archival/libipkg/ipkg_upgrade.c
--- busybox-1.21.1.orig/archival/libipkg/ipkg_upgrade.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/ipkg_upgrade.c 2014-02-17 14:25:39.858534188 +0100
++++ busybox-1.21.1/archival/libipkg/ipkg_upgrade.c 2014-04-07 12:36:32.415575413 +0200
@@ -0,0 +1,79 @@
+/* ipkg_upgrade.c - the itsy package management system
+
@@ -6368,7 +6368,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/ipkg_upgrade.c busybox-1.21.1/arc
+}
diff -Nur busybox-1.21.1.orig/archival/libipkg/ipkg_upgrade.h busybox-1.21.1/archival/libipkg/ipkg_upgrade.h
--- busybox-1.21.1.orig/archival/libipkg/ipkg_upgrade.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/ipkg_upgrade.h 2014-02-17 14:25:39.862534201 +0100
++++ busybox-1.21.1/archival/libipkg/ipkg_upgrade.h 2014-04-07 12:36:32.415575413 +0200
@@ -0,0 +1,18 @@
+/* ipkg_upgrade.c - the itsy package management system
+
@@ -6390,7 +6390,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/ipkg_upgrade.h busybox-1.21.1/arc
+int ipkg_upgrade_pkg(ipkg_conf_t *conf, pkg_t *old);
diff -Nur busybox-1.21.1.orig/archival/libipkg/ipkg_utils.c busybox-1.21.1/archival/libipkg/ipkg_utils.c
--- busybox-1.21.1.orig/archival/libipkg/ipkg_utils.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/ipkg_utils.c 2014-02-17 14:25:39.862534201 +0100
++++ busybox-1.21.1/archival/libipkg/ipkg_utils.c 2014-04-07 12:36:32.415575413 +0200
@@ -0,0 +1,185 @@
+/* ipkg_utils.c - the itsy package management system
+
@@ -6579,7 +6579,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/ipkg_utils.c busybox-1.21.1/archi
+
diff -Nur busybox-1.21.1.orig/archival/libipkg/ipkg_utils.h busybox-1.21.1/archival/libipkg/ipkg_utils.h
--- busybox-1.21.1.orig/archival/libipkg/ipkg_utils.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/ipkg_utils.h 2014-02-17 14:25:39.862534201 +0100
++++ busybox-1.21.1/archival/libipkg/ipkg_utils.h 2014-04-07 12:36:32.415575413 +0200
@@ -0,0 +1,29 @@
+/* ipkg_utils.h - the itsy package management system
+
@@ -6612,7 +6612,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/ipkg_utils.h busybox-1.21.1/archi
+#endif
diff -Nur busybox-1.21.1.orig/archival/libipkg/Kbuild busybox-1.21.1/archival/libipkg/Kbuild
--- busybox-1.21.1.orig/archival/libipkg/Kbuild 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/Kbuild 2014-02-17 14:25:39.862534201 +0100
++++ busybox-1.21.1/archival/libipkg/Kbuild 2014-04-07 12:36:32.415575413 +0200
@@ -0,0 +1,60 @@
+# Makefile for busybox
+#
@@ -6676,7 +6676,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/Kbuild busybox-1.21.1/archival/li
+CFLAGS += -DIPKGLIBDIR="\"/usr/lib\"" -DHOST_CPU_STR="\"$(IPKG_ARCH)\""
diff -Nur busybox-1.21.1.orig/archival/libipkg/libipkg.c busybox-1.21.1/archival/libipkg/libipkg.c
--- busybox-1.21.1.orig/archival/libipkg/libipkg.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/libipkg.c 2014-02-17 14:25:39.862534201 +0100
++++ busybox-1.21.1/archival/libipkg/libipkg.c 2014-04-07 12:36:32.415575413 +0200
@@ -0,0 +1,583 @@
+/* ipkglib.c - the itsy package management system
+
@@ -7263,7 +7263,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/libipkg.c busybox-1.21.1/archival
+}
diff -Nur busybox-1.21.1.orig/archival/libipkg/libipkg.h busybox-1.21.1/archival/libipkg/libipkg.h
--- busybox-1.21.1.orig/archival/libipkg/libipkg.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/libipkg.h 2014-02-17 14:25:39.862534201 +0100
++++ busybox-1.21.1/archival/libipkg/libipkg.h 2014-04-07 12:36:32.415575413 +0200
@@ -0,0 +1,78 @@
+/* ipkglib.h - the itsy package management system
+
@@ -7345,7 +7345,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/libipkg.h busybox-1.21.1/archival
+#endif
diff -Nur busybox-1.21.1.orig/archival/libipkg/nv_pair.c busybox-1.21.1/archival/libipkg/nv_pair.c
--- busybox-1.21.1.orig/archival/libipkg/nv_pair.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/nv_pair.c 2014-02-17 14:25:39.862534201 +0100
++++ busybox-1.21.1/archival/libipkg/nv_pair.c 2014-04-07 12:36:32.415575413 +0200
@@ -0,0 +1,40 @@
+/* nv_pair.c - the itsy package management system
+
@@ -7389,7 +7389,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/nv_pair.c busybox-1.21.1/archival
+
diff -Nur busybox-1.21.1.orig/archival/libipkg/nv_pair.h busybox-1.21.1/archival/libipkg/nv_pair.h
--- busybox-1.21.1.orig/archival/libipkg/nv_pair.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/nv_pair.h 2014-02-17 14:25:39.862534201 +0100
++++ busybox-1.21.1/archival/libipkg/nv_pair.h 2014-04-07 12:36:32.415575413 +0200
@@ -0,0 +1,32 @@
+/* nv_pair.h - the itsy package management system
+
@@ -7425,7 +7425,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/nv_pair.h busybox-1.21.1/archival
+
diff -Nur busybox-1.21.1.orig/archival/libipkg/nv_pair_list.c busybox-1.21.1/archival/libipkg/nv_pair_list.c
--- busybox-1.21.1.orig/archival/libipkg/nv_pair_list.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/nv_pair_list.c 2014-02-17 14:25:39.862534201 +0100
++++ busybox-1.21.1/archival/libipkg/nv_pair_list.c 2014-04-07 12:36:32.415575413 +0200
@@ -0,0 +1,98 @@
+/* nv_pair_list.c - the itsy package management system
+
@@ -7527,7 +7527,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/nv_pair_list.c busybox-1.21.1/arc
+}
diff -Nur busybox-1.21.1.orig/archival/libipkg/nv_pair_list.h busybox-1.21.1/archival/libipkg/nv_pair_list.h
--- busybox-1.21.1.orig/archival/libipkg/nv_pair_list.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/nv_pair_list.h 2014-02-17 14:25:39.862534201 +0100
++++ busybox-1.21.1/archival/libipkg/nv_pair_list.h 2014-04-07 12:36:32.415575413 +0200
@@ -0,0 +1,60 @@
+/* nv_pair_list.h - the itsy package management system
+
@@ -7591,7 +7591,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/nv_pair_list.h busybox-1.21.1/arc
+
diff -Nur busybox-1.21.1.orig/archival/libipkg/pkg.c busybox-1.21.1/archival/libipkg/pkg.c
--- busybox-1.21.1.orig/archival/libipkg/pkg.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/pkg.c 2014-02-17 14:25:39.862534201 +0100
++++ busybox-1.21.1/archival/libipkg/pkg.c 2014-04-07 12:36:32.415575413 +0200
@@ -0,0 +1,1757 @@
+/* pkg.c - the itsy package management system
+
@@ -9352,7 +9352,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/pkg.c busybox-1.21.1/archival/lib
+}
diff -Nur busybox-1.21.1.orig/archival/libipkg/pkg_depends.c busybox-1.21.1/archival/libipkg/pkg_depends.c
--- busybox-1.21.1.orig/archival/libipkg/pkg_depends.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/pkg_depends.c 2014-02-17 14:25:39.862534201 +0100
++++ busybox-1.21.1/archival/libipkg/pkg_depends.c 2014-04-07 12:36:32.415575413 +0200
@@ -0,0 +1,1032 @@
+/* pkg_depends.c - the itsy package management system
+
@@ -10388,7 +10388,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/pkg_depends.c busybox-1.21.1/arch
+}
diff -Nur busybox-1.21.1.orig/archival/libipkg/pkg_depends.h busybox-1.21.1/archival/libipkg/pkg_depends.h
--- busybox-1.21.1.orig/archival/libipkg/pkg_depends.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/pkg_depends.h 2014-02-17 14:25:39.862534201 +0100
++++ busybox-1.21.1/archival/libipkg/pkg_depends.h 2014-04-07 12:36:32.415575413 +0200
@@ -0,0 +1,105 @@
+/* pkg_depends.h - the itsy package management system
+
@@ -10497,7 +10497,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/pkg_depends.h busybox-1.21.1/arch
+#endif
diff -Nur busybox-1.21.1.orig/archival/libipkg/pkg_dest.c busybox-1.21.1/archival/libipkg/pkg_dest.c
--- busybox-1.21.1.orig/archival/libipkg/pkg_dest.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/pkg_dest.c 2014-02-17 14:25:39.862534201 +0100
++++ busybox-1.21.1/archival/libipkg/pkg_dest.c 2014-04-07 12:36:32.419575442 +0200
@@ -0,0 +1,92 @@
+/* pkg_dest.c - the itsy package management system
+
@@ -10593,7 +10593,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/pkg_dest.c busybox-1.21.1/archiva
+}
diff -Nur busybox-1.21.1.orig/archival/libipkg/pkg_dest.h busybox-1.21.1/archival/libipkg/pkg_dest.h
--- busybox-1.21.1.orig/archival/libipkg/pkg_dest.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/pkg_dest.h 2014-02-17 14:25:39.862534201 +0100
++++ busybox-1.21.1/archival/libipkg/pkg_dest.h 2014-04-07 12:36:32.419575442 +0200
@@ -0,0 +1,38 @@
+/* pkg_dest.h - the itsy package management system
+
@@ -10635,7 +10635,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/pkg_dest.h busybox-1.21.1/archiva
+
diff -Nur busybox-1.21.1.orig/archival/libipkg/pkg_dest_list.c busybox-1.21.1/archival/libipkg/pkg_dest_list.c
--- busybox-1.21.1.orig/archival/libipkg/pkg_dest_list.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/pkg_dest_list.c 2014-02-17 14:25:39.862534201 +0100
++++ busybox-1.21.1/archival/libipkg/pkg_dest_list.c 2014-04-07 12:36:32.419575442 +0200
@@ -0,0 +1,85 @@
+/* pkg_dest_list.c - the itsy package management system
+
@@ -10724,7 +10724,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/pkg_dest_list.c busybox-1.21.1/ar
+}
diff -Nur busybox-1.21.1.orig/archival/libipkg/pkg_dest_list.h busybox-1.21.1/archival/libipkg/pkg_dest_list.h
--- busybox-1.21.1.orig/archival/libipkg/pkg_dest_list.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/pkg_dest_list.h 2014-02-17 14:25:39.862534201 +0100
++++ busybox-1.21.1/archival/libipkg/pkg_dest_list.h 2014-04-07 12:36:32.419575442 +0200
@@ -0,0 +1,50 @@
+/* pkg_dest_list.h - the itsy package management system
+
@@ -10778,7 +10778,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/pkg_dest_list.h busybox-1.21.1/ar
+
diff -Nur busybox-1.21.1.orig/archival/libipkg/pkg_extract.c busybox-1.21.1/archival/libipkg/pkg_extract.c
--- busybox-1.21.1.orig/archival/libipkg/pkg_extract.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/pkg_extract.c 2014-02-17 14:25:39.862534201 +0100
++++ busybox-1.21.1/archival/libipkg/pkg_extract.c 2014-04-07 12:36:32.419575442 +0200
@@ -0,0 +1,255 @@
+/* pkg_extract.c - the itsy package management system
+
@@ -11037,7 +11037,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/pkg_extract.c busybox-1.21.1/arch
+}
diff -Nur busybox-1.21.1.orig/archival/libipkg/pkg_extract.h busybox-1.21.1/archival/libipkg/pkg_extract.h
--- busybox-1.21.1.orig/archival/libipkg/pkg_extract.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/pkg_extract.h 2014-02-17 14:25:39.862534201 +0100
++++ busybox-1.21.1/archival/libipkg/pkg_extract.h 2014-04-07 12:36:32.419575442 +0200
@@ -0,0 +1,32 @@
+/* pkg_extract.c - the itsy package management system
+
@@ -11073,7 +11073,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/pkg_extract.h busybox-1.21.1/arch
+#endif
diff -Nur busybox-1.21.1.orig/archival/libipkg/pkg.h busybox-1.21.1/archival/libipkg/pkg.h
--- busybox-1.21.1.orig/archival/libipkg/pkg.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/pkg.h 2014-02-17 14:25:39.862534201 +0100
++++ busybox-1.21.1/archival/libipkg/pkg.h 2014-04-07 12:36:32.419575442 +0200
@@ -0,0 +1,229 @@
+/* pkg.h - the itsy package management system
+
@@ -11306,7 +11306,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/pkg.h busybox-1.21.1/archival/lib
+#endif
diff -Nur busybox-1.21.1.orig/archival/libipkg/pkg_hash.c busybox-1.21.1/archival/libipkg/pkg_hash.c
--- busybox-1.21.1.orig/archival/libipkg/pkg_hash.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/pkg_hash.c 2014-02-17 14:25:39.862534201 +0100
++++ busybox-1.21.1/archival/libipkg/pkg_hash.c 2014-04-07 12:36:32.419575442 +0200
@@ -0,0 +1,623 @@
+/* ipkg_hash.c - the itsy package management system
+
@@ -11933,7 +11933,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/pkg_hash.c busybox-1.21.1/archiva
+
diff -Nur busybox-1.21.1.orig/archival/libipkg/pkg_hash.h busybox-1.21.1/archival/libipkg/pkg_hash.h
--- busybox-1.21.1.orig/archival/libipkg/pkg_hash.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/pkg_hash.h 2014-02-17 14:25:39.862534201 +0100
++++ busybox-1.21.1/archival/libipkg/pkg_hash.h 2014-04-07 12:36:32.419575442 +0200
@@ -0,0 +1,61 @@
+/* pkg_hash.h - the itsy package management system
+
@@ -11998,7 +11998,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/pkg_hash.h busybox-1.21.1/archiva
+
diff -Nur busybox-1.21.1.orig/archival/libipkg/pkg_parse.c busybox-1.21.1/archival/libipkg/pkg_parse.c
--- busybox-1.21.1.orig/archival/libipkg/pkg_parse.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/pkg_parse.c 2014-02-17 14:25:39.866534213 +0100
++++ busybox-1.21.1/archival/libipkg/pkg_parse.c 2014-04-07 12:36:32.419575442 +0200
@@ -0,0 +1,368 @@
+/* pkg_parse.c - the itsy package management system
+
@@ -12370,7 +12370,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/pkg_parse.c busybox-1.21.1/archiv
+}
diff -Nur busybox-1.21.1.orig/archival/libipkg/pkg_parse.h busybox-1.21.1/archival/libipkg/pkg_parse.h
--- busybox-1.21.1.orig/archival/libipkg/pkg_parse.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/pkg_parse.h 2014-02-17 14:25:39.866534213 +0100
++++ busybox-1.21.1/archival/libipkg/pkg_parse.h 2014-04-07 12:36:32.419575442 +0200
@@ -0,0 +1,31 @@
+/* pkg_parse.h - the itsy package management system
+
@@ -12405,7 +12405,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/pkg_parse.h busybox-1.21.1/archiv
+#endif
diff -Nur busybox-1.21.1.orig/archival/libipkg/pkg_src.c busybox-1.21.1/archival/libipkg/pkg_src.c
--- busybox-1.21.1.orig/archival/libipkg/pkg_src.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/pkg_src.c 2014-02-17 14:25:39.866534213 +0100
++++ busybox-1.21.1/archival/libipkg/pkg_src.c 2014-04-07 12:36:32.419575442 +0200
@@ -0,0 +1,43 @@
+/* pkg_src.c - the itsy package management system
+
@@ -12452,7 +12452,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/pkg_src.c busybox-1.21.1/archival
+
diff -Nur busybox-1.21.1.orig/archival/libipkg/pkg_src.h busybox-1.21.1/archival/libipkg/pkg_src.h
--- busybox-1.21.1.orig/archival/libipkg/pkg_src.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/pkg_src.h 2014-02-17 14:25:39.866534213 +0100
++++ busybox-1.21.1/archival/libipkg/pkg_src.h 2014-04-07 12:36:32.419575442 +0200
@@ -0,0 +1,34 @@
+/* pkg_src.h - the itsy package management system
+
@@ -12490,7 +12490,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/pkg_src.h busybox-1.21.1/archival
+#endif
diff -Nur busybox-1.21.1.orig/archival/libipkg/pkg_src_list.c busybox-1.21.1/archival/libipkg/pkg_src_list.c
--- busybox-1.21.1.orig/archival/libipkg/pkg_src_list.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/pkg_src_list.c 2014-02-17 14:25:39.866534213 +0100
++++ busybox-1.21.1/archival/libipkg/pkg_src_list.c 2014-04-07 12:36:32.419575442 +0200
@@ -0,0 +1,75 @@
+/* pkg_src_list.c - the itsy package management system
+
@@ -12569,7 +12569,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/pkg_src_list.c busybox-1.21.1/arc
+}
diff -Nur busybox-1.21.1.orig/archival/libipkg/pkg_src_list.h busybox-1.21.1/archival/libipkg/pkg_src_list.h
--- busybox-1.21.1.orig/archival/libipkg/pkg_src_list.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/pkg_src_list.h 2014-02-17 14:25:39.866534213 +0100
++++ busybox-1.21.1/archival/libipkg/pkg_src_list.h 2014-04-07 12:36:32.419575442 +0200
@@ -0,0 +1,57 @@
+/* pkg_src_list.h - the itsy package management system
+
@@ -12630,7 +12630,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/pkg_src_list.h busybox-1.21.1/arc
+
diff -Nur busybox-1.21.1.orig/archival/libipkg/pkg_vec.c busybox-1.21.1/archival/libipkg/pkg_vec.c
--- busybox-1.21.1.orig/archival/libipkg/pkg_vec.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/pkg_vec.c 2014-02-17 14:25:39.866534213 +0100
++++ busybox-1.21.1/archival/libipkg/pkg_vec.c 2014-04-07 12:36:32.419575442 +0200
@@ -0,0 +1,231 @@
+/* pkg_vec.c - the itsy package management system
+
@@ -12865,7 +12865,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/pkg_vec.c busybox-1.21.1/archival
+
diff -Nur busybox-1.21.1.orig/archival/libipkg/pkg_vec.h busybox-1.21.1/archival/libipkg/pkg_vec.h
--- busybox-1.21.1.orig/archival/libipkg/pkg_vec.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/pkg_vec.h 2014-02-17 14:25:39.866534213 +0100
++++ busybox-1.21.1/archival/libipkg/pkg_vec.h 2014-04-07 12:36:32.419575442 +0200
@@ -0,0 +1,62 @@
+/* pkg_vec.h - the itsy package management system
+
@@ -12931,7 +12931,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/pkg_vec.h busybox-1.21.1/archival
+
diff -Nur busybox-1.21.1.orig/archival/libipkg/sprintf_alloc.h busybox-1.21.1/archival/libipkg/sprintf_alloc.h
--- busybox-1.21.1.orig/archival/libipkg/sprintf_alloc.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/sprintf_alloc.h 2014-02-17 14:25:39.866534213 +0100
++++ busybox-1.21.1/archival/libipkg/sprintf_alloc.h 2014-04-07 12:36:32.419575442 +0200
@@ -0,0 +1,25 @@
+/* sprintf_alloca.c -- like sprintf with memory allocation
+
@@ -12960,7 +12960,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/sprintf_alloc.h busybox-1.21.1/ar
+#endif
diff -Nur busybox-1.21.1.orig/archival/libipkg/str_list.c busybox-1.21.1/archival/libipkg/str_list.c
--- busybox-1.21.1.orig/archival/libipkg/str_list.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/str_list.c 2014-02-17 14:25:39.866534213 +0100
++++ busybox-1.21.1/archival/libipkg/str_list.c 2014-04-07 12:36:32.419575442 +0200
@@ -0,0 +1,76 @@
+/* str_list.c - the itsy package management system
+
@@ -13040,7 +13040,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/str_list.c busybox-1.21.1/archiva
+}
diff -Nur busybox-1.21.1.orig/archival/libipkg/str_list.h busybox-1.21.1/archival/libipkg/str_list.h
--- busybox-1.21.1.orig/archival/libipkg/str_list.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/str_list.h 2014-02-17 14:25:39.866534213 +0100
++++ busybox-1.21.1/archival/libipkg/str_list.h 2014-04-07 12:36:32.419575442 +0200
@@ -0,0 +1,51 @@
+/* str_list.h - the itsy package management system
+
@@ -13095,7 +13095,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/str_list.h busybox-1.21.1/archiva
+#endif
diff -Nur busybox-1.21.1.orig/archival/libipkg/str_util.c busybox-1.21.1/archival/libipkg/str_util.c
--- busybox-1.21.1.orig/archival/libipkg/str_util.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/str_util.c 2014-02-17 14:25:39.866534213 +0100
++++ busybox-1.21.1/archival/libipkg/str_util.c 2014-04-07 12:36:32.419575442 +0200
@@ -0,0 +1,69 @@
+/* str_utils.c - the itsy package management system
+
@@ -13168,7 +13168,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/str_util.c busybox-1.21.1/archiva
+
diff -Nur busybox-1.21.1.orig/archival/libipkg/str_util.h busybox-1.21.1/archival/libipkg/str_util.h
--- busybox-1.21.1.orig/archival/libipkg/str_util.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/str_util.h 2014-02-17 14:25:39.866534213 +0100
++++ busybox-1.21.1/archival/libipkg/str_util.h 2014-04-07 12:36:32.419575442 +0200
@@ -0,0 +1,27 @@
+/* str_utils.h - the itsy package management system
+
@@ -13199,7 +13199,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/str_util.h busybox-1.21.1/archiva
+#endif
diff -Nur busybox-1.21.1.orig/archival/libipkg/user.c busybox-1.21.1/archival/libipkg/user.c
--- busybox-1.21.1.orig/archival/libipkg/user.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/user.c 2014-02-17 14:25:39.866534213 +0100
++++ busybox-1.21.1/archival/libipkg/user.c 2014-04-07 12:36:32.419575442 +0200
@@ -0,0 +1,49 @@
+/* user.c - the itsy package management system
+
@@ -13252,7 +13252,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/user.c busybox-1.21.1/archival/li
+}
diff -Nur busybox-1.21.1.orig/archival/libipkg/user.h busybox-1.21.1/archival/libipkg/user.h
--- busybox-1.21.1.orig/archival/libipkg/user.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/user.h 2014-02-17 14:25:39.866534213 +0100
++++ busybox-1.21.1/archival/libipkg/user.h 2014-04-07 12:36:32.419575442 +0200
@@ -0,0 +1,23 @@
+/* user.c - the itsy package management system
+
@@ -13279,7 +13279,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/user.h busybox-1.21.1/archival/li
+
diff -Nur busybox-1.21.1.orig/archival/libipkg/void_list.c busybox-1.21.1/archival/libipkg/void_list.c
--- busybox-1.21.1.orig/archival/libipkg/void_list.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/void_list.c 2014-02-17 14:25:39.886534275 +0100
++++ busybox-1.21.1/archival/libipkg/void_list.c 2014-04-07 12:36:32.423575470 +0200
@@ -0,0 +1,194 @@
+/* void_list.c - the itsy package management system
+
@@ -13477,7 +13477,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/void_list.c busybox-1.21.1/archiv
+}
diff -Nur busybox-1.21.1.orig/archival/libipkg/void_list.h busybox-1.21.1/archival/libipkg/void_list.h
--- busybox-1.21.1.orig/archival/libipkg/void_list.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/void_list.h 2014-02-17 14:25:39.886534275 +0100
++++ busybox-1.21.1/archival/libipkg/void_list.h 2014-04-07 12:36:32.423575470 +0200
@@ -0,0 +1,59 @@
+/* void_list.h - the itsy package management system
+
@@ -13540,7 +13540,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/void_list.h busybox-1.21.1/archiv
+#endif
diff -Nur busybox-1.21.1.orig/archival/libipkg/xsystem.c busybox-1.21.1/archival/libipkg/xsystem.c
--- busybox-1.21.1.orig/archival/libipkg/xsystem.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/xsystem.c 2014-02-17 14:25:39.886534275 +0100
++++ busybox-1.21.1/archival/libipkg/xsystem.c 2014-04-07 12:36:32.423575470 +0200
@@ -0,0 +1,64 @@
+/* xsystem.c - system(3) with error messages
+
@@ -13608,7 +13608,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/xsystem.c busybox-1.21.1/archival
+
diff -Nur busybox-1.21.1.orig/archival/libipkg/xsystem.h busybox-1.21.1/archival/libipkg/xsystem.h
--- busybox-1.21.1.orig/archival/libipkg/xsystem.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.21.1/archival/libipkg/xsystem.h 2014-02-17 14:25:39.890534287 +0100
++++ busybox-1.21.1/archival/libipkg/xsystem.h 2014-04-07 12:36:32.423575470 +0200
@@ -0,0 +1,34 @@
+/* xsystem.h - system(3) with error messages
+
@@ -13646,7 +13646,7 @@ diff -Nur busybox-1.21.1.orig/archival/libipkg/xsystem.h busybox-1.21.1/archival
+
diff -Nur busybox-1.21.1.orig/include/applets.src.h busybox-1.21.1/include/applets.src.h
--- busybox-1.21.1.orig/include/applets.src.h 2013-06-29 16:58:06.000000000 +0200
-+++ busybox-1.21.1/include/applets.src.h 2014-02-17 14:25:39.890534287 +0100
++++ busybox-1.21.1/include/applets.src.h 2014-04-07 12:36:32.423575470 +0200
@@ -199,6 +199,7 @@
IF_IPCALC(APPLET(ipcalc, BB_DIR_BIN, BB_SUID_DROP))
IF_IPCRM(APPLET(ipcrm, BB_DIR_USR_BIN, BB_SUID_DROP))
@@ -13657,17 +13657,22 @@ diff -Nur busybox-1.21.1.orig/include/applets.src.h busybox-1.21.1/include/apple
IF_IPRULE(APPLET(iprule, BB_DIR_SBIN, BB_SUID_DROP))
diff -Nur busybox-1.21.1.orig/include/bb_archive.h busybox-1.21.1/include/bb_archive.h
--- busybox-1.21.1.orig/include/bb_archive.h 2013-06-29 16:58:06.000000000 +0200
-+++ busybox-1.21.1/include/bb_archive.h 2014-02-17 14:25:39.890534287 +0100
-@@ -79,7 +79,7 @@
++++ busybox-1.21.1/include/bb_archive.h 2014-04-07 12:37:05.279788781 +0200
+@@ -79,7 +79,6 @@
/* Archiver specific. Can make it a union if it ever gets big */
#define PAX_NEXT_FILE 0
#define PAX_GLOBAL 1
-#if ENABLE_TAR || ENABLE_DPKG || ENABLE_DPKG_DEB
-+#if ENABLE_TAR || ENABLE_DPKG || ENABLE_DPKG_DEB || ENABLE_IPKG
smallint tar__end;
# if ENABLE_FEATURE_TAR_GNU_EXTENSIONS
char* tar__longname;
-@@ -98,7 +98,7 @@
+@@ -92,13 +91,12 @@
+ # if ENABLE_FEATURE_TAR_SELINUX
+ char* tar__sctx[2];
+ # endif
+-#endif
+ #if ENABLE_CPIO || ENABLE_RPM2CPIO || ENABLE_RPM
+ uoff_t cpio__blocks;
struct hardlinks_t *cpio__hardlinks_to_create;
struct hardlinks_t *cpio__created_hardlinks;
#endif
@@ -13678,7 +13683,7 @@ diff -Nur busybox-1.21.1.orig/include/bb_archive.h busybox-1.21.1/include/bb_arc
/* How to process any sub archive, e.g. get_header_tar_gz */
diff -Nur busybox-1.21.1.orig/include/usage.src.h busybox-1.21.1/include/usage.src.h
--- busybox-1.21.1.orig/include/usage.src.h 2013-05-12 01:30:43.000000000 +0200
-+++ busybox-1.21.1/include/usage.src.h 2014-02-17 14:25:39.890534287 +0100
++++ busybox-1.21.1/include/usage.src.h 2014-04-07 12:36:32.423575470 +0200
@@ -19,4 +19,80 @@
#define busybox_notes_usage \
"Hello world!\n"
@@ -13762,7 +13767,7 @@ diff -Nur busybox-1.21.1.orig/include/usage.src.h busybox-1.21.1/include/usage.s
#endif
diff -Nur busybox-1.21.1.orig/Makefile busybox-1.21.1/Makefile
--- busybox-1.21.1.orig/Makefile 2013-06-29 17:00:18.000000000 +0200
-+++ busybox-1.21.1/Makefile 2014-02-17 14:25:39.890534287 +0100
++++ busybox-1.21.1/Makefile 2014-04-07 12:36:32.423575470 +0200
@@ -466,6 +466,7 @@
libs-y := \
archival/ \
diff --git a/package/bzip2/Makefile b/package/bzip2/Makefile
index 5585ae0c1..c4b6ebe48 100644
--- a/package/bzip2/Makefile
+++ b/package/bzip2/Makefile
@@ -32,6 +32,7 @@ $(eval $(call PKG_template,BZIP2,bzip2,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPEN
$(eval $(call PKG_template,LIBBZ2,libbz2,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_LIBBZ2},${PKGSC_LIBBZ2},${PKG_OPTS}))
HOST_STYLE:= manual
+HOST_MAKE_FILE:= Makefile
MAKE_FILE:= Makefile-libbz2_so
CONFIG_STYLE:= manual
TARGET_CFLAGS+= -fPIC
@@ -39,16 +40,12 @@ XAKE_FLAGS+= PREFIX=${WRKINST}/usr CROSS_COMPILE=1
INSTALL_STYLE:= manual
host-build:
- (cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
+ (cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${HOST_MAKE_FILE} \
PREFIX=${HOST_WRKINST}/usr ${HOST_ALL_TARGET})
bzip2-hostinstall:
- ${INSTALL_DIR} ${STAGING_HOST_DIR}/usr/lib
- ${INSTALL_DIR} $(STAGING_HOST_DIR)/usr/include
- $(CP) ${WRKBUILD}/libbz2.so* \
- ${STAGING_HOST_DIR}/usr/lib
- (cd ${STAGING_HOST_DIR}/usr/lib; ln -sf libbz2.so.1.0.6 libbz2.so)
- $(CP) $(WRKBUILD)/bzlib.h $(STAGING_HOST_DIR)/usr/include
+ ${INSTALL_DIR} ${STAGING_HOST_DIR}/usr/bin
+ $(INSTALL_BIN) ${WRKBUILD}/bzip2 ${STAGING_HOST_DIR}/usr/bin/bzip2
libbz2-install:
${INSTALL_DIR} ${IDIR_LIBBZ2}/usr/lib
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/check/Makefile b/package/check/Makefile
new file mode 100644
index 000000000..3d7c2fb2b
--- /dev/null
+++ b/package/check/Makefile
@@ -0,0 +1,26 @@
+# 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:= check
+PKG_VERSION:= 0.9.12
+PKG_RELEASE:= 2
+PKG_MD5SUM:= 46fe540d1a03714c7a1967dbc6d484e7
+PKG_DESCR:= unit testing framework for C
+PKG_SECTION:= libs
+PKG_URL:= http://check.sourceforge.net/
+PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=check/}
+PKG_LIBNAME:= libcheck
+PKG_OPTS:= dev
+
+include $(TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,LIBCHECK,libcheck,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
+
+libcheck-install:
+ $(INSTALL_DIR) $(IDIR_LIBCHECK)/usr/lib
+ $(CP) $(WRKINST)/usr/lib/libcheck*.so* \
+ $(IDIR_LIBCHECK)/usr/lib
+
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/collectd/Makefile b/package/collectd/Makefile
index d37bb30ea..4203aace3 100644
--- a/package/collectd/Makefile
+++ b/package/collectd/Makefile
@@ -4,10 +4,10 @@
include ${TOPDIR}/rules.mk
PKG_NAME:= collectd
-PKG_VERSION:= 5.4.0
+PKG_VERSION:= 5.4.1
PKG_RELEASE:= 1
-PKG_MD5SUM:= d4176b3066f3b85d85343d3648ea43f6
-PKG_DESCR:= System statistics collection daemon
+PKG_MD5SUM:= 6514ab3f7fd2135d2713f1ab25068841
+PKG_DESCR:= system statistics collection daemon
PKG_SECTION:= misc
PKG_BUILDDEP:= libtool
PKG_DEPENDS:= libpthread libltdl
@@ -15,7 +15,7 @@ PKG_URL:= http://collectd.org/
PKG_SITES:= http://collectd.org/files/
PKG_FLAVOURS_COLLECTD:= WITH_CPU WITH_LOAD WITH_MEMORY WITH_PING
-PKG_FLAVOURS_COLLECTD+= WITH_RRD
+PKG_FLAVOURS_COLLECTD+= WITH_RRD WITH_NETWORK WITH_UPTIME
PKGFD_WITH_RRD:= enable RRD output
PKGFB_WITH_RRD:= rrdtool
PKGFS_WITH_RRD:= librrd
@@ -23,6 +23,8 @@ PKGFD_WITH_CPU:= collect CPU statistics
PKGFD_WITH_LOAD:= collect system load statistics
PKGFD_WITH_MEMORY:= collect memory usage statistics
PKGFD_WITH_PING:= enable ping statistic plugin
+PKGFD_WITH_NETWORK:= enable network statistic plugin
+PKGFD_WITH_UPTIME:= enable uptime statistic plugin
include ${TOPDIR}/mk/package.mk
@@ -40,6 +42,12 @@ endif
ifneq (${ADK_PACKAGE_COLLECTD_WITH_PING},y)
DISABLE_PING:=--disable-ping
endif
+ifneq (${ADK_PACKAGE_COLLECTD_WITH_NETWORK},y)
+DISABLE_NETWORK:=--disable-network
+endif
+ifneq (${ADK_PACKAGE_COLLECTD_WITH_UPTIME},y)
+DISABLE_UPTIME:=--disable-uptime
+endif
CONFIGURE_ARGS+= --disable-aggregation \
--disable-apache \
@@ -75,7 +83,7 @@ CONFIGURE_ARGS+= --disable-aggregation \
${DISABLE_MEMORY} \
--disable-multimeter \
--disable-mysql \
- --disable-network \
+ ${DISABLE_NETWORK} \
--disable-nginx \
--disable-nfs \
--disable-ntpd \
@@ -106,7 +114,7 @@ CONFIGURE_ARGS+= --disable-aggregation \
--disable-thermal \
--disable-unixsock \
--disable-users \
- --disable-uptime \
+ ${DISABLE_UPTIME} \
--disable-uuid \
--disable-vserver \
--disable-wireless \
@@ -118,7 +126,6 @@ CONFIGURE_ARGS+= --disable-aggregation \
--without-libiptc \
--with-nan-emulation
-TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS))
XAKE_FLAGS+= LIBS='-lm -lltdl'
collectd-install:
diff --git a/package/collectd/patches/patch-configure b/package/collectd/patches/patch-configure
new file mode 100644
index 000000000..41e8e65c7
--- /dev/null
+++ b/package/collectd/patches/patch-configure
@@ -0,0 +1,29 @@
+--- collectd-5.4.1.orig/configure 2014-01-26 09:10:00.000000000 +0100
++++ collectd-5.4.1/configure 2014-04-10 16:56:47.000000000 +0200
+@@ -16812,7 +16812,7 @@ SAVE_CFLAGS="$CFLAGS"
+ # Emulate behavior of src/Makefile.am
+ if test "x$GCC" = "xyes"
+ then
+- CFLAGS="$CFLAGS -Wall -Werror"
++ CFLAGS="$CFLAGS -Wall"
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strtok_r" >&5
+@@ -17388,7 +17388,7 @@ done
+ if test "x$GCC" = "xyes"
+ then
+ SAVE_CFLAGS="$CFLAGS"
+- CFLAGS="$CFLAGS -Wall -Wextra -Werror"
++ CFLAGS="$CFLAGS -Wall -Wextra"
+ fi
+
+ for ac_func in strptime
+@@ -23057,7 +23057,7 @@ then
+ SAVE_LDFLAGS="$LDFLAGS"
+ # trigger an error if Perl_load_module*() uses __attribute__nonnull__(3)
+ # (see issues #41 and #42)
+- CFLAGS="$CFLAGS $PERL_CFLAGS -Wall -Werror"
++ CFLAGS="$CFLAGS $PERL_CFLAGS -Wall"
+ LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken Perl_load_module()" >&5
diff --git a/package/collectd/patches/patch-src_Makefile_in b/package/collectd/patches/patch-src_Makefile_in
new file mode 100644
index 000000000..e35859cfb
--- /dev/null
+++ b/package/collectd/patches/patch-src_Makefile_in
@@ -0,0 +1,11 @@
+--- collectd-5.4.1.orig/src/Makefile.in 2014-01-26 09:09:56.000000000 +0100
++++ collectd-5.4.1/src/Makefile.in 2014-04-10 19:13:47.000000000 +0200
+@@ -2235,7 +2235,7 @@ top_build_prefix = @top_build_prefix@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+ SUBDIRS = libcollectdclient $(am__append_1)
+-@COMPILER_IS_GCC_TRUE@AM_CFLAGS = -Wall -Werror
++@COMPILER_IS_GCC_TRUE@AM_CFLAGS = -Wall
+ AM_CPPFLAGS = -DPREFIX='"${prefix}"' \
+ -DCONFIGFILE='"${sysconfdir}/${PACKAGE_NAME}.conf"' \
+ -DLOCALSTATEDIR='"${localstatedir}"' \
diff --git a/package/conntrack-tools/Makefile b/package/conntrack-tools/Makefile
index 1341e8c5b..a33a8c115 100644
--- a/package/conntrack-tools/Makefile
+++ b/package/conntrack-tools/Makefile
@@ -4,28 +4,35 @@
include $(TOPDIR)/rules.mk
PKG_NAME:= conntrack-tools
-PKG_VERSION:= 1.4.1
+PKG_VERSION:= 1.4.2
PKG_RELEASE:= 1
-PKG_MD5SUM:= 3cc4703d883c6f07085e29bdc993222b
-PKG_DESCR:= Connection tracking userspace tools
+PKG_MD5SUM:= b1f9d006e7bf000a77395ff7cd3fac16
+PKG_DESCR:= connection tracking userspace tools
PKG_SECTION:= firewall
PKG_DEPENDS:= libtirpc libnetfilter_queue libnetfilter-conntrack libnetfilter-cttimeout libnetfilter-cthelper libmnl
PKG_BUILDDEP:= libtirpc libnetfilter_queue libnetfilter_conntrack libnetfilter_cttimeout libnetfilter_cthelper libmnl
PKG_URL:= http://conntrack-tools.netfilter.org/
PKG_SITES:= http://www.netfilter.org/projects/conntrack-tools/files/
-PKG_LIBC_DEPENDS:= uclibc glibc
+PKG_SUBPKGS:= CONNTRACK CONNTRACKD
+PKGSD_CONNTRACK:= client utility
+PKGSD_CONNTRACKD:= daemon
DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2
include $(TOPDIR)/mk/package.mk
-TARGET_CPPFLAGS+= -I$(STAGING_TARGET_DIR)/usr/include/tirpc
+TARGET_CPPFLAGS+= -I$(STAGING_TARGET_DIR)/usr/include/tirpc -D_GNU_SOURCE
-$(eval $(call PKG_template,CONNTRACK_TOOLS,conntrack-tools,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+$(eval $(call PKG_template,CONNTRACK,conntrack,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_CONNTRACK},${PKG_SECTION}))
+$(eval $(call PKG_template,CONNTRACKD,conntrackd,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_CONNTRACKD},${PKG_SECTION}))
-conntrack-tools-install:
- $(INSTALL_DIR) $(IDIR_CONNTRACK_TOOLS)/usr/sbin
- $(INSTALL_BIN) $(WRKINST)/usr/sbin/conntrack{,d} $(IDIR_CONNTRACK_TOOLS)/usr/sbin
+conntrack-install:
+ $(INSTALL_DIR) $(IDIR_CONNTRACK)/usr/sbin
+ $(INSTALL_BIN) $(WRKINST)/usr/sbin/conntrack $(IDIR_CONNTRACK)/usr/sbin
+
+conntrackd-install:
+ $(INSTALL_DIR) $(IDIR_CONNTRACKD)/usr/sbin
+ $(INSTALL_BIN) $(WRKINST)/usr/sbin/conntrackd $(IDIR_CONNTRACKD)/usr/sbin
include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/conntrack-tools/patches/patch-include_bitops_h b/package/conntrack-tools/patches/patch-include_bitops_h
new file mode 100644
index 000000000..9dfb08e1e
--- /dev/null
+++ b/package/conntrack-tools/patches/patch-include_bitops_h
@@ -0,0 +1,41 @@
+--- conntrack-tools-1.4.2.orig/include/bitops.h 2013-02-24 23:23:57.000000000 +0100
++++ conntrack-tools-1.4.2/include/bitops.h 2014-04-05 09:39:37.219463608 +0200
+@@ -3,32 +3,32 @@
+
+ #include <stdlib.h>
+
+-static inline void set_bit_u32(int nr, u_int32_t *addr)
++static inline void set_bit_u32(int nr, uint32_t *addr)
+ {
+ addr[nr >> 5] |= (1UL << (nr & 31));
+ }
+
+-static inline void unset_bit_u32(int nr, u_int32_t *addr)
++static inline void unset_bit_u32(int nr, uint32_t *addr)
+ {
+ addr[nr >> 5] &= ~(1UL << (nr & 31));
+ }
+
+-static inline int test_bit_u32(int nr, const u_int32_t *addr)
++static inline int test_bit_u32(int nr, const uint32_t *addr)
+ {
+ return ((1UL << (nr & 31)) & (addr[nr >> 5])) != 0;
+ }
+
+-static inline void set_bit_u16(int nr, u_int16_t *addr)
++static inline void set_bit_u16(int nr, uint16_t *addr)
+ {
+ addr[nr >> 4] |= (1UL << (nr & 15));
+ }
+
+-static inline void unset_bit_u16(int nr, u_int16_t *addr)
++static inline void unset_bit_u16(int nr, uint16_t *addr)
+ {
+ addr[nr >> 4] &= ~(1UL << (nr & 15));
+ }
+
+-static inline int test_bit_u16(int nr, const u_int16_t *addr)
++static inline int test_bit_u16(int nr, const uint16_t *addr)
+ {
+ return ((1UL << (nr & 15)) & (addr[nr >> 4])) != 0;
+ }
diff --git a/package/conntrack-tools/patches/patch-include_mcast_h b/package/conntrack-tools/patches/patch-include_mcast_h
new file mode 100644
index 000000000..0f352ce0c
--- /dev/null
+++ b/package/conntrack-tools/patches/patch-include_mcast_h
@@ -0,0 +1,10 @@
+--- conntrack-tools-1.4.2.orig/include/mcast.h 2013-02-24 23:23:57.000000000 +0100
++++ conntrack-tools-1.4.2/include/mcast.h 2014-04-05 09:37:11.363340860 +0200
+@@ -2,6 +2,7 @@
+ #define _MCAST_H_
+
+ #include <stdint.h>
++#include <sys/select.h>
+ #include <netinet/in.h>
+ #include <net/if.h>
+
diff --git a/package/conntrack-tools/patches/patch-include_tcp_h b/package/conntrack-tools/patches/patch-include_tcp_h
new file mode 100644
index 000000000..4dd4d3202
--- /dev/null
+++ b/package/conntrack-tools/patches/patch-include_tcp_h
@@ -0,0 +1,10 @@
+--- conntrack-tools-1.4.2.orig/include/tcp.h 2013-02-24 23:23:57.000000000 +0100
++++ conntrack-tools-1.4.2/include/tcp.h 2014-04-05 09:40:10.923493847 +0200
+@@ -2,6 +2,7 @@
+ #define _TCP_H_
+
+ #include <stdint.h>
++#include <sys/select.h>
+ #include <netinet/in.h>
+
+ struct tcp_conf {
diff --git a/package/conntrack-tools/patches/patch-include_udp_h b/package/conntrack-tools/patches/patch-include_udp_h
new file mode 100644
index 000000000..1f28a87fa
--- /dev/null
+++ b/package/conntrack-tools/patches/patch-include_udp_h
@@ -0,0 +1,10 @@
+--- conntrack-tools-1.4.2.orig/include/udp.h 2013-02-24 23:23:57.000000000 +0100
++++ conntrack-tools-1.4.2/include/udp.h 2014-04-05 09:38:04.015383617 +0200
+@@ -2,6 +2,7 @@
+ #define _UDP_H_
+
+ #include <stdint.h>
++#include <sys/select.h>
+ #include <netinet/in.h>
+
+ struct udp_conf {
diff --git a/package/curl/Makefile b/package/curl/Makefile
index 7a03fcd9e..e2661d148 100644
--- a/package/curl/Makefile
+++ b/package/curl/Makefile
@@ -4,10 +4,10 @@
include ${TOPDIR}/rules.mk
PKG_NAME:= curl
-PKG_VERSION:= 7.28.0
-PKG_RELEASE:= 2
-PKG_MD5SUM:= cbdc0a79bdf6e657dd387c3d88d802e3
-PKG_DESCR:= a client-side URL transfer tool
+PKG_VERSION:= 7.36.0
+PKG_RELEASE:= 1
+PKG_MD5SUM:= 643a7030b27449e76413d501d4b8eb57
+PKG_DESCR:= client-side URL transfer tool
PKG_SECTION:= www
PKG_DEPENDS:= libcurl
PKG_BUILDDEP:= zlib
@@ -58,7 +58,6 @@ CONFIGURE_ARGS+= --with-gnutls="${STAGING_TARGET_DIR}/usr" \
--without-axtls
endif
-TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS))
CONFIGURE_ENV+= curl_typeof_curl_socklen_t=socklen_t
CONFIGURE_ARGS+= --disable-thread \
--enable-cookies \
@@ -67,17 +66,24 @@ CONFIGURE_ARGS+= --disable-thread \
--enable-file \
--enable-ftp \
--enable-http \
+ --enable-proxy \
+ --disable-symbol-hiding \
--disable-ares \
--disable-dict \
--disable-gopher \
--disable-ldap \
+ --disable-smtp \
+ --disable-imap \
+ --disable-ldaps \
--disable-manual \
--disable-sspi \
--disable-telnet \
--disable-verbose \
+ --without-libssh2 \
+ --without-librtmp \
+ --without-libidn \
--with-random="/dev/urandom" \
- --with-ca-bundle="/etc/ssl/cert.pem" \
- --without-libidn
+ --with-ca-bundle="/etc/ssl/cert.pem"
ifneq (${ADK_PACKAGE_CURL_WITH_IPV6},)
CONFIGURE_ARGS+= --enable-ipv6
diff --git a/package/curl/patches/patch-ltmain_sh b/package/curl/patches/patch-ltmain_sh
deleted file mode 100644
index 07db5c668..000000000
--- a/package/curl/patches/patch-ltmain_sh
+++ /dev/null
@@ -1,11 +0,0 @@
---- curl-7.28.0.orig/ltmain.sh 2012-08-16 19:20:36.000000000 +0200
-+++ curl-7.28.0/ltmain.sh 2012-10-14 14:00:11.000000000 +0200
-@@ -5853,7 +5853,7 @@ func_mode_link ()
- # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
- -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
-- -O*|-flto*|-fwhopr*|-fuse-linker-plugin)
-+ -O*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*)
- func_quote_for_eval "$arg"
- arg="$func_quote_for_eval_result"
- func_append compile_command " $arg"
diff --git a/package/curl/patches/patch-src_tool_operate_c b/package/curl/patches/patch-src_tool_operate_c
new file mode 100644
index 000000000..eb1a3d52b
--- /dev/null
+++ b/package/curl/patches/patch-src_tool_operate_c
@@ -0,0 +1,13 @@
+--- curl-7.36.0.orig/src/tool_operate.c 2014-03-25 11:36:28.000000000 +0100
++++ curl-7.36.0/src/tool_operate.c 2014-04-02 14:59:00.000000000 +0200
+@@ -1794,8 +1794,10 @@ CURLcode operate(struct GlobalConfig *co
+ if(res == PARAM_HELP_REQUESTED)
+ tool_help();
+ /* Check if we were asked for the manual */
++#ifdef USE_MANUAL
+ else if(res == PARAM_MANUAL_REQUESTED)
+ hugehelp();
++#endif
+ /* Check if we were asked for the version information */
+ else if(res == PARAM_VERSION_INFO_REQUESTED)
+ tool_version_info();
diff --git a/package/dansguardian/Makefile b/package/dansguardian/Makefile
index 711bf0edb..fd7142d5f 100644
--- a/package/dansguardian/Makefile
+++ b/package/dansguardian/Makefile
@@ -26,7 +26,7 @@ ifeq ($(ADK_COMPILE_DANSGUARDIAN_WITH_UCLIBCXX),y)
LIBRARIES:=-nodefaultlibs -luClibc++ -lgcc -lm -lc -lgcc_s
endif
-ifeq ($(ADK_TOOLCHAIN_GCC_USE_SSP),y)
+ifeq ($(ADK_TOOLCHAIN_USE_SSP),y)
LIBRARIES+=-lssp
endif
diff --git a/package/dbus-python/Makefile b/package/dbus-python/Makefile
index 9645f7269..b73d43a6c 100644
--- a/package/dbus-python/Makefile
+++ b/package/dbus-python/Makefile
@@ -14,6 +14,8 @@ PKG_BUILDDEP:= dbus dbus-glib
PKG_URL:= http://dbus.freedesktop.org/doc/dbus-python/
PKG_SITES:= http://dbus.freedesktop.org/releases/dbus-python/
+PKG_CFLINE_DBUS_PYTHON:= depends on ADK_BROKEN
+
include $(TOPDIR)/mk/package.mk
$(eval $(call PKG_template,DBUS_PYTHON,dbus-python,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
diff --git a/package/dmidecode/Makefile b/package/dmidecode/Makefile
index 8829c91b2..4eb004dc7 100644
--- a/package/dmidecode/Makefile
+++ b/package/dmidecode/Makefile
@@ -18,7 +18,7 @@ $(eval $(call PKG_template,DMIDECODE,dmidecode,$(PKG_VERSION)-${PKG_RELEASE},${P
CONFIG_STYLE:= manual
-ifeq ($(ADK_TOOLCHAIN_GCC_USE_SSP),y)
+ifeq ($(ADK_TOOLCHAIN_USE_SSP),y)
TARGET_LDFLAGS+= -lssp
endif
diff --git a/package/dosfstools/Makefile b/package/dosfstools/Makefile
index 1dd82182a..9292d49f3 100644
--- a/package/dosfstools/Makefile
+++ b/package/dosfstools/Makefile
@@ -5,7 +5,7 @@ include ${TOPDIR}/rules.mk
PKG_NAME:= dosfstools
PKG_VERSION:= 3.0.26
-PKG_RELEASE:= 2
+PKG_RELEASE:= 3
PKG_MD5SUM:= 45012f5f56f2aae3afcd62120b9e5a08
PKG_DESCR:= utilities to create and check FAT filesystems
PKG_SECTION:= fs
diff --git a/package/dosfstools/patches/patch-src_boot_c b/package/dosfstools/patches/patch-src_boot_c
new file mode 100644
index 000000000..cd2dd927d
--- /dev/null
+++ b/package/dosfstools/patches/patch-src_boot_c
@@ -0,0 +1,77 @@
+--- dosfstools-3.0.26.orig/src/boot.c 2014-01-17 07:06:54.000000000 +0100
++++ dosfstools-3.0.26/src/boot.c 2014-03-26 13:20:59.000000000 +0100
+@@ -155,7 +155,7 @@ static void check_backup_boot(DOS_FS * f
+ fs->backupboot_start = bbs * lss;
+ b->backup_boot = htole16(bbs);
+ fs_write(fs->backupboot_start, sizeof(*b), b);
+- fs_write((loff_t) offsetof(struct boot_sector, backup_boot),
++ fs_write((off_t) offsetof(struct boot_sector, backup_boot),
+ sizeof(b->backup_boot), &b->backup_boot);
+ printf("Created backup of boot sector in sector %d\n", bbs);
+ return;
+@@ -233,9 +233,9 @@ static void read_fsinfo(DOS_FS * fs, str
+ break;
+ if (s > 0 && s < le16toh(b->reserved)) {
+ init_fsinfo(&i);
+- fs_write((loff_t) s * lss, sizeof(i), &i);
++ fs_write((off_t) s * lss, sizeof(i), &i);
+ b->info_sector = htole16(s);
+- fs_write((loff_t) offsetof(struct boot_sector, info_sector),
++ fs_write((off_t) offsetof(struct boot_sector, info_sector),
+ sizeof(b->info_sector), &b->info_sector);
+ if (fs->backupboot_start)
+ fs_write(fs->backupboot_start +
+@@ -327,7 +327,7 @@ void read_boot(DOS_FS * fs)
+ unsigned total_sectors;
+ unsigned short logical_sector_size, sectors;
+ unsigned fat_length;
+- loff_t data_size;
++ off_t data_size;
+
+ fs_read(0, sizeof(b), &b);
+ logical_sector_size = GET_UNALIGNED_W(b.sector_size);
+@@ -352,18 +352,18 @@ void read_boot(DOS_FS * fs)
+ if (verbose)
+ printf("Checking we can access the last sector of the filesystem\n");
+ /* Can't access last odd sector anyway, so round down */
+- fs_test((loff_t) ((total_sectors & ~1) - 1) * (loff_t) logical_sector_size,
++ fs_test((off_t) ((total_sectors & ~1) - 1) * (off_t) logical_sector_size,
+ logical_sector_size);
+ fat_length = le16toh(b.fat_length) ?
+ le16toh(b.fat_length) : le32toh(b.fat32_length);
+- fs->fat_start = (loff_t) le16toh(b.reserved) * logical_sector_size;
+- fs->root_start = ((loff_t) le16toh(b.reserved) + b.fats * fat_length) *
++ fs->fat_start = (off_t) le16toh(b.reserved) * logical_sector_size;
++ fs->root_start = ((off_t) le16toh(b.reserved) + b.fats * fat_length) *
+ logical_sector_size;
+ fs->root_entries = GET_UNALIGNED_W(b.dir_entries);
+ fs->data_start = fs->root_start + ROUND_TO_MULTIPLE(fs->root_entries <<
+ MSDOS_DIR_BITS,
+ logical_sector_size);
+- data_size = (loff_t) total_sectors *logical_sector_size - fs->data_start;
++ data_size = (off_t) total_sectors *logical_sector_size - fs->data_start;
+ fs->clusters = data_size / fs->cluster_size;
+ fs->root_cluster = 0; /* indicates standard, pre-FAT32 root dir */
+ fs->fsinfo_start = 0; /* no FSINFO structure */
+@@ -491,10 +491,10 @@ static void write_boot_label(DOS_FS * fs
+ }
+ }
+
+-loff_t find_volume_de(DOS_FS * fs, DIR_ENT * de)
++off_t find_volume_de(DOS_FS * fs, DIR_ENT * de)
+ {
+ uint32_t cluster;
+- loff_t offset;
++ off_t offset;
+ int i;
+
+ if (fs->root_cluster) {
+@@ -525,7 +525,7 @@ static void write_volume_label(DOS_FS *
+ {
+ time_t now = time(NULL);
+ struct tm *mtime = localtime(&now);
+- loff_t offset;
++ off_t offset;
+ int created;
+ DIR_ENT de;
+
diff --git a/package/dosfstools/patches/patch-src_boot_h b/package/dosfstools/patches/patch-src_boot_h
new file mode 100644
index 000000000..6ed917b8a
--- /dev/null
+++ b/package/dosfstools/patches/patch-src_boot_h
@@ -0,0 +1,11 @@
+--- dosfstools-3.0.26.orig/src/boot.h 2014-01-17 07:06:55.000000000 +0100
++++ dosfstools-3.0.26/src/boot.h 2014-03-26 13:29:53.000000000 +0100
+@@ -25,7 +25,7 @@
+
+ void read_boot(DOS_FS * fs);
+ void write_label(DOS_FS * fs, char *label);
+-loff_t find_volume_de(DOS_FS * fs, DIR_ENT * de);
++off_t find_volume_de(DOS_FS * fs, DIR_ENT * de);
+
+ /* Reads the boot sector from the currently open device and initializes *FS */
+
diff --git a/package/dosfstools/patches/patch-src_check_c b/package/dosfstools/patches/patch-src_check_c
new file mode 100644
index 000000000..cdfc953fe
--- /dev/null
+++ b/package/dosfstools/patches/patch-src_check_c
@@ -0,0 +1,49 @@
+--- dosfstools-3.0.26.orig/src/check.c 2014-03-07 18:35:11.000000000 +0100
++++ dosfstools-3.0.26/src/check.c 2014-03-26 10:04:41.000000000 +0100
+@@ -64,7 +64,7 @@ static DOS_FILE *root;
+ p->dir_ent.start = htole16(__v&0xffff); \
+ p->dir_ent.starthi = htole16(__v>>16); \
+ __v = htole32(__v); \
+- fs_write((loff_t)offsetof(struct boot_sector,root_cluster), \
++ fs_write((off_t)offsetof(struct boot_sector,root_cluster), \
+ sizeof(((struct boot_sector *)0)->root_cluster), \
+ &__v); \
+ } \
+@@ -75,16 +75,16 @@ static DOS_FILE *root;
+ } \
+ } while(0)
+
+-loff_t alloc_rootdir_entry(DOS_FS * fs, DIR_ENT * de, const char *pattern)
++off_t alloc_rootdir_entry(DOS_FS * fs, DIR_ENT * de, const char *pattern)
+ {
+ static int curr_num = 0;
+- loff_t offset;
++ off_t offset;
+
+ if (fs->root_cluster) {
+ DIR_ENT d2;
+ int i = 0, got = 0;
+ uint32_t clu_num, prev = 0;
+- loff_t offset2;
++ off_t offset2;
+
+ clu_num = fs->root_cluster;
+ offset = cluster_start(fs, clu_num);
+@@ -333,7 +333,7 @@ static int bad_name(DOS_FILE * file)
+ return 0;
+ }
+
+-static void lfn_remove(loff_t from, loff_t to)
++static void lfn_remove(off_t from, off_t to)
+ {
+ DIR_ENT empty;
+
+@@ -949,7 +949,7 @@ static void new_dir(void)
+ * @param cp
+ */
+ static void add_file(DOS_FS * fs, DOS_FILE *** chain, DOS_FILE * parent,
+- loff_t offset, FDSC ** cp)
++ off_t offset, FDSC ** cp)
+ {
+ DOS_FILE *new;
+ DIR_ENT de;
diff --git a/package/dosfstools/patches/patch-src_check_h b/package/dosfstools/patches/patch-src_check_h
new file mode 100644
index 000000000..7f0b5e643
--- /dev/null
+++ b/package/dosfstools/patches/patch-src_check_h
@@ -0,0 +1,11 @@
+--- dosfstools-3.0.26.orig/src/check.h 2014-01-17 07:07:02.000000000 +0100
++++ dosfstools-3.0.26/src/check.h 2014-03-26 13:25:47.000000000 +0100
+@@ -23,7 +23,7 @@
+ #ifndef _CHECK_H
+ #define _CHECK_H
+
+-loff_t alloc_rootdir_entry(DOS_FS * fs, DIR_ENT * de, const char *pattern);
++off_t alloc_rootdir_entry(DOS_FS * fs, DIR_ENT * de, const char *pattern);
+
+ /* Allocate a free slot in the root directory for a new file. The file name is
+ constructed after 'pattern', which must include a %d type format for printf
diff --git a/package/dosfstools/patches/patch-src_fat_c b/package/dosfstools/patches/patch-src_fat_c
new file mode 100644
index 000000000..15bfd16db
--- /dev/null
+++ b/package/dosfstools/patches/patch-src_fat_c
@@ -0,0 +1,32 @@
+--- dosfstools-3.0.26.orig/src/fat.c 2014-01-17 07:07:05.000000000 +0100
++++ dosfstools-3.0.26/src/fat.c 2014-03-26 13:37:03.000000000 +0100
+@@ -180,7 +180,7 @@ void set_fat(DOS_FS * fs, uint32_t clust
+ {
+ unsigned char *data = NULL;
+ int size;
+- loff_t offs;
++ off_t offs;
+
+ if (new == -1)
+ new = FAT_EOF(fs);
+@@ -264,9 +264,9 @@ uint32_t next_cluster(DOS_FS * fs, uint3
+ return FAT_IS_EOF(fs, value) ? -1 : value;
+ }
+
+-loff_t cluster_start(DOS_FS * fs, uint32_t cluster)
++off_t cluster_start(DOS_FS * fs, uint32_t cluster)
+ {
+- return fs->data_start + ((loff_t) cluster -
++ return fs->data_start + ((off_t) cluster -
+ 2) * (uint64_t)fs->cluster_size;
+ }
+
+@@ -475,7 +475,7 @@ void reclaim_file(DOS_FS * fs)
+ /* If this cluster is the head of an orphan chain... */
+ if (get_owner(fs, i) == &orphan && !num_refs[i]) {
+ DIR_ENT de;
+- loff_t offset;
++ off_t offset;
+ files++;
+ offset = alloc_rootdir_entry(fs, &de, "FSCK%04dREC");
+ de.start = htole16(i & 0xffff);
diff --git a/package/dosfstools/patches/patch-src_fat_h b/package/dosfstools/patches/patch-src_fat_h
new file mode 100644
index 000000000..9a5a81b88
--- /dev/null
+++ b/package/dosfstools/patches/patch-src_fat_h
@@ -0,0 +1,11 @@
+--- dosfstools-3.0.26.orig/src/fat.h 2014-01-17 07:07:07.000000000 +0100
++++ dosfstools-3.0.26/src/fat.h 2014-03-26 13:29:04.000000000 +0100
+@@ -49,7 +49,7 @@ uint32_t next_cluster(DOS_FS * fs, uint3
+ last cluster of the respective cluster chain. CLUSTER must not be a bad
+ cluster. */
+
+-loff_t cluster_start(DOS_FS * fs, uint32_t cluster);
++off_t cluster_start(DOS_FS * fs, uint32_t cluster);
+
+ /* Returns the byte offset of CLUSTER, relative to the respective device. */
+
diff --git a/package/dosfstools/patches/patch-src_fatlabel_c b/package/dosfstools/patches/patch-src_fatlabel_c
new file mode 100644
index 000000000..1a5e2c2cf
--- /dev/null
+++ b/package/dosfstools/patches/patch-src_fatlabel_c
@@ -0,0 +1,11 @@
+--- dosfstools-3.0.26.orig/src/fatlabel.c 2014-01-17 07:07:08.000000000 +0100
++++ dosfstools-3.0.26/src/fatlabel.c 2014-03-26 13:23:52.000000000 +0100
+@@ -92,7 +92,7 @@ int main(int argc, char *argv[])
+ char *device = NULL;
+ char label[12] = { 0 };
+
+- loff_t offset;
++ off_t offset;
+ DIR_ENT de;
+
+ check_atari();
diff --git a/package/dosfstools/patches/patch-src_fsck_fat_h b/package/dosfstools/patches/patch-src_fsck_fat_h
new file mode 100644
index 000000000..feaefb58e
--- /dev/null
+++ b/package/dosfstools/patches/patch-src_fsck_fat_h
@@ -0,0 +1,38 @@
+--- dosfstools-3.0.26.orig/src/fsck.fat.h 2014-02-08 18:53:10.000000000 +0100
++++ dosfstools-3.0.26/src/fsck.fat.h 2014-03-26 13:29:32.000000000 +0100
+@@ -143,8 +143,8 @@ typedef struct {
+ typedef struct _dos_file {
+ DIR_ENT dir_ent;
+ char *lfn;
+- loff_t offset;
+- loff_t lfn_offset;
++ off_t offset;
++ off_t lfn_offset;
+ struct _dos_file *parent; /* parent directory */
+ struct _dos_file *next; /* next entry */
+ struct _dos_file *first; /* first entry (directory only) */
+@@ -157,19 +157,19 @@ typedef struct {
+
+ typedef struct {
+ int nfats;
+- loff_t fat_start;
++ off_t fat_start;
+ unsigned int fat_size; /* unit is bytes */
+ unsigned int fat_bits; /* size of a FAT entry */
+ unsigned int eff_fat_bits; /* # of used bits in a FAT entry */
+ uint32_t root_cluster; /* 0 for old-style root dir */
+- loff_t root_start;
++ off_t root_start;
+ unsigned int root_entries;
+- loff_t data_start;
++ off_t data_start;
+ unsigned int cluster_size;
+ uint32_t clusters;
+- loff_t fsinfo_start; /* 0 if not present */
++ off_t fsinfo_start; /* 0 if not present */
+ long free_clusters;
+- loff_t backupboot_start; /* 0 if not present */
++ off_t backupboot_start; /* 0 if not present */
+ unsigned char *fat;
+ DOS_FILE **cluster_owner;
+ char *label;
diff --git a/package/dosfstools/patches/patch-src_io_c b/package/dosfstools/patches/patch-src_io_c
new file mode 100644
index 000000000..fae1ce625
--- /dev/null
+++ b/package/dosfstools/patches/patch-src_io_c
@@ -0,0 +1,59 @@
+--- dosfstools-3.0.26.orig/src/io.c 2014-01-17 07:07:14.000000000 +0100
++++ dosfstools-3.0.26/src/io.c 2014-03-26 13:27:02.000000000 +0100
+@@ -48,7 +48,7 @@
+
+ typedef struct _change {
+ void *data;
+- loff_t pos;
++ off_t pos;
+ int size;
+ struct _change *next;
+ } CHANGE;
+@@ -60,7 +60,7 @@ unsigned device_no;
+
+ #ifdef __DJGPP__
+ #include "volume.h" /* DOS lowlevel disk access functions */
+-loff_t llseek(int fd, loff_t offset, int whence)
++off_t llseek(int fd, off_t offset, int whence)
+ {
+ if ((whence != SEEK_SET) || (fd == 4711))
+ return -1; /* only those supported */
+@@ -72,9 +72,9 @@ loff_t llseek(int fd, loff_t offset, int
+ #define read(a,b,c) ReadVolume(b,c)
+ #define write(a,b,c) WriteVolume(b,c)
+ #else
+-loff_t llseek(int fd, loff_t offset, int whence)
++off_t llseek(int fd, off_t offset, int whence)
+ {
+- return (loff_t) lseek64(fd, (off64_t) offset, whence);
++ return (off_t) lseek64(fd, (off64_t) offset, whence);
+ }
+ #endif
+
+@@ -118,7 +118,7 @@ void fs_open(char *path, int rw)
+ * @param[in] size Number of bytes to read
+ * @param[out] data Where to put the data read
+ */
+-void fs_read(loff_t pos, int size, void *data)
++void fs_read(off_t pos, int size, void *data)
+ {
+ CHANGE *walk;
+ int got;
+@@ -145,7 +145,7 @@ void fs_read(loff_t pos, int size, void
+ }
+ }
+
+-int fs_test(loff_t pos, int size)
++int fs_test(off_t pos, int size)
+ {
+ void *scratch;
+ int okay;
+@@ -158,7 +158,7 @@ int fs_test(loff_t pos, int size)
+ return okay;
+ }
+
+-void fs_write(loff_t pos, int size, void *data)
++void fs_write(off_t pos, int size, void *data)
+ {
+ CHANGE *new;
+ int did;
diff --git a/package/dosfstools/patches/patch-src_io_h b/package/dosfstools/patches/patch-src_io_h
new file mode 100644
index 000000000..3ec0fd809
--- /dev/null
+++ b/package/dosfstools/patches/patch-src_io_h
@@ -0,0 +1,35 @@
+--- dosfstools-3.0.26.orig/src/io.h 2014-02-08 18:53:10.000000000 +0100
++++ dosfstools-3.0.26/src/io.h 2014-03-26 13:27:15.000000000 +0100
+@@ -27,9 +27,9 @@
+ #ifndef _IO_H
+ #define _IO_H
+
+-#include <fcntl.h> /* for loff_t */
++#include <fcntl.h> /* for off_t */
+
+-loff_t llseek(int fd, loff_t offset, int whence);
++off_t llseek(int fd, off_t offset, int whence);
+
+ /* lseek() analogue for large offsets. */
+
+@@ -38,17 +38,17 @@ void fs_open(char *path, int rw);
+ /* Opens the filesystem PATH. If RW is zero, the filesystem is opened
+ read-only, otherwise, it is opened read-write. */
+
+-void fs_read(loff_t pos, int size, void *data);
++void fs_read(off_t pos, int size, void *data);
+
+ /* Reads SIZE bytes starting at POS into DATA. Performs all applicable
+ changes. */
+
+-int fs_test(loff_t pos, int size);
++int fs_test(off_t pos, int size);
+
+ /* Returns a non-zero integer if SIZE bytes starting at POS can be read without
+ errors. Otherwise, it returns zero. */
+
+-void fs_write(loff_t pos, int size, void *data);
++void fs_write(off_t pos, int size, void *data);
+
+ /* If write_immed is non-zero, SIZE bytes are written from DATA to the disk,
+ starting at POS. If write_immed is zero, the change is added to a list in
diff --git a/package/dosfstools/patches/patch-src_lfn_c b/package/dosfstools/patches/patch-src_lfn_c
new file mode 100644
index 000000000..dfda2dc3e
--- /dev/null
+++ b/package/dosfstools/patches/patch-src_lfn_c
@@ -0,0 +1,74 @@
+--- dosfstools-3.0.26.orig/src/lfn.c 2014-01-17 07:07:16.000000000 +0100
++++ dosfstools-3.0.26/src/lfn.c 2014-03-26 13:24:23.000000000 +0100
+@@ -52,7 +52,7 @@ typedef struct {
+ unsigned char *lfn_unicode = NULL;
+ unsigned char lfn_checksum;
+ int lfn_slot = -1;
+-loff_t *lfn_offsets = NULL;
++off_t *lfn_offsets = NULL;
+ int lfn_parts = 0;
+
+ static unsigned char fat_uni2esc[64] = {
+@@ -170,7 +170,7 @@ static void clear_lfn_slots(int start, i
+ }
+ }
+
+-void lfn_fix_checksum(loff_t from, loff_t to, const char *short_name)
++void lfn_fix_checksum(off_t from, off_t to, const char *short_name)
+ {
+ int i;
+ __u8 sum;
+@@ -195,7 +195,7 @@ void lfn_reset(void)
+
+ /* This function is only called with de->attr == VFAT_LN_ATTR. It stores part
+ * of the long name. */
+-void lfn_add_slot(DIR_ENT * de, loff_t dir_offset)
++void lfn_add_slot(DIR_ENT * de, off_t dir_offset)
+ {
+ LFN_ENT *lfn = (LFN_ENT *) de;
+ int slot = lfn->id & LFN_ID_SLOTMASK;
+@@ -253,7 +253,7 @@ void lfn_add_slot(DIR_ENT * de, loff_t d
+ lfn_slot = slot;
+ lfn_checksum = lfn->alias_checksum;
+ lfn_unicode = alloc((lfn_slot * CHARS_PER_LFN + 1) * 2);
+- lfn_offsets = alloc(lfn_slot * sizeof(loff_t));
++ lfn_offsets = alloc(lfn_slot * sizeof(off_t));
+ lfn_parts = 0;
+ } else if (lfn_slot == -1 && slot != 0) {
+ /* No LFN in progress, but slot found; start bit missing */
+@@ -272,7 +272,7 @@ void lfn_add_slot(DIR_ENT * de, loff_t d
+ switch (interactive ? get_key("123", "?") : '2') {
+ case '1':
+ if (!lfn_offsets)
+- lfn_offsets = alloc(sizeof(loff_t));
++ lfn_offsets = alloc(sizeof(off_t));
+ lfn_offsets[0] = dir_offset;
+ clear_lfn_slots(0, 0);
+ lfn_reset();
+@@ -287,7 +287,7 @@ void lfn_add_slot(DIR_ENT * de, loff_t d
+ lfn_slot = slot;
+ lfn_checksum = lfn->alias_checksum;
+ lfn_unicode = alloc((lfn_slot * CHARS_PER_LFN + 1) * 2);
+- lfn_offsets = alloc(lfn_slot * sizeof(loff_t));
++ lfn_offsets = alloc(lfn_slot * sizeof(off_t));
+ lfn_parts = 0;
+ break;
+ }
+@@ -319,7 +319,7 @@ void lfn_add_slot(DIR_ENT * de, loff_t d
+ switch (interactive ? get_key(can_fix ? "123" : "12", "?") : '2') {
+ case '1':
+ if (!lfn_offsets) {
+- lfn_offsets = alloc(sizeof(loff_t));
++ lfn_offsets = alloc(sizeof(off_t));
+ lfn_parts = 0;
+ }
+ lfn_offsets[lfn_parts++] = dir_offset;
+@@ -406,7 +406,7 @@ void lfn_add_slot(DIR_ENT * de, loff_t d
+
+ /* This function is always called when de->attr != VFAT_LN_ATTR is found, to
+ * retrieve the previously constructed LFN. */
+-char *lfn_get(DIR_ENT * de, loff_t * lfn_offset)
++char *lfn_get(DIR_ENT * de, off_t * lfn_offset)
+ {
+ char *lfn;
+ __u8 sum;
diff --git a/package/dosfstools/patches/patch-src_lfn_h b/package/dosfstools/patches/patch-src_lfn_h
new file mode 100644
index 000000000..0027ce035
--- /dev/null
+++ b/package/dosfstools/patches/patch-src_lfn_h
@@ -0,0 +1,20 @@
+--- dosfstools-3.0.26.orig/src/lfn.h 2014-01-17 07:07:17.000000000 +0100
++++ dosfstools-3.0.26/src/lfn.h 2014-03-26 13:24:56.000000000 +0100
+@@ -26,14 +26,14 @@
+ void lfn_reset(void);
+ /* Reset the state of the LFN parser. */
+
+-void lfn_add_slot(DIR_ENT * de, loff_t dir_offset);
++void lfn_add_slot(DIR_ENT * de, off_t dir_offset);
+ /* Process a dir slot that is a VFAT LFN entry. */
+
+-char *lfn_get(DIR_ENT * de, loff_t * lfn_offset);
++char *lfn_get(DIR_ENT * de, off_t * lfn_offset);
+ /* Retrieve the long name for the proper dir entry. */
+
+ void lfn_check_orphaned(void);
+
+-void lfn_fix_checksum(loff_t from, loff_t to, const char *short_name);
++void lfn_fix_checksum(off_t from, off_t to, const char *short_name);
+
+ #endif
diff --git a/package/dosfstools/patches/patch-src_mkfs_fat_c b/package/dosfstools/patches/patch-src_mkfs_fat_c
new file mode 100644
index 000000000..60703d5f5
--- /dev/null
+++ b/package/dosfstools/patches/patch-src_mkfs_fat_c
@@ -0,0 +1,56 @@
+--- dosfstools-3.0.26.orig/src/mkfs.fat.c 2014-02-08 18:53:10.000000000 +0100
++++ dosfstools-3.0.26/src/mkfs.fat.c 2014-03-26 13:37:51.000000000 +0100
+@@ -300,7 +300,7 @@ static long do_check(char *buffer, int t
+ static void alarm_intr(int alnum);
+ static void check_blocks(void);
+ static void get_list_blocks(char *filename);
+-static int valid_offset(int fd, loff_t offset);
++static int valid_offset(int fd, off_t offset);
+ static uint64_t count_blocks(char *filename, int *remainder);
+ static void check_mount(char *device_name);
+ static void establish_params(int device_num, int size);
+@@ -477,7 +477,7 @@ static void get_list_blocks(char *filena
+ /* Given a file descriptor and an offset, check whether the offset is a valid offset for the file - return FALSE if it
+ isn't valid or TRUE if it is */
+
+-static int valid_offset(int fd, loff_t offset)
++static int valid_offset(int fd, off_t offset)
+ {
+ char ch;
+
+@@ -492,7 +492,7 @@ static int valid_offset(int fd, loff_t o
+
+ static uint64_t count_blocks(char *filename, int *remainder)
+ {
+- loff_t high, low;
++ off_t high, low;
+ int fd;
+
+ if ((fd = open(filename, O_RDONLY)) < 0) {
+@@ -506,7 +506,7 @@ static uint64_t count_blocks(char *filen
+ for (high = 1; valid_offset(fd, high); high *= 2)
+ low = high;
+ while (low < high - 1) {
+- const loff_t mid = (low + high) / 2;
++ const off_t mid = (low + high) / 2;
+ if (valid_offset(fd, mid))
+ low = mid;
+ else
+@@ -1299,7 +1299,7 @@ static void setup_tables(void)
+
+ #define seekto(pos,errstr) \
+ do { \
+- loff_t __pos = (pos); \
++ off_t __pos = (pos); \
+ if (llseek (dev, __pos, SEEK_SET) != __pos) \
+ error ("seek to " errstr " failed whilst writing tables"); \
+ } while(0)
+@@ -1679,7 +1679,7 @@ int main(int argc, char **argv)
+ exit(1); /* The error exit code is 1! */
+ }
+ } else {
+- loff_t offset = blocks * BLOCK_SIZE - 1;
++ off_t offset = blocks * BLOCK_SIZE - 1;
+ char null = 0;
+ /* create the file */
+ dev = open(device_name, O_EXCL | O_RDWR | O_CREAT | O_TRUNC, 0666);
diff --git a/package/dovecot/Makefile b/package/dovecot/Makefile
index 624d47672..0fd736e4d 100644
--- a/package/dovecot/Makefile
+++ b/package/dovecot/Makefile
@@ -4,21 +4,15 @@
include ${TOPDIR}/rules.mk
PKG_NAME:= dovecot
-PKG_VERSION:= 2.0.5
+PKG_VERSION:= 2.2.12
PKG_RELEASE:= 1
-PKG_MD5SUM:= 7168c5bf40fdd38cceb99114547699b8
-PKG_DESCR:= A minimal and secure imap server
+PKG_MD5SUM:= 25395269fa2e0525e2d144d71d0450eb
+PKG_DESCR:= minimal and secure imap server
+PKG_BUILDDEP:= openssl
+PKG_DEPENDS:= libopenssl
PKG_SECTION:= mail
PKG_URL:= http://www.dovecot.org/
-PKG_SITES:= http://www.dovecot.org/releases/2.0/
-
-PKG_CHOICES_DOVECOT:= WITH_GNUTLS WITH_OPENSSL
-PKGCD_WITH_OPENSSL:= use OpenSSL for crypto
-PKGCS_WITH_OPENSSL:= libopenssl
-PKGCB_WITH_OPENSSL:= openssl
-PKGCD_WITH_GNUTLS:= use GnuTLS for crypto
-PKGCS_WITH_GNUTLS:= libgnutls
-PKGCB_WITH_GNUTLS:= gnutls
+PKG_SITES:= http://www.dovecot.org/releases/2.2/
include ${TOPDIR}/mk/package.mk
@@ -45,16 +39,10 @@ CONFIGURE_ARGS+= --with-notify=none \
--without-gssapi \
--without-pam \
--with-ioloop=epoll \
- --with-moduledir=/usr/lib/dovecot/modules
-
-ifeq (${ADK_PACKAGE_DOVECOT_WITH_GNUTLS},y)
-CONFIGURE_ARGS+= --with-ssl=gnutls
-endif
-ifeq (${ADK_PACKAGE_DOVECOT_WITH_OPENSSL},y)
-CONFIGURE_ARGS+= --with-ssl=openssl
-endif
+ --with-moduledir=/usr/lib/dovecot/modules \
+ --with-ssl=openssl
-post-install:
+dovecot-install:
${INSTALL_DIR} ${IDIR_DOVECOT}/etc
${INSTALL_DIR} ${IDIR_DOVECOT}/usr/sbin
${INSTALL_DIR} ${IDIR_DOVECOT}/usr/libexec/dovecot
diff --git a/package/dovecot/patches/patch-ltmain_sh b/package/dovecot/patches/patch-ltmain_sh
deleted file mode 100644
index 8c7c6bc7d..000000000
--- a/package/dovecot/patches/patch-ltmain_sh
+++ /dev/null
@@ -1,11 +0,0 @@
---- dovecot-2.0.5.orig/ltmain.sh 2010-05-24 16:48:06.000000000 +0200
-+++ dovecot-2.0.5/ltmain.sh 2011-01-14 22:05:48.000000000 +0100
-@@ -4765,7 +4765,7 @@ func_mode_link ()
- # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
- # @file GCC response files
- -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
-- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
-+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
- func_quote_for_eval "$arg"
- arg="$func_quote_for_eval_result"
- func_append compile_command " $arg"
diff --git a/package/dropbear/Makefile b/package/dropbear/Makefile
index 319c7522f..58c55376d 100644
--- a/package/dropbear/Makefile
+++ b/package/dropbear/Makefile
@@ -14,7 +14,6 @@ PKG_SITES:= http://matt.ucc.asn.au/dropbear/releases/
DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2
-PKG_DFLT_DROPBEAR:= y if !ADK_TOOLCHAIN_ONLY && !ADK_PKG_TEST
PKG_SUBPKGS:= DROPBEAR DBCONVERT
PKGSD_DBCONVERT:= Utility for converting SSH private keys
@@ -26,8 +25,6 @@ include $(TOPDIR)/mk/package.mk
$(eval $(call PKG_template,DROPBEAR,dropbear,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
$(eval $(call PKG_template,DBCONVERT,dropbearconvert,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_DBCONVERT},${PKG_SECTION}))
-TARGET_LDFLAGS+= $(ADK_TARGET_ABI_CFLAGS)
-
ifeq ($(ADK_STATIC),y)
TARGET_LDFLAGS+= -static
endif
diff --git a/package/dropbear/files/dropbear.postinst b/package/dropbear/files/dropbear.postinst
index 11c7923bb..c39e16944 100644
--- a/package/dropbear/files/dropbear.postinst
+++ b/package/dropbear/files/dropbear.postinst
@@ -1,4 +1,4 @@
#!/bin/sh
. $IPKG_INSTROOT/etc/functions.sh
-add_rcconf '"NO" to disable' dropbear_flags " "
-add_rcconf dropbear dropbear YES
+add_rcconf dropbear_flags dropbear_flags " "
+add_rcconf dropbear dropbear NO
diff --git a/package/e2fsprogs/Makefile b/package/e2fsprogs/Makefile
index 391d3475b..ada599fb0 100644
--- a/package/e2fsprogs/Makefile
+++ b/package/e2fsprogs/Makefile
@@ -4,9 +4,9 @@
include ${TOPDIR}/rules.mk
PKG_NAME:= e2fsprogs
-PKG_VERSION:= 1.42.8
-PKG_RELEASE:= 3
-PKG_MD5SUM:= 8ef664b6eb698aa6b733df59b17b9ed4
+PKG_VERSION:= 1.42.9
+PKG_RELEASE:= 1
+PKG_MD5SUM:= 3f8e41e63b432ba114b33f58674563f7
PKG_DESCR:= Ext2/3/4 filesystem utilities (meta-package)
PKG_SECTION:= fs
PKG_DEPENDS:= libcom-err libuuid libblkid libpthread
@@ -16,8 +16,6 @@ PKG_URL:= http://e2fsprogs.sourceforge.net/
PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=e2fsprogs/}
PKG_OPTS:= dev
-PKG_CFLINE_E2FSPROGS:= default y if ADK_TARGET_ROOTFS_CF
-
PKG_SUBPKGS:= E2FSPROGS LIBE2FS LIBCOM_ERR LIBSS E2FSCK_STATIC
PKG_SUBPKGS+= RESIZE2FS TUNE2FS E2FSCK MKE2FS
PKGSD_LIBE2FS:= e2fsprogs library
@@ -88,6 +86,8 @@ e2fsck-install:
${INSTALL_DIR} ${IDIR_E2FSCK}/usr/sbin
${INSTALL_BIN} ${WRKINST}/usr/sbin/e2fsck ${IDIR_E2FSCK}/usr/sbin
cd $(IDIR_E2FSCK)/usr/sbin && ln -sf e2fsck fsck.ext2
+ cd $(IDIR_E2FSCK)/usr/sbin && ln -sf e2fsck fsck.ext3
+ cd $(IDIR_E2FSCK)/usr/sbin && ln -sf e2fsck fsck.ext4
mke2fs-install:
${INSTALL_DIR} ${IDIR_MKE2FS}/usr/sbin
diff --git a/package/ebtables/Makefile b/package/ebtables/Makefile
index 59f2ea6ba..e39f58070 100644
--- a/package/ebtables/Makefile
+++ b/package/ebtables/Makefile
@@ -21,7 +21,7 @@ $(eval $(call PKG_template,EBTABLES,ebtables,${PKG_VERSION}-${PKG_RELEASE},${PKG
CONFIG_STYLE:= manual
-post-install:
+ebtables-install:
${INSTALL_DIR} ${IDIR_EBTABLES}/etc
${INSTALL_DIR} ${IDIR_EBTABLES}/usr/sbin ${IDIR_EBTABLES}/usr/lib
${INSTALL_DATA} ${WRKINST}/etc/ethertypes ${IDIR_EBTABLES}/etc
diff --git a/package/ebtables/patches/patch-Makefile b/package/ebtables/patches/patch-Makefile
index ff5934a70..f4e293eaf 100644
--- a/package/ebtables/patches/patch-Makefile
+++ b/package/ebtables/patches/patch-Makefile
@@ -1,6 +1,6 @@
---- ebtables-v2.0.10-3.orig/Makefile 2011-12-04 10:46:26.000000000 +0100
-+++ ebtables-v2.0.10-3/Makefile 2011-12-11 16:35:34.619464748 +0100
-@@ -10,16 +10,16 @@ LOCKDIR:=$(shell echo $(LOCKFILE) | sed
+--- ebtables-v2.0.10-4.orig/Makefile 2011-12-15 21:02:47.000000000 +0100
++++ ebtables-v2.0.10-4/Makefile 2014-03-23 15:46:20.000000000 +0100
+@@ -10,16 +10,16 @@ LOCKDIR:=$(shell echo $(LOCKFILE) | sed
# default paths
LIBDIR:=/usr/lib
diff --git a/package/ebtables/patches/patch-extensions_ebt_among_c b/package/ebtables/patches/patch-extensions_ebt_among_c
new file mode 100644
index 000000000..08f3fb7f1
--- /dev/null
+++ b/package/ebtables/patches/patch-extensions_ebt_among_c
@@ -0,0 +1,10 @@
+--- ebtables-v2.0.10-4.orig/extensions/ebt_among.c 2011-12-15 21:02:47.000000000 +0100
++++ ebtables-v2.0.10-4/extensions/ebt_among.c 2014-03-23 15:51:29.000000000 +0100
+@@ -13,7 +13,6 @@
+ #include <ctype.h>
+ #include <unistd.h>
+ #include "../include/ebtables_u.h"
+-#include <netinet/ether.h>
+ #include "../include/ethernetdb.h"
+ #include <linux/if_ether.h>
+ #include <linux/netfilter_bridge/ebt_among.h>
diff --git a/package/ebtables/patches/patch-extensions_ebt_arpreply_c b/package/ebtables/patches/patch-extensions_ebt_arpreply_c
new file mode 100644
index 000000000..32432efb4
--- /dev/null
+++ b/package/ebtables/patches/patch-extensions_ebt_arpreply_c
@@ -0,0 +1,10 @@
+--- ebtables-v2.0.10-4.orig/extensions/ebt_arpreply.c 2011-12-15 21:02:47.000000000 +0100
++++ ebtables-v2.0.10-4/extensions/ebt_arpreply.c 2014-03-23 15:50:38.000000000 +0100
+@@ -12,7 +12,6 @@
+ #include <string.h>
+ #include <getopt.h>
+ #include "../include/ebtables_u.h"
+-#include <netinet/ether.h>
+ #include <linux/netfilter_bridge/ebt_arpreply.h>
+
+ static int mac_supplied;
diff --git a/package/ebtables/patches/patch-extensions_ebt_ip6_c b/package/ebtables/patches/patch-extensions_ebt_ip6_c
new file mode 100644
index 000000000..e57677d44
--- /dev/null
+++ b/package/ebtables/patches/patch-extensions_ebt_ip6_c
@@ -0,0 +1,10 @@
+--- ebtables-v2.0.10-4.orig/extensions/ebt_ip6.c 2011-12-15 21:02:47.000000000 +0100
++++ ebtables-v2.0.10-4/extensions/ebt_ip6.c 2014-03-23 15:51:09.000000000 +0100
+@@ -11,6 +11,7 @@
+ *
+ */
+
++#include <sys/types.h>
+ #include <errno.h>
+ #include <inttypes.h>
+ #include <limits.h>
diff --git a/package/ebtables/patches/patch-extensions_ebt_limit_c b/package/ebtables/patches/patch-extensions_ebt_limit_c
new file mode 100644
index 000000000..5464611c1
--- /dev/null
+++ b/package/ebtables/patches/patch-extensions_ebt_limit_c
@@ -0,0 +1,10 @@
+--- ebtables-v2.0.10-4.orig/extensions/ebt_limit.c 2011-12-15 21:02:47.000000000 +0100
++++ ebtables-v2.0.10-4/extensions/ebt_limit.c 2014-03-23 15:52:04.000000000 +0100
+@@ -8,6 +8,7 @@
+ * September, 2003
+ */
+
++#include <sys/types.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
diff --git a/package/ebtables/patches/patch-extensions_ebt_nat_c b/package/ebtables/patches/patch-extensions_ebt_nat_c
new file mode 100644
index 000000000..1a215e9e7
--- /dev/null
+++ b/package/ebtables/patches/patch-extensions_ebt_nat_c
@@ -0,0 +1,10 @@
+--- ebtables-v2.0.10-4.orig/extensions/ebt_nat.c 2011-12-15 21:02:47.000000000 +0100
++++ ebtables-v2.0.10-4/extensions/ebt_nat.c 2014-03-23 15:50:13.000000000 +0100
+@@ -11,7 +11,6 @@
+ #include <string.h>
+ #include <getopt.h>
+ #include "../include/ebtables_u.h"
+-#include <netinet/ether.h>
+ #include <linux/netfilter_bridge/ebt_nat.h>
+
+ static int to_source_supplied, to_dest_supplied;
diff --git a/package/ebtables/patches/patch-include_ethernetdb_h b/package/ebtables/patches/patch-include_ethernetdb_h
new file mode 100644
index 000000000..1bc877d57
--- /dev/null
+++ b/package/ebtables/patches/patch-include_ethernetdb_h
@@ -0,0 +1,29 @@
+--- ebtables-v2.0.10-4.orig/include/ethernetdb.h 2011-12-15 21:02:47.000000000 +0100
++++ ebtables-v2.0.10-4/include/ethernetdb.h 2014-03-23 15:47:35.000000000 +0100
+@@ -38,21 +38,20 @@ struct ethertypeent {
+
+ /* Open ethertype data base files and mark them as staying open even
+ after a later search if STAY_OPEN is non-zero. */
+-extern void setethertypeent(int __stay_open) __THROW;
++extern void setethertypeent(int __stay_open);
+
+ /* Close ethertype data base files and clear `stay open' flag. */
+-extern void endethertypeent(void) __THROW;
++extern void endethertypeent(void);
+
+ /* Get next entry from ethertype data base file. Open data base if
+ necessary. */
+-extern struct ethertypeent *getethertypeent(void) __THROW;
++extern struct ethertypeent *getethertypeent(void);
+
+ /* Return entry from ethertype data base for network with NAME. */
+-extern struct ethertypeent *getethertypebyname(__const char *__name)
+- __THROW;
++extern struct ethertypeent *getethertypebyname(__const char *__name);
+
+ /* Return entry from ethertype data base which number is PROTO. */
+-extern struct ethertypeent *getethertypebynumber(int __ethertype) __THROW;
++extern struct ethertypeent *getethertypebynumber(int __ethertype);
+
+
+ #endif /* ethernetdb.h */
diff --git a/package/ebtables/patches/patch-useful_functions_c b/package/ebtables/patches/patch-useful_functions_c
new file mode 100644
index 000000000..6e851ecd2
--- /dev/null
+++ b/package/ebtables/patches/patch-useful_functions_c
@@ -0,0 +1,10 @@
+--- ebtables-v2.0.10-4.orig/useful_functions.c 2011-12-15 21:02:47.000000000 +0100
++++ ebtables-v2.0.10-4/useful_functions.c 2014-03-23 15:49:15.000000000 +0100
+@@ -25,7 +25,6 @@
+ #include "include/ebtables_u.h"
+ #include "include/ethernetdb.h"
+ #include <stdio.h>
+-#include <netinet/ether.h>
+ #include <string.h>
+ #include <stdlib.h>
+ #include <getopt.h>
diff --git a/package/ethtool/Makefile b/package/ethtool/Makefile
index f6be14fb9..7834dcfdb 100644
--- a/package/ethtool/Makefile
+++ b/package/ethtool/Makefile
@@ -4,12 +4,14 @@
include ${TOPDIR}/rules.mk
PKG_NAME:= ethtool
-PKG_VERSION:= 2.6.36
-PKG_RELEASE:= 1
-PKG_MD5SUM:= 3b2322695e9ee7bf447ebcdb85f93e83
-PKG_DESCR:= Display or change ethernet card settings
+PKG_VERSION:= 3.13
+PKG_RELEASE:= 2
+PKG_MD5SUM:= dcb8f345d44ee79108282e7d0bdf5013
+PKG_DESCR:= display or change ethernet card settings
PKG_SECTION:= net
-PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=gkernel/}
+PKG_SITES:= https://www.kernel.org/pub/software/network/ethtool/
+
+DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.xz
include ${TOPDIR}/mk/package.mk
diff --git a/package/ethtool/patches/patch-internal_h b/package/ethtool/patches/patch-internal_h
new file mode 100644
index 000000000..280f92ce7
--- /dev/null
+++ b/package/ethtool/patches/patch-internal_h
@@ -0,0 +1,33 @@
+--- ethtool-3.13.orig/internal.h 2014-01-27 02:27:14.000000000 +0100
++++ ethtool-3.13/internal.h 2014-03-23 13:47:54.000000000 +0100
+@@ -7,6 +7,7 @@
+ #include "ethtool-config.h"
+ #endif
+ #include <stdio.h>
++#include <stdint.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <sys/types.h>
+@@ -17,16 +18,16 @@
+
+ /* ethtool.h expects these to be defined by <linux/types.h> */
+ #ifndef HAVE_BE_TYPES
+-typedef __uint16_t __be16;
+-typedef __uint32_t __be32;
++typedef uint16_t __be16;
++typedef uint32_t __be32;
+ typedef unsigned long long __be64;
+ #endif
+
+ typedef unsigned long long u64;
+-typedef __uint32_t u32;
+-typedef __uint16_t u16;
+-typedef __uint8_t u8;
+-typedef __int32_t s32;
++typedef uint32_t u32;
++typedef uint16_t u16;
++typedef uint8_t u8;
++typedef int32_t s32;
+
+ #include "ethtool-copy.h"
+ #include "net_tstamp-copy.h"
diff --git a/package/eudev/Makefile b/package/eudev/Makefile
index 4bce0928c..a6939a032 100644
--- a/package/eudev/Makefile
+++ b/package/eudev/Makefile
@@ -4,10 +4,10 @@
include $(TOPDIR)/rules.mk
PKG_NAME:= eudev
-PKG_VERSION:= 1.3
-PKG_RELEASE:= 1
-PKG_MD5SUM:= 164df78f6f0093578a20bdd00335845f
-PKG_DESCR:= udev device manager
+PKG_VERSION:= 1.5.3
+PKG_RELEASE:= 2
+PKG_MD5SUM:= 51380938b489385cc394f4ebabc048f0
+PKG_DESCR:= device manager (udev clone)
PKG_SECTION:= utils
PKG_BUILDDEP:= gperf-host glib
PKG_DEPENDS:= glib
@@ -16,20 +16,22 @@ PKG_SITES:= http://dev.gentoo.org/~blueness/eudev/
PKG_LIBNAME:= libudev
PKG_OPTS:= dev
-PKG_SUBPKGS:= UDEV LIBUDEV LIBGUDEV
-PKGSC_LIBGUDEV:= libs
-PKGSD_LIBGUDEV:= GUDEV library
+PKG_SUBPKGS:= UDEV LIBUDEV
+PKGSD_UDEV:= Dynamic device management manager
PKGSC_LIBUDEV:= libs
-PKGSD_LIBUDEV:= UDEV library
-PKGSD_UDEV:= Dynamic device management subsystem
+PKGSD_LIBUDEV:= Dynamic device management library
+
+ifeq ($(ADK_STATIC),y)
+PKG_OPTS+= libmix
+endif
include $(TOPDIR)/mk/package.mk
$(eval $(call PKG_template,UDEV,udev,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
$(eval $(call PKG_template,LIBUDEV,libudev,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
-$(eval $(call PKG_template,LIBGUDEV,libgudev,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
CONFIGURE_ARGS+= --disable-manpages \
+ --datadir=${STAGING_TARGET_PREFIX}/usr/lib \
--disable-gtk-doc
udev-install:
@@ -43,8 +45,4 @@ libudev-install:
${INSTALL_DIR} ${IDIR_LIBUDEV}/usr/lib
$(CP) $(WRKINST)/usr/lib/libudev.so* $(IDIR_LIBUDEV)/usr/lib
-libgudev-install:
- ${INSTALL_DIR} ${IDIR_LIBGUDEV}/usr/lib
- $(CP) $(WRKINST)/usr/lib/libgudev*.so* $(IDIR_LIBGUDEV)/usr/lib
-
include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/eudev/patches/patch-rule_generator_write_cd_rules b/package/eudev/patches/patch-rule_generator_write_cd_rules
new file mode 100644
index 000000000..ed67769b9
--- /dev/null
+++ b/package/eudev/patches/patch-rule_generator_write_cd_rules
@@ -0,0 +1,11 @@
+--- eudev-1.5.3.orig/rule_generator/write_cd_rules 2014-03-22 23:45:54.000000000 +0100
++++ eudev-1.5.3/rule_generator/write_cd_rules 2014-03-24 18:26:38.000000000 +0100
+@@ -27,7 +27,7 @@ if [ -n "$UDEV_LOG" ]; then
+ fi
+ fi
+
+-RULES_FILE="${prefix}/etc/udev/rules.d/70-persistent-cd.rules"
++RULES_FILE="/etc/udev/rules.d/70-persistent-cd.rules"
+
+ . ${prefix}/lib/udev/rule_generator.functions
+
diff --git a/package/eudev/patches/patch-rule_generator_write_net_rules b/package/eudev/patches/patch-rule_generator_write_net_rules
new file mode 100644
index 000000000..e5d14ae2e
--- /dev/null
+++ b/package/eudev/patches/patch-rule_generator_write_net_rules
@@ -0,0 +1,11 @@
+--- eudev-1.5.3.orig/rule_generator/write_net_rules 2014-03-22 23:45:54.000000000 +0100
++++ eudev-1.5.3/rule_generator/write_net_rules 2014-03-24 18:26:38.000000000 +0100
+@@ -38,7 +38,7 @@ if [ -n "$UDEV_LOG" ]; then
+ fi
+ fi
+
+-RULES_FILE='${prefix}/etc/udev/rules.d/70-persistent-net.rules'
++RULES_FILE='/etc/udev/rules.d/70-persistent-net.rules'
+
+ . ${prefix}/lib/udev/rule_generator.functions
+
diff --git a/package/eudev/patches/patch-src_accelerometer_accelerometer_c b/package/eudev/patches/patch-src_accelerometer_accelerometer_c
new file mode 100644
index 000000000..95735f8c5
--- /dev/null
+++ b/package/eudev/patches/patch-src_accelerometer_accelerometer_c
@@ -0,0 +1,13 @@
+--- eudev-1.5.3.orig/src/accelerometer/accelerometer.c 2014-03-22 22:56:51.000000000 +0100
++++ eudev-1.5.3/src/accelerometer/accelerometer.c 2014-03-24 20:41:59.000000000 +0100
+@@ -58,8 +58,8 @@
+ #include <linux/limits.h>
+ #include <linux/input.h>
+
+-#ifdef __UCLIBC__
+-#include <linux/fcntl.h>
++#if defined(__UCLIBC__)
++#define O_CLOEXEC 02000000 /* set close_on_exec */
+ #endif
+
+ #include "libudev.h"
diff --git a/package/eudev/patches/patch-src_accelerometer_accelerometer_c.orig b/package/eudev/patches/patch-src_accelerometer_accelerometer_c.orig
new file mode 100644
index 000000000..7bfc4f0c6
--- /dev/null
+++ b/package/eudev/patches/patch-src_accelerometer_accelerometer_c.orig
@@ -0,0 +1,13 @@
+--- eudev-1.5.3.orig/src/accelerometer/accelerometer.c 2014-03-22 22:56:51.000000000 +0100
++++ eudev-1.5.3/src/accelerometer/accelerometer.c 2014-03-24 20:39:35.000000000 +0100
+@@ -58,10 +58,6 @@
+ #include <linux/limits.h>
+ #include <linux/input.h>
+
+-#ifdef __UCLIBC__
+-#include <linux/fcntl.h>
+-#endif
+-
+ #include "libudev.h"
+ #include "libudev-private.h"
+
diff --git a/package/eudev/patches/patch-src_ata_id_ata_id_c b/package/eudev/patches/patch-src_ata_id_ata_id_c
new file mode 100644
index 000000000..eae35adf7
--- /dev/null
+++ b/package/eudev/patches/patch-src_ata_id_ata_id_c
@@ -0,0 +1,11 @@
+--- eudev-1.5.3.orig/src/ata_id/ata_id.c 2014-03-22 22:56:51.000000000 +0100
++++ eudev-1.5.3/src/ata_id/ata_id.c 2014-03-24 20:44:36.000000000 +0100
+@@ -42,7 +42,7 @@
+ #include <arpa/inet.h>
+
+ #ifdef __UCLIBC__
+-#include <linux/fcntl.h>
++#define O_CLOEXEC 02000000 /* Set close_on_exec. */
+ #endif
+
+ #include "libudev.h"
diff --git a/package/eudev/patches/patch-src_ata_id_ata_id_c.orig b/package/eudev/patches/patch-src_ata_id_ata_id_c.orig
new file mode 100644
index 000000000..0d621ffc6
--- /dev/null
+++ b/package/eudev/patches/patch-src_ata_id_ata_id_c.orig
@@ -0,0 +1,13 @@
+--- eudev-1.5.3.orig/src/ata_id/ata_id.c 2014-03-22 22:56:51.000000000 +0100
++++ eudev-1.5.3/src/ata_id/ata_id.c 2014-03-24 20:43:14.000000000 +0100
+@@ -41,10 +41,6 @@
+ #include <linux/bsg.h>
+ #include <arpa/inet.h>
+
+-#ifdef __UCLIBC__
+-#include <linux/fcntl.h>
+-#endif
+-
+ #include "libudev.h"
+ #include "libudev-private.h"
+ #include "log.h"
diff --git a/package/eudev/patches/patch-src_collect_collect_c b/package/eudev/patches/patch-src_collect_collect_c
new file mode 100644
index 000000000..dbf17c706
--- /dev/null
+++ b/package/eudev/patches/patch-src_collect_collect_c
@@ -0,0 +1,11 @@
+--- eudev-1.5.3.orig/src/collect/collect.c 2014-03-22 22:56:51.000000000 +0100
++++ eudev-1.5.3/src/collect/collect.c 2014-03-24 20:45:48.000000000 +0100
+@@ -32,7 +32,7 @@
+ #include <sys/stat.h>
+
+ #ifdef __UCLIBC__
+-#include <linux/fcntl.h>
++#define O_CLOEXEC 02000000 /* Set close_on_exec. */
+ #endif
+
+ #include "libudev.h"
diff --git a/package/eudev/patches/patch-src_mtd_probe_mtd_probe_c b/package/eudev/patches/patch-src_mtd_probe_mtd_probe_c
new file mode 100644
index 000000000..340f08e94
--- /dev/null
+++ b/package/eudev/patches/patch-src_mtd_probe_mtd_probe_c
@@ -0,0 +1,11 @@
+--- eudev-1.5.3.orig/src/mtd_probe/mtd_probe.c 2014-03-22 22:56:51.000000000 +0100
++++ eudev-1.5.3/src/mtd_probe/mtd_probe.c 2014-03-24 20:46:53.000000000 +0100
+@@ -27,7 +27,7 @@
+ #include <stdlib.h>
+
+ #ifdef __UCLIBC__
+-#include <linux/fcntl.h>
++# define O_CLOEXEC 02000000 /* Set close_on_exec. */
+ #endif
+
+ int main(int argc, char** argv)
diff --git a/package/eudev/patches/patch-src_scsi_id_scsi_serial_c b/package/eudev/patches/patch-src_scsi_id_scsi_serial_c
new file mode 100644
index 000000000..ab4f23dfd
--- /dev/null
+++ b/package/eudev/patches/patch-src_scsi_id_scsi_serial_c
@@ -0,0 +1,11 @@
+--- eudev-1.5.3.orig/src/scsi_id/scsi_serial.c 2014-03-22 22:56:51.000000000 +0100
++++ eudev-1.5.3/src/scsi_id/scsi_serial.c 2014-03-24 20:49:53.000000000 +0100
+@@ -35,7 +35,7 @@
+ #include <linux/bsg.h>
+
+ #ifdef __UCLIBC__
+-#include <linux/fcntl.h>
++#define O_CLOEXEC 02000000 /* set close_on_exec */
+ #endif
+
+ #include "libudev.h"
diff --git a/package/exmap/Makefile b/package/exmap/Makefile
index 9ea289eaf..6755f89df 100644
--- a/package/exmap/Makefile
+++ b/package/exmap/Makefile
@@ -5,32 +5,23 @@ include ${TOPDIR}/rules.mk
PKG_NAME:= exmap
PKG_VERSION:= 0.4.1
-PKG_RELEASE:= 3
+PKG_RELEASE:= 4
PKG_MD5SUM:= 55aec784e214037e61400287a55b5426
-PKG_DESCR:= memory analysing client tool
+PKG_DESCR:= memory analysing tools
PKG_SECTION:= debug
-PKG_DEPENDS:= exmap-kmod libreadline glib
+PKG_DEPENDS:= libreadline glib
PKG_BUILDDEP:= glib readline autotool
PKG_SITES:= http://labs.o-hand.com/sources/exmap-console/
PKG_ARCH_DEPENDS:= !m68k
PKG_CFLINE_EXMAP:= depends on !ADK_TOOLCHAIN_ONLY
-PKG_SUBPKGS:= EXMAP EXMAPD EXMAPSERVER EXMAP_KMOD
-PKGSD_EXMAPD:= memory analysing daemon
-PKGSD_EXMAPSERVER:= memory analysing server
-PKGSD_EXMAP_KMOD:= memory analysing kernel module
-PKGSC_EXMAP_KMOD:= kernel
-
DISTFILES:= ${PKG_NAME}-console-${PKG_VERSION}.tgz
WRKDIST= ${WRKDIR}/${PKG_NAME}-console-${PKG_VERSION}
include ${TOPDIR}/mk/package.mk
$(eval $(call PKG_template,EXMAP,exmap,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
-$(eval $(call PKG_template,EXMAPD,exmapd,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_EXMAPD},${PKG_SECTION}))
-$(eval $(call PKG_template,EXMAPSERVER,exmapserver,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_EXMAPSERVER},${PKG_SECTION}))
-$(eval $(call PKG_template,EXMAP_KMOD,exmap-kmod,${KERNEL_VERSION}+${PKG_VERSION}-${ADK_TARGET}-${PKG_RELEASE},,${PKGSD_EXMAP_KMOD},${PKGSC_EXMAP_KMOD}))
AUTOTOOL_STYLE:= autoreconf
CONFIGURE_ARGS+= --disable-doc
@@ -39,17 +30,13 @@ CONFIGURE_ENV+= LIBS="-lncurses"
pre-build:
$(MAKE) -C ${WRKBUILD}/kernel $(KERNEL_MODULE_FLAGS)
-post-install:
- ${INSTALL_DIR} ${IDIR_EXMAP_KMOD}/etc/modules.d/
- echo "exmap" > ${IDIR_EXMAP_KMOD}/etc/modules.d/90-exmap
- ${INSTALL_DIR} ${IDIR_EXMAP_KMOD}/lib/modules/${KERNEL_VERSION}/
+exmap-install:
+ ${INSTALL_DIR} ${IDIR_EXMAP}/etc/modules.d/
+ echo "exmap" > ${IDIR_EXMAP}/etc/modules.d/90-exmap
+ ${INSTALL_DIR} ${IDIR_EXMAP}/lib/modules/${KERNEL_VERSION}/
${INSTALL_DATA} ${WRKBUILD}/kernel/exmap.ko \
- ${IDIR_EXMAP_KMOD}/lib/modules/${KERNEL_VERSION}
+ ${IDIR_EXMAP}/lib/modules/${KERNEL_VERSION}
${INSTALL_DIR} ${IDIR_EXMAP}/usr/sbin
- ${INSTALL_BIN} ${WRKBUILD}/src/exmap ${IDIR_EXMAP}/usr/sbin
- ${INSTALL_DIR} ${IDIR_EXMAPD}/usr/sbin
- ${INSTALL_BIN} ${WRKBUILD}/src/exmapd ${IDIR_EXMAPD}/usr/sbin
- ${INSTALL_DIR} ${IDIR_EXMAPSERVER}/usr/sbin
- ${INSTALL_BIN} ${WRKBUILD}/src/exmapserver ${IDIR_EXMAPSERVER}/usr/sbin
+ ${INSTALL_BIN} ${WRKBUILD}/src/exmap* ${IDIR_EXMAP}/usr/sbin
include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/fbsplash/Makefile b/package/fbsplash/Makefile
new file mode 100644
index 000000000..0d2ece693
--- /dev/null
+++ b/package/fbsplash/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:= fbsplash
+PKG_VERSION:= 1.0
+PKG_RELEASE:= 2
+PKG_MD5SUM:= aa0a9e735e086228bc245b18e231bf6c
+PKG_DESCR:= framebuffer splash utility
+PKG_SECTION:= misc
+PKG_BUILDDEP:= libjpeg-turbo libpng freetype
+PKG_DEPENDS:= libjpeg-turbo libpng libfreetype
+PKG_URL:= https://github.com/alanhaggai/fbsplash
+PKG_SITES:= http://openadk.org/distfiles/
+
+include $(TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,FBSPLASH,fbsplash,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+
+fbsplash-install:
+ $(INSTALL_DIR) $(IDIR_FBSPLASH)/usr/lib
+ $(CP) $(WRKINST)/usr/lib/libfb*.so* $(IDIR_FBSPLASH)/usr/lib
+ $(INSTALL_DIR) $(IDIR_FBSPLASH)/sbin
+ $(INSTALL_BIN) $(WRKINST)/sbin/{fbcondecor_helper,fbsplashctl} \
+ $(IDIR_FBSPLASH)/sbin
+
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/feh/Makefile b/package/feh/Makefile
index 43a90b8b7..4f9f56476 100644
--- a/package/feh/Makefile
+++ b/package/feh/Makefile
@@ -4,9 +4,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:= feh
-PKG_VERSION:= 1.16.1
+PKG_VERSION:= 2.10
PKG_RELEASE:= 1
-PKG_MD5SUM:= 1bb080c7b0021db50884a52161251990
+PKG_MD5SUM:= 6714dedeff1db5c3593c4a27b0d9cf50
PKG_DESCR:= image viewer
PKG_SECTION:= multimedia
PKG_BUILDDEP:= imlib2 giblib libXt
diff --git a/package/fetchmail/Makefile b/package/fetchmail/Makefile
index 933333441..0d18d70cc 100644
--- a/package/fetchmail/Makefile
+++ b/package/fetchmail/Makefile
@@ -4,9 +4,9 @@
include ${TOPDIR}/rules.mk
PKG_NAME:= fetchmail
-PKG_VERSION:= 6.3.9
+PKG_VERSION:= 6.3.26
PKG_RELEASE:= 1
-PKG_MD5SUM:= 72c20ad2b9629f1a109668b05a84d823
+PKG_MD5SUM:= d9ae3d939205a3c06a21ea79b8f14793
PKG_DESCR:= fetch mail from a POP or IMAP server
PKG_SECTION:= mail
PKG_URL:= http://fetchmail.berlios.de/
diff --git a/package/ffmpeg/Makefile b/package/ffmpeg/Makefile
index d82f9d643..838ed551d 100644
--- a/package/ffmpeg/Makefile
+++ b/package/ffmpeg/Makefile
@@ -4,9 +4,9 @@
include ${TOPDIR}/rules.mk
PKG_NAME:= ffmpeg
-PKG_VERSION:= 2.1.1
+PKG_VERSION:= 2.2
PKG_RELEASE:= 1
-PKG_MD5SUM:= 2719ab2b3311ac3775b9cdeb66c54849
+PKG_MD5SUM:= 744febca199548c9393b1f1ed05ccdd8
PKG_DESCR:= record, convert and stream audio & video
PKG_SECTION:= libs
PKG_FDEPENDS:= libpthread
@@ -100,9 +100,12 @@ $(eval $(call PKG_template,FFSERVER,ffserver,${PKG_VERSION}-${PKG_RELEASE},${PKG
$(eval $(call PKG_template,FFPROBE,ffprobe,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_FFPROBE},${PKGSC_FFPROBE}))
#$(eval $(call PKG_template,FFPLAY,ffplay,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_FFPLAY},${PKGSD_FFPLAY},${PKGSC_FFPLAY}))
-TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS))
+ifeq ($(ADK_DEBUG),y)
+TARGET_CFLAGS:= $(subst O0,O2,$(TARGET_CFLAGS))
+else
TARGET_CFLAGS:= $(subst Os,O2,$(TARGET_CFLAGS))
-TARGET_CPPFLAGS+= -D_POSIX_SOURCE=1 -D_GNU_SOURCE=1
+endif
+TARGET_CPPFLAGS+= -D_POSIX_SOURCE -D_GNU_SOURCE
ifeq ($(ADK_TARGET_CPU_WITH_MMX),y)
CONFIGURE_CPU_OPTS:= --enable-mmx
diff --git a/package/findutils/Makefile b/package/findutils/Makefile
index 46c3e6681..2848ac91c 100644
--- a/package/findutils/Makefile
+++ b/package/findutils/Makefile
@@ -5,29 +5,42 @@ include $(TOPDIR)/rules.mk
PKG_NAME:= findutils
PKG_VERSION:= 4.4.2
-PKG_RELEASE:= 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
+HOST_BUILDDEP:= autotool
PKG_URL:= http://www.gnu.org/software/findutils/
PKG_SITES:= http://ftp.gnu.org/pub/gnu/findutils/
-PKG_SUBPKGS:= FINDUTILS LOCATE
-PKGSD_LOCATE:= Locate utility
+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 PKG_template,FINDUTILS,findutils,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+$(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
-findutils-install:
- $(INSTALL_DIR) $(IDIR_FINDUTILS)/usr/bin
- $(INSTALL_BIN) $(WRKINST)/usr/bin/{find,oldfind,xargs} \
- $(IDIR_FINDUTILS)/usr/bin
+find-install:
+ $(INSTALL_DIR) $(IDIR_FIND)/usr/bin
+ $(INSTALL_BIN) $(WRKINST)/usr/bin/find \
+ $(IDIR_FIND)/usr/bin
+
+xargs-install:
+ $(INSTALL_DIR) $(IDIR_XARGS)/usr/bin
+ $(INSTALL_BIN) $(WRKINST)/usr/bin/xargs \
+ $(IDIR_XARGS)/usr/bin
locate-install:
${INSTALL_DIR} ${IDIR_LOCATE}/usr/{bin,libexec}
@@ -35,4 +48,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/findutils/patches/patch-configure_ac b/package/findutils/patches/patch-configure_ac
new file mode 100644
index 000000000..34c03d76f
--- /dev/null
+++ b/package/findutils/patches/patch-configure_ac
@@ -0,0 +1,11 @@
+--- findutils-4.4.2.orig/configure.ac 2009-05-16 17:27:39.000000000 +0200
++++ findutils-4.4.2/configure.ac 2014-03-23 19:39:22.000000000 +0100
+@@ -77,8 +77,6 @@ AC_PROG_CPP
+ dnl for gnulib
+ gl_EARLY
+
+-AM_C_PROTOTYPES
+-
+ AC_PROG_INSTALL
+ AC_PROG_RANLIB
+ dnl AC_PROG_LIBTOOL
diff --git a/package/findutils/patches/patch-gnulib_lib_freadahead_c b/package/findutils/patches/patch-gnulib_lib_freadahead_c
new file mode 100644
index 000000000..d998fbf6c
--- /dev/null
+++ b/package/findutils/patches/patch-gnulib_lib_freadahead_c
@@ -0,0 +1,15 @@
+--- findutils-4.4.2.orig/gnulib/lib/freadahead.c 2009-05-10 23:23:57.000000000 +0200
++++ findutils-4.4.2/gnulib/lib/freadahead.c 2014-03-23 16:27:43.000000000 +0100
+@@ -19,6 +19,7 @@
+ /* Specification. */
+ #include "freadahead.h"
+
++#ifndef HAVE___FREADAHEAD
+ size_t
+ freadahead (FILE *fp)
+ {
+@@ -64,3 +65,4 @@ freadahead (FILE *fp)
+ #error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread on your system, then report this to bug-gnulib."
+ #endif
+ }
++#endif
diff --git a/package/findutils/patches/patch-gnulib_lib_freadahead_h b/package/findutils/patches/patch-gnulib_lib_freadahead_h
new file mode 100644
index 000000000..194232201
--- /dev/null
+++ b/package/findutils/patches/patch-gnulib_lib_freadahead_h
@@ -0,0 +1,24 @@
+--- findutils-4.4.2.orig/gnulib/lib/freadahead.h 2009-05-10 23:23:57.000000000 +0200
++++ findutils-4.4.2/gnulib/lib/freadahead.h 2014-03-23 16:27:43.000000000 +0100
+@@ -29,8 +29,21 @@ extern "C" {
+
+ STREAM must not be wide-character oriented. */
+
++#if HAVE___FREADAHEAD || (defined(__linux__) && !defined(__GLIBC__) && !defined(__UCLIBC__)) /* musl libc */
++
++#ifndef HAVE___FREADAHEAD
++#define HAVE___FREADAHEAD 1
++#endif
++
++# include <stdio_ext.h>
++# define freadahead(stream) __freadahead (stream)
++
++#else
++
+ extern size_t freadahead (FILE *stream);
+
++#endif
++
+ #ifdef __cplusplus
+ }
+ #endif
diff --git a/package/findutils/patches/patch-gnulib_lib_fseeko_c b/package/findutils/patches/patch-gnulib_lib_fseeko_c
new file mode 100644
index 000000000..aba9a1133
--- /dev/null
+++ b/package/findutils/patches/patch-gnulib_lib_fseeko_c
@@ -0,0 +1,18 @@
+--- findutils-4.4.2.orig/gnulib/lib/fseeko.c 2009-05-10 23:25:10.000000000 +0200
++++ findutils-4.4.2/gnulib/lib/fseeko.c 2014-03-23 16:35:34.000000000 +0100
+@@ -94,8 +94,14 @@ rpl_fseeko (FILE *fp, off_t offset, int
+ if ((fp->_Mode & _MWRITE ? fp->_Next == fp->_Buf : fp->_Next == fp->_Rend)
+ && fp->_Rback == fp->_Back + sizeof (fp->_Back)
+ && fp->_Rsave == NULL)
++#elif FUNC_FFLUSH_STDIN < 0 && 200809 <= _POSIX_VERSION
++ /* Cross-compiling to some other system advertising conformance to
++ POSIX.1-2008 or later. Assume fseeko and fflush work as advertised.
++ If this assumption is incorrect, please report the bug to
++ bug-gnulib. */
++ if (0)
+ #else
+- #error "Please port gnulib fseeko.c to your platform! Look at the code in fpurge.c, then report this to bug-gnulib."
++ #error "Please port gnulib fseeko.c to your platform! Look at the code in fseeko.c, then report this to bug-gnulib."
+ #endif
+ {
+ off_t pos = lseek (fileno (fp), offset, whence);
diff --git a/package/findutils/patches/patch-gnulib_m4_fflush_m4 b/package/findutils/patches/patch-gnulib_m4_fflush_m4
new file mode 100644
index 000000000..b3dd6a082
--- /dev/null
+++ b/package/findutils/patches/patch-gnulib_m4_fflush_m4
@@ -0,0 +1,25 @@
+--- findutils-4.4.2.orig/gnulib/m4/fflush.m4 2009-05-10 23:23:57.000000000 +0200
++++ findutils-4.4.2/gnulib/m4/fflush.m4 2014-03-23 18:40:09.000000000 +0100
+@@ -32,12 +32,18 @@ AC_DEFUN([gl_FUNC_FFLUSH],
+ return 4;
+ return !(lseek (fd, 0, SEEK_CUR) == 5);
+ ]])], [gl_cv_func_fflush_stdin=yes], [gl_cv_func_fflush_stdin=no],
+- [dnl Pessimistically assume fflush is broken. This is wrong for
+- dnl at least glibc and cygwin; but lib/fflush.c takes this into account.
+- gl_cv_func_fflush_stdin=no])
++ [gl_cv_func_fflush_stdin=cross])
+ rm conftest.txt
+ ])
+- if test $gl_cv_func_fflush_stdin = no; then
++ case $gl_cv_func_fflush_stdin in
++ yes) gl_func_fflush_stdin=1 ;;
++ no) gl_func_fflush_stdin=0 ;;
++ *) gl_func_fflush_stdin='(-1)' ;;
++ esac
++ AC_DEFINE_UNQUOTED([FUNC_FFLUSH_STDIN], [$gl_func_fflush_stdin],
++ [Define to 1 if fflush is known to work on stdin as per POSIX.1-2008,
++ 0 if fflush is known to not work, -1 if unknown.])
++ if test $gl_cv_func_fflush_stdin != yes; then
+ gl_REPLACE_FFLUSH
+ fi
+ ])
diff --git a/package/fltk/Makefile b/package/fltk/Makefile
index 00795d0b6..d294570b2 100644
--- a/package/fltk/Makefile
+++ b/package/fltk/Makefile
@@ -30,7 +30,7 @@ ifeq ($(ADK_COMPILE_LIBFLTK_WITH_UCLIBCXX),y)
LIBRARIES:=-nodefaultlibs -luClibc++ -lgcc -lgcc_s -lm -lc
endif
-ifeq ($(ADK_TOOLCHAIN_GCC_USE_SSP),y)
+ifeq ($(ADK_TOOLCHAIN_USE_SSP),y)
LIBRARIES+=-lssp -lssp_nonshared
endif
diff --git a/package/fping/Makefile b/package/fping/Makefile
index fc8b845aa..7009b540e 100644
--- a/package/fping/Makefile
+++ b/package/fping/Makefile
@@ -4,15 +4,13 @@
include ${TOPDIR}/rules.mk
PKG_NAME:= fping
-PKG_VERSION:= 2.4b2_to
-PKG_RELEASE:= 1
-PKG_MD5SUM:= d5e8be59e307cef76bc479e1684df705
-PKG_DESCR:= A program to ping hosts in parallel
+PKG_VERSION:= 3.9
+PKG_RELEASE:= 2
+PKG_MD5SUM:= 7ad0313646681c33e975f7b946d8d283
+PKG_DESCR:= program to ping hosts in parallel
PKG_SECTION:= net
-PKG_URL:= http://fping.sourceforge.net/
-PKG_SITES:= http://fping.sourceforge.net/download/
-
-DISTFILES:= ${PKG_NAME}.tar.gz
+PKG_URL:= http://fping.org
+PKG_SITES:= http://fping.org/dist/
include ${TOPDIR}/mk/package.mk
diff --git a/package/freetype/Makefile b/package/freetype/Makefile
index 55fdd98af..e8bcb24ff 100644
--- a/package/freetype/Makefile
+++ b/package/freetype/Makefile
@@ -4,10 +4,10 @@
include ${TOPDIR}/rules.mk
PKG_NAME:= freetype
-PKG_VERSION:= 2.5.1
+PKG_VERSION:= 2.5.3
PKG_RELEASE:= 1
-PKG_MD5SUM:= a359993ad0dc23323c676b04fdb57110
-PKG_DESCR:= A free, high-quality and portable font engine
+PKG_MD5SUM:= cafe9f210e45360279c730d27bf071e9
+PKG_DESCR:= free, high-quality and portable font engine
PKG_SECTION:= libs
PKG_DEPENDS:= zlib
PKG_BUILDDEP:= zlib freetype-host
@@ -27,8 +27,12 @@ $(eval $(call HOST_template,LIBFREETYPE,libfreetype,${PKG_VERSION}-${PKG_RELEASE
$(eval $(call PKG_template,LIBFREETYPE,libfreetype,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
HOST_STYLE:= auto
-HOST_CONFIGURE_ARGS+= --without-png
-CONFIGURE_ARGS+= --without-png
+HOST_CONFIGURE_ARGS+= --with-zlib \
+ --without-png \
+ --without-bzip2
+CONFIGURE_ARGS+= --with-zlib \
+ --without-png \
+ --without-bzip2
libfreetype-install:
${INSTALL_DIR} ${IDIR_LIBFREETYPE}/usr/lib
diff --git a/package/gcc/Makefile b/package/gcc/Makefile
index c0c5f749a..24571fb3e 100644
--- a/package/gcc/Makefile
+++ b/package/gcc/Makefile
@@ -21,7 +21,7 @@ include ${TOPDIR}/mk/package.mk
$(eval $(call PKG_template,GCC,gcc,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
$(eval $(call PKG_template,GXX,g++,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
-CPPFLAGS_FOR_BUILD:= -I$(STAGING_HOST_DIR)/include
+CPPFLAGS_FOR_BUILD:= -I$(STAGING_HOST_DIR)/usr/include
CFLAGS_FOR_BUILD:=
LDFLAGS_FOR_BUILD:=
TARGET_CPPFLAGS:=
@@ -39,12 +39,6 @@ ifeq ($(ADK_TARGET_SYSTEM_QEMU_MIPS64EL),y)
CONFIGURE_ARGS+= --with-abi=$(ADK_TARGET_MIPS_ABI)
endif
-ifeq ($(ADK_TOOLCHAIN_GCC_SJLJ),y)
-CONFIGURE_ARGS+= --enable-sjlj-exceptions
-else
-CONFIGURE_ARGS+= --disable-sjlj-exceptions
-endif
-
ifneq ($(ADK_PACKAGE_GXX),)
CONFIGURE_ARGS+= --enable-languages=c,c++
else
@@ -57,7 +51,6 @@ else
CONFIGURE_ARGS+= --enable-target-optspace
endif
-
CONFIGURE_ENV+= have_sys_sdt_h=no
CONFIGURE_ARGS+= --host=$(GNU_TARGET_NAME) \
--target=$(GNU_TARGET_NAME) \
diff --git a/package/gdb/Makefile b/package/gdb/Makefile
index 9fc0b48fa..e282052e3 100644
--- a/package/gdb/Makefile
+++ b/package/gdb/Makefile
@@ -20,27 +20,28 @@ TARGET_CFLAGS+= -static
CONFIGURE_ARGS+= --enable-static
endif
-TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS))
TARGET_CFLAGS+= ${TARGET_CPPFLAGS} -fPIC
-CONFIGURE_ARGS+= --without-uiout --enable-gdbmi \
- --disable-tui --disable-gdbtk --without-x \
- --without-included-gettext --disable-sim \
- --with-curses --disable-werror \
- --without-auto-load-safe-path \
+CONFIGURE_ARGS+= --without-uiout \
+ --disable-tui \
+ --disable-gdbtk \
+ --without-x \
+ --disable-sim \
+ --disable-werror \
--disable-gdbserver \
- --without-python
+ --without-python \
+ --without-included-gettext \
+ --without-auto-load-safe-path \
+ --with-curses \
+ --enable-gdbmi
+
XAKE_FLAGS+= LDFLAGS='${TARGET_LDFLAGS}'
# disable honour cflags stuff
XAKE_FLAGS+= GCC_HONOUR_COPTS:=s
-post-extract:
- -mv $(STAGING_TARGET_DIR)/usr/lib/libiberty.a $(STAGING_TARGET_DIR)/usr/lib/libiberty.a.bak
-
gdb-install:
${INSTALL_DIR} ${IDIR_GDB}/usr/bin
${INSTALL_BIN} ${WRKINST}/usr/bin/gdb ${IDIR_GDB}/usr/bin/
# shipped libbfd conflicts with system wide one
rm -f ${WRKINST}/usr/lib/libbfd*
- -mv $(STAGING_TARGET_DIR)/usr/lib/libiberty.a.bak $(STAGING_TARGET_DIR)/usr/lib/libiberty.a
include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/gdb/patches/microblaze.patch b/package/gdb/patches/microblaze.patch
new file mode 100644
index 000000000..ce3f9b35b
--- /dev/null
+++ b/package/gdb/patches/microblaze.patch
@@ -0,0 +1,1842 @@
+diff -Nur gdb-7.7.orig/bfd/bfd-in2.h gdb-7.7/bfd/bfd-in2.h
+--- gdb-7.7.orig/bfd/bfd-in2.h 2014-02-06 03:21:29.000000000 +0100
++++ gdb-7.7/bfd/bfd-in2.h 2014-03-26 19:43:36.000000000 +0100
+@@ -5378,6 +5378,11 @@
+ expressions of the form "Symbol Op Symbol" */
+ BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM,
+
++/* This is a 32 bit reloc that stores the 32 bit pc relative
++value in two words (with an imm instruction). No relocation is
++done here - only used for relaxing */
++ BFD_RELOC_MICROBLAZE_32_NONE,
++
+ /* This is a 64 bit reloc that stores the 32 bit pc relative
+ value in two words (with an imm instruction). No relocation is
+ done here - only used for relaxing */
+diff -Nur gdb-7.7.orig/bfd/elf32-microblaze.c gdb-7.7/bfd/elf32-microblaze.c
+--- gdb-7.7.orig/bfd/elf32-microblaze.c 2013-12-08 05:55:47.000000000 +0100
++++ gdb-7.7/bfd/elf32-microblaze.c 2014-03-27 08:30:48.000000000 +0100
+@@ -177,6 +177,20 @@
+ FALSE), /* PC relative offset? */
+
+ /* This reloc does nothing. Used for relaxation. */
++ HOWTO (R_MICROBLAZE_32_NONE, /* Type. */
++ 0, /* Rightshift. */
++ 2, /* Size (0 = byte, 1 = short, 2 = long). */
++ 32, /* Bitsize. */
++ TRUE, /* PC_relative. */
++ 0, /* Bitpos. */
++ complain_overflow_bitfield, /* Complain on overflow. */
++ NULL, /* Special Function. */
++ "R_MICROBLAZE_32_NONE",/* Name. */
++ FALSE, /* Partial Inplace. */
++ 0, /* Source Mask. */
++ 0, /* Dest Mask. */
++ FALSE), /* PC relative offset? */
++
+ HOWTO (R_MICROBLAZE_64_NONE, /* Type. */
+ 0, /* Rightshift. */
+ 2, /* Size (0 = byte, 1 = short, 2 = long). */
+@@ -532,7 +546,10 @@
+ case BFD_RELOC_NONE:
+ microblaze_reloc = R_MICROBLAZE_NONE;
+ break;
+- case BFD_RELOC_MICROBLAZE_64_NONE:
++ case BFD_RELOC_MICROBLAZE_32_NONE:
++ microblaze_reloc = R_MICROBLAZE_32_NONE;
++ break;
++ case BFD_RELOC_MICROBLAZE_64_NONE:
+ microblaze_reloc = R_MICROBLAZE_64_NONE;
+ break;
+ case BFD_RELOC_32:
+@@ -668,6 +685,67 @@
+ return _bfd_elf_is_local_label_name (abfd, name);
+ }
+
++/* Support for core dump NOTE sections. */
++static bfd_boolean
++microblaze_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
++{
++ int offset;
++ unsigned int size;
++
++ switch (note->descsz)
++ {
++ default:
++ return FALSE;
++
++ case 228: /* Linux/MicroBlaze */
++ /* pr_cursig */
++ elf_tdata (abfd)->core->signal = bfd_get_16 (abfd, note->descdata + 12);
++
++ /* pr_pid */
++ elf_tdata (abfd)->core->pid = bfd_get_32 (abfd, note->descdata + 24);
++
++ /* pr_reg */
++ offset = 72;
++ size = 50 * 4;
++
++ break;
++ }
++
++ /* Make a ".reg/999" section. */
++ return _bfd_elfcore_make_pseudosection (abfd, ".reg",
++ size, note->descpos + offset);
++}
++
++static bfd_boolean
++microblaze_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
++{
++ switch (note->descsz)
++ {
++ default:
++ return FALSE;
++
++ case 128: /* Linux/MicroBlaze elf_prpsinfo */
++ elf_tdata (abfd)->core->program
++ = _bfd_elfcore_strndup (abfd, note->descdata + 32, 16);
++ elf_tdata (abfd)->core->command
++ = _bfd_elfcore_strndup (abfd, note->descdata + 48, 80);
++ }
++
++ /* Note that for some reason, a spurious space is tacked
++ onto the end of the args in some (at least one anyway)
++ implementations, so strip it off if it exists. */
++
++ {
++ char *command = elf_tdata (abfd)->core->command;
++ int n = strlen (command);
++
++ if (0 < n && command[n - 1] == ' ')
++ command[n - 1] = '\0';
++ }
++
++ return TRUE;
++}
++
+ /* The microblaze linker (like many others) needs to keep track of
+ the number of relocs that it decides to copy as dynamic relocs in
+ check_relocs for each symbol. This is so that it can later discard
+@@ -1023,7 +1101,7 @@
+ {
+ /* External symbol. */
+ bfd_boolean warned ATTRIBUTE_UNUSED;
+- bfd_boolean ignored ATTRIBUTE_UNUSED;
++ bfd_boolean ignored;
+
+ RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
+ r_symndx, symtab_hdr, sym_hashes,
+@@ -1852,14 +1930,22 @@
+ }
+ break;
+ case R_MICROBLAZE_NONE:
++ case R_MICROBLAZE_32_NONE:
+ {
+ /* This was a PC-relative instruction that was
+ completely resolved. */
+ int sfix, efix;
++ unsigned int val;
+ bfd_vma target_address;
+ target_address = irel->r_addend + irel->r_offset;
+ sfix = calc_fixup (irel->r_offset, 0, sec);
+ efix = calc_fixup (target_address, 0, sec);
++
++ /* Validate the in-band val. */
++ val = bfd_get_32 (abfd, contents + irel->r_offset);
++ if (val != irel->r_addend && ELF32_R_TYPE (irel->r_info) == R_MICROBLAZE_32_NONE) {
++ fprintf(stderr, "%d: CORRUPT relax reloc %x %lx\n", __LINE__, val, irel->r_addend);
++ }
+ irel->r_addend -= (efix - sfix);
+ /* Should use HOWTO. */
+ microblaze_bfd_write_imm_value_32 (abfd, contents + irel->r_offset,
+@@ -1907,6 +1993,49 @@
+ irelscanend = irelocs + o->reloc_count;
+ for (irelscan = irelocs; irelscan < irelscanend; irelscan++)
+ {
++ if (1 && ELF32_R_TYPE (irelscan->r_info) == (int) R_MICROBLAZE_32_NONE)
++ {
++ unsigned int val;
++
++ isym = isymbuf + ELF32_R_SYM (irelscan->r_info);
++
++ /* hax: We only do the following fixup for debug location lists. */
++ if (strcmp(".debug_loc", o->name))
++ continue;
++
++ /* This was a PC-relative instruction that was completely resolved. */
++ if (ocontents == NULL)
++ {
++ if (elf_section_data (o)->this_hdr.contents != NULL)
++ ocontents = elf_section_data (o)->this_hdr.contents;
++ else
++ {
++ /* We always cache the section contents.
++ Perhaps, if info->keep_memory is FALSE, we
++ should free them, if we are permitted to. */
++
++ if (o->rawsize == 0)
++ o->rawsize = o->size;
++ ocontents = (bfd_byte *) bfd_malloc (o->rawsize);
++ if (ocontents == NULL)
++ goto error_return;
++ if (!bfd_get_section_contents (abfd, o, ocontents,
++ (file_ptr) 0,
++ o->rawsize))
++ goto error_return;
++ elf_section_data (o)->this_hdr.contents = ocontents;
++ }
++ }
++
++ val = bfd_get_32 (abfd, ocontents + irelscan->r_offset);
++ if (val != irelscan->r_addend) {
++ fprintf(stderr, "%d: CORRUPT relax reloc! %x %lx\n", __LINE__, val, irelscan->r_addend);
++ }
++
++ irelscan->r_addend -= calc_fixup (irelscan->r_addend, 0, sec);
++ microblaze_bfd_write_imm_value_32 (abfd, ocontents + irelscan->r_offset,
++ irelscan->r_addend);
++ }
+ if (ELF32_R_TYPE (irelscan->r_info) == (int) R_MICROBLAZE_32)
+ {
+ isym = isymbuf + ELF32_R_SYM (irelscan->r_info);
+@@ -1966,7 +2095,7 @@
+ elf_section_data (o)->this_hdr.contents = ocontents;
+ }
+ }
+- irelscan->r_addend -= calc_fixup (irel->r_addend
++ irelscan->r_addend -= calc_fixup (irelscan->r_addend
+ + isym->st_value,
+ 0,
+ sec);
+@@ -3506,4 +3635,7 @@
+ #define elf_backend_size_dynamic_sections microblaze_elf_size_dynamic_sections
+ #define elf_backend_add_symbol_hook microblaze_elf_add_symbol_hook
+
++#define elf_backend_grok_prstatus microblaze_elf_grok_prstatus
++#define elf_backend_grok_psinfo microblaze_elf_grok_psinfo
++
+ #include "elf32-target.h"
+diff -Nur gdb-7.7.orig/bfd/libbfd.h gdb-7.7/bfd/libbfd.h
+--- gdb-7.7.orig/bfd/libbfd.h 2014-02-06 03:21:29.000000000 +0100
++++ gdb-7.7/bfd/libbfd.h 2014-03-26 20:02:00.000000000 +0100
+@@ -2615,6 +2615,7 @@
+ "BFD_RELOC_MICROBLAZE_32_ROSDA",
+ "BFD_RELOC_MICROBLAZE_32_RWSDA",
+ "BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM",
++ "BFD_RELOC_MICROBLAZE_32_NONE",
+ "BFD_RELOC_MICROBLAZE_64_NONE",
+ "BFD_RELOC_MICROBLAZE_64_GOTPC",
+ "BFD_RELOC_MICROBLAZE_64_GOT",
+diff -Nur gdb-7.7.orig/gdb/Makefile.in gdb-7.7/gdb/Makefile.in
+--- gdb-7.7.orig/gdb/Makefile.in 2014-02-06 03:21:29.000000000 +0100
++++ gdb-7.7/gdb/Makefile.in 2014-03-26 20:33:32.000000000 +0100
+@@ -849,7 +849,7 @@
+ annotate.h sim-regno.h dictionary.h dfp.h main.h frame-unwind.h \
+ remote-fileio.h i386-linux-tdep.h vax-tdep.h objc-lang.h \
+ sentinel-frame.h bcache.h symfile.h windows-tdep.h linux-tdep.h \
+-gdb_usleep.h jit.h xml-syscall.h microblaze-tdep.h \
++gdb_usleep.h jit.h xml-syscall.h microblaze-tdep.h microblaze-linux-tdep.h \
+ psymtab.h psympriv.h progspace.h bfin-tdep.h ia64-hpux-tdep.h \
+ amd64-darwin-tdep.h charset-list.h \
+ config/djgpp/langinfo.h config/djgpp/nl_types.h darwin-nat.h \
+@@ -1547,7 +1547,7 @@
+ m68kbsd-nat.c m68kbsd-tdep.c \
+ m68klinux-nat.c m68klinux-tdep.c \
+ m88k-tdep.c m88kbsd-nat.c \
+- microblaze-tdep.c microblaze-linux-tdep.c \
++ microblaze-tdep.c microblaze-linux-nat.c microblaze-linux-tdep.c \
+ mingw-hdep.c \
+ mips-linux-nat.c mips-linux-tdep.c \
+ mips-irix-tdep.c \
+diff -Nur gdb-7.7.orig/gdb/config/microblaze/linux.mh gdb-7.7/gdb/config/microblaze/linux.mh
+--- gdb-7.7.orig/gdb/config/microblaze/linux.mh 1970-01-01 01:00:00.000000000 +0100
++++ gdb-7.7/gdb/config/microblaze/linux.mh 2014-03-24 15:52:56.000000000 +0100
+@@ -0,0 +1,10 @@
++# Host: Microblaze, running Linux
++
++NAT_FILE= config/nm-linux.h
++NATDEPFILES= inf-ptrace.o fork-child.o \
++ microblaze-linux-nat.o proc-service.o linux-thread-db.o \
++ linux-nat.o linux-osdata.o linux-fork.o linux-procfs.o linux-ptrace.o \
++ linux-waitpid.o
++NAT_CDEPS = $(srcdir)/proc-service.list
++
++LOADLIBES = -ldl $(RDYNAMIC)
+diff -Nur gdb-7.7.orig/gdb/configure.host gdb-7.7/gdb/configure.host
+--- gdb-7.7.orig/gdb/configure.host 2013-12-08 05:55:47.000000000 +0100
++++ gdb-7.7/gdb/configure.host 2014-03-26 20:34:44.000000000 +0100
+@@ -59,6 +59,7 @@
+ m68*) gdb_host_cpu=m68k ;;
+ m88*) gdb_host_cpu=m88k ;;
+ mips*) gdb_host_cpu=mips ;;
++microblaze*) gdb_host_cpu=microblaze ;;
+ powerpc* | rs6000) gdb_host_cpu=powerpc ;;
+ sparcv9 | sparc64) gdb_host_cpu=sparc ;;
+ s390*) gdb_host_cpu=s390 ;;
+@@ -133,6 +134,8 @@
+ gdb_host=nbsd ;;
+ mips64*-*-openbsd*) gdb_host=obsd64 ;;
+
++microblaze*-*linux*) gdb_host=linux ;;
++
+ powerpc-*-aix* | rs6000-*-* | powerpc64-*-aix*)
+ gdb_host=aix ;;
+ powerpc*-*-freebsd*) gdb_host=fbsd ;;
+diff -Nur gdb-7.7.orig/gdb/configure.tgt gdb-7.7/gdb/configure.tgt
+--- gdb-7.7.orig/gdb/configure.tgt 2014-02-06 03:21:29.000000000 +0100
++++ gdb-7.7/gdb/configure.tgt 2014-03-26 20:36:23.000000000 +0100
+@@ -340,9 +340,10 @@
+
+ microblaze*-linux-*|microblaze*-*-linux*)
+ # Target: Xilinx MicroBlaze running Linux
+- gdb_target_obs="microblaze-tdep.o microblaze-linux-tdep.o microblaze-rom.o \
++ gdb_target_obs="microblaze-tdep.o microblaze-linux-tdep.o microblaze-rom.o glibc-tdep.o \
+ monitor.o dsrec.o solib-svr4.o symfile-mem.o linux-tdep.o"
+ gdb_sim=../sim/microblaze/libsim.a
++ build_gdbserver=yes
+ ;;
+ microblaze*-*-*)
+ # Target: Xilinx MicroBlaze running standalone
+diff -Nur gdb-7.7.orig/gdb/gdbserver/Makefile.in gdb-7.7/gdb/gdbserver/Makefile.in
+--- gdb-7.7.orig/gdb/gdbserver/Makefile.in 2014-02-06 03:21:29.000000000 +0100
++++ gdb-7.7/gdb/gdbserver/Makefile.in 2014-03-26 20:39:22.000000000 +0100
+@@ -148,6 +148,7 @@
+ $(srcdir)/linux-ia64-low.c $(srcdir)/linux-low.c \
+ $(srcdir)/linux-m32r-low.c \
+ $(srcdir)/linux-m68k-low.c $(srcdir)/linux-mips-low.c \
++ $(srcdir)/linux-microblaze-low.c \
+ $(srcdir)/linux-nios2-low.c \
+ $(srcdir)/linux-ppc-low.c \
+ $(srcdir)/linux-s390-low.c \
+@@ -328,6 +329,7 @@
+ rm -f arm-with-iwmmxt.c
+ rm -f arm-with-vfpv2.c arm-with-vfpv3.c arm-with-neon.c
+ rm -f mips-linux.c mips64-linux.c
++ rm -f microblaze-linux.c
+ rm -f nios2-linux.c
+ rm -f powerpc-32.c powerpc-32l.c powerpc-64l.c powerpc-e500l.c
+ rm -f powerpc-altivec32l.c powerpc-cell32l.c powerpc-vsx32l.c
+@@ -600,6 +602,8 @@
+ $(SHELL) $(regdat_sh) $(srcdir)/../regformats/mips64-linux.dat mips64-linux.c
+ mips64-dsp-linux.c : $(srcdir)/../regformats/mips64-dsp-linux.dat $(regdat_sh)
+ $(SHELL) $(regdat_sh) $(srcdir)/../regformats/mips64-dsp-linux.dat mips64-dsp-linux.c
++microblaze-linux.c : $(srcdir)/../regformats/reg-microblaze.dat $(regdat_sh)
++ $(SHELL) $(regdat_sh) $(srcdir)/../regformats/reg-microblaze.dat microblaze-linux.c
+ nios2-linux.c : $(srcdir)/../regformats/nios2-linux.dat $(regdat_sh)
+ $(SHELL) $(regdat_sh) $(srcdir)/../regformats/nios2-linux.dat nios2-linux.c
+ powerpc-32.c : $(srcdir)/../regformats/rs6000/powerpc-32.dat $(regdat_sh)
+diff -Nur gdb-7.7.orig/gdb/gdbserver/configure.srv gdb-7.7/gdb/gdbserver/configure.srv
+--- gdb-7.7.orig/gdb/gdbserver/configure.srv 2014-01-08 10:23:36.000000000 +0100
++++ gdb-7.7/gdb/gdbserver/configure.srv 2014-03-26 20:40:44.000000000 +0100
+@@ -198,6 +198,13 @@
+ srv_linux_usrregs=yes
+ srv_linux_thread_db=yes
+ ;;
++ microblaze*-*-linux*) srv_regobj=microblaze-linux.o
++ srv_tgtobj="$srv_linux_obj linux-microblaze-low.o"
++ srv_linux_usrregs=yes
++ srv_linux_regsets=yes
++ srv_linux_thread_db=yes
++ ;;
++
+ nios2*-*-linux*) srv_regobj="nios2-linux.o"
+ srv_tgtobj="$srv_linux_obj linux-nios2-low.o"
+ srv_xmlfiles="nios2-linux.xml"
+diff -Nur gdb-7.7.orig/gdb/gdbserver/linux-microblaze-low.c gdb-7.7/gdb/gdbserver/linux-microblaze-low.c
+--- gdb-7.7.orig/gdb/gdbserver/linux-microblaze-low.c 1970-01-01 01:00:00.000000000 +0100
++++ gdb-7.7/gdb/gdbserver/linux-microblaze-low.c 2014-03-26 20:41:13.000000000 +0100
+@@ -0,0 +1,228 @@
++/* GNU/Linux/Microblaze specific low level interface, for the remote server for
++ GDB.
++ Copyright (C) 1995-2013 Free Software Foundation, Inc.
++
++ This file is part of GDB.
++
++ 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 3 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, see <http://www.gnu.org/licenses/>. */
++
++#include "server.h"
++#include "linux-low.h"
++
++#include <asm/ptrace.h>
++#include <sys/procfs.h>
++#include <sys/ptrace.h>
++
++#include "gdb_proc_service.h"
++
++static int microblaze_regmap[] =
++ {PT_GPR(0), PT_GPR(1), PT_GPR(2), PT_GPR(3),
++ PT_GPR(4), PT_GPR(5), PT_GPR(6), PT_GPR(7),
++ PT_GPR(8), PT_GPR(9), PT_GPR(10), PT_GPR(11),
++ PT_GPR(12), PT_GPR(13), PT_GPR(14), PT_GPR(15),
++ PT_GPR(16), PT_GPR(17), PT_GPR(18), PT_GPR(19),
++ PT_GPR(20), PT_GPR(21), PT_GPR(22), PT_GPR(23),
++ PT_GPR(24), PT_GPR(25), PT_GPR(26), PT_GPR(27),
++ PT_GPR(28), PT_GPR(29), PT_GPR(30), PT_GPR(31),
++ PT_PC, PT_MSR, PT_EAR, PT_ESR,
++ PT_FSR
++ };
++
++#define microblaze_num_regs (sizeof microblaze_regmap / sizeof microblaze_regmap[0])
++
++/* Defined in auto-generated file microblaze-linux.c. */
++void init_registers_microblaze (void);
++extern const struct target_desc *tdesc_microblaze;
++
++static int
++microblaze_cannot_store_register (int regno)
++{
++ if (microblaze_regmap[regno] == -1 || regno == 0)
++ return 1;
++
++ return 0;
++}
++
++static int
++microblaze_cannot_fetch_register (int regno)
++{
++ return 0;
++}
++
++static CORE_ADDR
++microblaze_get_pc (struct regcache *regcache)
++{
++ unsigned long pc;
++
++ collect_register_by_name (regcache, "pc", &pc);
++ return (CORE_ADDR) pc;
++}
++
++static void
++microblaze_set_pc (struct regcache *regcache, CORE_ADDR pc)
++{
++ unsigned long newpc = pc;
++
++ supply_register_by_name (regcache, "pc", &newpc);
++}
++
++/* dbtrap insn */
++/* brki r16, 0x18; */
++static const unsigned long microblaze_breakpoint = 0xba0c0018;
++#define microblaze_breakpoint_len 4
++
++static int
++microblaze_breakpoint_at (CORE_ADDR where)
++{
++ unsigned long insn;
++
++ (*the_target->read_memory) (where, (unsigned char *) &insn, 4);
++ if (insn == microblaze_breakpoint)
++ return 1;
++ /* If necessary, recognize more trap instructions here. GDB only uses the
++ one. */
++ return 0;
++}
++
++static CORE_ADDR
++microblaze_reinsert_addr (struct regcache *regcache)
++{
++ unsigned long pc;
++ collect_register_by_name (regcache, "r15", &pc);
++ return pc;
++}
++
++#ifdef HAVE_PTRACE_GETREGS
++
++static void
++microblaze_collect_ptrace_register (struct regcache *regcache, int regno, char *buf)
++{
++ int size = register_size (regcache->tdesc, regno);
++
++ memset (buf, 0, sizeof (long));
++
++ if (size < sizeof (long))
++ collect_register (regcache, regno, buf + sizeof (long) - size);
++ else
++ collect_register (regcache, regno, buf);
++}
++
++static void
++microblaze_supply_ptrace_register (struct regcache *regcache,
++ int regno, const char *buf)
++{
++ int size = register_size (regcache->tdesc, regno);
++
++ if (regno == 0) {
++ unsigned long regbuf_0 = 0;
++ /* clobbering r0 so that it is always 0 as enforced by hardware */
++ supply_register (regcache, regno, (const char*)&regbuf_0);
++ } else {
++ if (size < sizeof (long))
++ supply_register (regcache, regno, buf + sizeof (long) - size);
++ else
++ supply_register (regcache, regno, buf);
++ }
++}
++
++/* Provide only a fill function for the general register set. ps_lgetregs
++ will use this for NPTL support. */
++
++static void microblaze_fill_gregset (struct regcache *regcache, void *buf)
++{
++ int i;
++
++ for (i = 0; i < 32; i++)
++ microblaze_collect_ptrace_register (regcache, i, (char *) buf + microblaze_regmap[i]);
++}
++
++static void
++microblaze_store_gregset (struct regcache *regcache, const void *buf)
++{
++ int i;
++
++ for (i = 0; i < 32; i++)
++ supply_register (regcache, i, (char *) buf + microblaze_regmap[i]);
++}
++
++#endif /* HAVE_PTRACE_GETREGS */
++
++static struct regset_info microblaze_regsets[] = {
++#ifdef HAVE_PTRACE_GETREGS
++ { PTRACE_GETREGS, PTRACE_SETREGS, 0, sizeof (elf_gregset_t), GENERAL_REGS, microblaze_fill_gregset, microblaze_store_gregset },
++ { 0, 0, 0, -1, -1, NULL, NULL },
++#endif /* HAVE_PTRACE_GETREGS */
++ { 0, 0, 0, -1, -1, NULL, NULL }
++};
++
++static struct regsets_info microblaze_regsets_info =
++ {
++ microblaze_regsets, /* regsets */
++ 0, /* num_regsets */
++ NULL, /* disabled_regsets */
++ };
++
++static struct usrregs_info microblaze_usrregs_info =
++ {
++ microblaze_num_regs,
++ microblaze_regmap,
++ };
++
++static struct regs_info regs_info =
++ {
++ NULL, /* regset_bitmap */
++ &microblaze_usrregs_info,
++ &microblaze_regsets_info
++ };
++
++static const struct regs_info *
++microblaze_regs_info (void)
++{
++ return &regs_info;
++}
++
++static void
++microblaze_arch_setup (void)
++{
++ current_process ()->tdesc = tdesc_microblaze;
++}
++
++struct linux_target_ops the_low_target = {
++ microblaze_arch_setup,
++ microblaze_regs_info,
++ microblaze_cannot_fetch_register,
++ microblaze_cannot_store_register,
++ NULL, /* fetch_register */
++ microblaze_get_pc,
++ microblaze_set_pc,
++ (const unsigned char *) &microblaze_breakpoint,
++ microblaze_breakpoint_len,
++ microblaze_reinsert_addr,
++ 0,
++ microblaze_breakpoint_at,
++ NULL,
++ NULL,
++ NULL,
++ NULL,
++ microblaze_collect_ptrace_register,
++ microblaze_supply_ptrace_register,
++};
++
++void
++initialize_low_arch (void)
++{
++ init_registers_microblaze ();
++
++ initialize_regsets_info (&microblaze_regsets_info);
++}
+\ No newline at end of file
+diff -Nur gdb-7.7.orig/gdb/microblaze-linux-nat.c gdb-7.7/gdb/microblaze-linux-nat.c
+--- gdb-7.7.orig/gdb/microblaze-linux-nat.c 1970-01-01 01:00:00.000000000 +0100
++++ gdb-7.7/gdb/microblaze-linux-nat.c 2014-03-27 09:51:56.000000000 +0100
+@@ -0,0 +1,430 @@
++/* Microblaze GNU/Linux native support.
++
++ Copyright (C) 1988-1989, 1991-1992, 1994, 1996, 2000-2012 Free
++ Software Foundation, Inc.
++
++ This file is part of GDB.
++
++ 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 3 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, see <http://www.gnu.org/licenses/>. */
++
++#include "defs.h"
++#include "arch-utils.h"
++#include "dis-asm.h"
++#include "frame.h"
++#include "trad-frame.h"
++#include "symtab.h"
++#include "value.h"
++#include "gdbcmd.h"
++#include "breakpoint.h"
++#include "inferior.h"
++#include "regcache.h"
++#include "target.h"
++#include "frame.h"
++#include "frame-base.h"
++#include "frame-unwind.h"
++#include "dwarf2-frame.h"
++#include "osabi.h"
++
++#include "gdb_assert.h"
++#include "target-descriptions.h"
++#include "opcodes/microblaze-opcm.h"
++#include "opcodes/microblaze-dis.h"
++
++#include "linux-nat.h"
++#include "target-descriptions.h"
++
++#include <sys/user.h>
++#include <sys/utsname.h>
++#include <sys/procfs.h>
++#include <sys/ptrace.h>
++
++/* Prototypes for supply_gregset etc. */
++#include "gregset.h"
++
++#include "microblaze-tdep.h"
++
++#include <elf/common.h>
++#include "auxv.h"
++
++/* Defines ps_err_e, struct ps_prochandle. */
++#include "gdb_proc_service.h"
++
++/* On GNU/Linux, threads are implemented as pseudo-processes, in which
++ case we may be tracing more than one process at a time. In that
++ case, inferior_ptid will contain the main process ID and the
++ individual thread (process) ID. get_thread_id () is used to get
++ the thread id if it's available, and the process id otherwise. */
++
++int
++get_thread_id (ptid_t ptid)
++{
++ int tid = ptid_get_lwp (ptid);
++ if (0 == tid)
++ tid = ptid_get_pid (ptid);
++ return tid;
++}
++
++#define GET_THREAD_ID(PTID) get_thread_id (PTID)
++
++/* Non-zero if our kernel may support the PTRACE_GETREGS and
++ PTRACE_SETREGS requests, for reading and writing the
++ general-purpose registers. Zero if we've tried one of
++ them and gotten an error. */
++int have_ptrace_getsetregs = 1;
++
++static int
++microblaze_register_u_addr (struct gdbarch *gdbarch, int regno)
++{
++ int u_addr = -1;
++ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
++ /* NOTE: cagney/2003-11-25: This is the word size used by the ptrace
++ interface, and not the wordsize of the program's ABI. */
++ int wordsize = sizeof (long);
++
++ /* General purpose registers occupy 1 slot each in the buffer. */
++ if (regno >= MICROBLAZE_R0_REGNUM
++ && regno <= MICROBLAZE_FSR_REGNUM)
++ u_addr = (regno * wordsize);
++
++ return u_addr;
++}
++
++
++static void
++fetch_register (struct regcache *regcache, int tid, int regno)
++{
++ struct gdbarch *gdbarch = get_regcache_arch (regcache);
++ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
++ /* This isn't really an address. But ptrace thinks of it as one. */
++ CORE_ADDR regaddr = microblaze_register_u_addr (gdbarch, regno);
++ int bytes_transferred;
++ unsigned int offset; /* Offset of registers within the u area. */
++ char buf[MAX_REGISTER_SIZE];
++
++ if (regaddr == -1)
++ {
++ memset (buf, '\0', register_size (gdbarch, regno)); /* Supply zeroes */
++ regcache_raw_supply (regcache, regno, buf);
++ return;
++ }
++
++ /* Read the raw register using sizeof(long) sized chunks. On a
++ 32-bit platform, 64-bit floating-point registers will require two
++ transfers. */
++ for (bytes_transferred = 0;
++ bytes_transferred < register_size (gdbarch, regno);
++ bytes_transferred += sizeof (long))
++ {
++ long l;
++
++ errno = 0;
++ l = ptrace (PTRACE_PEEKUSER, tid, (PTRACE_TYPE_ARG3) regaddr, 0);
++ regaddr += sizeof (long);
++ if (errno != 0)
++ {
++ char message[128];
++ sprintf (message, "reading register %s (#%d)",
++ gdbarch_register_name (gdbarch, regno), regno);
++ perror_with_name (message);
++ }
++ memcpy (&buf[bytes_transferred], &l, sizeof (l));
++ }
++
++ /* Now supply the register. Keep in mind that the regcache's idea
++ of the register's size may not be a multiple of sizeof
++ (long). */
++ if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_LITTLE)
++ {
++ /* Little-endian values are always found at the left end of the
++ bytes transferred. */
++ regcache_raw_supply (regcache, regno, buf);
++ }
++ else if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
++ {
++ /* Big-endian values are found at the right end of the bytes
++ transferred. */
++ size_t padding = (bytes_transferred - register_size (gdbarch, regno));
++ regcache_raw_supply (regcache, regno, buf + padding);
++ }
++ else
++ internal_error (__FILE__, __LINE__,
++ _("fetch_register: unexpected byte order: %d"),
++ gdbarch_byte_order (gdbarch));
++}
++
++/* This function actually issues the request to ptrace, telling
++ it to get all general-purpose registers and put them into the
++ specified regset.
++
++ If the ptrace request does not exist, this function returns 0
++ and properly sets the have_ptrace_* flag. If the request fails,
++ this function calls perror_with_name. Otherwise, if the request
++ succeeds, then the regcache gets filled and 1 is returned. */
++static int
++fetch_all_gp_regs (struct regcache *regcache, int tid)
++{
++ struct gdbarch *gdbarch = get_regcache_arch (regcache);
++ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
++ gdb_gregset_t gregset;
++
++ if (ptrace (PTRACE_GETREGS, tid, 0, (void *) &gregset) < 0)
++ {
++ if (errno == EIO)
++ {
++ have_ptrace_getsetregs = 0;
++ return 0;
++ }
++ perror_with_name (_("Couldn't get general-purpose registers."));
++ }
++
++ supply_gregset (regcache, (const gdb_gregset_t *) &gregset);
++
++ return 1;
++}
++
++
++/* This is a wrapper for the fetch_all_gp_regs function. It is
++ responsible for verifying if this target has the ptrace request
++ that can be used to fetch all general-purpose registers at one
++ shot. If it doesn't, then we should fetch them using the
++ old-fashioned way, which is to iterate over the registers and
++ request them one by one. */
++static void
++fetch_gp_regs (struct regcache *regcache, int tid)
++{
++ struct gdbarch *gdbarch = get_regcache_arch (regcache);
++ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
++ int i;
++
++ if (have_ptrace_getsetregs)
++ if (fetch_all_gp_regs (regcache, tid))
++ return;
++
++ /* If we've hit this point, it doesn't really matter which
++ architecture we are using. We just need to read the
++ registers in the "old-fashioned way". */
++ for (i = MICROBLAZE_R0_REGNUM; i <= MICROBLAZE_FSR_REGNUM; i++)
++ fetch_register (regcache, tid, i);
++}
++
++
++static void
++store_register (const struct regcache *regcache, int tid, int regno)
++{
++ struct gdbarch *gdbarch = get_regcache_arch (regcache);
++ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
++ /* This isn't really an address. But ptrace thinks of it as one. */
++ CORE_ADDR regaddr = microblaze_register_u_addr (gdbarch, regno);
++ int i;
++ size_t bytes_to_transfer;
++ char buf[MAX_REGISTER_SIZE];
++
++ if (regaddr == -1)
++ return;
++
++ /* First collect the register. Keep in mind that the regcache's
++ idea of the register's size may not be a multiple of sizeof
++ (long). */
++ memset (buf, 0, sizeof buf);
++ bytes_to_transfer = align_up (register_size (gdbarch, regno), sizeof (long));
++ if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_LITTLE)
++ {
++ /* Little-endian values always sit at the left end of the buffer. */
++ regcache_raw_collect (regcache, regno, buf);
++ }
++ else if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
++ {
++ /* Big-endian values sit at the right end of the buffer. */
++ size_t padding = (bytes_to_transfer - register_size (gdbarch, regno));
++ regcache_raw_collect (regcache, regno, buf + padding);
++ }
++
++ for (i = 0; i < bytes_to_transfer; i += sizeof (long))
++ {
++ long l;
++
++ memcpy (&l, &buf[i], sizeof (l));
++ errno = 0;
++ ptrace (PTRACE_POKEUSER, tid, (PTRACE_TYPE_ARG3) regaddr, l);
++ regaddr += sizeof (long);
++
++ if (errno != 0)
++ {
++ char message[128];
++ sprintf (message, "writing register %s (#%d)",
++ gdbarch_register_name (gdbarch, regno), regno);
++ perror_with_name (message);
++ }
++ }
++}
++
++/* This function actually issues the request to ptrace, telling
++ it to store all general-purpose registers present in the specified
++ regset.
++
++ If the ptrace request does not exist, this function returns 0
++ and properly sets the have_ptrace_* flag. If the request fails,
++ this function calls perror_with_name. Otherwise, if the request
++ succeeds, then the regcache is stored and 1 is returned. */
++static int
++store_all_gp_regs (const struct regcache *regcache, int tid, int regno)
++{
++ struct gdbarch *gdbarch = get_regcache_arch (regcache);
++ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
++ gdb_gregset_t gregset;
++
++ if (ptrace (PTRACE_GETREGS, tid, 0, (void *) &gregset) < 0)
++ {
++ if (errno == EIO)
++ {
++ have_ptrace_getsetregs = 0;
++ return 0;
++ }
++ perror_with_name (_("Couldn't get general-purpose registers."));
++ }
++
++ fill_gregset (regcache, &gregset, regno);
++
++ if (ptrace (PTRACE_SETREGS, tid, 0, (void *) &gregset) < 0)
++ {
++ if (errno == EIO)
++ {
++ have_ptrace_getsetregs = 0;
++ return 0;
++ }
++ perror_with_name (_("Couldn't set general-purpose registers."));
++ }
++
++ return 1;
++}
++
++/* This is a wrapper for the store_all_gp_regs function. It is
++ responsible for verifying if this target has the ptrace request
++ that can be used to store all general-purpose registers at one
++ shot. If it doesn't, then we should store them using the
++ old-fashioned way, which is to iterate over the registers and
++ store them one by one. */
++static void
++store_gp_regs (const struct regcache *regcache, int tid, int regno)
++{
++ struct gdbarch *gdbarch = get_regcache_arch (regcache);
++ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
++ int i;
++
++ if (have_ptrace_getsetregs)
++ if (store_all_gp_regs (regcache, tid, regno))
++ return;
++
++ /* If we hit this point, it doesn't really matter which
++ architecture we are using. We just need to store the
++ registers in the "old-fashioned way". */
++ for (i = MICROBLAZE_R0_REGNUM; i <= MICROBLAZE_FSR_REGNUM; i++)
++ store_register (regcache, tid, i);
++}
++
++
++/* Fetch registers from the child process. Fetch all registers if
++ regno == -1, otherwise fetch all general registers or all floating
++ point registers depending upon the value of regno. */
++
++static void
++microblaze_linux_fetch_inferior_registers (struct target_ops *ops,
++ struct regcache *regcache, int regno)
++{
++ /* Get the thread id for the ptrace call. */
++ int tid = GET_THREAD_ID (inferior_ptid);
++
++ if (regno == -1)
++ fetch_gp_regs (regcache, tid);
++ else
++ fetch_register (regcache, tid, regno);
++}
++
++/* Store registers back into the inferior. Store all registers if
++ regno == -1, otherwise store all general registers or all floating
++ point registers depending upon the value of regno. */
++
++static void
++microblaze_linux_store_inferior_registers (struct target_ops *ops,
++ struct regcache *regcache, int regno)
++{
++ /* Get the thread id for the ptrace call. */
++ int tid = GET_THREAD_ID (inferior_ptid);
++
++ if (regno >= 0)
++ store_register (regcache, tid, regno);
++ else
++ store_gp_regs (regcache, tid, -1);
++}
++
++/* Wrapper functions for the standard regset handling, used by
++ thread debugging. */
++
++void
++fill_gregset (const struct regcache *regcache,
++ gdb_gregset_t *gregsetp, int regno)
++{
++ microblaze_collect_gregset (NULL, regcache, regno, gregsetp);
++}
++
++void
++supply_gregset (struct regcache *regcache, const gdb_gregset_t *gregsetp)
++{
++ microblaze_supply_gregset (NULL, regcache, -1, gregsetp);
++}
++
++void
++fill_fpregset (const struct regcache *regcache,
++ gdb_fpregset_t *fpregsetp, int regno)
++{
++ /* FIXME. */
++}
++
++void
++supply_fpregset (struct regcache *regcache, const gdb_fpregset_t *fpregsetp)
++{
++ /* FIXME. */
++}
++
++static const struct target_desc *
++microblaze_linux_read_description (struct target_ops *ops)
++{
++ CORE_ADDR microblaze_hwcap = 0;
++
++ if (target_auxv_search (ops, AT_HWCAP, &microblaze_hwcap) != 1)
++ return NULL;
++
++ return NULL;
++}
++
++
++void _initialize_microblaze_linux_nat (void);
++
++void
++_initialize_microblaze_linux_nat (void)
++{
++ struct target_ops *t;
++
++ /* Fill in the generic GNU/Linux methods. */
++ t = linux_target ();
++
++ /* Add our register access methods. */
++ t->to_fetch_registers = microblaze_linux_fetch_inferior_registers;
++ t->to_store_registers = microblaze_linux_store_inferior_registers;
++
++ t->to_read_description = microblaze_linux_read_description;
++
++ /* Register the target. */
++ linux_nat_add_target (t);
++}
+diff -Nur gdb-7.7.orig/gdb/microblaze-linux-tdep.c gdb-7.7/gdb/microblaze-linux-tdep.c
+--- gdb-7.7.orig/gdb/microblaze-linux-tdep.c 2014-01-08 10:23:36.000000000 +0100
++++ gdb-7.7/gdb/microblaze-linux-tdep.c 2014-03-26 10:11:41.000000000 +0100
+@@ -1,6 +1,6 @@
+ /* Target-dependent code for Xilinx MicroBlaze.
+
+- Copyright (C) 2009-2014 Free Software Foundation, Inc.
++ Copyright (C) 2009-2013 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+@@ -32,11 +32,28 @@
+ #include "regset.h"
+ #include "solib-svr4.h"
+ #include "microblaze-tdep.h"
++#include "glibc-tdep.h"
+ #include "trad-frame.h"
+ #include "frame-unwind.h"
+ #include "tramp-frame.h"
+ #include "linux-tdep.h"
+
++static int microblaze_debug_flag = 0;
++
++static void
++microblaze_debug (const char *fmt, ...)
++{
++ if (microblaze_debug_flag)
++ {
++ va_list args;
++
++ va_start (args, fmt);
++ printf_unfiltered ("MICROBLAZE LINUX: ");
++ vprintf_unfiltered (fmt, args);
++ va_end (args);
++ }
++}
++
+ static int
+ microblaze_linux_memory_remove_breakpoint (struct gdbarch *gdbarch,
+ struct bp_target_info *bp_tgt)
+@@ -46,20 +63,27 @@
+ int val;
+ int bplen;
+ gdb_byte old_contents[BREAKPOINT_MAX];
++ struct cleanup *cleanup;
+
+ /* Determine appropriate breakpoint contents and size for this address. */
+ bp = gdbarch_breakpoint_from_pc (gdbarch, &addr, &bplen);
+ if (bp == NULL)
+ error (_("Software breakpoints not implemented for this target."));
+
++ /* Make sure we see the memory breakpoints. */
++ cleanup = make_show_memory_breakpoints_cleanup (1);
+ val = target_read_memory (addr, old_contents, bplen);
+
+ /* If our breakpoint is no longer at the address, this means that the
+ program modified the code on us, so it is wrong to put back the
+ old value. */
+ if (val == 0 && memcmp (bp, old_contents, bplen) == 0)
+- val = target_write_raw_memory (addr, bp_tgt->shadow_contents, bplen);
++ {
++ val = target_write_raw_memory (addr, bp_tgt->shadow_contents, bplen);
++ microblaze_debug ("microblaze_linux_memory_remove_breakpoint writing back to memory at addr 0x%lx\n", addr);
++ }
+
++ do_cleanups (cleanup);
+ return val;
+ }
+
+@@ -116,6 +140,43 @@
+ microblaze_linux_sighandler_cache_init
+ };
+
++const struct microblaze_gregset microblaze_linux_core_gregset;
++
++static void
++microblaze_linux_supply_core_gregset (const struct regset *regset,
++ struct regcache *regcache,
++ int regnum, const void *gregs, size_t len)
++{
++ microblaze_supply_gregset (&microblaze_linux_core_gregset, regcache,
++ regnum, gregs);
++}
++
++static void
++microblaze_linux_collect_core_gregset (const struct regset *regset,
++ const struct regcache *regcache,
++ int regnum, void *gregs, size_t len)
++{
++ microblaze_collect_gregset (&microblaze_linux_core_gregset, regcache,
++ regnum, gregs);
++}
++
++static void
++microblaze_linux_supply_core_fpregset (const struct regset *regset,
++ struct regcache *regcache,
++ int regnum, const void *fpregs, size_t len)
++{
++ /* FIXME. */
++ microblaze_supply_fpregset (regcache, regnum, fpregs);
++}
++
++static void
++microblaze_linux_collect_core_fpregset (const struct regset *regset,
++ const struct regcache *regcache,
++ int regnum, void *fpregs, size_t len)
++{
++ /* FIXME. */
++ microblaze_collect_fpregset (regcache, regnum, fpregs);
++}
+
+ static void
+ microblaze_linux_init_abi (struct gdbarch_info info,
+@@ -123,6 +184,10 @@
+ {
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
++ tdep->gregset = regset_alloc (gdbarch, microblaze_linux_supply_core_gregset,
++ microblaze_linux_collect_core_gregset);
++ tdep->sizeof_gregset = 200;
++
+ linux_init_abi (info, gdbarch);
+
+ set_gdbarch_memory_remove_breakpoint (gdbarch,
+@@ -135,6 +200,25 @@
+ /* Trampolines. */
+ tramp_frame_prepend_unwinder (gdbarch,
+ &microblaze_linux_sighandler_tramp_frame);
++
++ /* BFD target for core files. */
++ if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
++ set_gdbarch_gcore_bfd_target (gdbarch, "elf32-microblaze");
++ else
++ set_gdbarch_gcore_bfd_target (gdbarch, "elf32-microblazeel");
++
++
++ /* Shared library handling. */
++ set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
++ set_gdbarch_skip_solib_resolver (gdbarch, glibc_skip_solib_resolver);
++
++ set_gdbarch_regset_from_core_section (gdbarch,
++ microblaze_regset_from_core_section);
++
++ /* Enable TLS support. */
++ set_gdbarch_fetch_tls_load_module_address (gdbarch,
++ svr4_fetch_objfile_link_map);
++
+ }
+
+ /* -Wmissing-prototypes */
+diff -Nur gdb-7.7.orig/gdb/microblaze-rom.c gdb-7.7/gdb/microblaze-rom.c
+--- gdb-7.7.orig/gdb/microblaze-rom.c 2014-01-08 10:23:36.000000000 +0100
++++ gdb-7.7/gdb/microblaze-rom.c 2014-03-27 08:56:48.000000000 +0100
+@@ -1,6 +1,6 @@
+ /* Remote debugging interface to Xilinx MicroBlaze.
+
+- Copyright (C) 2009-2014 Free Software Foundation, Inc.
++ Copyright (C) 2009-2013 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+@@ -21,7 +21,6 @@
+ #include "gdbcore.h"
+ #include "target.h"
+ #include "monitor.h"
+-#include <string.h>
+ #include "serial.h"
+ #include "regcache.h"
+
+diff -Nur gdb-7.7.orig/gdb/microblaze-tdep.c gdb-7.7/gdb/microblaze-tdep.c
+--- gdb-7.7.orig/gdb/microblaze-tdep.c 2014-02-06 03:21:29.000000000 +0100
++++ gdb-7.7/gdb/microblaze-tdep.c 2014-03-27 08:46:21.000000000 +0100
+@@ -1,6 +1,6 @@
+ /* Target-dependent code for Xilinx MicroBlaze.
+
+- Copyright (C) 2009-2014 Free Software Foundation, Inc.
++ Copyright (C) 2009-2013 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+@@ -29,13 +29,13 @@
+ #include "inferior.h"
+ #include "regcache.h"
+ #include "target.h"
++#include "frame.h"
+ #include "frame-base.h"
+ #include "frame-unwind.h"
+ #include "dwarf2-frame.h"
+ #include "osabi.h"
+
+ #include "gdb_assert.h"
+-#include <string.h>
+ #include "target-descriptions.h"
+ #include "opcodes/microblaze-opcm.h"
+ #include "opcodes/microblaze-dis.h"
+@@ -73,7 +73,8 @@
+ "rpc", "rmsr", "rear", "resr", "rfsr", "rbtr",
+ "rpvr0", "rpvr1", "rpvr2", "rpvr3", "rpvr4", "rpvr5", "rpvr6",
+ "rpvr7", "rpvr8", "rpvr9", "rpvr10", "rpvr11",
+- "redr", "rpid", "rzpr", "rtlbx", "rtlbsx", "rtlblo", "rtlbhi"
++ "redr", "rpid", "rzpr", "rtlbx", "rtlbsx", "rtlblo", "rtlbhi",
++ "rslr", "rshr"
+ };
+
+ #define MICROBLAZE_NUM_REGS ARRAY_SIZE (microblaze_register_names)
+@@ -145,6 +146,14 @@
+ return sp;
+ }
+
++static CORE_ADDR
++microblaze_store_arguments (struct regcache *regcache, int nargs,
++ struct value **args, CORE_ADDR sp,
++ int struct_return, CORE_ADDR struct_addr)
++{
++ error (_("store_arguments not implemented"));
++ return sp;
++}
+
+ static CORE_ADDR
+ microblaze_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
+@@ -156,14 +165,52 @@
+ return sp;
+ }
+
++static int
++microblaze_linux_memory_remove_breakpoint (struct gdbarch *gdbarch,
++ struct bp_target_info *bp_tgt)
++{
++ CORE_ADDR addr = bp_tgt->placed_address;
++ const unsigned char *bp;
++ int val;
++ int bplen;
++ gdb_byte old_contents[BREAKPOINT_MAX];
++ struct cleanup *cleanup;
++
++ /* Determine appropriate breakpoint contents and size for this address. */
++ bp = gdbarch_breakpoint_from_pc (gdbarch, &addr, &bplen);
++ if (bp == NULL)
++ error (_("Software breakpoints not implemented for this target."));
++
++ /* Make sure we see the memory breakpoints. */
++ cleanup = make_show_memory_breakpoints_cleanup (1);
++ val = target_read_memory (addr, old_contents, bplen);
++
++ /* If our breakpoint is no longer at the address, this means that the
++ program modified the code on us, so it is wrong to put back the
++ old value. */
++ if (val == 0 && memcmp (bp, old_contents, bplen) == 0)
++ {
++ val = target_write_raw_memory (addr, bp_tgt->shadow_contents, bplen);
++ microblaze_debug ("microblaze_linux_memory_remove_breakpoint writing back to memory at addr 0x%lx\n", addr);
++ }
++
++ do_cleanups (cleanup);
++ return val;
++}
++
+ static const gdb_byte *
+ microblaze_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pc,
+ int *len)
+ {
++ enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+ static gdb_byte break_insn[] = MICROBLAZE_BREAKPOINT;
++ static gdb_byte break_insn_le[] = MICROBLAZE_BREAKPOINT_LE;
+
+ *len = sizeof (break_insn);
+- return break_insn;
++ if (byte_order == BFD_ENDIAN_BIG)
++ return break_insn;
++ else
++ return break_insn_le;
+ }
+
+ /* Allocate and initialize a frame cache. */
+@@ -178,6 +225,7 @@
+ /* Base address. */
+ cache->base = 0;
+ cache->pc = 0;
++ cache->saved_sp = 0;
+
+ /* Frameless until proven otherwise. */
+ cache->frameless_p = 1;
+@@ -234,6 +282,8 @@
+ int flags = 0;
+ int save_hidden_pointer_found = 0;
+ int non_stack_instruction_found = 0;
++ int n_insns;
++ unsigned int *insn_block;
+
+ /* Find the start of this function. */
+ find_pc_partial_function (pc, &name, &func_addr, &func_end);
+@@ -273,11 +323,18 @@
+ name, paddress (gdbarch, func_addr),
+ paddress (gdbarch, stop));
+
++/* Do a block read to minimize the transaction with the Debug Agent */
++ n_insns = (stop == func_addr) ? 1 : ((stop - func_addr) / INST_WORD_SIZE);
++ insn_block = calloc(n_insns, sizeof(unsigned long));
++
++ target_read_memory (func_addr, (void*) insn_block, n_insns * INST_WORD_SIZE );
++
+ for (addr = func_addr; addr < stop; addr += INST_WORD_SIZE)
+ {
+ insn = microblaze_fetch_instruction (addr);
++ //insn = insn_block[(addr - func_addr) / INST_WORD_SIZE];
+ op = microblaze_decode_insn (insn, &rd, &ra, &rb, &imm);
+- microblaze_debug ("%s %08lx\n", paddress (gdbarch, pc), insn);
++ microblaze_debug ("%s %08lx op=%x r%d r%d imm=%d\n", paddress (gdbarch, addr), insn, op, rd, ra, imm);
+
+ /* This code is very sensitive to what functions are present in the
+ prologue. It assumes that the (addi, addik, swi, sw) can be the
+@@ -291,6 +348,7 @@
+ cache->frameless_p = 0; /* Frame found. */
+ save_hidden_pointer_found = 0;
+ non_stack_instruction_found = 0;
++ cache->register_offsets[rd] = -imm;
+ continue;
+ }
+ else if (IS_SPILL_SP(op, rd, ra))
+@@ -401,8 +459,8 @@
+ part of the prologue. */
+ if (save_hidden_pointer_found)
+ prologue_end_addr -= INST_WORD_SIZE;
+-
+- return prologue_end_addr;
++ free(insn_block);
++ return prologue_end_addr;
+ }
+
+ static CORE_ADDR
+@@ -452,6 +510,7 @@
+ return start_pc;
+ }
+
++enum { REG_UNAVAIL = (CORE_ADDR) -1 };
+ /* Normal frames. */
+
+ static struct microblaze_frame_cache *
+@@ -459,7 +518,7 @@
+ {
+ struct microblaze_frame_cache *cache;
+ struct gdbarch *gdbarch = get_frame_arch (next_frame);
+- CORE_ADDR func;
++ CORE_ADDR current_pc;
+ int rn;
+
+ if (*this_cache)
+@@ -473,9 +532,18 @@
+ for (rn = 0; rn < gdbarch_num_regs (gdbarch); rn++)
+ cache->register_offsets[rn] = -1;
+
+- func = get_frame_func (next_frame);
++ cache->pc = get_frame_func (next_frame);
++ current_pc = get_frame_pc (next_frame);
++
++ if (cache->pc)
++ microblaze_analyze_prologue (gdbarch, cache->pc, current_pc,
++ cache);
+
+- cache->pc = get_frame_address_in_block (next_frame);
++ cache->base = get_frame_register_unsigned (next_frame, gdbarch_sp_regnum (gdbarch));
++ cache->saved_sp = cache->base + cache->framesize;
++
++ cache->register_offsets[MICROBLAZE_PREV_PC_REGNUM] = cache->base;
++ cache->register_offsets[MICROBLAZE_SP_REGNUM] = cache->saved_sp;
+
+ return cache;
+ }
+@@ -501,6 +569,14 @@
+ struct microblaze_frame_cache *cache =
+ microblaze_frame_cache (this_frame, this_cache);
+
++ if ((regnum == MICROBLAZE_SP_REGNUM &&
++ cache->register_offsets[MICROBLAZE_SP_REGNUM])
++ || (regnum == MICROBLAZE_FP_REGNUM &&
++ cache->register_offsets[MICROBLAZE_SP_REGNUM]))
++
++ return frame_unwind_got_constant (this_frame, regnum,
++ cache->register_offsets[MICROBLAZE_SP_REGNUM]);
++
+ if (cache->frameless_p)
+ {
+ if (regnum == MICROBLAZE_PC_REGNUM)
+@@ -508,11 +584,18 @@
+ if (regnum == MICROBLAZE_SP_REGNUM)
+ regnum = 1;
+ return trad_frame_get_prev_register (this_frame,
+- cache->saved_regs, regnum);
++ cache->saved_regs, regnum);
+ }
+- else
+- return trad_frame_get_prev_register (this_frame, cache->saved_regs,
+- regnum);
++
++ if (regnum == MICROBLAZE_PC_REGNUM)
++ {
++ regnum = 15;
++ return frame_unwind_got_memory (this_frame, regnum,
++ cache->register_offsets[MICROBLAZE_PREV_PC_REGNUM]);
++ }
++
++ return trad_frame_get_prev_register (this_frame, cache->saved_regs,
++ regnum);
+
+ }
+
+@@ -536,6 +619,12 @@
+ return cache->base;
+ }
+
++static const struct frame_unwind *
++microblaze_frame_sniffer (struct frame_info *next_frame)
++{
++ return &microblaze_frame_unwind;
++}
++
+ static const struct frame_base microblaze_frame_base =
+ {
+ &microblaze_frame_unwind,
+@@ -628,6 +717,109 @@
+ return (TYPE_LENGTH (type) == 16);
+ }
+
++int
++microblaze_software_single_step (struct frame_info *frame)
++{
++ struct gdbarch *arch = get_frame_arch (frame);
++ struct address_space *aspace = get_frame_address_space (frame);
++ struct gdbarch_tdep *tdep = gdbarch_tdep (arch);
++ static char le_breakp[] = MICROBLAZE_BREAKPOINT_LE;
++ static char be_breakp[] = MICROBLAZE_BREAKPOINT;
++ enum bfd_endian byte_order = gdbarch_byte_order (arch);
++ char *breakp = byte_order == BFD_ENDIAN_BIG ? be_breakp : le_breakp;
++ int ret = 0;
++
++ /* Save the address and the values of the next_pc and the target */
++ static struct sstep_breaks
++ {
++ CORE_ADDR address;
++ bfd_boolean valid;
++ /* Shadow contents. */
++ char data[INST_WORD_SIZE];
++ } stepbreaks[2];
++ int ii;
++
++ if (1)
++ {
++ CORE_ADDR pc;
++ long insn;
++ enum microblaze_instr minstr;
++ bfd_boolean isunsignednum;
++ enum microblaze_instr_type insn_type;
++ short delay_slots;
++ int imm;
++ bfd_boolean immfound = FALSE;
++
++ /* Set a breakpoint at the next instruction */
++ /* If the current instruction is an imm, set it at the inst after */
++ /* If the instruction has a delay slot, skip the delay slot */
++ pc = get_frame_pc (frame);
++ insn = microblaze_fetch_instruction (pc);
++ minstr = get_insn_microblaze (insn, &isunsignednum, &insn_type, &delay_slots);
++ if (insn_type == immediate_inst)
++ {
++ int rd, ra, rb;
++ immfound = TRUE;
++ minstr = microblaze_decode_insn (insn, &rd, &ra, &rb, &imm);
++ pc = pc + INST_WORD_SIZE;
++ insn = microblaze_fetch_instruction (pc);
++ minstr = get_insn_microblaze (insn, &isunsignednum, &insn_type, &delay_slots);
++ }
++ stepbreaks[0].address = pc + (delay_slots * INST_WORD_SIZE) + INST_WORD_SIZE;
++ if (insn_type != return_inst) {
++ stepbreaks[0].valid = TRUE;
++ } else {
++ stepbreaks[0].valid = FALSE;
++ }
++
++ microblaze_debug ("single-step insn_type=%x insn=%x\n", insn_type, insn);
++ /* Now check for branch or return instructions */
++ if (insn_type == branch_inst || insn_type == return_inst) {
++ int limm;
++ int lrd, lra, lrb;
++ int ra, rb;
++ bfd_boolean targetvalid;
++ bfd_boolean unconditionalbranch;
++ microblaze_decode_insn(insn, &lrd, &lra, &lrb, &limm);
++ if (lra >= 0 && lra < MICROBLAZE_NUM_REGS)
++ ra = get_frame_register_unsigned (frame, lra);
++ else
++ ra = 0;
++ if (lrb >= 0 && lrb < MICROBLAZE_NUM_REGS)
++ rb = get_frame_register_unsigned (frame, lrb);
++ else
++ rb = 0;
++
++ stepbreaks[1].address = microblaze_get_target_address (insn, immfound, imm, pc, ra, rb, &targetvalid, &unconditionalbranch);
++ microblaze_debug ("single-step uncondbr=%d targetvalid=%d target=%x\n", unconditionalbranch, targetvalid, stepbreaks[1].address);
++
++ if (unconditionalbranch)
++ stepbreaks[0].valid = FALSE; /* This is a unconditional branch: will not come to the next address */
++ if (targetvalid && (stepbreaks[0].valid == FALSE ||
++ (stepbreaks[0].address != stepbreaks[1].address))
++ && (stepbreaks[1].address != pc)) {
++ stepbreaks[1].valid = TRUE;
++ } else {
++ stepbreaks[1].valid = FALSE;
++ }
++ } else {
++ stepbreaks[1].valid = FALSE;
++ }
++
++ /* Insert the breakpoints */
++ for (ii = 0; ii < 2; ++ii)
++ {
++
++ /* ignore invalid breakpoint. */
++ if (stepbreaks[ii].valid) {
++ insert_single_step_breakpoint (arch, aspace, stepbreaks[ii].address);
++ ret = 1;
++ }
++ }
++ }
++ return ret;
++}
++
+ static void
+ microblaze_write_pc (struct regcache *regcache, CORE_ADDR pc)
+ {
+@@ -664,6 +856,70 @@
+ return dwarf2_to_reg_map[reg];
+ }
+
++
++void
++microblaze_supply_gregset (const struct microblaze_gregset *gregset,
++ struct regcache *regcache,
++ int regnum, const void *gregs)
++{
++ unsigned int *regs = gregs;
++ if (regnum >= 0)
++ regcache_raw_supply (regcache, regnum, regs + regnum);
++
++ if (regnum == -1) {
++ int i;
++
++ for (i = 0; i < 50; i++) {
++ regcache_raw_supply (regcache, i, regs + i);
++ }
++ }
++}
++
++
++void
++microblaze_collect_gregset (const struct microblaze_gregset *gregset,
++ const struct regcache *regcache,
++ int regnum, void *gregs)
++{
++ /* FIXME. */
++}
++
++void
++microblaze_supply_fpregset (struct regcache *regcache,
++ int regnum, const void *fpregs)
++{
++ /* FIXME. */
++}
++
++void
++microblaze_collect_fpregset (const struct regcache *regcache,
++ int regnum, void *fpregs)
++{
++ /* FIXME. */
++}
++
++
++/* Return the appropriate register set for the core section identified
++ by SECT_NAME and SECT_SIZE. */
++
++const struct regset *
++microblaze_regset_from_core_section (struct gdbarch *gdbarch,
++ const char *sect_name, size_t sect_size)
++{
++ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
++
++ microblaze_debug ("microblaze_regset_from_core_section, sect_name = %s\n", sect_name);
++
++ if (strcmp (sect_name, ".reg") == 0 && sect_size >= tdep->sizeof_gregset)
++ return tdep->gregset;
++
++ if (strcmp (sect_name, ".reg2") == 0 && sect_size >= tdep->sizeof_fpregset)
++ return tdep->fpregset;
++
++ microblaze_debug ("microblaze_regset_from_core_section returning null :-( \n");
++ return NULL;
++}
++
+ static struct gdbarch *
+ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
+ {
+@@ -679,6 +935,11 @@
+ tdep = XMALLOC (struct gdbarch_tdep);
+ gdbarch = gdbarch_alloc (&info, tdep);
+
++ tdep->gregset = NULL;
++ tdep->sizeof_gregset = 0;
++ tdep->fpregset = NULL;
++ tdep->sizeof_fpregset = 0;
++
+ set_gdbarch_long_double_bit (gdbarch, 128);
+
+ set_gdbarch_num_regs (gdbarch, MICROBLAZE_NUM_REGS);
+@@ -706,7 +967,10 @@
+ /* Stack grows downward. */
+ set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
+
++ set_gdbarch_memory_remove_breakpoint (gdbarch, microblaze_linux_memory_remove_breakpoint);
++
+ set_gdbarch_breakpoint_from_pc (gdbarch, microblaze_breakpoint_from_pc);
++ set_gdbarch_software_single_step (gdbarch, microblaze_software_single_step);
+
+ set_gdbarch_frame_args_skip (gdbarch, 8);
+
+@@ -725,6 +989,13 @@
+ dwarf2_append_unwinders (gdbarch);
+ frame_unwind_append_unwinder (gdbarch, &microblaze_frame_unwind);
+ frame_base_append_sniffer (gdbarch, dwarf2_frame_base_sniffer);
++ //frame_base_append_sniffer (gdbarch, microblaze_frame_sniffer);
++
++ /* If we have register sets, enable the generic core file support. */
++ if (tdep->gregset) {
++ set_gdbarch_regset_from_core_section (gdbarch,
++ microblaze_regset_from_core_section);
++ }
+
+ return gdbarch;
+ }
+diff -Nur gdb-7.7.orig/gdb/microblaze-tdep.h gdb-7.7/gdb/microblaze-tdep.h
+--- gdb-7.7.orig/gdb/microblaze-tdep.h 2014-01-08 10:23:36.000000000 +0100
++++ gdb-7.7/gdb/microblaze-tdep.h 2014-03-26 10:11:41.000000000 +0100
+@@ -1,6 +1,6 @@
+ /* Target-dependent code for Xilinx MicroBlaze.
+
+- Copyright (C) 2009-2014 Free Software Foundation, Inc.
++ Copyright (C) 2009-2013 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+@@ -22,8 +22,22 @@
+
+
+ /* Microblaze architecture-specific information. */
++struct microblaze_gregset
++{
++ unsigned int gregs[32];
++ unsigned int fpregs[32];
++ unsigned int pregs[16];
++};
++
+ struct gdbarch_tdep
+ {
++ int dummy; // declare something.
++
++ /* Register sets. */
++ struct regset *gregset;
++ size_t sizeof_gregset;
++ struct regset *fpregset;
++ size_t sizeof_fpregset;
+ };
+
+ struct microblaze_frame_cache
+@@ -42,7 +56,8 @@
+ int fp_regnum;
+
+ /* Offsets to saved registers. */
+- int register_offsets[57]; /* Must match MICROBLAZE_NUM_REGS. */
++ int register_offsets[59]; /* Must match MICROBLAZE_NUM_REGS. */
++ CORE_ADDR saved_sp;
+
+ /* Table of saved registers. */
+ struct trad_frame_saved_reg *saved_regs;
+@@ -66,11 +81,11 @@
+ MICROBLAZE_R12_REGNUM,
+ MICROBLAZE_R13_REGNUM,
+ MICROBLAZE_R14_REGNUM,
+- MICROBLAZE_R15_REGNUM,
++ MICROBLAZE_R15_REGNUM, MICROBLAZE_PREV_PC_REGNUM = MICROBLAZE_R15_REGNUM,
+ MICROBLAZE_R16_REGNUM,
+ MICROBLAZE_R17_REGNUM,
+ MICROBLAZE_R18_REGNUM,
+- MICROBLAZE_R19_REGNUM,
++ MICROBLAZE_R19_REGNUM, MICROBLAZE_FP_REGNUM = MICROBLAZE_R19_REGNUM,
+ MICROBLAZE_R20_REGNUM,
+ MICROBLAZE_R21_REGNUM,
+ MICROBLAZE_R22_REGNUM,
+@@ -107,7 +122,9 @@
+ MICROBLAZE_RTLBX_REGNUM,
+ MICROBLAZE_RTLBSX_REGNUM,
+ MICROBLAZE_RTLBLO_REGNUM,
+- MICROBLAZE_RTLBHI_REGNUM
++ MICROBLAZE_RTLBHI_REGNUM,
++ MICROBLAZE_SLR_REGNUM,
++ MICROBLAZE_SHR_REGNUM
+ };
+
+ /* All registers are 32 bits. */
+@@ -115,6 +132,21 @@
+
+ /* MICROBLAZE_BREAKPOINT defines the breakpoint that should be used.
+ Only used for native debugging. */
+-#define MICROBLAZE_BREAKPOINT {0xb9, 0xcc, 0x00, 0x60}
++#define MICROBLAZE_BREAKPOINT {0xba, 0x0c, 0x00, 0x18}
++#define MICROBLAZE_BREAKPOINT_LE {0x18, 0x00, 0x0c, 0xba}
++
++extern void microblaze_supply_gregset (const struct microblaze_gregset *gregset,
++ struct regcache *regcache,
++ int regnum, const void *gregs);
++extern void microblaze_collect_gregset (const struct microblaze_gregset *gregset,
++ const struct regcache *regcache,
++ int regnum, void *gregs);
++extern void microblaze_supply_fpregset (struct regcache *regcache,
++ int regnum, const void *fpregs);
++extern void microblaze_collect_fpregset (const struct regcache *regcache,
++ int regnum, void *fpregs);
++
++extern const struct regset * microblaze_regset_from_core_section (struct gdbarch *gdbarch,
++ const char *sect_name, size_t sect_size);
+
+ #endif /* microblaze-tdep.h */
+diff -Nur gdb-7.7.orig/gdb/regformats/reg-microblaze.dat gdb-7.7/gdb/regformats/reg-microblaze.dat
+--- gdb-7.7.orig/gdb/regformats/reg-microblaze.dat 1970-01-01 01:00:00.000000000 +0100
++++ gdb-7.7/gdb/regformats/reg-microblaze.dat 2014-03-26 20:43:54.000000000 +0100
+@@ -0,0 +1,41 @@
++name:microblaze
++expedite:r1,pc
++32:r0
++32:r1
++32:r2
++32:r3
++32:r4
++32:r5
++32:r6
++32:r7
++32:r8
++32:r9
++32:r10
++32:r11
++32:r12
++32:r13
++32:r14
++32:r15
++32:r16
++32:r17
++32:r18
++32:r19
++32:r20
++32:r21
++32:r22
++32:r23
++32:r24
++32:r25
++32:r26
++32:r27
++32:r28
++32:r29
++32:r30
++32:r31
++32:pc
++32:msr
++32:ear
++32:esr
++32:fsr
++32:slr
++32:shr
+diff -Nur gdb-7.7.orig/include/elf/microblaze.h gdb-7.7/include/elf/microblaze.h
+--- gdb-7.7.orig/include/elf/microblaze.h 2013-12-08 05:11:51.000000000 +0100
++++ gdb-7.7/include/elf/microblaze.h 2014-03-26 20:44:34.000000000 +0100
+@@ -58,6 +58,7 @@
+ RELOC_NUMBER (R_MICROBLAZE_TLSDTPREL64, 27) /* TLS Offset Within TLS Block */
+ RELOC_NUMBER (R_MICROBLAZE_TLSGOTTPREL32, 28) /* TLS Offset From Thread Pointer */
+ RELOC_NUMBER (R_MICROBLAZE_TLSTPREL32, 29) /* TLS Offset From Thread Pointer */
++ RELOC_NUMBER (R_MICROBLAZE_32_NONE, 30)
+
+ END_RELOC_NUMBERS (R_MICROBLAZE_max)
+
+diff -Nur gdb-7.7.orig/opcodes/microblaze-opc.h gdb-7.7/opcodes/microblaze-opc.h
+--- gdb-7.7.orig/opcodes/microblaze-opc.h 2013-12-08 05:11:52.000000000 +0100
++++ gdb-7.7/opcodes/microblaze-opc.h 2014-03-26 20:45:46.000000000 +0100
+@@ -91,6 +91,7 @@
+ #define OPCODE_MASK_H3 0xFC000600 /* High 6 bits and bits 21, 22. */
+ #define OPCODE_MASK_H32 0xFC00FC00 /* High 6 bits and bit 16-21. */
+ #define OPCODE_MASK_H34B 0xFC0000FF /* High 6 bits and low 8 bits. */
++#define OPCODE_MASK_H35B 0xFC0004FF /* High 6 bits and low 9 bits. */
+ #define OPCODE_MASK_H34C 0xFC0007E0 /* High 6 bits and bits 21-26. */
+
+ /* New Mask for msrset, msrclr insns. */
+@@ -101,7 +102,7 @@
+ #define DELAY_SLOT 1
+ #define NO_DELAY_SLOT 0
+
+-#define MAX_OPCODES 289
++#define MAX_OPCODES 291
+
+ struct op_code_struct
+ {
+@@ -174,7 +175,9 @@
+ {"wic", INST_TYPE_R1_R2_SPECIAL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x90000068, OPCODE_MASK_H34B, wic, special_inst },
+ {"wdc", INST_TYPE_R1_R2_SPECIAL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x90000064, OPCODE_MASK_H34B, wdc, special_inst },
+ {"wdc.clear", INST_TYPE_R1_R2_SPECIAL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x90000066, OPCODE_MASK_H34B, wdcclear, special_inst },
++ {"wdc.ext.clear", INST_TYPE_R1_R2_SPECIAL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x90000466, OPCODE_MASK_H35B, wdcextclear, special_inst },
+ {"wdc.flush", INST_TYPE_R1_R2_SPECIAL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x90000074, OPCODE_MASK_H34B, wdcflush, special_inst },
++ {"wdc.ext.flush", INST_TYPE_R1_R2_SPECIAL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x90000476, OPCODE_MASK_H35B, wdcextflush, special_inst },
+ {"mts", INST_TYPE_SPECIAL_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_MTS, 0x9400C000, OPCODE_MASK_H13S, mts, special_inst },
+ {"mfs", INST_TYPE_RD_SPECIAL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_MFS, 0x94008000, OPCODE_MASK_H23S, mfs, special_inst },
+ {"br", INST_TYPE_R2, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x98000000, OPCODE_MASK_H124, br, branch_inst },
+diff -Nur gdb-7.7.orig/opcodes/microblaze-opcm.h gdb-7.7/opcodes/microblaze-opcm.h
+--- gdb-7.7.orig/opcodes/microblaze-opcm.h 2013-12-08 05:11:52.000000000 +0100
++++ gdb-7.7/opcodes/microblaze-opcm.h 2014-03-26 20:45:46.000000000 +0100
+@@ -31,9 +31,9 @@
+ idiv, idivu, bsll, bsra, bsrl, get, put, nget, nput, cget, cput,
+ ncget, ncput, muli, bslli, bsrai, bsrli, mului, or, and, xor,
+ andn, pcmpbf, pcmpbc, pcmpeq, pcmpne, sra, src, srl, sext8, sext16,
+- wic, wdc, wdcclear, wdcflush, mts, mfs, mbar, br, brd,
+- brld, bra, brad, brald, microblaze_brk, beq, beqd, bne, bned, blt,
+- bltd, ble, bled, bgt, bgtd, bge, bged, ori, andi, xori, andni,
++ wic, wdc, wdcclear, wdcextclear, wdcflush, wdcextflush, mts, mfs, mbar,
++ br, brd, brld, bra, brad, brald, microblaze_brk, beq, beqd, bne, bned,
++ blt, bltd, ble, bled, bgt, bgtd, bge, bged, ori, andi, xori, andni,
+ imm, rtsd, rtid, rtbd, rted, bri, brid, brlid, brai, braid, bralid,
+ brki, beqi, beqid, bnei, bneid, blti, bltid, blei, bleid, bgti,
+ bgtid, bgei, bgeid, lbu, lbur, lhu, lhur, lw, lwr, lwx, sb, sbr, sh,
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/gkrellm/Makefile b/package/gkrellm/Makefile
index 1b4a6b118..e8efdabd4 100644
--- a/package/gkrellm/Makefile
+++ b/package/gkrellm/Makefile
@@ -4,10 +4,10 @@
include ${TOPDIR}/rules.mk
PKG_NAME:= gkrellm
-PKG_VERSION:= 2.3.4
+PKG_VERSION:= 2.3.5
PKG_RELEASE:= 1
-PKG_MD5SUM:= 600f4daa395112ed19a3633deb0829ff
-PKG_DESCR:= The GNU Krell Monitors Server
+PKG_MD5SUM:= 05d00fa8d6376038b0c7e967583c0b8d
+PKG_DESCR:= GNU krell monitors server
PKG_SECTION:= net/misc
PKG_DEPENDS:= glib libpthread
PKG_BUILDDEP:= glib
diff --git a/package/gkrellm/patches/patch-server_Makefile b/package/gkrellm/patches/patch-server_Makefile
deleted file mode 100644
index a1a8747e7..000000000
--- a/package/gkrellm/patches/patch-server_Makefile
+++ /dev/null
@@ -1,30 +0,0 @@
---- gkrellm-2.3.4.orig/server/Makefile 2008-10-03 23:52:48.000000000 +0200
-+++ gkrellm-2.3.4/server/Makefile 2011-05-17 11:34:14.926610183 +0200
-@@ -26,7 +26,7 @@ SMANDIR ?= $(INSTALLROOT)/share/man/man1
- MANMODE ?= 644
- MANDIRMODE ?= 755
- INSTALL ?= install
--LINK_FLAGS ?= -Wl,-E
-+LINK_FLAGS ?= -Wl,-E $(LDFLAGS)
- EXTRAOBJS =
-
- SHARED_PATH = ../shared
-@@ -109,15 +109,15 @@ endif
-
- override CC += -Wall $(FLAGS)
-
--OS_NAME=$(shell uname -s)
--OS_RELEASE=$(shell uname -r)
-+OS_NAME=Linux
-+OS_RELEASE=2.6
-
- OBJS = main.o monitor.o mail.o plugins.o glib.o utils.o sysdeps-unix.o log.o
-
- all: gkrellmd
-
- gkrellmd: $(OBJS) $(EXTRAOBJS)
-- $(CC) $(OBJS) $(EXTRAOBJS) -o gkrellmd $(LIBS) $(LINK_FLAGS)
-+ $(CC) $(OBJS) $(EXTRAOBJS) -o gkrellmd $(LINK_FLAGS) $(LIBS)
-
- static: $(OBJS) $(EXTRAOBJS)
- $(CC) $(OBJS) $(EXTRAOBJS) -o gkrellmd.static -static \
diff --git a/package/gkrellm/patches/patch-server_main_c b/package/gkrellm/patches/patch-server_main_c
new file mode 100644
index 000000000..c02fb8930
--- /dev/null
+++ b/package/gkrellm/patches/patch-server_main_c
@@ -0,0 +1,24 @@
+--- gkrellm-2.3.5.orig/server/main.c 2010-10-02 18:13:29.000000000 +0200
++++ gkrellm-2.3.5/server/main.c 2014-03-23 16:06:59.000000000 +0100
+@@ -39,21 +39,6 @@
+ #include <syslog.h>
+ #endif // !WIN32
+
+-// win32 defines addrinfo but only supports getaddrinfo call on winxp or newer
+-#if !defined(HAVE_GETADDRINFO) && !defined(WIN32)
+-struct addrinfo
+- {
+- int ai_flags; /* AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST */
+- int ai_family; /* PF_xxx */
+- int ai_socktype; /* SOCK_xxx */
+- int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
+- size_t ai_addrlen; /* length of ai_addr */
+- char *ai_canonname; /* canonical name for hostname */
+- struct sockaddr *ai_addr; /* binary address */
+- struct addrinfo *ai_next; /* next structure in linked list */
+- };
+-#endif // !HAVE_GETADDRINFO
+-
+ #if !defined(IPV6_V6ONLY) && defined(IPV6_BINDV6ONLY)
+ #define IPV6_V6ONLY IPV6_BINDV6ONLY
+ #endif
diff --git a/package/gkrellm/patches/patch-server_sysdeps-unix_c b/package/gkrellm/patches/patch-server_sysdeps-unix_c
new file mode 100644
index 000000000..e69631735
--- /dev/null
+++ b/package/gkrellm/patches/patch-server_sysdeps-unix_c
@@ -0,0 +1,10 @@
+--- gkrellm-2.3.5.orig/server/sysdeps-unix.c 2010-09-14 18:34:34.000000000 +0200
++++ gkrellm-2.3.5/server/sysdeps-unix.c 2014-03-23 16:13:57.000000000 +0100
+@@ -145,6 +145,7 @@ gkrellm_sensors_linux_name_fix(gchar *id
+ #endif
+ }
+
++#define HAVE_GETADDRINFO 1
+ #ifdef SENSORS_COMMON
+ gint
+ gkrellm_connect_to(gchar *server, gint server_port)
diff --git a/package/glib/Makefile b/package/glib/Makefile
index 2c82f8a53..d92294b8e 100644
--- a/package/glib/Makefile
+++ b/package/glib/Makefile
@@ -5,13 +5,14 @@ include ${TOPDIR}/rules.mk
PKG_NAME:= glib
PKG_VERSION:= 2.38.2
-PKG_RELEASE:= 2
+PKG_RELEASE:= 3
PKG_EXTRAVER:= 2.38
PKG_MD5SUM:= 26d1d08e478fc48c181ca8be44f5b69f
PKG_DESCR:= low-level core library that forms the basis of GTK+
PKG_SECTION:= libs
PKG_DEPENDS:= libpthread
-PKG_BUILDDEP:= libffi gettext-tiny libiconv-tiny glib-host zlib libelf dbus
+PKG_BUILDDEP:= glib-host libffi gettext-tiny libiconv-tiny zlib libelf dbus
+HOST_BUILDDEP:= libffi-host gettext-tiny-host libiconv-tiny-host
PKG_URL:= http://www.gtk.org/
PKG_SITES:= http://ftp.gnome.org/pub/gnome/sources/glib/${PKG_EXTRAVER}/
PKG_NOPARALLEL:= 1
@@ -29,9 +30,7 @@ include ${TOPDIR}/mk/package.mk
$(eval $(call HOST_template,GLIB,glib,${PKG_VERSION}-${PKG_RELEASE}))
$(eval $(call PKG_template,GLIB,glib,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
-HOST_STYLE:= auto
TARGET_CPPFLAGS+= -D_GNU_SOURCE
-TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS))
CONFIGURE_ARGS+= --disable-mem-pools \
--disable-rebuilds \
--disable-fam \
@@ -43,6 +42,7 @@ CONFIGURE_ENV+= glib_cv_long_long_format=ll \
ac_cv_func_posix_getpwuid_r=yes \
ac_cv_func_posix_getgrgid_r=yes
+HOST_STYLE:= auto
HOST_CONFIGURE_ARGS+= --disable-fam \
--enable-static \
--disable-compile-warnings
diff --git a/package/glibc/files/libc.so.sh4 b/package/glibc/files/libc.so.sh4
new file mode 100644
index 000000000..eae5be42d
--- /dev/null
+++ b/package/glibc/files/libc.so.sh4
@@ -0,0 +1,5 @@
+/* GNU ld script
+ Use the shared library, but some functions are only in
+ the static library, so try that secondarily. */
+OUTPUT_FORMAT(elf32-sh-linux)
+GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a AS_NEEDED ( /lib/ld-linux.so.2 ) )
diff --git a/package/gnutls/Makefile b/package/gnutls/Makefile
index b160c1d5f..c1b993c14 100644
--- a/package/gnutls/Makefile
+++ b/package/gnutls/Makefile
@@ -4,9 +4,9 @@
include ${TOPDIR}/rules.mk
PKG_NAME:= gnutls
-PKG_VERSION:= 3.2.9
+PKG_VERSION:= 3.2.13
PKG_RELEASE:= 1
-PKG_MD5SUM:= 9ae2bfa55d4c12dd6005cfb7014977f9
+PKG_MD5SUM:= 300e5f413054e2f4719c1c3b5179a611
PKG_DESCR:= GNU TLS library
PKG_SECTION:= crypto
PKG_DEPENDS:= libgcrypt libtasn1 zlib libnettle libgmp
@@ -45,7 +45,6 @@ ifneq ($(ADK_PACKAGE_LIBGNUTLS_WITH_CRYPTODEV),)
CONFIGURE_ARGS+= --enable-cryptodev
endif
-TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS))
TARGET_LDFLAGS+= -pthread
CONFIGURE_ARGS+= --disable-rpath \
--without-libz-prefix \
diff --git a/package/gpsd/Makefile b/package/gpsd/Makefile
index 04547a9eb..4c21e15ee 100644
--- a/package/gpsd/Makefile
+++ b/package/gpsd/Makefile
@@ -10,7 +10,7 @@ PKG_MD5SUM:= fc5b03aae38b9b5b6880b31924d0ace3
PKG_DESCR:= An interface daemon for GPS receivers
PKG_SECTION:= misc
PKG_DEPENDS:= libpthread
-PKG_BUILDDEP:= ncurses scons-host bzip2-host python2-host
+PKG_BUILDDEP:= scons-host ncurses
PKG_URL:= http://catb.org/gpsd/
PKG_SITES:= http://download-mirror.savannah.gnu.org/releases/gpsd/
diff --git a/package/grub-bin/Makefile b/package/grub-bin/Makefile
index 7b52cdafa..352c2b572 100644
--- a/package/grub-bin/Makefile
+++ b/package/grub-bin/Makefile
@@ -18,7 +18,6 @@ PKG_ARCH_DEPENDS:= x86 x86_64
PKG_CFLINE_GRUB_BIN:= select BUSYBOX_FEATURE_STAT_FORMAT@
PKG_CFLINE_GRUB_BIN+= depends on !ADK_TARGET_ROOTFS_INITRAMFS_PIGGYBACK && !ADK_TARGET_ROOTFS_INITRAMFS
-PKG_DFLT_GRUB_BIN:= y if !ADK_TOOLCHAIN_ONLY && !ADK_TOOLCHAIN_ARCHIVE
include ${TOPDIR}/mk/package.mk
diff --git a/package/grub/Makefile b/package/grub/Makefile
index cfe17a227..2f2deba4a 100644
--- a/package/grub/Makefile
+++ b/package/grub/Makefile
@@ -4,38 +4,53 @@
include $(TOPDIR)/rules.mk
PKG_NAME:= grub
-PKG_VERSION:= 1.98
-PKG_RELEASE:= 1
-PKG_MD5SUM:= c0bcf60e524739bb64e3a2d4e3732a59
+PKG_VERSION:= 2.00
+PKG_RELEASE:= 4
+PKG_MD5SUM:= e927540b6eda8b024fb0391eeaa4091c
PKG_DESCR:= GRUB2 bootloader (source package)
PKG_SECTION:= boot
+PKG_BUILDDEP:= bison-host qemu-host
PKG_URL:= http://www.gnu.org/software/grub
-PKG_SITES:= ftp://alpha.gnu.org/gnu/grub/
+PKG_SITES:= ftp://ftp.gnu.org/gnu/grub/
-PKG_HOST_DEPENDS:= linux
-PKG_ARCH_DEPENDS:= x86 x86_64
+PKG_ARCH_DEPENDS:= x86 x86_64 mips
PKG_NOPARALLEL:= 1
+PKG_CHOICES_GRUB:= PC EFI
+PKGCD_PC:= build for PC BIOS
+PKGCD_EFI:= build for EFI
+
include $(TOPDIR)/mk/package.mk
$(eval $(call PKG_template,GRUB,grub,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
-ifeq ($(ADK_STATIC),y)
-TARGET_CFLAGS+= -static
-TARGET_LDFLAGS+= -static
+GRUB_MODULES:= ext2 part_msdos biosdisk
+
+ifeq ($(ADK_PACKAGE_GRUB_PC),y)
+GRUB_ARCH:= i386-pc
+CONFIGURE_ARGS+= --with-platform=pc
+endif
+ifeq ($(ADK_PACKAGE_GRUB_EFI),y)
+GRUB_ARCH:= x86_64-efi
+CONFIGURE_ARGS+= --with-platform=efi
endif
-XAKE_FLAGS+= GCC_HONOUR_COPTS=s CPPFLAGS_FOR_BUILD="-I./include"
-CONFIGURE_ARGS+= --disable-efiemu \
- --disable-grub-mkfont \
- --disable-grub-fstest
+TARGET_CFLAGS+= -static
+TARGET_LDFLAGS+= -static
+CONFIGURE_ARGS+= --disable-grub-mkfont \
+ --enable-efiemu=no \
+ --enable-liblzma=no \
+ --enable-device-mapper=no \
+ --enable-libzfs=no \
+ --disable-werror
+XAKE_FLAGS+= GCC_HONOUR_COPTS=s
grub-install:
- ${INSTALL_DIR} $(IDIR_GRUB)/usr/{sbin,lib,bin}
- ${INSTALL_DIR} $(IDIR_GRUB)/etc
- ${CP} ${WRKINST}/etc/grub.d $(IDIR_GRUB)/etc
- ${CP} ${WRKINST}/usr/lib/* $(IDIR_GRUB)/usr/lib
- ${INSTALL_BIN} ${WRKINST}/usr/bin/* $(IDIR_GRUB)/usr/bin
- ${INSTALL_BIN} ${WRKINST}/usr/sbin/* $(IDIR_GRUB)/usr/sbin
+ ${INSTALL_DIR} $(IDIR_GRUB)/boot/grub/${GRUB_ARCH}
+ ${CP} ${WRKINST}/usr/lib/grub/${GRUB_ARCH}/*{mod,lst,img} \
+ $(IDIR_GRUB)/boot/grub/${GRUB_ARCH}/
+ PATH='${HOST_PATH}' qemu-i386 ${WRKBUILD}/grub-mkimage \
+ -o $(IDIR_GRUB)/boot/grub/core.img -O ${GRUB_ARCH} \
+ -c ./files/embed.cfg ${GRUB_MODULES}
include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/grub/patches/patch-conf_common_mk b/package/grub/patches/patch-conf_common_mk
deleted file mode 100644
index fec7cd1dd..000000000
--- a/package/grub/patches/patch-conf_common_mk
+++ /dev/null
@@ -1,11 +0,0 @@
---- grub-1.98.orig/conf/common.mk 2010-03-06 21:52:26.000000000 +0100
-+++ grub-1.98/conf/common.mk 2012-02-22 13:20:42.022360300 +0100
-@@ -11159,7 +11159,7 @@ trigtables.c: gentrigtables
- ./gentrigtables > $@
- DISTCLEANFILES += trigtables.c
- gentrigtables: gentrigtables.c
-- $(CC) -o $@ $^ $(CPPFLAGS) -lm
-+ $(CC_FOR_BUILD) -o $@ $^ $(CPPFLAGS_FOR_BUILD) -lm
- DISTCLEANFILES += gentrigtables
-
- pkglib_MODULES += setjmp.mod
diff --git a/package/grub/patches/patch-configure b/package/grub/patches/patch-configure
new file mode 100644
index 000000000..a3920a1c1
--- /dev/null
+++ b/package/grub/patches/patch-configure
@@ -0,0 +1,11 @@
+--- grub-2.00.orig/configure 2012-06-26 13:59:16.000000000 +0200
++++ grub-2.00/configure 2014-04-06 20:34:33.000000000 +0200
+@@ -3880,7 +3882,7 @@ TARGET_CPPFLAGS="$TARGET_CPPFLAGS -I\$(t
+
+ case "$target_cpu" in
+ i[3456]86) target_cpu=i386 ;;
+- amd64) target_cpu=x86_64 ;;
++ amd64|x86_64) target_cpu=x86_64 ;;
+ sparc) target_cpu=sparc64 ;;
+ mipsel|mips64el)
+ target_cpu=mipsel;
diff --git a/package/grub/patches/patch-grub-core_gnulib_stdio_in_h b/package/grub/patches/patch-grub-core_gnulib_stdio_in_h
new file mode 100644
index 000000000..79ab772ad
--- /dev/null
+++ b/package/grub/patches/patch-grub-core_gnulib_stdio_in_h
@@ -0,0 +1,14 @@
+--- grub-2.00.orig/grub-core/gnulib/stdio.in.h 2010-12-01 15:45:43.000000000 +0100
++++ grub-2.00/grub-core/gnulib/stdio.in.h 2014-04-05 10:02:52.000000000 +0200
+@@ -137,11 +137,6 @@ _GL_WARN_ON_USE (fflush, "fflush is not
+ "use gnulib module fflush for portable POSIX compliance");
+ #endif
+
+-/* It is very rare that the developer ever has full control of stdin,
+- so any use of gets warrants an unconditional warning. Assume it is
+- always declared, since it is required by C89. */
+-#undef gets
+-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+
+ #if @GNULIB_FOPEN@
+ # if @REPLACE_FOPEN@
diff --git a/package/grub/patches/patch-grub-core_kern_emu_hostdisk_c b/package/grub/patches/patch-grub-core_kern_emu_hostdisk_c
new file mode 100644
index 000000000..e238bb7fd
--- /dev/null
+++ b/package/grub/patches/patch-grub-core_kern_emu_hostdisk_c
@@ -0,0 +1,36 @@
+--- grub-2.00.orig/grub-core/kern/emu/hostdisk.c 2012-06-25 10:32:04.000000000 +0200
++++ grub-2.00/grub-core/kern/emu/hostdisk.c 2014-04-06 13:14:06.000000000 +0200
+@@ -761,25 +761,6 @@ linux_find_partition (char *dev, grub_di
+ }
+ #endif /* __linux__ */
+
+-#if defined(__linux__) && (!defined(__GLIBC__) || \
+- ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1))))
+- /* Maybe libc doesn't have large file support. */
+-grub_err_t
+-grub_util_fd_seek (int fd, const char *name, grub_uint64_t off)
+-{
+- loff_t offset, result;
+- static int _llseek (uint filedes, ulong hi, ulong lo,
+- loff_t *res, uint wh);
+- _syscall5 (int, _llseek, uint, filedes, ulong, hi, ulong, lo,
+- loff_t *, res, uint, wh);
+-
+- offset = (loff_t) off;
+- if (_llseek (fd, offset >> 32, offset & 0xffffffff, &result, SEEK_SET))
+- return grub_error (GRUB_ERR_BAD_DEVICE, N_("cannot seek `%s': %s"),
+- name, strerror (errno));
+- return GRUB_ERR_NONE;
+-}
+-#else
+ grub_err_t
+ grub_util_fd_seek (int fd, const char *name, grub_uint64_t off)
+ {
+@@ -790,7 +771,6 @@ grub_util_fd_seek (int fd, const char *n
+ name, strerror (errno));
+ return 0;
+ }
+-#endif
+
+ static void
+ flush_initial_buffer (const char *os_dev __attribute__ ((unused)))
diff --git a/package/grub/patches/patch-include_grub_i18n_h b/package/grub/patches/patch-include_grub_i18n_h
deleted file mode 100644
index 41151f706..000000000
--- a/package/grub/patches/patch-include_grub_i18n_h
+++ /dev/null
@@ -1,11 +0,0 @@
---- grub-1.98.orig/include/grub/i18n.h 2010-03-06 21:51:37.000000000 +0100
-+++ grub-1.98/include/grub/i18n.h 2010-06-26 15:31:22.860562533 +0200
-@@ -25,7 +25,7 @@
- extern const char *(*EXPORT_VAR(grub_gettext)) (const char *s);
-
- /* NLS can be disabled through the configure --disable-nls option. */
--#if ENABLE_NLS
-+#if defined(ENABLE_NLS)
-
- # ifdef GRUB_UTIL
-
diff --git a/package/grub/patches/patch-include_grub_misc_h b/package/grub/patches/patch-include_grub_misc_h
deleted file mode 100644
index fb3e46108..000000000
--- a/package/grub/patches/patch-include_grub_misc_h
+++ /dev/null
@@ -1,17 +0,0 @@
---- grub-1.98.orig/include/grub/misc.h 2010-03-06 21:51:37.000000000 +0100
-+++ grub-1.98/include/grub/misc.h 2010-06-26 18:54:44.075171713 +0200
-@@ -91,14 +91,6 @@ grub_strncat (char *dest, const char *sr
- return dest;
- }
-
--/* Prototypes for aliases. */
--#ifndef GRUB_UTIL
--int EXPORT_FUNC(memcmp) (const void *s1, const void *s2, grub_size_t n);
--void *EXPORT_FUNC(memmove) (void *dest, const void *src, grub_size_t n);
--void *EXPORT_FUNC(memcpy) (void *dest, const void *src, grub_size_t n);
--void *EXPORT_FUNC(memset) (void *s, int c, grub_size_t n);
--#endif
--
- int EXPORT_FUNC(grub_memcmp) (const void *s1, const void *s2, grub_size_t n);
- int EXPORT_FUNC(grub_strcmp) (const char *s1, const char *s2);
- int EXPORT_FUNC(grub_strncmp) (const char *s1, const char *s2, grub_size_t n);
diff --git a/package/grub/patches/patch-kern_misc_c b/package/grub/patches/patch-kern_misc_c
deleted file mode 100644
index 2912e2564..000000000
--- a/package/grub/patches/patch-kern_misc_c
+++ /dev/null
@@ -1,54 +0,0 @@
---- grub-1.98.orig/kern/misc.c 2010-03-06 21:51:37.000000000 +0100
-+++ grub-1.98/kern/misc.c 2010-06-26 20:12:26.711214130 +0200
-@@ -64,23 +64,6 @@ grub_memmove (void *dest, const void *sr
- return dest;
- }
-
--#ifndef APPLE_CC
--void *memmove (void *dest, const void *src, grub_size_t n)
-- __attribute__ ((alias ("grub_memmove")));
--/* GCC emits references to memcpy() for struct copies etc. */
--void *memcpy (void *dest, const void *src, grub_size_t n)
-- __attribute__ ((alias ("grub_memmove")));
--#else
--void *memcpy (void *dest, const void *src, grub_size_t n)
--{
-- return grub_memmove (dest, src, n);
--}
--void *memmove (void *dest, const void *src, grub_size_t n)
--{
-- return grub_memmove (dest, src, n);
--}
--#endif
--
- char *
- grub_strcpy (char *dest, const char *src)
- {
-@@ -516,15 +499,6 @@ grub_memset (void *s, int c, grub_size_t
-
- return s;
- }
--#ifndef APPLE_CC
--void *memset (void *s, int c, grub_size_t n)
-- __attribute__ ((alias ("grub_memset")));
--#else
--void *memset (void *s, int c, grub_size_t n)
--{
-- return grub_memset (s, c, n);
--}
--#endif
-
- grub_size_t
- grub_strlen (const char *s)
-@@ -1053,11 +1027,6 @@ grub_abort (void)
- grub_exit ();
- }
-
--#ifndef APPLE_CC
--/* GCC emits references to abort(). */
--void abort (void) __attribute__ ((alias ("grub_abort")));
--#endif
--
- #ifdef NEED_ENABLE_EXECUTE_STACK
- /* Some gcc versions generate a call to this function
- in trampolines for nested functions. */
diff --git a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_camellia_c b/package/grub/patches/patch-lib_libgcrypt-grub_cipher_camellia_c
deleted file mode 100644
index 8b3594525..000000000
--- a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_camellia_c
+++ /dev/null
@@ -1,29 +0,0 @@
---- grub-1.98.orig/lib/libgcrypt-grub/cipher/camellia.c 2010-03-06 21:52:26.000000000 +0100
-+++ grub-1.98/lib/libgcrypt-grub/cipher/camellia.c 2010-06-26 20:49:20.915278106 +0200
-@@ -26,6 +26,7 @@
- */
-
-
-+#include <grub/misc.h>
- #include "camellia.h"
-
- /* u32 must be 32bit word */
-@@ -946,13 +947,13 @@ void camellia_setup192(const unsigned ch
- unsigned char kk[32];
- u32 krll, krlr, krrl,krrr;
-
-- memcpy(kk, key, 24);
-- memcpy((unsigned char *)&krll, key+16,4);
-- memcpy((unsigned char *)&krlr, key+20,4);
-+ grub_memcpy(kk, key, 24);
-+ grub_memcpy((unsigned char *)&krll, key+16,4);
-+ grub_memcpy((unsigned char *)&krlr, key+20,4);
- krrl = ~krll;
- krrr = ~krlr;
-- memcpy(kk+24, (unsigned char *)&krrl, 4);
-- memcpy(kk+28, (unsigned char *)&krrr, 4);
-+ grub_memcpy(kk+24, (unsigned char *)&krrl, 4);
-+ grub_memcpy(kk+28, (unsigned char *)&krrr, 4);
- camellia_setup256(kk, subkey);
- return;
- }
diff --git a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_des_c b/package/grub/patches/patch-lib_libgcrypt-grub_cipher_des_c
deleted file mode 100644
index c2c93be5a..000000000
--- a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_des_c
+++ /dev/null
@@ -1,11 +0,0 @@
---- grub-1.98.orig/lib/libgcrypt-grub/cipher/des.c 2010-03-06 21:52:26.000000000 +0100
-+++ grub-1.98/lib/libgcrypt-grub/cipher/des.c 2010-06-26 20:35:49.335279651 +0200
-@@ -119,7 +119,7 @@
- #include "cipher.h"
-
- #if defined(__GNUC__) && defined(__GNU_LIBRARY__)
--#define working_memcmp memcmp
-+#define working_memcmp grub_memcmp
- #else
- /*
- * According to the SunOS man page, memcmp returns indeterminate sign
diff --git a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_dsa_c b/package/grub/patches/patch-lib_libgcrypt-grub_cipher_dsa_c
deleted file mode 100644
index 91b467779..000000000
--- a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_dsa_c
+++ /dev/null
@@ -1,29 +0,0 @@
---- grub-1.98.orig/lib/libgcrypt-grub/cipher/dsa.c 2010-03-06 21:52:26.000000000 +0100
-+++ grub-1.98/lib/libgcrypt-grub/cipher/dsa.c 2010-06-26 20:41:13.511279436 +0200
-@@ -157,7 +157,7 @@ gen_k( gcry_mpi_t q )
- to get_random_bytes() and use this the here maybe it is
- easier to do this directly in random.c. */
- char *pp = gcry_random_bytes_secure( 4, GCRY_STRONG_RANDOM );
-- memcpy( rndbuf,pp, 4 );
-+ grub_memcpy( rndbuf,pp, 4 );
- gcry_free(pp);
- }
- _gcry_mpi_set_buffer( k, rndbuf, nbytes, 0 );
-@@ -337,7 +337,7 @@ generate (DSA_secret_key *sk, unsigned i
- else
- { /* Change only some of the higher bits (= 2 bytes)*/
- char *r = gcry_random_bytes_secure (2, random_level);
-- memcpy(rndbuf, r, 2 );
-+ grub_memcpy(rndbuf, r, 2 );
- gcry_free(r);
- }
-
-@@ -713,7 +713,7 @@ dsa_generate_ext (int algo, unsigned int
- gcry_sexp_release (l1);
- return GPG_ERR_INV_OBJ; /* No value or value too large. */
- }
-- memcpy (buf, s, n);
-+ grub_memcpy (buf, s, n);
- buf[n] = 0;
- qbits = (unsigned int)strtoul (buf, NULL, 0);
- gcry_sexp_release (l1);
diff --git a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_elgamal_c b/package/grub/patches/patch-lib_libgcrypt-grub_cipher_elgamal_c
deleted file mode 100644
index 5cd42146e..000000000
--- a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_elgamal_c
+++ /dev/null
@@ -1,20 +0,0 @@
---- grub-1.98.orig/lib/libgcrypt-grub/cipher/elgamal.c 2010-03-06 21:52:26.000000000 +0100
-+++ grub-1.98/lib/libgcrypt-grub/cipher/elgamal.c 2010-06-26 20:40:56.115156639 +0200
-@@ -212,7 +212,7 @@ gen_k( gcry_mpi_t p, int small_k )
- easier to do this directly in random.c Anyway, it is
- highly inlikely that we will ever reach this code. */
- char *pp = gcry_random_bytes_secure( 4, GCRY_STRONG_RANDOM );
-- memcpy( rndbuf, pp, 4 );
-+ grub_memcpy( rndbuf, pp, 4 );
- gcry_free(pp);
- }
- _gcry_mpi_set_buffer( k, rndbuf, nbytes, 0 );
-@@ -308,7 +308,7 @@ generate ( ELG_secret_key *sk, unsigned
- {
- char *r = gcry_random_bytes_secure( 2,
- GCRY_VERY_STRONG_RANDOM );
-- memcpy(rndbuf, r, 2 );
-+ grub_memcpy(rndbuf, r, 2 );
- gcry_free(r);
- }
- }
diff --git a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_md4_c b/package/grub/patches/patch-lib_libgcrypt-grub_cipher_md4_c
deleted file mode 100644
index 8bbe886a7..000000000
--- a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_md4_c
+++ /dev/null
@@ -1,11 +0,0 @@
---- grub-1.98.orig/lib/libgcrypt-grub/cipher/md4.c 2010-03-06 21:52:26.000000000 +0100
-+++ grub-1.98/lib/libgcrypt-grub/cipher/md4.c 2010-06-26 20:24:28.691278909 +0200
-@@ -109,7 +109,7 @@ transform ( MD4_CONTEXT *ctx, const unsi
- }
- }
- #else
-- memcpy (in, data, 64);
-+ grub_memcpy (in, data, 64);
- #endif
-
- /* Round 1. */
diff --git a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_md5_c b/package/grub/patches/patch-lib_libgcrypt-grub_cipher_md5_c
deleted file mode 100644
index 53aa3e69f..000000000
--- a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_md5_c
+++ /dev/null
@@ -1,11 +0,0 @@
---- grub-1.98.orig/lib/libgcrypt-grub/cipher/md5.c 2010-03-06 21:52:26.000000000 +0100
-+++ grub-1.98/lib/libgcrypt-grub/cipher/md5.c 2010-06-26 20:24:19.631157281 +0200
-@@ -100,7 +100,7 @@ transform ( MD5_CONTEXT *ctx, const unsi
- }
- }
- #else
-- memcpy( correct_words, data, 64 );
-+ grub_memcpy( correct_words, data, 64 );
- #endif
-
-
diff --git a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_primegen_c b/package/grub/patches/patch-lib_libgcrypt-grub_cipher_primegen_c
deleted file mode 100644
index c97d88c1d..000000000
--- a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_primegen_c
+++ /dev/null
@@ -1,38 +0,0 @@
---- grub-1.98.orig/lib/libgcrypt-grub/cipher/primegen.c 2010-03-06 21:52:26.000000000 +0100
-+++ grub-1.98/lib/libgcrypt-grub/cipher/primegen.c 2010-06-26 20:42:06.831276628 +0200
-@@ -1478,7 +1478,7 @@ _gcry_generate_fips186_2_prime (unsigned
- }
-
- /* Step 2: U = sha1(seed) ^ sha1((seed+1) mod 2^{qbits}) */
-- memcpy (seed_plus, seed, seedlen);
-+ grub_memcpy (seed_plus, seed, seedlen);
- for (i=seedlen-1; i >= 0; i--)
- {
- seed_plus[i]++;
-@@ -1596,7 +1596,7 @@ _gcry_generate_fips186_2_prime (unsigned
- *r_counter = counter;
- if (r_seed && r_seedlen)
- {
-- memcpy (seed_plus, seed, seedlen);
-+ grub_memcpy (seed_plus, seed, seedlen);
- *r_seed = seed_plus;
- seed_plus = NULL;
- *r_seedlen = seedlen;
-@@ -1751,7 +1751,7 @@ _gcry_generate_fips186_3_prime (unsigned
-
- /* Step 11. Note that we do no use an explicit offset but increment
- SEED_PLUS accordingly. */
-- memcpy (seed_plus, seed, seedlen);
-+ grub_memcpy (seed_plus, seed, seedlen);
- counter = 0;
-
- /* Generate P. */
-@@ -1838,7 +1838,7 @@ _gcry_generate_fips186_3_prime (unsigned
- *r_counter = counter;
- if (r_seed && r_seedlen)
- {
-- memcpy (seed_plus, seed, seedlen);
-+ grub_memcpy (seed_plus, seed, seedlen);
- *r_seed = seed_plus;
- seed_plus = NULL;
- *r_seedlen = seedlen;
diff --git a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_rijndael_c b/package/grub/patches/patch-lib_libgcrypt-grub_cipher_rijndael_c
deleted file mode 100644
index 056abefa3..000000000
--- a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_rijndael_c
+++ /dev/null
@@ -1,53 +0,0 @@
---- grub-1.98.orig/lib/libgcrypt-grub/cipher/rijndael.c 2010-03-06 21:52:26.000000000 +0100
-+++ grub-1.98/lib/libgcrypt-grub/cipher/rijndael.c 2010-06-26 20:23:29.463277513 +0200
-@@ -139,7 +139,7 @@ do_setkey (RIJNDAEL_context *ctx, const
- if ((_gcry_get_hw_features () & HWF_PADLOCK_AES))
- {
- ctx->use_padlock = 1;
-- memcpy (ctx->padlock_key, key, keylen);
-+ grub_memcpy (ctx->padlock_key, key, keylen);
- }
- #endif
- }
-@@ -411,9 +411,9 @@ do_encrypt (const RIJNDAEL_context *ctx,
- byte b[16];
- } b;
-
-- memcpy (a.a, ax, 16);
-+ grub_memcpy (a.a, ax, 16);
- do_encrypt_aligned (ctx, b.b, a.a);
-- memcpy (bx, b.b, 16);
-+ grub_memcpy (bx, b.b, 16);
- }
-
-
-@@ -440,7 +440,7 @@ do_padlock (const RIJNDAEL_context *ctx,
- if (decrypt_flag)
- cword[0] |= 0x00000200;
-
-- memcpy (a, ax, 16);
-+ grub_memcpy (a, ax, 16);
-
- asm volatile
- ("pushfl\n\t" /* Force key reload. */
-@@ -454,7 +454,7 @@ do_padlock (const RIJNDAEL_context *ctx,
- : "%ecx", "cc", "memory"
- );
-
-- memcpy (bx, b, 16);
-+ grub_memcpy (bx, b, 16);
-
- }
- #endif /*USE_PADLOCK*/
-@@ -609,9 +609,9 @@ do_decrypt (RIJNDAEL_context *ctx, byte
- ctx->decryption_prepared = 1;
- }
-
-- memcpy (a.a, ax, 16);
-+ grub_memcpy (a.a, ax, 16);
- do_decrypt_aligned (ctx, b.b, a.a);
-- memcpy (bx, b.b, 16);
-+ grub_memcpy (bx, b.b, 16);
- #undef rk
- }
-
diff --git a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_rmd160_c b/package/grub/patches/patch-lib_libgcrypt-grub_cipher_rmd160_c
deleted file mode 100644
index fb818bd51..000000000
--- a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_rmd160_c
+++ /dev/null
@@ -1,11 +0,0 @@
---- grub-1.98.orig/lib/libgcrypt-grub/cipher/rmd160.c 2010-03-06 21:52:26.000000000 +0100
-+++ grub-1.98/lib/libgcrypt-grub/cipher/rmd160.c 2010-06-26 20:23:39.319276778 +0200
-@@ -185,7 +185,7 @@ transform ( RMD160_CONTEXT *hd, const un
- * executes on a 586-100 (39.73 bogomips) at about 1900kb/sec;
- * [measured with a 4MB data and "gpgm --print-md rmd160"] */
- u32 x[16];
-- memcpy( x, data, 64 );
-+ grub_memcpy( x, data, 64 );
- #endif
-
-
diff --git a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_serpent_c b/package/grub/patches/patch-lib_libgcrypt-grub_cipher_serpent_c
deleted file mode 100644
index 7c99e23ad..000000000
--- a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_serpent_c
+++ /dev/null
@@ -1,20 +0,0 @@
---- grub-1.98.orig/lib/libgcrypt-grub/cipher/serpent.c 2010-03-06 21:52:26.000000000 +0100
-+++ grub-1.98/lib/libgcrypt-grub/cipher/serpent.c 2010-06-26 20:29:51.523275940 +0200
-@@ -917,7 +917,7 @@ serpent_test (void)
- (const u32 *) test_data[i].text_plain,
- (u32 *) scratch);
-
-- if (memcmp (scratch, test_data[i].text_cipher, sizeof (serpent_block_t)))
-+ if (grub_memcmp (scratch, test_data[i].text_cipher, sizeof (serpent_block_t)))
- switch (test_data[i].key_length)
- {
- case 16:
-@@ -931,7 +931,7 @@ serpent_test (void)
- serpent_decrypt_internal (&context,
- (const u32 *) test_data[i].text_cipher,
- (u32 *) scratch);
-- if (memcmp (scratch, test_data[i].text_plain, sizeof (serpent_block_t)))
-+ if (grub_memcmp (scratch, test_data[i].text_plain, sizeof (serpent_block_t)))
- switch (test_data[i].key_length)
- {
- case 16:
diff --git a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_sha1_c b/package/grub/patches/patch-lib_libgcrypt-grub_cipher_sha1_c
deleted file mode 100644
index b04764bb8..000000000
--- a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_sha1_c
+++ /dev/null
@@ -1,11 +0,0 @@
---- grub-1.98.orig/lib/libgcrypt-grub/cipher/sha1.c 2010-03-06 21:52:26.000000000 +0100
-+++ grub-1.98/lib/libgcrypt-grub/cipher/sha1.c 2010-06-26 20:23:50.135168960 +0200
-@@ -114,7 +114,7 @@ transform (SHA1_CONTEXT *hd, const unsig
- for ( ;nblocks; nblocks--)
- {
- #ifdef WORDS_BIGENDIAN
-- memcpy (x, data, 64);
-+ grub_memcpy (x, data, 64);
- data += 64;
- #else
- {
diff --git a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_sha256_c b/package/grub/patches/patch-lib_libgcrypt-grub_cipher_sha256_c
deleted file mode 100644
index f9676e392..000000000
--- a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_sha256_c
+++ /dev/null
@@ -1,11 +0,0 @@
---- grub-1.98.orig/lib/libgcrypt-grub/cipher/sha256.c 2010-03-06 21:52:26.000000000 +0100
-+++ grub-1.98/lib/libgcrypt-grub/cipher/sha256.c 2010-06-26 20:24:00.135274844 +0200
-@@ -150,7 +150,7 @@ transform (SHA256_CONTEXT *hd, const uns
- h = hd->h7;
-
- #ifdef WORDS_BIGENDIAN
-- memcpy (x, data, 64);
-+ grub_memcpy (x, data, 64);
- #else
- {
- byte *p2;
diff --git a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_sha512_c b/package/grub/patches/patch-lib_libgcrypt-grub_cipher_sha512_c
deleted file mode 100644
index 070a15dff..000000000
--- a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_sha512_c
+++ /dev/null
@@ -1,11 +0,0 @@
---- grub-1.98.orig/lib/libgcrypt-grub/cipher/sha512.c 2010-03-06 21:52:26.000000000 +0100
-+++ grub-1.98/lib/libgcrypt-grub/cipher/sha512.c 2010-06-26 20:24:09.235288423 +0200
-@@ -162,7 +162,7 @@ transform (SHA512_CONTEXT *hd, const uns
- h = hd->h7;
-
- #ifdef WORDS_BIGENDIAN
-- memcpy (w, data, 128);
-+ grub_memcpy (w, data, 128);
- #else
- {
- int i;
diff --git a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_tiger_c b/package/grub/patches/patch-lib_libgcrypt-grub_cipher_tiger_c
deleted file mode 100644
index a039004a2..000000000
--- a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_tiger_c
+++ /dev/null
@@ -1,11 +0,0 @@
---- grub-1.98.orig/lib/libgcrypt-grub/cipher/tiger.c 2010-03-06 21:52:26.000000000 +0100
-+++ grub-1.98/lib/libgcrypt-grub/cipher/tiger.c 2010-06-26 20:22:45.507277255 +0200
-@@ -685,7 +685,7 @@ transform ( TIGER_CONTEXT *hd, const uns
- x[7] = MKWORD(data, 7);
- #undef MKWORD
- #else
-- memcpy( &x[0], data, 64 );
-+ grub_memcpy( &x[0], data, 64 );
- #endif
-
- /* save */
diff --git a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_twofish_c b/package/grub/patches/patch-lib_libgcrypt-grub_cipher_twofish_c
deleted file mode 100644
index 88e9e761c..000000000
--- a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_twofish_c
+++ /dev/null
@@ -1,20 +0,0 @@
---- grub-1.98.orig/lib/libgcrypt-grub/cipher/twofish.c 2010-03-06 21:52:26.000000000 +0100
-+++ grub-1.98/lib/libgcrypt-grub/cipher/twofish.c 2010-06-26 20:30:05.671278033 +0200
-@@ -932,7 +932,7 @@ main()
- twofish_encrypt (&ctx, buffer[1], buffer[1]);
- }
- }
-- encrypt_msg = memcmp (buffer, test_encrypt, sizeof (test_encrypt)) ?
-+ encrypt_msg = grub_memcmp (buffer, test_encrypt, sizeof (test_encrypt)) ?
- "encryption failure!\n" : "encryption OK!\n";
-
- /* Decryption test. */
-@@ -954,7 +954,7 @@ main()
- /* Stop the timer, and print results. */
- timer = clock () - timer;
- printf (encrypt_msg);
-- printf (memcmp (buffer, test_decrypt, sizeof (test_decrypt)) ?
-+ printf (grub_memcmp (buffer, test_decrypt, sizeof (test_decrypt)) ?
- "decryption failure!\n" : "decryption OK!\n");
- printf ("elapsed time: %.1f s.\n", (float) timer / CLOCKS_PER_SEC);
-
diff --git a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_whirlpool_c b/package/grub/patches/patch-lib_libgcrypt-grub_cipher_whirlpool_c
deleted file mode 100644
index a92518354..000000000
--- a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_whirlpool_c
+++ /dev/null
@@ -1,11 +0,0 @@
---- grub-1.98.orig/lib/libgcrypt-grub/cipher/whirlpool.c 2010-03-06 21:52:26.000000000 +0100
-+++ grub-1.98/lib/libgcrypt-grub/cipher/whirlpool.c 2010-06-26 20:17:35.043170089 +0200
-@@ -1381,7 +1381,7 @@ whirlpool_final (void *ctx)
- context->buffer[context->count++] = 0;
-
- /* Add length of message. */
-- memcpy (context->buffer + context->count, context->length, 32);
-+ grub_memcpy (context->buffer + context->count, context->length, 32);
- context->count += 32;
- whirlpool_add (context, NULL, 0);
-
diff --git a/package/grub/patches/patch-util_grub-install_in b/package/grub/patches/patch-util_grub-install_in
deleted file mode 100644
index 6cbc9fbc3..000000000
--- a/package/grub/patches/patch-util_grub-install_in
+++ /dev/null
@@ -1,11 +0,0 @@
---- grub-1.98.orig/util/grub-install.in 2010-03-06 21:51:37.000000000 +0100
-+++ grub-1.98/util/grub-install.in 2010-06-26 21:16:50.031158562 +0200
-@@ -306,7 +306,7 @@ config_opt=
-
- if [ "x${devabstraction_module}" = "x" ] ; then
- if [ x"${install_device}" != x ]; then
-- if echo "${install_device}" | grep -qx "(.*)" ; then
-+ if echo "${install_device}" | grep -q "(.*)" ; then
- install_drive="${install_device}"
- else
- install_drive="`$grub_probe --target=drive --device ${install_device}`"
diff --git a/package/grub/patches/patch-util_grub-mkconfig_lib_in b/package/grub/patches/patch-util_grub-mkconfig_lib_in
deleted file mode 100644
index a51e3ec53..000000000
--- a/package/grub/patches/patch-util_grub-mkconfig_lib_in
+++ /dev/null
@@ -1,11 +0,0 @@
---- grub-1.98.orig/util/grub-mkconfig_lib.in 2010-03-06 21:51:37.000000000 +0100
-+++ grub-1.98/util/grub-mkconfig_lib.in 2010-06-26 21:17:19.399157123 +0200
-@@ -154,7 +154,7 @@ version_test_numeric ()
- a=$b
- b=$c
- fi
-- if (echo $a ; echo $b) | sort -n | head -n 1 | grep -qx $b ; then
-+ if (echo $a ; echo $b) | sort -n | head -n 1 | grep -q $b ; then
- return 0
- else
- return 1
diff --git a/package/grub/patches/patch-util_grub_d_10_linux_in b/package/grub/patches/patch-util_grub_d_10_linux_in
deleted file mode 100644
index b84b3e3ca..000000000
--- a/package/grub/patches/patch-util_grub_d_10_linux_in
+++ /dev/null
@@ -1,20 +0,0 @@
---- grub-1.98.orig/util/grub.d/10_linux.in 2010-03-06 21:51:37.000000000 +0100
-+++ grub-1.98/util/grub.d/10_linux.in 2010-06-26 21:18:10.803156350 +0200
-@@ -66,8 +66,8 @@ linux_entry ()
- # Use ELILO's generic "efifb" when it's known to be available.
- # FIXME: We need an interface to select vesafb in case efifb can't be used.
- if [ "x$GRUB_GFXPAYLOAD_LINUX" = x ]; then
-- if grep -qx "CONFIG_FB_EFI=y" /boot/config-${version} 2> /dev/null \
-- && grep -qx "CONFIG_VT_HW_CONSOLE_BINDING=y" /boot/config-${version} 2> /dev/null; then
-+ if grep -q "CONFIG_FB_EFI=y" /boot/config-${version} 2> /dev/null \
-+ && grep -q "CONFIG_VT_HW_CONSOLE_BINDING=y" /boot/config-${version} 2> /dev/null; then
- cat << EOF
- set gfxpayload=keep
- EOF
-@@ -135,5 +135,5 @@ while [ "x$list" != "x" ] ; do
- "single ${GRUB_CMDLINE_LINUX}"
- fi
-
-- list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
-+ list=`echo $list | tr ' ' '\n' | grep -v $linux | tr '\n' ' '`
- done
diff --git a/package/hdparm/Makefile b/package/hdparm/Makefile
index 61925e59c..91d0d0c03 100644
--- a/package/hdparm/Makefile
+++ b/package/hdparm/Makefile
@@ -7,7 +7,7 @@ PKG_NAME:= hdparm
PKG_VERSION:= 9.43
PKG_RELEASE:= 1
PKG_MD5SUM:= f73233be118d86c779a8463d8b6a3cdb
-PKG_DESCR:= get/set ATA drive parameters
+PKG_DESCR:= get/set ATA/SATA drive parameters
PKG_SECTION:= fs
PKG_URL:= http://sourceforge.net/projects/hdparm
PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=hdparm/}
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/id3lib/Makefile b/package/id3lib/Makefile
index 19d678a7a..82f23f375 100644
--- a/package/id3lib/Makefile
+++ b/package/id3lib/Makefile
@@ -28,7 +28,7 @@ ifeq ($(ADK_COMPILE_ID3LIB_WITH_UCLIBCXX),y)
LIBRARIES:=-nodefaultlibs -luClibc++ -lz -lm -lc -lgcc
endif
-ifeq ($(ADK_TOOLCHAIN_GCC_USE_SSP),y)
+ifeq ($(ADK_TOOLCHAIN_USE_SSP),y)
LIBRARIES+=-lssp -fstack-protector
endif
diff --git a/package/igmpproxy/patches/patch-src_igmpproxy_h b/package/igmpproxy/patches/patch-src_igmpproxy_h
new file mode 100644
index 000000000..0d2bbbc4d
--- /dev/null
+++ b/package/igmpproxy/patches/patch-src_igmpproxy_h
@@ -0,0 +1,10 @@
+--- igmpproxy-0.1.orig/src/igmpproxy.h 2009-10-05 20:19:26.000000000 +0200
++++ igmpproxy-0.1/src/igmpproxy.h 2014-03-26 18:05:47.000000000 +0100
+@@ -48,6 +48,7 @@
+ #include <sys/socket.h>
+ #include <sys/un.h>
+ #include <sys/time.h>
++#include <sys/types.h>
+ #include <sys/ioctl.h>
+ #include <sys/param.h>
+
diff --git a/package/ipcad/Makefile b/package/ipcad/Makefile
index 5ee22cba2..57b4d7111 100644
--- a/package/ipcad/Makefile
+++ b/package/ipcad/Makefile
@@ -5,7 +5,7 @@ include ${TOPDIR}/rules.mk
PKG_NAME:= ipcad
PKG_VERSION:= 3.7.3
-PKG_RELEASE:= 1
+PKG_RELEASE:= 2
PKG_MD5SUM:= 125605249958894148ec26d3c88189f5
PKG_DESCR:= IP Cisco Accounting Daemon
PKG_SECTION:= net
diff --git a/package/ipcad/patches/patch-Makefile b/package/ipcad/patches/patch-Makefile
new file mode 100644
index 000000000..8ced9f13a
--- /dev/null
+++ b/package/ipcad/patches/patch-Makefile
@@ -0,0 +1,169 @@
+--- ipcad-3.7.3.orig/Makefile 2007-04-22 10:08:45.000000000 +0200
++++ ipcad-3.7.3/Makefile 2014-03-23 17:59:56.000000000 +0100
+@@ -1,4 +1,163 @@
+-all: bootstrap
+
+-bootstrap:
+- ./configure && make
++prefix= /usr
++exec_prefix= ${prefix}
++bindir= /usr/bin
++sysconfdir= /etc
++datadir= /usr/share
++
++CC= /home/wbx/hudson/toolchain_x86_64-linux-gnu/usr/bin/arm-openadk-linux-muslgnueabihf-gcc
++LDFLAGS= -L/home/wbx/hudson/target_arm_musl_eabihf/lib -L/home/wbx/hudson/target_arm_musl_eabihf/usr/lib -Wl,-O1 -Wl,-rpath -Wl,/usr/lib -Wl,-rpath-link -Wl,/home/wbx/hudson/target_arm_musl_eabihf/usr/lib -Wl,-z,relro,-z,now
++LIBS= -lpcap
++CFLAGS= -march=armv6 -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -fwrapv -fno-ident -fhonour-copts -fomit-frame-pointer -Os -pipe -fno-unwind-tables -fno-asynchronous-unwind-tables -g3 -DHAVE_CONFIG_H -W -Wall
++CPPFLAGS=-DIPCAD_VERSION=\"3.7.3\"
++CPPFLAGS+=-DCONFIG_FILE=\"${sysconfdir}/ipcad.conf\"
++CPPFLAGS+=-DHAVE_CONFIG_H -D_REENTRANT -D_THREAD_SAFE
++CPPFLAGS+=-DPSRC_pcap -DIFST_linux
++
++YACC=bison -y
++LEX=flex
++INSTALL=/usr/bin/install -c
++
++MANROOT=/usr/share/man/man
++MAN8=${MANROOT}8
++MAN5=${MANROOT}5
++
++NROFF= groff -Tascii -mandoc
++
++PACKAGE=ipcad
++TARGETS=ipcad
++VERSION=3.7.3
++
++IPCAD_OBJS= main.o process.o pps.o disp.o storage.o usage.o cfgy.o cfglex.o cfgread.o cfgvar.o dump.o import.o nflow.o cshelly.o cslex.o csparse.o service.o rw.o servers.o opt.o pidfile.o sf_lite.o
++IPCAD_OBJS+= ifst_linux.o # Interface statistics
++IPCAD_OBJS+= ifs_list.o # Interface statistics
++IPCAD_OBJS+= loop-pcap.o # Method of capturing
++IPCAD_OBJS+= loop-file.o # Method of capturing
++IPCAD_OBJS+= loop-divert.o # Method of capturing
++IPCAD_OBJS+= loop-dynamic.o # Method of capturing
++IPCAD_OBJS+= loop-ulog.o loop-ipq.o # Methods of capturing
++IPCAD_OBJS+= psrc.o psrc-pcap.o # Initialize capturers
++IPCAD_OBJS+= psrc-ipq.o psrc-ulog.o # Initialize capturers
++IPCAD_OBJS+= psrc-file.o # Initialize capturers
++IPCAD_OBJS+= psrc-dynamic.o # Initialize capturers
++IPCAD_OBJS+= psrc-divert.o # Initialize capturers
++IPCAD_OBJS+= wrap_oclose.o # Special file descriptors cache
++IPCAD_OBJS+= genhash.o # General hashing
++
++all: ${TARGETS} man
++
++ipcad: ${IPCAD_OBJS}
++ ${CC} ${CFLAGS} -o $@ ${IPCAD_OBJS} ${LDFLAGS} ${LIBS}
++
++.SUFFIXES:
++.SUFFIXES: .o .c .0 .8 .5
++
++.c.o:
++ ${CC} ${CPPFLAGS} ${CFLAGS} -o $@ -c $<
++
++.8.0:
++ ${NROFF} $< > $@
++
++.5.0:
++ ${NROFF} $< > $@
++
++cfgy.h cfgy.c: cfg.y
++ ${YACC} -p ipcacfg -d cfg.y
++ @mv y.tab.c cfgy.c
++ @mv y.tab.h cfgy.h
++
++cshelly.h cshelly.c: cshell.y
++ ${YACC} -p CS -d cshell.y
++ @mv y.tab.c cshelly.c
++ @mv y.tab.h cshelly.h
++
++cslex.c: cslex.l
++ ${LEX} -s -p -Cem -ocslex.c -PCS cslex.l
++
++cfglex.c: cfglex.l
++ ${LEX} -s -p -Cem -ocfglex.c -Pipcacfg cfglex.l
++
++
++man: ipcad.8 ipcad.conf.5
++
++distdir = $(PACKAGE)-$(VERSION)
++distdir:
++ rm -rf $(distdir)
++ mkdir $(distdir)
++ cp *.c *.h $(distdir)
++ cp ipcad.8 ipcad.conf.5 $(distdir)
++ cp *.y *.l $(distdir)
++ cp *.in configure install-sh $(distdir)
++ cp ipcad.conf.default $(distdir)
++ cp ipcad.conf.simple $(distdir)
++ cp ipcad.spec.in $(distdir)
++ cp Makefile.in Makefile $(distdir)
++ cp ChangeLog INSTALL README TODO BUGS AUTHORS COPYING FAQ $(distdir)
++ cd $(distdir) && make distclean
++
++dist: distdir
++ tar chof - $(distdir) | GZIP="--best" gzip -c > $(distdir).tar.gz
++ rm -rf $(distdir)
++
++clean:
++ rm -f *.o ${TARGETS} *.core 1
++ rm -f *.0
++
++distclean: clean
++ rm -f config.h
++ rm -f config.cache config.log config.status
++ rm -f Makefile
++ rm -f $(distdir).tar.gz
++ rm -f ipcad.spec
++ (echo "all: bootstrap"; echo; echo "bootstrap:"; \
++ echo " ./configure && make") > Makefile
++
++maintainer-clean: distclean
++ @echo "This command is intended for maintainers to use; it"
++ @echo "deletes files that may need special tools to rebuild."
++ rm -f Makefile
++ rm -f *.tab.* cfgy.? *lex.c
++ rm -f config.h.in configure
++
++install: all install-bin install-conf
++
++install-bin:
++ @${INSTALL} -d $(DESTDIR)${bindir}
++ ${INSTALL} ipcad $(DESTDIR)${bindir}
++
++install-man: man
++ ${INSTALL} -m 444 ipcad.8 $(DESTDIR)${MAN8}/ipcad.8
++ ${INSTALL} -m 444 ipcad.conf.5 $(DESTDIR)${MAN5}/ipcad.conf.5
++
++install-conf:
++ @${INSTALL} -d $(DESTDIR)${sysconfdir}
++ ${INSTALL} -m 644 ipcad.conf.simple $(DESTDIR)${sysconfdir}/ipcad.conf.simple
++ -@diff ${sysconfdir}/ipcad.conf \
++ ${sysconfdir}/ipcad.conf.default >/dev/null 2>&1; \
++ if [ "$$?" -eq 0 ] || [ ! -f ${sysconfdir}/ipcad.conf ]; then \
++ echo ${INSTALL} -m 644 ipcad.conf.default $(DESTDIR)${sysconfdir}/ipcad.conf.default; \
++ ${INSTALL} -m 644 ipcad.conf.default $(DESTDIR)${sysconfdir}/ipcad.conf.default; \
++ echo ${INSTALL} -m 644 ipcad.conf.default $(DESTDIR)${sysconfdir}/ipcad.conf; \
++ ${INSTALL} -m 644 ipcad.conf.default $(DESTDIR)${sysconfdir}/ipcad.conf; \
++ echo "**********************************************"; \
++ echo "* Please customize ${sysconfdir}/ipcad.conf *"; \
++ echo "**********************************************"; \
++ else \
++ echo ${INSTALL} -m 644 ipcad.conf.default $(DESTDIR)${sysconfdir}/ipcad.conf.default; \
++ ${INSTALL} -m 644 ipcad.conf.default $(DESTDIR)${sysconfdir}/ipcad.conf.default; \
++ echo "*********************************************"; \
++ echo "* Updated ${sysconfdir}/ipcad.conf.default *"; \
++ echo "*********************************************"; \
++ fi
++ @echo ""
++ @echo "Now you might want to 'make install-man'"
++ @echo ""
++
++
++uninstall:
++ rm -f ${bindir}/ipcad
++ rm -f ${sysconfdir}/ipcad.conf.default
++ rm -f ${sysconfdir}/ipcad.conf.simple
++ rm -f ${MAN8}/ipcad.8
++ rm -f ${MAN5}/ipcad.conf.5
++
diff --git a/package/ipcad/patches/patch-Makefile_in b/package/ipcad/patches/patch-Makefile_in
index 40bcdf546..2fb2eaece 100644
--- a/package/ipcad/patches/patch-Makefile_in
+++ b/package/ipcad/patches/patch-Makefile_in
@@ -1,5 +1,5 @@
--- ipcad-3.7.3.orig/Makefile.in 2007-04-22 10:08:45.000000000 +0200
-+++ ipcad-3.7.3/Makefile.in 2011-01-11 17:16:15.000000000 +0100
++++ ipcad-3.7.3/Makefile.in 2014-03-23 17:58:49.000000000 +0100
@@ -6,10 +6,10 @@ sysconfdir= @sysconfdir@
datadir= @datadir@
@@ -15,3 +15,12 @@
CPPFLAGS+=-DCONFIG_FILE=\"${sysconfdir}/ipcad.conf\"
CPPFLAGS+=@DEFS@ -D_REENTRANT -D_THREAD_SAFE
CPPFLAGS+=-DPSRC_@PSRC@ -DIFST_@IFST@
+@@ -28,7 +28,7 @@ PACKAGE=ipcad
+ TARGETS=ipcad
+ VERSION=@IPCAD_VERSION@
+
+-IPCAD_OBJS= main.o process.o pps.o disp.o storage.o usage.o cfgy.o cfglex.o cfgread.o cfgvar.o rsh.o rshp.o dump.o import.o nflow.o cshelly.o cslex.o csparse.o service.o rw.o servers.o opt.o pidfile.o sf_lite.o
++IPCAD_OBJS= main.o process.o pps.o disp.o storage.o usage.o cfgy.o cfglex.o cfgread.o cfgvar.o dump.o import.o nflow.o cshelly.o cslex.o csparse.o service.o rw.o servers.o opt.o pidfile.o sf_lite.o
+ IPCAD_OBJS+= ifst_@IFST@.o # Interface statistics
+ IPCAD_OBJS+= ifs_list.o # Interface statistics
+ IPCAD_OBJS+= loop-@PSRC@.o # Method of capturing
diff --git a/package/ipcad/patches/patch-cfg_y b/package/ipcad/patches/patch-cfg_y
new file mode 100644
index 000000000..11fbc7564
--- /dev/null
+++ b/package/ipcad/patches/patch-cfg_y
@@ -0,0 +1,60 @@
+--- ipcad-3.7.3.orig/cfg.y 2007-04-22 10:08:45.000000000 +0200
++++ ipcad-3.7.3/cfg.y 2014-03-23 18:03:07.000000000 +0100
+@@ -3,7 +3,6 @@
+ #include "headers.h"
+ #include "cfgvar.h"
+ #include "servers.h"
+-#include "rsh.h"
+ #include "opt.h"
+ #include "storage.h"
+
+@@ -214,49 +213,6 @@ block:
+ | CAPTURE_PORTS DENY {
+ conf->capture_ports = 0;
+ }
+- | RSH ALLOW at_ip {
+- if(add_server(rsh_server, "RSH Server", &($3), 514))
+- return yyerror("Failed to install RSH server");
+- fprintf(stderr, "Configured RSH Server listening at %s\n",
+- inet_ntoa($3));
+- }
+- | RSH DENY at_ip {
+- fprintf(stderr, "Warning: Option at line %d has no effect\n",
+- ipcacfglineno);
+- }
+- | RSH TIMEOUT EQ TOK_STRING {
+- int to_ms;
+- to_ms = atoi($4);
+- free($4);
+- if(to_ms < 0)
+- to_ms = -1; /* INFTIM */
+- else
+- to_ms = to_ms * 1000;
+- rsh_rw_timeout = to_ms;
+- }
+- | RSH TOK_STRING privlevel {
+- cfg_add_rsh_host("", $2, $3);
+- free($2);
+- }
+- | RSH AT TOK_STRING privlevel {
+- cfg_add_rsh_host("", $3, $4);
+- free($3);
+- }
+- | RSH TOK_STRING AT TOK_STRING privlevel {
+- cfg_add_rsh_host($2, $4, $5);
+- free($2); free($4);
+- }
+- | RSH TTL EQ TOK_STRING {
+- conf->rsh_ttl = atoi($4);
+- free($4);
+- }
+- | TTL EQ TOK_STRING {
+- fprintf(stderr, "WARNING: \"ttl = %s;\" at line %d: "
+- "Obsolete syntax. Please use \"rsh ttl = %s;\"\n",
+- $3, ipcacfglineno, $3);
+- conf->rsh_ttl = atoi($3);
+- free($3);
+- }
+ | NetFlow
+ | CHROOT EQ TOK_STRING {
+ if(conf->chroot_to)
diff --git a/package/iperf/Makefile b/package/iperf/Makefile
index d867dd210..da2c5f156 100644
--- a/package/iperf/Makefile
+++ b/package/iperf/Makefile
@@ -22,7 +22,7 @@ $(eval $(call PKG_template,IPERF,iperf,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPEN
TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS))
TARGET_CXXFLAGS:= $(filter-out -flto,$(TARGET_CXXFLAGS))
-ifeq ($(ADK_TOOLCHAIN_GCC_USE_SSP),y)
+ifeq ($(ADK_TOOLCHAIN_USE_SSP),y)
TARGET_LDFLAGS+= -lssp
endif
diff --git a/package/iproute2/Makefile b/package/iproute2/Makefile
index a20bfd0a6..0257e3909 100644
--- a/package/iproute2/Makefile
+++ b/package/iproute2/Makefile
@@ -5,7 +5,7 @@ include ${TOPDIR}/rules.mk
PKG_NAME:= iproute2
PKG_VERSION:= 3.12.0
-PKG_RELEASE:= 2
+PKG_RELEASE:= 3
PKG_MD5SUM:= f87386aaaecafab95607fd10e8152c68
PKG_DESCR:= iproute2 routing control utility
PKG_SECTION:= route
diff --git a/package/iproute2/patches/patch-include_iptables_common_h b/package/iproute2/patches/patch-include_iptables_common_h
new file mode 100644
index 000000000..d0ca2c0a2
--- /dev/null
+++ b/package/iproute2/patches/patch-include_iptables_common_h
@@ -0,0 +1,25 @@
+--- iproute2-3.12.0.orig/include/iptables_common.h 2013-11-23 02:10:33.000000000 +0100
++++ iproute2-3.12.0/include/iptables_common.h 2014-04-05 05:21:46.946376336 +0200
+@@ -1,5 +1,8 @@
+ #ifndef _IPTABLES_COMMON_H
+ #define _IPTABLES_COMMON_H
++
++#include <stdint.h>
++
+ /* Shared definitions between ipv4 and ipv6. */
+
+ enum exittype {
+@@ -43,9 +46,9 @@ extern char *lib_dir;
+ extern void init_extensions(void);
+ #endif
+
+-#define __be32 u_int32_t
+-#define __le32 u_int32_t
+-#define __be16 u_int16_t
+-#define __le16 u_int16_t
++#define __be32 uint32_t
++#define __le32 uint32_t
++#define __be16 uint16_t
++#define __le16 uint16_t
+
+ #endif /*_IPTABLES_COMMON_H*/
diff --git a/package/iproute2/patches/patch-include_iptables_h b/package/iproute2/patches/patch-include_iptables_h
new file mode 100644
index 000000000..ca5f11b3e
--- /dev/null
+++ b/package/iproute2/patches/patch-include_iptables_h
@@ -0,0 +1,38 @@
+--- iproute2-3.12.0.orig/include/iptables.h 2013-11-23 02:10:33.000000000 +0100
++++ iproute2-3.12.0/include/iptables.h 2014-04-05 05:22:26.690501973 +0200
+@@ -20,7 +20,7 @@ struct ipt_get_revision
+ {
+ char name[IPT_FUNCTION_MAXNAMELEN-1];
+
+- u_int8_t revision;
++ uint8_t revision;
+ };
+ #endif /* IPT_SO_GET_REVISION_MATCH Old kernel source */
+
+@@ -39,7 +39,7 @@ struct iptables_match
+ ipt_chainlabel name;
+
+ /* Revision of match (0 by default). */
+- u_int8_t revision;
++ uint8_t revision;
+
+ const char *version;
+
+@@ -92,7 +92,7 @@ struct iptables_target
+ ipt_chainlabel name;
+
+ /* Revision of target (0 by default). */
+- u_int8_t revision;
++ uint8_t revision;
+
+ const char *version;
+
+@@ -153,7 +153,7 @@ extern char *mask_to_dotted(const struct
+
+ extern void parse_hostnetworkmask(const char *name, struct in_addr **addrpp,
+ struct in_addr *maskp, unsigned int *naddrs);
+-extern u_int16_t parse_protocol(const char *s);
++extern uint16_t parse_protocol(const char *s);
+
+ extern int do_command(int argc, char *argv[], char **table,
+ iptc_handle_t *handle);
diff --git a/package/iproute2/patches/patch-include_libiptc_ipt_kernel_headers_h b/package/iproute2/patches/patch-include_libiptc_ipt_kernel_headers_h
new file mode 100644
index 000000000..bc836c0d1
--- /dev/null
+++ b/package/iproute2/patches/patch-include_libiptc_ipt_kernel_headers_h
@@ -0,0 +1,25 @@
+--- iproute2-3.12.0.orig/include/libiptc/ipt_kernel_headers.h 2013-11-23 02:10:33.000000000 +0100
++++ iproute2-3.12.0/include/libiptc/ipt_kernel_headers.h 2014-04-05 05:25:40.983670487 +0200
+@@ -5,22 +5,10 @@
+
+ #include <limits.h>
+
+-#if defined(__GLIBC__) && __GLIBC__ == 2
+ #include <netinet/ip.h>
+ #include <netinet/in.h>
+ #include <netinet/ip_icmp.h>
+ #include <netinet/tcp.h>
+ #include <netinet/udp.h>
+ #include <sys/types.h>
+-#else /* libc5 */
+-#include <sys/socket.h>
+-#include <linux/ip.h>
+-#include <linux/in.h>
+-#include <linux/if.h>
+-#include <linux/icmp.h>
+-#include <linux/tcp.h>
+-#include <linux/udp.h>
+-#include <linux/types.h>
+-#include <linux/in6.h>
+-#endif
+ #endif
diff --git a/package/iptables-snmp/Makefile b/package/iptables-snmp/Makefile
index 28aa8c8ef..130872cf9 100644
--- a/package/iptables-snmp/Makefile
+++ b/package/iptables-snmp/Makefile
@@ -13,6 +13,8 @@ PKG_BUILDDEP:= net-snmp
PKG_URL:= http://www.nobiscuit.com/iptables-snmp/
PKG_SITES:= http://www.nobiscuit.com/iptables-snmp/
+PKG_LIBC_DEPENDS:= uclibc glibc
+
include $(TOPDIR)/mk/package.mk
$(eval $(call PKG_template,IPTABLES_SNMP,iptables-snmp,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
diff --git a/package/iptables/Makefile b/package/iptables/Makefile
index d9fa9fd2a..93e8500d0 100644
--- a/package/iptables/Makefile
+++ b/package/iptables/Makefile
@@ -5,31 +5,37 @@ include ${TOPDIR}/rules.mk
PKG_NAME:= iptables
PKG_VERSION:= 1.4.21
-PKG_RELEASE:= 2
+PKG_RELEASE:= 5
PKG_MD5SUM:= 536d048c8e8eeebcd9757d0863ebb0c0
-PKG_DESCR:= The netfilter firewalling software
+PKG_DESCR:= netfilter firewalling software
PKG_SECTION:= firewall
PKG_DEPENDS:= kmod-ip-nf-iptables kmod-nf-conntrack
PKG_DEPENDS+= kmod-nf-conntrack-ipv4 kmod-full-nat
PKG_DEPENDS+= kmod-ip-nf-target-masquerade kmod-ip-nf-target-reject
PKG_DEPENDS+= kmod-ip-nf-filter kmod-ip-nf-match-state
PKG_DEPENDS+= kmod-netfilter-xt-target-tcpmss
-PKG_DEPENDS+= kmod-ip6-nf-iptables kmod-nf-conntrack-ipv6
-PKG_DEPENDS+= kmod-ip6-nf-filter kmod-ip6-nf-target-reject
+PKG_BUILDDEP:= autotool libnetfilter_conntrack
PKG_URL:= http://www.netfilter.org/
PKG_SITES:= http://www.netfilter.org/projects/iptables/files/
PKG_OPTS:= dev
DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2
+PKG_SUBPKGS:= IPTABLES IP6TABLES
+PKGSD_IPTABLES:= iptables for IPv4
+PKGSD_IP6TABLES:= iptables for IPv6
+PKGSS_IP6TABLES:= iptables kmod-ip6-nf-iptables kmod-nf-conntrack-ipv6 kmod-ip6-nf-filter kmod-ip6-nf-target-reject
+
include ${TOPDIR}/mk/package.mk
# right now default extensions are builtin
# use --disable-static in CONFIGURE_ARGS to change and optimize package
#include ${LINUX_DIR}/.config
-$(eval $(call PKG_template,IPTABLES,iptables,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
+$(eval $(call PKG_template,IPTABLES,iptables,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_IPTABLES},${PKG_SECTION},${PKG_OPTS}))
+$(eval $(call PKG_template,IP6TABLES,ip6tables,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_IP6TABLES},${PKGSD_IP6TABLES},${PKG_SECTION},${PKG_OPTS}))
+AUTOTOOL_STYLE:= autoreconf
TARGET_LDFLAGS+= -fPIC
CONFIGURE_ARGS+= --enable-devel
@@ -41,9 +47,11 @@ iptables-install:
${CP} ${WRKINST}/usr/lib/libiptc.so* ${IDIR_IPTABLES}/usr/lib
${CP} ${WRKINST}/usr/lib/libip4tc.so* ${IDIR_IPTABLES}/usr/lib
${CP} ${WRKINST}/usr/lib/libxtables.so* ${IDIR_IPTABLES}/usr/lib
- ${INSTALL_DIR} ${IDIR_IPTABLES}/{usr/lib,etc,usr/sbin}
- ${INSTALL_DATA} ./files/firewall6.conf ${IDIR_IPTABLES}/etc
- ${CP} ${WRKINST}/usr/sbin/ip6tables ${IDIR_IPTABLES}/usr/sbin
- ${CP} ${WRKINST}/usr/lib/libip6tc.so* ${IDIR_IPTABLES}/usr/lib
+
+ip6tables-install:
+ ${INSTALL_DIR} ${IDIR_IP6TABLES}/{usr/lib,etc,usr/sbin}
+ ${INSTALL_DATA} ./files/firewall6.conf ${IDIR_IP6TABLES}/etc
+ ${CP} ${WRKINST}/usr/sbin/ip6tables ${IDIR_IP6TABLES}/usr/sbin
+ ${CP} ${WRKINST}/usr/lib/libip6tc.so* ${IDIR_IP6TABLES}/usr/lib
include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/iptables/files/firewall6.init b/package/iptables/files/firewall6.init
index bedb639a9..162b98a4f 100755
--- a/package/iptables/files/firewall6.init
+++ b/package/iptables/files/firewall6.init
@@ -1,5 +1,5 @@
#!/bin/sh
-#PKG iptables
+#PKG ip6tables
#INIT 45
. /etc/rc.conf
diff --git a/package/osiris/files/osirisd.postinst b/package/iptables/files/ip6tables.postinst
index 04e53ac93..09645104b 100644
--- a/package/osiris/files/osirisd.postinst
+++ b/package/iptables/files/ip6tables.postinst
@@ -1,3 +1,4 @@
#!/bin/sh
. $IPKG_INSTROOT/etc/functions.sh
-add_rcconf osirisd osirisd NO
+
+add_rcconf iptables firewall6 NO
diff --git a/package/iptables/files/iptables.postinst b/package/iptables/files/iptables.postinst
index b418e73f9..89b0af164 100644
--- a/package/iptables/files/iptables.postinst
+++ b/package/iptables/files/iptables.postinst
@@ -2,4 +2,3 @@
. $IPKG_INSTROOT/etc/functions.sh
add_rcconf iptables firewall NO
-add_rcconf iptables firewall6 NO
diff --git a/package/iptables/patches/patch-extensions_GNUmakefile_in b/package/iptables/patches/patch-extensions_GNUmakefile_in
new file mode 100644
index 000000000..cc922cc28
--- /dev/null
+++ b/package/iptables/patches/patch-extensions_GNUmakefile_in
@@ -0,0 +1,28 @@
+--- iptables-1.4.21.orig/extensions/GNUmakefile.in 2013-11-22 12:18:13.000000000 +0100
++++ iptables-1.4.21/extensions/GNUmakefile.in 2014-04-08 11:49:28.000000000 +0200
+@@ -21,7 +21,7 @@ regular_CPPFLAGS = @regular_CPPFLAGS@
+ kinclude_CPPFLAGS = @kinclude_CPPFLAGS@
+
+ AM_CFLAGS = ${regular_CFLAGS}
+-AM_CPPFLAGS = ${regular_CPPFLAGS} -I${top_builddir}/include -I${top_builddir} -I${top_srcdir}/include ${kinclude_CPPFLAGS} ${CPPFLAGS}
++AM_CPPFLAGS = ${regular_CPPFLAGS} -I${top_builddir}/include -I${top_builddir} -I${top_srcdir}/include ${kinclude_CPPFLAGS} ${CPPFLAGS} @libnetfilter_conntrack_CFLAGS@
+ AM_DEPFLAGS = -Wp,-MMD,$(@D)/.$(@F).d,-MT,$@
+ AM_LDFLAGS = @noundef_LDFLAGS@
+
+@@ -93,7 +93,7 @@ lib%.so: lib%.oo
+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $< -L../libxtables/.libs -lxtables ${$*_LIBADD};
+
+ lib%.oo: ${srcdir}/lib%.c
+- ${AM_VERBOSE_CC} ${CC} ${AM_CPPFLAGS} ${AM_DEPFLAGS} ${AM_CFLAGS} -D_INIT=lib$*_init -DPIC -fPIC ${CFLAGS} ${$*_CFLAGADD} -o $@ -c $<;
++ ${AM_VERBOSE_CC} ${CC} ${AM_CPPFLAGS} ${AM_DEPFLAGS} ${AM_CFLAGS} -D_INIT=lib$*_init -DPIC -fPIC ${CFLAGS} -o $@ -c $<;
+
+ libxt_NOTRACK.so: libxt_CT.so
+ ln -fs $< $@
+@@ -106,6 +106,7 @@ xt_statistic_LIBADD = -lm
+ @HAVE_LIBNETFILTER_CONNTRACK_TRUE@xt_connlabel_LIBADD = @libnetfilter_conntrack_LIBS@
+
+ @HAVE_LIBNETFILTER_CONNTRACK_TRUE@xt_connlabel_CFLAGADD = @libnetfilter_conntrack_CFLAGS@
++xt_connlabel_LIBADD = @libnetfilter_conntrack_LIBS@
+
+ #
+ # Static bits
diff --git a/package/iptables/patches/patch-libxtables_Makefile_am b/package/iptables/patches/patch-libxtables_Makefile_am
new file mode 100644
index 000000000..d05a100aa
--- /dev/null
+++ b/package/iptables/patches/patch-libxtables_Makefile_am
@@ -0,0 +1,11 @@
+--- iptables-1.4.21.orig/libxtables/Makefile.am 2013-11-22 12:18:13.000000000 +0100
++++ iptables-1.4.21/libxtables/Makefile.am 2014-04-08 11:51:20.000000000 +0200
+@@ -10,7 +10,7 @@ libxtables_la_LIBADD =
+ if ENABLE_STATIC
+ # With --enable-static, shipped extensions are linked into the main executable,
+ # so we need all the LIBADDs here too
+-libxtables_la_LIBADD += -lm
++libxtables_la_LIBADD += -lm ${libnetfilter_conntrack_LIBS}
+ endif
+ if ENABLE_SHARED
+ libxtables_la_CFLAGS = ${AM_CFLAGS}
diff --git a/package/kbd/Makefile b/package/kbd/Makefile
index 0293849de..7923783ca 100644
--- a/package/kbd/Makefile
+++ b/package/kbd/Makefile
@@ -4,17 +4,22 @@
include $(TOPDIR)/rules.mk
PKG_NAME:= kbd
-PKG_VERSION:= 1.15.3
-PKG_RELEASE:= 1
-PKG_MD5SUM:= 8143e179a0f3c25646ce5085e8777200
+PKG_VERSION:= 2.0.1
+PKG_RELEASE:= 2
+PKG_MD5SUM:= e9f2b7046312c11cec9e52e22f307b6a
PKG_DESCR:= keyboard utility
PKG_SECTION:= utils
-PKG_SITES:= ftp://ftp.altlinux.org/pub/people/legion/kbd/
+PKG_DEPENDS:= libcheck
+PKG_BUILDDEP:= flex-host bison-host check
+PKG_URL:= http://kbd-project.org/
+PKG_SITES:= http://kbd-project.org/download/
include $(TOPDIR)/mk/package.mk
$(eval $(call PKG_template,KBD,kbd,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+CONFIGURE_ARGS+= --disable-vlock
+
kbd-install:
$(INSTALL_DIR) $(IDIR_KBD)/usr/bin
$(INSTALL_BIN) $(WRKINST)/usr/bin/loadkeys \
diff --git a/package/kbd/patches/patch-src_dumpkeys_c b/package/kbd/patches/patch-src_dumpkeys_c
new file mode 100644
index 000000000..f77b2d841
--- /dev/null
+++ b/package/kbd/patches/patch-src_dumpkeys_c
@@ -0,0 +1,11 @@
+--- kbd-2.0.1.orig/src/dumpkeys.c 2013-08-27 22:45:33.000000000 +0200
++++ kbd-2.0.1/src/dumpkeys.c 2014-03-24 22:38:21.000000000 +0100
+@@ -3,6 +3,8 @@
+ *
+ * derived from version 0.81 - aeb@cwi.nl
+ */
++
++#include <stdarg.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <ctype.h>
diff --git a/package/kbd/patches/patch-src_kbdinfo_c b/package/kbd/patches/patch-src_kbdinfo_c
new file mode 100644
index 000000000..cd322eb3c
--- /dev/null
+++ b/package/kbd/patches/patch-src_kbdinfo_c
@@ -0,0 +1,46 @@
+--- kbd-2.0.1.orig/src/kbdinfo.c 2013-08-27 22:45:33.000000000 +0200
++++ kbd-2.0.1/src/kbdinfo.c 2014-03-24 13:24:51.000000000 +0100
+@@ -1,6 +1,6 @@
+ #include <stdio.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <unistd.h>
+ #include <sys/ioctl.h>
+ #include <linux/kd.h>
+@@ -75,7 +75,7 @@ main(int argc, char **argv) {
+
+ if (!strcasecmp("GETMODE", action)) {
+ if (ioctl(fd, KDGETMODE, &mode) == -1)
+- error(EXIT_FAILURE, errno, "ioctl");
++ err(EXIT_FAILURE, "ioctl");
+
+ switch (mode) {
+ case KD_TEXT: rc = answer("text"); break;
+@@ -84,7 +84,7 @@ main(int argc, char **argv) {
+
+ } else if (!strcasecmp("GKBMODE", action)) {
+ if (ioctl(fd, KDGKBMODE, &mode) == -1)
+- error(EXIT_FAILURE, errno, "ioctl");
++ err(EXIT_FAILURE, "ioctl");
+
+ switch (mode) {
+ case K_RAW: rc = answer("raw"); break;
+@@ -95,7 +95,7 @@ main(int argc, char **argv) {
+
+ } else if (!strcasecmp("GKBMETA", action)) {
+ if (ioctl(fd, KDGKBMETA, &mode) == -1)
+- error(EXIT_FAILURE, errno, "ioctl");
++ err(EXIT_FAILURE, "ioctl");
+
+ switch (mode) {
+ case K_METABIT: rc = answer("metabit"); break;
+@@ -104,7 +104,7 @@ main(int argc, char **argv) {
+
+ } else if (!strcasecmp("GKBLED", action)) {
+ if (ioctl(fd, KDGKBLED, &flags) == -1)
+- error(EXIT_FAILURE, errno, "ioctl");
++ err(EXIT_FAILURE, "ioctl");
+
+ mode = (flags & 0x7);
+
diff --git a/package/kbd/patches/patch-src_kbdrate_c b/package/kbd/patches/patch-src_kbdrate_c
new file mode 100644
index 000000000..8d267789d
--- /dev/null
+++ b/package/kbd/patches/patch-src_kbdrate_c
@@ -0,0 +1,10 @@
+--- kbd-2.0.1.orig/src/kbdrate.c 2013-08-27 22:45:33.000000000 +0200
++++ kbd-2.0.1/src/kbdrate.c 2014-03-24 12:40:34.000000000 +0100
+@@ -68,6 +68,7 @@ beats rebuilding the kernel!
+
+ */
+
++#include <fcntl.h>
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <stdlib.h>
diff --git a/package/kbd/patches/patch-src_libkeymap_analyze_l b/package/kbd/patches/patch-src_libkeymap_analyze_l
new file mode 100644
index 000000000..56396f23e
--- /dev/null
+++ b/package/kbd/patches/patch-src_libkeymap_analyze_l
@@ -0,0 +1,11 @@
+--- kbd-2.0.1.orig/src/libkeymap/analyze.l 2013-10-04 15:28:49.000000000 +0200
++++ kbd-2.0.1/src/libkeymap/analyze.l 2014-03-24 22:34:35.000000000 +0100
+@@ -12,6 +12,8 @@
+ %}
+
+ %top {
++#include <stdarg.h>
++#include <stdio.h>
+ #include "keymap.h"
+ int stack_push(struct lk_ctx *ctx, lkfile_t *fp, void *scanner);
+ int stack_pop(struct lk_ctx *ctx, void *scanner);
diff --git a/package/kbd/patches/patch-src_libkeymap_common_c b/package/kbd/patches/patch-src_libkeymap_common_c
new file mode 100644
index 000000000..bbdb8726f
--- /dev/null
+++ b/package/kbd/patches/patch-src_libkeymap_common_c
@@ -0,0 +1,8 @@
+--- kbd-2.0.1.orig/src/libkeymap/common.c 2013-08-27 22:45:33.000000000 +0200
++++ kbd-2.0.1/src/libkeymap/common.c 2014-03-24 21:30:58.000000000 +0100
+@@ -1,4 +1,5 @@
+ #include <string.h>
++#include <stdio.h>
+ #include <stdlib.h>
+ #include <stdarg.h>
+
diff --git a/package/kbd/patches/patch-src_libkeymap_dump_c b/package/kbd/patches/patch-src_libkeymap_dump_c
new file mode 100644
index 000000000..cf3aca4d8
--- /dev/null
+++ b/package/kbd/patches/patch-src_libkeymap_dump_c
@@ -0,0 +1,12 @@
+--- kbd-2.0.1.orig/src/libkeymap/dump.c 2013-08-27 22:45:33.000000000 +0200
++++ kbd-2.0.1/src/libkeymap/dump.c 2014-03-24 21:46:08.000000000 +0100
+@@ -9,6 +9,9 @@
+ * This file is covered by the GNU General Public License,
+ * which should be included with kbd as the file COPYING.
+ */
++
++#include <sys/types.h>
++#include <stdarg.h>
+ #include <stdio.h>
+ #include <string.h>
+ #include <ctype.h>
diff --git a/package/kbd/patches/patch-src_libkeymap_kernel_c b/package/kbd/patches/patch-src_libkeymap_kernel_c
new file mode 100644
index 000000000..70cff9735
--- /dev/null
+++ b/package/kbd/patches/patch-src_libkeymap_kernel_c
@@ -0,0 +1,13 @@
+--- kbd-2.0.1.orig/src/libkeymap/kernel.c 2013-08-27 22:45:33.000000000 +0200
++++ kbd-2.0.1/src/libkeymap/kernel.c 2014-03-24 21:45:01.000000000 +0100
+@@ -6,7 +6,10 @@
+ * This file is covered by the GNU General Public License,
+ * which should be included with kbd as the file COPYING.
+ */
++
++#include <stdarg.h>
+ #include <string.h>
++#include <stdio.h>
+ #include <errno.h>
+ #include <sys/ioctl.h>
+
diff --git a/package/kbd/patches/patch-src_libkeymap_kmap_c b/package/kbd/patches/patch-src_libkeymap_kmap_c
new file mode 100644
index 000000000..3f945e5da
--- /dev/null
+++ b/package/kbd/patches/patch-src_libkeymap_kmap_c
@@ -0,0 +1,10 @@
+--- kbd-2.0.1.orig/src/libkeymap/kmap.c 2013-10-07 16:13:31.000000000 +0200
++++ kbd-2.0.1/src/libkeymap/kmap.c 2014-03-24 21:46:56.000000000 +0100
+@@ -1,4 +1,7 @@
++#include <sys/types.h>
++#include <stdarg.h>
+ #include <stdlib.h>
++#include <stdio.h>
+ #include <string.h>
+
+ #include "nls.h"
diff --git a/package/kbd/patches/patch-src_libkeymap_ksyms_c b/package/kbd/patches/patch-src_libkeymap_ksyms_c
new file mode 100644
index 000000000..13c1be329
--- /dev/null
+++ b/package/kbd/patches/patch-src_libkeymap_ksyms_c
@@ -0,0 +1,8 @@
+--- kbd-2.0.1.orig/src/libkeymap/ksyms.c 2013-08-27 22:45:33.000000000 +0200
++++ kbd-2.0.1/src/libkeymap/ksyms.c 2014-03-24 22:37:11.000000000 +0100
+@@ -1,4 +1,5 @@
+ #include <linux/keyboard.h>
++#include <stdarg.h>
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdlib.h>
diff --git a/package/kbd/patches/patch-src_libkeymap_loadkeys_c b/package/kbd/patches/patch-src_libkeymap_loadkeys_c
new file mode 100644
index 000000000..ca368041b
--- /dev/null
+++ b/package/kbd/patches/patch-src_libkeymap_loadkeys_c
@@ -0,0 +1,8 @@
+--- kbd-2.0.1.orig/src/libkeymap/loadkeys.c 2013-08-27 22:45:33.000000000 +0200
++++ kbd-2.0.1/src/libkeymap/loadkeys.c 2014-03-24 21:48:35.000000000 +0100
+@@ -1,4 +1,5 @@
+ #include <errno.h>
++#include <stdarg.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <sys/ioctl.h>
diff --git a/package/kbd/patches/patch-src_libkeymap_parser_y b/package/kbd/patches/patch-src_libkeymap_parser_y
new file mode 100644
index 000000000..f06797961
--- /dev/null
+++ b/package/kbd/patches/patch-src_libkeymap_parser_y
@@ -0,0 +1,11 @@
+--- kbd-2.0.1.orig/src/libkeymap/parser.y 2013-10-07 16:13:39.000000000 +0200
++++ kbd-2.0.1/src/libkeymap/parser.y 2014-03-24 21:49:52.000000000 +0100
+@@ -12,6 +12,8 @@
+ %{
+ #define YY_HEADER_EXPORT_START_CONDITIONS 1
+
++#include <stdarg.h>
++
+ #include "nls.h"
+ #include "kbd.h"
+
diff --git a/package/kbd/patches/patch-src_libkeymap_summary_c b/package/kbd/patches/patch-src_libkeymap_summary_c
new file mode 100644
index 000000000..de2ec90b7
--- /dev/null
+++ b/package/kbd/patches/patch-src_libkeymap_summary_c
@@ -0,0 +1,13 @@
+--- kbd-2.0.1.orig/src/libkeymap/summary.c 2013-08-27 22:45:33.000000000 +0200
++++ kbd-2.0.1/src/libkeymap/summary.c 2014-03-24 21:47:48.000000000 +0100
+@@ -6,6 +6,10 @@
+ * This file is covered by the GNU General Public License,
+ * which should be included with kbd as the file COPYING.
+ */
++
++#include <sys/types.h>
++#include <stdarg.h>
++#include <stdio.h>
+ #include <string.h>
+ #include <errno.h>
+ #include <sys/ioctl.h>
diff --git a/package/kbd/patches/patch-src_loadkeys_c b/package/kbd/patches/patch-src_loadkeys_c
new file mode 100644
index 000000000..11d44825f
--- /dev/null
+++ b/package/kbd/patches/patch-src_loadkeys_c
@@ -0,0 +1,10 @@
+--- kbd-2.0.1.orig/src/loadkeys.c 2013-08-27 22:45:33.000000000 +0200
++++ kbd-2.0.1/src/loadkeys.c 2014-03-24 22:39:26.000000000 +0100
+@@ -10,6 +10,7 @@
+ * which should be included with kbd as the file COPYING.
+ */
+
++#include <stdarg.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
diff --git a/package/kbd/patches/patch-src_openvt_c b/package/kbd/patches/patch-src_openvt_c
new file mode 100644
index 000000000..efb8736cc
--- /dev/null
+++ b/package/kbd/patches/patch-src_openvt_c
@@ -0,0 +1,8 @@
+--- kbd-2.0.1.orig/src/openvt.c 2013-08-27 22:45:33.000000000 +0200
++++ kbd-2.0.1/src/openvt.c 2014-03-24 12:48:07.000000000 +0100
+@@ -1,3 +1,5 @@
++#include <fcntl.h>
++#include <limits.h>
+ #include <stdio.h>
+ #include <stdarg.h>
+ #include <unistd.h>
diff --git a/package/kbd/patches/patch-src_setvtrgb_c b/package/kbd/patches/patch-src_setvtrgb_c
new file mode 100644
index 000000000..fc72c2409
--- /dev/null
+++ b/package/kbd/patches/patch-src_setvtrgb_c
@@ -0,0 +1,70 @@
+--- kbd-2.0.1.orig/src/setvtrgb.c 2013-08-27 22:45:33.000000000 +0200
++++ kbd-2.0.1/src/setvtrgb.c 2014-03-24 13:10:47.000000000 +0100
+@@ -5,7 +5,7 @@
+ #include <sys/ioctl.h>
+ #include <linux/kd.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include "kbd.h"
+ #include "getfd.h"
+ #include "nls.h"
+@@ -60,7 +60,7 @@ set_colormap(unsigned char *colormap)
+
+ /* Apply the color map to the tty via ioctl */
+ if (ioctl(fd, PIO_CMAP, colormap) == -1)
+- error(EXIT_FAILURE, errno, "ioctl");
++ err(EXIT_FAILURE, "ioctl");
+
+ close(fd);
+ }
+@@ -72,7 +72,7 @@ parse_file(FILE *fd, const char *filenam
+ unsigned int rows, cols, val;
+
+ if ((cmap = calloc(3 * 16, sizeof(unsigned char))) == NULL)
+- error(EXIT_FAILURE, errno, "calloc");
++ err(EXIT_FAILURE, "calloc");
+
+ for (rows = 0; rows < 3; rows++) {
+ cols = 0;
+@@ -80,26 +80,26 @@ parse_file(FILE *fd, const char *filenam
+ while (cols < 16) {
+ if ((c = fscanf(fd, "%u", &val)) != 1) {
+ if (c == EOF)
+- error(EXIT_FAILURE, errno, "fscanf");
++ err(EXIT_FAILURE, "fscanf");
+
+- error(EXIT_FAILURE, 0, _("Error: %s: Invalid value in field %u in line %u."),
++ err(EXIT_FAILURE, _("Error: %s: Invalid value in field %u in line %u."),
+ filename, rows + 1, cols + 1);
+ }
+
+ cmap[rows + cols * 3] = (unsigned char) val;
+
+ if (cols < 15 && fgetc(fd) != ',')
+- error(EXIT_FAILURE, 0, _("Error: %s: Insufficient number of fields in line %u."),
++ err(EXIT_FAILURE, _("Error: %s: Insufficient number of fields in line %u."),
+ filename, rows + 1);
+ cols++;
+ }
+
+ if ((c = fgetc(fd)) == EOF)
+- error(EXIT_FAILURE, 0, _("Error: %s: Line %u has ended unexpectedly.\n"),
++ err(EXIT_FAILURE, _("Error: %s: Line %u has ended unexpectedly.\n"),
+ filename, rows + 1);
+
+ if (c != '\n')
+- error(EXIT_FAILURE, 0, _("Error: %s: Line %u is too long.\n"),
++ err(EXIT_FAILURE, _("Error: %s: Line %u is too long.\n"),
+ filename, rows + 1);
+ }
+ }
+@@ -141,7 +141,7 @@ main(int argc, char **argv) {
+
+ } else {
+ if ((fd = fopen(file, "r")) == NULL)
+- error(EXIT_FAILURE, errno, "fopen");
++ err(EXIT_FAILURE, "fopen");
+
+ parse_file(fd, file);
+ fclose(fd);
diff --git a/package/kbd/patches/patch-tests_libkeymap-bkeymap_c b/package/kbd/patches/patch-tests_libkeymap-bkeymap_c
new file mode 100644
index 000000000..66247229b
--- /dev/null
+++ b/package/kbd/patches/patch-tests_libkeymap-bkeymap_c
@@ -0,0 +1,7 @@
+--- kbd-2.0.1.orig/tests/libkeymap-bkeymap.c 2013-08-27 22:45:33.000000000 +0200
++++ kbd-2.0.1/tests/libkeymap-bkeymap.c 2014-03-24 22:43:01.000000000 +0100
+@@ -1,3 +1,4 @@
++#include <stdarg.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
diff --git a/package/kbd/patches/patch-tests_libkeymap-charset_c b/package/kbd/patches/patch-tests_libkeymap-charset_c
new file mode 100644
index 000000000..629bc06cd
--- /dev/null
+++ b/package/kbd/patches/patch-tests_libkeymap-charset_c
@@ -0,0 +1,7 @@
+--- kbd-2.0.1.orig/tests/libkeymap-charset.c 2013-08-27 22:45:33.000000000 +0200
++++ kbd-2.0.1/tests/libkeymap-charset.c 2014-03-24 22:51:27.000000000 +0100
+@@ -1,3 +1,4 @@
++#include <stdarg.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <check.h>
diff --git a/package/kbd/patches/patch-tests_libkeymap-dumpkeys_c b/package/kbd/patches/patch-tests_libkeymap-dumpkeys_c
new file mode 100644
index 000000000..85c242608
--- /dev/null
+++ b/package/kbd/patches/patch-tests_libkeymap-dumpkeys_c
@@ -0,0 +1,7 @@
+--- kbd-2.0.1.orig/tests/libkeymap-dumpkeys.c 2013-08-27 22:45:33.000000000 +0200
++++ kbd-2.0.1/tests/libkeymap-dumpkeys.c 2014-03-24 22:40:50.000000000 +0100
+@@ -1,3 +1,4 @@
++#include <stdarg.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
diff --git a/package/kbd/patches/patch-tests_libkeymap-init_c b/package/kbd/patches/patch-tests_libkeymap-init_c
new file mode 100644
index 000000000..7c9d9f1e1
--- /dev/null
+++ b/package/kbd/patches/patch-tests_libkeymap-init_c
@@ -0,0 +1,7 @@
+--- kbd-2.0.1.orig/tests/libkeymap-init.c 2013-08-27 22:45:33.000000000 +0200
++++ kbd-2.0.1/tests/libkeymap-init.c 2014-03-24 22:45:25.000000000 +0100
+@@ -1,3 +1,4 @@
++#include <stdarg.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <check.h>
diff --git a/package/kbd/patches/patch-tests_libkeymap-keys_c b/package/kbd/patches/patch-tests_libkeymap-keys_c
new file mode 100644
index 000000000..b2656fa25
--- /dev/null
+++ b/package/kbd/patches/patch-tests_libkeymap-keys_c
@@ -0,0 +1,7 @@
+--- kbd-2.0.1.orig/tests/libkeymap-keys.c 2013-08-27 22:45:33.000000000 +0200
++++ kbd-2.0.1/tests/libkeymap-keys.c 2014-03-24 22:49:03.000000000 +0100
+@@ -1,3 +1,4 @@
++#include <stdarg.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <check.h>
diff --git a/package/kbd/patches/patch-tests_libkeymap-kmap_c b/package/kbd/patches/patch-tests_libkeymap-kmap_c
new file mode 100644
index 000000000..a07347d55
--- /dev/null
+++ b/package/kbd/patches/patch-tests_libkeymap-kmap_c
@@ -0,0 +1,7 @@
+--- kbd-2.0.1.orig/tests/libkeymap-kmap.c 2013-08-27 22:45:33.000000000 +0200
++++ kbd-2.0.1/tests/libkeymap-kmap.c 2014-03-24 22:46:30.000000000 +0100
+@@ -1,3 +1,4 @@
++#include <stdarg.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <check.h>
diff --git a/package/kbd/patches/patch-tests_libkeymap-mktable_c b/package/kbd/patches/patch-tests_libkeymap-mktable_c
new file mode 100644
index 000000000..adc5b722d
--- /dev/null
+++ b/package/kbd/patches/patch-tests_libkeymap-mktable_c
@@ -0,0 +1,7 @@
+--- kbd-2.0.1.orig/tests/libkeymap-mktable.c 2013-08-27 22:45:33.000000000 +0200
++++ kbd-2.0.1/tests/libkeymap-mktable.c 2014-03-24 22:41:52.000000000 +0100
+@@ -1,3 +1,4 @@
++#include <stdarg.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
diff --git a/package/kbd/patches/patch-tests_libkeymap-parse_c b/package/kbd/patches/patch-tests_libkeymap-parse_c
new file mode 100644
index 000000000..53293e773
--- /dev/null
+++ b/package/kbd/patches/patch-tests_libkeymap-parse_c
@@ -0,0 +1,7 @@
+--- kbd-2.0.1.orig/tests/libkeymap-parse.c 2013-10-07 14:55:01.000000000 +0200
++++ kbd-2.0.1/tests/libkeymap-parse.c 2014-03-24 22:50:11.000000000 +0100
+@@ -1,3 +1,4 @@
++#include <stdarg.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <check.h>
diff --git a/package/kbd/patches/patch-tests_libkeymap-showmaps_c b/package/kbd/patches/patch-tests_libkeymap-showmaps_c
new file mode 100644
index 000000000..29bc6dea9
--- /dev/null
+++ b/package/kbd/patches/patch-tests_libkeymap-showmaps_c
@@ -0,0 +1,7 @@
+--- kbd-2.0.1.orig/tests/libkeymap-showmaps.c 2013-10-07 16:13:31.000000000 +0200
++++ kbd-2.0.1/tests/libkeymap-showmaps.c 2014-03-24 22:44:16.000000000 +0100
+@@ -1,3 +1,4 @@
++#include <stdarg.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
diff --git a/package/libatomic_ops/Makefile b/package/libatomic_ops/Makefile
new file mode 100644
index 000000000..9ead522d7
--- /dev/null
+++ b/package/libatomic_ops/Makefile
@@ -0,0 +1,30 @@
+# 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:= libatomic_ops
+PKG_VERSION:= 7.4.0
+PKG_RELEASE:= 1
+PKG_MD5SUM:= 59f9a7cc845dcc775e7b7901eb582766
+PKG_DESCR:= atomic operations library
+PKG_SECTION:= libs
+PKG_URL:= http://www.hboehm.info/gc/
+PKG_SITES:= http://www.hboehm.info/gc/gc_source/
+PKG_OPTS:= dev
+
+include $(TOPDIR)/mk/host.mk
+include $(TOPDIR)/mk/package.mk
+
+$(eval $(call HOST_template,LIBATOMIC_OPS,libatomic_ops,$(PKG_VERSION)-${PKG_RELEASE}))
+$(eval $(call PKG_template,LIBATOMIC_OPS,libatomic_ops,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
+
+HOST_STYLE:= auto
+
+libatomic_ops-install:
+ $(INSTALL_DIR) $(IDIR_LIBATOMIC_OPS)/usr/lib
+ $(CP) $(WRKINST)/usr/lib/libatomic_ops*.so* \
+ $(IDIR_LIBATOMIC_OPS)/usr/lib
+
+include ${TOPDIR}/mk/host-bottom.mk
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/libcdio/Makefile b/package/libcdio/Makefile
index 5584063b1..5ec7ffbf4 100644
--- a/package/libcdio/Makefile
+++ b/package/libcdio/Makefile
@@ -4,11 +4,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:= libcdio
-PKG_VERSION:= 0.90
-PKG_RELEASE:= 3
-PKG_MD5SUM:= 1b245b023fb03a58d030fd2800db3247
-PKG_DESCR:= a library for CD-ROM and CD image access
+PKG_VERSION:= 0.92
+PKG_RELEASE:= 1
+PKG_MD5SUM:= 86f3f2869c1d34e4c6e52db77992b918
+PKG_DESCR:= library for CD-ROM and CD image access
PKG_SECTION:= libs
+PKG_BUILDDEP:= libiconv-tiny
PKG_URL:= http://www.gnu.org/software/libcdio
PKG_SITES:= ${MASTER_SITE_GNU:=libcdio/}
PKG_OPTS:= dev
diff --git a/package/libcec/Makefile b/package/libcec/Makefile
index 4f07c5bae..e4380c197 100644
--- a/package/libcec/Makefile
+++ b/package/libcec/Makefile
@@ -5,13 +5,13 @@ include $(TOPDIR)/rules.mk
PKG_NAME:= libcec
PKG_VERSION:= 2.1.4
-PKG_RELEASE:= 2
+PKG_RELEASE:= 3
PKG_MD5SUM:= d65e52ab3295e9e4b73bf4580f3bd4f7
PKG_DESCR:= control your device with your TV remote control
PKG_SECTION:= libs
PKG_BUILDDEP:= autotool
PKG_URL:= http://libcec.pulse-eight.com/
-PKG_SITES:= http://www.openadk.org/distfiles
+PKG_SITES:= http://packages.pulse-eight.net/pulse/sources/libcec/
PKG_OPTS:= dev
PKG_DEPENDS_RASPBERRY_PI:= bcm2835-vc
diff --git a/package/libffi/Makefile b/package/libffi/Makefile
index 0b316720d..a7e957582 100644
--- a/package/libffi/Makefile
+++ b/package/libffi/Makefile
@@ -10,6 +10,7 @@ PKG_MD5SUM:= 45f3b6dbc9ee7c7dfbbbc5feba571529
PKG_DESCR:= Foreign Function Interface library
PKG_SECTION:= libs
PKG_BUILDDEP:= autotool libffi-host
+HOST_BUILDDEP:= autotool
PKG_URL:= http://sourceware.org/libffi/
PKG_SITES:= ftp://sourceware.org/pub/libffi/
PKG_OPTS:= dev
diff --git a/package/libgc/Makefile b/package/libgc/Makefile
new file mode 100644
index 000000000..731c7f98b
--- /dev/null
+++ b/package/libgc/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:= libgc
+PKG_VERSION:= 7.4.0
+PKG_RELEASE:= 2
+PKG_MD5SUM:= f40d9a47c90d60791eeecb484f8df5ee
+PKG_DESCR:= garbage collector library
+PKG_SECTION:= libs
+PKG_BUILDDEP:= libatomic_ops
+HOST_BUILDDEP:= libatomic_ops-host
+PKG_URL:= http://www.hboehm.info/gc/
+PKG_SITES:= http://www.hboehm.info/gc/gc_source/
+PKG_OPTS:= dev
+
+DISTFILES= gc-${PKG_VERSION}.tar.gz
+WRKDIST= ${WRKDIR}/gc-${PKG_VERSION}
+
+include $(TOPDIR)/mk/host.mk
+include $(TOPDIR)/mk/package.mk
+
+$(eval $(call HOST_template,LIBGC,libgc,$(PKG_VERSION)-${PKG_RELEASE}))
+$(eval $(call PKG_template,LIBGC,libgc,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
+
+HOST_STYLE:= auto
+
+libgc-install:
+ $(INSTALL_DIR) $(IDIR_LIBGC)/usr/lib
+ $(CP) $(WRKINST)/usr/lib/libgc*.so* \
+ $(IDIR_LIBGC)/usr/lib
+
+include ${TOPDIR}/mk/host-bottom.mk
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/libgc/patches/patch-os_dep_c b/package/libgc/patches/patch-os_dep_c
new file mode 100644
index 000000000..6a5e00f87
--- /dev/null
+++ b/package/libgc/patches/patch-os_dep_c
@@ -0,0 +1,39 @@
+--- gc-7.4.0.orig/os_dep.c 2013-11-15 21:11:03.000000000 +0100
++++ gc-7.4.0/os_dep.c 2014-04-10 07:14:09.000000000 +0200
+@@ -16,36 +16,6 @@
+
+ #include "private/gc_priv.h"
+
+-#if defined(LINUX) && !defined(POWERPC) && !defined(NO_SIGCONTEXT_H)
+-# include <linux/version.h>
+-# if (LINUX_VERSION_CODE <= 0x10400)
+- /* Ugly hack to get struct sigcontext_struct definition. Required */
+- /* for some early 1.3.X releases. Will hopefully go away soon. */
+- /* in some later Linux releases, asm/sigcontext.h may have to */
+- /* be included instead. */
+-# define __KERNEL__
+-# include <asm/signal.h>
+-# undef __KERNEL__
+-# else
+- /* Kernels prior to 2.1.1 defined struct sigcontext_struct instead of */
+- /* struct sigcontext. libc6 (glibc2) uses "struct sigcontext" in */
+- /* prototypes, so we have to include the top-level sigcontext.h to */
+- /* make sure the former gets defined to be the latter if appropriate. */
+-# include <features.h>
+-# if 2 <= __GLIBC__
+-# if 2 == __GLIBC__ && 0 == __GLIBC_MINOR__
+- /* glibc 2.1 no longer has sigcontext.h. But signal.h */
+- /* has the right declaration for glibc 2.1. */
+-# include <sigcontext.h>
+-# endif /* 0 == __GLIBC_MINOR__ */
+-# else /* __GLIBC__ < 2 */
+- /* libc5 doesn't have <sigcontext.h>: go directly with the kernel */
+- /* one. Check LINUX_VERSION_CODE to see which we should reference. */
+-# include <asm/sigcontext.h>
+-# endif /* __GLIBC__ < 2 */
+-# endif
+-#endif /* LINUX && !POWERPC */
+-
+ #if !defined(OS2) && !defined(PCR) && !defined(AMIGA) && !defined(MACOS) \
+ && !defined(MSWINCE) && !defined(__CC_ARM)
+ # include <sys/types.h>
diff --git a/package/libjasper/Makefile b/package/libjasper/Makefile
index fe9bb528f..e4b45a1fd 100644
--- a/package/libjasper/Makefile
+++ b/package/libjasper/Makefile
@@ -20,6 +20,8 @@ include $(TOPDIR)/mk/package.mk
$(eval $(call PKG_template,LIBJASPER,libjasper,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
+XAKE_FLAGS+= GCC_HONOUR_COPTS=s
+
libjasper-install:
$(INSTALL_DIR) $(IDIR_LIBJASPER)/usr/lib
$(CP) $(WRKINST)/usr/lib/libjasper*.so* \
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/libmodplug/Makefile b/package/libmodplug/Makefile
index f08435ee4..421243c03 100644
--- a/package/libmodplug/Makefile
+++ b/package/libmodplug/Makefile
@@ -4,13 +4,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:= libmodplug
-PKG_VERSION:= 0.8.8.4
-PKG_RELEASE:= 2
-PKG_MD5SUM:= fddc3c704c5489de2a3cf0fedfec59db
+PKG_VERSION:= 0.8.8.5
+PKG_RELEASE:= 1
+PKG_MD5SUM:= 5f30241db109d647781b784e62ddfaa1
PKG_DESCR:= a MOD player library
PKG_SECTION:= libs
PKG_URL:= http://modplug-xmms.sourceforge.net
-PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=modplug-xmms/libmodplug/0.8.8.4/}
+PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=modplug-xmms/libmodplug/0.8.8.5/}
PKG_OPTS:= dev
include $(TOPDIR)/mk/package.mk
diff --git a/package/libnetfilter_conntrack/Makefile b/package/libnetfilter_conntrack/Makefile
index 8de196436..90c74f5c1 100644
--- a/package/libnetfilter_conntrack/Makefile
+++ b/package/libnetfilter_conntrack/Makefile
@@ -4,13 +4,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:= libnetfilter_conntrack
-PKG_VERSION:= 1.0.3
+PKG_VERSION:= 1.0.4
PKG_RELEASE:= 2
-PKG_MD5SUM:= 73394a3d8d0cfecc6abb6027b4792d52
+PKG_MD5SUM:= 18cf80c4b339a3285e78822dbd4f08d7
PKG_DESCR:= API to connection tracking state table
PKG_SECTION:= libs
-PKG_DEPENDS:= libnfnetlink
-PKG_BUILDDEP:= libnfnetlink
+PKG_DEPENDS:= libnfnetlink libmnl
+PKG_BUILDDEP:= libnfnetlink libmnl
PKG_URL:= http://www.netfilter.org/projects/libnetfilter_conntrack/
PKG_SITES:= http://www.netfilter.org/projects/libnetfilter_conntrack/files/
PKG_OPTS:= dev
diff --git a/package/libnetfilter_conntrack/patches/patch-include_libnetfilter_conntrack_libnetfilter_conntrack_h b/package/libnetfilter_conntrack/patches/patch-include_libnetfilter_conntrack_libnetfilter_conntrack_h
new file mode 100644
index 000000000..b8d557cb7
--- /dev/null
+++ b/package/libnetfilter_conntrack/patches/patch-include_libnetfilter_conntrack_libnetfilter_conntrack_h
@@ -0,0 +1,228 @@
+--- libnetfilter_conntrack-1.0.4.orig/include/libnetfilter_conntrack/libnetfilter_conntrack.h 2013-08-06 15:22:55.000000000 +0200
++++ libnetfilter_conntrack-1.0.4/include/libnetfilter_conntrack/libnetfilter_conntrack.h 2014-04-10 14:29:23.000000000 +0200
+@@ -10,6 +10,7 @@
+ #ifndef _LIBNETFILTER_CONNTRACK_H_
+ #define _LIBNETFILTER_CONNTRACK_H_
+
++#include <stdint.h>
+ #include <netinet/in.h>
+ #include <libnfnetlink/linux_nfnetlink.h>
+ #include <libnfnetlink/libnfnetlink.h>
+@@ -37,9 +38,9 @@ struct nfct_handle;
+ /*
+ * [Open|close] a conntrack handler
+ */
+-extern struct nfct_handle *nfct_open(u_int8_t, unsigned);
++extern struct nfct_handle *nfct_open(uint8_t, unsigned);
+ extern struct nfct_handle *nfct_open_nfnl(struct nfnl_handle *nfnlh,
+- u_int8_t subsys_id,
++ uint8_t subsys_id,
+ unsigned int subscriptions);
+ extern int nfct_close(struct nfct_handle *cth);
+
+@@ -160,31 +161,31 @@ enum nf_conntrack_attr_grp {
+ };
+
+ struct nfct_attr_grp_ipv4 {
+- u_int32_t src, dst;
++ uint32_t src, dst;
+ };
+
+ struct nfct_attr_grp_ipv6 {
+- u_int32_t src[4], dst[4];
++ uint32_t src[4], dst[4];
+ };
+
+ struct nfct_attr_grp_port {
+- u_int16_t sport, dport;
++ uint16_t sport, dport;
+ };
+
+ struct nfct_attr_grp_icmp {
+- u_int16_t id;
+- u_int8_t code, type;
++ uint16_t id;
++ uint8_t code, type;
+ };
+
+ struct nfct_attr_grp_ctrs {
+- u_int64_t packets;
+- u_int64_t bytes;
++ uint64_t packets;
++ uint64_t bytes;
+ };
+
+ union nfct_attr_grp_addr {
+- u_int32_t ip;
+- u_int32_t ip6[4];
+- u_int32_t addr[4];
++ uint32_t ip;
++ uint32_t ip6[4];
++ uint32_t addr[4];
+ };
+
+ /* message type */
+@@ -302,19 +303,19 @@ extern void nfct_set_attr(struct nf_conn
+
+ extern void nfct_set_attr_u8(struct nf_conntrack *ct,
+ const enum nf_conntrack_attr type,
+- u_int8_t value);
++ uint8_t value);
+
+ extern void nfct_set_attr_u16(struct nf_conntrack *ct,
+ const enum nf_conntrack_attr type,
+- u_int16_t value);
++ uint16_t value);
+
+ extern void nfct_set_attr_u32(struct nf_conntrack *ct,
+ const enum nf_conntrack_attr type,
+- u_int32_t value);
++ uint32_t value);
+
+ extern void nfct_set_attr_u64(struct nf_conntrack *ct,
+ const enum nf_conntrack_attr type,
+- u_int64_t value);
++ uint64_t value);
+
+ extern void nfct_set_attr_l(struct nf_conntrack *ct,
+ const enum nf_conntrack_attr type,
+@@ -325,16 +326,16 @@ extern void nfct_set_attr_l(struct nf_co
+ extern const void *nfct_get_attr(const struct nf_conntrack *ct,
+ const enum nf_conntrack_attr type);
+
+-extern u_int8_t nfct_get_attr_u8(const struct nf_conntrack *ct,
++extern uint8_t nfct_get_attr_u8(const struct nf_conntrack *ct,
+ const enum nf_conntrack_attr type);
+
+-extern u_int16_t nfct_get_attr_u16(const struct nf_conntrack *ct,
++extern uint16_t nfct_get_attr_u16(const struct nf_conntrack *ct,
+ const enum nf_conntrack_attr type);
+
+-extern u_int32_t nfct_get_attr_u32(const struct nf_conntrack *ct,
++extern uint32_t nfct_get_attr_u32(const struct nf_conntrack *ct,
+ const enum nf_conntrack_attr type);
+
+-extern u_int64_t nfct_get_attr_u64(const struct nf_conntrack *ct,
++extern uint64_t nfct_get_attr_u64(const struct nf_conntrack *ct,
+ const enum nf_conntrack_attr type);
+
+ /* checker */
+@@ -477,20 +478,20 @@ extern struct nfct_filter *nfct_filter_c
+ extern void nfct_filter_destroy(struct nfct_filter *filter);
+
+ struct nfct_filter_proto {
+- u_int16_t proto;
+- u_int16_t state;
++ uint16_t proto;
++ uint16_t state;
+ };
+ struct nfct_filter_ipv4 {
+- u_int32_t addr;
+- u_int32_t mask;
++ uint32_t addr;
++ uint32_t mask;
+ };
+ struct nfct_filter_ipv6 {
+- u_int32_t addr[4];
+- u_int32_t mask[4];
++ uint32_t addr[4];
++ uint32_t mask[4];
+ };
+
+ enum nfct_filter_attr {
+- NFCT_FILTER_L4PROTO = 0, /* u_int32_t */
++ NFCT_FILTER_L4PROTO = 0, /* uint32_t */
+ NFCT_FILTER_L4PROTO_STATE, /* struct nfct_filter_proto */
+ NFCT_FILTER_SRC_IPV4, /* struct nfct_filter_ipv4 */
+ NFCT_FILTER_DST_IPV4, /* struct nfct_filter_ipv4 */
+@@ -505,7 +506,7 @@ extern void nfct_filter_add_attr(struct
+
+ extern void nfct_filter_add_attr_u32(struct nfct_filter *filter,
+ const enum nfct_filter_attr attr,
+- const u_int32_t value);
++ const uint32_t value);
+
+ enum nfct_filter_logic {
+ NFCT_FILTER_LOGIC_POSITIVE,
+@@ -525,13 +526,13 @@ extern int nfct_filter_detach(int fd);
+ struct nfct_filter_dump;
+
+ struct nfct_filter_dump_mark {
+- u_int32_t val;
+- u_int32_t mask;
++ uint32_t val;
++ uint32_t mask;
+ };
+
+ enum nfct_filter_dump_attr {
+ NFCT_FILTER_DUMP_MARK = 0, /* struct nfct_filter_dump_mark */
+- NFCT_FILTER_DUMP_L3NUM, /* u_int8_t */
++ NFCT_FILTER_DUMP_L3NUM, /* uint8_t */
+ NFCT_FILTER_DUMP_MAX
+ };
+
+@@ -545,7 +546,7 @@ void nfct_filter_dump_set_attr(struct nf
+
+ void nfct_filter_dump_set_attr_u8(struct nfct_filter_dump *filter_dump,
+ const enum nfct_filter_dump_attr type,
+- u_int8_t data);
++ uint8_t data);
+
+ /* low level API: netlink functions */
+
+@@ -553,8 +554,8 @@ extern __attribute__((deprecated)) int
+ nfct_build_conntrack(struct nfnl_subsys_handle *ssh,
+ void *req,
+ size_t size,
+- u_int16_t type,
+- u_int16_t flags,
++ uint16_t type,
++ uint16_t flags,
+ const struct nf_conntrack *ct);
+
+ extern __attribute__((deprecated))
+@@ -640,27 +641,27 @@ extern void nfexp_set_attr(struct nf_exp
+
+ extern void nfexp_set_attr_u8(struct nf_expect *exp,
+ const enum nf_expect_attr type,
+- u_int8_t value);
++ uint8_t value);
+
+ extern void nfexp_set_attr_u16(struct nf_expect *exp,
+ const enum nf_expect_attr type,
+- u_int16_t value);
++ uint16_t value);
+
+ extern void nfexp_set_attr_u32(struct nf_expect *exp,
+ const enum nf_expect_attr type,
+- u_int32_t value);
++ uint32_t value);
+
+ /* getter */
+ extern const void *nfexp_get_attr(const struct nf_expect *exp,
+ const enum nf_expect_attr type);
+
+-extern u_int8_t nfexp_get_attr_u8(const struct nf_expect *exp,
++extern uint8_t nfexp_get_attr_u8(const struct nf_expect *exp,
+ const enum nf_expect_attr type);
+
+-extern u_int16_t nfexp_get_attr_u16(const struct nf_expect *exp,
++extern uint16_t nfexp_get_attr_u16(const struct nf_expect *exp,
+ const enum nf_expect_attr type);
+
+-extern u_int32_t nfexp_get_attr_u32(const struct nf_expect *exp,
++extern uint32_t nfexp_get_attr_u32(const struct nf_expect *exp,
+ const enum nf_expect_attr type);
+
+ /* checker */
+@@ -700,8 +701,8 @@ extern __attribute__((deprecated))
+ int nfexp_build_expect(struct nfnl_subsys_handle *ssh,
+ void *req,
+ size_t size,
+- u_int16_t type,
+- u_int16_t flags,
++ uint16_t type,
++ uint16_t flags,
+ const struct nf_expect *exp);
+
+ extern __attribute__((deprecated))
diff --git a/package/libnetfilter_conntrack/patches/patch-src_main_c b/package/libnetfilter_conntrack/patches/patch-src_main_c
new file mode 100644
index 000000000..12ce50bc7
--- /dev/null
+++ b/package/libnetfilter_conntrack/patches/patch-src_main_c
@@ -0,0 +1,20 @@
+--- libnetfilter_conntrack-1.0.4.orig/src/main.c 2011-12-30 00:42:58.000000000 +0100
++++ libnetfilter_conntrack-1.0.4/src/main.c 2014-04-10 14:29:50.000000000 +0200
+@@ -13,7 +13,7 @@
+ #include "internal/internal.h"
+
+ struct nfct_handle *nfct_open_nfnl(struct nfnl_handle *nfnlh,
+- u_int8_t subsys_id,
++ uint8_t subsys_id,
+ unsigned int subscriptions)
+ {
+ struct nfct_handle *cth;
+@@ -81,7 +81,7 @@ out_free:
+ *
+ * On error, NULL is returned and errno is explicitly set.
+ */
+-struct nfct_handle *nfct_open(u_int8_t subsys_id, unsigned subscriptions)
++struct nfct_handle *nfct_open(uint8_t subsys_id, unsigned subscriptions)
+ {
+ struct nfnl_handle *nfnlh = nfnl_open();
+ struct nfct_handle *nfcth;
diff --git a/package/libnetfilter_queue/Makefile b/package/libnetfilter_queue/Makefile
index 40669556d..88ec8f129 100644
--- a/package/libnetfilter_queue/Makefile
+++ b/package/libnetfilter_queue/Makefile
@@ -21,6 +21,8 @@ include $(TOPDIR)/mk/package.mk
$(eval $(call PKG_template,LIBNETFILTER_QUEUE,libnetfilter-queue,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
+TARGET_CPPFLAGS+= -D_GNU_SOURCE
+
libnetfilter-queue-install:
$(INSTALL_DIR) $(IDIR_LIBNETFILTER_QUEUE)/usr/lib
$(CP) $(WRKINST)/usr/lib/libnetfilter_queue*so* \
diff --git a/package/libnfnetlink/Makefile b/package/libnfnetlink/Makefile
index 07fe6683a..0d4da94dd 100644
--- a/package/libnfnetlink/Makefile
+++ b/package/libnfnetlink/Makefile
@@ -5,9 +5,9 @@ include $(TOPDIR)/rules.mk
PKG_NAME:= libnfnetlink
PKG_VERSION:= 1.0.1
-PKG_RELEASE:= 2
+PKG_RELEASE:= 5
PKG_MD5SUM:= 98927583d2016a9fb1936fed992e2c5e
-PKG_DESCR:= low-level library for netfilter related kernel/userspace communication
+PKG_DESCR:= netfilter related kernel/userspace communication
PKG_SECTION:= libs
PKG_URL:= http://www.netfilter.org/projects/libnfnetlink/
PKG_SITES:= http://www.netfilter.org/projects/libnfnetlink/files/
diff --git a/package/libnfnetlink/patches/patch-include_libnfnetlink_libnfnetlink_h b/package/libnfnetlink/patches/patch-include_libnfnetlink_libnfnetlink_h
index 679be187d..d69bc16d0 100644
--- a/package/libnfnetlink/patches/patch-include_libnfnetlink_libnfnetlink_h
+++ b/package/libnfnetlink/patches/patch-include_libnfnetlink_libnfnetlink_h
@@ -1,10 +1,77 @@
--- libnfnetlink-1.0.1.orig/include/libnfnetlink/libnfnetlink.h 2010-05-09 23:31:56.000000000 +0200
-+++ libnfnetlink-1.0.1/include/libnfnetlink/libnfnetlink.h 2013-08-20 18:44:17.220339451 +0200
++++ libnfnetlink-1.0.1/include/libnfnetlink/libnfnetlink.h 2014-04-10 07:47:04.000000000 +0200
@@ -15,6 +15,7 @@
#define aligned_u64 unsigned long long __attribute__((aligned(8)))
#endif
-+#include <sys/types.h>
++#include <stdint.h>
#include <sys/socket.h> /* for sa_family_t */
#include <linux/netlink.h>
#include <libnfnetlink/linux_nfnetlink.h>
+@@ -55,7 +56,7 @@ struct nfnlhdr {
+ struct nfnl_callback {
+ int (*call)(struct nlmsghdr *nlh, struct nfattr *nfa[], void *data);
+ void *data;
+- u_int16_t attr_count;
++ uint16_t attr_count;
+ };
+
+ struct nfnl_handle;
+@@ -69,7 +70,7 @@ extern struct nfnl_handle *nfnl_open(voi
+ extern int nfnl_close(struct nfnl_handle *);
+
+ extern struct nfnl_subsys_handle *nfnl_subsys_open(struct nfnl_handle *,
+- u_int8_t, u_int8_t,
++ uint8_t, uint8_t,
+ unsigned int);
+ extern void nfnl_subsys_close(struct nfnl_subsys_handle *);
+
+@@ -88,8 +89,8 @@ extern int nfnl_sendiov(const struct nfn
+ const struct iovec *iov, unsigned int num,
+ unsigned int flags);
+ extern void nfnl_fill_hdr(struct nfnl_subsys_handle *, struct nlmsghdr *,
+- unsigned int, u_int8_t, u_int16_t, u_int16_t,
+- u_int16_t);
++ unsigned int, uint8_t, uint16_t, uint16_t,
++ uint16_t);
+ extern __attribute__((deprecated)) int
+ nfnl_talk(struct nfnl_handle *, struct nlmsghdr *, pid_t,
+ unsigned, struct nlmsghdr *,
+@@ -103,8 +104,8 @@ nfnl_listen(struct nfnl_handle *,
+ /* receiving */
+ extern ssize_t nfnl_recv(const struct nfnl_handle *h, unsigned char *buf, size_t len);
+ extern int nfnl_callback_register(struct nfnl_subsys_handle *,
+- u_int8_t type, struct nfnl_callback *cb);
+-extern int nfnl_callback_unregister(struct nfnl_subsys_handle *, u_int8_t type);
++ uint8_t type, struct nfnl_callback *cb);
++extern int nfnl_callback_unregister(struct nfnl_subsys_handle *, uint8_t type);
+ extern int nfnl_handle_packet(struct nfnl_handle *, char *buf, int len);
+
+ /* parsing */
+@@ -180,12 +181,12 @@ extern int nfnl_query(struct nfnl_handle
+
+ /* nfnl attribute handling functions */
+ extern int nfnl_addattr_l(struct nlmsghdr *, int, int, const void *, int);
+-extern int nfnl_addattr8(struct nlmsghdr *, int, int, u_int8_t);
+-extern int nfnl_addattr16(struct nlmsghdr *, int, int, u_int16_t);
+-extern int nfnl_addattr32(struct nlmsghdr *, int, int, u_int32_t);
++extern int nfnl_addattr8(struct nlmsghdr *, int, int, uint8_t);
++extern int nfnl_addattr16(struct nlmsghdr *, int, int, uint16_t);
++extern int nfnl_addattr32(struct nlmsghdr *, int, int, uint32_t);
+ extern int nfnl_nfa_addattr_l(struct nfattr *, int, int, const void *, int);
+-extern int nfnl_nfa_addattr16(struct nfattr *, int, int, u_int16_t);
+-extern int nfnl_nfa_addattr32(struct nfattr *, int, int, u_int32_t);
++extern int nfnl_nfa_addattr16(struct nfattr *, int, int, uint16_t);
++extern int nfnl_nfa_addattr32(struct nfattr *, int, int, uint32_t);
+ extern int nfnl_parse_attr(struct nfattr **, int, struct nfattr *, int);
+ #define nfnl_parse_nested(tb, max, nfa) \
+ nfnl_parse_attr((tb), (max), NFA_DATA((nfa)), NFA_PAYLOAD((nfa)))
+@@ -197,7 +198,7 @@ extern int nfnl_parse_attr(struct nfattr
+ ({ (tail)->nfa_len = (void *) NLMSG_TAIL(nlh) - (void *) tail; })
+
+ extern void nfnl_build_nfa_iovec(struct iovec *iov, struct nfattr *nfa,
+- u_int16_t type, u_int32_t len,
++ uint16_t type, uint32_t len,
+ unsigned char *val);
+ extern unsigned int nfnl_rcvbufsiz(const struct nfnl_handle *h,
+ unsigned int size);
diff --git a/package/libnfnetlink/patches/patch-include_libnfnetlink_linux_nfnetlink_compat_h b/package/libnfnetlink/patches/patch-include_libnfnetlink_linux_nfnetlink_compat_h
new file mode 100644
index 000000000..2679e67c3
--- /dev/null
+++ b/package/libnfnetlink/patches/patch-include_libnfnetlink_linux_nfnetlink_compat_h
@@ -0,0 +1,22 @@
+--- libnfnetlink-1.0.1.orig/include/libnfnetlink/linux_nfnetlink_compat.h 2008-06-18 14:36:57.000000000 +0200
++++ libnfnetlink-1.0.1/include/libnfnetlink/linux_nfnetlink_compat.h 2014-04-08 09:00:23.000000000 +0200
+@@ -3,6 +3,8 @@
+ #ifndef __KERNEL__
+ /* Old nfnetlink macros for userspace */
+
++#include <stdint.h>
++
+ /* nfnetlink groups: Up to 32 maximum */
+ #define NF_NETLINK_CONNTRACK_NEW 0x00000001
+ #define NF_NETLINK_CONNTRACK_UPDATE 0x00000002
+@@ -20,8 +22,8 @@
+
+ struct nfattr
+ {
+- u_int16_t nfa_len;
+- u_int16_t nfa_type; /* we use 15 bits for the type, and the highest
++ uint16_t nfa_len;
++ uint16_t nfa_type; /* we use 15 bits for the type, and the highest
+ * bit to indicate whether the payload is nested */
+ };
+
diff --git a/package/libnfnetlink/patches/patch-include_libnfnetlink_linux_nfnetlink_h b/package/libnfnetlink/patches/patch-include_libnfnetlink_linux_nfnetlink_h
new file mode 100644
index 000000000..86b231660
--- /dev/null
+++ b/package/libnfnetlink/patches/patch-include_libnfnetlink_linux_nfnetlink_h
@@ -0,0 +1,41 @@
+--- libnfnetlink-1.0.1.orig/include/libnfnetlink/linux_nfnetlink.h 2008-06-18 14:36:57.000000000 +0200
++++ libnfnetlink-1.0.1/include/libnfnetlink/linux_nfnetlink.h 2014-04-08 09:31:12.000000000 +0200
+@@ -1,6 +1,6 @@
+ #ifndef _NFNETLINK_H
+ #define _NFNETLINK_H
+-#include <linux/types.h>
++#include <stdint.h>
+ #include <libnfnetlink/linux_nfnetlink_compat.h>
+
+ enum nfnetlink_groups {
+@@ -25,9 +25,9 @@ enum nfnetlink_groups {
+ /* General form of address family dependent message.
+ */
+ struct nfgenmsg {
+- u_int8_t nfgen_family; /* AF_xxx */
+- u_int8_t version; /* nfnetlink version */
+- u_int16_t res_id; /* resource id */
++ uint8_t nfgen_family; /* AF_xxx */
++ uint8_t version; /* nfnetlink version */
++ uint16_t res_id; /* resource id */
+ };
+
+ #define NFNETLINK_V0 0
+@@ -59,7 +59,7 @@ struct nfnl_callback
+ int (*call)(struct sock *nl, struct sk_buff *skb,
+ struct nlmsghdr *nlh, struct nlattr *cda[]);
+ const struct nla_policy *policy; /* netlink attribute policy */
+- const u_int16_t attr_count; /* number of nlattr's */
++ const uint16_t attr_count; /* number of nlattr's */
+ };
+
+ struct nfnetlink_subsystem
+@@ -76,7 +76,7 @@ extern int nfnetlink_subsys_unregister(c
+ extern int nfnetlink_has_listeners(unsigned int group);
+ extern int nfnetlink_send(struct sk_buff *skb, u32 pid, unsigned group,
+ int echo);
+-extern int nfnetlink_unicast(struct sk_buff *skb, u_int32_t pid, int flags);
++extern int nfnetlink_unicast(struct sk_buff *skb, uint32_t pid, int flags);
+
+ #define MODULE_ALIAS_NFNL_SUBSYS(subsys) \
+ MODULE_ALIAS("nfnetlink-subsys-" __stringify(subsys))
diff --git a/package/libnfnetlink/patches/patch-src_libnfnetlink_c b/package/libnfnetlink/patches/patch-src_libnfnetlink_c
new file mode 100644
index 000000000..006da1f6d
--- /dev/null
+++ b/package/libnfnetlink/patches/patch-src_libnfnetlink_c
@@ -0,0 +1,233 @@
+--- libnfnetlink-1.0.1.orig/src/libnfnetlink.c 2012-08-13 19:56:29.000000000 +0200
++++ libnfnetlink-1.0.1/src/libnfnetlink.c 2014-04-10 07:37:41.000000000 +0200
+@@ -38,6 +38,7 @@
+
+ #include <stdlib.h>
+ #include <stdio.h>
++#include <stdint.h>
+ #include <unistd.h>
+ #include <errno.h>
+ #include <string.h>
+@@ -72,9 +73,9 @@
+
+ struct nfnl_subsys_handle {
+ struct nfnl_handle *nfnlh;
+- u_int32_t subscriptions;
+- u_int8_t subsys_id;
+- u_int8_t cb_count;
++ uint32_t subscriptions;
++ uint8_t subsys_id;
++ uint8_t cb_count;
+ struct nfnl_callback *cb; /* array of callbacks */
+ };
+
+@@ -86,11 +87,11 @@ struct nfnl_handle {
+ int fd;
+ struct sockaddr_nl local;
+ struct sockaddr_nl peer;
+- u_int32_t subscriptions;
+- u_int32_t seq;
+- u_int32_t dump;
+- u_int32_t rcv_buffer_size; /* for nfnl_catch */
+- u_int32_t flags;
++ uint32_t subscriptions;
++ uint32_t seq;
++ uint32_t dump;
++ uint32_t rcv_buffer_size; /* for nfnl_catch */
++ uint32_t flags;
+ struct nlmsghdr *last_nlhdr;
+ struct nfnl_subsys_handle subsys[NFNL_MAX_SUBSYS+1];
+ };
+@@ -145,7 +146,7 @@ unsigned int nfnl_portid(const struct nf
+ static int recalc_rebind_subscriptions(struct nfnl_handle *nfnlh)
+ {
+ int i, err;
+- u_int32_t new_subscriptions = nfnlh->subscriptions;
++ uint32_t new_subscriptions = nfnlh->subscriptions;
+
+ for (i = 0; i < NFNL_MAX_SUBSYS; i++)
+ new_subscriptions |= nfnlh->subsys[i].subscriptions;
+@@ -273,8 +274,8 @@ void nfnl_set_rcv_buffer_size(struct nfn
+ * a valid address that points to a nfnl_subsys_handle structure is returned.
+ */
+ struct nfnl_subsys_handle *
+-nfnl_subsys_open(struct nfnl_handle *nfnlh, u_int8_t subsys_id,
+- u_int8_t cb_count, u_int32_t subscriptions)
++nfnl_subsys_open(struct nfnl_handle *nfnlh, uint8_t subsys_id,
++ uint8_t cb_count, uint32_t subscriptions)
+ {
+ struct nfnl_subsys_handle *ssh;
+
+@@ -435,10 +436,10 @@ int nfnl_sendiov(const struct nfnl_handl
+ */
+ void nfnl_fill_hdr(struct nfnl_subsys_handle *ssh,
+ struct nlmsghdr *nlh, unsigned int len,
+- u_int8_t family,
+- u_int16_t res_id,
+- u_int16_t msg_type,
+- u_int16_t msg_flags)
++ uint8_t family,
++ uint16_t res_id,
++ uint16_t msg_type,
++ uint16_t msg_flags)
+ {
+ assert(ssh);
+ assert(nlh);
+@@ -848,14 +849,14 @@ int nfnl_nfa_addattr_l(struct nfattr *nf
+ }
+
+ /**
+- * nfnl_addattr8 - Add u_int8_t attribute to nlmsghdr
++ * nfnl_addattr8 - Add uint8_t attribute to nlmsghdr
+ *
+ * @n: netlink message header to which attribute is to be added
+ * @maxlen: maximum length of netlink message header
+ * @type: type of new attribute
+ * @data: content of new attribute
+ */
+-int nfnl_addattr8(struct nlmsghdr *n, int maxlen, int type, u_int8_t data)
++int nfnl_addattr8(struct nlmsghdr *n, int maxlen, int type, uint8_t data)
+ {
+ assert(n);
+ assert(maxlen > 0);
+@@ -865,7 +866,7 @@ int nfnl_addattr8(struct nlmsghdr *n, in
+ }
+
+ /**
+- * nfnl_nfa_addattr16 - Add u_int16_t attribute to struct nfattr
++ * nfnl_nfa_addattr16 - Add uint16_t attribute to struct nfattr
+ *
+ * @nfa: struct nfattr
+ * @maxlen: maximal length of nfattr buffer
+@@ -874,7 +875,7 @@ int nfnl_addattr8(struct nlmsghdr *n, in
+ *
+ */
+ int nfnl_nfa_addattr16(struct nfattr *nfa, int maxlen, int type,
+- u_int16_t data)
++ uint16_t data)
+ {
+ assert(nfa);
+ assert(maxlen > 0);
+@@ -884,7 +885,7 @@ int nfnl_nfa_addattr16(struct nfattr *nf
+ }
+
+ /**
+- * nfnl_addattr16 - Add u_int16_t attribute to nlmsghdr
++ * nfnl_addattr16 - Add uint16_t attribute to nlmsghdr
+ *
+ * @n: netlink message header to which attribute is to be added
+ * @maxlen: maximum length of netlink message header
+@@ -893,7 +894,7 @@ int nfnl_nfa_addattr16(struct nfattr *nf
+ *
+ */
+ int nfnl_addattr16(struct nlmsghdr *n, int maxlen, int type,
+- u_int16_t data)
++ uint16_t data)
+ {
+ assert(n);
+ assert(maxlen > 0);
+@@ -903,7 +904,7 @@ int nfnl_addattr16(struct nlmsghdr *n, i
+ }
+
+ /**
+- * nfnl_nfa_addattr32 - Add u_int32_t attribute to struct nfattr
++ * nfnl_nfa_addattr32 - Add uint32_t attribute to struct nfattr
+ *
+ * @nfa: struct nfattr
+ * @maxlen: maximal length of nfattr buffer
+@@ -912,7 +913,7 @@ int nfnl_addattr16(struct nlmsghdr *n, i
+ *
+ */
+ int nfnl_nfa_addattr32(struct nfattr *nfa, int maxlen, int type,
+- u_int32_t data)
++ uint32_t data)
+ {
+ assert(nfa);
+ assert(maxlen > 0);
+@@ -922,7 +923,7 @@ int nfnl_nfa_addattr32(struct nfattr *nf
+ }
+
+ /**
+- * nfnl_addattr32 - Add u_int32_t attribute to nlmsghdr
++ * nfnl_addattr32 - Add uint32_t attribute to nlmsghdr
+ *
+ * @n: netlink message header to which attribute is to be added
+ * @maxlen: maximum length of netlink message header
+@@ -931,7 +932,7 @@ int nfnl_nfa_addattr32(struct nfattr *nf
+ *
+ */
+ int nfnl_addattr32(struct nlmsghdr *n, int maxlen, int type,
+- u_int32_t data)
++ uint32_t data)
+ {
+ assert(n);
+ assert(maxlen > 0);
+@@ -979,7 +980,7 @@ int nfnl_parse_attr(struct nfattr *tb[],
+ *
+ */
+ void nfnl_build_nfa_iovec(struct iovec *iov, struct nfattr *nfa,
+- u_int16_t type, u_int32_t len, unsigned char *val)
++ uint16_t type, uint32_t len, unsigned char *val)
+ {
+ assert(iov);
+ assert(nfa);
+@@ -1114,7 +1115,7 @@ struct nlmsghdr *nfnl_get_msg_next(struc
+ * appropiately.
+ */
+ int nfnl_callback_register(struct nfnl_subsys_handle *ssh,
+- u_int8_t type, struct nfnl_callback *cb)
++ uint8_t type, struct nfnl_callback *cb)
+ {
+ assert(ssh);
+ assert(cb);
+@@ -1137,7 +1138,7 @@ int nfnl_callback_register(struct nfnl_s
+ * On sucess, 0 is returned. On error, -1 is returned and errno is
+ * set appropiately.
+ */
+-int nfnl_callback_unregister(struct nfnl_subsys_handle *ssh, u_int8_t type)
++int nfnl_callback_unregister(struct nfnl_subsys_handle *ssh, uint8_t type)
+ {
+ assert(ssh);
+
+@@ -1160,8 +1161,8 @@ int nfnl_check_attributes(const struct n
+ assert(nfa);
+
+ int min_len;
+- u_int8_t type = NFNL_MSG_TYPE(nlh->nlmsg_type);
+- u_int8_t subsys_id = NFNL_SUBSYS_ID(nlh->nlmsg_type);
++ uint8_t type = NFNL_MSG_TYPE(nlh->nlmsg_type);
++ uint8_t subsys_id = NFNL_SUBSYS_ID(nlh->nlmsg_type);
+ const struct nfnl_subsys_handle *ssh;
+ struct nfnl_callback *cb;
+
+@@ -1211,8 +1212,8 @@ static int __nfnl_handle_msg(struct nfnl
+ int len)
+ {
+ struct nfnl_subsys_handle *ssh;
+- u_int8_t type = NFNL_MSG_TYPE(nlh->nlmsg_type);
+- u_int8_t subsys_id = NFNL_SUBSYS_ID(nlh->nlmsg_type);
++ uint8_t type = NFNL_MSG_TYPE(nlh->nlmsg_type);
++ uint8_t subsys_id = NFNL_SUBSYS_ID(nlh->nlmsg_type);
+ int err = 0;
+
+ if (subsys_id > NFNL_MAX_SUBSYS)
+@@ -1242,7 +1243,7 @@ int nfnl_handle_packet(struct nfnl_handl
+ {
+
+ while (len >= NLMSG_SPACE(0)) {
+- u_int32_t rlen;
++ uint32_t rlen;
+ struct nlmsghdr *nlh = (struct nlmsghdr *)buf;
+
+ if (nlh->nlmsg_len < sizeof(struct nlmsghdr)
+@@ -1284,8 +1285,8 @@ static int nfnl_is_error(struct nfnl_han
+ static int nfnl_step(struct nfnl_handle *h, struct nlmsghdr *nlh)
+ {
+ struct nfnl_subsys_handle *ssh;
+- u_int8_t type = NFNL_MSG_TYPE(nlh->nlmsg_type);
+- u_int8_t subsys_id = NFNL_SUBSYS_ID(nlh->nlmsg_type);
++ uint8_t type = NFNL_MSG_TYPE(nlh->nlmsg_type);
++ uint8_t subsys_id = NFNL_SUBSYS_ID(nlh->nlmsg_type);
+
+ /* Is this an error message? */
+ if (nfnl_is_error(h, nlh)) {
diff --git a/package/libnfs/Makefile b/package/libnfs/Makefile
index 2ad21801f..6a6b9e69f 100644
--- a/package/libnfs/Makefile
+++ b/package/libnfs/Makefile
@@ -4,9 +4,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:= libnfs
-PKG_VERSION:= 1.8.0
+PKG_VERSION:= 1.9.3
PKG_RELEASE:= 1
-PKG_MD5SUM:= 0f20c7c104aa2e2ee563169b7e164aab
+PKG_MD5SUM:= a07656eeca58ad8d4870da546745628a
PKG_DESCR:= NFS client library
PKG_SECTION:= libs
PKG_BUILDDEP:= autotool
diff --git a/package/libpciaccess/Makefile b/package/libpciaccess/Makefile
index 8b598d792..cc2df0005 100644
--- a/package/libpciaccess/Makefile
+++ b/package/libpciaccess/Makefile
@@ -4,9 +4,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:= libpciaccess
-PKG_VERSION:= 0.13.1
-PKG_RELEASE:= 2
-PKG_MD5SUM:= 3a95b70913621840bf8af616ea01d7d9
+PKG_VERSION:= 0.13.2
+PKG_RELEASE:= 1
+PKG_MD5SUM:= c49bd638c78fa4124e11432c1a94b5f4
PKG_DESCR:= X.org PCI access library
PKG_SECTION:= x11/libs
PKG_SITES:= ${MASTER_SITE_XORG}
diff --git a/package/libpciaccess/patches/patch-src_freebsd_pci_c b/package/libpciaccess/patches/patch-src_freebsd_pci_c
new file mode 100644
index 000000000..3a1c22fd1
--- /dev/null
+++ b/package/libpciaccess/patches/patch-src_freebsd_pci_c
@@ -0,0 +1,18 @@
+--- libpciaccess-0.13.2.orig/src/freebsd_pci.c 2013-07-21 00:54:34.000000000 +0200
++++ libpciaccess-0.13.2/src/freebsd_pci.c 2014-03-24 13:26:10.476152263 +0100
+@@ -579,6 +579,7 @@ pci_device_freebsd_open_legacy_io(struct
+
+ ret->base = base;
+ ret->size = size;
++ ret->is_legacy = 1;
+ return ret;
+ #elif defined(PCI_MAGIC_IO_RANGE)
+ ret->memory = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED,
+@@ -588,6 +589,7 @@ pci_device_freebsd_open_legacy_io(struct
+
+ ret->base = base;
+ ret->size = size;
++ ret->is_legacy = 1;
+ return ret;
+ #else
+ return NULL;
diff --git a/package/libpciaccess/patches/patch-src_linux_sysfs_c b/package/libpciaccess/patches/patch-src_linux_sysfs_c
index ad31ac509..eb91062c2 100644
--- a/package/libpciaccess/patches/patch-src_linux_sysfs_c
+++ b/package/libpciaccess/patches/patch-src_linux_sysfs_c
@@ -1,14 +1,11 @@
---- libpciaccess-0.13.1.orig/src/linux_sysfs.c 2012-04-09 19:02:57.000000000 +0200
-+++ libpciaccess-0.13.1/src/linux_sysfs.c 2013-12-01 18:26:04.000000000 +0100
-@@ -34,6 +34,7 @@
-
- #define _GNU_SOURCE
-
+--- libpciaccess-0.13.2.orig/src/linux_sysfs.c 2013-07-21 00:54:34.000000000 +0200
++++ libpciaccess-0.13.2/src/linux_sysfs.c 2014-03-24 21:01:44.000000000 +0100
+@@ -41,11 +41,12 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>
+#include <limits.h>
- #include <stdlib.h>
- #include <string.h>
- #include <stdio.h>
-@@ -45,7 +46,7 @@
+ #include <sys/mman.h>
#include <dirent.h>
#include <errno.h>
@@ -17,3 +14,125 @@
#include <sys/io.h>
#else
#define inb(x) -1
+@@ -759,6 +760,7 @@ pci_device_linux_sysfs_open_device_io(st
+
+ ret->base = base;
+ ret->size = size;
++ ret->is_legacy = 0;
+
+ return ret;
+ }
+@@ -796,6 +798,7 @@ pci_device_linux_sysfs_open_legacy_io(st
+
+ ret->base = base;
+ ret->size = size;
++ ret->is_legacy = 1;
+
+ return ret;
+ }
+@@ -813,10 +816,14 @@ pci_device_linux_sysfs_read32(struct pci
+ {
+ uint32_t ret;
+
+- if (handle->fd > -1)
+- pread(handle->fd, &ret, 4, port + handle->base);
+- else
++ if (handle->fd > -1) {
++ if (handle->is_legacy)
++ pread(handle->fd, &ret, 4, port + handle->base);
++ else
++ pread(handle->fd, &ret, 4, port);
++ } else {
+ ret = inl(port + handle->base);
++ }
+
+ return ret;
+ }
+@@ -826,10 +833,14 @@ pci_device_linux_sysfs_read16(struct pci
+ {
+ uint16_t ret;
+
+- if (handle->fd > -1)
+- pread(handle->fd, &ret, 2, port + handle->base);
+- else
++ if (handle->fd > -1) {
++ if (handle->is_legacy)
++ pread(handle->fd, &ret, 2, port + handle->base);
++ else
++ pread(handle->fd, &ret, 2, port);
++ } else {
+ ret = inw(port + handle->base);
++ }
+
+ return ret;
+ }
+@@ -839,10 +850,14 @@ pci_device_linux_sysfs_read8(struct pci_
+ {
+ uint8_t ret;
+
+- if (handle->fd > -1)
+- pread(handle->fd, &ret, 1, port + handle->base);
+- else
++ if (handle->fd > -1) {
++ if (handle->is_legacy)
++ pread(handle->fd, &ret, 1, port + handle->base);
++ else
++ pread(handle->fd, &ret, 1, port);
++ } else {
+ ret = inb(port + handle->base);
++ }
+
+ return ret;
+ }
+@@ -851,30 +866,42 @@ static void
+ pci_device_linux_sysfs_write32(struct pci_io_handle *handle, uint32_t port,
+ uint32_t data)
+ {
+- if (handle->fd > -1)
+- pwrite(handle->fd, &data, 4, port + handle->base);
+- else
++ if (handle->fd > -1) {
++ if (handle->is_legacy)
++ pwrite(handle->fd, &data, 4, port + handle->base);
++ else
++ pwrite(handle->fd, &data, 4, port);
++ } else {
+ outl(data, port + handle->base);
++ }
+ }
+
+ static void
+ pci_device_linux_sysfs_write16(struct pci_io_handle *handle, uint32_t port,
+ uint16_t data)
+ {
+- if (handle->fd > -1)
+- pwrite(handle->fd, &data, 2, port + handle->base);
+- else
++ if (handle->fd > -1) {
++ if (handle->is_legacy)
++ pwrite(handle->fd, &data, 2, port + handle->base);
++ else
++ pwrite(handle->fd, &data, 2, port);
++ } else {
+ outw(data, port + handle->base);
++ }
+ }
+
+ static void
+ pci_device_linux_sysfs_write8(struct pci_io_handle *handle, uint32_t port,
+ uint8_t data)
+ {
+- if (handle->fd > -1)
+- pwrite(handle->fd, &data, 1, port + handle->base);
+- else
++ if (handle->fd > -1) {
++ if (handle->is_legacy)
++ pwrite(handle->fd, &data, 1, port + handle->base);
++ else
++ pwrite(handle->fd, &data, 1, port);
++ } else {
+ outb(data, port + handle->base);
++ }
+ }
+
+ static int
diff --git a/package/libpciaccess/patches/patch-src_netbsd_pci_c b/package/libpciaccess/patches/patch-src_netbsd_pci_c
new file mode 100644
index 000000000..9b7a31b7e
--- /dev/null
+++ b/package/libpciaccess/patches/patch-src_netbsd_pci_c
@@ -0,0 +1,18 @@
+--- libpciaccess-0.13.2.orig/src/netbsd_pci.c 2013-07-21 00:54:34.000000000 +0200
++++ libpciaccess-0.13.2/src/netbsd_pci.c 2014-03-24 13:26:10.484152334 +0100
+@@ -733,6 +733,7 @@ pci_device_netbsd_open_legacy_io(struct
+
+ ret->base = base;
+ ret->size = size;
++ ret->is_legacy = 1;
+ return ret;
+ #elif defined(__amd64__)
+ struct x86_64_iopl_args ia;
+@@ -743,6 +744,7 @@ pci_device_netbsd_open_legacy_io(struct
+
+ ret->base = base;
+ ret->size = size;
++ ret->is_legacy = 1;
+ return ret;
+ #else
+ return NULL;
diff --git a/package/libpciaccess/patches/patch-src_openbsd_pci_c b/package/libpciaccess/patches/patch-src_openbsd_pci_c
new file mode 100644
index 000000000..0c7180b72
--- /dev/null
+++ b/package/libpciaccess/patches/patch-src_openbsd_pci_c
@@ -0,0 +1,26 @@
+--- libpciaccess-0.13.2.orig/src/openbsd_pci.c 2013-07-21 00:54:34.000000000 +0200
++++ libpciaccess-0.13.2/src/openbsd_pci.c 2014-03-24 13:26:10.484152334 +0100
+@@ -412,6 +412,7 @@ pci_device_openbsd_open_legacy_io(struct
+
+ ret->base = base;
+ ret->size = size;
++ ret->is_legacy = 1;
+ return ret;
+ #elif defined(__amd64__)
+ struct amd64_iopl_args ia;
+@@ -422,6 +423,7 @@ pci_device_openbsd_open_legacy_io(struct
+
+ ret->base = base;
+ ret->size = size;
++ ret->is_legacy = 1;
+ return ret;
+ #elif defined(PCI_MAGIC_IO_RANGE)
+ ret->memory = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED,
+@@ -431,6 +433,7 @@ pci_device_openbsd_open_legacy_io(struct
+
+ ret->base = base;
+ ret->size = size;
++ ret->is_legacy = 1;
+ return ret;
+ #else
+ return NULL;
diff --git a/package/libpciaccess/patches/patch-src_pciaccess_private_h b/package/libpciaccess/patches/patch-src_pciaccess_private_h
new file mode 100644
index 000000000..e3ec7d0f1
--- /dev/null
+++ b/package/libpciaccess/patches/patch-src_pciaccess_private_h
@@ -0,0 +1,10 @@
+--- libpciaccess-0.13.2.orig/src/pciaccess_private.h 2013-07-21 00:54:34.000000000 +0200
++++ libpciaccess-0.13.2/src/pciaccess_private.h 2014-03-24 13:26:10.492152406 +0100
+@@ -109,6 +109,7 @@ struct pci_io_handle {
+ pciaddr_t size;
+ void *memory;
+ int fd;
++ int is_legacy;
+ };
+
+ struct pci_device_private {
diff --git a/package/libpciaccess/patches/patch-src_solx_devfs_c b/package/libpciaccess/patches/patch-src_solx_devfs_c
new file mode 100644
index 000000000..f6ee2c03e
--- /dev/null
+++ b/package/libpciaccess/patches/patch-src_solx_devfs_c
@@ -0,0 +1,10 @@
+--- libpciaccess-0.13.2.orig/src/solx_devfs.c 2013-07-21 00:54:34.000000000 +0200
++++ libpciaccess-0.13.2/src/solx_devfs.c 2014-03-24 13:26:10.496152442 +0100
+@@ -911,6 +911,7 @@ pci_device_solx_devfs_open_legacy_io(str
+ if (sysi86(SI86V86, V86SC_IOPL, PS_IOPL) == 0) {
+ ret->base = base;
+ ret->size = size;
++ ret->is_legacy = 1;
+ return ret;
+ }
+ #endif
diff --git a/package/libpciaccess/patches/patch-src_x86_pci_c b/package/libpciaccess/patches/patch-src_x86_pci_c
new file mode 100644
index 000000000..07c18d419
--- /dev/null
+++ b/package/libpciaccess/patches/patch-src_x86_pci_c
@@ -0,0 +1,10 @@
+--- libpciaccess-0.13.2.orig/src/x86_pci.c 2013-07-21 00:54:34.000000000 +0200
++++ libpciaccess-0.13.2/src/x86_pci.c 2014-03-24 13:26:10.496152442 +0100
+@@ -558,6 +558,7 @@ pci_device_x86_open_legacy_io(struct pci
+
+ ret->base = base;
+ ret->size = size;
++ ret->is_legacy = 1;
+
+ return ret;
+ }
diff --git a/package/libpthread/Makefile b/package/libpthread/Makefile
index cdb84d5fe..50d8172d1 100644
--- a/package/libpthread/Makefile
+++ b/package/libpthread/Makefile
@@ -10,7 +10,7 @@ ifeq ($(ADK_TARGET_LIB_MUSL),y)
include ${TOPDIR}/toolchain/musl/Makefile.inc
endif
ifeq ($(ADK_TARGET_LIB_UCLIBC),y)
-include ${TOPDIR}/toolchain/uClibc/Makefile.inc
+include ${TOPDIR}/toolchain/uclibc/Makefile.inc
endif
PKG_NAME:= libpthread
@@ -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/librt/Makefile b/package/librt/Makefile
index cf646672f..a9bd0f313 100644
--- a/package/librt/Makefile
+++ b/package/librt/Makefile
@@ -7,7 +7,7 @@ ifeq ($(ADK_TARGET_LIB_GLIBC),y)
include ${TOPDIR}/toolchain/glibc/Makefile.inc
endif
ifeq ($(ADK_TARGET_LIB_UCLIBC),y)
-include ${TOPDIR}/toolchain/uClibc/Makefile.inc
+include ${TOPDIR}/toolchain/uclibc/Makefile.inc
endif
PKG_NAME:= librt
diff --git a/package/libssp/Makefile b/package/libssp/Makefile
index def4443e8..02d755b4b 100644
--- a/package/libssp/Makefile
+++ b/package/libssp/Makefile
@@ -7,11 +7,11 @@ ifeq ($(ADK_TARGET_LIB_GLIBC),y)
include ${TOPDIR}/toolchain/glibc/Makefile.inc
endif
ifeq ($(ADK_TARGET_LIB_UCLIBC),y)
-include ${TOPDIR}/toolchain/uClibc/Makefile.inc
+include ${TOPDIR}/toolchain/uclibc/Makefile.inc
endif
PKG_NAME:= libssp
-PKG_DESCR:= Stack smashing protection library
+PKG_DESCR:= stack smashing protection library
PKG_SECTION:= libs
PKG_OPTS:= noremove
diff --git a/package/libstdcxx/Makefile b/package/libstdcxx/Makefile
index 84f0a7aec..ebfebcaf3 100644
--- a/package/libstdcxx/Makefile
+++ b/package/libstdcxx/Makefile
@@ -8,7 +8,7 @@ else
ifeq ($(ADK_TARGET_LIB_MUSL),y)
include ${TOPDIR}/toolchain/musl/Makefile.inc
else
-include ${TOPDIR}/toolchain/uClibc/Makefile.inc
+include ${TOPDIR}/toolchain/uclibc/Makefile.inc
endif
endif
diff --git a/package/libthread_db/Makefile b/package/libthread_db/Makefile
index 773c4c8f2..dde7d45a8 100644
--- a/package/libthread_db/Makefile
+++ b/package/libthread_db/Makefile
@@ -10,7 +10,7 @@ ifeq ($(ADK_TARGET_LIB_MUSL),y)
include ${TOPDIR}/toolchain/musl/Makefile.inc
endif
ifeq ($(ADK_TARGET_LIB_UCLIBC),y)
-include ${TOPDIR}/toolchain/uClibc/Makefile.inc
+include ${TOPDIR}/toolchain/uclibc/Makefile.inc
endif
PKG_NAME:= libthread-db
diff --git a/package/libtirpc/Makefile b/package/libtirpc/Makefile
index a1bfab5d1..61ae3a9b5 100644
--- a/package/libtirpc/Makefile
+++ b/package/libtirpc/Makefile
@@ -5,7 +5,7 @@ include ${TOPDIR}/rules.mk
PKG_NAME:= libtirpc
PKG_VERSION:= 0.2.3
-PKG_RELEASE:= 2
+PKG_RELEASE:= 3
PKG_MD5SUM:= b70e6c12a369a91e69fcc3b9feb23d61
PKG_DESCR:= a transport independent RPC library
PKG_SECTION:= libs
@@ -15,8 +15,6 @@ PKG_URL:= http://sourceforge.net/projects/libtirpc/
PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=libtirpc/}
PKG_OPTS:= dev
-PKG_LIBC_DEPENDS:= uclibc glibc
-
DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tar.bz2
include ${TOPDIR}/mk/package.mk
diff --git a/package/libtirpc/patches/patch-src_auth_des_c b/package/libtirpc/patches/patch-src_auth_des_c
new file mode 100644
index 000000000..d91177fdc
--- /dev/null
+++ b/package/libtirpc/patches/patch-src_auth_des_c
@@ -0,0 +1,18 @@
+--- libtirpc-0.2.3.orig/src/auth_des.c 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/src/auth_des.c 2014-03-22 13:20:52.000000000 +0100
+@@ -38,7 +38,6 @@
+ #include <string.h>
+ #include <stdlib.h>
+ #include <unistd.h>
+-#include <sys/cdefs.h>
+ #include <rpc/des_crypt.h>
+ #include <syslog.h>
+ #include <rpc/types.h>
+@@ -52,7 +51,6 @@
+
+ #if defined(LIBC_SCCS) && !defined(lint)
+ #endif
+-#include <sys/cdefs.h>
+
+ #define USEC_PER_SEC 1000000
+ #define RTIME_TIMEOUT 5 /* seconds to wait for sync */
diff --git a/package/libtirpc/patches/patch-src_auth_none_c b/package/libtirpc/patches/patch-src_auth_none_c
new file mode 100644
index 000000000..d8fd74f3d
--- /dev/null
+++ b/package/libtirpc/patches/patch-src_auth_none_c
@@ -0,0 +1,10 @@
+--- libtirpc-0.2.3.orig/src/auth_none.c 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/src/auth_none.c 2014-03-22 13:20:53.000000000 +0100
+@@ -31,7 +31,6 @@
+ static char *sccsid = "@(#)auth_none.c 1.19 87/08/11 Copyr 1984 Sun Micro";
+ static char *sccsid = "@(#)auth_none.c 2.1 88/07/29 4.0 RPCSRC";
+ #endif
+-#include <sys/cdefs.h>
+ __FBSDID("$FreeBSD: src/lib/libc/rpc/auth_none.c,v 1.12 2002/03/22 23:18:35 obrien Exp $");
+ */
+
diff --git a/package/libtirpc/patches/patch-src_auth_time_c b/package/libtirpc/patches/patch-src_auth_time_c
index 5ce7de419..b6319db96 100644
--- a/package/libtirpc/patches/patch-src_auth_time_c
+++ b/package/libtirpc/patches/patch-src_auth_time_c
@@ -1,6 +1,14 @@
---- libtirpc-0.2.2.orig/src/auth_time.c 2011-05-02 14:10:40.000000000 +0200
-+++ libtirpc-0.2.2/src/auth_time.c 2012-03-22 19:02:30.422855534 +0100
-@@ -43,7 +43,7 @@
+--- libtirpc-0.2.3.orig/src/auth_time.c 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/src/auth_time.c 2014-03-22 13:20:53.000000000 +0100
+@@ -25,7 +25,6 @@
+ * needed to deal with TCP connections.
+ */
+
+-#include <sys/cdefs.h>
+ #include <stdio.h>
+ #include <syslog.h>
+ #include <string.h>
+@@ -43,7 +42,7 @@
//#include <clnt_soc.h>
#include <sys/select.h>
#undef NIS
@@ -9,7 +17,7 @@
#ifdef TESTING
-@@ -138,6 +138,7 @@ free_eps(eps, num)
+@@ -138,6 +137,7 @@ free_eps(eps, num)
* NIS+ server will call __rpc_get_time_offset() with the nis_server
* structure already populated.
*/
@@ -17,7 +25,7 @@
static nis_server *
get_server(sin, host, srv, eps, maxep)
struct sockaddr_in *sin;
-@@ -491,3 +492,4 @@ error:
+@@ -491,3 +491,4 @@ error:
return (time_valid);
}
diff --git a/package/libtirpc/patches/patch-src_auth_unix_c b/package/libtirpc/patches/patch-src_auth_unix_c
new file mode 100644
index 000000000..3d5fb990e
--- /dev/null
+++ b/package/libtirpc/patches/patch-src_auth_unix_c
@@ -0,0 +1,10 @@
+--- libtirpc-0.2.3.orig/src/auth_unix.c 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/src/auth_unix.c 2014-03-22 13:20:53.000000000 +0100
+@@ -26,7 +26,6 @@
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+-#include <sys/cdefs.h>
+
+ /*
+ * auth_unix.c, Implements UNIX style authentication parameters.
diff --git a/package/libtirpc/patches/patch-src_authdes_prot_c b/package/libtirpc/patches/patch-src_authdes_prot_c
new file mode 100644
index 000000000..f829ed45e
--- /dev/null
+++ b/package/libtirpc/patches/patch-src_authdes_prot_c
@@ -0,0 +1,7 @@
+--- libtirpc-0.2.3.orig/src/authdes_prot.c 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/src/authdes_prot.c 2014-03-22 13:20:53.000000000 +0100
+@@ -1,4 +1,3 @@
+-#include <sys/cdefs.h>
+ /*
+ * Copyright (c) 2009, Sun Microsystems, Inc.
+ * All rights reserved.
diff --git a/package/libtirpc/patches/patch-src_authunix_prot_c b/package/libtirpc/patches/patch-src_authunix_prot_c
new file mode 100644
index 000000000..178436474
--- /dev/null
+++ b/package/libtirpc/patches/patch-src_authunix_prot_c
@@ -0,0 +1,10 @@
+--- libtirpc-0.2.3.orig/src/authunix_prot.c 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/src/authunix_prot.c 2014-03-22 13:20:53.000000000 +0100
+@@ -26,7 +26,6 @@
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+-#include <sys/cdefs.h>
+
+ /*
+ * authunix_prot.c
diff --git a/package/libtirpc/patches/patch-src_bindresvport_c b/package/libtirpc/patches/patch-src_bindresvport_c
new file mode 100644
index 000000000..4e828a005
--- /dev/null
+++ b/package/libtirpc/patches/patch-src_bindresvport_c
@@ -0,0 +1,18 @@
+--- libtirpc-0.2.3.orig/src/bindresvport.c 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/src/bindresvport.c 2014-03-22 13:24:36.000000000 +0100
+@@ -26,7 +26,6 @@
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+-#include <sys/cdefs.h>
+
+ /*
+ * Copyright (c) 1987 by Sun Microsystems, Inc.
+@@ -38,6 +37,7 @@
+ #include <sys/socket.h>
+
+ #include <netinet/in.h>
++#include <netdb.h>
+
+ #include <errno.h>
+ #include <string.h>
diff --git a/package/libtirpc/patches/patch-src_clnt_bcast_c b/package/libtirpc/patches/patch-src_clnt_bcast_c
new file mode 100644
index 000000000..e803b1721
--- /dev/null
+++ b/package/libtirpc/patches/patch-src_clnt_bcast_c
@@ -0,0 +1,22 @@
+--- libtirpc-0.2.3.orig/src/clnt_bcast.c 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/src/clnt_bcast.c 2014-03-22 14:19:29.000000000 +0100
+@@ -28,7 +28,6 @@
+ /*
+ * Copyright (c) 1986-1991 by Sun Microsystems Inc.
+ */
+-#include <sys/cdefs.h>
+
+ /*
+ * clnt_bcast.c
+@@ -41,10 +40,8 @@
+ */
+ #include <sys/socket.h>
+ #include <sys/types.h>
+-#include <sys/queue.h>
+
+-/* new queue functions */
+-#include <misc/queue.h>
++#include "queue.h"
+
+ #include <net/if.h>
+ #include <netinet/in.h>
diff --git a/package/libtirpc/patches/patch-src_clnt_perror_c b/package/libtirpc/patches/patch-src_clnt_perror_c
new file mode 100644
index 000000000..5c3c9169a
--- /dev/null
+++ b/package/libtirpc/patches/patch-src_clnt_perror_c
@@ -0,0 +1,10 @@
+--- libtirpc-0.2.3.orig/src/clnt_perror.c 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/src/clnt_perror.c 2014-03-22 13:20:53.000000000 +0100
+@@ -27,7 +27,6 @@
+ */
+
+ /*
+-#include <sys/cdefs.h>
+ */
+ /*
+ * clnt_perror.c
diff --git a/package/libtirpc/patches/patch-src_clnt_simple_c b/package/libtirpc/patches/patch-src_clnt_simple_c
new file mode 100644
index 000000000..8db2f1b8e
--- /dev/null
+++ b/package/libtirpc/patches/patch-src_clnt_simple_c
@@ -0,0 +1,10 @@
+--- libtirpc-0.2.3.orig/src/clnt_simple.c 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/src/clnt_simple.c 2014-03-22 13:20:53.000000000 +0100
+@@ -29,7 +29,6 @@
+ * Copyright (c) 1986-1991 by Sun Microsystems Inc.
+ */
+
+-#include <sys/cdefs.h>
+
+ /*
+ * clnt_simple.c
diff --git a/package/libtirpc/patches/patch-src_crypt_client_c b/package/libtirpc/patches/patch-src_crypt_client_c
new file mode 100644
index 000000000..3768305f8
--- /dev/null
+++ b/package/libtirpc/patches/patch-src_crypt_client_c
@@ -0,0 +1,10 @@
+--- libtirpc-0.2.3.orig/src/crypt_client.c 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/src/crypt_client.c 2014-03-22 13:20:53.000000000 +0100
+@@ -30,7 +30,6 @@
+ * SUCH DAMAGE.
+ */
+
+-#include <sys/cdefs.h>
+
+ #include <err.h>
+ #include <sys/types.h>
diff --git a/package/libtirpc/patches/patch-src_des_crypt_c b/package/libtirpc/patches/patch-src_des_crypt_c
index 22c03d78b..c1c313dee 100644
--- a/package/libtirpc/patches/patch-src_des_crypt_c
+++ b/package/libtirpc/patches/patch-src_des_crypt_c
@@ -1,6 +1,10 @@
--- libtirpc-0.2.3.orig/src/des_crypt.c 2013-02-13 16:13:59.000000000 +0100
-+++ libtirpc-0.2.3/src/des_crypt.c 2013-08-12 16:47:07.000000000 +0200
-@@ -43,7 +43,7 @@ static char sccsid[] = "@(#)des_crypt.c
++++ libtirpc-0.2.3/src/des_crypt.c 2014-03-22 13:20:53.000000000 +0100
+@@ -39,11 +39,10 @@
+ static char sccsid[] = "@(#)des_crypt.c 2.2 88/08/10 4.0 RPCSRC; from 1.13 88/02/08 SMI";
+ #endif
+ #endif
+-#include <sys/cdefs.h>
static int common_crypt( char *, char *, unsigned, unsigned, struct desparams * );
int (*__des_crypt_LOCAL)() = 0;
@@ -9,7 +13,7 @@
/*
* Copy 8 bytes
*/
-@@ -145,10 +145,6 @@ common_crypt(key, buf, len, mode, desp)
+@@ -145,10 +144,6 @@ common_crypt(key, buf, len, mode, desp)
if (!__des_crypt_LOCAL(buf, len, desp)) {
return (DESERR_HWERROR);
}
diff --git a/package/libtirpc/patches/patch-src_des_soft_c b/package/libtirpc/patches/patch-src_des_soft_c
new file mode 100644
index 000000000..675a6a265
--- /dev/null
+++ b/package/libtirpc/patches/patch-src_des_soft_c
@@ -0,0 +1,9 @@
+--- libtirpc-0.2.3.orig/src/des_soft.c 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/src/des_soft.c 2014-03-22 13:20:53.000000000 +0100
+@@ -1,5 +1,4 @@
+-//#include <sys/cdefs.h>
+-
++//
+ /*
+ * Copyright (c) 2009, Sun Microsystems, Inc.
+ * All rights reserved.
diff --git a/package/libtirpc/patches/patch-src_getnetconfig_c b/package/libtirpc/patches/patch-src_getnetconfig_c
new file mode 100644
index 000000000..fb1f285a1
--- /dev/null
+++ b/package/libtirpc/patches/patch-src_getnetconfig_c
@@ -0,0 +1,10 @@
+--- libtirpc-0.2.3.orig/src/getnetconfig.c 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/src/getnetconfig.c 2014-03-22 13:20:53.000000000 +0100
+@@ -32,7 +32,6 @@
+
+ #include <pthread.h>
+ #include <reentrant.h>
+-#include <sys/cdefs.h>
+ #include <stdio.h>
+ #include <errno.h>
+ #include <netconfig.h>
diff --git a/package/libtirpc/patches/patch-src_getnetpath_c b/package/libtirpc/patches/patch-src_getnetpath_c
new file mode 100644
index 000000000..73788ea04
--- /dev/null
+++ b/package/libtirpc/patches/patch-src_getnetpath_c
@@ -0,0 +1,16 @@
+--- libtirpc-0.2.3.orig/src/getnetpath.c 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/src/getnetpath.c 2014-03-22 13:20:53.000000000 +0100
+@@ -25,13 +25,11 @@
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+-#include <sys/cdefs.h>
+
+ /*
+ * Copyright (c) 1989 by Sun Microsystems, Inc.
+ */
+
+-#include <sys/cdefs.h>
+ #include <stdio.h>
+ #include <errno.h>
+ #include <netconfig.h>
diff --git a/package/libtirpc/patches/patch-src_getpeereid_c b/package/libtirpc/patches/patch-src_getpeereid_c
new file mode 100644
index 000000000..1af375563
--- /dev/null
+++ b/package/libtirpc/patches/patch-src_getpeereid_c
@@ -0,0 +1,10 @@
+--- libtirpc-0.2.3.orig/src/getpeereid.c 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/src/getpeereid.c 2014-03-22 13:20:52.000000000 +0100
+@@ -24,7 +24,6 @@
+ * SUCH DAMAGE.
+ */
+
+-#include <sys/cdefs.h>
+
+ #include <sys/param.h>
+ #include <sys/socket.h>
diff --git a/package/libtirpc/patches/patch-src_getpublickey_c b/package/libtirpc/patches/patch-src_getpublickey_c
new file mode 100644
index 000000000..a41eca54a
--- /dev/null
+++ b/package/libtirpc/patches/patch-src_getpublickey_c
@@ -0,0 +1,10 @@
+--- libtirpc-0.2.3.orig/src/getpublickey.c 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/src/getpublickey.c 2014-03-22 13:20:53.000000000 +0100
+@@ -26,7 +26,6 @@
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+ /*
+-#include <sys/cdefs.h>
+ */
+
+ /*
diff --git a/package/libtirpc/patches/patch-src_key_call_c b/package/libtirpc/patches/patch-src_key_call_c
new file mode 100644
index 000000000..f7e7fb44d
--- /dev/null
+++ b/package/libtirpc/patches/patch-src_key_call_c
@@ -0,0 +1,10 @@
+--- libtirpc-0.2.3.orig/src/key_call.c 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/src/key_call.c 2014-03-22 13:20:52.000000000 +0100
+@@ -30,7 +30,6 @@
+ */
+
+
+-#include <sys/cdefs.h>
+
+ /*
+ * key_call.c, Interface to keyserver
diff --git a/package/libtirpc/patches/patch-src_key_prot_xdr_c b/package/libtirpc/patches/patch-src_key_prot_xdr_c
new file mode 100644
index 000000000..5dcf3f0f8
--- /dev/null
+++ b/package/libtirpc/patches/patch-src_key_prot_xdr_c
@@ -0,0 +1,10 @@
+--- libtirpc-0.2.3.orig/src/key_prot_xdr.c 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/src/key_prot_xdr.c 2014-03-22 13:20:53.000000000 +0100
+@@ -33,7 +33,6 @@
+ */
+ /* Copyright (c) 1990, 1991 Sun Microsystems, Inc. */
+
+-#include <sys/cdefs.h>
+
+ /*
+ * Compiled from key_prot.x using rpcgen.
diff --git a/package/libtirpc/patches/patch-src_mt_misc_c b/package/libtirpc/patches/patch-src_mt_misc_c
new file mode 100644
index 000000000..27e711159
--- /dev/null
+++ b/package/libtirpc/patches/patch-src_mt_misc_c
@@ -0,0 +1,8 @@
+--- libtirpc-0.2.3.orig/src/mt_misc.c 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/src/mt_misc.c 2014-03-22 13:20:53.000000000 +0100
+@@ -1,5 +1,4 @@
+
+-#include <sys/cdefs.h>
+ #include <pthread.h>
+ #include <reentrant.h>
+ #include <rpc/rpc.h>
diff --git a/package/libtirpc/patches/patch-src_pmap_clnt_c b/package/libtirpc/patches/patch-src_pmap_clnt_c
new file mode 100644
index 000000000..30b5deb86
--- /dev/null
+++ b/package/libtirpc/patches/patch-src_pmap_clnt_c
@@ -0,0 +1,10 @@
+--- libtirpc-0.2.3.orig/src/pmap_clnt.c 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/src/pmap_clnt.c 2014-03-22 13:20:53.000000000 +0100
+@@ -26,7 +26,6 @@
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+-#include <sys/cdefs.h>
+
+ /*
+ * pmap_clnt.c
diff --git a/package/libtirpc/patches/patch-src_pmap_getmaps_c b/package/libtirpc/patches/patch-src_pmap_getmaps_c
new file mode 100644
index 000000000..1d9c984be
--- /dev/null
+++ b/package/libtirpc/patches/patch-src_pmap_getmaps_c
@@ -0,0 +1,10 @@
+--- libtirpc-0.2.3.orig/src/pmap_getmaps.c 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/src/pmap_getmaps.c 2014-03-22 13:20:53.000000000 +0100
+@@ -26,7 +26,6 @@
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+-#include <sys/cdefs.h>
+
+ /*
+ * pmap_getmap.c
diff --git a/package/libtirpc/patches/patch-src_rpc_com_h b/package/libtirpc/patches/patch-src_rpc_com_h
new file mode 100644
index 000000000..c327a0152
--- /dev/null
+++ b/package/libtirpc/patches/patch-src_rpc_com_h
@@ -0,0 +1,31 @@
+--- libtirpc-0.2.3.orig/src/rpc_com.h 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/src/rpc_com.h 2014-03-22 13:20:53.000000000 +0100
+@@ -40,7 +40,6 @@
+ #ifndef _TIRPC_RPCCOM_H
+ #define _TIRPC_RPCCOM_H
+
+-#include <sys/cdefs.h>
+
+ /* #pragma ident "@(#)rpc_com.h 1.11 93/07/05 SMI" */
+
+@@ -54,7 +53,9 @@
+ #define __RPC_GETXID(now) ((u_int32_t)getpid() ^ (u_int32_t)(now)->tv_sec ^ \
+ (u_int32_t)(now)->tv_usec)
+
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern u_int __rpc_get_a_size(int);
+ extern int __rpc_dtbsize(void);
+ extern struct netconfig * __rpcgettp(int);
+@@ -90,6 +91,8 @@ void __xprt_set_raddr(SVCXPRT *, const s
+ SVCXPRT **__svc_xports;
+ int __svc_maxrec;
+
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ #endif /* _TIRPC_RPCCOM_H */
diff --git a/package/libtirpc/patches/patch-src_rpc_generic_c b/package/libtirpc/patches/patch-src_rpc_generic_c
new file mode 100644
index 000000000..aa567ce27
--- /dev/null
+++ b/package/libtirpc/patches/patch-src_rpc_generic_c
@@ -0,0 +1,10 @@
+--- libtirpc-0.2.3.orig/src/rpc_generic.c 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/src/rpc_generic.c 2014-03-22 13:20:53.000000000 +0100
+@@ -29,7 +29,6 @@
+ * Copyright (c) 1986-1991 by Sun Microsystems Inc.
+ */
+
+-#include <sys/cdefs.h>
+
+ /*
+ * rpc_generic.c, Miscl routines for RPC.
diff --git a/package/libtirpc/patches/patch-src_rpcb_st_xdr_c b/package/libtirpc/patches/patch-src_rpcb_st_xdr_c
new file mode 100644
index 000000000..30eeeee9d
--- /dev/null
+++ b/package/libtirpc/patches/patch-src_rpcb_st_xdr_c
@@ -0,0 +1,10 @@
+--- libtirpc-0.2.3.orig/src/rpcb_st_xdr.c 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/src/rpcb_st_xdr.c 2014-03-22 13:20:53.000000000 +0100
+@@ -35,7 +35,6 @@
+ * routines used with the rpcbind stats facility.
+ */
+
+-#include <sys/cdefs.h>
+
+ #include <rpc/rpc.h>
+
diff --git a/package/libtirpc/patches/patch-src_rpcdname_c b/package/libtirpc/patches/patch-src_rpcdname_c
new file mode 100644
index 000000000..b66b0a46f
--- /dev/null
+++ b/package/libtirpc/patches/patch-src_rpcdname_c
@@ -0,0 +1,10 @@
+--- libtirpc-0.2.3.orig/src/rpcdname.c 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/src/rpcdname.c 2014-03-22 13:20:53.000000000 +0100
+@@ -25,7 +25,6 @@
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+-#include <sys/cdefs.h>
+
+ /*
+ * rpcdname.c
diff --git a/package/libtirpc/patches/patch-src_svc_dg_c b/package/libtirpc/patches/patch-src_svc_dg_c
new file mode 100644
index 000000000..88622d951
--- /dev/null
+++ b/package/libtirpc/patches/patch-src_svc_dg_c
@@ -0,0 +1,10 @@
+--- libtirpc-0.2.3.orig/src/svc_dg.c 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/src/svc_dg.c 2014-03-22 13:20:52.000000000 +0100
+@@ -31,7 +31,6 @@
+ * Copyright (c) 1986-1991 by Sun Microsystems Inc.
+ */
+
+-#include <sys/cdefs.h>
+
+ /*
+ * svc_dg.c, Server side for connectionless RPC.
diff --git a/package/libtirpc/patches/patch-src_svc_simple_c b/package/libtirpc/patches/patch-src_svc_simple_c
new file mode 100644
index 000000000..ed994e4f5
--- /dev/null
+++ b/package/libtirpc/patches/patch-src_svc_simple_c
@@ -0,0 +1,10 @@
+--- libtirpc-0.2.3.orig/src/svc_simple.c 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/src/svc_simple.c 2014-03-22 13:20:53.000000000 +0100
+@@ -29,7 +29,6 @@
+ * Copyright (c) 1986-1991 by Sun Microsystems Inc.
+ */
+
+-#include <sys/cdefs.h>
+
+ /*
+ * svc_simple.c
diff --git a/package/libtirpc/patches/patch-src_svc_vc_c b/package/libtirpc/patches/patch-src_svc_vc_c
new file mode 100644
index 000000000..8e43f4b8d
--- /dev/null
+++ b/package/libtirpc/patches/patch-src_svc_vc_c
@@ -0,0 +1,10 @@
+--- libtirpc-0.2.3.orig/src/svc_vc.c 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/src/svc_vc.c 2014-03-22 13:20:53.000000000 +0100
+@@ -27,7 +27,6 @@
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+-#include <sys/cdefs.h>
+
+ /*
+ * svc_vc.c, Server side for Connection Oriented based RPC.
diff --git a/package/libtirpc/patches/patch-src_xdr_array_c b/package/libtirpc/patches/patch-src_xdr_array_c
new file mode 100644
index 000000000..dfa17d673
--- /dev/null
+++ b/package/libtirpc/patches/patch-src_xdr_array_c
@@ -0,0 +1,10 @@
+--- libtirpc-0.2.3.orig/src/xdr_array.c 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/src/xdr_array.c 2014-03-22 13:20:53.000000000 +0100
+@@ -27,7 +27,6 @@
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+-#include <sys/cdefs.h>
+
+ /*
+ * xdr_array.c, Generic XDR routines impelmentation.
diff --git a/package/libtirpc/patches/patch-src_xdr_c b/package/libtirpc/patches/patch-src_xdr_c
new file mode 100644
index 000000000..22211757b
--- /dev/null
+++ b/package/libtirpc/patches/patch-src_xdr_c
@@ -0,0 +1,10 @@
+--- libtirpc-0.2.3.orig/src/xdr.c 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/src/xdr.c 2014-03-22 13:20:53.000000000 +0100
+@@ -26,7 +26,6 @@
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+-#include <sys/cdefs.h>
+
+ /*
+ * xdr.c, Generic XDR routines implementation.
diff --git a/package/libtirpc/patches/patch-src_xdr_float_c b/package/libtirpc/patches/patch-src_xdr_float_c
new file mode 100644
index 000000000..db18981e1
--- /dev/null
+++ b/package/libtirpc/patches/patch-src_xdr_float_c
@@ -0,0 +1,10 @@
+--- libtirpc-0.2.3.orig/src/xdr_float.c 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/src/xdr_float.c 2014-03-22 13:20:53.000000000 +0100
+@@ -27,7 +27,6 @@
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+-#include <sys/cdefs.h>
+
+ /*
+ * xdr_float.c, Generic XDR routines implementation.
diff --git a/package/libtirpc/patches/patch-src_xdr_mem_c b/package/libtirpc/patches/patch-src_xdr_mem_c
new file mode 100644
index 000000000..670bba01e
--- /dev/null
+++ b/package/libtirpc/patches/patch-src_xdr_mem_c
@@ -0,0 +1,10 @@
+--- libtirpc-0.2.3.orig/src/xdr_mem.c 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/src/xdr_mem.c 2014-03-22 13:20:53.000000000 +0100
+@@ -26,7 +26,6 @@
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+-#include <sys/cdefs.h>
+
+ /*
+ * xdr_mem.h, XDR implementation using memory buffers.
diff --git a/package/libtirpc/patches/patch-src_xdr_rec_c b/package/libtirpc/patches/patch-src_xdr_rec_c
new file mode 100644
index 000000000..f4a2672d3
--- /dev/null
+++ b/package/libtirpc/patches/patch-src_xdr_rec_c
@@ -0,0 +1,11 @@
+--- libtirpc-0.2.3.orig/src/xdr_rec.c 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/src/xdr_rec.c 2014-03-22 13:20:53.000000000 +0100
+@@ -27,8 +27,6 @@
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+-#include <sys/cdefs.h>
+-#include <sys/cdefs.h>
+
+ /*
+ * xdr_rec.c, Implements TCP/IP based XDR streams with a "record marking"
diff --git a/package/libtirpc/patches/patch-src_xdr_reference_c b/package/libtirpc/patches/patch-src_xdr_reference_c
new file mode 100644
index 000000000..a0b284380
--- /dev/null
+++ b/package/libtirpc/patches/patch-src_xdr_reference_c
@@ -0,0 +1,11 @@
+--- libtirpc-0.2.3.orig/src/xdr_reference.c 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/src/xdr_reference.c 2014-03-22 13:20:53.000000000 +0100
+@@ -26,8 +26,6 @@
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+-#include <sys/cdefs.h>
+-#include <sys/cdefs.h>
+
+ /*
+ * xdr_reference.c, Generic XDR routines impelmentation.
diff --git a/package/libtirpc/patches/patch-src_xdr_sizeof_c b/package/libtirpc/patches/patch-src_xdr_sizeof_c
new file mode 100644
index 000000000..0246ffa7d
--- /dev/null
+++ b/package/libtirpc/patches/patch-src_xdr_sizeof_c
@@ -0,0 +1,10 @@
+--- libtirpc-0.2.3.orig/src/xdr_sizeof.c 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/src/xdr_sizeof.c 2014-03-22 13:20:53.000000000 +0100
+@@ -34,7 +34,6 @@
+ * when serialized using XDR.
+ */
+
+-#include <sys/cdefs.h>
+
+ #include "namespace.h"
+ #include <rpc/types.h>
diff --git a/package/libtirpc/patches/patch-src_xdr_stdio_c b/package/libtirpc/patches/patch-src_xdr_stdio_c
new file mode 100644
index 000000000..90dabf120
--- /dev/null
+++ b/package/libtirpc/patches/patch-src_xdr_stdio_c
@@ -0,0 +1,10 @@
+--- libtirpc-0.2.3.orig/src/xdr_stdio.c 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/src/xdr_stdio.c 2014-03-22 13:20:53.000000000 +0100
+@@ -26,7 +26,6 @@
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+-#include <sys/cdefs.h>
+
+ /*
+ * xdr_stdio.c, XDR implementation on standard i/o file.
diff --git a/package/libtirpc/patches/patch-tirpc_misc_event_h b/package/libtirpc/patches/patch-tirpc_misc_event_h
new file mode 100644
index 000000000..7fc07813f
--- /dev/null
+++ b/package/libtirpc/patches/patch-tirpc_misc_event_h
@@ -0,0 +1,24 @@
+--- libtirpc-0.2.3.orig/tirpc/misc/event.h 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/tirpc/misc/event.h 2014-03-22 13:20:52.000000000 +0100
+@@ -186,15 +186,18 @@ extern int kqueue_del_filteropts(int fil
+
+ #else /* !_KERNEL */
+
+-#include <sys/cdefs.h>
+ struct timespec;
+
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ int kqueue(void);
+ int kevent(int kq, const struct kevent *changelist, int nchanges,
+ struct kevent *eventlist, int nevents,
+ const struct timespec *timeout);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ #endif /* !_KERNEL */
+
diff --git a/package/libtirpc/patches/patch-tirpc_netconfig_h b/package/libtirpc/patches/patch-tirpc_netconfig_h
new file mode 100644
index 000000000..2f17d5fd4
--- /dev/null
+++ b/package/libtirpc/patches/patch-tirpc_netconfig_h
@@ -0,0 +1,23 @@
+--- libtirpc-0.2.3.orig/tirpc/netconfig.h 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/tirpc/netconfig.h 2014-03-22 13:20:52.000000000 +0100
+@@ -74,7 +74,9 @@ typedef struct {
+ #define NC_UDP "udp"
+ #define NC_ICMP "icmp"
+
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+
+ extern void *setnetconfig (void);
+ extern struct netconfig *getnetconfig (void *);
+@@ -89,6 +91,8 @@ extern int endnetpath (void *);
+ extern void nc_perror (const char *);
+ extern char *nc_sperror (void);
+
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ #endif /* _NETCONFIG_H_ */
diff --git a/package/libtirpc/patches/patch-tirpc_rpc_auth_des_h b/package/libtirpc/patches/patch-tirpc_rpc_auth_des_h
new file mode 100644
index 000000000..c072f8871
--- /dev/null
+++ b/package/libtirpc/patches/patch-tirpc_rpc_auth_des_h
@@ -0,0 +1,32 @@
+--- libtirpc-0.2.3.orig/tirpc/rpc/auth_des.h 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/tirpc/rpc/auth_des.h 2014-03-22 13:20:52.000000000 +0100
+@@ -114,17 +114,25 @@ struct authdes_verf {
+ * Map a des credential into a unix cred.
+ *
+ */
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern int authdes_getucred( struct authdes_cred *, uid_t *, gid_t *, int *, gid_t * );
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern bool_t xdr_authdes_cred(XDR *, struct authdes_cred *);
+ extern bool_t xdr_authdes_verf(XDR *, struct authdes_verf *);
+ extern int rtime(dev_t, struct netbuf *, int, struct timeval *,
+ struct timeval *);
+ extern void kgetnetname(char *);
+ extern enum auth_stat _svcauth_des(struct svc_req *, struct rpc_msg *);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ #endif /* ndef _TI_AUTH_DES_ */
diff --git a/package/libtirpc/patches/patch-tirpc_rpc_auth_gss_h b/package/libtirpc/patches/patch-tirpc_rpc_auth_gss_h
new file mode 100644
index 000000000..2d1a07987
--- /dev/null
+++ b/package/libtirpc/patches/patch-tirpc_rpc_auth_gss_h
@@ -0,0 +1,53 @@
+--- libtirpc-0.2.3.orig/tirpc/rpc/auth_gss.h 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/tirpc/rpc/auth_gss.h 2014-03-22 13:20:52.000000000 +0100
+@@ -104,28 +104,32 @@ struct rpc_gss_init_res {
+ #define MAXSEQ 0x80000000
+
+ /* Prototypes. */
+-__BEGIN_DECLS
+-bool_t xdr_rpc_gss_cred __P((XDR *xdrs, struct rpc_gss_cred *p));
+-bool_t xdr_rpc_gss_init_args __P((XDR *xdrs, gss_buffer_desc *p));
+-bool_t xdr_rpc_gss_init_res __P((XDR *xdrs, struct rpc_gss_init_res *p));
+-bool_t xdr_rpc_gss_data __P((XDR *xdrs, xdrproc_t xdr_func,
++#ifdef __cplusplus
++extern "C" {
++#endif
++bool_t xdr_rpc_gss_cred (XDR *xdrs, struct rpc_gss_cred *p);
++bool_t xdr_rpc_gss_init_args (XDR *xdrs, gss_buffer_desc *p);
++bool_t xdr_rpc_gss_init_res (XDR *xdrs, struct rpc_gss_init_res *p);
++bool_t xdr_rpc_gss_data (XDR *xdrs, xdrproc_t xdr_func,
+ caddr_t xdr_ptr, gss_ctx_id_t ctx,
+ gss_qop_t qop, rpc_gss_svc_t svc,
+- u_int seq));
++ u_int seq);
+
+-AUTH *authgss_create __P((CLIENT *, gss_name_t,
+- struct rpc_gss_sec *));
+-AUTH *authgss_create_default __P((CLIENT *, char *, struct rpc_gss_sec *));
+-bool_t authgss_service __P((AUTH *auth, int svc));
+-bool_t authgss_get_private_data __P((AUTH *auth,
+- struct authgss_private_data *));
+-bool_t authgss_free_private_data __P((struct authgss_private_data *));
++AUTH *authgss_create (CLIENT *, gss_name_t,
++ struct rpc_gss_sec *);
++AUTH *authgss_create_default (CLIENT *, char *, struct rpc_gss_sec *);
++bool_t authgss_service (AUTH *auth, int svc);
++bool_t authgss_get_private_data (AUTH *auth,
++ struct authgss_private_data *);
++bool_t authgss_free_private_data (struct authgss_private_data *);
+
+-void gss_log_debug __P((const char *fmt, ...));
+-void gss_log_status __P((char *m, OM_uint32 major,
+- OM_uint32 minor));
+-void gss_log_hexdump __P((const u_char *buf, int len, int offset));
++void gss_log_debug (const char *fmt, ...);
++void gss_log_status (char *m, OM_uint32 major,
++ OM_uint32 minor);
++void gss_log_hexdump (const u_char *buf, int len, int offset);
+
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ #endif /* !_TIRPC_AUTH_GSS_H */
diff --git a/package/libtirpc/patches/patch-tirpc_rpc_auth_h b/package/libtirpc/patches/patch-tirpc_rpc_auth_h
new file mode 100644
index 000000000..b000f85f7
--- /dev/null
+++ b/package/libtirpc/patches/patch-tirpc_rpc_auth_h
@@ -0,0 +1,192 @@
+--- libtirpc-0.2.3.orig/tirpc/rpc/auth.h 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/tirpc/rpc/auth.h 2014-03-22 13:20:52.000000000 +0100
+@@ -48,7 +48,6 @@
+
+ #include <rpc/xdr.h>
+ #include <rpc/clnt_stat.h>
+-#include <sys/cdefs.h>
+ #include <sys/socket.h>
+ #include <sys/types.h>
+ #include <stdio.h>
+@@ -165,9 +164,13 @@ union des_block {
+ char c[8];
+ };
+ typedef union des_block des_block;
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern bool_t xdr_des_block(XDR *, des_block *);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ /*
+ * Authentication info. Opaque to client.
+@@ -288,9 +291,13 @@ auth_put(AUTH *auth)
+ xfunc, xwhere))
+
+
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern struct opaque_auth _null_auth;
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ /*
+ * Any style authentication. These routines can be used by any
+@@ -311,11 +318,15 @@ int authany_wrap(void), authany_unwrap(v
+ * int len;
+ * int *aup_gids;
+ */
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern AUTH *authunix_create(char *, uid_t, uid_t, int, uid_t *);
+ extern AUTH *authunix_create_default(void); /* takes no parameters */
+ extern AUTH *authnone_create(void); /* takes no parameters */
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+ /*
+ * DES style authentication
+ * AUTH *authsecdes_create(servername, window, timehost, ckey)
+@@ -324,15 +335,23 @@ __END_DECLS
+ * const char *timehost; - optional hostname to sync with
+ * des_block *ckey; - optional conversation key to use
+ */
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern AUTH *authdes_create (char *, u_int, struct sockaddr *, des_block *);
+ extern AUTH *authdes_seccreate (const char *, const u_int, const char *,
+ const des_block *);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern bool_t xdr_opaque_auth (XDR *, struct opaque_auth *);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ #define authsys_create(c,i1,i2,i3,ip) authunix_create((c),(i1),(i2),(i3),(ip))
+ #define authsys_create_default() authunix_create_default()
+@@ -340,36 +359,48 @@ __END_DECLS
+ /*
+ * Netname manipulation routines.
+ */
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern int getnetname(char *);
+ extern int host2netname(char *, const char *, const char *);
+ extern int user2netname(char *, const uid_t, const char *);
+ extern int netname2user(char *, uid_t *, gid_t *, int *, gid_t *);
+ extern int netname2host(char *, char *, const int);
+ extern void passwd2des ( char *, char * );
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ /*
+ *
+ * These routines interface to the keyserv daemon
+ *
+ */
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern int key_decryptsession(const char *, des_block *);
+ extern int key_encryptsession(const char *, des_block *);
+ extern int key_gendes(des_block *);
+ extern int key_setsecret(const char *);
+ extern int key_secretkey_is_set(void);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ /*
+ * Publickey routines.
+ */
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern int getpublickey (const char *, char *);
+ extern int getpublicandprivatekey (char *, char *);
+ extern int getsecretkey (char *, char *, char *);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ #ifdef KERBEROS
+ /*
+@@ -382,10 +413,14 @@ __END_DECLS
+ * const char *timehost; - optional hostname to sync with
+ * int *status; - kerberos status returned
+ */
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern AUTH *authkerb_seccreate(const char *, const char *, const char *,
+ const u_int, const char *, int *);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ /*
+ * Map a kerberos credential into a unix cred.
+@@ -398,19 +433,27 @@ __END_DECLS
+ * int *groups;
+ *
+ */
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern int authkerb_getucred(/* struct svc_req *, uid_t *, gid_t *,
+ short *, int * */);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+ #endif /* KERBEROS */
+
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ struct svc_req;
+ struct rpc_msg;
+ enum auth_stat _svcauth_none (struct svc_req *, struct rpc_msg *);
+ enum auth_stat _svcauth_short (struct svc_req *, struct rpc_msg *);
+ enum auth_stat _svcauth_unix (struct svc_req *, struct rpc_msg *);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ #define AUTH_NONE 0 /* no authentication */
+ #define AUTH_NULL 0 /* backward compatibility */
diff --git a/package/libtirpc/patches/patch-tirpc_rpc_auth_unix_h b/package/libtirpc/patches/patch-tirpc_rpc_auth_unix_h
new file mode 100644
index 000000000..a0c70ece5
--- /dev/null
+++ b/package/libtirpc/patches/patch-tirpc_rpc_auth_unix_h
@@ -0,0 +1,26 @@
+--- libtirpc-0.2.3.orig/tirpc/rpc/auth_unix.h 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/tirpc/rpc/auth_unix.h 2014-03-22 13:20:52.000000000 +0100
+@@ -45,7 +45,6 @@
+
+ #ifndef _TIRPC_AUTH_UNIX_H
+ #define _TIRPC_AUTH_UNIX_H
+-#include <sys/cdefs.h>
+
+ /* The machine name is part of a credential; it may not exceed 255 bytes */
+ #define MAX_MACHINE_NAME 255
+@@ -67,9 +66,13 @@ struct authunix_parms {
+
+ #define authsys_parms authunix_parms
+
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern bool_t xdr_authunix_parms(XDR *, struct authunix_parms *);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ /*
+ * If a response verifier has flavor AUTH_SHORT,
diff --git a/package/libtirpc/patches/patch-tirpc_rpc_clnt_h b/package/libtirpc/patches/patch-tirpc_rpc_clnt_h
new file mode 100644
index 000000000..ddd1f73ae
--- /dev/null
+++ b/package/libtirpc/patches/patch-tirpc_rpc_clnt_h
@@ -0,0 +1,132 @@
+--- libtirpc-0.2.3.orig/tirpc/rpc/clnt.h 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/tirpc/rpc/clnt.h 2014-03-22 13:20:52.000000000 +0100
+@@ -42,7 +42,6 @@
+ #include <rpc/clnt_stat.h>
+ #include <rpc/auth.h>
+
+-#include <sys/cdefs.h>
+ #include <netconfig.h>
+ #include <sys/un.h>
+
+@@ -267,7 +266,9 @@ struct rpc_timers {
+ * Generic client creation routine. Supported protocols are those that
+ * belong to the nettype namespace (/etc/netconfig).
+ */
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern CLIENT *clnt_create(const char *, const rpcprog_t, const rpcvers_t,
+ const char *);
+ /*
+@@ -414,32 +415,46 @@ extern CLIENT *clnt_dg_create(const int,
+ */
+ extern CLIENT *clnt_raw_create(rpcprog_t, rpcvers_t);
+
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+
+ /*
+ * Print why creation failed
+ */
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern void clnt_pcreateerror(const char *); /* stderr */
+ extern char *clnt_spcreateerror(const char *); /* string */
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ /*
+ * Like clnt_perror(), but is more verbose in its output
+ */
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern void clnt_perrno(enum clnt_stat); /* stderr */
+ extern char *clnt_sperrno(enum clnt_stat); /* string */
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ /*
+ * Print an English error message, given the client error code
+ */
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern void clnt_perror(CLIENT *, const char *); /* stderr */
+ extern char *clnt_sperror(CLIENT *, const char *); /* string */
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+
+ /*
+@@ -450,9 +465,13 @@ struct rpc_createerr {
+ struct rpc_err cf_error; /* useful when cf_stat == RPC_PMAPFAILURE */
+ };
+
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern struct rpc_createerr *__rpc_createerr(void);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+ #define get_rpc_createerr() (*(__rpc_createerr()))
+ #define rpc_createerr (*(__rpc_createerr()))
+
+@@ -469,12 +488,16 @@ __END_DECLS
+ * char *out;
+ * const char *nettype;
+ */
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern enum clnt_stat rpc_call(const char *, const rpcprog_t,
+ const rpcvers_t, const rpcproc_t,
+ const xdrproc_t, const char *,
+ const xdrproc_t, char *, const char *);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ /*
+ * RPC broadcast interface
+@@ -522,7 +545,9 @@ __END_DECLS
+
+ typedef bool_t (*resultproc_t)(caddr_t, ...);
+
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern enum clnt_stat rpc_broadcast(const rpcprog_t, const rpcvers_t,
+ const rpcproc_t, const xdrproc_t,
+ caddr_t, const xdrproc_t, caddr_t,
+@@ -532,7 +557,9 @@ extern enum clnt_stat rpc_broadcast_exp(
+ caddr_t, const xdrproc_t, caddr_t,
+ const resultproc_t, const int,
+ const int, const char *);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ /* For backward compatibility */
+ #include <rpc/clnt_soc.h>
diff --git a/package/libtirpc/patches/patch-tirpc_rpc_clnt_soc_h b/package/libtirpc/patches/patch-tirpc_rpc_clnt_soc_h
new file mode 100644
index 000000000..3112aeee5
--- /dev/null
+++ b/package/libtirpc/patches/patch-tirpc_rpc_clnt_soc_h
@@ -0,0 +1,78 @@
+--- libtirpc-0.2.3.orig/tirpc/rpc/clnt_soc.h 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/tirpc/rpc/clnt_soc.h 2014-03-22 13:20:52.000000000 +0100
+@@ -46,7 +46,6 @@
+ * with TS-RPC.
+ */
+
+-#include <sys/cdefs.h>
+
+ #define UDPMSGSIZE 8800 /* rpc imposed limit on udp msg size */
+
+@@ -61,27 +60,39 @@
+ * u_int sendsz;
+ * u_int recvsz;
+ */
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern CLIENT *clnttcp_create(struct sockaddr_in *, u_long, u_long, int *,
+ u_int, u_int);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ /*
+ * Raw (memory) rpc.
+ */
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern CLIENT *clntraw_create(u_long, u_long);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+
+ /*
+ IPv6 socket version
+ */
+ #ifdef INET6
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern CLIENT *clnttcp6_create(struct sockaddr_in6 *, u_long, u_long, int *,
+ u_int, u_int);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+ #endif
+
+ /*
+@@ -105,7 +116,9 @@ __END_DECLS
+ * u_int sendsz;
+ * u_int recvsz;
+ */
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern CLIENT *clntudp_create(struct sockaddr_in *, u_long, u_long,
+ struct timeval, int *);
+ extern CLIENT *clntudp_bufcreate(struct sockaddr_in *, u_long, u_long,
+@@ -116,7 +129,9 @@ extern CLIENT *clntudp6_create(struct so
+ extern CLIENT *clntudp6_bufcreate(struct sockaddr_in6 *, u_long, u_long,
+ struct timeval, int *, u_int, u_int);
+ #endif
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+
+ #endif /* _RPC_CLNT_SOC_H */
diff --git a/package/libtirpc/patches/patch-tirpc_rpc_des_crypt_h b/package/libtirpc/patches/patch-tirpc_rpc_des_crypt_h
new file mode 100644
index 000000000..d55657f95
--- /dev/null
+++ b/package/libtirpc/patches/patch-tirpc_rpc_des_crypt_h
@@ -0,0 +1,52 @@
+--- libtirpc-0.2.3.orig/tirpc/rpc/des_crypt.h 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/tirpc/rpc/des_crypt.h 2014-03-22 13:20:52.000000000 +0100
+@@ -43,7 +43,6 @@
+ #ifndef _DES_DES_CRYPT_H
+ #define _DES_DES_CRYPT_H
+
+-#include <sys/cdefs.h>
+ #include <rpc/rpc.h>
+
+ #define DES_MAXDATA 8192 /* max bytes encrypted in one call */
+@@ -83,23 +82,35 @@
+ /*
+ * Cipher Block Chaining mode
+ */
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ int cbc_crypt( char *, char *, unsigned int, unsigned int, char *);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ /*
+ * Electronic Code Book mode
+ */
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ int ecb_crypt( char *, char *, unsigned int, unsigned int );
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ /*
+ * Set des parity for a key.
+ * DES parity is odd and in the low bit of each byte
+ */
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ void des_setparity( char *);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ #endif /* _DES_DES_CRYPT_H */
diff --git a/package/libtirpc/patches/patch-tirpc_rpc_nettype_h b/package/libtirpc/patches/patch-tirpc_rpc_nettype_h
new file mode 100644
index 000000000..60759caad
--- /dev/null
+++ b/package/libtirpc/patches/patch-tirpc_rpc_nettype_h
@@ -0,0 +1,20 @@
+--- libtirpc-0.2.3.orig/tirpc/rpc/nettype.h 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/tirpc/rpc/nettype.h 2014-03-22 13:20:52.000000000 +0100
+@@ -53,11 +53,15 @@
+ #define _RPC_TCP 7
+ #define _RPC_UDP 8
+
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern void *__rpc_setconf(const char *);
+ extern void __rpc_endconf(void *);
+ extern struct netconfig *__rpc_getconf(void *);
+ extern struct netconfig *__rpc_getconfip(const char *);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ #endif /* !_TIRPC_NETTYPE_H */
diff --git a/package/libtirpc/patches/patch-tirpc_rpc_pmap_clnt_h b/package/libtirpc/patches/patch-tirpc_rpc_pmap_clnt_h
new file mode 100644
index 000000000..7fda59939
--- /dev/null
+++ b/package/libtirpc/patches/patch-tirpc_rpc_pmap_clnt_h
@@ -0,0 +1,25 @@
+--- libtirpc-0.2.3.orig/tirpc/rpc/pmap_clnt.h 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/tirpc/rpc/pmap_clnt.h 2014-03-22 13:20:52.000000000 +0100
+@@ -63,9 +63,10 @@
+
+ #ifndef _RPC_PMAP_CLNT_H_
+ #define _RPC_PMAP_CLNT_H_
+-#include <sys/cdefs.h>
+
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern bool_t pmap_set(u_long, u_long, int, int);
+ extern bool_t pmap_unset(u_long, u_long);
+ extern struct pmaplist *pmap_getmaps(struct sockaddr_in *);
+@@ -80,6 +81,8 @@ extern enum clnt_stat clnt_broadcast(u_l
+ resultproc_t);
+ extern u_short pmap_getport(struct sockaddr_in *,
+ u_long, u_long, u_int);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ #endif /* !_RPC_PMAP_CLNT_H_ */
diff --git a/package/libtirpc/patches/patch-tirpc_rpc_pmap_prot_h b/package/libtirpc/patches/patch-tirpc_rpc_pmap_prot_h
new file mode 100644
index 000000000..891991b98
--- /dev/null
+++ b/package/libtirpc/patches/patch-tirpc_rpc_pmap_prot_h
@@ -0,0 +1,27 @@
+--- libtirpc-0.2.3.orig/tirpc/rpc/pmap_prot.h 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/tirpc/rpc/pmap_prot.h 2014-03-22 13:20:52.000000000 +0100
+@@ -71,7 +71,6 @@
+
+ #ifndef _RPC_PMAP_PROT_H
+ #define _RPC_PMAP_PROT_H
+-#include <sys/cdefs.h>
+
+ #define PMAPPORT ((u_short)111)
+ #define PMAPPROG ((u_long)100000)
+@@ -97,10 +96,14 @@ struct pmaplist {
+ struct pmaplist *pml_next;
+ };
+
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern bool_t xdr_pmap(XDR *, struct pmap *);
+ extern bool_t xdr_pmaplist(XDR *, struct pmaplist **);
+ extern bool_t xdr_pmaplist_ptr(XDR *, struct pmaplist *);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ #endif /* !_RPC_PMAP_PROT_H */
diff --git a/package/libtirpc/patches/patch-tirpc_rpc_pmap_rmt_h b/package/libtirpc/patches/patch-tirpc_rpc_pmap_rmt_h
new file mode 100644
index 000000000..98a494105
--- /dev/null
+++ b/package/libtirpc/patches/patch-tirpc_rpc_pmap_rmt_h
@@ -0,0 +1,26 @@
+--- libtirpc-0.2.3.orig/tirpc/rpc/pmap_rmt.h 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/tirpc/rpc/pmap_rmt.h 2014-03-22 13:20:52.000000000 +0100
+@@ -41,7 +41,6 @@
+
+ #ifndef _RPC_PMAP_RMT_H
+ #define _RPC_PMAP_RMT_H
+-#include <sys/cdefs.h>
+
+ struct rmtcallargs {
+ u_long prog, vers, proc, arglen;
+@@ -56,9 +55,13 @@ struct rmtcallres {
+ xdrproc_t xdr_results;
+ };
+
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern bool_t xdr_rmtcall_args(XDR *, struct rmtcallargs *);
+ extern bool_t xdr_rmtcallres(XDR *, struct rmtcallres *);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ #endif /* !_RPC_PMAP_RMT_H */
diff --git a/package/libtirpc/patches/patch-tirpc_rpc_rpc_com_h b/package/libtirpc/patches/patch-tirpc_rpc_rpc_com_h
new file mode 100644
index 000000000..59f0283d3
--- /dev/null
+++ b/package/libtirpc/patches/patch-tirpc_rpc_rpc_com_h
@@ -0,0 +1,31 @@
+--- libtirpc-0.2.3.orig/tirpc/rpc/rpc_com.h 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/tirpc/rpc/rpc_com.h 2014-03-22 13:20:52.000000000 +0100
+@@ -41,7 +41,6 @@
+ #ifndef _RPC_RPCCOM_H
+ #define _RPC_RPCCOM_H
+
+-#include <sys/cdefs.h>
+
+ /* #pragma ident "@(#)rpc_com.h 1.11 93/07/05 SMI" */
+
+@@ -55,7 +54,9 @@
+ #define __RPC_GETXID(now) ((u_int32_t)getpid() ^ (u_int32_t)(now)->tv_sec ^ \
+ (u_int32_t)(now)->tv_usec)
+
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern u_int __rpc_get_a_size(int);
+ extern int __rpc_dtbsize(void);
+ extern int _rpc_dtablesize(void);
+@@ -77,6 +78,8 @@ bool_t rpc_control(int,void *);
+
+ char *_get_next_token(char *, int);
+
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ #endif /* _RPC_RPCCOM_H */
diff --git a/package/libtirpc/patches/patch-tirpc_rpc_rpc_h b/package/libtirpc/patches/patch-tirpc_rpc_rpc_h
new file mode 100644
index 000000000..7e1f000a2
--- /dev/null
+++ b/package/libtirpc/patches/patch-tirpc_rpc_rpc_h
@@ -0,0 +1,44 @@
+--- libtirpc-0.2.3.orig/tirpc/rpc/rpc.h 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/tirpc/rpc/rpc.h 2014-03-22 13:20:52.000000000 +0100
+@@ -79,9 +79,11 @@
+ #define UDPMSGSIZE 8800
+ #endif
+
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern int get_myaddress(struct sockaddr_in *);
+-extern int bindresvport(int, struct sockaddr_in *) __THROW;
++extern int bindresvport(int, struct sockaddr_in *);
+ extern int registerrpc(int, int, int, char *(*)(char [UDPMSGSIZE]),
+ xdrproc_t, xdrproc_t);
+ extern int callrpc(const char *, int, int, int, xdrproc_t, void *,
+@@ -93,18 +95,24 @@ struct netbuf *uaddr2taddr(const struct
+
+ struct sockaddr;
+ extern int bindresvport_sa(int, struct sockaddr *);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ /*
+ * The following are not exported interfaces, they are for internal library
+ * and rpcbind use only. Do not use, they may change without notice.
+ */
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ int __rpc_nconf2fd(const struct netconfig *);
+ int __rpc_nconf2fd_flags(const struct netconfig *, int);
+ int __rpc_nconf2sockinfo(const struct netconfig *, struct __rpc_sockinfo *);
+ int __rpc_fd2sockinfo(int, struct __rpc_sockinfo *);
+ u_int __rpc_get_t_size(int, int, int);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ #endif /* !_RPC_RPC_H */
diff --git a/package/libtirpc/patches/patch-tirpc_rpc_rpc_msg_h b/package/libtirpc/patches/patch-tirpc_rpc_rpc_msg_h
new file mode 100644
index 000000000..caee024d8
--- /dev/null
+++ b/package/libtirpc/patches/patch-tirpc_rpc_rpc_msg_h
@@ -0,0 +1,23 @@
+--- libtirpc-0.2.3.orig/tirpc/rpc/rpc_msg.h 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/tirpc/rpc/rpc_msg.h 2014-03-22 13:20:52.000000000 +0100
+@@ -161,7 +161,9 @@ struct rpc_msg {
+ #define acpted_rply ru.RM_rmb.ru.RP_ar
+ #define rjcted_rply ru.RM_rmb.ru.RP_dr
+
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ /*
+ * XDR routine to handle a rpc message.
+ * xdr_callmsg(xdrs, cmsg)
+@@ -210,6 +212,8 @@ extern bool_t xdr_rejected_reply(XDR *,
+ * struct rpc_err *error;
+ */
+ extern void _seterr_reply(struct rpc_msg *, struct rpc_err *);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ #endif /* !_TIRPC_RPC_MSG_H */
diff --git a/package/libtirpc/patches/patch-tirpc_rpc_rpcb_clnt_h b/package/libtirpc/patches/patch-tirpc_rpc_rpcb_clnt_h
new file mode 100644
index 000000000..b0bc44ae6
--- /dev/null
+++ b/package/libtirpc/patches/patch-tirpc_rpc_rpcb_clnt_h
@@ -0,0 +1,23 @@
+--- libtirpc-0.2.3.orig/tirpc/rpc/rpcb_clnt.h 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/tirpc/rpc/rpcb_clnt.h 2014-03-22 13:20:52.000000000 +0100
+@@ -59,7 +59,9 @@
+
+ #include <rpc/types.h>
+ #include <rpc/rpcb_prot.h>
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern bool_t rpcb_set(const rpcprog_t, const rpcvers_t,
+ const struct netconfig *, const struct netbuf *);
+ extern bool_t rpcb_unset(const rpcprog_t, const rpcvers_t,
+@@ -78,6 +80,8 @@ extern bool_t rpcb_getaddr(const rpcprog
+ extern bool_t rpcb_gettime(const char *, time_t *);
+ extern char *rpcb_taddr2uaddr(struct netconfig *, struct netbuf *);
+ extern struct netbuf *rpcb_uaddr2taddr(struct netconfig *, char *);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ #endif /* !_RPC_RPCB_CLNT_H */
diff --git a/package/libtirpc/patches/patch-tirpc_rpc_rpcent_h b/package/libtirpc/patches/patch-tirpc_rpc_rpcent_h
new file mode 100644
index 000000000..badea8121
--- /dev/null
+++ b/package/libtirpc/patches/patch-tirpc_rpc_rpcent_h
@@ -0,0 +1,31 @@
+--- libtirpc-0.2.3.orig/tirpc/rpc/rpcent.h 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/tirpc/rpc/rpcent.h 2014-03-22 14:22:44.000000000 +0100
+@@ -44,10 +44,12 @@
+ /* #pragma ident "@(#)rpcent.h 1.13 94/04/25 SMI" */
+ /* @(#)rpcent.h 1.1 88/12/06 SMI */
+
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+
+ /* These are defined in /usr/include/rpc/netdb.h */
+-#if 0
++#if !defined(__GLIBC__)
+ struct rpcent {
+ char *r_name; /* name of server for this rpc program */
+ char **r_aliases; /* alias list */
+@@ -60,8 +62,10 @@ extern struct rpcent *getrpcbynumber(int
+ extern struct rpcent *getrpcent(void);
+ #endif
+
+-extern void setrpcent(int) __THROW;
+-extern void endrpcent(void) __THROW;
+-__END_DECLS
++extern void setrpcent(int);
++extern void endrpcent(void);
++#ifdef __cplusplus
++}
++#endif
+
+ #endif /* !_RPC_CENT_H */
diff --git a/package/libtirpc/patches/patch-tirpc_rpc_svc_auth_h b/package/libtirpc/patches/patch-tirpc_rpc_svc_auth_h
new file mode 100644
index 000000000..1abf29cde
--- /dev/null
+++ b/package/libtirpc/patches/patch-tirpc_rpc_svc_auth_h
@@ -0,0 +1,20 @@
+--- libtirpc-0.2.3.orig/tirpc/rpc/svc_auth.h 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/tirpc/rpc/svc_auth.h 2014-03-22 13:20:52.000000000 +0100
+@@ -65,11 +65,15 @@ typedef struct SVCAUTH {
+ /*
+ * Server side authenticator
+ */
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern enum auth_stat _authenticate(struct svc_req *, struct rpc_msg *);
+ extern int svc_auth_reg(int, enum auth_stat (*)(struct svc_req *,
+ struct rpc_msg *));
+
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ #endif /* !_RPC_SVC_AUTH_H */
diff --git a/package/libtirpc/patches/patch-tirpc_rpc_svc_h b/package/libtirpc/patches/patch-tirpc_rpc_svc_h
new file mode 100644
index 000000000..fcaf5b172
--- /dev/null
+++ b/package/libtirpc/patches/patch-tirpc_rpc_svc_h
@@ -0,0 +1,152 @@
+--- libtirpc-0.2.3.orig/tirpc/rpc/svc.h 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/tirpc/rpc/svc.h 2014-03-22 13:20:52.000000000 +0100
+@@ -40,7 +40,6 @@
+
+ #ifndef _TIRPC_SVC_H
+ #define _TIRPC_SVC_H
+-#include <sys/cdefs.h>
+
+ /*
+ * This interface must manage two items concerning remote procedure calling:
+@@ -200,11 +199,15 @@ struct svc_req {
+ * const struct netconfig *nconf;
+ */
+
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern bool_t svc_reg(SVCXPRT *, const rpcprog_t, const rpcvers_t,
+ void (*)(struct svc_req *, SVCXPRT *),
+ const struct netconfig *);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ /*
+ * Service un-registration
+@@ -214,9 +217,13 @@ __END_DECLS
+ * const rpcvers_t vers;
+ */
+
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern void svc_unreg(const rpcprog_t, const rpcvers_t);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ /*
+ * Transport registration.
+@@ -224,9 +231,13 @@ __END_DECLS
+ * xprt_register(xprt)
+ * SVCXPRT *xprt;
+ */
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern void xprt_register(SVCXPRT *);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ /*
+ * Transport un-register
+@@ -234,9 +245,13 @@ __END_DECLS
+ * xprt_unregister(xprt)
+ * SVCXPRT *xprt;
+ */
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern void xprt_unregister(SVCXPRT *);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+
+ /*
+@@ -265,7 +280,9 @@ __END_DECLS
+ * deadlock the caller and server processes!
+ */
+
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern bool_t svc_sendreply(SVCXPRT *, xdrproc_t, void *);
+ extern void svcerr_decode(SVCXPRT *);
+ extern void svcerr_weakauth(SVCXPRT *);
+@@ -277,7 +294,9 @@ extern void svcerr_systemerr(SVCXPRT *);
+ extern int rpc_reg(rpcprog_t, rpcvers_t, rpcproc_t,
+ char *(*)(char *), xdrproc_t, xdrproc_t,
+ char *);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ /*
+ * Lowest level dispatching -OR- who owns this process anyway.
+@@ -306,11 +325,17 @@ extern int svc_fds;
+ * a small program implemented by the svc_rpc implementation itself;
+ * also see clnt.h for protocol numbers.
+ */
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern void rpctest_service(void);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern void svc_getreq(int);
+ extern void svc_getreqset(fd_set *);
+ extern void svc_getreq_common(int);
+@@ -319,7 +344,9 @@ extern void svc_getreq_poll(struct pollf
+
+ extern void svc_run(void);
+ extern void svc_exit(void);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ /*
+ * Socket to use on svcxxx_create call to get default socket
+@@ -331,7 +358,9 @@ __END_DECLS
+ * These are the existing service side transport implementations
+ */
+
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ /*
+ * Transport independent svc_create routine.
+ */
+@@ -427,7 +456,9 @@ int svc_dg_enablecache(SVCXPRT *, const
+
+ int __rpc_get_local_uid(SVCXPRT *_transp, uid_t *_uid);
+
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+
+ /* for backward compatibility */
diff --git a/package/libtirpc/patches/patch-tirpc_rpc_svc_soc_h b/package/libtirpc/patches/patch-tirpc_rpc_svc_soc_h
new file mode 100644
index 000000000..9f7c22259
--- /dev/null
+++ b/package/libtirpc/patches/patch-tirpc_rpc_svc_soc_h
@@ -0,0 +1,102 @@
+--- libtirpc-0.2.3.orig/tirpc/rpc/svc_soc.h 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/tirpc/rpc/svc_soc.h 2014-03-22 13:20:52.000000000 +0100
+@@ -38,7 +38,6 @@
+
+ #ifndef _RPC_SVC_SOC_H
+ #define _RPC_SVC_SOC_H
+-#include <sys/cdefs.h>
+
+ /* #pragma ident "@(#)svc_soc.h 1.11 94/04/25 SMI" */
+ /* svc_soc.h 1.8 89/05/01 SMI */
+@@ -64,10 +63,14 @@
+ * void (*dispatch)();
+ * int protocol; like TCP or UDP, zero means do not register
+ */
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern bool_t svc_register(SVCXPRT *, u_long, u_long,
+ void (*)(struct svc_req *, SVCXPRT *), int);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ /*
+ * Service un-registration
+@@ -76,44 +79,64 @@ __END_DECLS
+ * u_long prog;
+ * u_long vers;
+ */
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern void svc_unregister(u_long, u_long);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+
+ /*
+ * Memory based rpc for testing and timing.
+ */
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern SVCXPRT *svcraw_create(void);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+
+ /*
+ * Udp based rpc.
+ */
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern SVCXPRT *svcudp_create(int);
+ extern SVCXPRT *svcudp_bufcreate(int, u_int, u_int);
+ extern int svcudp_enablecache(SVCXPRT *, u_long);
+ extern SVCXPRT *svcudp6_create(int);
+ extern SVCXPRT *svcudp6_bufcreate(int, u_int, u_int);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+
+ /*
+ * Tcp based rpc.
+ */
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern SVCXPRT *svctcp_create(int, u_int, u_int);
+ extern SVCXPRT *svctcp6_create(int, u_int, u_int);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ /*
+ * Fd based rpc.
+ */
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern SVCXPRT *svcfd_create(int, u_int, u_int);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ #endif /* !_RPC_SVC_SOC_H */
diff --git a/package/libtirpc/patches/patch-tirpc_rpc_xdr_h b/package/libtirpc/patches/patch-tirpc_rpc_xdr_h
new file mode 100644
index 000000000..0f43e3702
--- /dev/null
+++ b/package/libtirpc/patches/patch-tirpc_rpc_xdr_h
@@ -0,0 +1,53 @@
+--- libtirpc-0.2.3.orig/tirpc/rpc/xdr.h 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/tirpc/rpc/xdr.h 2014-03-22 13:20:52.000000000 +0100
+@@ -40,7 +40,6 @@
+
+ #ifndef _TIRPC_XDR_H
+ #define _TIRPC_XDR_H
+-#include <sys/cdefs.h>
+ #include <stdio.h>
+ #include <netinet/in.h>
+
+@@ -287,7 +286,9 @@ struct xdr_discrim {
+ /*
+ * These are the "generic" xdr routines.
+ */
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern bool_t xdr_void(void);
+ extern bool_t xdr_int(XDR *, int *);
+ extern bool_t xdr_u_int(XDR *, u_int *);
+@@ -322,7 +323,9 @@ extern bool_t xdr_hyper(XDR *, quad_t *)
+ extern bool_t xdr_u_hyper(XDR *, u_quad_t *);
+ extern bool_t xdr_longlong_t(XDR *, quad_t *);
+ extern bool_t xdr_u_longlong_t(XDR *, u_quad_t *);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ /*
+ * Common opaque bytes objects used by many rpc protocols;
+@@ -340,7 +343,9 @@ extern bool_t xdr_netobj(XDR *, struct
+ * These are the public routines for the various implementations of
+ * xdr streams.
+ */
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ /* XDR using memory buffers */
+ extern void xdrmem_create(XDR *, char *, u_int, enum xdr_op);
+
+@@ -361,6 +366,8 @@ extern bool_t xdrrec_skiprecord(XDR *);
+ /* true if no more input */
+ extern bool_t xdrrec_eof(XDR *);
+ extern u_int xdrrec_readbytes(XDR *, caddr_t, u_int);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ #endif /* !_TIRPC_XDR_H */
diff --git a/package/libtirpc/patches/patch-tirpc_rpcsvc_crypt_x b/package/libtirpc/patches/patch-tirpc_rpcsvc_crypt_x
new file mode 100644
index 000000000..872800b1d
--- /dev/null
+++ b/package/libtirpc/patches/patch-tirpc_rpcsvc_crypt_x
@@ -0,0 +1,12 @@
+--- libtirpc-0.2.3.orig/tirpc/rpcsvc/crypt.x 2013-02-13 16:13:59.000000000 +0100
++++ libtirpc-0.2.3/tirpc/rpcsvc/crypt.x 2014-03-22 13:20:52.000000000 +0100
+@@ -31,8 +31,7 @@
+ */
+
+ #ifndef RPC_HDR
+-%#include <sys/cdefs.h>
+-%__FBSDID("$FreeBSD: src/include/rpcsvc/crypt.x,v 1.5 2003/05/04 02:51:42 obrien Exp $");
++%%__FBSDID("$FreeBSD: src/include/rpcsvc/crypt.x,v 1.5 2003/05/04 02:51:42 obrien Exp $");
+ #endif
+
+ /*
diff --git a/package/libtirpc/src/src/queue.h b/package/libtirpc/src/src/queue.h
new file mode 100644
index 000000000..daf4553d3
--- /dev/null
+++ b/package/libtirpc/src/src/queue.h
@@ -0,0 +1,574 @@
+/*
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)queue.h 8.5 (Berkeley) 8/20/94
+ */
+
+#ifndef _SYS_QUEUE_H_
+#define _SYS_QUEUE_H_
+
+/*
+ * This file defines five types of data structures: singly-linked lists,
+ * lists, simple queues, tail queues, and circular queues.
+ *
+ * A singly-linked list is headed by a single forward pointer. The
+ * elements are singly linked for minimum space and pointer manipulation
+ * overhead at the expense of O(n) removal for arbitrary elements. New
+ * elements can be added to the list after an existing element or at the
+ * head of the list. Elements being removed from the head of the list
+ * should use the explicit macro for this purpose for optimum
+ * efficiency. A singly-linked list may only be traversed in the forward
+ * direction. Singly-linked lists are ideal for applications with large
+ * datasets and few or no removals or for implementing a LIFO queue.
+ *
+ * A list is headed by a single forward pointer (or an array of forward
+ * pointers for a hash table header). The elements are doubly linked
+ * so that an arbitrary element can be removed without a need to
+ * traverse the list. New elements can be added to the list before
+ * or after an existing element or at the head of the list. A list
+ * may only be traversed in the forward direction.
+ *
+ * A simple queue is headed by a pair of pointers, one the head of the
+ * list and the other to the tail of the list. The elements are singly
+ * linked to save space, so elements can only be removed from the
+ * head of the list. New elements can be added to the list after
+ * an existing element, at the head of the list, or at the end of the
+ * list. A simple queue may only be traversed in the forward direction.
+ *
+ * A tail queue is headed by a pair of pointers, one to the head of the
+ * list and the other to the tail of the list. The elements are doubly
+ * linked so that an arbitrary element can be removed without a need to
+ * traverse the list. New elements can be added to the list before or
+ * after an existing element, at the head of the list, or at the end of
+ * the list. A tail queue may be traversed in either direction.
+ *
+ * A circle queue is headed by a pair of pointers, one to the head of the
+ * list and the other to the tail of the list. The elements are doubly
+ * linked so that an arbitrary element can be removed without a need to
+ * traverse the list. New elements can be added to the list before or after
+ * an existing element, at the head of the list, or at the end of the list.
+ * A circle queue may be traversed in either direction, but has a more
+ * complex end of list detection.
+ *
+ * For details on the use of these macros, see the queue(3) manual page.
+ */
+
+/*
+ * List definitions.
+ */
+#define LIST_HEAD(name, type) \
+struct name { \
+ struct type *lh_first; /* first element */ \
+}
+
+#define LIST_HEAD_INITIALIZER(head) \
+ { NULL }
+
+#define LIST_ENTRY(type) \
+struct { \
+ struct type *le_next; /* next element */ \
+ struct type **le_prev; /* address of previous next element */ \
+}
+
+/*
+ * List functions.
+ */
+#define LIST_INIT(head) do { \
+ (head)->lh_first = NULL; \
+} while (/*CONSTCOND*/0)
+
+#define LIST_INSERT_AFTER(listelm, elm, field) do { \
+ if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \
+ (listelm)->field.le_next->field.le_prev = \
+ &(elm)->field.le_next; \
+ (listelm)->field.le_next = (elm); \
+ (elm)->field.le_prev = &(listelm)->field.le_next; \
+} while (/*CONSTCOND*/0)
+
+#define LIST_INSERT_BEFORE(listelm, elm, field) do { \
+ (elm)->field.le_prev = (listelm)->field.le_prev; \
+ (elm)->field.le_next = (listelm); \
+ *(listelm)->field.le_prev = (elm); \
+ (listelm)->field.le_prev = &(elm)->field.le_next; \
+} while (/*CONSTCOND*/0)
+
+#define LIST_INSERT_HEAD(head, elm, field) do { \
+ if (((elm)->field.le_next = (head)->lh_first) != NULL) \
+ (head)->lh_first->field.le_prev = &(elm)->field.le_next;\
+ (head)->lh_first = (elm); \
+ (elm)->field.le_prev = &(head)->lh_first; \
+} while (/*CONSTCOND*/0)
+
+#define LIST_REMOVE(elm, field) do { \
+ if ((elm)->field.le_next != NULL) \
+ (elm)->field.le_next->field.le_prev = \
+ (elm)->field.le_prev; \
+ *(elm)->field.le_prev = (elm)->field.le_next; \
+} while (/*CONSTCOND*/0)
+
+#define LIST_FOREACH(var, head, field) \
+ for ((var) = ((head)->lh_first); \
+ (var); \
+ (var) = ((var)->field.le_next))
+
+/*
+ * List access methods.
+ */
+#define LIST_EMPTY(head) ((head)->lh_first == NULL)
+#define LIST_FIRST(head) ((head)->lh_first)
+#define LIST_NEXT(elm, field) ((elm)->field.le_next)
+
+
+/*
+ * Singly-linked List definitions.
+ */
+#define SLIST_HEAD(name, type) \
+struct name { \
+ struct type *slh_first; /* first element */ \
+}
+
+#define SLIST_HEAD_INITIALIZER(head) \
+ { NULL }
+
+#define SLIST_ENTRY(type) \
+struct { \
+ struct type *sle_next; /* next element */ \
+}
+
+/*
+ * Singly-linked List functions.
+ */
+#define SLIST_INIT(head) do { \
+ (head)->slh_first = NULL; \
+} while (/*CONSTCOND*/0)
+
+#define SLIST_INSERT_AFTER(slistelm, elm, field) do { \
+ (elm)->field.sle_next = (slistelm)->field.sle_next; \
+ (slistelm)->field.sle_next = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define SLIST_INSERT_HEAD(head, elm, field) do { \
+ (elm)->field.sle_next = (head)->slh_first; \
+ (head)->slh_first = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define SLIST_REMOVE_HEAD(head, field) do { \
+ (head)->slh_first = (head)->slh_first->field.sle_next; \
+} while (/*CONSTCOND*/0)
+
+#define SLIST_REMOVE(head, elm, type, field) do { \
+ if ((head)->slh_first == (elm)) { \
+ SLIST_REMOVE_HEAD((head), field); \
+ } \
+ else { \
+ struct type *curelm = (head)->slh_first; \
+ while(curelm->field.sle_next != (elm)) \
+ curelm = curelm->field.sle_next; \
+ curelm->field.sle_next = \
+ curelm->field.sle_next->field.sle_next; \
+ } \
+} while (/*CONSTCOND*/0)
+
+#define SLIST_FOREACH(var, head, field) \
+ for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next)
+
+/*
+ * Singly-linked List access methods.
+ */
+#define SLIST_EMPTY(head) ((head)->slh_first == NULL)
+#define SLIST_FIRST(head) ((head)->slh_first)
+#define SLIST_NEXT(elm, field) ((elm)->field.sle_next)
+
+
+/*
+ * Singly-linked Tail queue declarations.
+ */
+#define STAILQ_HEAD(name, type) \
+struct name { \
+ struct type *stqh_first; /* first element */ \
+ struct type **stqh_last; /* addr of last next element */ \
+}
+
+#define STAILQ_HEAD_INITIALIZER(head) \
+ { NULL, &(head).stqh_first }
+
+#define STAILQ_ENTRY(type) \
+struct { \
+ struct type *stqe_next; /* next element */ \
+}
+
+/*
+ * Singly-linked Tail queue functions.
+ */
+#define STAILQ_INIT(head) do { \
+ (head)->stqh_first = NULL; \
+ (head)->stqh_last = &(head)->stqh_first; \
+} while (/*CONSTCOND*/0)
+
+#define STAILQ_INSERT_HEAD(head, elm, field) do { \
+ if (((elm)->field.stqe_next = (head)->stqh_first) == NULL) \
+ (head)->stqh_last = &(elm)->field.stqe_next; \
+ (head)->stqh_first = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define STAILQ_INSERT_TAIL(head, elm, field) do { \
+ (elm)->field.stqe_next = NULL; \
+ *(head)->stqh_last = (elm); \
+ (head)->stqh_last = &(elm)->field.stqe_next; \
+} while (/*CONSTCOND*/0)
+
+#define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \
+ if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\
+ (head)->stqh_last = &(elm)->field.stqe_next; \
+ (listelm)->field.stqe_next = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define STAILQ_REMOVE_HEAD(head, field) do { \
+ if (((head)->stqh_first = (head)->stqh_first->field.stqe_next) == NULL) \
+ (head)->stqh_last = &(head)->stqh_first; \
+} while (/*CONSTCOND*/0)
+
+#define STAILQ_REMOVE(head, elm, type, field) do { \
+ if ((head)->stqh_first == (elm)) { \
+ STAILQ_REMOVE_HEAD((head), field); \
+ } else { \
+ struct type *curelm = (head)->stqh_first; \
+ while (curelm->field.stqe_next != (elm)) \
+ curelm = curelm->field.stqe_next; \
+ if ((curelm->field.stqe_next = \
+ curelm->field.stqe_next->field.stqe_next) == NULL) \
+ (head)->stqh_last = &(curelm)->field.stqe_next; \
+ } \
+} while (/*CONSTCOND*/0)
+
+#define STAILQ_FOREACH(var, head, field) \
+ for ((var) = ((head)->stqh_first); \
+ (var); \
+ (var) = ((var)->field.stqe_next))
+
+#define STAILQ_CONCAT(head1, head2) do { \
+ if (!STAILQ_EMPTY((head2))) { \
+ *(head1)->stqh_last = (head2)->stqh_first; \
+ (head1)->stqh_last = (head2)->stqh_last; \
+ STAILQ_INIT((head2)); \
+ } \
+} while (/*CONSTCOND*/0)
+
+/*
+ * Singly-linked Tail queue access methods.
+ */
+#define STAILQ_EMPTY(head) ((head)->stqh_first == NULL)
+#define STAILQ_FIRST(head) ((head)->stqh_first)
+#define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next)
+
+
+/*
+ * Simple queue definitions.
+ */
+#define SIMPLEQ_HEAD(name, type) \
+struct name { \
+ struct type *sqh_first; /* first element */ \
+ struct type **sqh_last; /* addr of last next element */ \
+}
+
+#define SIMPLEQ_HEAD_INITIALIZER(head) \
+ { NULL, &(head).sqh_first }
+
+#define SIMPLEQ_ENTRY(type) \
+struct { \
+ struct type *sqe_next; /* next element */ \
+}
+
+/*
+ * Simple queue functions.
+ */
+#define SIMPLEQ_INIT(head) do { \
+ (head)->sqh_first = NULL; \
+ (head)->sqh_last = &(head)->sqh_first; \
+} while (/*CONSTCOND*/0)
+
+#define SIMPLEQ_INSERT_HEAD(head, elm, field) do { \
+ if (((elm)->field.sqe_next = (head)->sqh_first) == NULL) \
+ (head)->sqh_last = &(elm)->field.sqe_next; \
+ (head)->sqh_first = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define SIMPLEQ_INSERT_TAIL(head, elm, field) do { \
+ (elm)->field.sqe_next = NULL; \
+ *(head)->sqh_last = (elm); \
+ (head)->sqh_last = &(elm)->field.sqe_next; \
+} while (/*CONSTCOND*/0)
+
+#define SIMPLEQ_INSERT_AFTER(head, listelm, elm, field) do { \
+ if (((elm)->field.sqe_next = (listelm)->field.sqe_next) == NULL)\
+ (head)->sqh_last = &(elm)->field.sqe_next; \
+ (listelm)->field.sqe_next = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define SIMPLEQ_REMOVE_HEAD(head, field) do { \
+ if (((head)->sqh_first = (head)->sqh_first->field.sqe_next) == NULL) \
+ (head)->sqh_last = &(head)->sqh_first; \
+} while (/*CONSTCOND*/0)
+
+#define SIMPLEQ_REMOVE(head, elm, type, field) do { \
+ if ((head)->sqh_first == (elm)) { \
+ SIMPLEQ_REMOVE_HEAD((head), field); \
+ } else { \
+ struct type *curelm = (head)->sqh_first; \
+ while (curelm->field.sqe_next != (elm)) \
+ curelm = curelm->field.sqe_next; \
+ if ((curelm->field.sqe_next = \
+ curelm->field.sqe_next->field.sqe_next) == NULL) \
+ (head)->sqh_last = &(curelm)->field.sqe_next; \
+ } \
+} while (/*CONSTCOND*/0)
+
+#define SIMPLEQ_FOREACH(var, head, field) \
+ for ((var) = ((head)->sqh_first); \
+ (var); \
+ (var) = ((var)->field.sqe_next))
+
+/*
+ * Simple queue access methods.
+ */
+#define SIMPLEQ_EMPTY(head) ((head)->sqh_first == NULL)
+#define SIMPLEQ_FIRST(head) ((head)->sqh_first)
+#define SIMPLEQ_NEXT(elm, field) ((elm)->field.sqe_next)
+
+
+/*
+ * Tail queue definitions.
+ */
+#define _TAILQ_HEAD(name, type, qual) \
+struct name { \
+ qual type *tqh_first; /* first element */ \
+ qual type *qual *tqh_last; /* addr of last next element */ \
+}
+#define TAILQ_HEAD(name, type) _TAILQ_HEAD(name, struct type,)
+
+#define TAILQ_HEAD_INITIALIZER(head) \
+ { NULL, &(head).tqh_first }
+
+#define _TAILQ_ENTRY(type, qual) \
+struct { \
+ qual type *tqe_next; /* next element */ \
+ qual type *qual *tqe_prev; /* address of previous next element */\
+}
+#define TAILQ_ENTRY(type) _TAILQ_ENTRY(struct type,)
+
+/*
+ * Tail queue functions.
+ */
+#define TAILQ_INIT(head) do { \
+ (head)->tqh_first = NULL; \
+ (head)->tqh_last = &(head)->tqh_first; \
+} while (/*CONSTCOND*/0)
+
+#define TAILQ_INSERT_HEAD(head, elm, field) do { \
+ if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \
+ (head)->tqh_first->field.tqe_prev = \
+ &(elm)->field.tqe_next; \
+ else \
+ (head)->tqh_last = &(elm)->field.tqe_next; \
+ (head)->tqh_first = (elm); \
+ (elm)->field.tqe_prev = &(head)->tqh_first; \
+} while (/*CONSTCOND*/0)
+
+#define TAILQ_INSERT_TAIL(head, elm, field) do { \
+ (elm)->field.tqe_next = NULL; \
+ (elm)->field.tqe_prev = (head)->tqh_last; \
+ *(head)->tqh_last = (elm); \
+ (head)->tqh_last = &(elm)->field.tqe_next; \
+} while (/*CONSTCOND*/0)
+
+#define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \
+ if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\
+ (elm)->field.tqe_next->field.tqe_prev = \
+ &(elm)->field.tqe_next; \
+ else \
+ (head)->tqh_last = &(elm)->field.tqe_next; \
+ (listelm)->field.tqe_next = (elm); \
+ (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \
+} while (/*CONSTCOND*/0)
+
+#define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \
+ (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \
+ (elm)->field.tqe_next = (listelm); \
+ *(listelm)->field.tqe_prev = (elm); \
+ (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \
+} while (/*CONSTCOND*/0)
+
+#define TAILQ_REMOVE(head, elm, field) do { \
+ if (((elm)->field.tqe_next) != NULL) \
+ (elm)->field.tqe_next->field.tqe_prev = \
+ (elm)->field.tqe_prev; \
+ else \
+ (head)->tqh_last = (elm)->field.tqe_prev; \
+ *(elm)->field.tqe_prev = (elm)->field.tqe_next; \
+} while (/*CONSTCOND*/0)
+
+#define TAILQ_FOREACH(var, head, field) \
+ for ((var) = ((head)->tqh_first); \
+ (var); \
+ (var) = ((var)->field.tqe_next))
+
+#define TAILQ_FOREACH_REVERSE(var, head, headname, field) \
+ for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \
+ (var); \
+ (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last)))
+
+#define TAILQ_CONCAT(head1, head2, field) do { \
+ if (!TAILQ_EMPTY(head2)) { \
+ *(head1)->tqh_last = (head2)->tqh_first; \
+ (head2)->tqh_first->field.tqe_prev = (head1)->tqh_last; \
+ (head1)->tqh_last = (head2)->tqh_last; \
+ TAILQ_INIT((head2)); \
+ } \
+} while (/*CONSTCOND*/0)
+
+/*
+ * Tail queue access methods.
+ */
+#define TAILQ_EMPTY(head) ((head)->tqh_first == NULL)
+#define TAILQ_FIRST(head) ((head)->tqh_first)
+#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
+
+#define TAILQ_LAST(head, headname) \
+ (*(((struct headname *)((head)->tqh_last))->tqh_last))
+#define TAILQ_PREV(elm, headname, field) \
+ (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))
+
+
+/*
+ * Circular queue definitions.
+ */
+#define CIRCLEQ_HEAD(name, type) \
+struct name { \
+ struct type *cqh_first; /* first element */ \
+ struct type *cqh_last; /* last element */ \
+}
+
+#define CIRCLEQ_HEAD_INITIALIZER(head) \
+ { (void *)&head, (void *)&head }
+
+#define CIRCLEQ_ENTRY(type) \
+struct { \
+ struct type *cqe_next; /* next element */ \
+ struct type *cqe_prev; /* previous element */ \
+}
+
+/*
+ * Circular queue functions.
+ */
+#define CIRCLEQ_INIT(head) do { \
+ (head)->cqh_first = (void *)(head); \
+ (head)->cqh_last = (void *)(head); \
+} while (/*CONSTCOND*/0)
+
+#define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do { \
+ (elm)->field.cqe_next = (listelm)->field.cqe_next; \
+ (elm)->field.cqe_prev = (listelm); \
+ if ((listelm)->field.cqe_next == (void *)(head)) \
+ (head)->cqh_last = (elm); \
+ else \
+ (listelm)->field.cqe_next->field.cqe_prev = (elm); \
+ (listelm)->field.cqe_next = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do { \
+ (elm)->field.cqe_next = (listelm); \
+ (elm)->field.cqe_prev = (listelm)->field.cqe_prev; \
+ if ((listelm)->field.cqe_prev == (void *)(head)) \
+ (head)->cqh_first = (elm); \
+ else \
+ (listelm)->field.cqe_prev->field.cqe_next = (elm); \
+ (listelm)->field.cqe_prev = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define CIRCLEQ_INSERT_HEAD(head, elm, field) do { \
+ (elm)->field.cqe_next = (head)->cqh_first; \
+ (elm)->field.cqe_prev = (void *)(head); \
+ if ((head)->cqh_last == (void *)(head)) \
+ (head)->cqh_last = (elm); \
+ else \
+ (head)->cqh_first->field.cqe_prev = (elm); \
+ (head)->cqh_first = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define CIRCLEQ_INSERT_TAIL(head, elm, field) do { \
+ (elm)->field.cqe_next = (void *)(head); \
+ (elm)->field.cqe_prev = (head)->cqh_last; \
+ if ((head)->cqh_first == (void *)(head)) \
+ (head)->cqh_first = (elm); \
+ else \
+ (head)->cqh_last->field.cqe_next = (elm); \
+ (head)->cqh_last = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define CIRCLEQ_REMOVE(head, elm, field) do { \
+ if ((elm)->field.cqe_next == (void *)(head)) \
+ (head)->cqh_last = (elm)->field.cqe_prev; \
+ else \
+ (elm)->field.cqe_next->field.cqe_prev = \
+ (elm)->field.cqe_prev; \
+ if ((elm)->field.cqe_prev == (void *)(head)) \
+ (head)->cqh_first = (elm)->field.cqe_next; \
+ else \
+ (elm)->field.cqe_prev->field.cqe_next = \
+ (elm)->field.cqe_next; \
+} while (/*CONSTCOND*/0)
+
+#define CIRCLEQ_FOREACH(var, head, field) \
+ for ((var) = ((head)->cqh_first); \
+ (var) != (const void *)(head); \
+ (var) = ((var)->field.cqe_next))
+
+#define CIRCLEQ_FOREACH_REVERSE(var, head, field) \
+ for ((var) = ((head)->cqh_last); \
+ (var) != (const void *)(head); \
+ (var) = ((var)->field.cqe_prev))
+
+/*
+ * Circular queue access methods.
+ */
+#define CIRCLEQ_EMPTY(head) ((head)->cqh_first == (void *)(head))
+#define CIRCLEQ_FIRST(head) ((head)->cqh_first)
+#define CIRCLEQ_LAST(head) ((head)->cqh_last)
+#define CIRCLEQ_NEXT(elm, field) ((elm)->field.cqe_next)
+#define CIRCLEQ_PREV(elm, field) ((elm)->field.cqe_prev)
+
+#define CIRCLEQ_LOOP_NEXT(head, elm, field) \
+ (((elm)->field.cqe_next == (void *)(head)) \
+ ? ((head)->cqh_first) \
+ : (elm->field.cqe_next))
+#define CIRCLEQ_LOOP_PREV(head, elm, field) \
+ (((elm)->field.cqe_prev == (void *)(head)) \
+ ? ((head)->cqh_last) \
+ : (elm->field.cqe_prev))
+
+#endif /* sys/queue.h */
diff --git a/package/libxml2/Makefile b/package/libxml2/Makefile
index 76df60864..8c5ee7689 100644
--- a/package/libxml2/Makefile
+++ b/package/libxml2/Makefile
@@ -10,7 +10,8 @@ PKG_MD5SUM:= 9c0cfef285d5c4a5c80d00904ddab380
PKG_DESCR:= XML C parser and toolkit
PKG_SECTION:= libs
PKG_DEPENDS:= zlib
-PKG_BUILDDEP:= autotool gettext-tiny bzip2-host python2-host libxml2-host zlib
+PKG_BUILDDEP:= libxml2-host zlib
+HOST_BUILDDEP:= python2-host
PKG_URL:= http://www.xmlsoft.org/
PKG_SITES:= http://xmlsoft.org/sources/
PKG_OPTS:= dev
diff --git a/package/logrotate/Makefile b/package/logrotate/Makefile
index 32ced2e60..375746034 100644
--- a/package/logrotate/Makefile
+++ b/package/logrotate/Makefile
@@ -4,9 +4,9 @@
include ${TOPDIR}/rules.mk
PKG_NAME:= logrotate
-PKG_VERSION:= 3.7.8
+PKG_VERSION:= 3.8.7
PKG_RELEASE:= 1
-PKG_MD5SUM:= b3589bea6d8d5afc8a84134fddaae973
+PKG_MD5SUM:= 99e08503ef24c3e2e3ff74cc5f3be213
PKG_DESCR:= logfile rotation utility
PKG_SECTION:= misc
PKG_DEPENDS:= libpopt
diff --git a/package/logrotate/patches/patch-Makefile b/package/logrotate/patches/patch-Makefile
index 755e612b1..c2b81fbbc 100644
--- a/package/logrotate/patches/patch-Makefile
+++ b/package/logrotate/patches/patch-Makefile
@@ -1,60 +1,33 @@
---- logrotate-3.7.8.orig/Makefile 2008-05-19 12:25:54.000000000 +0200
-+++ logrotate-3.7.8/Makefile 2011-01-15 23:45:59.000000000 +0100
-@@ -1,10 +1,10 @@
+--- logrotate-3.8.7.orig/Makefile 2013-06-10 13:29:16.000000000 +0200
++++ logrotate-3.8.7/Makefile 2014-03-23 15:16:09.000000000 +0100
+@@ -1,11 +1,11 @@
VERSION = $(shell awk '/Version:/ { print $$2 }' logrotate.spec)
-OS_NAME = $(shell uname -s)
+OS_NAME = Linux
LFS = $(shell echo `getconf LFS_CFLAGS 2>/dev/null`)
--CFLAGS = -Wall -D_GNU_SOURCE -D$(OS_NAME) -DVERSION=\"$(VERSION)\" $(RPM_OPT_FLAGS) $(LFS)
-+CFLAGS ?= -Wall -D_GNU_SOURCE -D$(OS_NAME) -DVERSION=\"$(VERSION)\" $(RPM_OPT_FLAGS) $(LFS)
+ CFLAGS = -Wall -D_GNU_SOURCE -D$(OS_NAME) -DVERSION=\"$(VERSION)\" $(RPM_OPT_FLAGS) $(LFS)
PROG = logrotate
MAN = logrotate.8
+ MAN5 = logrotate.conf.5
-LOADLIBES = -lpopt
+LIBS = -lpopt
SVNURL= svn+ssh://svn.fedorahosted.org/svn/logrotate
SVNPUBURL = http://svn.fedorahosted.org/svn/logrotate
SVNTAG = r$(subst .,-,$(VERSION))
-@@ -68,10 +68,7 @@ MANDIR = $(BASEDIR)/man
- OBJS = logrotate.o log.o config.o basenames.o
- SOURCES = $(subst .o,.c,$(OBJS) $(LIBOBJS))
+@@ -64,7 +64,7 @@ endif
+ # Red Hat Linux
+ ifeq ($(OS_NAME),Linux)
+ INSTALL = install
+- BASEDIR = /usr
++ BASEDIR = $(DESTDIR)/usr
+ endif
--ifeq ($(RPM_OPT_FLAGS),)
--CFLAGS += -g
--LDFLAGS = -g
--endif
-+LDFLAGS ?=
-
- ifeq (.depend,$(wildcard .depend))
- TARGET=$(PROG)
-@@ -84,6 +81,7 @@ RCSVERSION = $(subst .,-,$(VERSION))
- all: $(TARGET)
+ # FreeBSD
+@@ -117,6 +117,7 @@ RCSVERSION = $(subst .,-,$(VERSION))
+ all: $(TARGET) pretest
$(PROG): $(OBJS)
+ $(CC) $(LDFLAGS) -o $(PROG) $^ $(LIBS)
clean:
rm -f $(OBJS) $(PROG) core* .depend
-@@ -96,16 +94,16 @@ test: $(TARGET)
- (cd test; ./test)
-
- install:
-- [ -d $(PREFIX)/$(BINDIR) ] || mkdir -p $(PREFIX)/$(BINDIR)
-- [ -d $(PREFIX)/$(MANDIR) ] || mkdir -p $(PREFIX)/$(MANDIR)
-- [ -d $(PREFIX)/$(MANDIR)/man8 ] || mkdir -p $(PREFIX)/$(MANDIR)/man8
-+ [ -d $(DESTDIR)/$(BINDIR) ] || mkdir -p $(DESTDIR)/$(BINDIR)
-+ [ -d $(DESTDIR)/$(MANDIR) ] || mkdir -p $(DESTDIR)/$(MANDIR)
-+ [ -d $(DESTDIR)/$(MANDIR)/man8 ] || mkdir -p $(DESTDIR)/$(MANDIR)/man8
-
- if [ "$(OS_NAME)" = HP-UX ]; then \
-- $(INSTALL) $(PROG) $(PREFIX)/$(BINDIR) 0755 bin bin; \
-- $(INSTALL) $(MAN) $(PREFIX)/$(MANDIR)/man`echo $(MAN) | sed "s/.*\.//"` 0644 bin bin; \
-+ $(INSTALL) $(PROG) $(DESTDIR)/$(BINDIR) 0755 bin bin; \
-+ $(INSTALL) $(MAN) $(DESTDIR)/$(MANDIR)/man`echo $(MAN) | sed "s/.*\.//"` 0644 bin bin; \
- else \
-- $(INSTALL) -m 755 $(PROG) $(PREFIX)/$(BINDIR); \
-- $(INSTALL) -m 644 $(MAN) $(PREFIX)/$(MANDIR)/man`echo $(MAN) | sed "s/.*\.//"`/$(MAN); \
-+ $(INSTALL) -m 755 $(PROG) $(DESTDIR)/$(BINDIR); \
-+ $(INSTALL) -m 644 $(MAN) $(DESTDIR)/$(MANDIR)/man`echo $(MAN) | sed "s/.*\.//"`/$(MAN); \
- fi
-
- co:
diff --git a/package/logrotate/patches/patch-config_c b/package/logrotate/patches/patch-config_c
new file mode 100644
index 000000000..ea58cd4ce
--- /dev/null
+++ b/package/logrotate/patches/patch-config_c
@@ -0,0 +1,8 @@
+--- logrotate-3.8.7.orig/config.c 2013-07-31 13:34:31.000000000 +0200
++++ logrotate-3.8.7/config.c 2014-03-23 15:11:39.000000000 +0100
+@@ -1,4 +1,4 @@
+-#include <sys/queue.h>
++#include "queue.h"
+ /* Alloca is defined in stdlib.h in NetBSD */
+ #ifndef __NetBSD__
+ #include <alloca.h>
diff --git a/package/logrotate/patches/patch-logrotate_c b/package/logrotate/patches/patch-logrotate_c
new file mode 100644
index 000000000..d2ee8dd83
--- /dev/null
+++ b/package/logrotate/patches/patch-logrotate_c
@@ -0,0 +1,8 @@
+--- logrotate-3.8.7.orig/logrotate.c 2013-10-10 10:43:36.000000000 +0200
++++ logrotate-3.8.7/logrotate.c 2014-03-23 15:10:21.000000000 +0100
+@@ -1,4 +1,4 @@
+-#include <sys/queue.h>
++#include "queue.h"
+ /* alloca() is defined in stdlib.h in NetBSD */
+ #ifndef __NetBSD__
+ #include <alloca.h>
diff --git a/package/logrotate/patches/patch-logrotate_h b/package/logrotate/patches/patch-logrotate_h
new file mode 100644
index 000000000..7bc3c06ef
--- /dev/null
+++ b/package/logrotate/patches/patch-logrotate_h
@@ -0,0 +1,11 @@
+--- logrotate-3.8.7.orig/logrotate.h 2013-06-10 13:29:16.000000000 +0200
++++ logrotate-3.8.7/logrotate.h 2014-03-23 15:11:06.000000000 +0100
+@@ -2,7 +2,7 @@
+ #define H_LOGROTATE
+
+ #include <sys/types.h>
+-#include <sys/queue.h>
++#include "queue.h"
+ #include <glob.h>
+
+ #include "config.h"
diff --git a/package/logrotate/src/queue.h b/package/logrotate/src/queue.h
new file mode 100644
index 000000000..daf4553d3
--- /dev/null
+++ b/package/logrotate/src/queue.h
@@ -0,0 +1,574 @@
+/*
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)queue.h 8.5 (Berkeley) 8/20/94
+ */
+
+#ifndef _SYS_QUEUE_H_
+#define _SYS_QUEUE_H_
+
+/*
+ * This file defines five types of data structures: singly-linked lists,
+ * lists, simple queues, tail queues, and circular queues.
+ *
+ * A singly-linked list is headed by a single forward pointer. The
+ * elements are singly linked for minimum space and pointer manipulation
+ * overhead at the expense of O(n) removal for arbitrary elements. New
+ * elements can be added to the list after an existing element or at the
+ * head of the list. Elements being removed from the head of the list
+ * should use the explicit macro for this purpose for optimum
+ * efficiency. A singly-linked list may only be traversed in the forward
+ * direction. Singly-linked lists are ideal for applications with large
+ * datasets and few or no removals or for implementing a LIFO queue.
+ *
+ * A list is headed by a single forward pointer (or an array of forward
+ * pointers for a hash table header). The elements are doubly linked
+ * so that an arbitrary element can be removed without a need to
+ * traverse the list. New elements can be added to the list before
+ * or after an existing element or at the head of the list. A list
+ * may only be traversed in the forward direction.
+ *
+ * A simple queue is headed by a pair of pointers, one the head of the
+ * list and the other to the tail of the list. The elements are singly
+ * linked to save space, so elements can only be removed from the
+ * head of the list. New elements can be added to the list after
+ * an existing element, at the head of the list, or at the end of the
+ * list. A simple queue may only be traversed in the forward direction.
+ *
+ * A tail queue is headed by a pair of pointers, one to the head of the
+ * list and the other to the tail of the list. The elements are doubly
+ * linked so that an arbitrary element can be removed without a need to
+ * traverse the list. New elements can be added to the list before or
+ * after an existing element, at the head of the list, or at the end of
+ * the list. A tail queue may be traversed in either direction.
+ *
+ * A circle queue is headed by a pair of pointers, one to the head of the
+ * list and the other to the tail of the list. The elements are doubly
+ * linked so that an arbitrary element can be removed without a need to
+ * traverse the list. New elements can be added to the list before or after
+ * an existing element, at the head of the list, or at the end of the list.
+ * A circle queue may be traversed in either direction, but has a more
+ * complex end of list detection.
+ *
+ * For details on the use of these macros, see the queue(3) manual page.
+ */
+
+/*
+ * List definitions.
+ */
+#define LIST_HEAD(name, type) \
+struct name { \
+ struct type *lh_first; /* first element */ \
+}
+
+#define LIST_HEAD_INITIALIZER(head) \
+ { NULL }
+
+#define LIST_ENTRY(type) \
+struct { \
+ struct type *le_next; /* next element */ \
+ struct type **le_prev; /* address of previous next element */ \
+}
+
+/*
+ * List functions.
+ */
+#define LIST_INIT(head) do { \
+ (head)->lh_first = NULL; \
+} while (/*CONSTCOND*/0)
+
+#define LIST_INSERT_AFTER(listelm, elm, field) do { \
+ if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \
+ (listelm)->field.le_next->field.le_prev = \
+ &(elm)->field.le_next; \
+ (listelm)->field.le_next = (elm); \
+ (elm)->field.le_prev = &(listelm)->field.le_next; \
+} while (/*CONSTCOND*/0)
+
+#define LIST_INSERT_BEFORE(listelm, elm, field) do { \
+ (elm)->field.le_prev = (listelm)->field.le_prev; \
+ (elm)->field.le_next = (listelm); \
+ *(listelm)->field.le_prev = (elm); \
+ (listelm)->field.le_prev = &(elm)->field.le_next; \
+} while (/*CONSTCOND*/0)
+
+#define LIST_INSERT_HEAD(head, elm, field) do { \
+ if (((elm)->field.le_next = (head)->lh_first) != NULL) \
+ (head)->lh_first->field.le_prev = &(elm)->field.le_next;\
+ (head)->lh_first = (elm); \
+ (elm)->field.le_prev = &(head)->lh_first; \
+} while (/*CONSTCOND*/0)
+
+#define LIST_REMOVE(elm, field) do { \
+ if ((elm)->field.le_next != NULL) \
+ (elm)->field.le_next->field.le_prev = \
+ (elm)->field.le_prev; \
+ *(elm)->field.le_prev = (elm)->field.le_next; \
+} while (/*CONSTCOND*/0)
+
+#define LIST_FOREACH(var, head, field) \
+ for ((var) = ((head)->lh_first); \
+ (var); \
+ (var) = ((var)->field.le_next))
+
+/*
+ * List access methods.
+ */
+#define LIST_EMPTY(head) ((head)->lh_first == NULL)
+#define LIST_FIRST(head) ((head)->lh_first)
+#define LIST_NEXT(elm, field) ((elm)->field.le_next)
+
+
+/*
+ * Singly-linked List definitions.
+ */
+#define SLIST_HEAD(name, type) \
+struct name { \
+ struct type *slh_first; /* first element */ \
+}
+
+#define SLIST_HEAD_INITIALIZER(head) \
+ { NULL }
+
+#define SLIST_ENTRY(type) \
+struct { \
+ struct type *sle_next; /* next element */ \
+}
+
+/*
+ * Singly-linked List functions.
+ */
+#define SLIST_INIT(head) do { \
+ (head)->slh_first = NULL; \
+} while (/*CONSTCOND*/0)
+
+#define SLIST_INSERT_AFTER(slistelm, elm, field) do { \
+ (elm)->field.sle_next = (slistelm)->field.sle_next; \
+ (slistelm)->field.sle_next = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define SLIST_INSERT_HEAD(head, elm, field) do { \
+ (elm)->field.sle_next = (head)->slh_first; \
+ (head)->slh_first = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define SLIST_REMOVE_HEAD(head, field) do { \
+ (head)->slh_first = (head)->slh_first->field.sle_next; \
+} while (/*CONSTCOND*/0)
+
+#define SLIST_REMOVE(head, elm, type, field) do { \
+ if ((head)->slh_first == (elm)) { \
+ SLIST_REMOVE_HEAD((head), field); \
+ } \
+ else { \
+ struct type *curelm = (head)->slh_first; \
+ while(curelm->field.sle_next != (elm)) \
+ curelm = curelm->field.sle_next; \
+ curelm->field.sle_next = \
+ curelm->field.sle_next->field.sle_next; \
+ } \
+} while (/*CONSTCOND*/0)
+
+#define SLIST_FOREACH(var, head, field) \
+ for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next)
+
+/*
+ * Singly-linked List access methods.
+ */
+#define SLIST_EMPTY(head) ((head)->slh_first == NULL)
+#define SLIST_FIRST(head) ((head)->slh_first)
+#define SLIST_NEXT(elm, field) ((elm)->field.sle_next)
+
+
+/*
+ * Singly-linked Tail queue declarations.
+ */
+#define STAILQ_HEAD(name, type) \
+struct name { \
+ struct type *stqh_first; /* first element */ \
+ struct type **stqh_last; /* addr of last next element */ \
+}
+
+#define STAILQ_HEAD_INITIALIZER(head) \
+ { NULL, &(head).stqh_first }
+
+#define STAILQ_ENTRY(type) \
+struct { \
+ struct type *stqe_next; /* next element */ \
+}
+
+/*
+ * Singly-linked Tail queue functions.
+ */
+#define STAILQ_INIT(head) do { \
+ (head)->stqh_first = NULL; \
+ (head)->stqh_last = &(head)->stqh_first; \
+} while (/*CONSTCOND*/0)
+
+#define STAILQ_INSERT_HEAD(head, elm, field) do { \
+ if (((elm)->field.stqe_next = (head)->stqh_first) == NULL) \
+ (head)->stqh_last = &(elm)->field.stqe_next; \
+ (head)->stqh_first = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define STAILQ_INSERT_TAIL(head, elm, field) do { \
+ (elm)->field.stqe_next = NULL; \
+ *(head)->stqh_last = (elm); \
+ (head)->stqh_last = &(elm)->field.stqe_next; \
+} while (/*CONSTCOND*/0)
+
+#define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \
+ if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\
+ (head)->stqh_last = &(elm)->field.stqe_next; \
+ (listelm)->field.stqe_next = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define STAILQ_REMOVE_HEAD(head, field) do { \
+ if (((head)->stqh_first = (head)->stqh_first->field.stqe_next) == NULL) \
+ (head)->stqh_last = &(head)->stqh_first; \
+} while (/*CONSTCOND*/0)
+
+#define STAILQ_REMOVE(head, elm, type, field) do { \
+ if ((head)->stqh_first == (elm)) { \
+ STAILQ_REMOVE_HEAD((head), field); \
+ } else { \
+ struct type *curelm = (head)->stqh_first; \
+ while (curelm->field.stqe_next != (elm)) \
+ curelm = curelm->field.stqe_next; \
+ if ((curelm->field.stqe_next = \
+ curelm->field.stqe_next->field.stqe_next) == NULL) \
+ (head)->stqh_last = &(curelm)->field.stqe_next; \
+ } \
+} while (/*CONSTCOND*/0)
+
+#define STAILQ_FOREACH(var, head, field) \
+ for ((var) = ((head)->stqh_first); \
+ (var); \
+ (var) = ((var)->field.stqe_next))
+
+#define STAILQ_CONCAT(head1, head2) do { \
+ if (!STAILQ_EMPTY((head2))) { \
+ *(head1)->stqh_last = (head2)->stqh_first; \
+ (head1)->stqh_last = (head2)->stqh_last; \
+ STAILQ_INIT((head2)); \
+ } \
+} while (/*CONSTCOND*/0)
+
+/*
+ * Singly-linked Tail queue access methods.
+ */
+#define STAILQ_EMPTY(head) ((head)->stqh_first == NULL)
+#define STAILQ_FIRST(head) ((head)->stqh_first)
+#define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next)
+
+
+/*
+ * Simple queue definitions.
+ */
+#define SIMPLEQ_HEAD(name, type) \
+struct name { \
+ struct type *sqh_first; /* first element */ \
+ struct type **sqh_last; /* addr of last next element */ \
+}
+
+#define SIMPLEQ_HEAD_INITIALIZER(head) \
+ { NULL, &(head).sqh_first }
+
+#define SIMPLEQ_ENTRY(type) \
+struct { \
+ struct type *sqe_next; /* next element */ \
+}
+
+/*
+ * Simple queue functions.
+ */
+#define SIMPLEQ_INIT(head) do { \
+ (head)->sqh_first = NULL; \
+ (head)->sqh_last = &(head)->sqh_first; \
+} while (/*CONSTCOND*/0)
+
+#define SIMPLEQ_INSERT_HEAD(head, elm, field) do { \
+ if (((elm)->field.sqe_next = (head)->sqh_first) == NULL) \
+ (head)->sqh_last = &(elm)->field.sqe_next; \
+ (head)->sqh_first = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define SIMPLEQ_INSERT_TAIL(head, elm, field) do { \
+ (elm)->field.sqe_next = NULL; \
+ *(head)->sqh_last = (elm); \
+ (head)->sqh_last = &(elm)->field.sqe_next; \
+} while (/*CONSTCOND*/0)
+
+#define SIMPLEQ_INSERT_AFTER(head, listelm, elm, field) do { \
+ if (((elm)->field.sqe_next = (listelm)->field.sqe_next) == NULL)\
+ (head)->sqh_last = &(elm)->field.sqe_next; \
+ (listelm)->field.sqe_next = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define SIMPLEQ_REMOVE_HEAD(head, field) do { \
+ if (((head)->sqh_first = (head)->sqh_first->field.sqe_next) == NULL) \
+ (head)->sqh_last = &(head)->sqh_first; \
+} while (/*CONSTCOND*/0)
+
+#define SIMPLEQ_REMOVE(head, elm, type, field) do { \
+ if ((head)->sqh_first == (elm)) { \
+ SIMPLEQ_REMOVE_HEAD((head), field); \
+ } else { \
+ struct type *curelm = (head)->sqh_first; \
+ while (curelm->field.sqe_next != (elm)) \
+ curelm = curelm->field.sqe_next; \
+ if ((curelm->field.sqe_next = \
+ curelm->field.sqe_next->field.sqe_next) == NULL) \
+ (head)->sqh_last = &(curelm)->field.sqe_next; \
+ } \
+} while (/*CONSTCOND*/0)
+
+#define SIMPLEQ_FOREACH(var, head, field) \
+ for ((var) = ((head)->sqh_first); \
+ (var); \
+ (var) = ((var)->field.sqe_next))
+
+/*
+ * Simple queue access methods.
+ */
+#define SIMPLEQ_EMPTY(head) ((head)->sqh_first == NULL)
+#define SIMPLEQ_FIRST(head) ((head)->sqh_first)
+#define SIMPLEQ_NEXT(elm, field) ((elm)->field.sqe_next)
+
+
+/*
+ * Tail queue definitions.
+ */
+#define _TAILQ_HEAD(name, type, qual) \
+struct name { \
+ qual type *tqh_first; /* first element */ \
+ qual type *qual *tqh_last; /* addr of last next element */ \
+}
+#define TAILQ_HEAD(name, type) _TAILQ_HEAD(name, struct type,)
+
+#define TAILQ_HEAD_INITIALIZER(head) \
+ { NULL, &(head).tqh_first }
+
+#define _TAILQ_ENTRY(type, qual) \
+struct { \
+ qual type *tqe_next; /* next element */ \
+ qual type *qual *tqe_prev; /* address of previous next element */\
+}
+#define TAILQ_ENTRY(type) _TAILQ_ENTRY(struct type,)
+
+/*
+ * Tail queue functions.
+ */
+#define TAILQ_INIT(head) do { \
+ (head)->tqh_first = NULL; \
+ (head)->tqh_last = &(head)->tqh_first; \
+} while (/*CONSTCOND*/0)
+
+#define TAILQ_INSERT_HEAD(head, elm, field) do { \
+ if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \
+ (head)->tqh_first->field.tqe_prev = \
+ &(elm)->field.tqe_next; \
+ else \
+ (head)->tqh_last = &(elm)->field.tqe_next; \
+ (head)->tqh_first = (elm); \
+ (elm)->field.tqe_prev = &(head)->tqh_first; \
+} while (/*CONSTCOND*/0)
+
+#define TAILQ_INSERT_TAIL(head, elm, field) do { \
+ (elm)->field.tqe_next = NULL; \
+ (elm)->field.tqe_prev = (head)->tqh_last; \
+ *(head)->tqh_last = (elm); \
+ (head)->tqh_last = &(elm)->field.tqe_next; \
+} while (/*CONSTCOND*/0)
+
+#define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \
+ if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\
+ (elm)->field.tqe_next->field.tqe_prev = \
+ &(elm)->field.tqe_next; \
+ else \
+ (head)->tqh_last = &(elm)->field.tqe_next; \
+ (listelm)->field.tqe_next = (elm); \
+ (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \
+} while (/*CONSTCOND*/0)
+
+#define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \
+ (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \
+ (elm)->field.tqe_next = (listelm); \
+ *(listelm)->field.tqe_prev = (elm); \
+ (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \
+} while (/*CONSTCOND*/0)
+
+#define TAILQ_REMOVE(head, elm, field) do { \
+ if (((elm)->field.tqe_next) != NULL) \
+ (elm)->field.tqe_next->field.tqe_prev = \
+ (elm)->field.tqe_prev; \
+ else \
+ (head)->tqh_last = (elm)->field.tqe_prev; \
+ *(elm)->field.tqe_prev = (elm)->field.tqe_next; \
+} while (/*CONSTCOND*/0)
+
+#define TAILQ_FOREACH(var, head, field) \
+ for ((var) = ((head)->tqh_first); \
+ (var); \
+ (var) = ((var)->field.tqe_next))
+
+#define TAILQ_FOREACH_REVERSE(var, head, headname, field) \
+ for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \
+ (var); \
+ (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last)))
+
+#define TAILQ_CONCAT(head1, head2, field) do { \
+ if (!TAILQ_EMPTY(head2)) { \
+ *(head1)->tqh_last = (head2)->tqh_first; \
+ (head2)->tqh_first->field.tqe_prev = (head1)->tqh_last; \
+ (head1)->tqh_last = (head2)->tqh_last; \
+ TAILQ_INIT((head2)); \
+ } \
+} while (/*CONSTCOND*/0)
+
+/*
+ * Tail queue access methods.
+ */
+#define TAILQ_EMPTY(head) ((head)->tqh_first == NULL)
+#define TAILQ_FIRST(head) ((head)->tqh_first)
+#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
+
+#define TAILQ_LAST(head, headname) \
+ (*(((struct headname *)((head)->tqh_last))->tqh_last))
+#define TAILQ_PREV(elm, headname, field) \
+ (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))
+
+
+/*
+ * Circular queue definitions.
+ */
+#define CIRCLEQ_HEAD(name, type) \
+struct name { \
+ struct type *cqh_first; /* first element */ \
+ struct type *cqh_last; /* last element */ \
+}
+
+#define CIRCLEQ_HEAD_INITIALIZER(head) \
+ { (void *)&head, (void *)&head }
+
+#define CIRCLEQ_ENTRY(type) \
+struct { \
+ struct type *cqe_next; /* next element */ \
+ struct type *cqe_prev; /* previous element */ \
+}
+
+/*
+ * Circular queue functions.
+ */
+#define CIRCLEQ_INIT(head) do { \
+ (head)->cqh_first = (void *)(head); \
+ (head)->cqh_last = (void *)(head); \
+} while (/*CONSTCOND*/0)
+
+#define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do { \
+ (elm)->field.cqe_next = (listelm)->field.cqe_next; \
+ (elm)->field.cqe_prev = (listelm); \
+ if ((listelm)->field.cqe_next == (void *)(head)) \
+ (head)->cqh_last = (elm); \
+ else \
+ (listelm)->field.cqe_next->field.cqe_prev = (elm); \
+ (listelm)->field.cqe_next = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do { \
+ (elm)->field.cqe_next = (listelm); \
+ (elm)->field.cqe_prev = (listelm)->field.cqe_prev; \
+ if ((listelm)->field.cqe_prev == (void *)(head)) \
+ (head)->cqh_first = (elm); \
+ else \
+ (listelm)->field.cqe_prev->field.cqe_next = (elm); \
+ (listelm)->field.cqe_prev = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define CIRCLEQ_INSERT_HEAD(head, elm, field) do { \
+ (elm)->field.cqe_next = (head)->cqh_first; \
+ (elm)->field.cqe_prev = (void *)(head); \
+ if ((head)->cqh_last == (void *)(head)) \
+ (head)->cqh_last = (elm); \
+ else \
+ (head)->cqh_first->field.cqe_prev = (elm); \
+ (head)->cqh_first = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define CIRCLEQ_INSERT_TAIL(head, elm, field) do { \
+ (elm)->field.cqe_next = (void *)(head); \
+ (elm)->field.cqe_prev = (head)->cqh_last; \
+ if ((head)->cqh_first == (void *)(head)) \
+ (head)->cqh_first = (elm); \
+ else \
+ (head)->cqh_last->field.cqe_next = (elm); \
+ (head)->cqh_last = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define CIRCLEQ_REMOVE(head, elm, field) do { \
+ if ((elm)->field.cqe_next == (void *)(head)) \
+ (head)->cqh_last = (elm)->field.cqe_prev; \
+ else \
+ (elm)->field.cqe_next->field.cqe_prev = \
+ (elm)->field.cqe_prev; \
+ if ((elm)->field.cqe_prev == (void *)(head)) \
+ (head)->cqh_first = (elm)->field.cqe_next; \
+ else \
+ (elm)->field.cqe_prev->field.cqe_next = \
+ (elm)->field.cqe_next; \
+} while (/*CONSTCOND*/0)
+
+#define CIRCLEQ_FOREACH(var, head, field) \
+ for ((var) = ((head)->cqh_first); \
+ (var) != (const void *)(head); \
+ (var) = ((var)->field.cqe_next))
+
+#define CIRCLEQ_FOREACH_REVERSE(var, head, field) \
+ for ((var) = ((head)->cqh_last); \
+ (var) != (const void *)(head); \
+ (var) = ((var)->field.cqe_prev))
+
+/*
+ * Circular queue access methods.
+ */
+#define CIRCLEQ_EMPTY(head) ((head)->cqh_first == (void *)(head))
+#define CIRCLEQ_FIRST(head) ((head)->cqh_first)
+#define CIRCLEQ_LAST(head) ((head)->cqh_last)
+#define CIRCLEQ_NEXT(elm, field) ((elm)->field.cqe_next)
+#define CIRCLEQ_PREV(elm, field) ((elm)->field.cqe_prev)
+
+#define CIRCLEQ_LOOP_NEXT(head, elm, field) \
+ (((elm)->field.cqe_next == (void *)(head)) \
+ ? ((head)->cqh_first) \
+ : (elm->field.cqe_next))
+#define CIRCLEQ_LOOP_PREV(head, elm, field) \
+ (((elm)->field.cqe_prev == (void *)(head)) \
+ ? ((head)->cqh_last) \
+ : (elm->field.cqe_prev))
+
+#endif /* sys/queue.h */
diff --git a/package/lynx/Makefile b/package/lynx/Makefile
index 77cb6ef3e..b15da35e6 100644
--- a/package/lynx/Makefile
+++ b/package/lynx/Makefile
@@ -4,9 +4,9 @@
include ${TOPDIR}/rules.mk
PKG_NAME:= lynx
-PKG_VERSION:= 2.8.7
+PKG_VERSION:= 2.8.8
PKG_RELEASE:= 1
-PKG_MD5SUM:= e36d70f3f09b2d502055ca67f09e363c
+PKG_MD5SUM:= 7caa6773f94e136556c1c30629fe1431
PKG_DESCR:= Standard text browser
PKG_SECTION:= browser
PKG_DEPENDS:= libncurses libopenssl zlib
@@ -17,7 +17,7 @@ PKG_SITES:= http://lynx.isc.org/${PKG_NAME}${PKG_VERSION}/
PKG_NOPARALLEL:= 1
DISTFILES= ${PKG_NAME}${PKG_VERSION}.tar.gz
-WRKDIST= ${WRKDIR}/lynx2-8-7
+WRKDIST= ${WRKDIR}/lynx2-8-8
include ${TOPDIR}/mk/package.mk
diff --git a/package/lynx/patches/patch-WWW_Library_Implementation_HTUtils_h b/package/lynx/patches/patch-WWW_Library_Implementation_HTUtils_h
index d16953cca..c8217b70e 100644
--- a/package/lynx/patches/patch-WWW_Library_Implementation_HTUtils_h
+++ b/package/lynx/patches/patch-WWW_Library_Implementation_HTUtils_h
@@ -1,6 +1,6 @@
---- lynx2-8-7.orig/WWW/Library/Implementation/HTUtils.h 2009-05-25 23:05:31.000000000 +0200
-+++ lynx2-8-7/WWW/Library/Implementation/HTUtils.h 2010-05-29 12:56:42.125000000 +0200
-@@ -677,6 +677,8 @@ extern int WWW_TraceMask;
+--- lynx2-8-8.orig/WWW/Library/Implementation/HTUtils.h 2014-02-05 01:50:18.000000000 +0100
++++ lynx2-8-8/WWW/Library/Implementation/HTUtils.h 2014-03-21 22:14:07.000000000 +0100
+@@ -725,6 +725,8 @@ extern int WWW_TraceMask;
#define SHORTENED_RBIND /* FIXME: do this in configure-script */
@@ -9,15 +9,15 @@
#ifdef USE_SSL
#define free_func free__func
-@@ -717,6 +719,7 @@ extern int WWW_TraceMask;
+@@ -765,6 +767,7 @@ extern int WWW_TraceMask;
#undef free_func
#endif /* USE_SSL */
+#endif
- #ifdef HAVE_LIBDMALLOC
- #include <dmalloc.h> /* Gray Watson's library */
-@@ -747,11 +750,14 @@ extern "C" {
+ #ifdef HAVE_BSD_STDLIB_H
+ #include <bsd/stdlib.h> /* prototype for arc4random.h */
+@@ -801,11 +804,14 @@ extern "C" {
extern FILE *TraceFP(void);
diff --git a/package/lynx/patches/patch-makefile_in b/package/lynx/patches/patch-makefile_in
new file mode 100644
index 000000000..5cb6b5962
--- /dev/null
+++ b/package/lynx/patches/patch-makefile_in
@@ -0,0 +1,11 @@
+--- lynx2-8-8.orig/makefile.in 2014-03-09 22:43:10.000000000 +0100
++++ lynx2-8-8/makefile.in 2014-03-21 23:17:26.000000000 +0100
+@@ -210,7 +210,7 @@ SRC_CFLAGS = \
+ WWWINC=$(WWW_DIR) \
+ WWWLIB="../$(WWW_DIR)/libwww.a"
+
+-actual_PROG = `echo lynx| sed '$(transform)'`
++actual_PROG = lynx
+ binary_PROG = $(actual_PROG)$x
+
+ all lynx$x: cfg_defs.h LYHelp.h
diff --git a/package/lynx/patches/patch-src_chrtrans_makeuctb_c b/package/lynx/patches/patch-src_chrtrans_makeuctb_c
index 9f23671e7..9972a6f8c 100644
--- a/package/lynx/patches/patch-src_chrtrans_makeuctb_c
+++ b/package/lynx/patches/patch-src_chrtrans_makeuctb_c
@@ -1,23 +1,10 @@
---- lynx2-8-7.orig/src/chrtrans/makeuctb.c 2009-02-02 02:41:02.000000000 +0100
-+++ lynx2-8-7/src/chrtrans/makeuctb.c 2010-05-29 12:55:33.031250000 +0200
-@@ -18,6 +18,7 @@
- * version 2, or at your option any later version.
- */
-
-+
- #ifndef HAVE_CONFIG_H
- /* override HTUtils.h fallbacks for cross-compiling */
- #undef HAVE_LSTAT
-@@ -28,10 +29,12 @@
+--- lynx2-8-8.orig/src/chrtrans/makeuctb.c 2013-11-29 01:52:56.000000000 +0100
++++ lynx2-8-8/src/chrtrans/makeuctb.c 2014-03-21 22:12:13.000000000 +0100
+@@ -28,6 +28,7 @@
#define DONT_USE_GETTEXT
#define DONT_USE_SOCKS5
+#define DONT_USE_SSL
#include <UCDefs.h>
#include <UCkd.h>
- #include <LYUtils.h>
-+
- /*
- * Don't try to use LYexit() since this is a standalone file.
- */
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/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..76f15499e 100644
--- a/package/mksh/Makefile
+++ b/package/mksh/Makefile
@@ -17,30 +17,39 @@ 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}))
-
-ifeq ($(ADK_STATIC),y)
-TARGET_CFLAGS+= -static
-TARGET_LDFLAGS+= -static
-endif
+$(eval $(call HOST_template,MKSH,mksh,${PKG_VERSION}-${PKG_RELEASE}))
+$(eval $(call PKG_template,MKSH,mksh,${PKG_VERSION}-${PKG_RELEASE},,${PKG_DESCR},${PKG_SECTION}))
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/moc/Makefile b/package/moc/Makefile
index 11bc9243c..797e76b06 100644
--- a/package/moc/Makefile
+++ b/package/moc/Makefile
@@ -4,9 +4,9 @@
include ${TOPDIR}/rules.mk
PKG_NAME:= moc
-PKG_VERSION:= 2.5.0-beta1
+PKG_VERSION:= 2.5.0-beta2
PKG_RELEASE:= 1
-PKG_MD5SUM:= 795ecba86847e082aa2f21937cc04804
+PKG_MD5SUM:= da87b90b57934234589b63e347921458
PKG_DESCR:= console music player
PKG_SECTION:= multimedia
PKG_DEPENDS:= libmad libvorbis libcurl libflac
@@ -22,6 +22,7 @@ include ${TOPDIR}/mk/package.mk
$(eval $(call PKG_template,MOC,moc,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+TARGET_CPPFLAGS+= -D_GNU_SOURCE -D_POSIX_SOURCE
TARGET_LDFLAGS+= -ltinfo
CONFIGURE_ARGS+= --without-jack \
--without-oss \
diff --git a/package/mpd/Makefile b/package/mpd/Makefile
index 4c8ab359a..b104f00f5 100644
--- a/package/mpd/Makefile
+++ b/package/mpd/Makefile
@@ -5,7 +5,7 @@ include ${TOPDIR}/rules.mk
PKG_NAME:= mpd
PKG_VERSION:= 0.18.9
-PKG_RELEASE:= 1
+PKG_RELEASE:= 3
PKG_MD5SUM:= 0e5156a831d4302d2032998bcfd5c36f
PKG_DESCR:= A music player daemon
PKG_SECTION:= multimedia
diff --git a/package/mpd/patches/patch-src_db_SimpleDatabasePlugin_cxx b/package/mpd/patches/patch-src_db_SimpleDatabasePlugin_cxx
deleted file mode 100644
index 0f28de720..000000000
--- a/package/mpd/patches/patch-src_db_SimpleDatabasePlugin_cxx
+++ /dev/null
@@ -1,91 +0,0 @@
---- mpd-0.18.5.orig/src/db/SimpleDatabasePlugin.cxx 2013-11-22 00:33:30.000000000 +0100
-+++ mpd-0.18.5/src/db/SimpleDatabasePlugin.cxx 2013-11-30 19:17:55.000000000 +0100
-@@ -35,6 +35,9 @@
-
- #include <sys/types.h>
- #include <errno.h>
-+#include <sys/mount.h>
-+#include <mntent.h>
-+#include <string.h>
-
- static constexpr Domain simple_db_domain("simple_db");
-
-@@ -95,8 +98,8 @@ SimpleDatabase::Check(Error &error) cons
- return false;
- }
-
-- /* Check if we can write to the directory */
-- if (!CheckAccess(dirPath, X_OK | W_OK)) {
-+ /* Check if we can change into the directory */
-+ if (!CheckAccess(dirPath, X_OK)) {
- const int e = errno;
- const std::string dirPath_utf8 = dirPath.ToUTF8();
- error.FormatErrno(e, "Can't create db file in \"%s\"",
-@@ -122,9 +125,9 @@ SimpleDatabase::Check(Error &error) cons
- return false;
- }
-
-- /* And check that we can write to it */
-- if (!CheckAccess(path, R_OK | W_OK)) {
-- error.FormatErrno("Can't open db file \"%s\" for reading/writing",
-+ /* And check that we can read it */
-+ if (!CheckAccess(path, R_OK)) {
-+ error.FormatErrno("Can't open db file \"%s\" for reading",
- path_utf8.c_str());
- return false;
- }
-@@ -281,6 +284,10 @@ SimpleDatabase::GetStats(const DatabaseS
- bool
- SimpleDatabase::Save(Error &error)
- {
-+ struct mntent *mnt;
-+ int remount;
-+ FILE *f;
-+
- db_lock();
-
- LogDebug(simple_db_domain, "removing empty directories from DB");
-@@ -293,6 +300,26 @@ SimpleDatabase::Save(Error &error)
-
- LogDebug(simple_db_domain, "writing DB");
-
-+ remount = 0;
-+ /* check if /data is mounted read-only */
-+ if ((f = setmntent("/proc/mounts", "r")) == NULL)
-+ error.Format(simple_db_domain, "Checking /proc/mounts failed");
-+
-+ while ((mnt = getmntent(f)) != NULL) {
-+ if (strcmp(mnt->mnt_dir, "/data") == 0 &&
-+ hasmntopt(mnt, MNTOPT_RO) != NULL) {
-+ remount = 1;
-+ }
-+ }
-+ endmntent(f);
-+
-+ if (remount) {
-+ if (mount("","/data",0,MS_REMOUNT,0)<0) {
-+ error.Format(simple_db_domain, "Remounting /data rw failed");
-+ }
-+ LogDebug(simple_db_domain, "Mounted /data successfully in read-write mode");
-+ }
-+
- FILE *fp = FOpen(path, FOpenMode::WriteText);
- if (!fp) {
- error.FormatErrno("unable to write to db file \"%s\"",
-@@ -310,6 +337,16 @@ SimpleDatabase::Save(Error &error)
-
- fclose(fp);
-
-+ if (remount) {
-+ sync();
-+ if (mount("","/data",0,MS_REMOUNT|MS_RDONLY,0)<0) {
-+ error.Format(simple_db_domain, "Remounting /data ro failed");
-+ }
-+ LogDebug(simple_db_domain, "Mounted /data successfully in read-only mode");
-+ }
-+
-+ LogDebug(simple_db_domain, "Successfully written database");
-+
- struct stat st;
- if (StatFile(path, st))
- mtime = st.st_mtime;
diff --git a/package/mpd/patches/patch-src_thread_Id_hxx b/package/mpd/patches/patch-src_thread_Id_hxx
index dabee4007..21dd19846 100644
--- a/package/mpd/patches/patch-src_thread_Id_hxx
+++ b/package/mpd/patches/patch-src_thread_Id_hxx
@@ -1,5 +1,5 @@
---- mpd-0.18.5.orig/src/thread/Id.hxx 2013-11-18 23:50:46.000000000 +0100
-+++ mpd-0.18.5/src/thread/Id.hxx 2013-11-29 20:50:36.000000000 +0100
+--- mpd-0.18.9.orig/src/thread/Id.hxx 2013-12-11 20:51:53.000000000 +0100
++++ mpd-0.18.9/src/thread/Id.hxx 2014-03-26 09:04:04.000000000 +0100
@@ -84,7 +84,7 @@ public:
#ifdef WIN32
return id == other.id;
diff --git a/package/mpg123/Makefile b/package/mpg123/Makefile
index 350a7a097..0fdbe17b4 100644
--- a/package/mpg123/Makefile
+++ b/package/mpg123/Makefile
@@ -4,9 +4,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:= mpg123
-PKG_VERSION:= 1.13.3
+PKG_VERSION:= 1.19.0
PKG_RELEASE:= 1
-PKG_MD5SUM:= b1f990ce76dcf2fdf9d53ac39fc6bc7e
+PKG_MD5SUM:= 87731f1437cfd8c50537a606d81130e4
PKG_DESCR:= mp3 console player
PKG_SECTION:= multimedia
PKG_DEPENDS:= libpthread alsa-lib
diff --git a/package/mplayer/Makefile b/package/mplayer/Makefile
index a6851f3fa..0a98de806 100644
--- a/package/mplayer/Makefile
+++ b/package/mplayer/Makefile
@@ -5,7 +5,7 @@ include ${TOPDIR}/rules.mk
PKG_NAME:= mplayer
PKG_VERSION:= 1.1.1
-PKG_RELEASE:= 1
+PKG_RELEASE:= 2
PKG_MD5SUM:= 39dd55f30eb5403f219a606e79a6648a
PKG_DESCR:= popular video player
PKG_SECTION:= multimedia
@@ -34,9 +34,8 @@ include ${TOPDIR}/mk/package.mk
$(eval $(call PKG_template,MPLAYER,mplayer,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+TARGET_CC:= ${TARGET_COMPILER_PREFIX}gcc
XAKE_FLAGS+= GCC_HONOUR_COPTS=s
-# gcc 4.5 produces internal compiler error with -Os
-#TARGET_CFLAGS:=$(subst Os,O2,$(TARGET_CFLAGS))
TARGET_CFLAGS+= -D_POSIX_SOURCE -D_GNU_SOURCE
CONFIG_STYLE:= minimal
diff --git a/package/mrd6/Makefile b/package/mrd6/Makefile
index 46f7595c5..235fb0809 100644
--- a/package/mrd6/Makefile
+++ b/package/mrd6/Makefile
@@ -26,7 +26,7 @@ ifeq (${ADK_COMPILE_MRD6_WITH_UCLIBCXX},y)
LIBRARIES:=-nodefaultlibs -luClibc++
endif
-ifeq ($(ADK_TOOLCHAIN_GCC_USE_SSP),y)
+ifeq ($(ADK_TOOLCHAIN_USE_SSP),y)
LIBRARIES+=-lssp -lssp_nonshared
endif
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/mutt/Makefile b/package/mutt/Makefile
index 0454d4627..05bb5096e 100644
--- a/package/mutt/Makefile
+++ b/package/mutt/Makefile
@@ -4,15 +4,16 @@
include ${TOPDIR}/rules.mk
PKG_NAME:= mutt
-PKG_VERSION:= 1.5.20
-PKG_RELEASE:= 2
-PKG_MD5SUM:= 027cdd9959203de0c3c64149a7ee351c
-PKG_DESCR:= Mail text client
+PKG_VERSION:= 1.5.23
+PKG_RELEASE:= 1
+PKG_MD5SUM:= 11f5b6a3eeba1afa1257fe93c9f26bff
+PKG_DESCR:= mail text client
PKG_SECTION:= mail
PKG_DEPENDS:= libncurses libopenssl
PKG_BUILDDEP:= ncurses openssl
PKG_URL:= http://www.mutt.org/
-PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=mutt/}
+PKG_SITES:= ftp://ftp.mutt.org/mutt/devel/ \
+ http://ftp.hi.is/pub/mutt/
include ${TOPDIR}/mk/package.mk
diff --git a/package/mutt/patches/patch-Makefile_in b/package/mutt/patches/patch-Makefile_in
index 3a6601abe..c4bcb93db 100644
--- a/package/mutt/patches/patch-Makefile_in
+++ b/package/mutt/patches/patch-Makefile_in
@@ -1,20 +1,20 @@
---- mutt-1.5.20.orig/Makefile.in 2009-06-09 08:50:44.000000000 +0200
-+++ mutt-1.5.20/Makefile.in 2010-05-30 13:43:47.001613117 +0200
-@@ -155,7 +155,7 @@ AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGE
- distdir dist dist-all distcheck
+--- mutt-1.5.23.orig/Makefile.in 2014-03-12 17:26:44.000000000 +0100
++++ mutt-1.5.23/Makefile.in 2014-03-27 11:06:17.000000000 +0100
+@@ -259,7 +259,7 @@ am__define_uniq_tagged_files = \
ETAGS = etags
CTAGS = ctags
+ CSCOPE = cscope
-DIST_SUBDIRS = m4 po intl doc contrib imap
+DIST_SUBDIRS = m4 po intl contrib imap
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
-@@ -340,7 +340,7 @@ top_srcdir = @top_srcdir@
+@@ -451,7 +451,7 @@ top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = 1.6 foreign
@BUILD_IMAP_TRUE@IMAP_SUBDIR = imap
@BUILD_IMAP_TRUE@IMAP_INCLUDES = -I$(top_srcdir)/imap
-SUBDIRS = m4 po intl doc contrib $(IMAP_SUBDIR)
+SUBDIRS = m4 po intl contrib $(IMAP_SUBDIR)
bin_SCRIPTS = muttbug flea @SMIMEAUX_TARGET@
- BUILT_SOURCES = keymap_defs.h patchlist.c reldate.h hcversion.h
- mutt_SOURCES = \
+ @BUILD_HCACHE_TRUE@HCVERSION = hcversion.h
+ BUILT_SOURCES = keymap_defs.h patchlist.c reldate.h conststrings.c $(HCVERSION)
diff --git a/package/mutt/patches/patch-mutt_ssl_c b/package/mutt/patches/patch-mutt_ssl_c
deleted file mode 100644
index 160dc668c..000000000
--- a/package/mutt/patches/patch-mutt_ssl_c
+++ /dev/null
@@ -1,20 +0,0 @@
---- mutt-1.5.20.orig/mutt_ssl.c 2009-06-10 07:08:29.000000000 +0200
-+++ mutt-1.5.20/mutt_ssl.c 2010-06-02 19:53:33.141613592 +0200
-@@ -652,7 +652,7 @@ static int check_host (X509 *x509cert, c
- char *buf = NULL;
- int bufsize;
- /* needed to get the DNS subjectAltNames: */
-- STACK *subj_alt_names;
-+ STACK_OF(GENERAL_NAME) *subj_alt_names;
- int subj_alt_names_count;
- GENERAL_NAME *subj_alt_name;
- /* did we find a name matching hostname? */
-@@ -735,7 +735,7 @@ static int ssl_cache_trusted_cert (X509
- {
- dprint (1, (debugfile, "trusted: %s\n", c->name));
- if (!SslSessionCerts)
-- SslSessionCerts = sk_new_null();
-+ SslSessionCerts = sk_X509_new_null();
- return (sk_X509_push (SslSessionCerts, X509_dup(c)));
- }
-
diff --git a/package/mysql/Makefile b/package/mysql/Makefile
index 365dea844..4c8b0e919 100644
--- a/package/mysql/Makefile
+++ b/package/mysql/Makefile
@@ -4,91 +4,75 @@
include ${TOPDIR}/rules.mk
PKG_NAME:= mysql
-PKG_VERSION:= 5.1.61
-PKG_RELEASE:= 2
-PKG_MD5SUM:= 4efd10c69c4c99dbdb8fae3834a6d7b8
+PKG_VERSION:= 5.6.17
+PKG_RELEASE:= 1
+PKG_MD5SUM:= 82114fa7c13fa3ca897b34666577d9f4
PKG_DESCR:= MySQL client library
PKG_SECTION:= db
PKG_DEPENDS:= libncurses zlib
-PKG_BUILDDEP:= ncurses zlib readline
+PKG_BUILDDEP:= cmake-host mysql-host ncurses zlib readline
+HOST_BUILDDEP:= cmake-host
PKG_URL:= http://www.mysql.com/
-PKG_SITES= ${MASTER_SITE_MYSQL:=Downloads/MySQL-5.1/}
+PKG_SITES= ${MASTER_SITE_MYSQL:=Downloads/MySQL-5.6/}
PKG_LIBNAME:= libmysqlclient
PKG_OPTS:= dev
-PKG_HOST_DEPENDS:= !cygwin
-
+include ${TOPDIR}/mk/host.mk
include ${TOPDIR}/mk/package.mk
+$(eval $(call HOST_template,MYSQL,mysql,${PKG_VERSION}-${PKG_RELEASE}))
$(eval $(call PKG_template,LIBMYSQLCLIENT,libmysqlclient,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
-BUILD_STYLE:= manual
-INSTALL_STYLE:= manual
+HOST_STYLE:= manual
+CONFIG_STYLE:= manual
+
+host-configure:
+ cd ${WRKBUILD} && PATH='${HOST_PATH}' \
+ cmake .
+
+host-build:
+ cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
+ ${HOST_MAKE_FLAGS} ${HOST_ALL_TARGET} $(MAKE_TRACE)
-CONFIGURE_ENV+= OPTIMIZE_CFLAGS="${TARGET_CFLAGS}" \
- OPTIMIZE_CXXFLAGS="${TARGET_CXXFLAGS}" \
- ac_cv_lib_nsl_gethostbyname_r=no \
- ac_cv_lib_nsl_yp_get_default_domain=no \
- ac_cv_sys_restartable_syscalls=yes \
- mysql_cv_sys_os=Linux \
- mysql_cv_compress=yes \
- ac_cv_sys_restartable_syscalls=no \
- ac_cv_conv_longlong_to_float=yes \
- mysql_cv_gcc_atomic_builtins=yes \
- mysql_cv_gethostname_style=glibc2
-CONFIGURE_ARGS+= --disable-assembler \
- --with-pthread \
- --with-atomic-ops=rwlocks \
- --with-unix-socket-path=/tmp/.mysql.sock \
- --with-named-thread-libs=-lpthread \
- --without-libwrap \
- --without-pstack \
- --with-low-memory \
- --without-server \
- --without-embedded-server \
- --without-query-cache \
- --without-ssl \
- --without-docs \
- --without-readline \
- --with-machine-type=${CPU_ARCH}
-BUILD_LFLAGS= CC="${CC_FOR_BUILD}" \
- CXX='${CXX_FOR_BUILD}' \
- CFLAGS='${CFLAGS_FOR_BUILD} -DHOSTCOMPILE=1' \
- CXXFLAGS='${CXXFLAGS_FOR_BUILD}' \
- LDFLAGS='${LDFLAGS_FOR_BUILD}' \
- CPPFLAGS='${CPPFLAGS_FOR_BUILD}' \
- CXXLINK='${CXX_FOR_BUILD} ${CFLAGS_FOR_BUILD} ${LDFLAGS_FOR_BUILD} -o $$@' \
- LINK='${CC_FOR_BUILD} ${CFLAGS_FOR_BUILD} ${LDFLAGS_FOR_BUILD} -o $$@'
-ifneq (${OStype},Linux)
-BUILD_FLAGS+= LIBS='-lm -lz'
-endif
+mysql-hostinstall:
+ $(INSTALL_BIN) ${WRKBUILD}/extra/comp_err \
+ $(STAGING_HOST_DIR)/usr/bin
+ $(INSTALL_BIN) ${WRKBUILD}/scripts/comp_sql \
+ $(STAGING_HOST_DIR)/usr/bin
+ $(INSTALL_BIN) ${WRKBUILD}/sql/gen_lex_hash \
+ $(STAGING_HOST_DIR)/usr/bin
+ $(INSTALL_BIN) ${WRKBUILD}/storage/perfschema/gen_pfs_lex_token \
+ $(STAGING_HOST_DIR)/usr/bin
-do-build:
- ${MAKE} -C "${WRKBUILD}" \
- SUBDIRS="include" \
- DESTDIR="${WRKINST}" \
- all install
- ${MAKE} -C "${WRKBUILD}/libmysql" \
- LINK="${CC_FOR_BUILD} -o conf_to_src -lc" \
- ${BUILD_FLAGS} \
- conf_to_src
- ${MAKE} -C "${WRKBUILD}" \
- CFLAGS="${TARGET_CFLAGS}" \
- SUBDIRS="libmysql" \
- DESTDIR="${WRKINST}" \
- all install
- ${MAKE} -C "${WRKBUILD}" \
- CFLAGS="${TARGET_CFLAGS}" \
- SUBDIRS="scripts" \
- DESTDIR="${WRKINST}" \
- bin_SCRIPTS="mysql_config" \
- all install
+do-configure:
+ sed -e "s#@@TARGET_CC@@#$(TARGET_CC)#" \
+ -e "s#@@TARGET_CXX@@#$(TARGET_CXX)#" \
+ -e "s#@@TARGET_CFLAGS@@#$(TARGET_CFLAGS)#" \
+ -e "s#@@TARGET_CXXFLAGS@@#$(TARGET_CXXFLAGS)#" \
+ -e "s#@@STAGING_TARGET_DIR@@#$(STAGING_TARGET_DIR)#" \
+ -e "s#@@STAGING_HOST_DIR@@#$(STAGING_HOST_DIR)#" \
+ $(SCRIPT_DIR)/toolchain.cmake.in > $(SCRIPT_DIR)/toolchain.cmake
+ (cd ${WRKBUILD} && PATH='${HOST_PATH}' \
+ cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr \
+ -DCMAKE_TOOLCHAIN_FILE="$(SCRIPT_DIR)/toolchain.cmake" \
+ -DWITH_EDITLINE=bundled \
+ -DCURSES_LIBRARY="$(STAGING_TARGET_DIR)/usr/lib" \
+ -DCURSES_INCLUDE_PATH="$(STAGING_TARGET_DIR)/usr/lib" \
+ -DSTACK_DIRECTION=1 \
+ .)
+ $(CP) $(STAGING_HOST_DIR)/usr/bin/comp_err \
+ ${WRKBUILD}/extra/
+ $(CP) $(STAGING_HOST_DIR)/usr/bin/comp_sql \
+ ${WRKBUILD}/scripts/
+ $(CP) $(STAGING_HOST_DIR)/usr/bin/gen_lex_hash \
+ ${WRKBUILD}/sql/
+ $(CP) $(STAGING_HOST_DIR)/usr/bin/gen_pfs_lex_token \
+ ${WRKBUILD}/storage/perfschema/
libmysqlclient-install:
${INSTALL_DIR} ${IDIR_LIBMYSQLCLIENT}/usr/lib
- ${CP} ${WRKINST}/usr/lib/mysql/libmysqlclient.so* \
+ ${CP} ${WRKINST}/usr/lib/libmysqlclient.so* \
${IDIR_LIBMYSQLCLIENT}/usr/lib
- $(SED) "s,\(^pkgincludedir='\)\(.*\),\1${STAGING_TARGET_DIR}\2," \
- ${WRKINST}/usr/bin/mysql_config
+include ${TOPDIR}/mk/host-bottom.mk
include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/mysql/patches/patch-cmake_os_Linux_cmake b/package/mysql/patches/patch-cmake_os_Linux_cmake
new file mode 100644
index 000000000..be27d5517
--- /dev/null
+++ b/package/mysql/patches/patch-cmake_os_Linux_cmake
@@ -0,0 +1,17 @@
+--- mysql-5.6.17.orig/cmake/os/Linux.cmake 2014-03-14 20:07:26.000000000 +0100
++++ mysql-5.6.17/cmake/os/Linux.cmake 2014-04-04 10:11:45.000000000 +0200
+@@ -23,14 +23,6 @@ SET(TARGET_OS_LINUX 1)
+ SET(HAVE_NPTL 1)
+ SET(_GNU_SOURCE 1)
+
+-# Fix CMake (< 2.8) flags. -rdynamic exports too many symbols.
+-FOREACH(LANG C CXX)
+- STRING(REPLACE "-rdynamic" ""
+- CMAKE_SHARED_LIBRARY_LINK_${LANG}_FLAGS
+- ${CMAKE_SHARED_LIBRARY_LINK_${LANG}_FLAGS}
+- )
+-ENDFOREACH()
+-
+ # Ensure we have clean build for shared libraries
+ # without unresolved symbols
+ # Not supported with AddressSanitizer
diff --git a/package/mysql/patches/patch-cmd-line-utils_libedit_chartype_h b/package/mysql/patches/patch-cmd-line-utils_libedit_chartype_h
new file mode 100644
index 000000000..73ece9904
--- /dev/null
+++ b/package/mysql/patches/patch-cmd-line-utils_libedit_chartype_h
@@ -0,0 +1,22 @@
+--- mysql-5.6.17.orig/cmd-line-utils/libedit/chartype.h 2014-03-14 20:07:26.000000000 +0100
++++ mysql-5.6.17/cmd-line-utils/libedit/chartype.h 2014-04-05 06:38:33.000000000 +0200
+@@ -45,19 +45,6 @@
+ * seems to actually advertise this properly, despite Unicode 3.1 having
+ * been around since 2001... */
+
+-/* XXXMYSQL : Added FreeBSD & AIX to bypass this check.
+- TODO : Verify if FreeBSD & AIX stores ISO 10646 in wchar_t. */
+-#if !defined(__NetBSD__) && !defined(__sun) \
+- && !(defined(__APPLE__) && defined(__MACH__)) \
+- && !defined(__FreeBSD__) && !defined(_AIX)
+-#ifndef __STDC_ISO_10646__
+-/* In many places it is assumed that the first 127 code points are ASCII
+- * compatible, so ensure wchar_t indeed does ISO 10646 and not some other
+- * funky encoding that could break us in weird and wonderful ways. */
+- #error wchar_t must store ISO 10646 characters
+-#endif
+-#endif
+-
+ /* Oh for a <uchar.h> with char32_t and __STDC_UTF_32__ in it...
+ * ref: ISO/IEC DTR 19769
+ */
diff --git a/package/mysql/patches/patch-configure b/package/mysql/patches/patch-configure
deleted file mode 100644
index 853c31f7f..000000000
--- a/package/mysql/patches/patch-configure
+++ /dev/null
@@ -1,365 +0,0 @@
---- mysql-5.1.48.orig/configure 2010-06-03 17:54:47.000000000 +0200
-+++ mysql-5.1.48/configure 2011-01-15 12:58:47.000000000 +0100
-@@ -19764,15 +19764,6 @@ fi
-
-
-
--# Enable the abi_check rule only if gcc is available
--
--if test "$GCC" != "yes" || expr "$CC" : ".*icc.*"
--then
-- ABI_CHECK=""
--else
-- ABI_CHECK="abi_check"
--fi
--
-
-
- # Look for PS usage. We use double dollar-signs in FIND_PROC because this
-@@ -19825,45 +19816,7 @@ fi
- $as_echo_n "checking \"how to check if pid exists\"... " >&6; }
- PS=$ac_cv_path_PS
- # Linux style
--if $PS wwwp $$ 2> /dev/null | grep -- "$0" > /dev/null
--then
-- FIND_PROC="$PS wwwp \$\$PID | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" > /dev/null"
--# Solaris
--elif $PS -fp $$ 2> /dev/null | grep -- $0 > /dev/null
--then
-- FIND_PROC="$PS -p \$\$PID | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" > /dev/null"
--# BSD style
--elif $PS -uaxww 2> /dev/null | grep -- $0 > /dev/null
--then
-- FIND_PROC="$PS -uaxww | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" | grep \" \$\$PID \" > /dev/null"
--# SysV style
--elif $PS -ef 2> /dev/null | grep -- $0 > /dev/null
--then
-- FIND_PROC="$PS -ef | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" | grep \" \$\$PID \" > /dev/null"
--# Do anybody use this?
--elif $PS $$ 2> /dev/null | grep -- $0 > /dev/null
--then
-- FIND_PROC="$PS \$\$PID | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" > /dev/null"
--else
-- case $SYSTEM_TYPE in
-- *freebsd*|*dragonfly*)
-- FIND_PROC="$PS p \$\$PID | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" > /dev/null"
-- ;;
-- *darwin*)
-- FIND_PROC="$PS -uaxww | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" | grep \" \$\$PID \" > /dev/null"
-- ;;
-- *cygwin*)
-- FIND_PROC="$PS -e | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" | grep \" \$\$PID \" > /dev/null"
-- ;;
-- *netware*)
-- FIND_PROC=
-- ;;
-- *)
-- { { $as_echo "$as_me:$LINENO: error: Could not find the right ps and/or grep switches. Which OS is this? See the Installation chapter in the Reference Manual." >&5
--$as_echo "$as_me: error: Could not find the right ps and/or grep switches. Which OS is this? See the Installation chapter in the Reference Manual." >&2;}
-- { (exit 1); exit 1; }; }
-- esac
--fi
-+FIND_PROC="$PS wwwp \$\$PID | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" > /dev/null"
-
- { $as_echo "$as_me:$LINENO: result: \"$FIND_PROC\"" >&5
- $as_echo "\"$FIND_PROC\"" >&6; }
-@@ -48273,197 +48226,14 @@ $as_echo "$as_me: error: unknown endiann
- esac
-
-
-- { $as_echo "$as_me:$LINENO: checking whether GCC atomic builtins are available" >&5
--$as_echo_n "checking whether GCC atomic builtins are available... " >&6; }
-- # either define HAVE_IB_GCC_ATOMIC_BUILTINS or not
-- if test "$cross_compiling" = yes; then
-- { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
--$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
--{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
--See \`config.log' for more details." >&5
--$as_echo "$as_me: error: cannot run test program while cross compiling
--See \`config.log' for more details." >&2;}
-- { (exit 1); exit 1; }; }; }
--else
-- cat >conftest.$ac_ext <<_ACEOF
--/* confdefs.h. */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h. */
--
-- int main()
-- {
-- long x;
-- long y;
-- long res;
-- char c;
--
-- x = 10;
-- y = 123;
-- res = __sync_bool_compare_and_swap(&x, x, y);
-- if (!res || x != y) {
-- return(1);
-- }
--
-- x = 10;
-- y = 123;
-- res = __sync_bool_compare_and_swap(&x, x + 1, y);
-- if (res || x != 10) {
-- return(1);
-- }
--
-- x = 10;
-- y = 123;
-- res = __sync_add_and_fetch(&x, y);
-- if (res != 123 + 10 || x != 123 + 10) {
-- return(1);
-- }
--
-- c = 10;
-- res = __sync_lock_test_and_set(&c, 123);
-- if (res != 10 || c != 123) {
-- return(1);
-- }
--
-- return(0);
-- }
--
--_ACEOF
--rm -f conftest$ac_exeext
--if { (ac_try="$ac_link"
--case "(($ac_try" in
-- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-- *) ac_try_echo=$ac_try;;
--esac
--eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
--$as_echo "$ac_try_echo") >&5
-- (eval "$ac_link") 2>&5
-- ac_status=$?
-- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-- { (case "(($ac_try" in
-- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-- *) ac_try_echo=$ac_try;;
--esac
--eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
--$as_echo "$ac_try_echo") >&5
-- (eval "$ac_try") 2>&5
-- ac_status=$?
-- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-- (exit $ac_status); }; }; then
--
--
- cat >>confdefs.h <<\_ACEOF
- #define HAVE_IB_GCC_ATOMIC_BUILTINS 1
- _ACEOF
-
-- { $as_echo "$as_me:$LINENO: result: yes" >&5
--$as_echo "yes" >&6; }
--
--else
-- $as_echo "$as_me: program exited with status $ac_status" >&5
--$as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--( exit $ac_status )
--
-- { $as_echo "$as_me:$LINENO: result: no" >&5
--$as_echo "no" >&6; }
--
--
--fi
--rm -rf conftest.dSYM
--rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
--fi
--
--
--
-- { $as_echo "$as_me:$LINENO: checking whether pthread_t can be used by GCC atomic builtins" >&5
--$as_echo_n "checking whether pthread_t can be used by GCC atomic builtins... " >&6; }
-- # either define HAVE_IB_ATOMIC_PTHREAD_T_GCC or not
-- if test "$cross_compiling" = yes; then
-- { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
--$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
--{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
--See \`config.log' for more details." >&5
--$as_echo "$as_me: error: cannot run test program while cross compiling
--See \`config.log' for more details." >&2;}
-- { (exit 1); exit 1; }; }; }
--else
-- cat >conftest.$ac_ext <<_ACEOF
--/* confdefs.h. */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h. */
--
-- #include <pthread.h>
-- #include <string.h>
--
-- int main(int argc, char** argv) {
-- pthread_t x1;
-- pthread_t x2;
-- pthread_t x3;
--
-- memset(&x1, 0x0, sizeof(x1));
-- memset(&x2, 0x0, sizeof(x2));
-- memset(&x3, 0x0, sizeof(x3));
--
-- __sync_bool_compare_and_swap(&x1, x2, x3);
--
-- return(0);
-- }
--
--_ACEOF
--rm -f conftest$ac_exeext
--if { (ac_try="$ac_link"
--case "(($ac_try" in
-- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-- *) ac_try_echo=$ac_try;;
--esac
--eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
--$as_echo "$ac_try_echo") >&5
-- (eval "$ac_link") 2>&5
-- ac_status=$?
-- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-- { (case "(($ac_try" in
-- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-- *) ac_try_echo=$ac_try;;
--esac
--eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
--$as_echo "$ac_try_echo") >&5
-- (eval "$ac_try") 2>&5
-- ac_status=$?
-- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-- (exit $ac_status); }; }; then
--
--
- cat >>confdefs.h <<\_ACEOF
- #define HAVE_IB_ATOMIC_PTHREAD_T_GCC 1
- _ACEOF
-
-- { $as_echo "$as_me:$LINENO: result: yes" >&5
--$as_echo "yes" >&6; }
--
--else
-- $as_echo "$as_me: program exited with status $ac_status" >&5
--$as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--( exit $ac_status )
--
-- { $as_echo "$as_me:$LINENO: result: no" >&5
--$as_echo "no" >&6; }
--
--
--fi
--rm -rf conftest.dSYM
--rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
--fi
--
--
-
- { $as_echo "$as_me:$LINENO: checking whether Solaris libc atomic functions are available" >&5
- $as_echo_n "checking whether Solaris libc atomic functions are available... " >&6; }
-@@ -48581,101 +48351,6 @@ fi
- done
-
-
-- { $as_echo "$as_me:$LINENO: checking whether pthread_t can be used by Solaris libc atomic functions" >&5
--$as_echo_n "checking whether pthread_t can be used by Solaris libc atomic functions... " >&6; }
-- # either define HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS or not
-- if test "$cross_compiling" = yes; then
-- { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
--$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
--{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
--See \`config.log' for more details." >&5
--$as_echo "$as_me: error: cannot run test program while cross compiling
--See \`config.log' for more details." >&2;}
-- { (exit 1); exit 1; }; }; }
--else
-- cat >conftest.$ac_ext <<_ACEOF
--/* confdefs.h. */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h. */
--
-- #include <pthread.h>
-- #include <string.h>
--
-- int main(int argc, char** argv) {
-- pthread_t x1;
-- pthread_t x2;
-- pthread_t x3;
--
-- memset(&x1, 0x0, sizeof(x1));
-- memset(&x2, 0x0, sizeof(x2));
-- memset(&x3, 0x0, sizeof(x3));
--
-- if (sizeof(pthread_t) == 4) {
--
-- atomic_cas_32(&x1, x2, x3);
--
-- } else if (sizeof(pthread_t) == 8) {
--
-- atomic_cas_64(&x1, x2, x3);
--
-- } else {
--
-- return(1);
-- }
--
-- return(0);
-- }
--
--_ACEOF
--rm -f conftest$ac_exeext
--if { (ac_try="$ac_link"
--case "(($ac_try" in
-- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-- *) ac_try_echo=$ac_try;;
--esac
--eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
--$as_echo "$ac_try_echo") >&5
-- (eval "$ac_link") 2>&5
-- ac_status=$?
-- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-- { (case "(($ac_try" in
-- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-- *) ac_try_echo=$ac_try;;
--esac
--eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
--$as_echo "$ac_try_echo") >&5
-- (eval "$ac_try") 2>&5
-- ac_status=$?
-- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-- (exit $ac_status); }; }; then
--
--
--cat >>confdefs.h <<\_ACEOF
--#define HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS 1
--_ACEOF
--
-- { $as_echo "$as_me:$LINENO: result: yes" >&5
--$as_echo "yes" >&6; }
--
--else
-- $as_echo "$as_me: program exited with status $ac_status" >&5
--$as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--( exit $ac_status )
--
-- { $as_echo "$as_me:$LINENO: result: no" >&5
--$as_echo "no" >&6; }
--
--
--fi
--rm -rf conftest.dSYM
--rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
--fi
--
-
-
- # this is needed to know which one of atomic_cas_32() or atomic_cas_64()
diff --git a/package/mysql/patches/patch-include_config_h_in b/package/mysql/patches/patch-include_config_h_in
deleted file mode 100644
index d9b28c419..000000000
--- a/package/mysql/patches/patch-include_config_h_in
+++ /dev/null
@@ -1,21 +0,0 @@
---- mysql-5.1.48.orig/include/config.h.in 2010-06-03 17:54:04.000000000 +0200
-+++ mysql-5.1.48/include/config.h.in 2011-01-21 00:08:19.737408555 +0100
-@@ -856,7 +856,7 @@
- /* Define to 1 if you have the `strtoull' function. */
- #undef HAVE_STRTOULL
-
--/* Define to 1 if `st_rdev' is member of `struct stat'. */
-+/* Define to 1 if `struct stat' is a member of `st_rdev'. */
- #undef HAVE_STRUCT_STAT_ST_RDEV
-
- /* Define to 1 if your `struct stat' has `st_rdev'. Deprecated, use
-@@ -1151,6 +1151,9 @@
- /* Define to the one symbol short name of this package. */
- #undef PACKAGE_TARNAME
-
-+/* Define to the home page for this package. */
-+#undef PACKAGE_URL
-+
- /* Define to the version of this package. */
- #undef PACKAGE_VERSION
-
diff --git a/package/mysql/patches/patch-include_my_global_h b/package/mysql/patches/patch-include_my_global_h
deleted file mode 100644
index 847554aae..000000000
--- a/package/mysql/patches/patch-include_my_global_h
+++ /dev/null
@@ -1,54 +0,0 @@
---- mysql-5.1.48.orig/include/my_global.h 2010-06-03 17:50:27.000000000 +0200
-+++ mysql-5.1.48/include/my_global.h 2010-07-12 22:51:23.369609493 +0200
-@@ -18,6 +18,8 @@
- #ifndef _global_h
- #define _global_h
-
-+#include <sys/param.h>
-+
- /*
- InnoDB depends on some MySQL internals which other plugins should not
- need. This is because of InnoDB's foreign key support, "safe" binlog
-@@ -428,7 +430,7 @@ C_MODE_END
- #ifdef HAVE_FLOAT_H
- #include <float.h>
- #endif
--#ifdef HAVE_FENV_H
-+#if defined(HAVE_FENV_H) && !defined(BSD)
- #include <fenv.h> /* For fesetround() */
- #endif
-
-@@ -458,15 +460,20 @@ C_MODE_END
- #undef HAVE_ALLOCA
- #undef HAVE_ALLOCA_H
- #endif
--#ifdef HAVE_ALLOCA_H
-+#if defined(HAVE_ALLOCA_H) && !defined(BSD)
- #include <alloca.h>
- #endif
-
- #include <errno.h> /* Recommended by debian */
- /* We need the following to go around a problem with openssl on solaris */
-+#ifdef BSD
-+#include <pwd.h>
-+#include <unistd.h>
-+#else
- #if defined(HAVE_CRYPT_H)
- #include <crypt.h>
- #endif
-+#endif
-
- /*
- A lot of our programs uses asserts, so better to always include it
-@@ -883,9 +890,11 @@ typedef SOCKET_SIZE_TYPE size_socket;
- #endif /* HAVE_FINITE */
- #endif /* isfinite */
-
-+/*
- #ifndef HAVE_ISNAN
- #define isnan(x) ((x) != (x))
- #endif
-+*/
-
- #ifdef HAVE_ISINF
- /* Check if C compiler is affected by GCC bug #39228 */
diff --git a/package/mysql/patches/patch-ltmain_sh b/package/mysql/patches/patch-ltmain_sh
deleted file mode 100644
index c5cb790cf..000000000
--- a/package/mysql/patches/patch-ltmain_sh
+++ /dev/null
@@ -1,11 +0,0 @@
---- mysql-5.1.48.orig/ltmain.sh 2010-06-03 17:54:04.000000000 +0200
-+++ mysql-5.1.48/ltmain.sh 2011-01-15 13:03:34.000000000 +0100
-@@ -4765,7 +4765,7 @@ func_mode_link ()
- # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
- # @file GCC response files
- -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
-- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
-+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
- func_quote_for_eval "$arg"
- arg="$func_quote_for_eval_result"
- func_append compile_command " $arg"
diff --git a/package/mysql/patches/patch-scripts_mysql_config_sh b/package/mysql/patches/patch-scripts_mysql_config_sh
deleted file mode 100644
index 3e1833199..000000000
--- a/package/mysql/patches/patch-scripts_mysql_config_sh
+++ /dev/null
@@ -1,11 +0,0 @@
---- mysql-5.1.48.orig/scripts/mysql_config.sh 2010-06-03 17:50:21.000000000 +0200
-+++ mysql-5.1.48/scripts/mysql_config.sh 2011-01-21 00:32:53.596454498 +0100
-@@ -119,7 +119,7 @@ if [ -r "$pkglibdir/libmygcc.a" ]; then
- embedded_libs="$embedded_libs -lmygcc "
- fi
-
--cflags="-I$pkgincludedir @CFLAGS@ " #note: end space!
-+cflags="-I$pkgincludedir" #note: end space!
- include="-I$pkgincludedir"
-
- # Remove some options that a client doesn't have to care about
diff --git a/package/mysql/patches/patch-sql_sql_builtin_cc b/package/mysql/patches/patch-sql_sql_builtin_cc
deleted file mode 100644
index 785ae0024..000000000
--- a/package/mysql/patches/patch-sql_sql_builtin_cc
+++ /dev/null
@@ -1,15 +0,0 @@
---- mysql-5.1.48.orig/sql/sql_builtin.cc 2010-06-03 17:57:58.000000000 +0200
-+++ mysql-5.1.48/sql/sql_builtin.cc 2010-07-12 22:52:33.577118523 +0200
-@@ -18,10 +18,10 @@
- typedef struct st_mysql_plugin builtin_plugin[];
-
- extern builtin_plugin
-- builtin_binlog_plugin, builtin_partition_plugin, builtin_csv_plugin, builtin_heap_plugin, builtin_myisam_plugin, builtin_myisammrg_plugin, builtin_ndbcluster_plugin;
-+ builtin_binlog_plugin, builtin_csv_plugin, builtin_heap_plugin, builtin_myisam_plugin, builtin_myisammrg_plugin;
-
- struct st_mysql_plugin *mysqld_builtins[]=
- {
-- builtin_binlog_plugin, builtin_partition_plugin, builtin_csv_plugin, builtin_heap_plugin, builtin_myisam_plugin, builtin_myisammrg_plugin, builtin_ndbcluster_plugin,(struct st_mysql_plugin *)0
-+ builtin_binlog_plugin, builtin_csv_plugin, builtin_heap_plugin, builtin_myisam_plugin, builtin_myisammrg_plugin,(struct st_mysql_plugin *)0
- };
-
diff --git a/package/nasm/Makefile b/package/nasm/Makefile
index 39e451a70..656970558 100644
--- a/package/nasm/Makefile
+++ b/package/nasm/Makefile
@@ -4,9 +4,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:= nasm
-PKG_VERSION:= 2.11
+PKG_VERSION:= 2.11.02
PKG_RELEASE:= 1
-PKG_MD5SUM:= a884450ee65201473af4d270bdc132f8
+PKG_MD5SUM:= 7d5408bf18aa1699ad6c17e5017f12c3
PKG_DESCR:= the netwide assembler
PKG_SECTION:= lang
PKG_BUILDDEP:= nasm-host
diff --git a/package/net-tools/Makefile b/package/net-tools/Makefile
index e550059a4..a83c0a6e0 100644
--- a/package/net-tools/Makefile
+++ b/package/net-tools/Makefile
@@ -23,7 +23,7 @@ $(eval $(call PKG_template,ARP,arp,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},
CONFIG_STYLE:= manual
INSTALL_STYLE:= manual
-ifeq ($(ADK_TOOLCHAIN_GCC_USE_SSP),y)
+ifeq ($(ADK_TOOLCHAIN_USE_SSP),y)
TARGET_LDFLAGS+= -lssp
endif
diff --git a/package/nginx/Makefile b/package/nginx/Makefile
index 98ba1bef8..25c413a25 100644
--- a/package/nginx/Makefile
+++ b/package/nginx/Makefile
@@ -4,10 +4,10 @@
include $(TOPDIR)/rules.mk
PKG_NAME:= nginx
-PKG_VERSION:= 1.5.3
+PKG_VERSION:= 1.5.12
PKG_RELEASE:= 1
-PKG_MD5SUM:= 1e735dd6a6ade2b5c20e924b67c3d355
-PKG_DESCR:= powerful http reverse proxy
+PKG_MD5SUM:= c21589daaec0743d6d4cdf41503ffd53
+PKG_DESCR:= powerful http reverse proxy and webserver
PKG_SECTION:= proxy
PKG_BUILDDEP:= openssl pcre zlib
PKG_DEPENDS:= libopenssl libpcre libpthread zlib
diff --git a/package/nmap/Makefile b/package/nmap/Makefile
index 09035c248..cd2e690d7 100644
--- a/package/nmap/Makefile
+++ b/package/nmap/Makefile
@@ -21,7 +21,7 @@ include ${TOPDIR}/mk/package.mk
$(eval $(call PKG_template,NMAP,nmap,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
-ifeq ($(ADK_TOOLCHAIN_GCC_USE_SSP),y)
+ifeq ($(ADK_TOOLCHAIN_USE_SSP),y)
LIBRARIES+=-lssp -lssp_nonshared
endif
diff --git a/package/ntfs-3g/Makefile b/package/ntfs-3g/Makefile
index 5151bfd21..b893cdb53 100644
--- a/package/ntfs-3g/Makefile
+++ b/package/ntfs-3g/Makefile
@@ -4,9 +4,9 @@
include ${TOPDIR}/rules.mk
PKG_NAME:= ntfs-3g
-PKG_VERSION:= 2013.1.13
+PKG_VERSION:= 2014.2.15
PKG_RELEASE:= 1
-PKG_MD5SUM:= 2d6fb47ddf62b51733227126fe9227fe
+PKG_MD5SUM:= f11d563816249d730a00498983485f3a
PKG_DESCR:= ntfs filesystem driver
PKG_SECTION:= fs
PKG_DEPENDS:= kmod-fuse-fs
diff --git a/package/ntfs-3g/patches/patch-libfuse-lite_fusermount_c b/package/ntfs-3g/patches/patch-libfuse-lite_fusermount_c
new file mode 100644
index 000000000..eb11b0bf0
--- /dev/null
+++ b/package/ntfs-3g/patches/patch-libfuse-lite_fusermount_c
@@ -0,0 +1,10 @@
+--- ntfs-3g_ntfsprogs-2014.2.15.orig/libfuse-lite/fusermount.c 2014-02-15 15:07:52.000000000 +0100
++++ ntfs-3g_ntfsprogs-2014.2.15/libfuse-lite/fusermount.c 2014-03-23 09:53:10.000000000 +0100
+@@ -18,6 +18,7 @@
+ #include <getopt.h>
+ #include <errno.h>
+ #include <fcntl.h>
++#include <paths.h>
+ #include <pwd.h>
+
+ #ifdef __SOLARIS__
diff --git a/package/ntfs-3g/patches/patch-libfuse-lite_mount_util_c b/package/ntfs-3g/patches/patch-libfuse-lite_mount_util_c
new file mode 100644
index 000000000..1a3d8e8c5
--- /dev/null
+++ b/package/ntfs-3g/patches/patch-libfuse-lite_mount_util_c
@@ -0,0 +1,10 @@
+--- ntfs-3g_ntfsprogs-2014.2.15.orig/libfuse-lite/mount_util.c 2014-02-15 15:07:52.000000000 +0100
++++ ntfs-3g_ntfsprogs-2014.2.15/libfuse-lite/mount_util.c 2014-03-23 09:54:19.000000000 +0100
+@@ -12,6 +12,7 @@
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <paths.h>
+ #include <dirent.h>
+ #include <errno.h>
+ #include <limits.h>
diff --git a/package/omxplayer/Makefile b/package/omxplayer/Makefile
index 696f8901b..c36174f43 100644
--- a/package/omxplayer/Makefile
+++ b/package/omxplayer/Makefile
@@ -4,10 +4,10 @@
include $(TOPDIR)/rules.mk
PKG_NAME:= omxplayer
-# actually d1a4a0e1030249e40e2e9bb04518f1b786b18488 from 7.01.2014
-PKG_VERSION:= 0.3
-PKG_RELEASE:= 1
-PKG_MD5SUM:= 1882cac6032baa59291068af30df1702
+# actually 1ca2f7adaa7f6a92410d9664e76c395537659dba from 07.04.2014
+PKG_VERSION:= 0.4
+PKG_RELEASE:= 2
+PKG_MD5SUM:= d4efff32305bd16315e6fa4f80ea2a98
PKG_DESCR:= video player for raspberry pi
PKG_SECTION:= multimedia
PKG_DEPENDS:= libffmpeg boost bcm2835-vc libfreetype libpcre
diff --git a/package/omxplayer/patches/patch-Makefile b/package/omxplayer/patches/patch-Makefile
index f7caae300..03a6f5e8b 100644
--- a/package/omxplayer/patches/patch-Makefile
+++ b/package/omxplayer/patches/patch-Makefile
@@ -1,14 +1,20 @@
---- omxplayer-0.2.orig/Makefile 2013-10-11 15:17:41.000000000 +0200
-+++ omxplayer-0.2/Makefile 2013-10-11 15:30:49.000000000 +0200
+--- omxplayer-0.4.orig/Makefile 2014-04-07 13:50:34.000000000 +0200
++++ omxplayer-0.4/Makefile 2014-04-07 16:25:29.144139758 +0200
@@ -2,9 +2,9 @@ include Makefile.include
CFLAGS+=-std=c++0x -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -DTARGET_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CMAKE_CONFIG -D__VIDEOCORE4__ -U_FORTIFY_SOURCE -Wall -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG -DHAVE_LIBAVCODEC_AVCODEC_H -DHAVE_LIBAVUTIL_OPT_H -DHAVE_LIBAVUTIL_MEM_H -DHAVE_LIBAVUTIL_AVUTIL_H -DHAVE_LIBAVFORMAT_AVFORMAT_H -DHAVE_LIBAVFILTER_AVFILTER_H -DHAVE_LIBSWRESAMPLE_SWRESAMPLE_H -DOMX -DOMX_SKIP64BIT -ftree-vectorize -DUSE_EXTERNAL_OMX -DTARGET_RASPBERRY_PI -DUSE_EXTERNAL_LIBBCM_HOST
--LDFLAGS+=-L./ -ldbus-1 -lc -lWFC -lGLESv2 -lEGL -lbcm_host -lopenmaxil -lfreetype -lz -Lffmpeg_compiled/usr/local/lib/
-+LDFLAGS+=-L./ -ldbus-1 -lc -lWFC -lGLESv2 -lEGL -lbcm_host -lopenmaxil -lfreetype -lz -lkhrn_static
+-LDFLAGS+=-L./ -Lffmpeg_compiled/usr/local/lib/ -lc -lWFC -lGLESv2 -lEGL -lbcm_host -lopenmaxil -lfreetype -lz
++LDFLAGS+=-L./ -lc -lWFC -lGLESv2 -lEGL -lbcm_host -lopenmaxil -lfreetype -lz -lkhrn_static
-INCLUDES+=-I./ -Ilinux -Iffmpeg_compiled/usr/local/include/
+INCLUDES+=-I./ -Ilinux
DIST ?= omxplayer-dist
+@@ -71,5 +71,4 @@ dist: omxplayer.bin
+ cp omxplayer omxplayer.bin $(DIST)/usr/bin
+ cp COPYING $(DIST)/usr/share/doc/
+ cp README.md $(DIST)/usr/share/doc/README
+- cp -a ffmpeg_compiled/usr/local/lib/*.so* $(DIST)/usr/lib/omxplayer/
+ cd $(DIST); tar -czf ../$(DIST).tgz *
diff --git a/package/openldap/Makefile b/package/openldap/Makefile
index 1e45c66f8..391b7a832 100644
--- a/package/openldap/Makefile
+++ b/package/openldap/Makefile
@@ -4,9 +4,9 @@
include ${TOPDIR}/rules.mk
PKG_NAME:= openldap
-PKG_VERSION:= 2.4.36
+PKG_VERSION:= 2.4.39
PKG_RELEASE:= 1
-PKG_MD5SUM:= 744701405d396b1fb9de6cb7a453c6e9
+PKG_MD5SUM:= b0d5ee4b252c841dec6b332d679cf943
PKG_DESCR:= OpenLDAP client libraries
PKG_SECTION:= libs
PKG_DEPENDS:= libopenssl libsasl2 libdb libpthread libuuid
diff --git a/package/openssh/Makefile b/package/openssh/Makefile
index 409e63c0a..7d80662e2 100644
--- a/package/openssh/Makefile
+++ b/package/openssh/Makefile
@@ -4,9 +4,9 @@
include ${TOPDIR}/rules.mk
PKG_NAME:= openssh
-PKG_VERSION:= 6.5p1
+PKG_VERSION:= 6.6p1
PKG_RELEASE:= 1
-PKG_MD5SUM:= a084e7272b8cbd25afe0f5dce4802fef
+PKG_MD5SUM:= 3e9800e6bca1fbac0eea4d41baa7f239
PKG_DESCR:= OpenSSH
PKG_SECTION:= net/security
PKG_BUILDDEP:= zlib openssl
@@ -50,7 +50,7 @@ CONFIGURE_ARGS+= --with-kerberos5="${STAGING_TARGET_DIR}/usr"
TARGET_LDFLAGS+= -L$(STAGING_TARGET_DIR)/usr/lib/heimdal -Wl,-rpath -Wl,/usr/lib/heimdal
endif
-ifeq ($(ADK_TOOLCHAIN_GCC_USE_SSP),y)
+ifeq ($(ADK_TOOLCHAIN_USE_SSP),y)
CONFIGURE_ARGS+= --with-stackprotect
else
CONFIGURE_ARGS+= --without-stackprotect
diff --git a/package/openssh/patches/patch-digest_c b/package/openssh/patches/patch-digest-openssl_c
index feead7711..dc8aeb4f6 100644
--- a/package/openssh/patches/patch-digest_c
+++ b/package/openssh/patches/patch-digest-openssl_c
@@ -1,5 +1,5 @@
---- openssh-6.5p1.orig/digest.c 2014-01-20 02:41:53.000000000 +0100
-+++ openssh-6.5p1/digest.c 2014-02-11 17:41:23.000000000 +0100
+--- openssh-6.6p1.orig/digest-openssl.c 2014-02-04 01:25:45.000000000 +0100
++++ openssh-6.6p1/digest-openssl.c 2014-03-24 13:42:01.000000000 +0100
@@ -44,7 +44,9 @@ struct ssh_digest {
/* NB. Indexed directly by algorithm number */
const struct ssh_digest digests[] = {
diff --git a/package/openssh/patches/patch-mac_c b/package/openssh/patches/patch-mac_c
deleted file mode 100644
index 7812de4b2..000000000
--- a/package/openssh/patches/patch-mac_c
+++ /dev/null
@@ -1,24 +0,0 @@
-diff -Nur openssh-6.2p1.orig/mac.c openssh-6.2p1/mac.c
---- openssh-6.5p1.orig/mac.c 2014-01-10 00:37:05.000000000 +0100
-+++ openssh-6.5p1/mac.c 2014-02-11 15:26:16.000000000 +0100
-@@ -70,8 +70,10 @@ static const struct macalg macs[] = {
- #endif
- { "hmac-md5", SSH_EVP, EVP_md5, 0, 0, 0, 0 },
- { "hmac-md5-96", SSH_EVP, EVP_md5, 96, 0, 0, 0 },
-+#ifndef OPENSSL_NO_RIPEMD
- { "hmac-ripemd160", SSH_EVP, EVP_ripemd160, 0, 0, 0, 0 },
- { "hmac-ripemd160@openssh.com", SSH_EVP, EVP_ripemd160, 0, 0, 0, 0 },
-+#endif
- { "umac-64@openssh.com", SSH_UMAC, NULL, 0, 128, 64, 0 },
- { "umac-128@openssh.com", SSH_UMAC128, NULL, 0, 128, 128, 0 },
-
-@@ -84,7 +86,9 @@ static const struct macalg macs[] = {
- #endif
- { "hmac-md5-etm@openssh.com", SSH_EVP, EVP_md5, 0, 0, 0, 1 },
- { "hmac-md5-96-etm@openssh.com", SSH_EVP, EVP_md5, 96, 0, 0, 1 },
-+#ifndef OPENSSL_NO_RIPEMD
- { "hmac-ripemd160-etm@openssh.com", SSH_EVP, EVP_ripemd160, 0, 0, 0, 1 },
-+#endif
- { "umac-64-etm@openssh.com", SSH_UMAC, NULL, 0, 128, 64, 1 },
- { "umac-128-etm@openssh.com", SSH_UMAC128, NULL, 0, 128, 128, 1 },
-
diff --git a/package/openssl/Makefile b/package/openssl/Makefile
index 4bca87621..145733c2a 100644
--- a/package/openssl/Makefile
+++ b/package/openssl/Makefile
@@ -4,10 +4,10 @@
include ${TOPDIR}/rules.mk
PKG_NAME:= openssl
-PKG_VERSION:= 1.0.1f
-PKG_RELEASE:= 2
-PKG_MD5SUM:= f26b09c028a0541cab33da697d522b25
-PKG_DESCR:= OpenSSL (Secure Socket Layer) libraries
+PKG_VERSION:= 1.0.1g
+PKG_RELEASE:= 1
+PKG_MD5SUM:= de62b43dfcd858e66a74bee1c834e959
+PKG_DESCR:= Secure Socket Layer libraries
PKG_SECTION:= libs
PKG_DEPENDS:= zlib
PKG_BUILDDEP:= zlib
diff --git a/package/openswan/Makefile b/package/openswan/Makefile
index efea0b004..a2ed17906 100644
--- a/package/openswan/Makefile
+++ b/package/openswan/Makefile
@@ -20,6 +20,9 @@ PKG_URL:= http://www.openswan.org/
PKG_SITES:= http://www.openswan.org/download/
PKG_NOPARALLEL:= 1
+# GLOB_BRACE usage
+PKG_LIBC_DEPENDS:= uclibc glibc
+
include ${TOPDIR}/mk/package.mk
$(eval $(call PKG_template,OPENSWAN,openswan,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
diff --git a/package/openswan/patches/patch-include_arpa_nameser_h b/package/openswan/patches/patch-include_arpa_nameser_h
new file mode 100644
index 000000000..a59cd15b2
--- /dev/null
+++ b/package/openswan/patches/patch-include_arpa_nameser_h
@@ -0,0 +1,128 @@
+--- openswan-2.6.38.orig/include/arpa/nameser.h 2012-03-23 22:33:43.000000000 +0100
++++ openswan-2.6.38/include/arpa/nameser.h 2014-03-26 19:50:18.000000000 +0100
+@@ -55,7 +55,6 @@
+
+ #include <sys/param.h>
+ #include <sys/types.h>
+-#include <sys/cdefs.h>
+
+ /*
+ * Revision information. This is the release date in YYYYMMDD format.
+@@ -505,62 +504,66 @@ typedef enum __ns_cert_types {
+ #define ns_makecanon __ns_makecanon
+ #define ns_samename __ns_samename
+
+-__BEGIN_DECLS
+-int ns_msg_getflag __P((ns_msg, int));
+-u_int ns_get16 __P((const u_char *));
+-u_long ns_get32 __P((const u_char *));
+-void ns_put16 __P((u_int, u_char *));
+-void ns_put32 __P((u_long, u_char *));
+-int ns_initparse __P((const u_char *, int, ns_msg *));
+-int ns_skiprr __P((const u_char *, const u_char *, ns_sect, int));
+-int ns_parserr __P((ns_msg *, ns_sect, int, ns_rr *));
+-int ns_sprintrr __P((const ns_msg *, const ns_rr *,
+- const char *, const char *, char *, size_t));
+-int ns_sprintrrf __P((const u_char *, size_t, const char *,
++#ifdef __cplusplus
++extern "C" {
++#endif
++int ns_msg_getflag (ns_msg, int);
++u_int ns_get16 (const u_char *);
++u_long ns_get32 (const u_char *);
++void ns_put16 (u_int, u_char *);
++void ns_put32 (u_long, u_char *);
++int ns_initparse (const u_char *, int, ns_msg *);
++int ns_skiprr (const u_char *, const u_char *, ns_sect, int);
++int ns_parserr (ns_msg *, ns_sect, int, ns_rr *);
++int ns_sprintrr (const ns_msg *, const ns_rr *,
++ const char *, const char *, char *, size_t);
++int ns_sprintrrf (const u_char *, size_t, const char *,
+ ns_class, ns_type, u_long, const u_char *,
+ size_t, const char *, const char *,
+- char *, size_t));
+-int ns_format_ttl __P((u_long, char *, size_t));
+-int ns_parse_ttl __P((const char *, u_long *));
+-u_int32_t ns_datetosecs __P((const char *cp, int *errp));
+-int ns_name_ntol __P((const u_char *, u_char *, size_t));
+-int ns_name_ntop __P((const u_char *, char *, size_t));
+-int ns_name_pton __P((const char *, u_char *, size_t));
+-int ns_name_unpack __P((const u_char *, const u_char *,
+- const u_char *, u_char *, size_t));
+-int ns_name_pack __P((const u_char *, u_char *, int,
+- const u_char **, const u_char **));
+-int ns_name_uncompress __P((const u_char *, const u_char *,
+- const u_char *, char *, size_t));
+-int ns_name_compress __P((const char *, u_char *, size_t,
+- const u_char **, const u_char **));
+-int ns_name_skip __P((const u_char **, const u_char *));
+-void ns_name_rollback __P((const u_char *, const u_char **,
+- const u_char **));
+-int ns_sign __P((u_char *, int *, int, int, void *,
+- const u_char *, int, u_char *, int *, time_t));
+-int ns_sign2 __P((u_char *, int *, int, int, void *,
++ char *, size_t);
++int ns_format_ttl (u_long, char *, size_t);
++int ns_parse_ttl (const char *, u_long *);
++u_int32_t ns_datetosecs (const char *cp, int *errp);
++int ns_name_ntol (const u_char *, u_char *, size_t);
++int ns_name_ntop (const u_char *, char *, size_t);
++int ns_name_pton (const char *, u_char *, size_t);
++int ns_name_unpack (const u_char *, const u_char *,
++ const u_char *, u_char *, size_t);
++int ns_name_pack (const u_char *, u_char *, int,
++ const u_char **, const u_char **);
++int ns_name_uncompress (const u_char *, const u_char *,
++ const u_char *, char *, size_t);
++int ns_name_compress (const char *, u_char *, size_t,
++ const u_char **, const u_char **);
++int ns_name_skip (const u_char **, const u_char *);
++void ns_name_rollback (const u_char *, const u_char **,
++ const u_char **);
++int ns_sign (u_char *, int *, int, int, void *,
++ const u_char *, int, u_char *, int *, time_t);
++int ns_sign2 (u_char *, int *, int, int, void *,
+ const u_char *, int, u_char *, int *, time_t,
+- u_char **, u_char **));
+-int ns_sign_tcp __P((u_char *, int *, int, int,
+- ns_tcp_tsig_state *, int));
+-int ns_sign_tcp2 __P((u_char *, int *, int, int,
++ u_char **, u_char **);
++int ns_sign_tcp (u_char *, int *, int, int,
++ ns_tcp_tsig_state *, int);
++int ns_sign_tcp2 (u_char *, int *, int, int,
+ ns_tcp_tsig_state *, int,
+- u_char **, u_char **));
+-int ns_sign_tcp_init __P((void *, const u_char *, int,
+- ns_tcp_tsig_state *));
+-u_char *ns_find_tsig __P((u_char *, u_char *));
+-int ns_verify __P((u_char *, int *, void *,
++ u_char **, u_char **);
++int ns_sign_tcp_init (void *, const u_char *, int,
++ ns_tcp_tsig_state *);
++u_char *ns_find_tsig (u_char *, u_char *);
++int ns_verify (u_char *, int *, void *,
+ const u_char *, int, u_char *, int *,
+- time_t *, int));
+-int ns_verify_tcp __P((u_char *, int *, ns_tcp_tsig_state *, int));
+-int ns_verify_tcp_init __P((void *, const u_char *, int,
+- ns_tcp_tsig_state *));
+-int ns_samedomain __P((const char *, const char *));
+-int ns_subdomain __P((const char *, const char *));
+-int ns_makecanon __P((const char *, char *, size_t));
+-int ns_samename __P((const char *, const char *));
+-__END_DECLS
++ time_t *, int);
++int ns_verify_tcp (u_char *, int *, ns_tcp_tsig_state *, int);
++int ns_verify_tcp_init (void *, const u_char *, int,
++ ns_tcp_tsig_state *);
++int ns_samedomain (const char *, const char *);
++int ns_subdomain (const char *, const char *);
++int ns_makecanon (const char *, char *, size_t);
++int ns_samename (const char *, const char *);
++#ifdef __cplusplus
++}
++#endif
+
+ #ifdef BIND_4_COMPAT
+ #include <arpa/nameser_compat.h>
diff --git a/package/openswan/patches/patch-lib_libipsecconf_cmp_c b/package/openswan/patches/patch-lib_libipsecconf_cmp_c
new file mode 100644
index 000000000..c9e93a241
--- /dev/null
+++ b/package/openswan/patches/patch-lib_libipsecconf_cmp_c
@@ -0,0 +1,11 @@
+--- openswan-2.6.38.orig/lib/libipsecconf/cmp.c 2012-03-23 22:33:43.000000000 +0100
++++ openswan-2.6.38/lib/libipsecconf/cmp.c 2014-03-27 08:42:09.000000000 +0100
+@@ -15,7 +15,7 @@
+ *
+ */
+
+-#include <sys/queue.h>
++#include "queue.h"
+ #include <string.h>
+
+ #include "ipsecconf/keywords.h"
diff --git a/package/openswan/patches/patch-lib_libipsecconf_confread_c b/package/openswan/patches/patch-lib_libipsecconf_confread_c
new file mode 100644
index 000000000..5d28ed79f
--- /dev/null
+++ b/package/openswan/patches/patch-lib_libipsecconf_confread_c
@@ -0,0 +1,11 @@
+--- openswan-2.6.38.orig/lib/libipsecconf/confread.c 2012-03-23 22:33:43.000000000 +0100
++++ openswan-2.6.38/lib/libipsecconf/confread.c 2014-03-26 21:15:56.000000000 +0100
+@@ -20,7 +20,7 @@
+ #include <string.h>
+ #include <limits.h>
+ #include <assert.h>
+-#include <sys/queue.h>
++#include "queue.h"
+
+ #include "oswalloc.h"
+
diff --git a/package/openswan/patches/patch-lib_libipsecconf_confwrite_c b/package/openswan/patches/patch-lib_libipsecconf_confwrite_c
new file mode 100644
index 000000000..d3fced0b3
--- /dev/null
+++ b/package/openswan/patches/patch-lib_libipsecconf_confwrite_c
@@ -0,0 +1,11 @@
+--- openswan-2.6.38.orig/lib/libipsecconf/confwrite.c 2012-03-23 22:33:43.000000000 +0100
++++ openswan-2.6.38/lib/libipsecconf/confwrite.c 2014-03-26 21:19:22.000000000 +0100
+@@ -18,7 +18,7 @@
+ #include <string.h>
+ #include <limits.h>
+ #include <assert.h>
+-#include <sys/queue.h>
++#include "queue.h"
+
+ #include "ipsecconf/parser.h"
+ #include "ipsecconf/confread.h"
diff --git a/package/openswan/patches/patch-lib_libipsecconf_parser_l b/package/openswan/patches/patch-lib_libipsecconf_parser_l
new file mode 100644
index 000000000..7c4bff2d3
--- /dev/null
+++ b/package/openswan/patches/patch-lib_libipsecconf_parser_l
@@ -0,0 +1,11 @@
+--- openswan-2.6.38.orig/lib/libipsecconf/parser.l 2012-03-23 22:33:43.000000000 +0100
++++ openswan-2.6.38/lib/libipsecconf/parser.l 2014-03-27 08:47:12.000000000 +0100
+@@ -19,7 +19,7 @@
+ *
+ */
+
+-#include <sys/queue.h>
++#include "queue.h"
+ #include <string.h>
+ #include <stdlib.h>
+ #include <assert.h>
diff --git a/package/openswan/patches/patch-lib_libipsecconf_parser_y b/package/openswan/patches/patch-lib_libipsecconf_parser_y
new file mode 100644
index 000000000..81037eb64
--- /dev/null
+++ b/package/openswan/patches/patch-lib_libipsecconf_parser_y
@@ -0,0 +1,11 @@
+--- openswan-2.6.38.orig/lib/libipsecconf/parser.y 2012-03-23 22:33:43.000000000 +0100
++++ openswan-2.6.38/lib/libipsecconf/parser.y 2014-03-27 08:44:37.000000000 +0100
+@@ -15,7 +15,7 @@
+ *
+ */
+
+-#include <sys/queue.h>
++#include "queue.h"
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
diff --git a/package/openswan/patches/patch-lib_libipsecconf_starterwhack_c b/package/openswan/patches/patch-lib_libipsecconf_starterwhack_c
new file mode 100644
index 000000000..2bc7e6910
--- /dev/null
+++ b/package/openswan/patches/patch-lib_libipsecconf_starterwhack_c
@@ -0,0 +1,11 @@
+--- openswan-2.6.38.orig/lib/libipsecconf/starterwhack.c 2012-03-23 22:33:43.000000000 +0100
++++ openswan-2.6.38/lib/libipsecconf/starterwhack.c 2014-03-26 21:21:22.000000000 +0100
+@@ -17,7 +17,7 @@
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <sys/un.h>
+-#include <sys/queue.h>
++#include "queue.h"
+ #include <stddef.h>
+ #include <stdio.h>
+ #include <stdlib.h>
diff --git a/package/openswan/patches/patch-lib_libopenswan_kernel_alg_c b/package/openswan/patches/patch-lib_libopenswan_kernel_alg_c
new file mode 100644
index 000000000..36cf64ee4
--- /dev/null
+++ b/package/openswan/patches/patch-lib_libopenswan_kernel_alg_c
@@ -0,0 +1,11 @@
+--- openswan-2.6.38.orig/lib/libopenswan/kernel_alg.c 2012-03-23 22:33:43.000000000 +0100
++++ openswan-2.6.38/lib/libopenswan/kernel_alg.c 2014-03-26 20:04:18.000000000 +0100
+@@ -27,7 +27,7 @@
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+ #include <unistd.h>
+-#include <sys/queue.h>
++#include "queue.h"
+
+ #include <openswan.h>
+
diff --git a/package/openswan/patches/patch-lib_libopenswan_oswlog_c b/package/openswan/patches/patch-lib_libopenswan_oswlog_c
new file mode 100644
index 000000000..a093b4e1b
--- /dev/null
+++ b/package/openswan/patches/patch-lib_libopenswan_oswlog_c
@@ -0,0 +1,11 @@
+--- openswan-2.6.38.orig/lib/libopenswan/oswlog.c 2012-03-23 22:33:43.000000000 +0100
++++ openswan-2.6.38/lib/libopenswan/oswlog.c 2014-03-26 21:09:43.000000000 +0100
+@@ -24,7 +24,7 @@
+ #include <string.h>
+ #include <unistd.h>
+ #include <signal.h> /* used only if MSG_NOSIGNAL not defined */
+-#include <sys/queue.h>
++#include "queue.h"
+ #include <libgen.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
diff --git a/package/openswan/src/ports/linux/include/queue.h b/package/openswan/src/ports/linux/include/queue.h
new file mode 100644
index 000000000..daf4553d3
--- /dev/null
+++ b/package/openswan/src/ports/linux/include/queue.h
@@ -0,0 +1,574 @@
+/*
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)queue.h 8.5 (Berkeley) 8/20/94
+ */
+
+#ifndef _SYS_QUEUE_H_
+#define _SYS_QUEUE_H_
+
+/*
+ * This file defines five types of data structures: singly-linked lists,
+ * lists, simple queues, tail queues, and circular queues.
+ *
+ * A singly-linked list is headed by a single forward pointer. The
+ * elements are singly linked for minimum space and pointer manipulation
+ * overhead at the expense of O(n) removal for arbitrary elements. New
+ * elements can be added to the list after an existing element or at the
+ * head of the list. Elements being removed from the head of the list
+ * should use the explicit macro for this purpose for optimum
+ * efficiency. A singly-linked list may only be traversed in the forward
+ * direction. Singly-linked lists are ideal for applications with large
+ * datasets and few or no removals or for implementing a LIFO queue.
+ *
+ * A list is headed by a single forward pointer (or an array of forward
+ * pointers for a hash table header). The elements are doubly linked
+ * so that an arbitrary element can be removed without a need to
+ * traverse the list. New elements can be added to the list before
+ * or after an existing element or at the head of the list. A list
+ * may only be traversed in the forward direction.
+ *
+ * A simple queue is headed by a pair of pointers, one the head of the
+ * list and the other to the tail of the list. The elements are singly
+ * linked to save space, so elements can only be removed from the
+ * head of the list. New elements can be added to the list after
+ * an existing element, at the head of the list, or at the end of the
+ * list. A simple queue may only be traversed in the forward direction.
+ *
+ * A tail queue is headed by a pair of pointers, one to the head of the
+ * list and the other to the tail of the list. The elements are doubly
+ * linked so that an arbitrary element can be removed without a need to
+ * traverse the list. New elements can be added to the list before or
+ * after an existing element, at the head of the list, or at the end of
+ * the list. A tail queue may be traversed in either direction.
+ *
+ * A circle queue is headed by a pair of pointers, one to the head of the
+ * list and the other to the tail of the list. The elements are doubly
+ * linked so that an arbitrary element can be removed without a need to
+ * traverse the list. New elements can be added to the list before or after
+ * an existing element, at the head of the list, or at the end of the list.
+ * A circle queue may be traversed in either direction, but has a more
+ * complex end of list detection.
+ *
+ * For details on the use of these macros, see the queue(3) manual page.
+ */
+
+/*
+ * List definitions.
+ */
+#define LIST_HEAD(name, type) \
+struct name { \
+ struct type *lh_first; /* first element */ \
+}
+
+#define LIST_HEAD_INITIALIZER(head) \
+ { NULL }
+
+#define LIST_ENTRY(type) \
+struct { \
+ struct type *le_next; /* next element */ \
+ struct type **le_prev; /* address of previous next element */ \
+}
+
+/*
+ * List functions.
+ */
+#define LIST_INIT(head) do { \
+ (head)->lh_first = NULL; \
+} while (/*CONSTCOND*/0)
+
+#define LIST_INSERT_AFTER(listelm, elm, field) do { \
+ if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \
+ (listelm)->field.le_next->field.le_prev = \
+ &(elm)->field.le_next; \
+ (listelm)->field.le_next = (elm); \
+ (elm)->field.le_prev = &(listelm)->field.le_next; \
+} while (/*CONSTCOND*/0)
+
+#define LIST_INSERT_BEFORE(listelm, elm, field) do { \
+ (elm)->field.le_prev = (listelm)->field.le_prev; \
+ (elm)->field.le_next = (listelm); \
+ *(listelm)->field.le_prev = (elm); \
+ (listelm)->field.le_prev = &(elm)->field.le_next; \
+} while (/*CONSTCOND*/0)
+
+#define LIST_INSERT_HEAD(head, elm, field) do { \
+ if (((elm)->field.le_next = (head)->lh_first) != NULL) \
+ (head)->lh_first->field.le_prev = &(elm)->field.le_next;\
+ (head)->lh_first = (elm); \
+ (elm)->field.le_prev = &(head)->lh_first; \
+} while (/*CONSTCOND*/0)
+
+#define LIST_REMOVE(elm, field) do { \
+ if ((elm)->field.le_next != NULL) \
+ (elm)->field.le_next->field.le_prev = \
+ (elm)->field.le_prev; \
+ *(elm)->field.le_prev = (elm)->field.le_next; \
+} while (/*CONSTCOND*/0)
+
+#define LIST_FOREACH(var, head, field) \
+ for ((var) = ((head)->lh_first); \
+ (var); \
+ (var) = ((var)->field.le_next))
+
+/*
+ * List access methods.
+ */
+#define LIST_EMPTY(head) ((head)->lh_first == NULL)
+#define LIST_FIRST(head) ((head)->lh_first)
+#define LIST_NEXT(elm, field) ((elm)->field.le_next)
+
+
+/*
+ * Singly-linked List definitions.
+ */
+#define SLIST_HEAD(name, type) \
+struct name { \
+ struct type *slh_first; /* first element */ \
+}
+
+#define SLIST_HEAD_INITIALIZER(head) \
+ { NULL }
+
+#define SLIST_ENTRY(type) \
+struct { \
+ struct type *sle_next; /* next element */ \
+}
+
+/*
+ * Singly-linked List functions.
+ */
+#define SLIST_INIT(head) do { \
+ (head)->slh_first = NULL; \
+} while (/*CONSTCOND*/0)
+
+#define SLIST_INSERT_AFTER(slistelm, elm, field) do { \
+ (elm)->field.sle_next = (slistelm)->field.sle_next; \
+ (slistelm)->field.sle_next = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define SLIST_INSERT_HEAD(head, elm, field) do { \
+ (elm)->field.sle_next = (head)->slh_first; \
+ (head)->slh_first = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define SLIST_REMOVE_HEAD(head, field) do { \
+ (head)->slh_first = (head)->slh_first->field.sle_next; \
+} while (/*CONSTCOND*/0)
+
+#define SLIST_REMOVE(head, elm, type, field) do { \
+ if ((head)->slh_first == (elm)) { \
+ SLIST_REMOVE_HEAD((head), field); \
+ } \
+ else { \
+ struct type *curelm = (head)->slh_first; \
+ while(curelm->field.sle_next != (elm)) \
+ curelm = curelm->field.sle_next; \
+ curelm->field.sle_next = \
+ curelm->field.sle_next->field.sle_next; \
+ } \
+} while (/*CONSTCOND*/0)
+
+#define SLIST_FOREACH(var, head, field) \
+ for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next)
+
+/*
+ * Singly-linked List access methods.
+ */
+#define SLIST_EMPTY(head) ((head)->slh_first == NULL)
+#define SLIST_FIRST(head) ((head)->slh_first)
+#define SLIST_NEXT(elm, field) ((elm)->field.sle_next)
+
+
+/*
+ * Singly-linked Tail queue declarations.
+ */
+#define STAILQ_HEAD(name, type) \
+struct name { \
+ struct type *stqh_first; /* first element */ \
+ struct type **stqh_last; /* addr of last next element */ \
+}
+
+#define STAILQ_HEAD_INITIALIZER(head) \
+ { NULL, &(head).stqh_first }
+
+#define STAILQ_ENTRY(type) \
+struct { \
+ struct type *stqe_next; /* next element */ \
+}
+
+/*
+ * Singly-linked Tail queue functions.
+ */
+#define STAILQ_INIT(head) do { \
+ (head)->stqh_first = NULL; \
+ (head)->stqh_last = &(head)->stqh_first; \
+} while (/*CONSTCOND*/0)
+
+#define STAILQ_INSERT_HEAD(head, elm, field) do { \
+ if (((elm)->field.stqe_next = (head)->stqh_first) == NULL) \
+ (head)->stqh_last = &(elm)->field.stqe_next; \
+ (head)->stqh_first = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define STAILQ_INSERT_TAIL(head, elm, field) do { \
+ (elm)->field.stqe_next = NULL; \
+ *(head)->stqh_last = (elm); \
+ (head)->stqh_last = &(elm)->field.stqe_next; \
+} while (/*CONSTCOND*/0)
+
+#define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \
+ if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\
+ (head)->stqh_last = &(elm)->field.stqe_next; \
+ (listelm)->field.stqe_next = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define STAILQ_REMOVE_HEAD(head, field) do { \
+ if (((head)->stqh_first = (head)->stqh_first->field.stqe_next) == NULL) \
+ (head)->stqh_last = &(head)->stqh_first; \
+} while (/*CONSTCOND*/0)
+
+#define STAILQ_REMOVE(head, elm, type, field) do { \
+ if ((head)->stqh_first == (elm)) { \
+ STAILQ_REMOVE_HEAD((head), field); \
+ } else { \
+ struct type *curelm = (head)->stqh_first; \
+ while (curelm->field.stqe_next != (elm)) \
+ curelm = curelm->field.stqe_next; \
+ if ((curelm->field.stqe_next = \
+ curelm->field.stqe_next->field.stqe_next) == NULL) \
+ (head)->stqh_last = &(curelm)->field.stqe_next; \
+ } \
+} while (/*CONSTCOND*/0)
+
+#define STAILQ_FOREACH(var, head, field) \
+ for ((var) = ((head)->stqh_first); \
+ (var); \
+ (var) = ((var)->field.stqe_next))
+
+#define STAILQ_CONCAT(head1, head2) do { \
+ if (!STAILQ_EMPTY((head2))) { \
+ *(head1)->stqh_last = (head2)->stqh_first; \
+ (head1)->stqh_last = (head2)->stqh_last; \
+ STAILQ_INIT((head2)); \
+ } \
+} while (/*CONSTCOND*/0)
+
+/*
+ * Singly-linked Tail queue access methods.
+ */
+#define STAILQ_EMPTY(head) ((head)->stqh_first == NULL)
+#define STAILQ_FIRST(head) ((head)->stqh_first)
+#define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next)
+
+
+/*
+ * Simple queue definitions.
+ */
+#define SIMPLEQ_HEAD(name, type) \
+struct name { \
+ struct type *sqh_first; /* first element */ \
+ struct type **sqh_last; /* addr of last next element */ \
+}
+
+#define SIMPLEQ_HEAD_INITIALIZER(head) \
+ { NULL, &(head).sqh_first }
+
+#define SIMPLEQ_ENTRY(type) \
+struct { \
+ struct type *sqe_next; /* next element */ \
+}
+
+/*
+ * Simple queue functions.
+ */
+#define SIMPLEQ_INIT(head) do { \
+ (head)->sqh_first = NULL; \
+ (head)->sqh_last = &(head)->sqh_first; \
+} while (/*CONSTCOND*/0)
+
+#define SIMPLEQ_INSERT_HEAD(head, elm, field) do { \
+ if (((elm)->field.sqe_next = (head)->sqh_first) == NULL) \
+ (head)->sqh_last = &(elm)->field.sqe_next; \
+ (head)->sqh_first = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define SIMPLEQ_INSERT_TAIL(head, elm, field) do { \
+ (elm)->field.sqe_next = NULL; \
+ *(head)->sqh_last = (elm); \
+ (head)->sqh_last = &(elm)->field.sqe_next; \
+} while (/*CONSTCOND*/0)
+
+#define SIMPLEQ_INSERT_AFTER(head, listelm, elm, field) do { \
+ if (((elm)->field.sqe_next = (listelm)->field.sqe_next) == NULL)\
+ (head)->sqh_last = &(elm)->field.sqe_next; \
+ (listelm)->field.sqe_next = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define SIMPLEQ_REMOVE_HEAD(head, field) do { \
+ if (((head)->sqh_first = (head)->sqh_first->field.sqe_next) == NULL) \
+ (head)->sqh_last = &(head)->sqh_first; \
+} while (/*CONSTCOND*/0)
+
+#define SIMPLEQ_REMOVE(head, elm, type, field) do { \
+ if ((head)->sqh_first == (elm)) { \
+ SIMPLEQ_REMOVE_HEAD((head), field); \
+ } else { \
+ struct type *curelm = (head)->sqh_first; \
+ while (curelm->field.sqe_next != (elm)) \
+ curelm = curelm->field.sqe_next; \
+ if ((curelm->field.sqe_next = \
+ curelm->field.sqe_next->field.sqe_next) == NULL) \
+ (head)->sqh_last = &(curelm)->field.sqe_next; \
+ } \
+} while (/*CONSTCOND*/0)
+
+#define SIMPLEQ_FOREACH(var, head, field) \
+ for ((var) = ((head)->sqh_first); \
+ (var); \
+ (var) = ((var)->field.sqe_next))
+
+/*
+ * Simple queue access methods.
+ */
+#define SIMPLEQ_EMPTY(head) ((head)->sqh_first == NULL)
+#define SIMPLEQ_FIRST(head) ((head)->sqh_first)
+#define SIMPLEQ_NEXT(elm, field) ((elm)->field.sqe_next)
+
+
+/*
+ * Tail queue definitions.
+ */
+#define _TAILQ_HEAD(name, type, qual) \
+struct name { \
+ qual type *tqh_first; /* first element */ \
+ qual type *qual *tqh_last; /* addr of last next element */ \
+}
+#define TAILQ_HEAD(name, type) _TAILQ_HEAD(name, struct type,)
+
+#define TAILQ_HEAD_INITIALIZER(head) \
+ { NULL, &(head).tqh_first }
+
+#define _TAILQ_ENTRY(type, qual) \
+struct { \
+ qual type *tqe_next; /* next element */ \
+ qual type *qual *tqe_prev; /* address of previous next element */\
+}
+#define TAILQ_ENTRY(type) _TAILQ_ENTRY(struct type,)
+
+/*
+ * Tail queue functions.
+ */
+#define TAILQ_INIT(head) do { \
+ (head)->tqh_first = NULL; \
+ (head)->tqh_last = &(head)->tqh_first; \
+} while (/*CONSTCOND*/0)
+
+#define TAILQ_INSERT_HEAD(head, elm, field) do { \
+ if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \
+ (head)->tqh_first->field.tqe_prev = \
+ &(elm)->field.tqe_next; \
+ else \
+ (head)->tqh_last = &(elm)->field.tqe_next; \
+ (head)->tqh_first = (elm); \
+ (elm)->field.tqe_prev = &(head)->tqh_first; \
+} while (/*CONSTCOND*/0)
+
+#define TAILQ_INSERT_TAIL(head, elm, field) do { \
+ (elm)->field.tqe_next = NULL; \
+ (elm)->field.tqe_prev = (head)->tqh_last; \
+ *(head)->tqh_last = (elm); \
+ (head)->tqh_last = &(elm)->field.tqe_next; \
+} while (/*CONSTCOND*/0)
+
+#define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \
+ if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\
+ (elm)->field.tqe_next->field.tqe_prev = \
+ &(elm)->field.tqe_next; \
+ else \
+ (head)->tqh_last = &(elm)->field.tqe_next; \
+ (listelm)->field.tqe_next = (elm); \
+ (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \
+} while (/*CONSTCOND*/0)
+
+#define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \
+ (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \
+ (elm)->field.tqe_next = (listelm); \
+ *(listelm)->field.tqe_prev = (elm); \
+ (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \
+} while (/*CONSTCOND*/0)
+
+#define TAILQ_REMOVE(head, elm, field) do { \
+ if (((elm)->field.tqe_next) != NULL) \
+ (elm)->field.tqe_next->field.tqe_prev = \
+ (elm)->field.tqe_prev; \
+ else \
+ (head)->tqh_last = (elm)->field.tqe_prev; \
+ *(elm)->field.tqe_prev = (elm)->field.tqe_next; \
+} while (/*CONSTCOND*/0)
+
+#define TAILQ_FOREACH(var, head, field) \
+ for ((var) = ((head)->tqh_first); \
+ (var); \
+ (var) = ((var)->field.tqe_next))
+
+#define TAILQ_FOREACH_REVERSE(var, head, headname, field) \
+ for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \
+ (var); \
+ (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last)))
+
+#define TAILQ_CONCAT(head1, head2, field) do { \
+ if (!TAILQ_EMPTY(head2)) { \
+ *(head1)->tqh_last = (head2)->tqh_first; \
+ (head2)->tqh_first->field.tqe_prev = (head1)->tqh_last; \
+ (head1)->tqh_last = (head2)->tqh_last; \
+ TAILQ_INIT((head2)); \
+ } \
+} while (/*CONSTCOND*/0)
+
+/*
+ * Tail queue access methods.
+ */
+#define TAILQ_EMPTY(head) ((head)->tqh_first == NULL)
+#define TAILQ_FIRST(head) ((head)->tqh_first)
+#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
+
+#define TAILQ_LAST(head, headname) \
+ (*(((struct headname *)((head)->tqh_last))->tqh_last))
+#define TAILQ_PREV(elm, headname, field) \
+ (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))
+
+
+/*
+ * Circular queue definitions.
+ */
+#define CIRCLEQ_HEAD(name, type) \
+struct name { \
+ struct type *cqh_first; /* first element */ \
+ struct type *cqh_last; /* last element */ \
+}
+
+#define CIRCLEQ_HEAD_INITIALIZER(head) \
+ { (void *)&head, (void *)&head }
+
+#define CIRCLEQ_ENTRY(type) \
+struct { \
+ struct type *cqe_next; /* next element */ \
+ struct type *cqe_prev; /* previous element */ \
+}
+
+/*
+ * Circular queue functions.
+ */
+#define CIRCLEQ_INIT(head) do { \
+ (head)->cqh_first = (void *)(head); \
+ (head)->cqh_last = (void *)(head); \
+} while (/*CONSTCOND*/0)
+
+#define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do { \
+ (elm)->field.cqe_next = (listelm)->field.cqe_next; \
+ (elm)->field.cqe_prev = (listelm); \
+ if ((listelm)->field.cqe_next == (void *)(head)) \
+ (head)->cqh_last = (elm); \
+ else \
+ (listelm)->field.cqe_next->field.cqe_prev = (elm); \
+ (listelm)->field.cqe_next = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do { \
+ (elm)->field.cqe_next = (listelm); \
+ (elm)->field.cqe_prev = (listelm)->field.cqe_prev; \
+ if ((listelm)->field.cqe_prev == (void *)(head)) \
+ (head)->cqh_first = (elm); \
+ else \
+ (listelm)->field.cqe_prev->field.cqe_next = (elm); \
+ (listelm)->field.cqe_prev = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define CIRCLEQ_INSERT_HEAD(head, elm, field) do { \
+ (elm)->field.cqe_next = (head)->cqh_first; \
+ (elm)->field.cqe_prev = (void *)(head); \
+ if ((head)->cqh_last == (void *)(head)) \
+ (head)->cqh_last = (elm); \
+ else \
+ (head)->cqh_first->field.cqe_prev = (elm); \
+ (head)->cqh_first = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define CIRCLEQ_INSERT_TAIL(head, elm, field) do { \
+ (elm)->field.cqe_next = (void *)(head); \
+ (elm)->field.cqe_prev = (head)->cqh_last; \
+ if ((head)->cqh_first == (void *)(head)) \
+ (head)->cqh_first = (elm); \
+ else \
+ (head)->cqh_last->field.cqe_next = (elm); \
+ (head)->cqh_last = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define CIRCLEQ_REMOVE(head, elm, field) do { \
+ if ((elm)->field.cqe_next == (void *)(head)) \
+ (head)->cqh_last = (elm)->field.cqe_prev; \
+ else \
+ (elm)->field.cqe_next->field.cqe_prev = \
+ (elm)->field.cqe_prev; \
+ if ((elm)->field.cqe_prev == (void *)(head)) \
+ (head)->cqh_first = (elm)->field.cqe_next; \
+ else \
+ (elm)->field.cqe_prev->field.cqe_next = \
+ (elm)->field.cqe_next; \
+} while (/*CONSTCOND*/0)
+
+#define CIRCLEQ_FOREACH(var, head, field) \
+ for ((var) = ((head)->cqh_first); \
+ (var) != (const void *)(head); \
+ (var) = ((var)->field.cqe_next))
+
+#define CIRCLEQ_FOREACH_REVERSE(var, head, field) \
+ for ((var) = ((head)->cqh_last); \
+ (var) != (const void *)(head); \
+ (var) = ((var)->field.cqe_prev))
+
+/*
+ * Circular queue access methods.
+ */
+#define CIRCLEQ_EMPTY(head) ((head)->cqh_first == (void *)(head))
+#define CIRCLEQ_FIRST(head) ((head)->cqh_first)
+#define CIRCLEQ_LAST(head) ((head)->cqh_last)
+#define CIRCLEQ_NEXT(elm, field) ((elm)->field.cqe_next)
+#define CIRCLEQ_PREV(elm, field) ((elm)->field.cqe_prev)
+
+#define CIRCLEQ_LOOP_NEXT(head, elm, field) \
+ (((elm)->field.cqe_next == (void *)(head)) \
+ ? ((head)->cqh_first) \
+ : (elm->field.cqe_next))
+#define CIRCLEQ_LOOP_PREV(head, elm, field) \
+ (((elm)->field.cqe_prev == (void *)(head)) \
+ ? ((head)->cqh_last) \
+ : (elm->field.cqe_prev))
+
+#endif /* sys/queue.h */
diff --git a/package/osiris/Makefile b/package/osiris/Makefile
deleted file mode 100644
index c2921b37a..000000000
--- a/package/osiris/Makefile
+++ /dev/null
@@ -1,39 +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:= osiris
-PKG_VERSION:= 4.2.3
-PKG_RELEASE:= 1
-PKG_MD5SUM:= 1951c7dc0fe729af9ffaf58910340d12
-PKG_DESCR:= Host Integrity Monitoring System (scanning agent)
-PKG_SECTION:= admin
-PKG_DEPENDS:= libopenssl libpthread
-PKG_BUILDDEP:= openssl
-PKG_URL:= http://osiris.shmoo.com/
-PKG_SITES:= http://openadk.org/distfiles/
-
-include ${TOPDIR}/mk/package.mk
-
-$(eval $(call PKG_template,OSIRIS,osiris,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
-
-CONFIGURE_ENV+= ac_cv_openssldir="${STAGING_TARGET_DIR}/usr" \
- ac_cv_have_accrights_in_msghdr=no \
- ac_cv_have_control_in_msghdr=yes
-CONFIGURE_ARGS+= --with-osiris-user=root \
- --with-root-dir=/var/lib/osiris \
- --with-readline=no
-XAKE_FLAGS+= ar=${TARGET_CROSS}ar \
- INTERACTIVE=0
-TARGET_CFLAGS+= -DOPENSSL_NO_RIPEMD
-
-post-configure:
- (cd ${WRKDIST}/src/osirisd/modules && ./genmods.sh);
-
-osiris-install:
- ${INSTALL_DIR} ${IDIR_OSIRIS}/usr/sbin
- ${INSTALL_BIN} ${WRKINST}/usr/sbin/osirisd \
- ${IDIR_OSIRIS}/usr/sbin/
-
-include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/osiris/files/osirisd.init b/package/osiris/files/osirisd.init
deleted file mode 100644
index b412e7e73..000000000
--- a/package/osiris/files/osirisd.init
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-#PKG osirisd
-#INIT 75
-. /etc/rc.conf
-
-case $1 in
-autostop) ;;
-autostart)
- test x"${osirisd:-NO}" = x"NO" && exit 0
- exec sh $0 start
- ;;
-start)
- [ -d /var/lib/osiris ] || mkdir -p /var/lib/osiris
- /usr/sbin/osirisd
- ;;
-stop)
- kill $(pgrep -f /usr/sbin/osirisd)
- ;;
-restart)
- sh $0 stop
- sh $0 start
- ;;
-*)
- echo "Usage: $0 {start | stop | restart}"
- exit 1
- ;;
-esac
-exit $?
diff --git a/package/osiris/patches/patch-configure b/package/osiris/patches/patch-configure
deleted file mode 100644
index 6dce9a8fb..000000000
--- a/package/osiris/patches/patch-configure
+++ /dev/null
@@ -1,113 +0,0 @@
---- osiris-4.2.3.orig/configure 2006-07-28 01:57:51.000000000 +0200
-+++ osiris-4.2.3/configure 2011-01-21 20:40:11.234913757 +0100
-@@ -3403,7 +3403,7 @@ else
- fi
-
-
--OS_NAME=`uname`
-+OS_NAME=Linux
- AUTOHEADER=echo
-
- if test "x$prefix" = "xNONE" ; then
-@@ -3573,7 +3573,6 @@ else
-
- for ssldir in $tryssldir "" /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg /opt /opt/openssl ; do
- CPPFLAGS="$saved_CPPFLAGS"
-- LDFLAGS="$saved_LDFLAGS"
-
- # GOD DAMN FUCKING STATIC BINARIES ON SOLARIS CAN EAT MY ASS.
-
-@@ -3596,29 +3595,6 @@ else
- if test ! -z "$ssldir" -a ! -d "$ssldir" ; then
- continue;
- fi
-- if test ! -z "$ssldir" -a "x$ssldir" != "x/usr"; then
-- # Try to use $ssldir/lib if it exists, otherwise
-- # $ssldir
-- if test -d "$ssldir/lib" ; then
-- LDFLAGS="-L$ssldir/lib $saved_LDFLAGS"
-- if test ! -z "$need_dash_r" ; then
-- LDFLAGS="-R$ssldir/lib $LDFLAGS"
-- fi
-- else
-- LDFLAGS="-L$ssldir $saved_LDFLAGS"
-- if test ! -z "$need_dash_r" ; then
-- LDFLAGS="-R$ssldir $LDFLAGS"
-- fi
-- fi
--
-- # Try to use $ssldir/include if it exists, otherwise
-- # $ssldir
-- if test -d "$ssldir/include" ; then
-- CPPFLAGS="-I$ssldir/include $saved_CPPFLAGS"
-- else
-- CPPFLAGS="-I$ssldir $saved_CPPFLAGS"
-- fi
-- fi
-
- # Basic test to check for compatible version and correct linking
-
-@@ -3694,34 +3670,6 @@ fi
- echo "$as_me:$LINENO: result: $ac_cv_openssldir" >&5
- echo "${ECHO_T}$ac_cv_openssldir" >&6
-
--if (test ! -z "$ac_cv_openssldir" && test "x$ac_cv_openssldir" != "x(system)") ; then
--# AC_DEFINE(HAVE_OPENSSL)
-- ssldir=$ac_cv_openssldir
-- if test ! -z "$ssldir" -a "x$ssldir" != "x/usr"; then
-- # Try to use $ssldir/lib if it exists, otherwise
-- # $ssldir
-- if test -d "$ssldir/lib" ; then
-- LDFLAGS="-L$ssldir/lib $saved_LDFLAGS"
-- if test ! -z "$need_dash_r" ; then
-- LDFLAGS="-R$ssldir/lib $LDFLAGS"
-- fi
-- else
-- LDFLAGS="-L$ssldir $saved_LDFLAGS"
-- if test ! -z "$need_dash_r" ; then
-- LDFLAGS="-R$ssldir $LDFLAGS"
-- fi
-- fi
-- # Try to use $ssldir/include if it exists, otherwise
-- # $ssldir
-- if test -d "$ssldir/include" ; then
-- CPPFLAGS="-I$ssldir/include $saved_CPPFLAGS"
-- else
-- CPPFLAGS="-I$ssldir $saved_CPPFLAGS"
-- fi
-- fi
--fi
--
--
- case "$OS_NAME" in
- SunOS*)
- LIBS="$saved_LIBS $ssldir/lib/libssl.a $ssldir/lib/libcrypto.a"
-@@ -3738,7 +3686,7 @@ CYGWIN*)
- esac
-
-
--DB_CONFIG_ARGS="--enable-shared=no --enable-static=yes"
-+DB_CONFIG_ARGS="--enable-shared=no --enable-static=yes --target=${target_alias} --host=${host_alias} --build=${build_alias}"
-
- case "${OS_NAME}" in
- MINGW32*)
-@@ -4448,11 +4396,6 @@ cat >>confdefs.h <<_ACEOF
- #define SYSTEM_LINUX 1
- _ACEOF
-
--
-- rc=`grep -c krb5 /usr/include/openssl/ssl.h`
-- if test $rc -ne 0; then
-- CPPFLAGS="-I/usr/kerberos/include/ ${CPPFLAGS}"
-- fi
- ;;
- BSD*)
-
-@@ -11394,7 +11337,6 @@ chmod ug+x src/install/install.sh
- echo " Osiris MD Directory: ${with_md_root_dir}"
- echo " Osiris MD user: ${with_osiris_md_user}"
- echo " Osiris MD config dir: ${with_md_conf_dir}"
-- cd ./src/osirisd/modules;./genmods.sh;cd ../../..
- echo " ==> use one of the following targets:"
- echo ""
- echo " all: make everything, agent, CLI and management console."
diff --git a/package/osiris/patches/patch-src_db-4_2_52_dist_configure b/package/osiris/patches/patch-src_db-4_2_52_dist_configure
deleted file mode 100644
index 45c04bec4..000000000
--- a/package/osiris/patches/patch-src_db-4_2_52_dist_configure
+++ /dev/null
@@ -1,12 +0,0 @@
---- osiris-4.2.3.orig/src/db-4.2.52/dist/configure 2006-07-28 01:57:51.000000000 +0200
-+++ osiris-4.2.3/src/db-4.2.52/dist/configure 2011-01-16 14:41:34.000000000 +0100
-@@ -3498,7 +3498,8 @@ freebsd*)
- LDFLAGS="$LDFLAGS -pthread";;
- gnu*|k*bsd*-gnu|linux*)
- optimize_def="-O2"
-- CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE -D_REENTRANT";;
-+ CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE -D_REENTRANT"
-+ LDFLAGS="$LDFLAGS -pthread";;
- hpux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT";;
- irix*) optimize_def="-O2"
- CPPFLAGS="$CPPFLAGS -D_SGI_MP_SOURCE";;
diff --git a/package/osiris/patches/patch-src_db-4_2_52_dist_ltmain_sh b/package/osiris/patches/patch-src_db-4_2_52_dist_ltmain_sh
deleted file mode 100644
index 8b9084264..000000000
--- a/package/osiris/patches/patch-src_db-4_2_52_dist_ltmain_sh
+++ /dev/null
@@ -1,11 +0,0 @@
---- osiris-4.2.3.orig/src/db-4.2.52/dist/ltmain.sh 2006-07-28 01:57:51.000000000 +0200
-+++ osiris-4.2.3/src/db-4.2.52/dist/ltmain.sh 2011-01-16 14:08:34.000000000 +0100
-@@ -1298,7 +1298,7 @@ EOF
- # but this is not reliable with gcc because gcc may use -mfoo to
- # select a different linker, different libraries, etc, while
- # -Wl,-mfoo simply passes -mfoo to the linker.
-- -m*)
-+ -m*|-fstack-protector*|-flto)
- # Unknown arguments in both finalize_command and compile_command need
- # to be aesthetically quoted because they are evaled later.
- arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
diff --git a/package/osiris/patches/patch-src_libosiris_Makefile_in b/package/osiris/patches/patch-src_libosiris_Makefile_in
deleted file mode 100644
index 458fc8bbd..000000000
--- a/package/osiris/patches/patch-src_libosiris_Makefile_in
+++ /dev/null
@@ -1,41 +0,0 @@
-$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
---- osiris-4.2.3.orig/src/libosiris/Makefile.in 2006-07-28 01:57:51.000000000 +0200
-+++ osiris-4.2.3/src/libosiris/Makefile.in 2014-01-03 17:24:45.000000000 +0100
-@@ -105,7 +105,7 @@ libosiris_a_SOURCES = list.c message.c s
- filter_uid.c filter_gid.c filter_user.c \
- filter_group.c filter_header.c filter_file.c \
- filter_suffix.c filter_md5.c filter_sha.c \
-- filter_ripemd.c filter_sid.c filter_permissions.c \
-+ filter_sid.c filter_permissions.c \
- string_list.h ssl_utilities.h utilities.h \
- regex.h regex.c debug.h debug.c strcasestr.c \
- error.h strptime.h
-@@ -128,11 +128,10 @@ am_libosiris_a_OBJECTS = list.$(OBJEXT)
- filter_python.$(OBJEXT) filter_script.$(OBJEXT) \
- filter_gzip.$(OBJEXT) filter_zip.$(OBJEXT) filter_tar.$(OBJEXT) \
- filter_pgp.$(OBJEXT) filter_rpm.$(OBJEXT) filter_uid.$(OBJEXT) \
-- filter_gid.$(OBJEXT) filter_user.$(OBJEXT) \
-+ filter_gid.$(OBJEXT) filter_user.$(OBJEXT) filter_sid.$(OBJEXT) \
- filter_group.$(OBJEXT) filter_header.$(OBJEXT) \
- filter_file.$(OBJEXT) filter_suffix.$(OBJEXT) \
- filter_md5.$(OBJEXT) filter_sha.$(OBJEXT) \
-- filter_ripemd.$(OBJEXT) filter_sid.$(OBJEXT) \
- filter_permissions.$(OBJEXT) regex.$(OBJEXT) debug.$(OBJEXT) \
- strcasestr.$(OBJEXT)
- libosiris_a_OBJECTS = $(am_libosiris_a_OBJECTS)
-@@ -158,7 +157,6 @@ am__depfiles_maybe = depfiles
- @AMDEP_TRUE@ ./$(DEPDIR)/filter_permissions.Po \
- @AMDEP_TRUE@ ./$(DEPDIR)/filter_pgp.Po \
- @AMDEP_TRUE@ ./$(DEPDIR)/filter_python.Po \
--@AMDEP_TRUE@ ./$(DEPDIR)/filter_ripemd.Po \
- @AMDEP_TRUE@ ./$(DEPDIR)/filter_rpm.Po \
- @AMDEP_TRUE@ ./$(DEPDIR)/filter_script.Po \
- @AMDEP_TRUE@ ./$(DEPDIR)/filter_sgid.Po \
-@@ -224,7 +222,6 @@ distclean-compile:
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filter_permissions.Po@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filter_pgp.Po@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filter_python.Po@am__quote@
--@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filter_ripemd.Po@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filter_rpm.Po@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filter_script.Po@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filter_sgid.Po@am__quote@
diff --git a/package/osiris/patches/patch-src_libosiris_configuration_c b/package/osiris/patches/patch-src_libosiris_configuration_c
deleted file mode 100644
index f4b164b52..000000000
--- a/package/osiris/patches/patch-src_libosiris_configuration_c
+++ /dev/null
@@ -1,27 +0,0 @@
-$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
---- osiris-4.2.3.orig/src/libosiris/configuration.c 2006-07-28 01:57:51.000000000 +0200
-+++ osiris-4.2.3/src/libosiris/configuration.c 2009-05-10 21:06:49.000000000 +0200
-@@ -105,9 +105,11 @@ static struct keywords hash_keywords[] =
- { "sha1", HASH_SHA },
- { "sha-1", HASH_SHA },
-
-+#ifndef OPENSSL_NO_RIPEMD
- { "ripemd", HASH_RIPEMD },
- { "ripemd-160", HASH_RIPEMD },
- { "ripemd160", HASH_RIPEMD },
-+#endif
-
- { NULL, 0 }
- };
-@@ -119,9 +121,11 @@ static char * valid_hash_values[] =
- "sha",
- "sha1",
- "sha-1",
-+#ifndef OPENSSL_NO_RIPEMD
- "ripemd",
- "ripemd160",
- "ripemd-160",
-+#endif
- NULL
- };
-
diff --git a/package/osiris/patches/patch-src_libosiris_configuration_h b/package/osiris/patches/patch-src_libosiris_configuration_h
deleted file mode 100644
index 6cf7c3540..000000000
--- a/package/osiris/patches/patch-src_libosiris_configuration_h
+++ /dev/null
@@ -1,13 +0,0 @@
-$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
---- osiris-4.2.3.orig/src/libosiris/configuration.h 2006-07-28 01:57:51.000000000 +0200
-+++ osiris-4.2.3/src/libosiris/configuration.h 2009-05-10 21:19:28.000000000 +0200
-@@ -45,7 +45,9 @@
- #define HASH_DEFAULT HASH_MD5
- #define HASH_MD5 1
- #define HASH_SHA 2
-+#ifndef OPENSSL_NO_RIPEMD
- #define HASH_RIPEMD 3
-+#endif
-
- /* config keyword types */
-
diff --git a/package/osiris/patches/patch-src_libosiris_filter_c b/package/osiris/patches/patch-src_libosiris_filter_c
deleted file mode 100644
index d7306ea14..000000000
--- a/package/osiris/patches/patch-src_libosiris_filter_c
+++ /dev/null
@@ -1,35 +0,0 @@
-$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
---- osiris-4.2.3.orig/src/libosiris/filter.c 2006-07-28 01:57:51.000000000 +0200
-+++ osiris-4.2.3/src/libosiris/filter.c 2009-05-10 21:02:44.000000000 +0200
-@@ -66,7 +66,9 @@ static struct keywords filter_keywords[]
- { "suffix", FILTER_TYPE_SUFFIX },
- { "md5", FILTER_TYPE_MD5 },
- { "sha", FILTER_TYPE_SHA },
-+#ifndef OPENSSL_NO_RIPEMD
- { "ripemd", FILTER_TYPE_RIPEMD },
-+#endif
- { "permissions", FILTER_TYPE_PERMISSIONS },
- { NULL, 0 }
- };
-@@ -179,9 +181,11 @@ int setup_filter_function( OSI_FILTER *a
- action_filter->perform = filter_sha;
- break;
-
-+#ifndef OPENSSL_NO_RIPEMD
- case FILTER_TYPE_RIPEMD:
- action_filter->perform = filter_ripemd;
- break;
-+#endif
-
- case FILTER_TYPE_PERMISSIONS:
- action_filter->perform = filter_permissions;
-@@ -220,7 +224,9 @@ osi_bool filter_is_dynamic( int filter_t
- case FILTER_TYPE_SUFFIX:
- case FILTER_TYPE_MD5:
- case FILTER_TYPE_SHA:
-+#ifndef OPENSSL_NO_RIPEMD
- case FILTER_TYPE_RIPEMD:
-+#endif
- case FILTER_TYPE_PERMISSIONS:
-
- return TRUE;
diff --git a/package/osiris/patches/patch-src_libosiris_filter_h b/package/osiris/patches/patch-src_libosiris_filter_h
deleted file mode 100644
index c7463306d..000000000
--- a/package/osiris/patches/patch-src_libosiris_filter_h
+++ /dev/null
@@ -1,23 +0,0 @@
-$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
---- osiris-4.2.3.orig/src/libosiris/filter.h 2006-07-28 01:57:51.000000000 +0200
-+++ osiris-4.2.3/src/libosiris/filter.h 2009-05-10 21:15:10.000000000 +0200
-@@ -61,7 +61,9 @@
- #define FILTER_TYPE_SUFFIX 19
- #define FILTER_TYPE_MD5 20
- #define FILTER_TYPE_SHA 21
-+#ifndef OPENSSL_NO_RIPEMD
- #define FILTER_TYPE_RIPEMD 22
-+#endif
- #define FILTER_TYPE_PERMISSIONS 23
- #define FILTER_TYPE_SID 24
-
-@@ -143,7 +145,9 @@ osi_bool filter_file( const char *file_p
- osi_bool filter_suffix( const char *file_path, FILTER_CONTEXT *context );
- osi_bool filter_md5( const char *file_path, FILTER_CONTEXT *context );
- osi_bool filter_sha( const char *file_path, FILTER_CONTEXT *context );
-+#ifndef OPENSSL_NO_RIPEMD
- osi_bool filter_ripemd( const char *file_path, FILTER_CONTEXT *context );
-+#endif
- osi_bool filter_permissions( const char *file_path, FILTER_CONTEXT *context );
-
- #endif
diff --git a/package/osiris/patches/patch-src_libosiris_osi_common_h b/package/osiris/patches/patch-src_libosiris_osi_common_h
deleted file mode 100644
index b30462a3c..000000000
--- a/package/osiris/patches/patch-src_libosiris_osi_common_h
+++ /dev/null
@@ -1,10 +0,0 @@
---- osiris-4.2.3.orig/src/libosiris/osi_common.h 2006-07-28 01:57:51.000000000 +0200
-+++ osiris-4.2.3/src/libosiris/osi_common.h 2014-01-03 17:33:53.000000000 +0100
-@@ -31,6 +31,7 @@
- #ifndef OSI_COMMON_H
- #define OSI_COMMON_H
-
-+#include <sys/types.h>
- #include "config.h"
-
- /* for atomic_t */
diff --git a/package/osiris/patches/patch-src_libosiris_ssl_utilities_c b/package/osiris/patches/patch-src_libosiris_ssl_utilities_c
deleted file mode 100644
index 47563591b..000000000
--- a/package/osiris/patches/patch-src_libosiris_ssl_utilities_c
+++ /dev/null
@@ -1,30 +0,0 @@
-$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
---- osiris-4.2.3.orig/src/libosiris/ssl_utilities.c 2006-07-28 01:57:51.000000000 +0200
-+++ osiris-4.2.3/src/libosiris/ssl_utilities.c 2009-05-10 20:41:31.000000000 +0200
-@@ -51,7 +51,9 @@
- #include <openssl/rand.h>
- #include <openssl/md5.h>
- #include <openssl/sha.h>
-+#ifndef OPENSSL_NO_RIPEMD
- #include <openssl/ripemd.h>
-+#endif
-
- #ifdef WIN32
- #include <winsock.h>
-@@ -337,6 +339,7 @@ int hash_file_sha( const char *file_path
- return -1;
- }
-
-+#ifndef OPENSSL_NO_RIPEMD
- /******************************************************************************
- **
- ** Function: hash_file_ripemd
-@@ -433,7 +436,7 @@ int hash_file_ripemd( const char *file_p
-
- return -1;
- }
--
-+#endif
-
- /******************************************************************************
- **
diff --git a/package/osiris/patches/patch-src_libosiris_ssl_utilities_h b/package/osiris/patches/patch-src_libosiris_ssl_utilities_h
deleted file mode 100644
index 668096983..000000000
--- a/package/osiris/patches/patch-src_libosiris_ssl_utilities_h
+++ /dev/null
@@ -1,14 +0,0 @@
-$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
---- osiris-4.2.3.orig/src/libosiris/ssl_utilities.h 2006-07-28 01:57:51.000000000 +0200
-+++ osiris-4.2.3/src/libosiris/ssl_utilities.h 2009-05-10 20:42:04.000000000 +0200
-@@ -59,8 +59,10 @@ int hash_file_md5( const char *file_path
- int hash_file_sha( const char *file_path, FILE *file,
- char *buffer, int buffer_size );
-
-+#ifndef OPENSSL_NO_RIPEMD
- int hash_file_ripemd( const char *file_path, FILE *file,
- char *buffer, int buffer_size );
-+#endif
-
- /* random SSL utilities. */
-
diff --git a/package/osiris/patches/patch-src_libosiris_utilities_c b/package/osiris/patches/patch-src_libosiris_utilities_c
deleted file mode 100644
index ec5a26ee7..000000000
--- a/package/osiris/patches/patch-src_libosiris_utilities_c
+++ /dev/null
@@ -1,13 +0,0 @@
-$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
---- osiris-4.2.3.orig/src/libosiris/utilities.c 2006-07-28 01:57:51.000000000 +0200
-+++ osiris-4.2.3/src/libosiris/utilities.c 2009-05-10 20:37:18.000000000 +0200
-@@ -60,7 +60,9 @@
-
- #include <openssl/md5.h>
- #include <openssl/sha.h>
-+#ifndef OPENSSL_NO_RIPEMD
- #include <openssl/ripemd.h>
-+#endif
-
- #include "utilities.h"
- #include "error.h"
diff --git a/package/osiris/patches/patch-src_osirisd_modules_Makefile_am b/package/osiris/patches/patch-src_osirisd_modules_Makefile_am
deleted file mode 100644
index 332a866d5..000000000
--- a/package/osiris/patches/patch-src_osirisd_modules_Makefile_am
+++ /dev/null
@@ -1,11 +0,0 @@
---- osiris-4.2.3.orig/src/osirisd/modules/Makefile.am 2006-07-28 01:57:51.000000000 +0200
-+++ osiris-4.2.3/src/osirisd/modules/Makefile.am 2011-01-21 20:47:14.568658281 +0100
-@@ -11,7 +11,7 @@ INCLUDES = -I$(top_srcdir)/src \
- noinst_SCRIPTS = modules
-
- unused.o:
-- $(CC) -c unused.c
-+ $(CC) $(CFLAGS) -c unused.c
-
- libmodules_a_DEPENDENCIES = unused.o
-
diff --git a/package/osiris/patches/patch-src_osirisd_modules_Makefile_in b/package/osiris/patches/patch-src_osirisd_modules_Makefile_in
deleted file mode 100644
index 459702dec..000000000
--- a/package/osiris/patches/patch-src_osirisd_modules_Makefile_in
+++ /dev/null
@@ -1,11 +0,0 @@
---- osiris-4.2.3.orig/src/osirisd/modules/Makefile.in 2006-07-28 01:57:51.000000000 +0200
-+++ osiris-4.2.3/src/osirisd/modules/Makefile.in 2011-01-21 20:47:02.618658788 +0100
-@@ -254,7 +254,7 @@ uninstall-am: uninstall-info-am
-
-
- unused.o:
-- $(CC) -c unused.c
-+ $(CC) $(CFLAGS) -c unused.c
-
- modules:
- ./genmods.sh
diff --git a/package/osiris/patches/patch-src_osirisd_scanner_c b/package/osiris/patches/patch-src_osirisd_scanner_c
deleted file mode 100644
index ee3927bf0..000000000
--- a/package/osiris/patches/patch-src_osirisd_scanner_c
+++ /dev/null
@@ -1,33 +0,0 @@
-$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
---- osiris-4.2.3.orig/src/osirisd/scanner.c 2006-07-28 01:57:51.000000000 +0200
-+++ osiris-4.2.3/src/osirisd/scanner.c 2009-05-10 20:43:04.000000000 +0200
-@@ -839,12 +839,14 @@ void populate_scan_record( SCANNER *scan
- MAX_CHECKSUM_LENGTH );
- break;
-
-+#ifndef OPENSSL_NO_RIPEMD
- case HASH_RIPEMD:
-
- rc = hash_file_ripemd( scan_record->path, file_handle,
- scan_record->checksum,
- MAX_CHECKSUM_LENGTH );
- break;
-+#endif
-
- default:
-
-@@ -987,12 +989,14 @@ void populate_scan_record( SCANNER *scan
- MAX_CHECKSUM_LENGTH );
- break;
-
-+#ifndef OPENSSL_NO_RIPEMD
- case HASH_RIPEMD:
-
- rc = hash_file_ripemd( scan_record->path, file_handle,
- scan_record->checksum,
- MAX_CHECKSUM_LENGTH );
- break;
-+#endif
-
- default:
-
diff --git a/package/osiris/patches/patch-src_osirismd_md_control_c b/package/osiris/patches/patch-src_osirismd_md_control_c
deleted file mode 100644
index 0c33533c8..000000000
--- a/package/osiris/patches/patch-src_osirismd_md_control_c
+++ /dev/null
@@ -1,16 +0,0 @@
-$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
---- osiris-4.2.3.orig/src/osirismd/md_control.c 2006-12-05 13:02:48.000000000 +0100
-+++ osiris-4.2.3/src/osirismd/md_control.c 2009-05-10 21:28:06.000000000 +0200
-@@ -3259,9 +3259,9 @@ osi_bool generate_session_key_hash( unsi
- int index;
- char checksum[41];
-
-- SHA_Init( &context );
-- SHA_Update( &context, key, (unsigned long)keysize );
-- SHA_Final( &( digest[0] ), &context );
-+ SHA1_Init( &context );
-+ SHA1_Update( &context, key, (unsigned long)keysize );
-+ SHA1_Final( &( digest[0] ), &context );
-
- for ( index = 0; index < SHA_DIGEST_LENGTH; index++ )
- {
diff --git a/package/pcre/Makefile b/package/pcre/Makefile
index 12738c2cb..174315a81 100644
--- a/package/pcre/Makefile
+++ b/package/pcre/Makefile
@@ -4,9 +4,9 @@
include ${TOPDIR}/rules.mk
PKG_NAME:= pcre
-PKG_VERSION:= 8.31
-PKG_RELEASE:= 2
-PKG_MD5SUM:= fab1bb3b91a4c35398263a5c1e0858c1
+PKG_VERSION:= 8.34
+PKG_RELEASE:= 1
+PKG_MD5SUM:= eb34b2c9c727fd64940d6fd9a00995eb
PKG_DESCR:= a Perl Compatible Regular Expression library
PKG_SECTION:= libs
PKG_BUILDDEPS:= gettext-tiny
@@ -22,11 +22,15 @@ 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}
libpcre-install:
@@ -37,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/php/Makefile b/package/php/Makefile
index 0972517d5..b5cb01aac 100644
--- a/package/php/Makefile
+++ b/package/php/Makefile
@@ -4,9 +4,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:= php
-PKG_VERSION:= 5.5.10
+PKG_VERSION:= 5.5.11
PKG_RELEASE:= 1
-PKG_MD5SUM:= e760656f7cf2f05158f73da75e8b720b
+PKG_MD5SUM:= 9156fcd4b254cbfa9a7535f931da29d5
PKG_DESCR:= PHP language interpreter
PKG_SECTION:= lang
PKG_DEPENDS:= libpthread librt libgcc
diff --git a/package/pixman/Makefile b/package/pixman/Makefile
index 5cb1821d9..6d5cd5aec 100644
--- a/package/pixman/Makefile
+++ b/package/pixman/Makefile
@@ -4,10 +4,10 @@
include $(TOPDIR)/rules.mk
PKG_NAME:= pixman
-PKG_VERSION:= 0.30.0
-PKG_RELEASE:= 2
-PKG_MD5SUM:= ae7ac97921dfa59086ca2231621a79c7
-PKG_DESCR:= Pixel manipulation library
+PKG_VERSION:= 0.32.4
+PKG_RELEASE:= 1
+PKG_MD5SUM:= eba449138b972fbf4547a8c152fea162
+PKG_DESCR:= pixel manipulation library
PKG_SECTION:= x11/libs
PKG_BUILDDEP:= libpng
PKG_SITES:= http://www.cairographics.org/releases/
diff --git a/package/pixman/patches/patch-Makefile_in b/package/pixman/patches/patch-Makefile_in
new file mode 100644
index 000000000..cebc19113
--- /dev/null
+++ b/package/pixman/patches/patch-Makefile_in
@@ -0,0 +1,11 @@
+--- pixman-0.32.4.orig/Makefile.in 2013-11-18 03:11:20.000000000 +0100
++++ pixman-0.32.4/Makefile.in 2014-03-30 21:54:18.000000000 +0200
+@@ -369,7 +369,7 @@ target_alias = @target_alias@
+ top_build_prefix = @top_build_prefix@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+-SUBDIRS = pixman demos test
++SUBDIRS = pixman
+ pkgconfigdir = $(libdir)/pkgconfig
+ pkgconfig_DATA = pixman-1.pc
+ GPGKEY = 3892336E
diff --git a/package/pkgconf/Makefile b/package/pkgconf/Makefile
index b1131003a..8dbc5e32a 100644
--- a/package/pkgconf/Makefile
+++ b/package/pkgconf/Makefile
@@ -4,16 +4,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:= pkgconf
-PKG_VERSION:= 0.9.3
+PKG_VERSION:= 0.9.5
PKG_RELEASE:= 1
-PKG_MD5SUM:= 52c553bad686f8be1556b58bc1925f4f
+PKG_MD5SUM:= babb4e02f0fb8f4044ee95ad2241a676
PKG_DESCR:= smart pkg-config replacement
PKG_SECTION:= lang
PKG_URL:= https://github.com/pkgconf/pkgconf
PKG_SITES:= http://rabbit.dereferenced.org/~nenolod/distfiles/
-DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2
-
include $(TOPDIR)/mk/host.mk
include $(TOPDIR)/mk/package.mk
@@ -24,6 +22,7 @@ HOST_STYLE:= auto
hostpost-install:
(cd $(STAGING_HOST_DIR)/usr/bin && ln -sf pkgconf pkg-config)
+ (cd $(STAGING_HOST_DIR)/usr/bin && ln -sf pkgconf $(GNU_TARGET_NAME)-pkg-config)
pkgconf-install:
$(INSTALL_DIR) $(IDIR_PKGCONF)/usr/bin
diff --git a/package/postfix/Makefile b/package/postfix/Makefile
index e95cc4c9c..c68d69e91 100644
--- a/package/postfix/Makefile
+++ b/package/postfix/Makefile
@@ -4,9 +4,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:= postfix
-PKG_VERSION:= 2.10.2
+PKG_VERSION:= 2.11.0
PKG_RELEASE:= 1
-PKG_MD5SUM:= 109e753aecafe487207b425dd46e6ee9
+PKG_MD5SUM:= 25fe7dd05f81cc0755131beecee046fd
PKG_DESCR:= Postfix MTA
PKG_SECTION:= mail
PKG_BUILDDEP:= tinycdb
diff --git a/package/postfix/patches/patch-makedefs b/package/postfix/patches/patch-makedefs
index d39cec8a9..e4052d8dd 100644
--- a/package/postfix/patches/patch-makedefs
+++ b/package/postfix/patches/patch-makedefs
@@ -1,6 +1,6 @@
---- postfix-2.10.2.orig/makedefs 2013-02-04 02:33:13.000000000 +0100
-+++ postfix-2.10.2/makedefs 2013-10-10 16:28:03.000000000 +0200
-@@ -366,16 +366,7 @@ EOF
+--- postfix-2.11.0.orig/makedefs 2014-01-05 18:18:56.000000000 +0100
++++ postfix-2.11.0/makedefs 2014-03-25 08:55:06.000000000 +0100
+@@ -382,16 +382,7 @@ EOF
SYSLIBS="-ldb"
;;
esac
@@ -17,4 +17,4 @@
+ SYSLIBS="-lresolv"
;;
GNU.0*|GNU/kFreeBSD.[567]*)
- SYSTYPE=GNU0
+ SYSTYPE=GNU0
diff --git a/package/postfix/patches/patch-src_posttls-finger_posttls-finger_c b/package/postfix/patches/patch-src_posttls-finger_posttls-finger_c
new file mode 100644
index 000000000..6f0e74fab
--- /dev/null
+++ b/package/postfix/patches/patch-src_posttls-finger_posttls-finger_c
@@ -0,0 +1,10 @@
+--- postfix-2.11.0.orig/src/posttls-finger/posttls-finger.c 2013-12-16 17:06:33.000000000 +0100
++++ postfix-2.11.0/src/posttls-finger/posttls-finger.c 2014-03-25 08:58:04.000000000 +0100
+@@ -290,6 +290,7 @@
+ */
+ #include <sys_defs.h>
+ #include <stdarg.h>
++#include <stdio.h>
+ #include <string.h>
+ #include <ctype.h>
+ #include <stdlib.h>
diff --git a/package/postfix/patches/patch-src_util_sys_defs_h b/package/postfix/patches/patch-src_util_sys_defs_h
index ecc7fc219..85974664e 100644
--- a/package/postfix/patches/patch-src_util_sys_defs_h
+++ b/package/postfix/patches/patch-src_util_sys_defs_h
@@ -1,13 +1,21 @@
---- postfix-2.10.2.orig/src/util/sys_defs.h 2012-09-25 01:53:56.000000000 +0200
-+++ postfix-2.10.2/src/util/sys_defs.h 2013-10-10 16:30:37.000000000 +0200
-@@ -753,8 +753,8 @@ extern int initgroups(const char *, int)
- #define DEF_MAILBOX_LOCK "fcntl, dotlock" /* RedHat >= 4.x */
+--- postfix-2.11.0.orig/src/util/sys_defs.h 2013-09-29 22:51:55.000000000 +0200
++++ postfix-2.11.0/src/util/sys_defs.h 2014-03-26 19:38:02.000000000 +0100
+@@ -46,7 +46,7 @@
#define HAS_FSYNC
#define HAS_DB
--#define DEF_DB_TYPE "hash"
--#define ALIAS_DB_MAP "hash:/etc/aliases"
+ #define HAS_SA_LEN
+-#define NATIVE_DB_TYPE "hash"
++#define NATIVE_DB_TYPE "cdb"
+ #if (defined(__NetBSD_Version__) && __NetBSD_Version__ >= 104250000)
+ #define ALIAS_DB_MAP DEF_DB_TYPE ":/etc/mail/aliases" /* sendmail 8.10 */
+ #endif
+@@ -54,7 +54,8 @@
+ #define ALIAS_DB_MAP DEF_DB_TYPE ":/etc/mail/aliases" /* OpenBSD 2.7 */
+ #endif
+ #ifndef ALIAS_DB_MAP
+-#define ALIAS_DB_MAP DEF_DB_TYPE ":/etc/aliases"
+#define DEF_DB_TYPE "cdb"
-+#define ALIAS_DB_MAP "cdb:/etc/postfix/aliases"
- #ifndef NO_NIS
- #define HAS_NIS
++#define ALIAS_DB_MAP DEF_DB_TYPE ":/etc/postfix/aliases"
#endif
+ #define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0)
+ #define ROOT_PATH "/bin:/usr/bin:/sbin:/usr/sbin"
diff --git a/package/postgresql/Makefile b/package/postgresql/Makefile
index 34e75aea7..e1a101a4f 100644
--- a/package/postgresql/Makefile
+++ b/package/postgresql/Makefile
@@ -4,14 +4,14 @@
include ${TOPDIR}/rules.mk
PKG_NAME:= postgresql
-PKG_VERSION:= 9.1.1
-PKG_RELEASE:= 2
-PKG_MD5SUM:= 93b293bd735bb99258c1bad7bc9b8f6c
+PKG_VERSION:= 9.3.4
+PKG_RELEASE:= 1
+PKG_MD5SUM:= d9be740a612f8a0b9ea61dd524abfa4c
PKG_DESCR:= PostgreSQL database library
PKG_SECTION:= db
PKG_BUILDDEP:= zlib
PKG_URL:= http://www.postgresql.org/
-PKG_SITES:= http://ftp.postgresql.org/pub/source/v9.1.1/
+PKG_SITES:= http://ftp.postgresql.org/pub/source/v9.3.4/
PKG_LIBNAME:= libpq
PKG_OPTS:= dev
diff --git a/package/python2/Makefile b/package/python2/Makefile
index fe284da9d..b5aac2032 100644
--- a/package/python2/Makefile
+++ b/package/python2/Makefile
@@ -5,11 +5,12 @@ include ${TOPDIR}/rules.mk
PKG_NAME:= python2
PKG_VERSION:= 2.7.5
-PKG_RELEASE:= 11
+PKG_RELEASE:= 12
PKG_MD5SUM:= b4f01a1d0ba0b46b05c73b2ac909b1df
PKG_DESCR:= Python scripting language (Version 2)
PKG_SECTION:= lang
-PKG_BUILDDEP:= autotool libffi bzip2-host python2-host
+PKG_BUILDDEP:= libffi python2-host
+HOST_BUILDDEP:= libffi-host bzip2-host autotool
PKG_DEPENDS:= libpthread libffi libgcc
PKG_URL:= http://www.python.org/
PKG_SITES:= http://www.python.org/ftp/python/${PKG_VERSION}/
@@ -96,18 +97,20 @@ CONFIGURE_ARGS:= --with-threads \
--without-cxx-main
HOST_STYLE:= auto
-HOST_CONFIGURE_ARGS:= --with-threads \
+HOST_CONFIGURE_ARGS+= --with-threads \
--disable-ipv6 \
--disable-shared \
--disable-toolbox-glue \
--without-cxx-main
CFLAGS_FOR_BUILD+= -fPIC
-post-extract:
+hostpre-configure:
$(CP) $(TOPDIR)/package/python2/files/patch-Lib_distutils_sysconfig_py $(WRKBUILD)
$(SED) "s#@@STAGING_TARGET_DIR@@#$(STAGING_TARGET_DIR)#" $(WRKBUILD)/patch-Lib_distutils_sysconfig_py
$(SED) "s#@@STAGING_HOST_DIR@@#$(STAGING_HOST_DIR)#" $(WRKBUILD)/patch-Lib_distutils_sysconfig_py
- (cd $(WRKBUILD) && patch -p0 <$(WRKBUILD)/patch-Lib_distutils_sysconfig_py)
+ (cd $(WRKBUILD) && patch -p0 < patch-Lib_distutils_sysconfig_py)
+ $(SED) "s#@EXENAME@#$(STAGING_HOST_DIR)/usr/bin/python#" \
+ $(WRKBUILD)/Misc/python-config.in
hostpost-install:
$(INSTALL_BIN) ${WRKBUILD}/Parser/pgen \
@@ -119,6 +122,10 @@ hostpost-install:
patch -p0 < $(WRKBUILD)/python-config.patch)
pre-configure:
+ $(CP) $(TOPDIR)/package/python2/files/patch-Lib_distutils_sysconfig_py $(WRKBUILD)
+ $(SED) "s#@@STAGING_TARGET_DIR@@#$(STAGING_TARGET_DIR)#" $(WRKBUILD)/patch-Lib_distutils_sysconfig_py
+ $(SED) "s#@@STAGING_HOST_DIR@@#$(STAGING_HOST_DIR)#" $(WRKBUILD)/patch-Lib_distutils_sysconfig_py
+ (cd $(WRKBUILD) && patch -p0 <$(WRKBUILD)/patch-Lib_distutils_sysconfig_py)
$(SED) "s#@EXENAME@#$(STAGING_HOST_DIR)/usr/bin/python#" \
$(WRKBUILD)/Misc/python-config.in
diff --git a/package/python3/Makefile b/package/python3/Makefile
index 3d7158443..e939a9155 100644
--- a/package/python3/Makefile
+++ b/package/python3/Makefile
@@ -4,15 +4,16 @@
include ${TOPDIR}/rules.mk
PKG_NAME:= python3
-PKG_VERSION:= 3.3.2
-PKG_RELEASE:= 3
-PKG_MD5SUM:= 0a2ea57f6184baf45b150aee53c0c8da
+PKG_VERSION:= 3.4.0
+PKG_RELEASE:= 1
+PKG_MD5SUM:= 77c22725e14af3d71022cbfdebff4903
PKG_DESCR:= Python scripting language (Version 3)
PKG_SECTION:= lang
PKG_DEPENDS:= libpthread libgcc libffi
PKG_BUILDDEP:= python3-host libffi
+HOST_BUILDDEP:= libffi-host
PKG_URL:= http://www.python.org/
-PKG_SITES:= http://www.python.org/ftp/python/${PKG_VERSION}/
+PKG_SITES:= http://legacy.python.org/ftp/python/${PKG_VERSION}/
PKG_HOST_DEPENDS:= !netbsd !openbsd !cygwin
@@ -44,7 +45,7 @@ PKGFD_MOD_SSL:= OpenSSL support
PKGFB_MOD_SSL:= openssl
PKGFS_MOD_SSL:= libopenssl
-DISTFILES= Python-${PKG_VERSION}.tgz
+DISTFILES= Python-${PKG_VERSION}.tar.xz
WRKDIST= ${WRKDIR}/Python-${PKG_VERSION}
include ${TOPDIR}/mk/host.mk
@@ -55,9 +56,9 @@ define PKG_mod_template
INSTALL_MODS_$${ADK_PACKAGE_${1}}+= ${2}-install
${2}-install:
- ${INSTALL_DIR} $$(IDIR_$(1))/usr/lib/python3.3/lib-dynload
+ ${INSTALL_DIR} $$(IDIR_$(1))/usr/lib/python3.4/lib-dynload
for m in ${2}; do \
- ${INSTALL_DATA} $(WRKINST)/usr/lib/python3.3/lib-dynload/$$$${m}*.so $$(IDIR_$(1))/usr/lib/python3.3/lib-dynload ;\
+ ${INSTALL_DATA} $(WRKINST)/usr/lib/python3.4/lib-dynload/$$$${m}*.so $$(IDIR_$(1))/usr/lib/python3.4/lib-dynload ;\
done
endef
@@ -84,6 +85,7 @@ $(eval $(call PKG_mod_template,PYTHON3_MOD_SSL,_ssl))
$(eval $(call PKG_mod_template,PYTHON3_MOD_READLINE,readline))
MAKE_ENV+= HOSTPGEN=$(STAGING_HOST_DIR)/usr/bin/pgen3
+FAKE_FLAGS+= ENSUREPIP=no
CONFIGURE_ARGS:= --with-threads \
--with-system-ffi \
--with-system-expat \
@@ -97,21 +99,21 @@ HOST_STYLE:= auto
HOST_CONFIGURE_ARGS+= --without-cxx-main \
--with-threads
-hostpost-install:
- $(INSTALL_BIN) ${WRKBUILD}/Parser/pgen \
- $(STAGING_HOST_DIR)/usr/bin/pgen3
+#hostpost-install:
+# $(INSTALL_BIN) ${WRKBUILD}/Parser/pgen \
+# $(STAGING_HOST_DIR)/usr/bin/pgen3
python3-install: ${INSTALL_MODS_y} ${INSTALL_MODS_m}
${INSTALL_DIR} ${IDIR_PYTHON3}/usr/bin ${IDIR_PYTHON3}/usr/lib
- ${INSTALL_DIR} ${IDIR_PYTHON3}/usr/lib/python3.3
- ${INSTALL_DIR} ${IDIR_PYTHON3}/usr/include/python3.3m
+ ${INSTALL_DIR} ${IDIR_PYTHON3}/usr/lib/python3.4
+ ${INSTALL_DIR} ${IDIR_PYTHON3}/usr/include/python3.4m
${INSTALL_BIN} ${WRKINST}/usr/bin/python3 ${IDIR_PYTHON3}/usr/bin
${CP} ${WRKINST}/usr/lib/libpython*.so* ${IDIR_PYTHON3}/usr/lib
- ${CP} ${WRKINST}/usr/lib/python3.3/* ${IDIR_PYTHON3}/usr/lib/python3.3
- ${CP} ${WRKINST}/usr/include/python3.3m/pyconfig.h \
- ${IDIR_PYTHON3}/usr/include/python3.3m
+ ${CP} ${WRKINST}/usr/lib/python3.4/* ${IDIR_PYTHON3}/usr/lib/python3.4
+ ${CP} ${WRKINST}/usr/include/python3.4m/pyconfig.h \
+ ${IDIR_PYTHON3}/usr/include/python3.4m
@-for i in zlib _bz2 _curses _ssl _gdbm _sqlite pyexpat readline; do \
- rm ${IDIR_PYTHON3}/usr/lib/python3.3/lib-dynload/$${i}*so; \
+ rm ${IDIR_PYTHON3}/usr/lib/python3.4/lib-dynload/$${i}*so; \
done
include ${TOPDIR}/mk/host-bottom.mk
diff --git a/package/python3/patches/patch-Makefile_pre_in b/package/python3/patches/patch-Makefile_pre_in
deleted file mode 100644
index 5a4077eba..000000000
--- a/package/python3/patches/patch-Makefile_pre_in
+++ /dev/null
@@ -1,70 +0,0 @@
---- Python-3.3.2.orig/Makefile.pre.in 2013-05-15 18:32:57.000000000 +0200
-+++ Python-3.3.2/Makefile.pre.in 2013-10-29 07:56:46.000000000 +0100
-@@ -70,9 +70,9 @@ MAKESETUP= $(srcdir)/Modules/makese
- OPT= @OPT@
- BASECFLAGS= @BASECFLAGS@
- BASECPPFLAGS= @BASECPPFLAGS@
--CONFIGURE_CFLAGS= @CFLAGS@
--CONFIGURE_CPPFLAGS= @CPPFLAGS@
--CONFIGURE_LDFLAGS= @LDFLAGS@
-+CONFIGURE_CFLAGS=
-+CONFIGURE_CPPFLAGS=
-+CONFIGURE_LDFLAGS=
- # Avoid assigning CFLAGS, LDFLAGS, etc. so users can use them on the
- # command line to append to these values without stomping the pre-set
- # values.
-@@ -249,6 +249,7 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@
- ##########################################################################
- # Parser
- PGEN= Parser/pgen$(EXE)
-+HOSTPGEN?= ./Parser/pgen$(EXE)
-
- PSRCS= \
- Parser/acceler.c \
-@@ -493,7 +494,7 @@ sharedmods: $(BUILDPYTHON) pybuilddir.tx
- *) quiet="";; \
- esac; \
- $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
-- $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
-+ $(PYTHON_FOR_BUILD) $(srcdir)/setup.py build
-
- # Build static library
- # avoid long command lines, same as LIBRARY_OBJS
-@@ -669,7 +670,7 @@ $(IO_OBJS): $(IO_H)
- $(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGENSRCS)
- @$(MKDIR_P) Include
- $(MAKE) $(PGEN)
-- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
-+ $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
- $(GRAMMAR_C): $(GRAMMAR_H) $(GRAMMAR_INPUT) $(PGENSRCS)
- $(MAKE) $(GRAMMAR_H)
- touch $(GRAMMAR_C)
-@@ -1112,28 +1113,6 @@ libinstall: build_all $(srcdir)/Lib/$(PL
- $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
- $(DESTDIR)$(LIBDEST)/distutils/tests ; \
- fi
-- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
-- -d $(LIBDEST) -f \
-- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
-- $(DESTDIR)$(LIBDEST)
-- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
-- -d $(LIBDEST) -f \
-- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
-- $(DESTDIR)$(LIBDEST)
-- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
-- -d $(LIBDEST)/site-packages -f \
-- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
-- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
-- -d $(LIBDEST)/site-packages -f \
-- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
-- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
-- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
-
- # Create the PLATDIR source directory, if one wasn't distributed..
- $(srcdir)/Lib/$(PLATDIR):
diff --git a/package/python3/patches/patch-Modules_posixmodule_c b/package/python3/patches/patch-Modules_posixmodule_c
deleted file mode 100644
index 537958513..000000000
--- a/package/python3/patches/patch-Modules_posixmodule_c
+++ /dev/null
@@ -1,20 +0,0 @@
---- Python-3.3.2.orig/Modules/posixmodule.c 2013-05-15 18:32:59.000000000 +0200
-+++ Python-3.3.2/Modules/posixmodule.c 2014-01-06 18:59:54.000000000 +0100
-@@ -7679,7 +7679,7 @@ PyDoc_STRVAR(posix_close__doc__,
- Close a file descriptor (for low level IO).");
-
- static PyObject *
--posix_close(PyObject *self, PyObject *args)
-+posix_pyclose(PyObject *self, PyObject *args)
- {
- int fd, res;
- if (!PyArg_ParseTuple(args, "i:close", &fd))
-@@ -11082,7 +11082,7 @@ static PyMethodDef posix_methods[] = {
- {"open", (PyCFunction)posix_open,\
- METH_VARARGS | METH_KEYWORDS,
- posix_open__doc__},
-- {"close", posix_close, METH_VARARGS, posix_close__doc__},
-+ {"close", posix_pyclose, METH_VARARGS, posix_close__doc__},
- {"closerange", posix_closerange, METH_VARARGS, posix_closerange__doc__},
- {"device_encoding", device_encoding, METH_VARARGS, device_encoding__doc__},
- {"dup", posix_dup, METH_VARARGS, posix_dup__doc__},
diff --git a/package/qemu/Makefile b/package/qemu/Makefile
index 4c2067ac9..b4c20b14e 100644
--- a/package/qemu/Makefile
+++ b/package/qemu/Makefile
@@ -4,13 +4,15 @@
include $(TOPDIR)/rules.mk
PKG_NAME:= qemu
-PKG_VERSION:= 1.7.0
-PKG_RELEASE:= 1
-PKG_MD5SUM:= 32893941d40d052a5e649efcf06aca06
+PKG_VERSION:= 1.7.1
+PKG_RELEASE:= 2
+PKG_MD5SUM:= 9541063d999cf9659ed7fdce71314f31
PKG_DESCR:= cpu and system emulator
PKG_SECTION:= misc
-PKG_DEPENDS:= zlib libsdl libpng
-PKG_BUILDDEP:= gettext-tiny libiconv-tiny glib-host qemu-host zlib sdl libpng
+PKG_DEPENDS:= zlib glib
+PKG_BUILDDEP:= gettext-tiny libiconv-tiny
+PKG_BUILDDEP+= zlib glib
+HOST_BUILDDEP:= glib-host
PKG_URL:= http://wwww.qemu.org/
PKG_SITES:= http://wiki.qemu.org/download/
@@ -24,18 +26,23 @@ include $(TOPDIR)/mk/package.mk
$(eval $(call HOST_template,QEMU,qemu,$(PKG_VERSION)-${PKG_RELEASE}))
$(eval $(call PKG_template,QEMU,qemu,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
-TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS))
-TARGET_LDFLAGS+= -pthread -lm -lrt
+ifeq ($(ADK_TARGET_LIB_MUSL),y)
+TARGET_CFLAGS+= -DF_EXLCK=4 -DF_SHLCK=8 -D__SIGRTMIN=32 -D__SIGRTMAX=\(NSIG-1\)
+endif
CONFIG_STYLE:= minimal
CONFIGURE_ARGS+= --host-cc=$(CC_FOR_BUILD) \
+ --cross-prefix=$(GNU_TARGET_NAME)- \
--prefix=/usr \
--sysconfdir=/etc \
--enable-kvm \
--disable-docs \
+ --disable-sdl \
--bindir=/usr/bin
+CFLAGS_FOR_BUILD+= -DNATIVE
HOST_STYLE:= manual
HOST_CONFIGURE_ARGS+= --host-cc=$(CC_FOR_BUILD) \
+ --prefix=${STAGING_HOST_DIR}/usr \
--disable-docs \
--disable-werror \
--disable-system \
@@ -43,17 +50,17 @@ HOST_CONFIGURE_ARGS+= --host-cc=$(CC_FOR_BUILD) \
host-configure:
cd ${WRKBUILD}; rm -f config.{cache,status}; \
- env ${HOST_CONFIGURE_ENV} \
- ${BASH} ${WRKSRC}/${CONFIGURE_PROG} \
- ${HOST_CONFIGURE_ARGS} $(MAKE_TRACE)
+ env ${HOST_CONFIGURE_ENV} \
+ ${BASH} ${WRKSRC}/${CONFIGURE_PROG} \
+ ${HOST_CONFIGURE_ARGS} $(MAKE_TRACE)
host-build:
cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
- ${HOST_MAKE_FLAGS} ${HOST_ALL_TARGET} $(MAKE_TRACE)
-
+ ${HOST_MAKE_FLAGS} ${HOST_ALL_TARGET} $(MAKE_TRACE)
+
qemu-hostinstall:
cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
- DESTDIR='$(STAGING_HOST_DIR)' ${HOST_FAKE_FLAGS} ${HOST_INSTALL_TARGET} $(MAKE_TRACE)
+ ${HOST_FAKE_FLAGS} ${HOST_INSTALL_TARGET} $(MAKE_TRACE)
qemu-install:
$(INSTALL_DIR) $(IDIR_QEMU)/usr/share/qemu
diff --git a/package/qemu/patches/patch-linux-user_syscall_c b/package/qemu/patches/patch-linux-user_syscall_c
index 1eba70417..11188ca90 100644
--- a/package/qemu/patches/patch-linux-user_syscall_c
+++ b/package/qemu/patches/patch-linux-user_syscall_c
@@ -1,22 +1,35 @@
---- qemu-1.7.0.orig/linux-user/syscall.c 2013-11-27 23:15:55.000000000 +0100
-+++ qemu-1.7.0/linux-user/syscall.c 2014-01-31 09:51:34.051058876 +0100
-@@ -64,6 +64,7 @@ int __clone2(int (*fn)(void *), void *ch
+--- qemu-1.7.1.orig/linux-user/syscall.c 2014-03-25 15:01:10.000000000 +0100
++++ qemu-1.7.1/linux-user/syscall.c 2014-04-04 16:51:08.292546548 +0200
+@@ -63,6 +63,7 @@ int __clone2(int (*fn)(void *), void *ch
+ //#include <sys/user.h>
#include <netinet/ip.h>
#include <netinet/tcp.h>
- #include <linux/wireless.h>
+#include <linux/version.h>
+ #include <linux/wireless.h>
#include <linux/icmp.h>
#include "qemu-common.h"
- #ifdef TARGET_GPROF
-@@ -94,7 +95,11 @@ int __clone2(int (*fn)(void *), void *ch
+@@ -94,7 +95,15 @@ int __clone2(int (*fn)(void *), void *ch
#include <linux/utsname.h>
#include <linux/cdrom.h>
#include <linux/hdreg.h>
++#ifdef NATIVE
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(3,11,0)
#include <linux/soundcard.h>
+#else
+#include <linux/soundcard.h.oss3>
+#endif
++#else
++#include <linux/soundcard.h>
++#endif
#include <linux/kd.h>
#include <linux/mtio.h>
#include <linux/fs.h>
+@@ -400,7 +409,7 @@ static int sys_inotify_init1(int flags)
+ #endif
+ #define __NR_sys_ppoll __NR_ppoll
+ _syscall5(int, sys_ppoll, struct pollfd *, fds, nfds_t, nfds,
+- struct timespec *, timeout, const __sigset_t *, sigmask,
++ struct timespec *, timeout, const sigset_t *, sigmask,
+ size_t, sigsetsize)
+ #endif
+
diff --git a/package/qemu/patches/patch-util_qemu-openpty_c b/package/qemu/patches/patch-util_qemu-openpty_c
new file mode 100644
index 000000000..ed524628a
--- /dev/null
+++ b/package/qemu/patches/patch-util_qemu-openpty_c
@@ -0,0 +1,11 @@
+--- qemu-1.7.0.orig/util/qemu-openpty.c 2013-11-27 23:15:55.000000000 +0100
++++ qemu-1.7.0/util/qemu-openpty.c 2014-03-14 09:05:17.280258135 +0100
+@@ -35,7 +35,7 @@
+ #include "config-host.h"
+ #include "qemu-common.h"
+
+-#if defined(__GLIBC__)
++#if defined(__linux__)
+ # include <pty.h>
+ #elif defined CONFIG_BSD
+ # include <termios.h>
diff --git a/package/radvd/Makefile b/package/radvd/Makefile
index 1dd5b6ccf..dc927a628 100644
--- a/package/radvd/Makefile
+++ b/package/radvd/Makefile
@@ -4,9 +4,9 @@
include ${TOPDIR}/rules.mk
PKG_NAME:= radvd
-PKG_VERSION:= 1.9.7
+PKG_VERSION:= 1.10.0
PKG_RELEASE:= 1
-PKG_MD5SUM:= 85141c7dc7d35e5499e16052742f1040
+PKG_MD5SUM:= 5ef15bc6c8316dba02147065f8dfdad3
PKG_DESCR:= Routing Advertisement Daemon for IPv6
PKG_SECTION:= ipv6
PKG_DEPENDS:= kmod-ipv6 libdaemon
diff --git a/package/rdate/Makefile b/package/rdate/Makefile
index a37cbdfbc..30848af15 100644
--- a/package/rdate/Makefile
+++ b/package/rdate/Makefile
@@ -7,7 +7,7 @@ PKG_NAME:= rdate
PKG_VERSION:= 20070817
PKG_RELEASE:= 4
PKG_MD5SUM:= 9a6489d7de4311678a3fab001bb503df
-PKG_DESCR:= A small rdate and NTP client
+PKG_DESCR:= small rdate and NTP client
PKG_SECTION:= ntp
PKG_SITES:= ${MASTER_SITE_MIRBSD:distfiles/=dist/mir/rdate/}
diff --git a/package/rng-tools/Makefile b/package/rng-tools/Makefile
index 26ad29821..0daf65bf7 100644
--- a/package/rng-tools/Makefile
+++ b/package/rng-tools/Makefile
@@ -4,15 +4,16 @@
include $(TOPDIR)/rules.mk
PKG_NAME:= rng-tools
-PKG_VERSION:= 2
-PKG_RELEASE:= 2
-PKG_MD5SUM:= 63d503191eabed630324c104cc024475
-PKG_DESCR:= Daemon to use hardware random number generators.
+PKG_VERSION:= 4
+PKG_RELEASE:= 1
+PKG_MD5SUM:= ae89dbfcf08bdfbea19066cfbf599127
+PKG_DESCR:= daemon to use hardware random number generators.
PKG_SECTION:= crypto
PKG_URL:= http://gkernel.sourceforge.net/
PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=gkernel/}
-PKG_LIBC_DEPENDS:= glibc musl
+# argp.h required
+PKG_LIBC_DEPENDS:= glibc
include $(TOPDIR)/mk/package.mk
diff --git a/package/rrdcollect/Makefile b/package/rrdcollect/Makefile
index c437d5399..39a4d3b2a 100644
--- a/package/rrdcollect/Makefile
+++ b/package/rrdcollect/Makefile
@@ -4,15 +4,17 @@
include ${TOPDIR}/rules.mk
PKG_NAME:= rrdcollect
-PKG_VERSION:= 0.2.9
+PKG_VERSION:= 0.2.10
PKG_RELEASE:= 1
-PKG_MD5SUM:= 1e94eb0f8d55ebf0f042c10baebc2d3d
+PKG_MD5SUM:= 138e21fc9f2de0b8b6c89f1506394ef8
PKG_DESCR:= Round-Robin Database (RRD) collecting daemon
PKG_SECTION:= admin
PKG_DEPENDS:= librrd
PKG_BUILDDEP:= rrdtool
PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=rrdcollect/}
+DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2
+
ifneq (${ADK_PACKAGE_LIBRRD},)
RRDTOOL_LIBS:= -lart_lgpl_2 -lfreetype -lpng
endif
@@ -25,8 +27,8 @@ CONFIGURE_ENV+= LIBS="${RRDTOOL_LIBS} -lz" \
ac_cv_func_malloc_0_nonnull=yes
CONFIGURE_ARGS+= --enable-exec \
--without-rrdtool \
- --with-librrd \
- --without-libpcre
+ --without-libpcre \
+ --with-librrd
TARGET_CPPFLAGS+= -DSOCKET_COMM
rrdcollect-install:
diff --git a/package/samba/Makefile b/package/samba/Makefile
index 34cbeec8a..433aba3cd 100644
--- a/package/samba/Makefile
+++ b/package/samba/Makefile
@@ -20,6 +20,14 @@ PKGSS_SAMBA_CLIENT:= libreadline samba-lib
PKGSD_SAMBA_PASSWD:= SMB password utility
PKGSD_SAMBA_LIB:= SMB libraries
+PKG_FLAVOURS_SAMBA:= WITH_WINBIND WITH_LDAP
+PKGFD_WITH_WINBIND:= enable winbind support
+PKGFS_WITH_WINBIND:= libkrb5
+PKGFB_WITH_WINBIND:= krb5
+PKGFD_WITH_LDAP:= enable LDAP support
+PKGFS_WITH_LDAP:= libopenldap
+PKGFB_WITH_LDAP:= openldap
+
WRKSRC= ${WRKDIST}/source3
include ${TOPDIR}/mk/package.mk
@@ -29,9 +37,25 @@ $(eval $(call PKG_template,SAMBA_CLIENT,samba-client,${PKG_VERSION}-${PKG_RELEAS
$(eval $(call PKG_template,SAMBA_PASSWD,samba-passwd,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_SAMBA_PASSWD},${PKG_SECTION}))
$(eval $(call PKG_template,SAMBA_LIB,samba-lib,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_SAMBA_LIB},${PKG_SECTION}))
-#TARGET_LDFLAGS+= -Wl,-rpath -Wl,/usr/lib/samba
+ifneq ($(ADK_PACKAGE_SAMBA_WITH_WINBIND),)
+CONFIGURE_ARGS+= --with-winbind \
+ --with-krb5="$(STAGING_TARGET_DIR)/usr"
+else
+CONFIGURE_ARGS+= --without-winbind
+endif
+
+ifneq ($(ADK_PACKAGE_SAMBA_WITH_LDAP),)
+CONFIGURE_ARGS+= --with-ldap
+else
+CONFIGURE_ARGS+= --with-ldap=no
+endif
+
CONFIGURE_ENV+= samba_cv_CC_NEGATIVE_ENUM_VALUES=no \
samba_cv_USE_SETRESUID=no \
+ samba_cv_HAVE_WRFILE_KEYTAB=yes \
+ ac_cv_func_ext_krb5_enctype_to_string=yes \
+ smb_krb5_cv_enctype_to_string_takes_krb5_context_arg=yes \
+ smb_krb5_cv_enctype_to_string_takes_size_t_arg=no \
ac_cv_lib_ext_nsl_connect=no \
ac_cv_search_yp_get_default_domain=no \
ac_cv_lib_ext_nsl_gethostbyname=no \
@@ -44,12 +68,10 @@ CONFIGURE_ARGS+= --libdir=/usr/lib \
--with-privatedir=/etc/samba \
--with-libiconv=/dev/null \
--with-syslog \
- --without-winbind \
--disable-cups \
--disable-swat \
--disable-avahi \
--with-utmp=no \
- --with-ldap=no \
--without-cluster-support \
--without-sendfile-support
diff --git a/package/scons/Makefile b/package/scons/Makefile
index d379eb8a4..5f2e3b7c3 100644
--- a/package/scons/Makefile
+++ b/package/scons/Makefile
@@ -5,11 +5,11 @@ include $(TOPDIR)/rules.mk
PKG_NAME:= scons
PKG_VERSION:= 2.3.0
-PKG_RELEASE:= 1
+PKG_RELEASE:= 2
PKG_MD5SUM:= 083ce5624d6adcbdaf2526623f456ca9
PKG_DESCR:= a software construction tool
PKG_SECTION:= lang
-HOST_BUILDDEP:= bzip2-host python2-host
+HOST_BUILDDEP:= python2-host
PKG_URL:= http://www.scons.org
PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=scons/}
@@ -23,7 +23,8 @@ $(eval $(call HOST_template,SCONS,scons,$(PKG_VERSION)-${PKG_RELEASE}))
HOST_STYLE:= manual
scons-hostinstall:
- (cd $(WRKBUILD); PATH='$(TARGET_PATH)' python setup.py install --prefix=$(STAGING_HOST_DIR)/)
+ (cd $(WRKBUILD); PATH='$(HOST_PATH)' python setup.py install \
+ --prefix=$(STAGING_HOST_DIR)/usr)
include ${TOPDIR}/mk/host-bottom.mk
include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/shat/Makefile b/package/shat/Makefile
index a28087c75..3bc6fc9ff 100644
--- a/package/shat/Makefile
+++ b/package/shat/Makefile
@@ -7,10 +7,12 @@ PKG_NAME:= shat
PKG_VERSION:= 0.9.7
PKG_RELEASE:= 1
PKG_MD5SUM:= da06846f35838b14d1513523dad84d24
-PKG_DESCR:= Source Hardware Address Translation - a tool for nomadic routing
+PKG_DESCR:= a tool for nomadic routing
PKG_SECTION:= net/misc
PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=shat/}
+PKG_LIBC_DEPENDS:= uclibc glibc
+
include ${TOPDIR}/mk/package.mk
$(eval $(call PKG_template,SHAT,shat,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
diff --git a/package/siproxd/Makefile b/package/siproxd/Makefile
index 34c835f30..2ece50985 100644
--- a/package/siproxd/Makefile
+++ b/package/siproxd/Makefile
@@ -4,13 +4,13 @@
include ${TOPDIR}/rules.mk
PKG_NAME:= siproxd
-PKG_VERSION:= 0.7.1
+PKG_VERSION:= 0.8.1
PKG_RELEASE:= 1
-PKG_MD5SUM:= 45e5a44803181e2bf3361d562060c904
+PKG_MD5SUM:= 1a6f9d13aeb2d650375c9a346ac6cbaf
PKG_DESCR:= a SIP (Session Initiation Protocol) proxy
PKG_SECTION:= proxy
PKG_DEPENDS:= libosip2 libpthread
-PKG_BUILDDEP:= libosip2
+PKG_BUILDDEP:= autotool libosip2
PKG_URL:= http://siproxd.sourceforge.net
PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=siproxd/}
@@ -18,6 +18,8 @@ include ${TOPDIR}/mk/package.mk
$(eval $(call PKG_template,SIPROXD,siproxd,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+AUTOTOOL_STYLE:= autoreconf
+
siproxd-install:
${INSTALL_DIR} ${IDIR_SIPROXD}/usr/sbin ${IDIR_SIPROXD}/etc
${INSTALL_DATA} ${WRKINST}/etc/siproxd.conf.example \
diff --git a/package/siproxd/patches/patch-libltdl_ltmain_sh b/package/siproxd/patches/patch-libltdl_ltmain_sh
deleted file mode 100644
index 84bfc305b..000000000
--- a/package/siproxd/patches/patch-libltdl_ltmain_sh
+++ /dev/null
@@ -1,11 +0,0 @@
---- siproxd-0.7.1.orig/libltdl/ltmain.sh 2008-02-02 18:16:31.000000000 +0100
-+++ siproxd-0.7.1/libltdl/ltmain.sh 2011-01-17 12:14:25.000000000 +0100
-@@ -1298,7 +1298,7 @@ EOF
- # but this is not reliable with gcc because gcc may use -mfoo to
- # select a different linker, different libraries, etc, while
- # -Wl,-mfoo simply passes -mfoo to the linker.
-- -m*)
-+ -m*|-fstack-protector*|-flto)
- # Unknown arguments in both finalize_command and compile_command need
- # to be aesthetically quoted because they are evaled later.
- arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
diff --git a/package/siproxd/patches/patch-scripts_ltmain_sh b/package/siproxd/patches/patch-scripts_ltmain_sh
deleted file mode 100644
index 79b49713d..000000000
--- a/package/siproxd/patches/patch-scripts_ltmain_sh
+++ /dev/null
@@ -1,11 +0,0 @@
---- siproxd-0.7.1.orig/scripts/ltmain.sh 2008-01-27 17:35:27.000000000 +0100
-+++ siproxd-0.7.1/scripts/ltmain.sh 2011-01-17 12:17:22.000000000 +0100
-@@ -1301,7 +1301,7 @@ EOF
- # but this is not reliable with gcc because gcc may use -mfoo to
- # select a different linker, different libraries, etc, while
- # -Wl,-mfoo simply passes -mfoo to the linker.
-- -m*)
-+ -m*|-fstack-protector*|-flto)
- # Unknown arguments in both finalize_command and compile_command need
- # to be aesthetically quoted because they are evaled later.
- arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
diff --git a/package/siproxd/patches/patch-src_resolve_c b/package/siproxd/patches/patch-src_resolve_c
new file mode 100644
index 000000000..aaa381969
--- /dev/null
+++ b/package/siproxd/patches/patch-src_resolve_c
@@ -0,0 +1,10 @@
+--- siproxd-0.8.1.orig/src/resolve.c 2011-05-28 17:47:15.000000000 +0200
++++ siproxd-0.8.1/src/resolve.c 2014-03-26 18:37:07.000000000 +0100
+@@ -20,6 +20,7 @@
+
+ #include "config.h"
+
++#include <sys/types.h>
+ #include <arpa/inet.h>
+ #include <netinet/in.h>
+
diff --git a/package/socat/Makefile b/package/socat/Makefile
index 4969a6d85..9311ddbcb 100644
--- a/package/socat/Makefile
+++ b/package/socat/Makefile
@@ -4,9 +4,9 @@
include ${TOPDIR}/rules.mk
PKG_NAME:= socat
-PKG_VERSION:= 1.7.2.3
+PKG_VERSION:= 1.7.2.4
PKG_RELEASE:= 1
-PKG_MD5SUM:= 6943f7a5e1ffd553ad2a900bbf05b83a
+PKG_MD5SUM:= 2a15dc3362f49d543abdbacc267d0a41
PKG_DESCR:= A multipurpose relay (SOcket CAT)
PKG_SECTION:= net/misc
PKG_DEPENDS:= libpthread
@@ -22,7 +22,7 @@ include ${TOPDIR}/mk/package.mk
$(eval $(call PKG_template,SOCAT,socat,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
-CONFIGURE_ENV+= sc_cv_termios_ispeed="no" \
+CONFIGURE_ENV+= sc_cv_termios_ispeed=no \
sc_cv_sys_crdly_shift=9 \
sc_cv_sys_tabdly_shift=11 \
sc_cv_sys_csize_shift=4
diff --git a/package/socat/patches/501-honor_ldflags.patch b/package/socat/patches/patch-Makefile_in
index 87c777067..e8e979607 100644
--- a/package/socat/patches/501-honor_ldflags.patch
+++ b/package/socat/patches/patch-Makefile_in
@@ -1,6 +1,5 @@
-diff -ruN socat-1.4-old/Makefile.in socat-1.4-new/Makefile.in
---- socat-1.7.2.2.orig/Makefile.in 2011-12-06 08:45:03.000000000 +0100
-+++ socat-1.7.2.2/Makefile.in 2013-12-24 16:37:21.000000000 +0100
+--- socat-1.7.2.4.orig/Makefile.in 2014-03-09 15:48:44.000000000 +0100
++++ socat-1.7.2.4/Makefile.in 2014-03-22 12:13:46.000000000 +0100
@@ -38,7 +38,8 @@ INSTALL = @INSTALL@
#0 CFLAGS = @CFLAGS@ $(CCOPTS) $(DEFS) $(INCLS)
diff --git a/package/socat/patches/patch-configure b/package/socat/patches/patch-configure
new file mode 100644
index 000000000..75b014290
--- /dev/null
+++ b/package/socat/patches/patch-configure
@@ -0,0 +1,23 @@
+--- socat-1.7.2.4.orig/configure 2014-03-09 20:57:51.000000000 +0100
++++ socat-1.7.2.4/configure 2014-03-22 12:20:13.000000000 +0100
+@@ -3347,18 +3347,8 @@ fi
+ # fail
+
+
+-
+-if test "$CC" = "gcc"; then
+- CFLAGS="$CFLAGS -D_GNU_SOURCE -Wall -Wno-parentheses"
+- ERRONWARN="-Werror -O0"
+-elif test "$CC" = "clang"; then
+- CFLAGS="$CFLAGS -D_GNU_SOURCE -Wall -Wno-parentheses"
+- ERRONWARN="-Werror -O0"
+-#elif Sun Studio
+-# ERRONWARN="-errwarn"
+-else
+- ERRONWARN=
+-fi
++CFLAGS="$CFLAGS -D_GNU_SOURCE -Wall -Wno-parentheses"
++ERRONWARN="-Werror -O0"
+ export CFLAGS
+
+
diff --git a/package/sox/Makefile b/package/sox/Makefile
index 2f5436146..af30a9199 100644
--- a/package/sox/Makefile
+++ b/package/sox/Makefile
@@ -4,10 +4,10 @@
include $(TOPDIR)/rules.mk
PKG_NAME:= sox
-PKG_VERSION:= 14.3.2
-PKG_RELEASE:= 1
-PKG_MD5SUM:= e9d35cf3b0f8878596e0b7c49f9e8302
-PKG_DESCR:= Swiss Army knife of sound processing programs
+PKG_VERSION:= 14.4.1
+PKG_RELEASE:= 2
+PKG_MD5SUM:= 670307f40763490a2bc0d1f322071e7a
+PKG_DESCR:= swiss army knife of sound processing programs
PKG_SECTION:= multimedia
PKG_BUILDDEP:= zlib libmad lame alsa-lib libid3tag
PKG_DEPENDS:= zlib libmad liblame alsa-lib libid3tag
diff --git a/package/sox/patches/patch-ltmain_sh b/package/sox/patches/patch-ltmain_sh
deleted file mode 100644
index 722e3e762..000000000
--- a/package/sox/patches/patch-ltmain_sh
+++ /dev/null
@@ -1,11 +0,0 @@
---- sox-14.3.2.orig/ltmain.sh 2011-01-04 06:04:29.000000000 +0100
-+++ sox-14.3.2/ltmain.sh 2011-03-06 00:04:37.000000000 +0100
-@@ -5091,7 +5091,7 @@ func_mode_link ()
- # @file GCC response files
- # -tp=* Portland pgcc target processor selection
- -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
-- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*)
-+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|-fstack-protector*|-flto*)
- func_quote_for_eval "$arg"
- arg="$func_quote_for_eval_result"
- func_append compile_command " $arg"
diff --git a/package/sox/patches/patch-src_formats_c b/package/sox/patches/patch-src_formats_c
index fc298ba8e..8ad23c63b 100644
--- a/package/sox/patches/patch-src_formats_c
+++ b/package/sox/patches/patch-src_formats_c
@@ -1,20 +1,20 @@
---- sox-14.3.1.orig/src/formats.c 2010-01-02 01:07:28.000000000 +0100
-+++ sox-14.3.1/src/formats.c 2011-03-01 22:15:05.000000000 +0100
-@@ -399,7 +399,7 @@ static void UNUSED rewind_pipe(FILE * fp
+--- sox-14.4.1.orig/src/formats.c 2013-01-13 20:57:39.000000000 +0100
++++ sox-14.4.1/src/formats.c 2014-03-29 15:00:39.000000000 +0100
+@@ -409,7 +409,7 @@ static void UNUSED rewind_pipe(FILE * fp
#if defined _FSTDIO || defined _NEWLIB_VERSION || defined __APPLE__
- fp->_p -= AUTO_DETECT_SIZE;
- fp->_r += AUTO_DETECT_SIZE;
+ fp->_p -= PIPE_AUTO_DETECT_SIZE;
+ fp->_r += PIPE_AUTO_DETECT_SIZE;
-#elif defined __GLIBC__
+#elif defined __GLIBC__ && ! defined __UCLIBC__
fp->_IO_read_ptr = fp->_IO_read_base;
- #elif defined _MSC_VER || defined __MINGW_H || defined _ISO_STDIO_ISO_H
+ #elif defined _MSC_VER || defined _WIN32 || defined _WIN64 || defined _ISO_STDIO_ISO_H
fp->_ptr = fp->_base;
-@@ -407,7 +407,7 @@ static void UNUSED rewind_pipe(FILE * fp
+@@ -417,7 +417,7 @@ static void UNUSED rewind_pipe(FILE * fp
/* To fix this #error, either simply remove the #error line and live without
* file-type detection with pipes, or add support for your compiler in the
- * lines above. Test with cat monkey.au | ./sox --info - */
+ * lines above. Test with cat monkey.wav | ./sox --info - */
- #error FIX NEEDED HERE
-+/* #error FIX NEEDED HERE */
++ //#error FIX NEEDED HERE
#define NO_REWIND_PIPE
(void)fp;
#endif
diff --git a/package/squashfs/Makefile b/package/squashfs/Makefile
new file mode 100644
index 000000000..8478f6c57
--- /dev/null
+++ b/package/squashfs/Makefile
@@ -0,0 +1,38 @@
+# 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
+HOST_BUILDDEP:= xz-host
+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/squid/Makefile b/package/squid/Makefile
index f8e6aaf72..d3471bdce 100644
--- a/package/squid/Makefile
+++ b/package/squid/Makefile
@@ -5,7 +5,7 @@ include ${TOPDIR}/rules.mk
PKG_NAME:= squid
PKG_VERSION:= 3.4.4
-PKG_RELEASE:= 2
+PKG_RELEASE:= 3
PKG_MD5SUM:= b36ab3696485a86b43d9194ac9b6b7fe
PKG_DESCR:= squid web and cache proxy
PKG_SECTION:= proxy
diff --git a/package/squid/patches/patch-lib_rfcnb_rfcnb-io_c b/package/squid/patches/patch-lib_rfcnb_rfcnb-io_c
new file mode 100644
index 000000000..32faad55f
--- /dev/null
+++ b/package/squid/patches/patch-lib_rfcnb_rfcnb-io_c
@@ -0,0 +1,11 @@
+--- squid-3.4.4.orig/lib/rfcnb/rfcnb-io.c 2014-03-09 10:40:56.000000000 +0100
++++ squid-3.4.4/lib/rfcnb/rfcnb-io.c 2014-03-27 09:28:30.000000000 +0100
+@@ -30,7 +30,7 @@
+ #include "rfcnb/rfcnb-util.h"
+ #include "rfcnb/std-includes.h"
+ #include <sys/uio.h>
+-#include <sys/signal.h>
++#include <signal.h>
+
+ #if HAVE_STRING_H
+ #include <string.h>
diff --git a/package/sudo/Makefile b/package/sudo/Makefile
index bc1ba138d..ea4bb908c 100644
--- a/package/sudo/Makefile
+++ b/package/sudo/Makefile
@@ -4,9 +4,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:= sudo
-PKG_VERSION:= 1.7.4p4
+PKG_VERSION:= 1.8.10
PKG_RELEASE:= 2
-PKG_MD5SUM:= 55d9906535d70a1de347cd3d3550ee87
+PKG_MD5SUM:= 954d64906c3f6e2436f33445a049c58b
PKG_DESCR:= su do
PKG_SECTION:= admin
PKG_URL:= http://www.courtesan.com/sudo/
@@ -16,9 +16,16 @@ include $(TOPDIR)/mk/package.mk
$(eval $(call PKG_template,SUDO,sudo,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+CPPFLAGS_FOR_BUILD+= -I../ -I../include
CONFIGURE_ARGS+= --without-pam \
- --with-env-editor \
- --with-timedir=/var/run
+ --without-sendmail \
+ --with-env-editor
+
+ifeq ($(ADK_TOOLCHAIN_USE_SSP),y)
+CONFIGURE_ARGS+= --enable-hardening
+else
+CONFIGURE_ARGS+= --disable-hardening
+endif
sudo-install:
$(INSTALL_DIR) $(IDIR_SUDO)/usr/bin
diff --git a/package/sudo/patches/patch-compat_Makefile_in b/package/sudo/patches/patch-compat_Makefile_in
new file mode 100644
index 000000000..e52c8a62c
--- /dev/null
+++ b/package/sudo/patches/patch-compat_Makefile_in
@@ -0,0 +1,15 @@
+--- sudo-1.8.10.orig/compat/Makefile.in 2014-03-07 22:51:19.000000000 +0100
++++ sudo-1.8.10/compat/Makefile.in 2014-03-24 15:58:28.000000000 +0100
+@@ -96,10 +96,10 @@ signame.c: mksigname
+ ./mksigname > $@
+
+ mksiglist: $(srcdir)/mksiglist.c $(srcdir)/mksiglist.h $(incdir)/missing.h $(top_builddir)/config.h
+- $(CC) $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/mksiglist.c -o $@
++ $(CC_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/mksiglist.c -o $@
+
+ mksigname: $(srcdir)/mksigname.c $(srcdir)/mksigname.h $(incdir)/missing.h $(top_builddir)/config.h
+- $(CC) $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/mksigname.c -o $@
++ $(CC_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/mksigname.c -o $@
+
+ fnm_test: fnm_test.o libreplace.la
+ $(LIBTOOL) --mode=link $(CC) -o $@ fnm_test.o libreplace.la $(PIE_LDFLAGS) $(SSP_LDFLAGS)
diff --git a/package/sudo/patches/patch-plugins_sudoers_match_c b/package/sudo/patches/patch-plugins_sudoers_match_c
new file mode 100644
index 000000000..57c49e55b
--- /dev/null
+++ b/package/sudo/patches/patch-plugins_sudoers_match_c
@@ -0,0 +1,54 @@
+--- sudo-1.8.10.orig/plugins/sudoers/match.c 2014-03-07 22:51:19.000000000 +0100
++++ sudo-1.8.10/plugins/sudoers/match.c 2014-03-24 16:16:24.000000000 +0100
+@@ -122,10 +122,12 @@ userlist_matches(const struct passwd *pw
+ case ALL:
+ matched = !m->negated;
+ break;
++#if 0
+ case NETGROUP:
+ if (netgr_matches(m->name, NULL, NULL, pw->pw_name))
+ matched = !m->negated;
+ break;
++#endif
+ case USERGROUP:
+ if (usergr_matches(m->name, pw->pw_name, pw))
+ matched = !m->negated;
+@@ -178,10 +180,12 @@ runaslist_matches(const struct member_li
+ case ALL:
+ user_matched = !m->negated;
+ break;
++#if 0
+ case NETGROUP:
+ if (netgr_matches(m->name, NULL, NULL, runas_pw->pw_name))
+ user_matched = !m->negated;
+ break;
++#endif
+ case USERGROUP:
+ if (usergr_matches(m->name, runas_pw->pw_name, runas_pw))
+ user_matched = !m->negated;
+@@ -278,10 +282,12 @@ hostlist_matches(const struct member_lis
+ case ALL:
+ matched = !m->negated;
+ break;
++#if 0
+ case NETGROUP:
+ if (netgr_matches(m->name, user_runhost, user_srunhost, NULL))
+ matched = !m->negated;
+ break;
++#endif
+ case NTWKADDR:
+ if (addr_matches(m->name))
+ matched = !m->negated;
+@@ -930,6 +936,7 @@ sudo_getdomainname(void)
+ * else return false. Either of "lhost", "shost" or "user" may be NULL
+ * in which case that argument is not checked...
+ */
++#if 0
+ bool
+ netgr_matches(const char *netgr, const char *lhost, const char *shost, const char *user)
+ {
+@@ -972,3 +979,4 @@ netgr_matches(const char *netgr, const c
+
+ debug_return_bool(rc);
+ }
++#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/tcl/Makefile b/package/tcl/Makefile
index df231ffdc..9a01a2978 100644
--- a/package/tcl/Makefile
+++ b/package/tcl/Makefile
@@ -4,9 +4,9 @@
include ${TOPDIR}/rules.mk
PKG_NAME:= tcl
-PKG_VERSION:= 8.5.9
-PKG_RELEASE:= 2
-PKG_MD5SUM:= 8512d8db3233041dd68a81476906012a
+PKG_VERSION:= 8.6.1
+PKG_RELEASE:= 1
+PKG_MD5SUM:= aae4b701ee527c6e4e1a6f9c7399882e
PKG_DESCR:= TCL scripting language
PKG_SECTION:= lang
PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=tcl/}
@@ -35,6 +35,6 @@ tcl-install:
cd ${IDIR_TCL}/usr/bin && ln -sf tclsh8.5 tclsh
${CP} ${WRKINST}/usr/lib/*.so* ${IDIR_TCL}/usr/lib
${CP} ${WRKINST}/usr/lib/tcl8 ${IDIR_TCL}/usr/lib
- ${CP} ${WRKINST}/usr/lib/tcl8.5 ${IDIR_TCL}/usr/lib
+ ${CP} ${WRKINST}/usr/lib/tcl8.6 ${IDIR_TCL}/usr/lib
include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/tcl/patches/patch-unix_Makefile_in b/package/tcl/patches/patch-unix_Makefile_in
deleted file mode 100644
index 38340c80b..000000000
--- a/package/tcl/patches/patch-unix_Makefile_in
+++ /dev/null
@@ -1,21 +0,0 @@
---- tcl8.5.9.orig/unix/Makefile.in 2010-09-08 19:40:48.000000000 +0200
-+++ tcl8.5.9/unix/Makefile.in 2014-01-20 11:13:05.000000000 +0100
-@@ -101,7 +101,8 @@ CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@
- #CFLAGS = $(CFLAGS_DEBUG)
- #CFLAGS = $(CFLAGS_OPTIMIZE)
- #CFLAGS = $(CFLAGS_DEBUG) $(CFLAGS_OPTIMIZE)
--CFLAGS = @CFLAGS_DEFAULT@ @CFLAGS@
-+#CFLAGS = @CFLAGS_DEFAULT@ @CFLAGS@
-+CFLAGS = @CFLAGS@
-
- # Flags to pass to the linker
- LDFLAGS_DEBUG = @LDFLAGS_DEBUG@
-@@ -737,7 +738,7 @@ install-binaries: binaries
- fi
- @EXTRA_INSTALL_BINARIES@
-
--install-libraries: libraries $(INSTALL_TZDATA) install-msgs
-+install-libraries: libraries
- @for i in "$(INCLUDE_INSTALL_DIR)" "$(SCRIPT_INSTALL_DIR)"; \
- do \
- if [ ! -d "$$i" ] ; then \
diff --git a/package/tinyproxy/Makefile b/package/tinyproxy/Makefile
index 1de352fc3..624e9ef3f 100644
--- a/package/tinyproxy/Makefile
+++ b/package/tinyproxy/Makefile
@@ -4,31 +4,21 @@
include ${TOPDIR}/rules.mk
PKG_NAME:= tinyproxy
-PKG_VERSION:= 1.6.5
+PKG_VERSION:= 1.8.3
PKG_RELEASE:= 2
-PKG_MD5SUM:= 2b2862ba33d2939e4572688d442ba415
-PKG_DESCR:= Tinyproxy is a lightweight HTTP and HTTPS proxy.
+PKG_MD5SUM:= eca927f7f6a9ce8394b2b256361978a7
+PKG_DESCR:= lightweight HTTP and HTTPS proxy
+PKG_BUILDDEP:= autotool
PKG_SECTION:= proxy
PKG_URL:= https://www.banu.com/tinyproxy/
-PKG_SITES:= https://www.banu.com/pub/tinyproxy/1.6/
+PKG_SITES:= https://www.banu.com/pub/tinyproxy/1.8/
include ${TOPDIR}/mk/package.mk
$(eval $(call PKG_template,TINYPROXY,tinyproxy,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
-CONFIGURE_ENV+= ac_cv_header_libintl_h=no \
- ac_cv_lib_nsl_gethostbyaddr=no \
- ac_cv_lib_nsl_gethostname=no
-
-ifeq (${ADK_COMPILE_TINYPROXY_WITH_TRANSPARENT_PROXY},y)
-CONFIGURE_ARGS+= --enable-transparent-proxy
-endif
-ifneq (${ADK_COMPILE_TINYPROXY_WITH_UPSTREAM},y)
-CONFIGURE_ARGS+= --disable-upstream
-endif
-ifneq (${ADK_COMPILE_TINYPROXY_WITH_FILTER},y)
-CONFIGURE_ARGS+= --disable-filter
-endif
+AUTOTOOL_STYLE:= autoreconf
+CONFIGURE_ARGS+= --disable-regexcheck
tinyproxy-install:
${INSTALL_DIR} ${IDIR_TINYPROXY}/usr/sbin \
@@ -44,7 +34,5 @@ tinyproxy-install:
${IDIR_TINYPROXY}/usr/share/tinyproxy/
${INSTALL_DATA} ${WRKINST}/usr/share/tinyproxy/stats.html \
${IDIR_TINYPROXY}/usr/share/tinyproxy/
- ${INSTALL_DATA} ${WRKINST}/usr/share/tinyproxy/HTML_VARIABLES \
- ${IDIR_TINYPROXY}/usr/share/tinyproxy/
include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/tinyproxy/patches/patch-Makefile_am b/package/tinyproxy/patches/patch-Makefile_am
new file mode 100644
index 000000000..443ae2e78
--- /dev/null
+++ b/package/tinyproxy/patches/patch-Makefile_am
@@ -0,0 +1,10 @@
+--- tinyproxy-1.8.3.orig/Makefile.am 2011-08-16 14:14:34.000000000 +0200
++++ tinyproxy-1.8.3/Makefile.am 2014-04-07 08:43:20.000000000 +0200
+@@ -2,7 +2,6 @@ SUBDIRS = \
+ src \
+ data \
+ etc \
+- docs \
+ m4macros \
+ tests
+
diff --git a/package/tinyproxy/patches/patch-configure b/package/tinyproxy/patches/patch-configure
deleted file mode 100644
index d332d18ae..000000000
--- a/package/tinyproxy/patches/patch-configure
+++ /dev/null
@@ -1,24 +0,0 @@
---- tinyproxy-1.6.5.orig/configure 2009-09-29 05:28:04.000000000 +0200
-+++ tinyproxy-1.6.5/configure 2009-11-15 21:05:10.000000000 +0100
-@@ -5162,9 +5162,9 @@ _ACEOF
- fi
-
- # Check whether --enable-static was given.
--if test "${enable_static+set}" = set; then
-- enableval=$enable_static; LDFLAGS="-static $LDFLAGS"
--fi
-+#if test "${enable_static+set}" = set; then
-+# enableval=$enable_static; LDFLAGS="-static $LDFLAGS"
-+#fi
-
-
-
-@@ -10015,7 +10015,7 @@ if test x"$debug_enabled" = x"yes" ; the
- LEX_FLAGS="--warn --debug"
- fi
- else
-- CFLAGS="-O2 -DNDEBUG $CFLAGS"
-+ CFLAGS="$CFLAGS"
- YFLAGS="-d"
- fi
-
diff --git a/package/tinyproxy/patches/patch-configure_ac b/package/tinyproxy/patches/patch-configure_ac
new file mode 100644
index 000000000..b3fd83dc9
--- /dev/null
+++ b/package/tinyproxy/patches/patch-configure_ac
@@ -0,0 +1,27 @@
+--- tinyproxy-1.8.3.orig/configure.ac 2011-08-16 14:14:58.000000000 +0200
++++ tinyproxy-1.8.3/configure.ac 2014-04-07 08:43:06.000000000 +0200
+@@ -282,24 +282,12 @@ AC_SUBST(CPPFLAGS)
+ AC_SUBST(LIBS)
+ AC_SUBST(ADDITIONAL_OBJECTS)
+
+-# Check for asciidoc
+-AC_PATH_PROG(A2X, a2x, no)
+-AM_CONDITIONAL(HAVE_A2X, test "x$A2X" != "xno")
+-if test x"$A2X" = x"no"; then
+- AC_MSG_ERROR([Test for asciidoc failed. See the file 'INSTALL' for help.])
+-fi
+-
+ AC_CONFIG_FILES([
+ Makefile
+ src/Makefile
+ data/Makefile
+ data/templates/Makefile
+ etc/Makefile
+-docs/Makefile
+-docs/man5/Makefile
+-docs/man5/tinyproxy.conf.txt
+-docs/man8/Makefile
+-docs/man8/tinyproxy.txt
+ m4macros/Makefile
+ tests/Makefile
+ tests/scripts/Makefile
diff --git a/package/uclibc/Makefile b/package/uclibc/Makefile
index d48e7552f..95c7bb94d 100644
--- a/package/uclibc/Makefile
+++ b/package/uclibc/Makefile
@@ -2,7 +2,7 @@
# material, please see the LICENCE file in the top-level directory.
include $(TOPDIR)/rules.mk
-include $(TOPDIR)/toolchain/uClibc/Makefile.inc
+include $(TOPDIR)/toolchain/uclibc/Makefile.inc
PKG_NAME:= uClibc
PKG_DESCR:= embedded C library
diff --git a/package/vlc/Makefile b/package/vlc/Makefile
index 67f0ec763..74ab64ef7 100644
--- a/package/vlc/Makefile
+++ b/package/vlc/Makefile
@@ -4,10 +4,10 @@
include $(TOPDIR)/rules.mk
PKG_NAME:= vlc
-PKG_VERSION:= 2.1.1
+PKG_VERSION:= 2.1.4
PKG_RELEASE:= 1
-PKG_MD5SUM:= 1331cd853d56762c96afcb92dd498348
-PKG_DESCR:= Media Player
+PKG_MD5SUM:= 7ed67d22f7425011078772bfc62ac222
+PKG_DESCR:= popular media player
PKG_SECTION:= multimedia
PKG_BUILDDEP:= ffmpeg xcb-util libtheora libgcrypt libmad
PKG_DEPENDS:= libffmpeg xcb-util libtheora libgcrypt
@@ -23,6 +23,7 @@ include $(TOPDIR)/mk/package.mk
$(eval $(call PKG_template,VLC,vlc,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+TARGET_CPPFLAGS+= -D_GNU_SOURCE -D_POSIX_SOURCE
TARGET_CFLAGS+= -fPIC
CONFIGURE_ENV+= ac_cv_func_sched_getaffinity=no
CONFIGURE_ARGS+= --disable-lua \
diff --git a/package/vlc/patches/patch-modules_text_renderer_freetype_c b/package/vlc/patches/patch-modules_text_renderer_freetype_c
deleted file mode 100644
index 0c25fcfdf..000000000
--- a/package/vlc/patches/patch-modules_text_renderer_freetype_c
+++ /dev/null
@@ -1,11 +0,0 @@
---- vlc-2.1.1.orig/modules/text_renderer/freetype.c 2013-09-12 17:18:34.000000000 +0200
-+++ vlc-2.1.1/modules/text_renderer/freetype.c 2013-12-10 10:13:38.000000000 +0100
-@@ -90,7 +90,7 @@
- #endif
-
- /* Freetype */
--#include <freetype/ftsynth.h>
-+#include <ftsynth.h>
- #include FT_FREETYPE_H
- #include FT_GLYPH_H
- #include FT_STROKER_H
diff --git a/package/w3m/Makefile b/package/w3m/Makefile
new file mode 100644
index 000000000..cd0ae7913
--- /dev/null
+++ b/package/w3m/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:= w3m
+PKG_VERSION:= 0.5.3
+PKG_RELEASE:= 3
+PKG_MD5SUM:= 1b845a983a50b8dec0169ac48479eacc
+PKG_DESCR:= console web browser
+PKG_SECTION:= browser
+PKG_DEPENDS:= libgc libncurses
+PKG_BUILDDEP:= libgc-host libgc ncurses
+PKG_URL:= http://w3m.sourceforge.net/
+PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=w3m/}
+
+include $(TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,W3M,w3m,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+
+TARGET_LDFLAGS+= -lncurses -ltinfo
+CONFIGURE_ENV+= ac_cv_func_setpgrp_void=yes
+CONFIGURE_ARGS+= --with-termlib=ncurses \
+ --enable-image=no
+
+w3m-install:
+ $(INSTALL_DIR) $(IDIR_W3M)/usr/bin
+ $(INSTALL_BIN) $(WRKINST)/usr/bin/w3m \
+ $(IDIR_W3M)/usr/bin
+
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/w3m/patches/patch-Makefile_in b/package/w3m/patches/patch-Makefile_in
new file mode 100644
index 000000000..d8058d0e9
--- /dev/null
+++ b/package/w3m/patches/patch-Makefile_in
@@ -0,0 +1,35 @@
+--- w3m-0.5.3.orig/Makefile.in 2011-01-04 10:22:18.000000000 +0100
++++ w3m-0.5.3/Makefile.in 2014-04-08 21:21:10.000000000 +0200
+@@ -176,8 +176,20 @@ functable.c: funcname.tab mktable$(EXT)
+ ./mktable$(EXT) 100 functable.tab > $@
+ -rm -f functable.tab
+
+-mktable$(EXT): mktable.o dummy.o Str.o hash.o myctype.o
+- $(CC) $(CFLAGS) -o mktable mktable.o dummy.o Str.o hash.o myctype.o $(LDFLAGS) $(LIBS) $(GC_LIBS)
++Str-host.o:
++ $(CC_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) -c -o $@ $(srcdir)/Str.c
++
++hash-host.o:
++ $(CC_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) -c -o $@ $(srcdir)/hash.c
++
++myctype-host.o:
++ $(CC_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) -c -o $@ $(srcdir)/myctype.c
++
++mktable-host.o:
++ $(CC_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) -c -o $@ $(srcdir)/mktable.c
++
++mktable$(EXT): mktable-host.o dummy-host.o Str-host.o hash-host.o myctype-host.o
++ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -o mktable mktable-host.o dummy-host.o Str-host.o hash-host.o myctype-host.o $(LDFLAGS_FOR_BUILD) $(LIBS) $(GC_LIBS)
+
+ $(BOOKMARKER): w3mbookmark.o dummy.o $(ALIB)
+ $(CC) $(CFLAGS) -o $(BOOKMARKER) w3mbookmark.o dummy.o $(LDFLAGS) $(LIBS) $(EXT_LIBS)
+@@ -194,6 +206,9 @@ inflate.o: inflate.c
+ libwc/libwc.a: libwc
+ libwc:
+ (cd libwc && $(MAKE) CC='$(CC0)' OPTS='$(OPTS)')
++
++dummy-host.o: entity.c
++ $(CC_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) -DDUMMY -c -o $@ $?
+
+ dummy.o: entity.c
+ $(CC) $(CFLAGS) -DDUMMY -c -o $@ $?
diff --git a/package/w3m/patches/patch-istream_c b/package/w3m/patches/patch-istream_c
new file mode 100644
index 000000000..83743eda0
--- /dev/null
+++ b/package/w3m/patches/patch-istream_c
@@ -0,0 +1,38 @@
+--- w3m-0.5.3.orig/istream.c 2011-01-04 10:22:22.000000000 +0100
++++ w3m-0.5.3/istream.c 2014-04-08 19:58:01.000000000 +0200
+@@ -22,8 +22,8 @@
+ static void basic_close(int *handle);
+ static int basic_read(int *handle, char *buf, int len);
+
+-static void file_close(struct file_handle *handle);
+-static int file_read(struct file_handle *handle, char *buf, int len);
++static void file_close(struct wfile_handle *handle);
++static int file_read(struct wfile_handle *handle, char *buf, int len);
+
+ static int str_read(Str handle, char *buf, int len);
+
+@@ -114,7 +114,7 @@ newFileStream(FILE * f, void (*closep) (
+ stream = New(union input_stream);
+ init_base_stream(&stream->base, STREAM_BUF_SIZE);
+ stream->file.type = IST_FILE;
+- stream->file.handle = New(struct file_handle);
++ stream->file.handle = New(struct wfile_handle);
+ stream->file.handle->f = f;
+ if (closep)
+ stream->file.handle->close = closep;
+@@ -658,13 +658,13 @@ basic_read(int *handle, char *buf, int l
+ }
+
+ static void
+-file_close(struct file_handle *handle)
++file_close(struct wfile_handle *handle)
+ {
+ handle->close(handle->f);
+ }
+
+ static int
+-file_read(struct file_handle *handle, char *buf, int len)
++file_read(struct wfile_handle *handle, char *buf, int len)
+ {
+ return fread(buf, 1, len, handle->f);
+ }
diff --git a/package/w3m/patches/patch-istream_h b/package/w3m/patches/patch-istream_h
new file mode 100644
index 000000000..b6a6a867b
--- /dev/null
+++ b/package/w3m/patches/patch-istream_h
@@ -0,0 +1,20 @@
+--- w3m-0.5.3.orig/istream.h 2003-10-20 18:41:56.000000000 +0200
++++ w3m-0.5.3/istream.h 2014-04-08 19:57:31.000000000 +0200
+@@ -20,7 +20,7 @@ struct stream_buffer {
+
+ typedef struct stream_buffer *StreamBuffer;
+
+-struct file_handle {
++struct wfile_handle {
+ FILE *f;
+ void (*close) ();
+ };
+@@ -53,7 +53,7 @@ struct base_stream {
+
+ struct file_stream {
+ struct stream_buffer stream;
+- struct file_handle *handle;
++ struct wfile_handle *handle;
+ char type;
+ char iseos;
+ int (*read) ();
diff --git a/package/w3m/patches/patch-main_c b/package/w3m/patches/patch-main_c
new file mode 100644
index 000000000..9f14ab1c1
--- /dev/null
+++ b/package/w3m/patches/patch-main_c
@@ -0,0 +1,11 @@
+--- w3m-0.5.3.orig/main.c 2011-01-04 10:42:19.000000000 +0100
++++ w3m-0.5.3/main.c 2014-04-08 19:59:04.000000000 +0200
+@@ -833,7 +833,7 @@ main(int argc, char **argv, char **envp)
+ mySignal(SIGPIPE, SigPipe);
+ #endif
+
+- orig_GC_warn_proc = GC_set_warn_proc(wrap_GC_warn_proc);
++ GC_set_warn_proc(wrap_GC_warn_proc);
+ err_msg = Strnew();
+ if (load_argc == 0) {
+ /* no URL specified */
diff --git a/package/watchdog/Makefile b/package/watchdog/Makefile
index a4c6d44a5..a8486dd6a 100644
--- a/package/watchdog/Makefile
+++ b/package/watchdog/Makefile
@@ -4,9 +4,9 @@
include ${TOPDIR}/rules.mk
PKG_NAME:= watchdog
-PKG_VERSION:= 5.7
-PKG_RELEASE:= 3
-PKG_MD5SUM:= 31766450ecfc9aff70fe966c0b9df06d
+PKG_VERSION:= 5.13
+PKG_RELEASE:= 1
+PKG_MD5SUM:= 153455f008f1cf8f65f6ad9586a21ff1
PKG_DESCR:= watchdog daemon
PKG_SECTION:= utils
PKG_DEPENDS:= libtirpc
@@ -17,6 +17,7 @@ include ${TOPDIR}/mk/package.mk
$(eval $(call PKG_template,WATCHDOG,watchdog,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+TARGET_CPPFLAGS+= -D_GNU_SOURCE
TARGET_CFLAGS+= -I$(STAGING_TARGET_DIR)/usr/include/tirpc
TARGET_LDFLAGS+= -ltirpc
diff --git a/package/watchdog/patches/patch-include_extern_h b/package/watchdog/patches/patch-include_extern_h
new file mode 100644
index 000000000..aea373525
--- /dev/null
+++ b/package/watchdog/patches/patch-include_extern_h
@@ -0,0 +1,9 @@
+--- watchdog-5.13.orig/include/extern.h 2013-02-01 12:15:44.000000000 +0100
++++ watchdog-5.13/include/extern.h 2014-03-22 15:41:57.000000000 +0100
+@@ -1,5 +1,6 @@
+ #include <netinet/in.h>
+ #include <stdio.h>
++#include <time.h>
+
+ /* external variables */
+ extern int softboot, watchdog, temp, maxtemp, tint, lastts, nrts;
diff --git a/package/watchdog/patches/patch-src_memory_c b/package/watchdog/patches/patch-src_memory_c
new file mode 100644
index 000000000..06540812e
--- /dev/null
+++ b/package/watchdog/patches/patch-src_memory_c
@@ -0,0 +1,11 @@
+--- watchdog-5.13.orig/src/memory.c 2013-02-01 12:15:44.000000000 +0100
++++ watchdog-5.13/src/memory.c 2014-03-22 16:07:15.000000000 +0100
+@@ -81,7 +81,7 @@ int check_memory(void)
+ syslog(LOG_INFO, "currently there are %d kB of free memory available", free);
+ #endif /* USE_SYSLOG */
+
+- if (free < minpages * (EXEC_PAGESIZE / 1024)) {
++ if (free < minpages * (4096 / 1024)) {
+ #if USE_SYSLOG
+ syslog(LOG_ERR, "memory %d kB is less than %d pages", free, minpages);
+ #endif /* USE_SYSLOG */
diff --git a/package/watchdog/patches/patch-src_mntent_c b/package/watchdog/patches/patch-src_mntent_c
deleted file mode 100644
index f2277bdbf..000000000
--- a/package/watchdog/patches/patch-src_mntent_c
+++ /dev/null
@@ -1,11 +0,0 @@
---- watchdog-5.7.orig/src/mntent.c 2010-01-06 13:42:08.000000000 +0100
-+++ watchdog-5.7/src/mntent.c 2010-02-06 04:39:34.804334839 +0100
-@@ -157,7 +157,7 @@ my_getmntent (mntFILE *mfp) {
- if (fgets (buf, sizeof(buf), mfp->mntent_fp) == NULL)
- return NULL;
-
-- s = index (buf, '\n');
-+ s = strchr (buf, '\n');
- if (s == NULL) {
- /* extremely long line - assume file was corrupted */
- mfp->mntent_errs = 1;
diff --git a/package/watchdog/patches/patch-src_net_c b/package/watchdog/patches/patch-src_net_c
new file mode 100644
index 000000000..da56cf791
--- /dev/null
+++ b/package/watchdog/patches/patch-src_net_c
@@ -0,0 +1,10 @@
+--- watchdog-5.13.orig/src/net.c 2013-02-01 12:15:44.000000000 +0100
++++ watchdog-5.13/src/net.c 2014-03-22 16:18:27.000000000 +0100
+@@ -6,6 +6,7 @@
+
+ #include <errno.h>
+ #include <sys/time.h>
++#include <sys/types.h>
+ #include <netinet/ip.h>
+ #include <netinet/ip_icmp.h>
+
diff --git a/package/watchdog/patches/patch-src_shutdown_c b/package/watchdog/patches/patch-src_shutdown_c
new file mode 100644
index 000000000..90ba0ee3c
--- /dev/null
+++ b/package/watchdog/patches/patch-src_shutdown_c
@@ -0,0 +1,18 @@
+--- watchdog-5.13.orig/src/shutdown.c 2013-02-01 12:15:44.000000000 +0100
++++ watchdog-5.13/src/shutdown.c 2014-03-22 16:29:44.000000000 +0100
+@@ -186,6 +186,7 @@ static void mnt_off()
+ FILE *fp;
+ struct mntent *mnt;
+
++#if defined __GLIBC__
+ fp = setmntent(MNTTAB, "r");
+ /* in some rare cases fp might be NULL so be careful */
+ while (fp != NULL && ((mnt = getmntent(fp)) != (struct mntent *) 0)) {
+@@ -241,6 +242,7 @@ static void mnt_off()
+ #endif
+ }
+ endmntent(fp);
++#endif
+ }
+
+ /* Parts of the following two functions are taken from Miquel van */
diff --git a/package/watchdog/patches/patch-src_umount_c b/package/watchdog/patches/patch-src_umount_c
deleted file mode 100644
index 6b5a82c1f..000000000
--- a/package/watchdog/patches/patch-src_umount_c
+++ /dev/null
@@ -1,11 +0,0 @@
---- watchdog-5.7.orig/src/umount.c 2010-01-06 13:42:08.000000000 +0100
-+++ watchdog-5.7/src/umount.c 2010-02-06 04:39:47.664334843 +0100
-@@ -212,7 +212,7 @@ umount_one (const char *spec, const char
- if (res < 0)
- umnt_err2 = errno;
- /* Do not complain about remote NFS mount points */
-- if (errno == ENOENT && index(spec, ':'))
-+ if (errno == ENOENT && strchr(spec, ':'))
- umnt_err2 = 0;
- }
- }
diff --git a/package/xbmc/Makefile b/package/xbmc/Makefile
index fed181d92..e8fc5cc40 100644
--- a/package/xbmc/Makefile
+++ b/package/xbmc/Makefile
@@ -69,6 +69,7 @@ CONFIGURE_ARGS+= --disable-optical-drive \
--enable-libbluray \
--enable-external-libraries \
--enable-rtmp \
+ --enable-libcec \
--disable-libusb \
--disable-libcap \
--disable-sdl \
diff --git a/package/xf86-video-fbdev/Makefile b/package/xf86-video-fbdev/Makefile
index cf24b3358..b14e8eaa8 100644
--- a/package/xf86-video-fbdev/Makefile
+++ b/package/xf86-video-fbdev/Makefile
@@ -4,9 +4,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:= xf86-video-fbdev
-PKG_VERSION:= 0.4.2
+PKG_VERSION:= 0.4.4
PKG_RELEASE:= 1
-PKG_MD5SUM:= a94011aac77eb9cd6d46bf0af0dbc631
+PKG_MD5SUM:= 2b5e6dd218243cf96c1a4090596a6bba
PKG_DESCR:= X11 driver for Linux Framebuffer devices
PKG_SECTION:= x11/drivers
PKG_DEPENDS:= xorg-server
diff --git a/package/xinetd/Makefile b/package/xinetd/Makefile
index 42e3f7b83..deae22563 100644
--- a/package/xinetd/Makefile
+++ b/package/xinetd/Makefile
@@ -4,18 +4,19 @@
include $(TOPDIR)/rules.mk
PKG_NAME:= xinetd
-PKG_VERSION:= 2.3.14
+PKG_VERSION:= 2.3.15
PKG_RELEASE:= 1
-PKG_MD5SUM:= 567382d7972613090215c6c54f9b82d9
+PKG_MD5SUM:= 77358478fd58efa6366accae99b8b04c
PKG_DESCR:= a powerful and secure superserver
PKG_SECTION:= net/misc
PKG_URL:= http://www.xinetd.org/
-PKG_SITES:= http://www.xinetd.org/
+PKG_SITES:= ftp://mirror.ovh.net/gentoo-distfiles/distfiles/
include $(TOPDIR)/mk/package.mk
$(eval $(call PKG_template,XINETD,xinetd,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+CONFIGURE_ENV+= xinetd_cv_type_rlim_t=yes
CONFIGURE_ARGS+= --without-libwrap \
--with-loadavg
ALL_TARGET:= build
diff --git a/package/xinetd/patches/patch-Makefile_in b/package/xinetd/patches/patch-Makefile_in
index a89962c2e..bfc02b9ab 100644
--- a/package/xinetd/patches/patch-Makefile_in
+++ b/package/xinetd/patches/patch-Makefile_in
@@ -1,14 +1,5 @@
---- xinetd-2.3.14.orig/Makefile.in 2003-08-15 16:00:45.000000000 +0200
-+++ xinetd-2.3.14/Makefile.in 2011-01-22 20:53:07.924898364 +0100
-@@ -14,7 +14,7 @@ topdir = @top_srcdir@
-
- LIBS = -lsio -lstr -lmisc -lxlog -lportable -lpset @LIBS@
-
--CFLAGS += @CFLAGS@
-+CFLAGS = @CFLAGS@
- DCFLAGS = -Wall -Wredundant-decls -W -Wfloat-equal -Wundef -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Wmissing-format-attribute -Wshadow -Wpointer-arith -g
-
-
+--- xinetd-2.3.15.orig/Makefile.in 2007-09-20 19:01:52.000000000 +0200
++++ xinetd-2.3.15/Makefile.in 2014-03-23 22:50:01.000000000 +0100
@@ -75,15 +75,15 @@ dlibxlog: dlibsio dlibstr
install: build
diff --git a/package/xinetd/patches/patch-xinetd_confparse_c b/package/xinetd/patches/patch-xinetd_confparse_c
new file mode 100644
index 000000000..e6aa32e68
--- /dev/null
+++ b/package/xinetd/patches/patch-xinetd_confparse_c
@@ -0,0 +1,18 @@
+--- xinetd-2.3.15.orig/xinetd/confparse.c 2007-09-20 16:58:27.000000000 +0200
++++ xinetd-2.3.15/xinetd/confparse.c 2014-03-23 22:39:37.000000000 +0100
+@@ -746,6 +746,7 @@ static status_e check_entry( struct serv
+ }
+
+ /* #ifndef NO_RPC */
++#if 0
+ #if defined(HAVE_RPC_RPCENT_H) || defined(HAVE_NETDB_H)
+ if ( SC_IS_RPC( scp ) && !SC_IS_UNLISTED( scp ) )
+ {
+@@ -760,6 +761,7 @@ static status_e check_entry( struct serv
+ }
+ else
+ #endif /* ! NO_RPC */
++#endif
+ {
+ if ( !SC_IS_UNLISTED( scp ) )
+ {
diff --git a/package/xterm/Makefile b/package/xterm/Makefile
index 10bfaf21a..6575fae60 100644
--- a/package/xterm/Makefile
+++ b/package/xterm/Makefile
@@ -4,9 +4,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:= xterm
-PKG_VERSION:= 297
-PKG_RELEASE:= 2
-PKG_MD5SUM:= 45610ae6fe90cf086fcd75b9cb97bbaf
+PKG_VERSION:= 303
+PKG_RELEASE:= 1
+PKG_MD5SUM:= 48f6d49b2b6b6933d501d767cbed9254
PKG_DESCR:= Terminal Emulator for X Windows
PKG_SECTION:= x11/apps
PKG_DEPENDS:= libxaw libxt libncurses libxft fontconfig
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/package/zile/Makefile b/package/zile/Makefile
new file mode 100644
index 000000000..0a8711548
--- /dev/null
+++ b/package/zile/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:= zile
+PKG_VERSION:= 2.4.11
+PKG_RELEASE:= 1
+PKG_MD5SUM:= 7a460ccec64e3bec2835697b2eae533c
+PKG_DESCR:= tiny emacs clone
+PKG_SECTION:= editor
+PKG_DEPENDS:= libgc
+PKG_BUILDDEP:= autotool libgc
+PKG_URL:= http://www.gnu.org/software/zile/
+PKG_SITES:= ${MASTER_SITE_GNU:=zile/}
+
+PKG_LIBC_DEPENDS:= glibc
+
+include $(TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,ZILE,zile,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+
+AUTOTOOL_STYLE:= autoreconf
+TARGET_LDFLAGS+= -ltinfo
+
+zile-install:
+ $(INSTALL_DIR) $(IDIR_ZILE)/usr/bin
+ $(INSTALL_BIN) $(WRKINST)/usr/bin/zile \
+ $(IDIR_ZILE)/usr/bin
+
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/zile/patches/patch-Makefile_am b/package/zile/patches/patch-Makefile_am
new file mode 100644
index 000000000..4d25fc5f0
--- /dev/null
+++ b/package/zile/patches/patch-Makefile_am
@@ -0,0 +1,23 @@
+--- zile-2.4.11.orig/Makefile.am 2014-02-24 22:42:16.000000000 +0100
++++ zile-2.4.11/Makefile.am 2014-04-08 14:25:07.000000000 +0200
+@@ -36,12 +36,10 @@ PERL_BUILDTIME = \
+
+ EXTRA_DIST = \
+ FAQ \
+- build-aux/zile-help2man-wrapper \
+ $(PERL_BUILDTIME)
+
+ doc_DATA = AUTHORS FAQ NEWS
+
+-include doc/Makefile.am
+ include src/Makefile.am
+ include tests/Makefile.am
+
+@@ -49,7 +47,6 @@ PRODUCTIONSOURCES = \
+ configure.ac \
+ Makefile.am \
+ $(PERL_BUILDTIME) \
+- doc/Makefile.am \
+ src/Makefile.am \
+ $(src_zile_base_SOURCE_FILES) \
+ src/tbl_opts.h.in
diff --git a/rules.mk b/rules.mk
index f822642d1..09323e912 100644
--- a/rules.mk
+++ b/rules.mk
@@ -36,6 +36,7 @@ ADK_TARGET_FPU:= $(strip $(subst ",, $(ADK_TARGET_FPU)))
ADK_TARGET_ARM_MODE:= $(strip $(subst ",, $(ADK_TARGET_ARM_MODE)))
ADK_TARGET_CPU_ARCH:= $(strip $(subst ",, $(ADK_TARGET_CPU_ARCH)))
ADK_TARGET_CFLAGS:= $(strip $(subst ",, $(ADK_TARGET_CFLAGS)))
+ADK_TARGET_CFLAGS_OPT:= $(strip $(subst ",, $(ADK_TARGET_CFLAGS_OPT)))
ADK_TARGET_ABI_CFLAGS:= $(strip $(subst ",, $(ADK_TARGET_ABI_CFLAGS)))
ADK_TARGET_ABI:= $(strip $(subst ",, $(ADK_TARGET_ABI)))
ADK_TARGET_MIPS_ABI:= $(strip $(subst ",, $(ADK_TARGET_MIPS_ABI)))
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/create.sh b/scripts/create.sh
index 505549247..79401fda9 100755
--- a/scripts/create.sh
+++ b/scripts/create.sh
@@ -55,7 +55,7 @@ Syntax: $me [-c cfgfssize] [+g] [-i imagesize] [-p panictime]
[-s serialspeed] [-t] [-T imagetype] [+U] target.ima source.tgz
Explanation/Defaults:
-c: minimum 0, maximum 5, default 1 (MiB)
- +g: disables installing GNU GRUB 2 (-g enables it, default)
+ -g: enable installing GNU GRUB 2
-i: total image, default 512 (MiB; max. approx. 2 TiB)
-p: default 10 (seconds; 0 disables; max. 300)
-s: default 115200 (bps, others: 9600 19200 38400 57600)
@@ -66,7 +66,7 @@ EOF
}
cfgfs=1
-usegrub=1
+usegrub=0
tgtmib=512
panicreboot=10
speed=115200
@@ -80,7 +80,6 @@ while getopts "c:ghi:p:s:tT:" ch; do
usage
fi ;;
(g) usegrub=1 ;;
- (+g) usegrub=0 ;;
(h) usage 0 ;;
(i) if (( (tgtmib = OPTARG) < 7 || tgtmib > 2097150 )); then
print -u2 "$me: -i $OPTARG out of bounds"
@@ -153,7 +152,7 @@ else
fi
if (( usegrub )); then
- tar -xOzf "$src" usr/share/grub-bin/core.img >"$T/core.img"
+ tar -xOzf "$src" boot/grub/core.img >"$T/core.img"
integer coreimgsz=$($statcmd "$T/core.img")
if (( coreimgsz < 1024 )); then
print -u2 core.img is probably too small: $coreimgsz
@@ -274,12 +273,6 @@ if (( usegrub )); then
print "\tlinux /boot/kernel $linuxargs"
print '}'
) >boot/grub/grub.cfg
- set -A grubfiles
- ngrubfiles=0
- for a in usr/lib/grub/*-pc/{*.mod,efiemu??.o,command.lst,moddep.lst,fs.lst,handler.lst,parttool.lst}; do
- [[ -e $a ]] && grubfiles[ngrubfiles++]=$a
- done
- cp "${grubfiles[@]}" boot/grub/
fi
print "Creating ext2fs filesystem image..."
diff --git a/scripts/find b/scripts/find
deleted file mode 100755
index ea38d92fb..000000000
--- a/scripts/find
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/env bash
-# This file is part of the OpenADK project. OpenADK is copyrighted
-# material, please see the LICENCE file in the top-level directory.
-
-if [ -z "$(which gfind 2>/dev/null)" ];then
- /usr/bin/find "$@"
-else
- gfind "$@"
-fi
diff --git a/scripts/gcc-bisect.sh b/scripts/gcc-bisect.sh
new file mode 100644
index 000000000..1da4dd5d6
--- /dev/null
+++ b/scripts/gcc-bisect.sh
@@ -0,0 +1,206 @@
+#!/bin/sh
+rm -rf host_x86_64-linux-gnu target_sparc_glibc
+rm -rf gcc-*
+mkdir host_x86_64-linux-gnu
+mkdir target_sparc_glibc
+
+tar xvf binutils-2.24.tar.bz2
+cd binutils-2.24
+./configure \
+ --prefix=/home/wbx/smoke/host_x86_64-linux-gnu \
+ --target=sparc-openadk-linux-gnu \
+ --with-sysroot=/home/wbx/smoke/target_sparc_glibc \
+ --disable-dependency-tracking \
+ --disable-libtool-lock \
+ --disable-nls \
+ --disable-werror \
+ --disable-plugins \
+ --disable-libssp --disable-multilib
+make -j4 all
+make install
+cd ..
+
+tar xvf gmp-5.1.3.tar.xz
+cd gmp-5.1.3
+cp configfsf.guess config.guess
+PATH="/home/wbx/smoke/host_x86_64-linux-gnu/usr/bin:$PATH" \
+ ./configure \
+ --prefix=/home/wbx/smoke/host_x86_64-linux-gnu \
+ --with-pic \
+ --disable-shared \
+ --enable-static
+make -j4 all
+make install
+cd ..
+
+tar xvf mpfr-3.1.2.tar.xz
+cd mpfr-3.1.2
+./configure \
+ --prefix=/home/wbx/smoke/host_x86_64-linux-gnu \
+ --with-gmp-build=/home/wbx/smoke/gmp-5.1.3 \
+ --disable-shared \
+ --enable-static
+make -j4 all
+make install
+cd ..
+
+tar xvf mpc-0.8.2.tar.gz
+cd mpc-0.8.2
+./configure \
+ --prefix=/home/wbx/smoke/host_x86_64-linux-gnu \
+ --with-gmp=/home/wbx/smoke/host_x86_64-linux-gnu \
+ --disable-shared \
+ --enable-static
+make -j4 all
+make install
+make install
+cd ..
+
+tar xvf libelf-0.8.13.tar.gz
+cd libelf-0.8.13
+./configure \
+ --prefix=/home/wbx/smoke/host_x86_64-linux-gnu \
+ --disable-nls \
+ --disable-shared \
+ --enable-static
+make -j4 all
+make install
+cd ..
+
+rm -rf host_x86_64-linux-gnu/sparc-openadk-linux-gnu/{lib,sys-include}
+cd host_x86_64-linux-gnu/sparc-openadk-linux-gnu/
+ln -sf ../../target_sparc_glibc/usr/include sys-include
+ln -sf ../../target_sparc_glibc/lib lib
+cd -
+
+mkdir gcc-minimal
+cd gcc-minimal
+CFLAGS="-O0 -g0" \
+CXXFLAGS="-O0 -g0" \
+PATH="/home/wbx/smoke/host_x86_64-linux-gnu/bin:$PATH" \
+../gcc/configure \
+ --prefix=/home/wbx/smoke/host_x86_64-linux-gnu --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=sparc-openadk-linux-gnu --with-gmp=/home/wbx/smoke/host_x86_64-linux-gnu --with-mpfr=/home/wbx/smoke/host_x86_64-linux-gnu --with-libelf=/home/wbx/smoke/host_x86_64-linux-gnu --disable-__cxa_atexit --with-gnu-ld --with-gnu-as --enable-tls --disable-libsanitizer --disable-libitm --disable-libmudflap --disable-libgomp --disable-decimal-float --disable-libstdcxx-pch --disable-ppl-version-check --disable-cloog-version-check --without-system-zlib --without-ppl --without-cloog --without-isl --disable-nls --enable-target-optspace \
+ --enable-languages=c \
+ --disable-multilib \
+ --disable-lto \
+ --disable-libssp \
+ --disable-shared \
+ --without-headers
+PATH="/home/wbx/smoke/host_x86_64-linux-gnu/bin:$PATH" make -j4 all-gcc
+if [ $? -ne 0 ];then
+ echo failed
+ exit
+fi
+PATH="/home/wbx/smoke/host_x86_64-linux-gnu/bin:$PATH" make install-gcc
+if [ $? -ne 0 ];then
+ echo failed
+ exit
+fi
+cd ..
+
+cd linux-3.13.6
+make V=1 ARCH=sparc CROSS_COMPILE="/home/wbx/smoke/host_x86_64-linux-gnu/bin/sparc-openadk-linux-gnu-" CC="/home/wbx/smoke/host_x86_64-linux-gnu/bin/sparc-openadk-linux-gnu-gcc" HOSTCC="cc" CONFIG_SHELL='/bin/bash' HOSTCFLAGS='-O2 -Wall' INSTALL_HDR_PATH=/home/wbx/smoke/target_sparc_glibc/usr headers_install
+cd ..
+
+cd glibc-2.19-header
+libc_cv_forced_unwind=yes \
+libc_cv_cc_with_libunwind=yes \
+libc_cv_c_cleanup=yes \
+libc_cv_gnu99_inline=yes \
+libc_cv_initfini_array=yes \
+PATH="/home/wbx/smoke/host_x86_64-linux-gnu/bin:$PATH" ../glibc-2.19/configure \
+ --prefix=/home/wbx/smoke/target_sparc_glibc/usr \
+ --with-sysroot=/home/wbx/smoke/target_sparc_glibc \
+ --build=x86_64-linux-gnu --host=sparc-openadk-linux-gnu --with-headers=/home/wbx/smoke/target_sparc_glibc/usr/include --disable-sanity-checks --disable-nls --without-cvs --disable-profile --disable-debug --without-gd --disable-nscd --with-__thread --with-tls --enable-kernel="2.6.32" --enable-add-ons
+PATH="/home/wbx/smoke/host_x86_64-linux-gnu/bin:$PATH" make cross-compiling=yes PARALLELMFLAGS="-j1" install-headers
+if [ $? -ne 0 ];then
+ echo failed
+ exit
+fi
+cd ..
+touch target_sparc_glibc/usr/include/gnu/stubs.h
+
+mkdir gcc-initial
+cd gcc-initial
+CFLAGS="-O0 -g0" \
+CXXFLAGS="-O0 -g0" \
+PATH="/home/wbx/smoke/host_x86_64-linux-gnu/bin:$PATH" ../gcc/configure \
+ --prefix=/home/wbx/smoke/host_x86_64-linux-gnu --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=sparc-openadk-linux-gnu --with-gmp=/home/wbx/smoke/host_x86_64-linux-gnu --with-mpfr=/home/wbx/smoke/host_x86_64-linux-gnu --with-libelf=/home/wbx/smoke/host_x86_64-linux-gnu --disable-__cxa_atexit --with-gnu-ld --with-gnu-as --enable-tls --disable-libsanitizer --disable-libitm --disable-libmudflap --disable-libgomp --disable-decimal-float --disable-libstdcxx-pch --disable-ppl-version-check --disable-cloog-version-check --without-system-zlib --without-ppl --without-cloog --without-isl --disable-nls --enable-target-optspace \
+ --disable-biarch --disable-multilib --enable-libssp --enable-lto \
+ --enable-languages=c \
+ --disable-shared \
+ --disable-threads \
+ --with-sysroot=/home/wbx/smoke/target_sparc_glibc
+PATH="/home/wbx/smoke/host_x86_64-linux-gnu/bin:$PATH" make all-gcc
+if [ $? -ne 0 ];then
+ echo failed
+ exit
+fi
+PATH="/home/wbx/smoke/host_x86_64-linux-gnu/bin:$PATH" make all-target-libgcc
+if [ $? -ne 0 ];then
+ echo failed
+ exit
+fi
+PATH="/home/wbx/smoke/host_x86_64-linux-gnu/bin:$PATH" make install-gcc install-target-libgcc
+if [ $? -ne 0 ];then
+ echo failed
+ exit
+fi
+cd ..
+
+cd glibc-2.19-final
+PATH="/home/wbx/smoke/host_x86_64-linux-gnu/bin:$PATH" SHELL='/bin/bash' BUILD_CC=cc CFLAGS="-mcpu=v8 -fwrapv -fno-ident -fomit-frame-pointer -O2 -pipe -fno-unwind-tables -fno-asynchronous-unwind-tables -g3" CC="/home/wbx/smoke/host_x86_64-linux-gnu/bin/sparc-openadk-linux-gnu-gcc" CXX="/home/wbx/smoke/host_x86_64-linux-gnu/bin/sparc-openadk-linux-gnu-g++" AR="/home/wbx/smoke/host_x86_64-linux-gnu/bin/sparc-openadk-linux-gnu-ar" RANLIB="/home/wbx/smoke/host_x86_64-linux-gnu/bin/sparc-openadk-linux-gnu-ranlib" libc_cv_forced_unwind=yes libc_cv_cc_with_libunwind=yes libc_cv_c_cleanup=yes libc_cv_gnu99_inline=yes libc_cv_initfini_array=yes \
+../glibc-2.19/configure \
+ --prefix=/usr \
+ --enable-shared \
+ --enable-stackguard-randomization \
+ --build=x86_64-linux-gnu --host=sparc-openadk-linux-gnu --with-headers=/home/wbx/smoke/target_sparc_glibc/usr/include --disable-sanity-checks --disable-nls --without-cvs --disable-profile --disable-debug --without-gd --disable-nscd --with-__thread --with-tls --enable-kernel="2.6.32" --enable-add-ons
+PATH="/home/wbx/smoke/host_x86_64-linux-gnu/bin:$PATH" make all
+PATH="/home/wbx/smoke/host_x86_64-linux-gnu/bin:$PATH" make install_root=/home/wbx/smoke/target_sparc_glibc install
+if [ $? -ne 0 ];then
+ echo failed
+ exit
+fi
+cd ..
+
+mkdir gcc-final
+cd gcc-final
+../gcc/configure \
+ --prefix=/home/wbx/smoke/host_x86_64-linux-gnu --with-bugurl="http://www.openadk.org/" --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=sparc-openadk-linux-gnu --with-gmp=/home/wbx/smoke/host_x86_64-linux-gnu --with-mpfr=/home/wbx/smoke/host_x86_64-linux-gnu --with-libelf=/home/wbx/smoke/host_x86_64-linux-gnu --disable-__cxa_atexit --with-gnu-ld --with-gnu-as --enable-tls --disable-libsanitizer --disable-libitm --disable-libmudflap --disable-libgomp --disable-decimal-float --disable-libstdcxx-pch --disable-ppl-version-check --disable-cloog-version-check --without-system-zlib --without-ppl --without-cloog --without-isl --disable-nls --enable-target-optspace \
+ --disable-biarch --disable-multilib --enable-libssp --enable-lto \
+ --enable-languages=c,c++ \
+ --with-build-sysroot='${prefix}/../target_sparc_glibc' \
+ --with-sysroot='${prefix}/../target_sparc_glibc' \
+ --enable-shared
+make -j4 all
+if [ $? -ne 0 ];then
+ echo failed
+ exit
+fi
+make install
+if [ $? -ne 0 ];then
+ echo failed
+ exit
+fi
+cd ..
+
+cd linux-3.13.6/
+cat > mini.config <<EOF
+CONFIG_SPARC=y
+CONFIG_SPARC32=y
+CONFIG_SBUS=y
+CONFIG_SBUSCHAR=y
+CONFIG_PCI=y
+CONFIG_PCI_SYSCALL=y
+CONFIG_PCIC_PCI=y
+CONFIG_OF=y
+CONFIG_NET_VENDOR_AMD=y
+CONFIG_SUNLANCE=y
+CONFIG_SERIAL_CONSOLE=y
+CONFIG_SERIAL_SUNCORE=y
+CONFIG_SERIAL_SUNZILOG=y
+CONFIG_SERIAL_SUNZILOG_CONSOLE=y
+EOF
+
+PATH="/home/wbx/smoke/host_x86_64-linux-gnu/bin:$PATH" make V=1 ARCH=sparc CROSS_COMPILE="/home/wbx/smoke/host_x86_64-linux-gnu/bin/sparc-openadk-linux-gnu-" CC="/home/wbx/smoke/host_x86_64-linux-gnu/bin/sparc-openadk-linux-gnu-gcc" HOSTCC="cc" CONFIG_SHELL='/bin/bash' HOSTCFLAGS='-O2 -Wall' KCONFIG_ALLCONFIG=mini.config allnoconfig
+PATH="/home/wbx/smoke/host_x86_64-linux-gnu/bin:$PATH" make V=1 ARCH=sparc CROSS_COMPILE="/home/wbx/smoke/host_x86_64-linux-gnu/bin/sparc-openadk-linux-gnu-" CC="/home/wbx/smoke/host_x86_64-linux-gnu/bin/sparc-openadk-linux-gnu-gcc" HOSTCC="cc" CONFIG_SHELL='/bin/bash' HOSTCFLAGS='-O2 -Wall' -j4 zImage
diff --git a/scripts/install-rpi.sh b/scripts/install-rpi.sh
index d104f5431..0cf88cf4c 100755
--- a/scripts/install-rpi.sh
+++ b/scripts/install-rpi.sh
@@ -3,125 +3,137 @@
# material, please see the LICENCE file in the top-level directory.
if [ $(id -u) -ne 0 ];then
- printf "Installation is only possible as root\n"
+ echo "Installation is only possible as root"
exit 1
fi
-printf "Checking if parted is installed"
-parted=$(which parted)
-
-if [ ! -z $parted -a -x $parted ];then
- printf "...okay\n"
-else
- printf "...failed\n"
- exit 1
-fi
-
-printf "Checking if sfdisk is installed"
-sfdisk=$(which sfdisk)
-
-if [ ! -z $sfdisk -a -x $sfdisk ];then
- printf "...okay\n"
-else
- printf "...failed\n"
- exit 1
-fi
-
-printf "Checking if mke2fs is installed"
-mke2fs=$(which mke2fs)
+f=0
+for tool in parted sfdisk mkfs.vfat mkfs.ext4;do
+ if ! which $tool >/dev/null; then
+ echo "Checking if $tool is installed... failed"
+ f=1
+ fi
+done
+if [ $f -eq 1 ];then exit 1;fi
-if [ ! -z $mke2fs -a -x $mke2fs ];then
- printf "...okay\n"
-else
- printf "...failed\n"
- exit 1
-fi
+datadir=0
+keep=0
+while getopts "dk" ch; do
+ case $ch in
+ d)
+ datadir=1
+ ;;
+ k)
+ keep=1
+ ;;
+ esac
+done
+shift $((OPTIND - 1))
if [ -z $1 ];then
- printf "Please give your SD card device as first parameter\n"
+ echo "Please give your SD card device as first parameter"
exit 1
else
if [ -z $2 ];then
- printf "Please give your install tar archive as second parameter\n"
- exit 2
+ echo "Please give your install tar archive as second parameter"
+ exit 1
fi
if [ -f $2 ];then
- printf "Installing $2 on $1\n"
+ echo "Installing $2 on $1"
else
- printf "$2 is not a file, Exiting\n"
+ echo "$2 is not a file, exiting"
exit 1
fi
if [ -b $1 ];then
- printf "Using $1 as SD card disk for installation\n"
- printf "This will destroy all data on $1, are you sure?\n"
- printf "Type "y" to continue\n"
+ echo "Using $1 as SD card disk for installation"
+ echo "WARNING: This will destroy all data on $1 - type Yes to continue!"
read y
- if [ "$y" = "y" ];then
- $sfdisk -l $1 2>&1 |grep 'No medium'
+ if [ "$y" = "Yes" ];then
+ env LC_ALL=C sfdisk -l $1 2>&1 |grep 'No medium'
if [ $? -eq 0 ];then
+ echo "No medium found"
exit 1
else
- printf "Starting with installation\n"
+ echo "Starting with installation"
fi
else
- printf "Exiting.\n"
+ echo "Exiting."
exit 1
fi
else
- printf "Sorry $1 is not a block device\n"
+ echo "Sorry $1 is not a block device"
exit 1
fi
fi
if [ $(mount | grep $1| wc -l) -ne 0 ];then
- printf "Block device $1 is in use, please umount first.\n"
+ echo "Block device $1 is in use, please umount first"
exit 1
fi
+echo "Wiping existing partitions"
+dd if=/dev/zero of=$1 bs=512 count=1 >/dev/null 2>&1
+sync
-if [ $($sfdisk -l $1 2>/dev/null|grep Empty|wc -l) -ne 4 ];then
- printf "Partitions already exist, should I wipe them?\n"
- printf "Type y to continue\n"
- read y
- if [ $y = "y" ];then
- printf "Wiping existing partitions\n"
- dd if=/dev/zero of=$1 bs=512 count=1 >/dev/null 2>&1
- else
- printf "Exiting.\n"
- exit 1
- fi
-fi
-
-printf "Create partition and filesystem for raspberry pi\n"
+echo "Create partition and filesystem for raspberry pi"
rootpart=${1}2
-$parted -s $1 mklabel msdos
+parted -s $1 mklabel msdos
sleep 2
-maxsize=$(env LC_ALL=C $parted $1 -s unit cyl print |awk '/^Disk/ { print $3 }'|sed -e 's/cyl//')
-rootsize=$(($maxsize-16))
+maxsize=$(env LC_ALL=C parted $1 -s unit cyl print |awk '/^Disk/ { print $3 }'|sed -e 's/cyl//')
+
+if [ $datadir -eq 0 ];then
+ rootsize=$(($maxsize-2))
+else
+ rootsize=$(($maxsize-34))
+ datasize=$(($maxsize-2))
+fi
-$parted -s $1 unit cyl mkpart primary fat32 -- 0 16
-$parted -s $1 unit cyl mkpart primary ext2 -- 16 $rootsize
-$parted -s $1 unit cyl mkpart primary fat32 $rootsize $maxsize
-$parted -s $1 set 1 boot on
-$sfdisk --change-id $1 3 88
+parted -s $1 unit cyl mkpart primary fat32 -- 0 16
+if [ $datadir -eq 0 ];then
+ parted -s $1 unit cyl mkpart primary ext2 -- 16 $rootsize
+ parted -s $1 unit cyl mkpart primary fat32 $rootsize $maxsize
+ sfdisk --change-id $1 3 88
+else
+ parted -s $1 unit cyl mkpart primary ext2 -- 16 $rootsize
+ parted -s $1 unit cyl mkpart primary ext2 $rootsize $datasize
+ parted -s $1 unit cyl mkpart primary fat32 $datasize $maxsize
+ parted -s $1 set 1 boot on
+ sfdisk --change-id $1 4 88
+fi
sleep 2
-mkfs.vfat ${1}1
-$mke2fs ${1}2
+mkfs.vfat ${1}1 >/dev/null
+mkfs.ext4 -q -O ^huge_file ${1}2
+if [ $datadir -eq 1 ];then
+ if [ $keep -eq 0 ];then
+ mkfs.ext4 -q -O ^huge_file ${1}3
+ fi
+fi
sync
sleep 2
tmp=$(mktemp -d)
-mount -t ext2 ${rootpart} $tmp
+mount -t ext4 ${rootpart} $tmp
mkdir $tmp/boot
+if [ $datadir -eq 1 ];then
+ if [ $keep -eq 0 ];then
+ mkdir $tmp/data
+ mount -t ext4 ${1}3 $tmp/data
+ mkdir $tmp/data/mpd $tmp/data/xbmc
+ umount $tmp/data
+ fi
+fi
mount -t vfat ${1}1 $tmp/boot
-sleep 2
-printf "Extracting install archive\n"
+sleep 1
+echo "Extracting install archive"
tar -C $tmp -xzpf $2
-printf "Fixing permissions\n"
+echo "Fixing permissions"
chmod 1777 $tmp/tmp
chmod 4755 $tmp/bin/busybox
+if [ $datadir -eq 1 ];then
+ echo "/dev/mmcblk0p3 /data ext4 rw 0 0" >>$tmp/etc/fstab
+fi
umount $tmp/boot
umount $tmp
-printf "Successfully installed.\n"
+echo "Successfully installed."
exit 0
diff --git a/scripts/scan-tools.sh b/scripts/scan-tools.sh
index 33365483a..f513b5861 100644
--- a/scripts/scan-tools.sh
+++ b/scripts/scan-tools.sh
@@ -196,24 +196,138 @@ 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
-if ! which git >/dev/null 2>&1; then
- echo "You need git to continue."
- echo
- out=1
+# 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
+ if ! xargs --version 2>/dev/null|grep GNU >/dev/null;then
+ echo "No GNU xargs found, will build one."
+ host_build_findutils=1
+ fi
+ fi
+fi
+
+if ! which gfind >/dev/null 2>&1; then
+ if which find >/dev/null 2>&1; then
+ if ! find --version 2>/dev/null|grep GNU >/dev/null;then
+ echo "No GNU find found, will build one."
+ host_build_findutils=1
+ fi
+ 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_cdrtools=0
+if ! which mkisofs >/dev/null 2>&1; then
+ echo "No mkisofs found, will build one when required."
+ host_build_cdrtools=1
+fi
+
+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_genext2fs=0
+if ! which genext2fs >/dev/null 2>&1; then
+ echo "No genext2fs found, will build one when required."
+ host_build_genext2fs=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
+
+host_build_qemu=0
+if ! which qemu-img >/dev/null 2>&1; then
+ echo "No qemu found, will build one when required."
+ host_build_qemu=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_cdrtools -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_CDRTOOLS if ADK_HOST_NEED_CDRTOOLS" >> $topdir/target/config/Config.in.prereq ;fi
+if [ $host_build_genext2fs -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_GENEXT2FS if ADK_HOST_NEED_GENEXT2FS" >> $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
+if [ $host_build_qemu -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_QEMU if ADK_HOST_NEED_QEMU" >> $topdir/target/config/Config.in.prereq ;fi
+
cd $topdir
rm -rf tmp
diff --git a/scripts/tarpkg b/scripts/tarpkg
index 37c0b2079..40342d401 100755
--- a/scripts/tarpkg
+++ b/scripts/tarpkg
@@ -16,14 +16,14 @@ if [ "$1" = "build" ];then
chmod +x ${2}/usr/lib/pkg/${pkgname}.$file )
done
rm -rf $2/CONTROL
- (cd $2 && tar -czf $3/${pkgname}_${version}_${arch}.tar.gz .)
+ (cd $2 && tar -cJf $3/${pkgname}_${version}_${arch}.tar.xz .)
elif [ "$1" = "install" ];then
pkg=$(echo $(basename $2)|sed -e "s#_.*##")
if [ -x ${PKG_INSTROOT}/usr/lib/pkg/${pkg}.preinst ]; then
IPKG_INSTROOT="$PKG_INSTROOT" ${PKG_INSTROOT}/usr/lib/pkg/${pkg}.preinst
rm ${PKG_INSTROOT}/usr/lib/pkg/${pkg}.preinst
fi
- tar -xzpf $2 -C ${PKG_INSTROOT}
+ tar -xJpf $2 -C ${PKG_INSTROOT}
if [ -x ${PKG_INSTROOT}/usr/lib/pkg/${pkg}.postinst ]; then
IPKG_INSTROOT="$PKG_INSTROOT" ${PKG_INSTROOT}/usr/lib/pkg/${pkg}.postinst
rm ${PKG_INSTROOT}/usr/lib/pkg/${pkg}.postinst
diff --git a/scripts/toolchain.cmake.in b/scripts/toolchain.cmake.in
new file mode 100644
index 000000000..150bfcb27
--- /dev/null
+++ b/scripts/toolchain.cmake.in
@@ -0,0 +1,10 @@
+set(CMAKE_SYSTEM_NAME Linux)
+set(CMAKE_C_COMPILER @@TARGET_CC@@)
+set(CMAKE_CXX_COMPILER @@TARGET_CXX@@)
+set(CMAKE_INSTALL_SO_NO_EXE 0)
+set(CMAKE_PROGRAM_PATH \"@@STAGING_HOST_DIR@@/usr/bin\")
+set(CMAKE_FIND_ROOT_PATH \"@@STAGING_TARGET_DIR@@\")
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+set(ENV{PKG_CONFIG_SYSROOT_DIR} \"@@STAGING_TARGET_DIR@@\")
diff --git a/scripts/xargs b/scripts/xargs
deleted file mode 100755
index cbe9bd015..000000000
--- a/scripts/xargs
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/env bash
-# This file is part of the OpenADK project. OpenADK is copyrighted
-# material, please see the LICENCE file in the top-level directory.
-
-if [ -z "$(which gxargs 2>/dev/null)" ];then
- /usr/bin/xargs "$@"
-else
- gxargs "$@"
-fi
diff --git a/target/arm/Makefile b/target/arm/Makefile
index a2bd23a8b..f781bdd27 100644
--- a/target/arm/Makefile
+++ b/target/arm/Makefile
@@ -59,13 +59,13 @@ endif
@echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI),y)
@echo "Use following command to install it on SD card:"
- @echo "sudo ./scripts/install-rpi.sh /dev/sdb $(FW_DIR)/$(ROOTFSTARBALL)"
+ @echo "sudo ./scripts/install-rpi.sh /dev/sdx $(FW_DIR)/$(ROOTFSTARBALL)"
endif
ifeq ($(ADK_TARGET_SYSTEM_QEMU_ARM)$(ADK_TARGET_SYSTEM_QEMU_ARMHF),y)
@cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
@echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
@echo "Use following command to create a QEMU Image:"
- @echo "./scripts/create.sh +g qemu-${CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
+ @echo "./scripts/create.sh qemu-${CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
@echo "Start qemu with following options:"
@echo 'qemu-system-arm -M $(MACH) -nographic $(NET) -kernel $(FW_DIR)/$(TARGET_KERNEL) -hda qemu-${CPU_ARCH}.img'
endif
diff --git a/target/arm/cubox-i/patches/3.10.33/solidrun-cubox-i.patch b/target/arm/cubox-i/patches/3.10.34/solidrun-cubox-i.patch
index beaa71b4e..beaa71b4e 100644
--- a/target/arm/cubox-i/patches/3.10.33/solidrun-cubox-i.patch
+++ b/target/arm/cubox-i/patches/3.10.34/solidrun-cubox-i.patch
diff --git a/target/arm/kernel/qemu-arm-versatilepb b/target/arm/kernel/qemu-arm-versatilepb
index 29a82ccf6..ec76019d4 100644
--- a/target/arm/kernel/qemu-arm-versatilepb
+++ b/target/arm/kernel/qemu-arm-versatilepb
@@ -7,6 +7,7 @@ CONFIG_PLAT_VERSATILE_CLCD=y
CONFIG_PLAT_VERSATILE_SCHED_CLOCK=y
CONFIG_PLAT_VERSATILE=y
CONFIG_ARM_TIMER_SP804=y
+CONFIG_KUSER_HELPERS=y
CONFIG_CPU_ARM926T=y
CONFIG_CPU_32v5=y
CONFIG_ARM_AMBA=y
diff --git a/target/arm/kernel/qemu-arm-vexpress-a9 b/target/arm/kernel/qemu-arm-vexpress-a9
index 7415e31b4..b89b87337 100644
--- a/target/arm/kernel/qemu-arm-vexpress-a9
+++ b/target/arm/kernel/qemu-arm-vexpress-a9
@@ -6,6 +6,7 @@ CONFIG_ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA=y
CONFIG_ARCH_VEXPRESS_CA9X4=y
CONFIG_ARCH_VEXPRESS_DCSCB=y
CONFIG_ARCH_VEXPRESS_TC2_PM=y
+CONFIG_KUSER_HELPERS=y
CONFIG_ARM_AMBA=y
CONFIG_AEABI=y
CONFIG_ATAGS=y
diff --git a/target/arm/raspberry-pi/patches/3.10.33/raspberry-pi.patch b/target/arm/raspberry-pi/patches/3.10.34/raspberry-pi.patch
index 2c313a843..2c313a843 100644
--- a/target/arm/raspberry-pi/patches/3.10.33/raspberry-pi.patch
+++ b/target/arm/raspberry-pi/patches/3.10.34/raspberry-pi.patch
diff --git a/target/arm/sys-available/acmesystems-foxg20 b/target/arm/sys-available/acmesystems-foxg20
index f3aded1d6..ac2ec191c 100644
--- a/target/arm/sys-available/acmesystems-foxg20
+++ b/target/arm/sys-available/acmesystems-foxg20
@@ -7,7 +7,6 @@ config ADK_TARGET_SYSTEM_ACMESYSTEMS_FOXG20
select ADK_acmesystems_foxg20
select ADK_KERNEL_AEABI
select ADK_TARGET_WITH_WATCHDOG
- select ADK_TARGET_WITH_MMC
select ADK_TARGET_WITH_RTC
select ADK_TARGET_WITH_USB
select ADK_TARGET_KERNEL_IMAGE
diff --git a/target/arm/sys-available/cubox-i b/target/arm/sys-available/cubox-i
index 97a9a84b4..3b96514c8 100644
--- a/target/arm/sys-available/cubox-i
+++ b/target/arm/sys-available/cubox-i
@@ -7,11 +7,11 @@ config ADK_TARGET_SYSTEM_CUBOX_I
select ADK_fpu_neon
select ADK_cubox_i
select ADK_CPU_CORTEX_A9
- select ADK_TARGET_WITH_MMC
select ADK_TARGET_WITH_VGA
select ADK_TARGET_WITH_USB
select ADK_TARGET_WITH_INPUT
select ADK_TARGET_KERNEL_ZIMAGE
+ select ADK_TARGET_WITH_ROOT_RW
select ADK_PACKAGE_U_BOOT_CUBOX_I
help
Cubox-i
diff --git a/target/arm/sys-available/qemu-arm b/target/arm/sys-available/qemu-arm
index aeaa41d44..1fa057c4b 100644
--- a/target/arm/sys-available/qemu-arm
+++ b/target/arm/sys-available/qemu-arm
@@ -4,7 +4,6 @@ config ADK_TARGET_SYSTEM_QEMU_ARM
select ADK_qemu_arm
select ADK_little
select ADK_soft_float
- select ADK_fpu_vfp
select ADK_eabi
select ADK_HARDWARE_QEMU
select ADK_TARGET_KERNEL_ZIMAGE
diff --git a/target/arm/sys-available/raspberry-pi b/target/arm/sys-available/raspberry-pi
index e91e0e4a1..319df3523 100644
--- a/target/arm/sys-available/raspberry-pi
+++ b/target/arm/sys-available/raspberry-pi
@@ -7,11 +7,11 @@ config ADK_TARGET_SYSTEM_RASPBERRY_PI
select ADK_fpu_vfp
select ADK_raspberry_pi
select ADK_CPU_ARM1176JZF_S
- select ADK_TARGET_WITH_MMC
select ADK_TARGET_WITH_VGA
select ADK_TARGET_WITH_USB
select ADK_TARGET_WITH_INPUT
select ADK_PACKAGE_BCM2835_BOOTLOADER
+ select ADK_TARGET_WITH_ROOT_RW
select ADK_TARGET_KERNEL_ZIMAGE
help
Raspberry PI
diff --git a/target/arm/sys-available/toolchain-arm b/target/arm/sys-available/toolchain-arm
index 3ad081933..b9ba30aa5 100644
--- a/target/arm/sys-available/toolchain-arm
+++ b/target/arm/sys-available/toolchain-arm
@@ -7,7 +7,7 @@ config ADK_TARGET_SYSTEM_TOOLCHAIN_ARM
select ADK_fpu_vfp
select ADK_eabi
select ADK_TOOLCHAIN
- select ADK_TARGET_PACKAGE_TGZ
+ select ADK_TARGET_PACKAGE_TXZ
select ADK_CPU_CORTEX_A9
help
ARM toolchain (soft float) for Cortex A9.
diff --git a/target/arm/sys-available/toolchain-armhf b/target/arm/sys-available/toolchain-armhf
index 8a2db49a8..252a41aa2 100644
--- a/target/arm/sys-available/toolchain-armhf
+++ b/target/arm/sys-available/toolchain-armhf
@@ -7,7 +7,7 @@ config ADK_TARGET_SYSTEM_TOOLCHAIN_ARMHF
select ADK_fpu_vfp
select ADK_toolchain_armhf
select ADK_TOOLCHAIN
- select ADK_TARGET_PACKAGE_TGZ
+ select ADK_TARGET_PACKAGE_TXZ
select ADK_CPU_CORTEX_A9
help
ARM toolchain (hard float) for Cortex A9.
diff --git a/target/arm/target.mk b/target/arm/target.mk
index 677e112f7..87db1e279 100644
--- a/target/arm/target.mk
+++ b/target/arm/target.mk
@@ -1,5 +1,4 @@
include $(TOPDIR)/mk/kernel-ver.mk
ARCH:= arm
CPU_ARCH:= $(ADK_TARGET_CPU_ARCH)
-TARGET_OPTIMIZATION:= -Os -pipe
TARGET_CFLAGS_ARCH:= $(ADK_TARGET_CFLAGS)
diff --git a/target/config/Config.in b/target/config/Config.in
index 05f495449..d7bf385a2 100644
--- a/target/config/Config.in
+++ b/target/config/Config.in
@@ -139,7 +139,7 @@ config ADK_TARGET_MIPS_ABI
choice
prompt "Target ABI"
-depends on ADK_LINUX_64 && ADK_LINUX_MIPS && !ADK_TOOLCHAIN
+depends on ADK_LINUX_64 && ADK_LINUX_MIPS && !ADK_TOOLCHAIN && !ADK_HARDWARE_QEMU
config ADK_TARGET_ABI_N32
boolean "N32 ABI (new)"
@@ -157,7 +157,7 @@ endchoice
choice
prompt "Target ABI"
-depends on ADK_LINUX_64 && ADK_LINUX_X86_64 && !ADK_TOOLCHAIN
+depends on ADK_LINUX_64 && ADK_LINUX_X86_64 && !ADK_TOOLCHAIN && !ADK_HARDWARE_QEMU
config ADK_TARGET_ABI_64
boolean "64 Bit ABI"
@@ -175,6 +175,7 @@ endchoice
config ADK_TARGET_LIBC_PATH
string
+ default "lib" if ADK_32
default "lib32" if ADK_n32
default "libx32" if ADK_x32
default "lib64" if ADK_n64 \
@@ -193,37 +194,54 @@ config ADK_TARGET_KERNEL_MINICONFIG
default "qemu-arm-spitz" if ADK_TARGET_QEMU_ARM_MODEL_SPITZ
default "qemu-mips" if ADK_TARGET_SYSTEM_QEMU_MIPS
default "qemu-mipsel" if ADK_TARGET_SYSTEM_QEMU_MIPSEL
- default "qemu-mips64" if ADK_TARGET_SYSTEM_QEMU_MIPS64
- default "qemu-mips64el" if ADK_TARGET_SYSTEM_QEMU_MIPS64EL
+ default "qemu-mips64" if ADK_TARGET_SYSTEM_QEMU_MIPS64 || ADK_TARGET_SYSTEM_QEMU_MIPS64N32 || ADK_TARGET_SYSTEM_QEMU_MIPS64N64
+ default "qemu-mips64el" if ADK_TARGET_SYSTEM_QEMU_MIPS64EL || ADK_TARGET_SYSTEM_QEMU_MIPS64ELN32 || ADK_TARGET_SYSTEM_QEMU_MIPS64ELN64
default "qemu-ppc" if ADK_TARGET_SYSTEM_QEMU_PPC
default "qemu-ppc64" if ADK_TARGET_SYSTEM_QEMU_PPC64
default "qemu-sh" if ADK_TARGET_SYSTEM_QEMU_SH4
default "qemu-sh" if ADK_TARGET_SYSTEM_QEMU_SH4EB
default "qemu-sparc" if ADK_TARGET_SYSTEM_QEMU_SPARC
default "qemu-sparc64" if ADK_TARGET_SYSTEM_QEMU_SPARC64
- default "qemu-i686" if ADK_TARGET_SYSTEM_QEMU_I686
- default "qemu-x86_64" if ADK_TARGET_SYSTEM_QEMU_X86_64
+ default "qemu-x86" if ADK_TARGET_SYSTEM_QEMU_I686 || ADK_TARGET_SYSTEM_QEMU_I486
+ default "qemu-x86_64" if ADK_TARGET_SYSTEM_QEMU_X86_64 || ADK_TARGET_SYSTEM_QEMU_X86_64_32 || ADK_TARGET_SYSTEM_QEMU_X86_64_X32
default "aranym-m68k" if ADK_TARGET_SYSTEM_ARANYM_M68K
default "ibm-x40" if ADK_TARGET_SYSTEM_IBM_X40
default "cubox-i" if ADK_TARGET_SYSTEM_CUBOX_I
default "raspberry-pi" if ADK_TARGET_SYSTEM_RASPBERRY_PI
default "sharp-zaurus" if ADK_TARGET_SYSTEM_SHARP_ZAURUS
default "lemote-yeelong" if ADK_TARGET_SYSTEM_LEMOTE_YEELONG
+ default "generic-pc" if ADK_TARGET_SYSTEM_GENERIC_PC
config ADK_QEMU_ARGS
string
default "-nographic" if ADK_TARGET_QEMU_WITHOUT_GRAPHIC
+menu "Qemu configuration"
+depends on ADK_HARDWARE_QEMU
+
+choice
+prompt "Use a Bootloader"
+depends on ADK_TARGET_SYSTEM_QEMU_X86_64 || ADK_LINUX_X86
+
+config ADK_TARGET_QEMU_WITHOUT_BOOTLOADER
+ boolean "do not use bootloader"
+
+config ADK_TARGET_QEMU_WITH_BOOTLOADER
+ boolean "use bootloader"
+ select ADK_PACKAGE_GRUB if ADK_TARGET_SYSTEM_QEMU_X86_64 || ADK_LINUX_X86
+
+endchoice
+
choice
prompt "Qemu MICROBLAZE Emulation"
depends on ADK_TARGET_SYSTEM_QEMU_MICROBLAZE || ADK_TARGET_SYSTEM_QEMU_MICROBLAZEEL
-config ADK_TARGET_QEMU_MICROBLAZE_MODEL_ML605
- boolean "Xilinx ml605"
-
config ADK_TARGET_QEMU_MICROBLAZE_MODEL_S3ADSP1800
boolean "Xilinx Spartan S3ADSP1800"
+config ADK_TARGET_QEMU_MICROBLAZE_MODEL_ML605
+ boolean "Xilinx ml605"
+
endchoice
choice
@@ -254,6 +272,8 @@ choice
prompt "Qemu Emulation with permanent storage device (disk/flash)"
depends on ADK_HARDWARE_QEMU
default ADK_TARGET_QEMU_WITH_BLOCK if ADK_TARGET_ROOTFS_ARCHIVE
+default ADK_TARGET_QEMU_WITH_BLOCK if ADK_TARGET_ROOTFS_SQUASHFS
+default ADK_TARGET_QEMU_WITH_BLOCK if ADK_TARGET_ROOTFS_JFFS2
config ADK_TARGET_QEMU_WITHOUT_BLOCK
boolean "disabled"
@@ -261,8 +281,8 @@ config ADK_TARGET_QEMU_WITHOUT_BLOCK
config ADK_TARGET_QEMU_WITH_BLOCK
boolean "enabled"
select ADK_KERNEL_SCSI_SYM53C8XX_2 if ADK_TARGET_QEMU_ARM_MODEL_VERSATILEPB
- select ADK_KERNEL_MTD_M25P80 if ADK_TARGET_QEMU_MICROBLAZE_MODEL_ML605
- select ADK_KERNEL_ATA_PIIX if ADK_LINUX_MIPS || ADK_TARGET_SYSTEM_QEMU_I686 || ADK_TARGET_SYSTEM_QEMU_X86_64
+ select ADK_KERNEL_MTD_M25P80 if ADK_TARGET_QEMU_MICROBLAZE_MODEL_ML605 || ADK_TARGET_QEMU_MICROBLAZE_MODEL_S3ADSP1800
+ select ADK_KERNEL_ATA_PIIX if ADK_LINUX_MIPS || ADK_LINUX_X86 || ADK_TARGET_SYSTEM_QEMU_X86_64
select ADK_KERNEL_PATA_MACIO if ADK_TARGET_SYSTEM_QEMU_PPC
select ADK_KERNEL_SCSI_IBMVSCSI if ADK_TARGET_SYSTEM_QEMU_PPC64
select ADK_KERNEL_SCSI_SUNESP if ADK_TARGET_SYSTEM_QEMU_SPARC
@@ -285,15 +305,15 @@ config ADK_TARGET_QEMU_WITH_GRAPHIC
select ADK_KERNEL_FONT_8x16
select ADK_KERNEL_FB
select ADK_KERNEL_FRAMEBUFFER_CONSOLE
- select ADK_KERNEL_FB_SM501 if ADK_TARGET_SYSTEM_QEMU_SH4 || ADK_TARGET_SYSTEM_QEMU_SH4EB
- select ADK_KERNEL_FB_CIRRUS if ADK_TARGET_SYSTEM_QEMU_I686 || ADK_TARGET_SYSTEM_QEMU_X86_64
+ select ADK_KERNEL_FB_SM501 if ADK_LINUX_SH
+ select ADK_KERNEL_FB_CIRRUS if ADK_LINUX_X86 || ADK_TARGET_SYSTEM_QEMU_X86_64
select ADK_KERNEL_FB_PXA if ADK_TARGET_QEMU_ARM_MODEL_SPITZ
select ADK_KERNEL_INPUT
select ADK_KERNEL_INPUT_KEYBOARD
- select ADK_KERNEL_KEYBOARD_ATKBD if ADK_TARGET_SYSTEM_QEMU_I686 || ADK_TARGET_SYSTEM_QEMU_X86_64
+ select ADK_KERNEL_KEYBOARD_ATKBD if ADK_LINUX_X86 || ADK_TARGET_SYSTEM_QEMU_X86_64
select ADK_KERNEL_INPUT_MOUSE
select ADK_KERNEL_INPUT_MOUSEDEV
- select ADK_KERNEL_USB_HID if ADK_TARGET_SYSTEM_QEMU_SH4 || ADK_TARGET_SYSTEM_QEMU_SH4EB
+ select ADK_KERNEL_USB_HID if ADK_LINUX_SH
endchoice
@@ -317,6 +337,7 @@ config ADK_TARGET_QEMU_WITH_VIRTIO
endchoice
+endmenu
choice
prompt "Use ARM thumb mode"
@@ -355,12 +376,6 @@ config ADK_TARGET_WITH_ACPI
config ADK_TARGET_WITH_VGA
boolean
-config ADK_TARGET_WITH_CF
- boolean
-
-config ADK_TARGET_WITH_MMC
- boolean
-
config ADK_TARGET_WITH_NAND
boolean
@@ -657,7 +672,8 @@ config ADK_TARGET_LIB_UCLIBC
!ADK_LINUX_MICROBLAZE && \
!ADK_LINUX_SPARC64 && \
!ADK_LINUX_PPC64 && \
- !ADK_TARGET_ABI_X32
+ !ADK_x32 && \
+ !ADK_32
help
http://uclibc.org
@@ -747,7 +763,6 @@ config ADK_TARGET_ROOTFS_INITRAMFS
depends on !ADK_HARDWARE_VBOX
depends on !ADK_TARGET_SYSTEM_RASPBERRY_PI
select ADK_KERNEL_BLK_DEV_INITRD
- select ADK_KERNEL_BLK_DEV_RAM if ADK_TARGET_SYSTEM_ARANYM_M68K
help
create an read-only initramfs system.
@@ -774,15 +789,17 @@ config ADK_TARGET_ROOTFS_SQUASHFS
bool "Compressed read-only root filesystem (squashfs)"
select ADK_KERNEL_SQUASHFS
select ADK_HOST_NEED_SQUASHFS
+ select ADK_HOST_NEED_QEMU if ADK_HARDWARE_QEMU
+ select ADK_TARGET_QEMU_WITH_BLOCK if ADK_HARDWARE_QEMU
depends on ADK_TARGET_WITH_MTD
help
highly compressed read-only filesystem for MTD flash systems.
config ADK_TARGET_ROOTFS_JFFS2
bool "Compressed read-write root filesystem (jffs2)"
- select ADK_KERNEL_MISC_FILESYSTEMS
- select ADK_KERNEL_JFFS2
- select ADK_HOST_NEED_JFFS2
+ select ADK_KERNEL_JFFS2_FS
+ select ADK_HOST_NEED_MTD_UTILS
+ select ADK_TARGET_QEMU_WITH_BLOCK if ADK_HARDWARE_QEMU
depends on ADK_TARGET_WITH_MTD
help
compressed read-write filesystem for MTD flash systems.
@@ -827,43 +844,15 @@ config ADK_TARGET_ROOTFS_USB
help
Boot system from USB stick.
-config ADK_TARGET_ROOTFS_CF
- bool "read-write filesystem for compact flash"
- depends on ADK_TARGET_WITH_CF
- select ADK_KERNEL_EXT2_FS
- select ADK_KERNEL_SCSI
- help
- Use this option if you have a compact flash based system.
- (ext2 filesystem is used.)
-
-config ADK_TARGET_ROOTFS_GENEXT2FS
- bool "read-write filesystem for compact flash (genext2fs version)"
- depends on ADK_TARGET_WITH_CF
- select ADK_KERNEL_EXT2_FS
- select ADK_KERNEL_SCSI
- select ADK_HOST_NEED_GENEXT2FS
- help
- Use this option if you have a compact flash based system.
- (ext2 filesystem is used.)
-
-config ADK_TARGET_ROOTFS_MMC
- bool "read-write filesystem for mmc/sdcard"
- depends on ADK_TARGET_WITH_MMC
- select ADK_KERNEL_EXT2_FS
- select ADK_KERNEL_SCSI
- depends on !ADK_TARGET_SYSTEM_RASPBERRY_PI
- help
- Use this option if you have a MMC/SDCARD based system.
- (ext2 filesystem is used.)
-
config ADK_TARGET_ROOTFS_ISO
bool "ISO image"
select ADK_KERNEL_ISO9660_FS
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
@@ -872,7 +861,7 @@ config ADK_TARGET_ROOTFS_ISO
config ADK_TARGET_ROOTFS_INITRAMFSARCHIVE
bool "Archive usable for initramfs creation"
help
- Use this option if your palnning to create a initramfs,
+ Use this option if your planning to create a initramfs,
useful for adk-test-framework.
config ADK_TARGET_ROOTFS_ARCHIVE
@@ -939,11 +928,12 @@ config ADK_TARGET_ROOTFS
config ADK_PACKAGE_SUFFIX
string
default "ipk" if ADK_TARGET_PACKAGE_IPKG
- default "tar.gz" if ADK_TARGET_PACKAGE_TGZ
+ default "tar.xz" if ADK_TARGET_PACKAGE_TXZ
help
choice
prompt "Target package format"
+default ADK_TARGET_PACKAGE_TXZ if ADK_PKG_TEST
default ADK_TARGET_PACKAGE_IPKG
depends on !ADK_CHOOSE_TARGET_SYSTEM && !ADK_CHOOSE_TARGET_ARCH
@@ -954,9 +944,9 @@ config ADK_TARGET_PACKAGE_IPKG
help
Create ipkg packages and use ipkg package management on the target.
-config ADK_TARGET_PACKAGE_TGZ
+config ADK_TARGET_PACKAGE_TXZ
boolean
- prompt "tar archive"
+ prompt "xz compressed tar archive"
help
Create compressed tar archives of packages.
Pre- and post install scripts will be executed in the target
diff --git a/target/config/Config.in.adk b/target/config/Config.in.adk
index 27b72941e..7487ac056 100644
--- a/target/config/Config.in.adk
+++ b/target/config/Config.in.adk
@@ -19,6 +19,13 @@ config ADK_DL_DIR
Configure the download directory for all source packages.
Use an absolute path.
+config ADK_TARGET_CFLAGS_OPT
+ string "optimization flags for compiler"
+ default "-Os -pipe"
+ help
+ Compilation is only verfied with optimization for code size (Os).
+ Other stuff (O2) might break. Will not be used when ADK_DEBUG is on.
+
config ADK_DEBUG
bool "Compile applications with debug support by default"
default n
@@ -26,6 +33,13 @@ config ADK_DEBUG
All packages and libc will be compiled and packaged with debug information.
Mostly useful for NFS root or big USB/CF or hard disk setups.
+config ADK_DEBUG_OPTS
+ bool "use optimization cflags"
+ depends on ADK_DEBUG
+ default n
+ help
+ All packages and libc will be compiled with debug information and optimization flags on.
+
config ADK_DEBUG_STRIP
bool "strip target binaries/libraries for gdbserver usage"
depends on ADK_DEBUG
diff --git a/target/config/Config.in.runtime b/target/config/Config.in.runtime
index 721f623de..ea023d0df 100644
--- a/target/config/Config.in.runtime
+++ b/target/config/Config.in.runtime
@@ -7,6 +7,14 @@ config ADK_RUNTIME_HOSTNAME
help
Set your target hostname.
+config ADK_RUNTIME_START_SERVICES
+ prompt "start some services by default"
+ boolean
+ default n
+ help
+
+source "target/config/Config.in.scripts"
+
config ADK_RUNTIME_SSH_PUBKEY
string "SSH public key (root user only)"
default ""
@@ -38,6 +46,7 @@ config ADK_RUNTIME_TIMEZONE
choice
prompt "Start getty or shell after bootup"
+default ADK_RUNTIME_SHELL if ADK_PKG_TEST
default ADK_RUNTIME_GETTY
config ADK_RUNTIME_GETTY
@@ -59,6 +68,7 @@ config ADK_RUNTIME_GETTY_VGA
default y if ADK_TARGET_SYSTEM_RASPBERRY_PI
default y if ADK_TARGET_SYSTEM_LEMOTE_YEELONG
default y if ADK_TARGET_SYSTEM_IBM_X40
+ default y if ADK_TARGET_SYSTEM_ARANYM_M68K
default n
help
Start getty on VGA console. (tty1-tty6)
@@ -69,6 +79,7 @@ config ADK_RUNTIME_GETTY_SERIAL
default n if ADK_TARGET_SYSTEM_RASPBERRY_PI
default n if ADK_TARGET_SYSTEM_LEMOTE_YEELONG
default n if ADK_TARGET_SYSTEM_IBM_X40
+ default n if ADK_TARGET_SYSTEM_ARANYM_M68K
default y
help
Start getty on serial console.
@@ -80,7 +91,6 @@ config ADK_RUNTIME_CONSOLE_SERIAL_DEVICE
default "ttyAMA0" if ADK_TARGET_QEMU_ARM_MODEL_VERSATILEPB || ADK_TARGET_QEMU_ARM_MODEL_VEXPRESS_A9
default "ttySC1" if ADK_TARGET_SYSTEM_QEMU_SH4 || ADK_TARGET_SYSTEM_QEMU_SH4EB
default "ttymxc0" if ADK_TARGET_SYSTEM_CUBOX_I
- default "nfcon0" if ADK_TARGET_SYSTEM_ARANYM_M68K
default "ttyS0"
config ADK_RUNTIME_CONSOLE_SERIAL_SPEED
diff --git a/target/config/Config.in.tools b/target/config/Config.in.tools
index 7e37f5ec1..b3e900bb3 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_ADK_HELPER
+ 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_NEED_SQUASHFS
+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_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_BUILD_CCACHE
+ boolean
+ default n
+
+config ADK_HOST_NEED_CDRTOOLS
boolean
default n
-config ADK_HOST_NEED_JFFS2
+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,19 +77,74 @@ 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_PCRE
+config ADK_HOST_NEED_MKSH
+ boolean
+ default n
+
+config ADK_HOST_BUILD_MKSH
+ boolean
+ default n
+
+config ADK_HOST_NEED_QEMU
+ boolean
+ default n
+
+config ADK_HOST_BUILD_QEMU
+ boolean
+ default n
+
+# optional, must be used from OpenADK
+config ADK_HOST_NEED_MKIMAGE
+ boolean
+ default n
+
+config ADK_HOST_BUILD_MKIMAGE
+ boolean
+ default y if ADK_HOST_NEED_MKIMAGE
+ default n
+
+config ADK_HOST_NEED_MTD_UTILS
+ boolean
+ default n
+
+config ADK_HOST_BUILD_MTD_UTILS
+ boolean
+ default y if ADK_HOST_NEED_MTD_UTILS
+ default n
+
+config ADK_HOST_NEED_SQUASHFS
+ boolean
+ default n
+
+config ADK_HOST_BUILD_SQUASHFS
+ boolean
+ default y if ADK_HOST_NEED_SQUASHFS
+ default n
+
+config ADK_HOST_NEED_SYSLINUX
+ boolean
+ default n
+
+config ADK_HOST_BUILD_SYSLINUX
+ boolean
+ default y if ADK_HOST_NEED_SYSLINUX
+ 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/linux/config/Config.in.audio b/target/linux/config/Config.in.audio
index a1a5077e6..f87a7e751 100644
--- a/target/linux/config/Config.in.audio
+++ b/target/linux/config/Config.in.audio
@@ -124,7 +124,7 @@ config ADK_KPACKAGE_KMOD_SND_BCM2708_SOC_I2S
select ADK_KPACKAGE_KMOD_SND
select ADK_KERNEL_SND_ARM
select ADK_KPACKAGE_KMOD_SND_SOC
- select ADK_KPACKAGE_KMOD_SND_PCM_DMAENGINE
+ select ADK_KPACKAGE_KMOD_SND_PCM_DMAENGINE if !ADK_KERNEL_VERSION_3_10_34
select ADK_KPACKAGE_KMOD_SND_COMPRESS
depends on ADK_TARGET_SYSTEM_RASPBERRY_PI
default n
diff --git a/target/linux/config/Config.in.block b/target/linux/config/Config.in.block
index dd7c96dc5..9f1328809 100644
--- a/target/linux/config/Config.in.block
+++ b/target/linux/config/Config.in.block
@@ -106,6 +106,7 @@ config ADK_KERNEL_SCSI_SUNESP
config ADK_KERNEL_PATA_MACIO
select ADK_KERNEL_SCSI
select ADK_KERNEL_ATA
+ select ADK_KERNEL_ATA_SFF
select ADK_KERNEL_ATA_BMDMA
select ADK_KERNEL_BLK_DEV
select ADK_KERNEL_BLK_DEV_SD
@@ -114,6 +115,7 @@ config ADK_KERNEL_PATA_MACIO
config ADK_KERNEL_PATA_PLATFORM
select ADK_KERNEL_SCSI
select ADK_KERNEL_ATA
+ select ADK_KERNEL_ATA_SFF
select ADK_KERNEL_ATA_BMDMA
select ADK_KERNEL_BLK_DEV
select ADK_KERNEL_BLK_DEV_SD
diff --git a/target/linux/config/Config.in.debug b/target/linux/config/Config.in.debug
index 019c439d8..a1c7ae6c9 100644
--- a/target/linux/config/Config.in.debug
+++ b/target/linux/config/Config.in.debug
@@ -34,7 +34,7 @@ config ADK_KERNEL_PRINTK
boolean
select ADK_KERNEL_EARLY_PRINTK
default y
- #depends on !ADK_PKG_TEST
+ depends on !ADK_PKG_TEST
help
Disable printk to save space and quieten bootup.
diff --git a/target/linux/config/Config.in.flash b/target/linux/config/Config.in.flash
index d8f4faf0f..d35f1c866 100644
--- a/target/linux/config/Config.in.flash
+++ b/target/linux/config/Config.in.flash
@@ -87,7 +87,6 @@ config ADK_KERNEL_MTD_OF_PARTS
default n
config ADK_KERNEL_MTD_M25P80
- select ADK_KERNEL_BLOCK
select ADK_KERNEL_MTD
select ADK_KERNEL_MTD_PARTITIONS
select ADK_KERNEL_MTD_CHAR
@@ -99,6 +98,8 @@ config ADK_KERNEL_MTD_M25P80
select ADK_KERNEL_MTD_PHYSMAP
select ADK_KERNEL_MTD_PHYSMAP_OF
select ADK_KERNEL_MTD_OF_PARTS
+ select ADK_KERNEL_SPI
+ select ADK_KERNEL_SPI_MASTER
boolean
default n
@@ -111,7 +112,6 @@ config ADK_KERNEL_MTD_AR2315
config ADK_TARGET_NAND
boolean
- select ADK_KERNEL_BLOCK
select ADK_KERNEL_MISC_FILESYSTEMS
select ADK_KERNEL_YAFFS_FS
select ADK_KERNEL_YAFFS_YAFFS2
@@ -128,7 +128,6 @@ config ADK_TARGET_NAND
config ADK_TARGET_MTD
boolean
- select ADK_KERNEL_BLOCK
select ADK_KERNEL_MISC_FILESYSTEMS
select ADK_KERNEL_JFFS2_FS
select ADK_KERNEL_MTD
@@ -145,6 +144,6 @@ config ADK_TARGET_MTD
config ADK_TARGET_MTD_SIZE
int
- default "33554432" if ADK_TARGET_SYSTEM_QEMU_MICROBLAZE
- default "33554432" if ADK_TARGET_SYSTEM_QEMU_MICROBLAZEEL
+ default "16777216" if ADK_TARGET_QEMU_MICROBLAZE_MODEL_S3ADSP1800
+ default "33554432" if ADK_TARGET_QEMU_MICROBLAZE_MODEL_ML605
default "0"
diff --git a/target/linux/config/Config.in.fs b/target/linux/config/Config.in.fs
index 377122dc5..69af555c8 100644
--- a/target/linux/config/Config.in.fs
+++ b/target/linux/config/Config.in.fs
@@ -11,9 +11,6 @@ config ADK_KERNEL_EXPORTFS
boolean
default y
-config ADK_KERNEL_JFFS2_FS
- boolean
-
config ADK_KERNEL_YAFFS_FS
tristate
@@ -51,6 +48,21 @@ config ADK_KERNEL_SQUASHFS_XZ
boolean
default n
+config ADK_KERNEL_JFFS2_COMPRESSION_OPTIONS
+ boolean
+ default n
+
+config ADK_KERNEL_JFFS2_ZLIB
+ boolean
+ default n
+
+config ADK_KERNEL_JFFS2_FS
+ prompt "jffs2............................. JFFS2 filesystem"
+ select ADK_KERNEL_MISC_FILESYSTEMS
+ select ADK_KERNEL_JFFS2_COMPRESSION_OPTIONS
+ select ADK_KERNEL_JFFS2_ZLIB
+ boolean
+
config ADK_KERNEL_SQUASHFS
prompt "squashfs.......................... SquashFS filesystem"
boolean
@@ -60,8 +72,6 @@ config ADK_KERNEL_SQUASHFS
config ADK_KERNEL_EXT2_FS
boolean
- default y if ADK_TARGET_WITH_CF
- default y if ADK_TARGET_WITH_MMC && !ADK_TARGET_SYSTEM_RASPBERRY_PI
default y if ADK_TARGET_SYSTEM_LEMOTE_YEELONG
default n
@@ -70,7 +80,6 @@ config ADK_KPACKAGE_KMOD_EXT2_FS
tristate
default n
depends on !ADK_KERNEL_EXT2_FS
- select ADK_KERNEL_BLOCK
help
Ext2 is a standard Linux file system for hard disks.
@@ -88,7 +97,6 @@ config ADK_KPACKAGE_KMOD_EXT3_FS
tristate
select ADK_KPACKAGE_KMOD_FS_MBCACHE if !ADK_KERNEL_EXT4_FS
depends on !ADK_KERNEL_EXT3_FS
- select ADK_KERNEL_BLOCK
default n
help
This is the journalling version of the Second extended file system
@@ -126,7 +134,6 @@ config ADK_KPACKAGE_KMOD_EXT4_FS
select ADK_KPACKAGE_KMOD_FS_MBCACHE
select ADK_KPACKAGE_KMOD_CRC16
depends on !ADK_KERNEL_EXT4_FS
- select ADK_KERNEL_BLOCK
default n
help
Ext4 filesystem.
@@ -137,7 +144,6 @@ config ADK_KPACKAGE_KMOD_HFSPLUS_FS
select ADK_KPACKAGE_KMOD_NLS if !ADK_KERNEL_NLS
select ADK_KPACKAGE_KMOD_NLS_UTF8
select ADK_KERNEL_MISC_FILESYSTEMS
- select ADK_KERNEL_BLOCK
default n
help
If you say Y here, you will be able to mount extended format
@@ -152,7 +158,6 @@ config ADK_KPACKAGE_KMOD_NTFS_FS
prompt "kmod-fs-ntfs...................... NTFS file system support"
tristate
select ADK_KPACKAGE_KMOD_NLS if !ADK_KERNEL_NLS
- select ADK_KERNEL_BLOCK
default n
help
NTFS is the file system of Microsoft Windows NT, 2000, XP and 2003.
@@ -183,8 +188,7 @@ config ADK_KPACKAGE_KMOD_VFAT_FS
select ADK_KPACKAGE_KMOD_NLS if !ADK_KERNEL_NLS
select ADK_KPACKAGE_KMOD_NLS_CODEPAGE_850
select ADK_KPACKAGE_KMOD_NLS_ISO8859_1
- select ADK_KERNEL_BLOCK
- default y if ADK_TARGET_WITH_MMC
+ default y if ADK_TARGET_SYSTEM_RASPBERRY_PI
default n
help
This option provides support for normal Windows file systems with
@@ -207,7 +211,6 @@ config ADK_KPACKAGE_KMOD_XFS_FS
tristate
select ADK_KERNEL_EXPORTFS
select ADK_KPACKAGE_KMOD_CRYPTO_CRC32C
- select ADK_KERNEL_BLOCK
depends on !ADK_KERNEL_XFS_FS
default n
help
@@ -223,7 +226,7 @@ config ADK_KPACKAGE_KMOD_XFS_FS
with the IRIX version of XFS.
config ADK_KPACKAGE_KMOD_FUSE_FS
- prompt "kmod-fs-fuse...................... Filesystem in Userspace support"
+ prompt "kmod-fuse-fs...................... Filesystem in Userspace support"
tristate
default n
help
@@ -246,7 +249,6 @@ config ADK_KPACKAGE_KMOD_ISO9660_FS
prompt "kmod-fs-iso9660................... ISO 9660 CDROM file system support"
tristate
select ADK_KERNEL_JOLIET
- select ADK_KERNEL_BLOCK
default n
help
This is the standard file system used on CD-ROMs. It was previously
@@ -263,7 +265,6 @@ config ADK_KPACKAGE_KMOD_UDF_FS
prompt "kmod-fs-udf....................... UDF file system support"
tristate
select ADK_KPACKAGE_KMOD_CRC_ITU_T
- select ADK_KERNEL_BLOCK
default n
help
This is the new file system used on some CD-ROMs and DVDs. Say Y if
diff --git a/target/linux/config/Config.in.graphics b/target/linux/config/Config.in.graphics
index 48cd3ea73..3a8e18b25 100644
--- a/target/linux/config/Config.in.graphics
+++ b/target/linux/config/Config.in.graphics
@@ -68,7 +68,7 @@ config ADK_KERNEL_LOGO
boolean
menu "Graphic devices support"
-depends on ADK_TARGET_WITH_VGA
+depends on ADK_TARGET_WITH_VGA || ADK_HARDWARE_QEMU
config ADK_KERNEL_LOGO_LINUX_CLUT224
prompt "Enable Linux penguin boot logo"
@@ -76,6 +76,12 @@ config ADK_KERNEL_LOGO_LINUX_CLUT224
select ADK_KERNEL_LOGO
default n
+config ADK_KERNEL_FB_CON_DECOR
+ prompt "Enable fullscreen boot logo"
+ boolean
+ select ADK_PACKAGE_FBSPLASH
+ default n
+
config ADK_KERNEL_FB_VESA
prompt "................................ Framebuffer support for VirtualBox Emulator (VESA)"
boolean
diff --git a/target/linux/config/Config.in.kernel b/target/linux/config/Config.in.kernel
index 650bc8729..ead74cc7e 100644
--- a/target/linux/config/Config.in.kernel
+++ b/target/linux/config/Config.in.kernel
@@ -128,7 +128,9 @@ config ADK_KERNEL_AEABI
# endianess
config ADK_KERNEL_CPU_BIG_ENDIAN
+ default y if ADK_big
boolean
config ADK_KERNEL_CPU_LITTLE_ENDIAN
+ default y if ADK_little
boolean
diff --git a/target/linux/config/Config.in.netdevice b/target/linux/config/Config.in.netdevice
index 62479c2cb..64bfb15f4 100644
--- a/target/linux/config/Config.in.netdevice
+++ b/target/linux/config/Config.in.netdevice
@@ -1,9 +1,6 @@
menu "Network devices support"
comment "Ethernet network driver for target system is included into kernel"
-config ADK_KERNEL_NETDEVICES
- boolean
-
config ADK_KERNEL_NET_ETHERNET
boolean
@@ -42,7 +39,6 @@ config ADK_KERNEL_ATH_CARDS
config ADK_KERNEL_CPMAC
boolean
- select ADK_KERNEL_NETDEVICES
select ADK_KERNEL_NET_ETHERNET
select ADK_KERNEL_NET_PCI
select ADK_KERNEL_MII
@@ -52,7 +48,6 @@ config ADK_KERNEL_CPMAC
config ADK_KERNEL_MACB
boolean
- select ADK_KERNEL_NETDEVICES
select ADK_KERNEL_NET_ETHERNET
select ADK_KERNEL_NET_PCI
select ADK_KERNEL_MII
@@ -63,7 +58,6 @@ config ADK_KERNEL_MACB
config ADK_KERNEL_PCNET32
boolean
- select ADK_KERNEL_NETDEVICES
select ADK_KERNEL_NET_ETHERNET
select ADK_KERNEL_NET_PCI
select ADK_KERNEL_MII
@@ -72,7 +66,6 @@ config ADK_KERNEL_PCNET32
config ADK_KERNEL_NATSEMI
boolean
- select ADK_KERNEL_NETDEVICES
select ADK_KERNEL_NET_ETHERNET
select ADK_KERNEL_NET_PCI
select ADK_KERNEL_MII
@@ -82,7 +75,6 @@ config ADK_KERNEL_NATSEMI
config ADK_KERNEL_VIA_RHINE
boolean
- select ADK_KERNEL_NETDEVICES
select ADK_KERNEL_NET_ETHERNET
select ADK_KERNEL_NET_PCI
select ADK_KERNEL_MII
@@ -95,7 +87,6 @@ config ADK_KERNEL_VIA_RHINE
config ADK_KERNEL_AR231X_ETHERNET
boolean
- select ADK_KERNEL_NETDEVICES
select ADK_KERNEL_NET_ETHERNET
select ADK_KERNEL_NET_PCI
select ADK_KERNEL_MII
@@ -106,7 +97,6 @@ config ADK_KERNEL_AR231X_ETHERNET
config ADK_KERNEL_KORINA
boolean
- select ADK_KERNEL_NETDEVICES
select ADK_KERNEL_NET_ETHERNET
select ADK_KERNEL_NET_PCI
select ADK_KERNEL_MII
@@ -116,7 +106,6 @@ config ADK_KERNEL_KORINA
config ADK_KERNEL_AG71XX
boolean
- select ADK_KERNEL_NETDEVICES
select ADK_KERNEL_NET_ETHERNET
select ADK_KERNEL_NET_PCI
select ADK_KERNEL_MII
@@ -127,7 +116,6 @@ config ADK_KERNEL_AG71XX
config ADK_KERNEL_B44
boolean
- select ADK_KERNEL_NETDEVICES
select ADK_KERNEL_NET_ETHERNET
select ADK_KERNEL_NET_PCI
select ADK_KERNEL_MII
@@ -137,7 +125,6 @@ config ADK_KERNEL_B44
config ADK_KERNEL_R8169
boolean
- select ADK_KERNEL_NETDEVICES
select ADK_KERNEL_NET_ETHERNET
select ADK_KERNEL_NETDEV_1000
select ADK_KERNEL_MII
@@ -147,7 +134,6 @@ config ADK_KERNEL_R8169
config ADK_KERNEL_USB_NET_SMSC95XX
boolean
- select ADK_KERNEL_NETDEVICES
select ADK_KERNEL_NET_ETHERNET
select ADK_KERNEL_USB_USBNET
default y if ADK_TARGET_SYSTEM_RASPBERRY_PI
@@ -160,7 +146,6 @@ depends on ADK_TARGET_WITH_PCI
config ADK_KPACKAGE_KMOD_NE2K_PCI
prompt "kmod-net-ne2k-pci............. NE2000 PCI driver"
tristate
- select ADK_KERNEL_NETDEVICES
select ADK_KERNEL_NET_ETHERNET
select ADK_KERNEL_NET_PCI
select ADK_KERNEL_NET_VENDOR_NATSEMI
@@ -173,7 +158,6 @@ config ADK_KPACKAGE_KMOD_NE2K_PCI
config ADK_KPACKAGE_KMOD_PCNET32
prompt "kmod-net-pcnet32.............. AMD PCNet32 PCI driver"
tristate
- select ADK_KERNEL_NETDEVICES
select ADK_KERNEL_NET_ETHERNET
select ADK_KERNEL_NET_PCI
select ADK_KERNEL_MII
@@ -184,7 +168,6 @@ config ADK_KPACKAGE_KMOD_PCNET32
config ADK_KPACKAGE_KMOD_8139CP
prompt "kmod-net-rtl8139cp............ RTL8139C+ PCI driver"
tristate
- select ADK_KERNEL_NETDEVICES
select ADK_KERNEL_NET_ETHERNET
select ADK_KERNEL_NET_PCI
select ADK_KERNEL_NET_VENDOR_REALTEK
@@ -196,7 +179,6 @@ config ADK_KPACKAGE_KMOD_8139CP
config ADK_KPACKAGE_KMOD_8139TOO
prompt "kmod-net-rtl8139.............. RTL8139 PCI driver"
tristate
- select ADK_KERNEL_NETDEVICES
select ADK_KERNEL_NET_ETHERNET
select ADK_KERNEL_NET_PCI
select ADK_KERNEL_MII
@@ -207,7 +189,6 @@ config ADK_KPACKAGE_KMOD_8139TOO
config ADK_KPACKAGE_KMOD_E100
prompt "kmod-net-e100................. Intel(R) PRO/100+ driver"
tristate
- select ADK_KERNEL_NETDEVICES
select ADK_KERNEL_NET_PCI
select ADK_KERNEL_MII
default n
@@ -217,7 +198,6 @@ config ADK_KPACKAGE_KMOD_E100
config ADK_KPACKAGE_KMOD_E1000
prompt "kmod-net-e1000................ Intel(R) PRO/1000 Gigabit Ethernet driver"
tristate
- select ADK_KERNEL_NETDEVICES
select ADK_KERNEL_NET_ETHERNET
select ADK_KERNEL_NETDEV_1000
depends on !ADK_KERNEL_E1000
@@ -232,7 +212,6 @@ config ADK_KPACKAGE_KMOD_E1000
config ADK_KPACKAGE_KMOD_SKY2
prompt "kmod-net-sky2................. Marvell Yukon driver"
tristate
- select ADK_KERNEL_NETDEVICES
select ADK_KERNEL_NET_ETHERNET
select ADK_KERNEL_NETDEV_1000
select ADK_KERNEL_NET_VENDOR_MARVELL
@@ -243,7 +222,6 @@ config ADK_KPACKAGE_KMOD_SKY2
config ADK_KPACKAGE_KMOD_R8169
prompt "kmod-net-r8169................ RTL8169 driver"
tristate
- select ADK_KERNEL_NETDEVICES
select ADK_KERNEL_NET_ETHERNET
select ADK_KERNEL_NETDEV_1000
select ADK_KERNEL_MII
@@ -258,7 +236,6 @@ config ADK_KERNEL_WLAN
boolean
config ADK_KERNEL_WIRELESS
- select ADK_KERNEL_NETDEVICES
select ADK_KERNEL_WLAN
boolean
diff --git a/target/linux/config/Config.in.netfilter.ip4 b/target/linux/config/Config.in.netfilter.ip4
index b43a566b9..d3f988845 100644
--- a/target/linux/config/Config.in.netfilter.ip4
+++ b/target/linux/config/Config.in.netfilter.ip4
@@ -36,16 +36,16 @@ config ADK_KPACKAGE_KMOD_IP_NF_FILTER
config ADK_KPACKAGE_KMOD_FULL_NAT
tristate "Meta package for Full NAT"
- select ADK_KPACKAGE_KMOD_NF_NAT if ADK_KERNEL_VERSION_3_4_82
- select ADK_KPACKAGE_KMOD_NF_NAT_IPV4 if ADK_KERNEL_VERSION_3_10_30
+ select ADK_KPACKAGE_KMOD_NF_NAT if ADK_KERNEL_VERSION_3_4_84
+ select ADK_KPACKAGE_KMOD_NF_NAT_IPV4 if ADK_KERNEL_VERSION_3_10_34
select ADK_KPACKAGE_KMOD_NF_NAT_IPV4 if ADK_KERNEL_VERSION_3_11_10
- select ADK_KPACKAGE_KMOD_NF_NAT_IPV4 if ADK_KERNEL_VERSION_3_12_13
- select ADK_KPACKAGE_KMOD_NF_NAT_IPV4 if ADK_KERNEL_VERSION_3_13_6
+ select ADK_KPACKAGE_KMOD_NF_NAT_IPV4 if ADK_KERNEL_VERSION_3_12_14
+ select ADK_KPACKAGE_KMOD_NF_NAT_IPV4 if ADK_KERNEL_VERSION_3_13_7
config ADK_KPACKAGE_KMOD_NF_NAT
tristate 'Full NAT'
depends on ADK_KPACKAGE_KMOD_IP_NF_IPTABLES
- depends on ADK_KERNEL_VERSION_3_4_82
+ depends on ADK_KERNEL_VERSION_3_4_84
help
The Full NAT option allows masquerading, port forwarding and other
forms of full Network Address Port Translation. It is controlled by
@@ -54,10 +54,10 @@ config ADK_KPACKAGE_KMOD_NF_NAT
config ADK_KPACKAGE_KMOD_NF_NAT_IPV4
tristate 'Full NAT'
depends on ADK_KPACKAGE_KMOD_IP_NF_IPTABLES
- depends on ADK_KERNEL_VERSION_3_10_30 \
+ depends on ADK_KERNEL_VERSION_3_10_34 \
|| ADK_KERNEL_VERSION_3_11_10 \
- || ADK_KERNEL_VERSION_3_12_13 \
- || ADK_KERNEL_VERSION_3_13_6
+ || ADK_KERNEL_VERSION_3_12_14 \
+ || ADK_KERNEL_VERSION_3_13_7
help
The Full NAT option allows masquerading, port forwarding and other
forms of full Network Address Port Translation. It is controlled by
diff --git a/target/linux/config/Config.in.network b/target/linux/config/Config.in.network
index 71a510d69..f35f2ce80 100644
--- a/target/linux/config/Config.in.network
+++ b/target/linux/config/Config.in.network
@@ -180,7 +180,6 @@ config ADK_KPACKAGE_KMOD_IPV6_SIT
config ADK_KPACKAGE_KMOD_PPP
prompt "kmod-ppp.......................... PPP support"
tristate
- select ADK_KERNEL_NETDEVICES
select ADK_KERNEL_PPP_ASYNC
select ADK_KERNEL_SLHC
select ADK_KPACKAGE_KMOD_CRC_CCITT
@@ -243,7 +242,6 @@ config ADK_KPACKAGE_KMOD_PPPOE
config ADK_KPACKAGE_KMOD_TUN
prompt "kmod-tun.......................... Universal TUN/TAP driver"
tristate
- select ADK_KERNEL_NETDEVICES
default n
help
Kernel support for the TUN/TAP tunneling device
diff --git a/target/linux/config/Config.in.spi b/target/linux/config/Config.in.spi
index 73db5e86d..c130523ef 100644
--- a/target/linux/config/Config.in.spi
+++ b/target/linux/config/Config.in.spi
@@ -1,6 +1,12 @@
config ADK_KERNEL_SPI
boolean
+config ADK_KERNEL_SPI_MASTER
+ boolean
+
+config ADK_KERNEL_SPI_XILINX
+ boolean
+
config ADK_KERNEL_SPI_AR71XX
select ADK_KERNEL_SPI
boolean
diff --git a/target/linux/config/Config.in.usb b/target/linux/config/Config.in.usb
index 2d50e24b2..ac85f977e 100644
--- a/target/linux/config/Config.in.usb
+++ b/target/linux/config/Config.in.usb
@@ -7,20 +7,14 @@ config ADK_KERNEL_USB_SUPPORT
config ADK_KERNEL_USB
boolean
select ADK_KERNEL_USB_SUPPORT
- default y if ADK_TARGET_SYSTEM_QEMU_SH4
- default y if ADK_TARGET_SYSTEM_QEMU_SH4EB
default n
config ADK_KERNEL_USB_OHCI_HCD
boolean
- default y if ADK_TARGET_SYSTEM_QEMU_SH4
- default y if ADK_TARGET_SYSTEM_QEMU_SH4EB
default n
config ADK_KERNEL_USB_OHCI_HCD_PLATFORM
boolean
- default y if ADK_TARGET_SYSTEM_QEMU_SH4
- default y if ADK_TARGET_SYSTEM_QEMU_SH4EB
default n
config ADK_KERNEL_USB_LIBUSUAL
diff --git a/target/linux/patches/3.10.33/bsd-compatibility.patch b/target/linux/patches/3.10.34/bsd-compatibility.patch
index b954b658f..b954b658f 100644
--- a/target/linux/patches/3.10.33/bsd-compatibility.patch
+++ b/target/linux/patches/3.10.34/bsd-compatibility.patch
diff --git a/target/linux/patches/3.10.33/startup.patch b/target/linux/patches/3.10.34/startup.patch
index 3ebc5db1e..3ebc5db1e 100644
--- a/target/linux/patches/3.10.33/startup.patch
+++ b/target/linux/patches/3.10.34/startup.patch
diff --git a/target/linux/patches/3.12.13/bsd-compatibility.patch b/target/linux/patches/3.12.14/bsd-compatibility.patch
index b954b658f..b954b658f 100644
--- a/target/linux/patches/3.12.13/bsd-compatibility.patch
+++ b/target/linux/patches/3.12.14/bsd-compatibility.patch
diff --git a/target/linux/patches/3.12.13/defaults.patch b/target/linux/patches/3.12.14/defaults.patch
index 6cdca084e..6cdca084e 100644
--- a/target/linux/patches/3.12.13/defaults.patch
+++ b/target/linux/patches/3.12.14/defaults.patch
diff --git a/target/linux/patches/3.12.13/disable-netfilter.patch b/target/linux/patches/3.12.14/disable-netfilter.patch
index 7b1ca013a..7b1ca013a 100644
--- a/target/linux/patches/3.12.13/disable-netfilter.patch
+++ b/target/linux/patches/3.12.14/disable-netfilter.patch
diff --git a/target/linux/patches/3.12.13/export-symbol-for-exmap.patch b/target/linux/patches/3.12.14/export-symbol-for-exmap.patch
index 4f0fc8449..4f0fc8449 100644
--- a/target/linux/patches/3.12.13/export-symbol-for-exmap.patch
+++ b/target/linux/patches/3.12.14/export-symbol-for-exmap.patch
diff --git a/target/linux/patches/3.12.13/gemalto.patch b/target/linux/patches/3.12.14/gemalto.patch
index 65f7af1d7..65f7af1d7 100644
--- a/target/linux/patches/3.12.13/gemalto.patch
+++ b/target/linux/patches/3.12.14/gemalto.patch
diff --git a/target/linux/patches/3.12.13/lemote-rfkill.patch b/target/linux/patches/3.12.14/lemote-rfkill.patch
index a61488434..a61488434 100644
--- a/target/linux/patches/3.12.13/lemote-rfkill.patch
+++ b/target/linux/patches/3.12.14/lemote-rfkill.patch
diff --git a/target/linux/patches/3.12.13/microblaze-ethernet.patch b/target/linux/patches/3.12.14/microblaze-ethernet.patch
index 742ab477e..742ab477e 100644
--- a/target/linux/patches/3.12.13/microblaze-ethernet.patch
+++ b/target/linux/patches/3.12.14/microblaze-ethernet.patch
diff --git a/target/linux/patches/3.12.13/microblaze-setup.patch b/target/linux/patches/3.12.14/microblaze-setup.patch
index 43815f274..43815f274 100644
--- a/target/linux/patches/3.12.13/microblaze-setup.patch
+++ b/target/linux/patches/3.12.14/microblaze-setup.patch
diff --git a/target/linux/patches/3.12.13/mips-lzo-fix.patch b/target/linux/patches/3.12.14/mips-lzo-fix.patch
index 0740bdc6a..0740bdc6a 100644
--- a/target/linux/patches/3.12.13/mips-lzo-fix.patch
+++ b/target/linux/patches/3.12.14/mips-lzo-fix.patch
diff --git a/target/linux/patches/3.12.13/mtd-rootfs.patch b/target/linux/patches/3.12.14/mtd-rootfs.patch
index 775d5fc80..775d5fc80 100644
--- a/target/linux/patches/3.12.13/mtd-rootfs.patch
+++ b/target/linux/patches/3.12.14/mtd-rootfs.patch
diff --git a/target/linux/patches/3.12.13/non-static.patch b/target/linux/patches/3.12.14/non-static.patch
index a967703d0..a967703d0 100644
--- a/target/linux/patches/3.12.13/non-static.patch
+++ b/target/linux/patches/3.12.14/non-static.patch
diff --git a/target/linux/patches/3.12.13/ppc64-missing-zlib.patch b/target/linux/patches/3.12.14/ppc64-missing-zlib.patch
index c6e0616be..c6e0616be 100644
--- a/target/linux/patches/3.12.13/ppc64-missing-zlib.patch
+++ b/target/linux/patches/3.12.14/ppc64-missing-zlib.patch
diff --git a/target/linux/patches/3.12.13/raspberry.patch b/target/linux/patches/3.12.14/raspberry.patch
index c306f4faf..c306f4faf 100644
--- a/target/linux/patches/3.12.13/raspberry.patch
+++ b/target/linux/patches/3.12.14/raspberry.patch
diff --git a/target/linux/patches/3.12.13/startup.patch b/target/linux/patches/3.12.14/startup.patch
index 4cd477da1..4cd477da1 100644
--- a/target/linux/patches/3.12.13/startup.patch
+++ b/target/linux/patches/3.12.14/startup.patch
diff --git a/target/linux/patches/3.12.13/usb-defaults-off.patch b/target/linux/patches/3.12.14/usb-defaults-off.patch
index 54dff2bd4..54dff2bd4 100644
--- a/target/linux/patches/3.12.13/usb-defaults-off.patch
+++ b/target/linux/patches/3.12.14/usb-defaults-off.patch
diff --git a/target/linux/patches/3.12.13/uuid.patch b/target/linux/patches/3.12.14/uuid.patch
index ca23accdf..ca23accdf 100644
--- a/target/linux/patches/3.12.13/uuid.patch
+++ b/target/linux/patches/3.12.14/uuid.patch
diff --git a/target/linux/patches/3.12.13/vga-cons-default-off.patch b/target/linux/patches/3.12.14/vga-cons-default-off.patch
index 08a57f783..08a57f783 100644
--- a/target/linux/patches/3.12.13/vga-cons-default-off.patch
+++ b/target/linux/patches/3.12.14/vga-cons-default-off.patch
diff --git a/target/linux/patches/3.12.13/wlan-cf.patch b/target/linux/patches/3.12.14/wlan-cf.patch
index fc20759e2..fc20759e2 100644
--- a/target/linux/patches/3.12.13/wlan-cf.patch
+++ b/target/linux/patches/3.12.14/wlan-cf.patch
diff --git a/target/linux/patches/3.12.13/xargs.patch b/target/linux/patches/3.12.14/xargs.patch
index 2c7b3df59..2c7b3df59 100644
--- a/target/linux/patches/3.12.13/xargs.patch
+++ b/target/linux/patches/3.12.14/xargs.patch
diff --git a/target/linux/patches/3.12.13/zlib-inflate.patch b/target/linux/patches/3.12.14/zlib-inflate.patch
index 58e1f6d21..58e1f6d21 100644
--- a/target/linux/patches/3.12.13/zlib-inflate.patch
+++ b/target/linux/patches/3.12.14/zlib-inflate.patch
diff --git a/target/linux/patches/3.13.6/bsd-compatibility.patch b/target/linux/patches/3.13.7/bsd-compatibility.patch
index b954b658f..b954b658f 100644
--- a/target/linux/patches/3.13.6/bsd-compatibility.patch
+++ b/target/linux/patches/3.13.7/bsd-compatibility.patch
diff --git a/target/linux/patches/3.13.6/defaults.patch b/target/linux/patches/3.13.7/defaults.patch
index 6cdca084e..6cdca084e 100644
--- a/target/linux/patches/3.13.6/defaults.patch
+++ b/target/linux/patches/3.13.7/defaults.patch
diff --git a/target/linux/patches/3.13.6/disable-netfilter.patch b/target/linux/patches/3.13.7/disable-netfilter.patch
index 7b1ca013a..7b1ca013a 100644
--- a/target/linux/patches/3.13.6/disable-netfilter.patch
+++ b/target/linux/patches/3.13.7/disable-netfilter.patch
diff --git a/target/linux/patches/3.13.6/export-symbol-for-exmap.patch b/target/linux/patches/3.13.7/export-symbol-for-exmap.patch
index 4f0fc8449..4f0fc8449 100644
--- a/target/linux/patches/3.13.6/export-symbol-for-exmap.patch
+++ b/target/linux/patches/3.13.7/export-symbol-for-exmap.patch
diff --git a/target/linux/patches/3.13.7/fblogo.patch b/target/linux/patches/3.13.7/fblogo.patch
new file mode 100644
index 000000000..cbbb4216f
--- /dev/null
+++ b/target/linux/patches/3.13.7/fblogo.patch
@@ -0,0 +1,2097 @@
+diff -Nur linux-3.13.7.orig/Documentation/fb/00-INDEX linux-3.13.7/Documentation/fb/00-INDEX
+--- linux-3.13.7.orig/Documentation/fb/00-INDEX 2014-03-24 05:45:42.000000000 +0100
++++ linux-3.13.7/Documentation/fb/00-INDEX 2014-03-29 16:03:17.000000000 +0100
+@@ -21,6 +21,8 @@
+ - info on the driver for EP93xx LCD controller.
+ fbcon.txt
+ - intro to and usage guide for the framebuffer console (fbcon).
++fbcondecor.txt
++ - info on the Framebuffer Console Decoration
+ framebuffer.txt
+ - introduction to frame buffer devices.
+ gxfb.txt
+diff -Nur linux-3.13.7.orig/Documentation/fb/fbcondecor.txt linux-3.13.7/Documentation/fb/fbcondecor.txt
+--- linux-3.13.7.orig/Documentation/fb/fbcondecor.txt 1970-01-01 01:00:00.000000000 +0100
++++ linux-3.13.7/Documentation/fb/fbcondecor.txt 2014-03-29 16:03:17.000000000 +0100
+@@ -0,0 +1,207 @@
++What is it?
++-----------
++
++The framebuffer decorations are a kernel feature which allows displaying a
++background picture on selected consoles.
++
++What do I need to get it to work?
++---------------------------------
++
++To get fbcondecor up-and-running you will have to:
++ 1) get a copy of splashutils [1] or a similar program
++ 2) get some fbcondecor themes
++ 3) build the kernel helper program
++ 4) build your kernel with the FB_CON_DECOR option enabled.
++
++To get fbcondecor operational right after fbcon initialization is finished, you
++will have to include a theme and the kernel helper into your initramfs image.
++Please refer to splashutils documentation for instructions on how to do that.
++
++[1] The splashutils package can be downloaded from:
++ http://github.com/alanhaggai/fbsplash
++
++The userspace helper
++--------------------
++
++The userspace fbcondecor helper (by default: /sbin/fbcondecor_helper) is called by the
++kernel whenever an important event occurs and the kernel needs some kind of
++job to be carried out. Important events include console switches and video
++mode switches (the kernel requests background images and configuration
++parameters for the current console). The fbcondecor helper must be accessible at
++all times. If it's not, fbcondecor will be switched off automatically.
++
++It's possible to set path to the fbcondecor helper by writing it to
++/proc/sys/kernel/fbcondecor.
++
++*****************************************************************************
++
++The information below is mostly technical stuff. There's probably no need to
++read it unless you plan to develop a userspace helper.
++
++The fbcondecor protocol
++-----------------------
++
++The fbcondecor protocol defines a communication interface between the kernel and
++the userspace fbcondecor helper.
++
++The kernel side is responsible for:
++
++ * rendering console text, using an image as a background (instead of a
++ standard solid color fbcon uses),
++ * accepting commands from the user via ioctls on the fbcondecor device,
++ * calling the userspace helper to set things up as soon as the fb subsystem
++ is initialized.
++
++The userspace helper is responsible for everything else, including parsing
++configuration files, decompressing the image files whenever the kernel needs
++it, and communicating with the kernel if necessary.
++
++The fbcondecor protocol specifies how communication is done in both ways:
++kernel->userspace and userspace->helper.
++
++Kernel -> Userspace
++-------------------
++
++The kernel communicates with the userspace helper by calling it and specifying
++the task to be done in a series of arguments.
++
++The arguments follow the pattern:
++<fbcondecor protocol version> <command> <parameters>
++
++All commands defined in fbcondecor protocol v2 have the following parameters:
++ virtual console
++ framebuffer number
++ theme
++
++Fbcondecor protocol v1 specified an additional 'fbcondecor mode' after the
++framebuffer number. Fbcondecor protocol v1 is deprecated and should not be used.
++
++Fbcondecor protocol v2 specifies the following commands:
++
++getpic
++------
++ The kernel issues this command to request image data. It's up to the
++ userspace helper to find a background image appropriate for the specified
++ theme and the current resolution. The userspace helper should respond by
++ issuing the FBIOCONDECOR_SETPIC ioctl.
++
++init
++----
++ The kernel issues this command after the fbcondecor device is created and
++ the fbcondecor interface is initialized. Upon receiving 'init', the userspace
++ helper should parse the kernel command line (/proc/cmdline) or otherwise
++ decide whether fbcondecor is to be activated.
++
++ To activate fbcondecor on the first console the helper should issue the
++ FBIOCONDECOR_SETCFG, FBIOCONDECOR_SETPIC and FBIOCONDECOR_SETSTATE commands,
++ in the above-mentioned order.
++
++ When the userspace helper is called in an early phase of the boot process
++ (right after the initialization of fbcon), no filesystems will be mounted.
++ The helper program should mount sysfs and then create the appropriate
++ framebuffer, fbcondecor and tty0 devices (if they don't already exist) to get
++ current display settings and to be able to communicate with the kernel side.
++ It should probably also mount the procfs to be able to parse the kernel
++ command line parameters.
++
++ Note that the console sem is not held when the kernel calls fbcondecor_helper
++ with the 'init' command. The fbcondecor helper should perform all ioctls with
++ origin set to FBCON_DECOR_IO_ORIG_USER.
++
++modechange
++----------
++ The kernel issues this command on a mode change. The helper's response should
++ be similar to the response to the 'init' command. Note that this time the
++ console sem is held and all ioctls must be performed with origin set to
++ FBCON_DECOR_IO_ORIG_KERNEL.
++
++
++Userspace -> Kernel
++-------------------
++
++Userspace programs can communicate with fbcondecor via ioctls on the
++fbcondecor device. These ioctls are to be used by both the userspace helper
++(called only by the kernel) and userspace configuration tools (run by the users).
++
++The fbcondecor helper should set the origin field to FBCON_DECOR_IO_ORIG_KERNEL
++when doing the appropriate ioctls. All userspace configuration tools should
++use FBCON_DECOR_IO_ORIG_USER. Failure to set the appropriate value in the origin
++field when performing ioctls from the kernel helper will most likely result
++in a console deadlock.
++
++FBCON_DECOR_IO_ORIG_KERNEL instructs fbcondecor not to try to acquire the console
++semaphore. Not surprisingly, FBCON_DECOR_IO_ORIG_USER instructs it to acquire
++the console sem.
++
++The framebuffer console decoration provides the following ioctls (all defined in
++linux/fb.h):
++
++FBIOCONDECOR_SETPIC
++description: loads a background picture for a virtual console
++argument: struct fbcon_decor_iowrapper*; data: struct fb_image*
++notes:
++If called for consoles other than the current foreground one, the picture data
++will be ignored.
++
++If the current virtual console is running in a 8-bpp mode, the cmap substruct
++of fb_image has to be filled appropriately: start should be set to 16 (first
++16 colors are reserved for fbcon), len to a value <= 240 and red, green and
++blue should point to valid cmap data. The transp field is ingored. The fields
++dx, dy, bg_color, fg_color in fb_image are ignored as well.
++
++FBIOCONDECOR_SETCFG
++description: sets the fbcondecor config for a virtual console
++argument: struct fbcon_decor_iowrapper*; data: struct vc_decor*
++notes: The structure has to be filled with valid data.
++
++FBIOCONDECOR_GETCFG
++description: gets the fbcondecor config for a virtual console
++argument: struct fbcon_decor_iowrapper*; data: struct vc_decor*
++
++FBIOCONDECOR_SETSTATE
++description: sets the fbcondecor state for a virtual console
++argument: struct fbcon_decor_iowrapper*; data: unsigned int*
++ values: 0 = disabled, 1 = enabled.
++
++FBIOCONDECOR_GETSTATE
++description: gets the fbcondecor state for a virtual console
++argument: struct fbcon_decor_iowrapper*; data: unsigned int*
++ values: as in FBIOCONDECOR_SETSTATE
++
++Info on used structures:
++
++Definition of struct vc_decor can be found in linux/console_decor.h. It's
++heavily commented. Note that the 'theme' field should point to a string
++no longer than FBCON_DECOR_THEME_LEN. When FBIOCONDECOR_GETCFG call is
++performed, the theme field should point to a char buffer of length
++FBCON_DECOR_THEME_LEN.
++
++Definition of struct fbcon_decor_iowrapper can be found in linux/fb.h.
++The fields in this struct have the following meaning:
++
++vc:
++Virtual console number.
++
++origin:
++Specifies if the ioctl is performed as a response to a kernel request. The
++fbcondecor helper should set this field to FBCON_DECOR_IO_ORIG_KERNEL, userspace
++programs should set it to FBCON_DECOR_IO_ORIG_USER. This field is necessary to
++avoid console semaphore deadlocks.
++
++data:
++Pointer to a data structure appropriate for the performed ioctl. Type of
++the data struct is specified in the ioctls description.
++
++*****************************************************************************
++
++Credit
++------
++
++Original 'bootsplash' project & implementation by:
++ Volker Poplawski <volker@poplawski.de>, Stefan Reinauer <stepan@suse.de>,
++ Steffen Winterfeldt <snwint@suse.de>, Michael Schroeder <mls@suse.de>,
++ Ken Wimer <wimer@suse.de>.
++
++Fbcondecor, fbcondecor protocol design, current implementation & docs by:
++ Michal Januszewski <michalj+fbcondecor@gmail.com>
++
+diff -Nur linux-3.13.7.orig/drivers/Makefile linux-3.13.7/drivers/Makefile
+--- linux-3.13.7.orig/drivers/Makefile 2014-03-24 05:45:42.000000000 +0100
++++ linux-3.13.7/drivers/Makefile 2014-03-29 16:03:17.000000000 +0100
+@@ -17,6 +17,10 @@
+ obj-$(CONFIG_PCI) += pci/
+ obj-$(CONFIG_PARISC) += parisc/
+ obj-$(CONFIG_RAPIDIO) += rapidio/
++# tty/ comes before char/ so that the VT console is the boot-time
++# default.
++obj-y += tty/
++obj-y += char/
+ obj-y += video/
+ obj-y += idle/
+
+@@ -42,11 +46,6 @@
+ # reset controllers early, since gpu drivers might rely on them to initialize
+ obj-$(CONFIG_RESET_CONTROLLER) += reset/
+
+-# tty/ comes before char/ so that the VT console is the boot-time
+-# default.
+-obj-y += tty/
+-obj-y += char/
+-
+ # gpu/ comes after char for AGP vs DRM startup
+ obj-y += gpu/
+
+diff -Nur linux-3.13.7.orig/drivers/video/Kconfig linux-3.13.7/drivers/video/Kconfig
+--- linux-3.13.7.orig/drivers/video/Kconfig 2014-03-24 05:45:42.000000000 +0100
++++ linux-3.13.7/drivers/video/Kconfig 2014-03-29 16:03:17.000000000 +0100
+@@ -1231,7 +1231,6 @@
+ select FB_CFB_FILLRECT
+ select FB_CFB_COPYAREA
+ select FB_CFB_IMAGEBLIT
+- select FB_TILEBLITTING
+ select FB_MACMODES if PPC_PMAC
+ ---help---
+ Say Y here if you have a Matrox Millennium, Matrox Millennium II,
+diff -Nur linux-3.13.7.orig/drivers/video/console/Kconfig linux-3.13.7/drivers/video/console/Kconfig
+--- linux-3.13.7.orig/drivers/video/console/Kconfig 2014-03-24 05:45:42.000000000 +0100
++++ linux-3.13.7/drivers/video/console/Kconfig 2014-03-29 16:03:17.000000000 +0100
+@@ -125,6 +125,19 @@
+ such that other users of the framebuffer will remain normally
+ oriented.
+
++config FB_CON_DECOR
++ bool "Support for the Framebuffer Console Decorations"
++ depends on FRAMEBUFFER_CONSOLE=y && !FB_TILEBLITTING
++ default n
++ ---help---
++ This option enables support for framebuffer console decorations which
++ makes it possible to display images in the background of the system
++ consoles. Note that userspace utilities are necessary in order to take
++ advantage of these features. Refer to Documentation/fb/fbcondecor.txt
++ for more information.
++
++ If unsure, say N.
++
+ config STI_CONSOLE
+ bool "STI text console"
+ depends on PARISC
+diff -Nur linux-3.13.7.orig/drivers/video/console/Makefile linux-3.13.7/drivers/video/console/Makefile
+--- linux-3.13.7.orig/drivers/video/console/Makefile 2014-03-24 05:45:42.000000000 +0100
++++ linux-3.13.7/drivers/video/console/Makefile 2014-03-29 16:03:17.000000000 +0100
+@@ -16,4 +16,5 @@
+ fbcon_ccw.o
+ endif
+
++obj-$(CONFIG_FB_CON_DECOR) += fbcondecor.o cfbcondecor.o
+ obj-$(CONFIG_FB_STI) += sticore.o
+diff -Nur linux-3.13.7.orig/drivers/video/console/bitblit.c linux-3.13.7/drivers/video/console/bitblit.c
+--- linux-3.13.7.orig/drivers/video/console/bitblit.c 2014-03-24 05:45:42.000000000 +0100
++++ linux-3.13.7/drivers/video/console/bitblit.c 2014-03-29 16:03:17.000000000 +0100
+@@ -18,6 +18,7 @@
+ #include <linux/console.h>
+ #include <asm/types.h>
+ #include "fbcon.h"
++#include "fbcondecor.h"
+
+ /*
+ * Accelerated handlers.
+@@ -55,6 +56,13 @@
+ area.height = height * vc->vc_font.height;
+ area.width = width * vc->vc_font.width;
+
++ if (fbcon_decor_active(info, vc)) {
++ area.sx += vc->vc_decor.tx;
++ area.sy += vc->vc_decor.ty;
++ area.dx += vc->vc_decor.tx;
++ area.dy += vc->vc_decor.ty;
++ }
++
+ info->fbops->fb_copyarea(info, &area);
+ }
+
+@@ -380,11 +388,15 @@
+ cursor.image.depth = 1;
+ cursor.rop = ROP_XOR;
+
+- if (info->fbops->fb_cursor)
+- err = info->fbops->fb_cursor(info, &cursor);
++ if (fbcon_decor_active(info, vc)) {
++ fbcon_decor_cursor(info, &cursor);
++ } else {
++ if (info->fbops->fb_cursor)
++ err = info->fbops->fb_cursor(info, &cursor);
+
+- if (err)
+- soft_cursor(info, &cursor);
++ if (err)
++ soft_cursor(info, &cursor);
++ }
+
+ ops->cursor_reset = 0;
+ }
+diff -Nur linux-3.13.7.orig/drivers/video/console/cfbcondecor.c linux-3.13.7/drivers/video/console/cfbcondecor.c
+--- linux-3.13.7.orig/drivers/video/console/cfbcondecor.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-3.13.7/drivers/video/console/cfbcondecor.c 2014-03-29 16:03:17.000000000 +0100
+@@ -0,0 +1,471 @@
++/*
++ * linux/drivers/video/cfbcon_decor.c -- Framebuffer decor render functions
++ *
++ * Copyright (C) 2004 Michal Januszewski <michalj+fbcondecor@gmail.com>
++ *
++ * Code based upon "Bootdecor" (C) 2001-2003
++ * Volker Poplawski <volker@poplawski.de>,
++ * Stefan Reinauer <stepan@suse.de>,
++ * Steffen Winterfeldt <snwint@suse.de>,
++ * Michael Schroeder <mls@suse.de>,
++ * Ken Wimer <wimer@suse.de>.
++ *
++ * This file is subject to the terms and conditions of the GNU General Public
++ * License. See the file COPYING in the main directory of this archive for
++ * more details.
++ */
++#include <linux/module.h>
++#include <linux/types.h>
++#include <linux/fb.h>
++#include <linux/selection.h>
++#include <linux/slab.h>
++#include <linux/vt_kern.h>
++#include <asm/irq.h>
++
++#include "fbcon.h"
++#include "fbcondecor.h"
++
++#define parse_pixel(shift,bpp,type) \
++ do { \
++ if (d & (0x80 >> (shift))) \
++ dd2[(shift)] = fgx; \
++ else \
++ dd2[(shift)] = transparent ? *(type *)decor_src : bgx; \
++ decor_src += (bpp); \
++ } while (0) \
++
++extern int get_color(struct vc_data *vc, struct fb_info *info,
++ u16 c, int is_fg);
++
++void fbcon_decor_fix_pseudo_pal(struct fb_info *info, struct vc_data *vc)
++{
++ int i, j, k;
++ int minlen = min(min(info->var.red.length, info->var.green.length),
++ info->var.blue.length);
++ u32 col;
++
++ for (j = i = 0; i < 16; i++) {
++ k = color_table[i];
++
++ col = ((vc->vc_palette[j++] >> (8-minlen))
++ << info->var.red.offset);
++ col |= ((vc->vc_palette[j++] >> (8-minlen))
++ << info->var.green.offset);
++ col |= ((vc->vc_palette[j++] >> (8-minlen))
++ << info->var.blue.offset);
++ ((u32 *)info->pseudo_palette)[k] = col;
++ }
++}
++
++void fbcon_decor_renderc(struct fb_info *info, int ypos, int xpos, int height,
++ int width, u8* src, u32 fgx, u32 bgx, u8 transparent)
++{
++ unsigned int x, y;
++ u32 dd;
++ int bytespp = ((info->var.bits_per_pixel + 7) >> 3);
++ unsigned int d = ypos * info->fix.line_length + xpos * bytespp;
++ unsigned int ds = (ypos * info->var.xres + xpos) * bytespp;
++ u16 dd2[4];
++
++ u8* decor_src = (u8 *)(info->bgdecor.data + ds);
++ u8* dst = (u8 *)(info->screen_base + d);
++
++ if ((ypos + height) > info->var.yres || (xpos + width) > info->var.xres)
++ return;
++
++ for (y = 0; y < height; y++) {
++ switch (info->var.bits_per_pixel) {
++
++ case 32:
++ for (x = 0; x < width; x++) {
++
++ if ((x & 7) == 0)
++ d = *src++;
++ if (d & 0x80)
++ dd = fgx;
++ else
++ dd = transparent ?
++ *(u32 *)decor_src : bgx;
++
++ d <<= 1;
++ decor_src += 4;
++ fb_writel(dd, dst);
++ dst += 4;
++ }
++ break;
++ case 24:
++ for (x = 0; x < width; x++) {
++
++ if ((x & 7) == 0)
++ d = *src++;
++ if (d & 0x80)
++ dd = fgx;
++ else
++ dd = transparent ?
++ (*(u32 *)decor_src & 0xffffff) : bgx;
++
++ d <<= 1;
++ decor_src += 3;
++#ifdef __LITTLE_ENDIAN
++ fb_writew(dd & 0xffff, dst);
++ dst += 2;
++ fb_writeb((dd >> 16), dst);
++#else
++ fb_writew(dd >> 8, dst);
++ dst += 2;
++ fb_writeb(dd & 0xff, dst);
++#endif
++ dst++;
++ }
++ break;
++ case 16:
++ for (x = 0; x < width; x += 2) {
++ if ((x & 7) == 0)
++ d = *src++;
++
++ parse_pixel(0, 2, u16);
++ parse_pixel(1, 2, u16);
++#ifdef __LITTLE_ENDIAN
++ dd = dd2[0] | (dd2[1] << 16);
++#else
++ dd = dd2[1] | (dd2[0] << 16);
++#endif
++ d <<= 2;
++ fb_writel(dd, dst);
++ dst += 4;
++ }
++ break;
++
++ case 8:
++ for (x = 0; x < width; x += 4) {
++ if ((x & 7) == 0)
++ d = *src++;
++
++ parse_pixel(0, 1, u8);
++ parse_pixel(1, 1, u8);
++ parse_pixel(2, 1, u8);
++ parse_pixel(3, 1, u8);
++
++#ifdef __LITTLE_ENDIAN
++ dd = dd2[0] | (dd2[1] << 8) | (dd2[2] << 16) | (dd2[3] << 24);
++#else
++ dd = dd2[3] | (dd2[2] << 8) | (dd2[1] << 16) | (dd2[0] << 24);
++#endif
++ d <<= 4;
++ fb_writel(dd, dst);
++ dst += 4;
++ }
++ }
++
++ dst += info->fix.line_length - width * bytespp;
++ decor_src += (info->var.xres - width) * bytespp;
++ }
++}
++
++#define cc2cx(a) \
++ ((info->fix.visual == FB_VISUAL_TRUECOLOR || \
++ info->fix.visual == FB_VISUAL_DIRECTCOLOR) ? \
++ ((u32*)info->pseudo_palette)[a] : a)
++
++void fbcon_decor_putcs(struct vc_data *vc, struct fb_info *info,
++ const unsigned short *s, int count, int yy, int xx)
++{
++ unsigned short charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff;
++ struct fbcon_ops *ops = info->fbcon_par;
++ int fg_color, bg_color, transparent;
++ u8 *src;
++ u32 bgx, fgx;
++ u16 c = scr_readw(s);
++
++ fg_color = get_color(vc, info, c, 1);
++ bg_color = get_color(vc, info, c, 0);
++
++ /* Don't paint the background image if console is blanked */
++ transparent = ops->blank_state ? 0 :
++ (vc->vc_decor.bg_color == bg_color);
++
++ xx = xx * vc->vc_font.width + vc->vc_decor.tx;
++ yy = yy * vc->vc_font.height + vc->vc_decor.ty;
++
++ fgx = cc2cx(fg_color);
++ bgx = cc2cx(bg_color);
++
++ while (count--) {
++ c = scr_readw(s++);
++ src = vc->vc_font.data + (c & charmask) * vc->vc_font.height *
++ ((vc->vc_font.width + 7) >> 3);
++
++ fbcon_decor_renderc(info, yy, xx, vc->vc_font.height,
++ vc->vc_font.width, src, fgx, bgx, transparent);
++ xx += vc->vc_font.width;
++ }
++}
++
++void fbcon_decor_cursor(struct fb_info *info, struct fb_cursor *cursor)
++{
++ int i;
++ unsigned int dsize, s_pitch;
++ struct fbcon_ops *ops = info->fbcon_par;
++ struct vc_data* vc;
++ u8 *src;
++
++ /* we really don't need any cursors while the console is blanked */
++ if (info->state != FBINFO_STATE_RUNNING || ops->blank_state)
++ return;
++
++ vc = vc_cons[ops->currcon].d;
++
++ src = kmalloc(64 + sizeof(struct fb_image), GFP_ATOMIC);
++ if (!src)
++ return;
++
++ s_pitch = (cursor->image.width + 7) >> 3;
++ dsize = s_pitch * cursor->image.height;
++ if (cursor->enable) {
++ switch (cursor->rop) {
++ case ROP_XOR:
++ for (i = 0; i < dsize; i++)
++ src[i] = cursor->image.data[i] ^ cursor->mask[i];
++ break;
++ case ROP_COPY:
++ default:
++ for (i = 0; i < dsize; i++)
++ src[i] = cursor->image.data[i] & cursor->mask[i];
++ break;
++ }
++ } else
++ memcpy(src, cursor->image.data, dsize);
++
++ fbcon_decor_renderc(info,
++ cursor->image.dy + vc->vc_decor.ty,
++ cursor->image.dx + vc->vc_decor.tx,
++ cursor->image.height,
++ cursor->image.width,
++ (u8*)src,
++ cc2cx(cursor->image.fg_color),
++ cc2cx(cursor->image.bg_color),
++ cursor->image.bg_color == vc->vc_decor.bg_color);
++
++ kfree(src);
++}
++
++static void decorset(u8 *dst, int height, int width, int dstbytes,
++ u32 bgx, int bpp)
++{
++ int i;
++
++ if (bpp == 8)
++ bgx |= bgx << 8;
++ if (bpp == 16 || bpp == 8)
++ bgx |= bgx << 16;
++
++ while (height-- > 0) {
++ u8 *p = dst;
++
++ switch (bpp) {
++
++ case 32:
++ for (i=0; i < width; i++) {
++ fb_writel(bgx, p); p += 4;
++ }
++ break;
++ case 24:
++ for (i=0; i < width; i++) {
++#ifdef __LITTLE_ENDIAN
++ fb_writew((bgx & 0xffff),(u16*)p); p += 2;
++ fb_writeb((bgx >> 16),p++);
++#else
++ fb_writew((bgx >> 8),(u16*)p); p += 2;
++ fb_writeb((bgx & 0xff),p++);
++#endif
++ }
++ case 16:
++ for (i=0; i < width/4; i++) {
++ fb_writel(bgx,p); p += 4;
++ fb_writel(bgx,p); p += 4;
++ }
++ if (width & 2) {
++ fb_writel(bgx,p); p += 4;
++ }
++ if (width & 1)
++ fb_writew(bgx,(u16*)p);
++ break;
++ case 8:
++ for (i=0; i < width/4; i++) {
++ fb_writel(bgx,p); p += 4;
++ }
++
++ if (width & 2) {
++ fb_writew(bgx,p); p += 2;
++ }
++ if (width & 1)
++ fb_writeb(bgx,(u8*)p);
++ break;
++
++ }
++ dst += dstbytes;
++ }
++}
++
++void fbcon_decor_copy(u8 *dst, u8 *src, int height, int width, int linebytes,
++ int srclinebytes, int bpp)
++{
++ int i;
++
++ while (height-- > 0) {
++ u32 *p = (u32 *)dst;
++ u32 *q = (u32 *)src;
++
++ switch (bpp) {
++
++ case 32:
++ for (i=0; i < width; i++)
++ fb_writel(*q++, p++);
++ break;
++ case 24:
++ for (i=0; i < (width*3/4); i++)
++ fb_writel(*q++, p++);
++ if ((width*3) % 4) {
++ if (width & 2) {
++ fb_writeb(*(u8*)q, (u8*)p);
++ } else if (width & 1) {
++ fb_writew(*(u16*)q, (u16*)p);
++ fb_writeb(*(u8*)((u16*)q+1),(u8*)((u16*)p+2));
++ }
++ }
++ break;
++ case 16:
++ for (i=0; i < width/4; i++) {
++ fb_writel(*q++, p++);
++ fb_writel(*q++, p++);
++ }
++ if (width & 2)
++ fb_writel(*q++, p++);
++ if (width & 1)
++ fb_writew(*(u16*)q, (u16*)p);
++ break;
++ case 8:
++ for (i=0; i < width/4; i++)
++ fb_writel(*q++, p++);
++
++ if (width & 2) {
++ fb_writew(*(u16*)q, (u16*)p);
++ q = (u32*) ((u16*)q + 1);
++ p = (u32*) ((u16*)p + 1);
++ }
++ if (width & 1)
++ fb_writeb(*(u8*)q, (u8*)p);
++ break;
++ }
++
++ dst += linebytes;
++ src += srclinebytes;
++ }
++}
++
++static void decorfill(struct fb_info *info, int sy, int sx, int height,
++ int width)
++{
++ int bytespp = ((info->var.bits_per_pixel + 7) >> 3);
++ int d = sy * info->fix.line_length + sx * bytespp;
++ int ds = (sy * info->var.xres + sx) * bytespp;
++
++ fbcon_decor_copy((u8 *)(info->screen_base + d), (u8 *)(info->bgdecor.data + ds),
++ height, width, info->fix.line_length, info->var.xres * bytespp,
++ info->var.bits_per_pixel);
++}
++
++void fbcon_decor_clear(struct vc_data *vc, struct fb_info *info, int sy, int sx,
++ int height, int width)
++{
++ int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
++ struct fbcon_ops *ops = info->fbcon_par;
++ u8 *dst;
++ int transparent, bg_color = attr_bgcol_ec(bgshift, vc, info);
++
++ transparent = (vc->vc_decor.bg_color == bg_color);
++ sy = sy * vc->vc_font.height + vc->vc_decor.ty;
++ sx = sx * vc->vc_font.width + vc->vc_decor.tx;
++ height *= vc->vc_font.height;
++ width *= vc->vc_font.width;
++
++ /* Don't paint the background image if console is blanked */
++ if (transparent && !ops->blank_state) {
++ decorfill(info, sy, sx, height, width);
++ } else {
++ dst = (u8 *)(info->screen_base + sy * info->fix.line_length +
++ sx * ((info->var.bits_per_pixel + 7) >> 3));
++ decorset(dst, height, width, info->fix.line_length, cc2cx(bg_color),
++ info->var.bits_per_pixel);
++ }
++}
++
++void fbcon_decor_clear_margins(struct vc_data *vc, struct fb_info *info,
++ int bottom_only)
++{
++ unsigned int tw = vc->vc_cols*vc->vc_font.width;
++ unsigned int th = vc->vc_rows*vc->vc_font.height;
++
++ if (!bottom_only) {
++ /* top margin */
++ decorfill(info, 0, 0, vc->vc_decor.ty, info->var.xres);
++ /* left margin */
++ decorfill(info, vc->vc_decor.ty, 0, th, vc->vc_decor.tx);
++ /* right margin */
++ decorfill(info, vc->vc_decor.ty, vc->vc_decor.tx + tw, th,
++ info->var.xres - vc->vc_decor.tx - tw);
++ }
++ decorfill(info, vc->vc_decor.ty + th, 0,
++ info->var.yres - vc->vc_decor.ty - th, info->var.xres);
++}
++
++void fbcon_decor_bmove_redraw(struct vc_data *vc, struct fb_info *info, int y,
++ int sx, int dx, int width)
++{
++ u16 *d = (u16 *) (vc->vc_origin + vc->vc_size_row * y + dx * 2);
++ u16 *s = d + (dx - sx);
++ u16 *start = d;
++ u16 *ls = d;
++ u16 *le = d + width;
++ u16 c;
++ int x = dx;
++ u16 attr = 1;
++
++ do {
++ c = scr_readw(d);
++ if (attr != (c & 0xff00)) {
++ attr = c & 0xff00;
++ if (d > start) {
++ fbcon_decor_putcs(vc, info, start, d - start, y, x);
++ x += d - start;
++ start = d;
++ }
++ }
++ if (s >= ls && s < le && c == scr_readw(s)) {
++ if (d > start) {
++ fbcon_decor_putcs(vc, info, start, d - start, y, x);
++ x += d - start + 1;
++ start = d + 1;
++ } else {
++ x++;
++ start++;
++ }
++ }
++ s++;
++ d++;
++ } while (d < le);
++ if (d > start)
++ fbcon_decor_putcs(vc, info, start, d - start, y, x);
++}
++
++void fbcon_decor_blank(struct vc_data *vc, struct fb_info *info, int blank)
++{
++ if (blank) {
++ decorset((u8 *)info->screen_base, info->var.yres, info->var.xres,
++ info->fix.line_length, 0, info->var.bits_per_pixel);
++ } else {
++ update_screen(vc);
++ fbcon_decor_clear_margins(vc, info, 0);
++ }
++}
++
+diff -Nur linux-3.13.7.orig/drivers/video/console/fbcon.c linux-3.13.7/drivers/video/console/fbcon.c
+--- linux-3.13.7.orig/drivers/video/console/fbcon.c 2014-03-24 05:45:42.000000000 +0100
++++ linux-3.13.7/drivers/video/console/fbcon.c 2014-03-29 16:03:17.000000000 +0100
+@@ -79,6 +79,7 @@
+ #include <asm/irq.h>
+
+ #include "fbcon.h"
++#include "fbcondecor.h"
+
+ #ifdef FBCONDEBUG
+ # define DPRINTK(fmt, args...) printk(KERN_DEBUG "%s: " fmt, __func__ , ## args)
+@@ -94,7 +95,7 @@
+
+ static struct display fb_display[MAX_NR_CONSOLES];
+
+-static signed char con2fb_map[MAX_NR_CONSOLES];
++signed char con2fb_map[MAX_NR_CONSOLES];
+ static signed char con2fb_map_boot[MAX_NR_CONSOLES];
+
+ static int logo_lines;
+@@ -286,7 +287,7 @@
+ !vt_force_oops_output(vc);
+ }
+
+-static int get_color(struct vc_data *vc, struct fb_info *info,
++int get_color(struct vc_data *vc, struct fb_info *info,
+ u16 c, int is_fg)
+ {
+ int depth = fb_get_color_depth(&info->var, &info->fix);
+@@ -551,6 +552,9 @@
+ info_idx = -1;
+ } else {
+ fbcon_has_console_bind = 1;
++#ifdef CONFIG_FB_CON_DECOR
++ fbcon_decor_init();
++#endif
+ }
+
+ return err;
+@@ -1007,6 +1011,12 @@
+ rows = FBCON_SWAP(ops->rotate, info->var.yres, info->var.xres);
+ cols /= vc->vc_font.width;
+ rows /= vc->vc_font.height;
++
++ if (fbcon_decor_active(info, vc)) {
++ cols = vc->vc_decor.twidth / vc->vc_font.width;
++ rows = vc->vc_decor.theight / vc->vc_font.height;
++ }
++
+ vc_resize(vc, cols, rows);
+
+ DPRINTK("mode: %s\n", info->fix.id);
+@@ -1036,7 +1046,7 @@
+ cap = info->flags;
+
+ if (vc != svc || logo_shown == FBCON_LOGO_DONTSHOW ||
+- (info->fix.type == FB_TYPE_TEXT))
++ (info->fix.type == FB_TYPE_TEXT) || fbcon_decor_active(info, vc))
+ logo = 0;
+
+ if (var_to_display(p, &info->var, info))
+@@ -1260,6 +1270,11 @@
+ fbcon_clear_margins(vc, 0);
+ }
+
++ if (fbcon_decor_active(info, vc)) {
++ fbcon_decor_clear(vc, info, sy, sx, height, width);
++ return;
++ }
++
+ /* Split blits that cross physical y_wrap boundary */
+
+ y_break = p->vrows - p->yscroll;
+@@ -1279,10 +1294,15 @@
+ struct display *p = &fb_display[vc->vc_num];
+ struct fbcon_ops *ops = info->fbcon_par;
+
+- if (!fbcon_is_inactive(vc, info))
+- ops->putcs(vc, info, s, count, real_y(p, ypos), xpos,
+- get_color(vc, info, scr_readw(s), 1),
+- get_color(vc, info, scr_readw(s), 0));
++ if (!fbcon_is_inactive(vc, info)) {
++
++ if (fbcon_decor_active(info, vc))
++ fbcon_decor_putcs(vc, info, s, count, ypos, xpos);
++ else
++ ops->putcs(vc, info, s, count, real_y(p, ypos), xpos,
++ get_color(vc, info, scr_readw(s), 1),
++ get_color(vc, info, scr_readw(s), 0));
++ }
+ }
+
+ static void fbcon_putc(struct vc_data *vc, int c, int ypos, int xpos)
+@@ -1298,8 +1318,13 @@
+ struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]];
+ struct fbcon_ops *ops = info->fbcon_par;
+
+- if (!fbcon_is_inactive(vc, info))
+- ops->clear_margins(vc, info, bottom_only);
++ if (!fbcon_is_inactive(vc, info)) {
++ if (fbcon_decor_active(info, vc)) {
++ fbcon_decor_clear_margins(vc, info, bottom_only);
++ } else {
++ ops->clear_margins(vc, info, bottom_only);
++ }
++ }
+ }
+
+ static void fbcon_cursor(struct vc_data *vc, int mode)
+@@ -1819,7 +1844,7 @@
+ count = vc->vc_rows;
+ if (softback_top)
+ fbcon_softback_note(vc, t, count);
+- if (logo_shown >= 0)
++ if (logo_shown >= 0 || fbcon_decor_active(info, vc))
+ goto redraw_up;
+ switch (p->scrollmode) {
+ case SCROLL_MOVE:
+@@ -1912,6 +1937,8 @@
+ count = vc->vc_rows;
+ if (logo_shown >= 0)
+ goto redraw_down;
++ if (fbcon_decor_active(info, vc))
++ goto redraw_down;
+ switch (p->scrollmode) {
+ case SCROLL_MOVE:
+ fbcon_redraw_blit(vc, info, p, b - 1, b - t - count,
+@@ -2060,6 +2087,13 @@
+ }
+ return;
+ }
++
++ if (fbcon_decor_active(info, vc) && sy == dy && height == 1) {
++ /* must use slower redraw bmove to keep background pic intact */
++ fbcon_decor_bmove_redraw(vc, info, sy, sx, dx, width);
++ return;
++ }
++
+ ops->bmove(vc, info, real_y(p, sy), sx, real_y(p, dy), dx,
+ height, width);
+ }
+@@ -2130,8 +2164,8 @@
+ var.yres = virt_h * virt_fh;
+ x_diff = info->var.xres - var.xres;
+ y_diff = info->var.yres - var.yres;
+- if (x_diff < 0 || x_diff > virt_fw ||
+- y_diff < 0 || y_diff > virt_fh) {
++ if ((x_diff < 0 || x_diff > virt_fw ||
++ y_diff < 0 || y_diff > virt_fh) && !vc->vc_decor.state) {
+ const struct fb_videomode *mode;
+
+ DPRINTK("attempting resize %ix%i\n", var.xres, var.yres);
+@@ -2167,6 +2201,21 @@
+
+ info = registered_fb[con2fb_map[vc->vc_num]];
+ ops = info->fbcon_par;
++ prev_console = ops->currcon;
++ if (prev_console != -1)
++ old_info = registered_fb[con2fb_map[prev_console]];
++
++#ifdef CONFIG_FB_CON_DECOR
++ if (!fbcon_decor_active_vc(vc) && info->fix.visual == FB_VISUAL_DIRECTCOLOR) {
++ struct vc_data *vc_curr = vc_cons[prev_console].d;
++ if (vc_curr && fbcon_decor_active_vc(vc_curr)) {
++ /* Clear the screen to avoid displaying funky colors during
++ * palette updates. */
++ memset((u8*)info->screen_base + info->fix.line_length * info->var.yoffset,
++ 0, info->var.yres * info->fix.line_length);
++ }
++ }
++#endif
+
+ if (softback_top) {
+ if (softback_lines)
+@@ -2185,9 +2234,6 @@
+ logo_shown = FBCON_LOGO_CANSHOW;
+ }
+
+- prev_console = ops->currcon;
+- if (prev_console != -1)
+- old_info = registered_fb[con2fb_map[prev_console]];
+ /*
+ * FIXME: If we have multiple fbdev's loaded, we need to
+ * update all info->currcon. Perhaps, we can place this
+@@ -2231,6 +2277,18 @@
+ fbcon_del_cursor_timer(old_info);
+ }
+
++ if (fbcon_decor_active_vc(vc)) {
++ struct vc_data *vc_curr = vc_cons[prev_console].d;
++
++ if (!vc_curr->vc_decor.theme ||
++ strcmp(vc->vc_decor.theme, vc_curr->vc_decor.theme) ||
++ (fbcon_decor_active_nores(info, vc_curr) &&
++ !fbcon_decor_active(info, vc_curr))) {
++ fbcon_decor_disable(vc, 0);
++ fbcon_decor_call_helper("modechange", vc->vc_num);
++ }
++ }
++
+ if (fbcon_is_inactive(vc, info) ||
+ ops->blank_state != FB_BLANK_UNBLANK)
+ fbcon_del_cursor_timer(info);
+@@ -2339,15 +2397,20 @@
+ }
+ }
+
+- if (!fbcon_is_inactive(vc, info)) {
++ if (!fbcon_is_inactive(vc, info)) {
+ if (ops->blank_state != blank) {
+ ops->blank_state = blank;
+ fbcon_cursor(vc, blank ? CM_ERASE : CM_DRAW);
+ ops->cursor_flash = (!blank);
+
+- if (!(info->flags & FBINFO_MISC_USEREVENT))
+- if (fb_blank(info, blank))
+- fbcon_generic_blank(vc, info, blank);
++ if (!(info->flags & FBINFO_MISC_USEREVENT)) {
++ if (fb_blank(info, blank)) {
++ if (fbcon_decor_active(info, vc))
++ fbcon_decor_blank(vc, info, blank);
++ else
++ fbcon_generic_blank(vc, info, blank);
++ }
++ }
+ }
+
+ if (!blank)
+@@ -2522,13 +2585,22 @@
+ }
+
+ if (resize) {
++ /* reset wrap/pan */
+ int cols, rows;
+
+ cols = FBCON_SWAP(ops->rotate, info->var.xres, info->var.yres);
+ rows = FBCON_SWAP(ops->rotate, info->var.yres, info->var.xres);
++
++ if (fbcon_decor_active(info, vc)) {
++ info->var.xoffset = info->var.yoffset = p->yscroll = 0;
++ cols = vc->vc_decor.twidth;
++ rows = vc->vc_decor.theight;
++ }
+ cols /= w;
+ rows /= h;
++
+ vc_resize(vc, cols, rows);
++
+ if (CON_IS_VISIBLE(vc) && softback_buf)
+ fbcon_update_softback(vc);
+ } else if (CON_IS_VISIBLE(vc)
+@@ -2657,7 +2729,11 @@
+ int i, j, k, depth;
+ u8 val;
+
+- if (fbcon_is_inactive(vc, info))
++ if (fbcon_is_inactive(vc, info)
++#ifdef CONFIG_FB_CON_DECOR
++ || vc->vc_num != fg_console
++#endif
++ )
+ return -EINVAL;
+
+ if (!CON_IS_VISIBLE(vc))
+@@ -2683,14 +2759,56 @@
+ } else
+ fb_copy_cmap(fb_default_cmap(1 << depth), &palette_cmap);
+
+- return fb_set_cmap(&palette_cmap, info);
++ if (fbcon_decor_active(info, vc_cons[fg_console].d) &&
++ info->fix.visual == FB_VISUAL_DIRECTCOLOR) {
++
++ u16 *red, *green, *blue;
++ int minlen = min(min(info->var.red.length, info->var.green.length),
++ info->var.blue.length);
++ int h;
++
++ struct fb_cmap cmap = {
++ .start = 0,
++ .len = (1 << minlen),
++ .red = NULL,
++ .green = NULL,
++ .blue = NULL,
++ .transp = NULL
++ };
++
++ red = kmalloc(256 * sizeof(u16) * 3, GFP_KERNEL);
++
++ if (!red)
++ goto out;
++
++ green = red + 256;
++ blue = green + 256;
++ cmap.red = red;
++ cmap.green = green;
++ cmap.blue = blue;
++
++ for (i = 0; i < cmap.len; i++) {
++ red[i] = green[i] = blue[i] = (0xffff * i)/(cmap.len-1);
++ }
++
++ h = fb_set_cmap(&cmap, info);
++ fbcon_decor_fix_pseudo_pal(info, vc_cons[fg_console].d);
++ kfree(red);
++
++ return h;
++
++ } else if (fbcon_decor_active(info, vc_cons[fg_console].d) &&
++ info->var.bits_per_pixel == 8 && info->bgdecor.cmap.red != NULL)
++ fb_set_cmap(&info->bgdecor.cmap, info);
++
++out: return fb_set_cmap(&palette_cmap, info);
+ }
+
+ static u16 *fbcon_screen_pos(struct vc_data *vc, int offset)
+ {
+ unsigned long p;
+ int line;
+-
++
+ if (vc->vc_num != fg_console || !softback_lines)
+ return (u16 *) (vc->vc_origin + offset);
+ line = offset / vc->vc_size_row;
+@@ -2909,7 +3027,14 @@
+ rows = FBCON_SWAP(ops->rotate, info->var.yres, info->var.xres);
+ cols /= vc->vc_font.width;
+ rows /= vc->vc_font.height;
+- vc_resize(vc, cols, rows);
++
++ if (!fbcon_decor_active_nores(info, vc)) {
++ vc_resize(vc, cols, rows);
++ } else {
++ fbcon_decor_disable(vc, 0);
++ fbcon_decor_call_helper("modechange", vc->vc_num);
++ }
++
+ updatescrollmode(p, info, vc);
+ scrollback_max = 0;
+ scrollback_current = 0;
+@@ -2954,7 +3079,9 @@
+ rows = FBCON_SWAP(ops->rotate, info->var.yres, info->var.xres);
+ cols /= vc->vc_font.width;
+ rows /= vc->vc_font.height;
+- vc_resize(vc, cols, rows);
++ if (!fbcon_decor_active_nores(info, vc)) {
++ vc_resize(vc, cols, rows);
++ }
+ }
+
+ if (fg != -1)
+@@ -3570,6 +3697,7 @@
+ }
+ }
+
++ fbcon_decor_exit();
+ fbcon_has_exited = 1;
+ }
+
+diff -Nur linux-3.13.7.orig/drivers/video/console/fbcondecor.c linux-3.13.7/drivers/video/console/fbcondecor.c
+--- linux-3.13.7.orig/drivers/video/console/fbcondecor.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-3.13.7/drivers/video/console/fbcondecor.c 2014-03-29 16:03:17.000000000 +0100
+@@ -0,0 +1,555 @@
++/*
++ * linux/drivers/video/console/fbcondecor.c -- Framebuffer console decorations
++ *
++ * Copyright (C) 2004-2009 Michal Januszewski <michalj+fbcondecor@gmail.com>
++ *
++ * Code based upon "Bootsplash" (C) 2001-2003
++ * Volker Poplawski <volker@poplawski.de>,
++ * Stefan Reinauer <stepan@suse.de>,
++ * Steffen Winterfeldt <snwint@suse.de>,
++ * Michael Schroeder <mls@suse.de>,
++ * Ken Wimer <wimer@suse.de>.
++ *
++ * Compat ioctl support by Thorsten Klein <TK@Thorsten-Klein.de>.
++ *
++ * This file is subject to the terms and conditions of the GNU General Public
++ * License. See the file COPYING in the main directory of this archive for
++ * more details.
++ *
++ */
++#include <linux/module.h>
++#include <linux/kernel.h>
++#include <linux/string.h>
++#include <linux/types.h>
++#include <linux/fb.h>
++#include <linux/vt_kern.h>
++#include <linux/vmalloc.h>
++#include <linux/unistd.h>
++#include <linux/syscalls.h>
++#include <linux/init.h>
++#include <linux/proc_fs.h>
++#include <linux/workqueue.h>
++#include <linux/kmod.h>
++#include <linux/miscdevice.h>
++#include <linux/device.h>
++#include <linux/fs.h>
++#include <linux/compat.h>
++#include <linux/console.h>
++
++#include <asm/uaccess.h>
++#include <asm/irq.h>
++
++#include "fbcon.h"
++#include "fbcondecor.h"
++
++extern signed char con2fb_map[];
++static int fbcon_decor_enable(struct vc_data *vc);
++char fbcon_decor_path[KMOD_PATH_LEN] = "/sbin/fbcondecor_helper";
++static int initialized = 0;
++
++int fbcon_decor_call_helper(char* cmd, unsigned short vc)
++{
++ char *envp[] = {
++ "HOME=/",
++ "PATH=/sbin:/bin",
++ NULL
++ };
++
++ char tfb[5];
++ char tcons[5];
++ unsigned char fb = (int) con2fb_map[vc];
++
++ char *argv[] = {
++ fbcon_decor_path,
++ "2",
++ cmd,
++ tcons,
++ tfb,
++ vc_cons[vc].d->vc_decor.theme,
++ NULL
++ };
++
++ snprintf(tfb,5,"%d",fb);
++ snprintf(tcons,5,"%d",vc);
++
++ return call_usermodehelper(fbcon_decor_path, argv, envp, UMH_WAIT_EXEC);
++}
++
++/* Disables fbcondecor on a virtual console; called with console sem held. */
++int fbcon_decor_disable(struct vc_data *vc, unsigned char redraw)
++{
++ struct fb_info* info;
++
++ if (!vc->vc_decor.state)
++ return -EINVAL;
++
++ info = registered_fb[(int) con2fb_map[vc->vc_num]];
++
++ if (info == NULL)
++ return -EINVAL;
++
++ vc->vc_decor.state = 0;
++ vc_resize(vc, info->var.xres / vc->vc_font.width,
++ info->var.yres / vc->vc_font.height);
++
++ if (fg_console == vc->vc_num && redraw) {
++ redraw_screen(vc, 0);
++ update_region(vc, vc->vc_origin +
++ vc->vc_size_row * vc->vc_top,
++ vc->vc_size_row * (vc->vc_bottom - vc->vc_top) / 2);
++ }
++
++ printk(KERN_INFO "fbcondecor: switched decor state to 'off' on console %d\n",
++ vc->vc_num);
++
++ return 0;
++}
++
++/* Enables fbcondecor on a virtual console; called with console sem held. */
++static int fbcon_decor_enable(struct vc_data *vc)
++{
++ struct fb_info* info;
++
++ info = registered_fb[(int) con2fb_map[vc->vc_num]];
++
++ if (vc->vc_decor.twidth == 0 || vc->vc_decor.theight == 0 ||
++ info == NULL || vc->vc_decor.state || (!info->bgdecor.data &&
++ vc->vc_num == fg_console))
++ return -EINVAL;
++
++ vc->vc_decor.state = 1;
++ vc_resize(vc, vc->vc_decor.twidth / vc->vc_font.width,
++ vc->vc_decor.theight / vc->vc_font.height);
++
++ if (fg_console == vc->vc_num) {
++ redraw_screen(vc, 0);
++ update_region(vc, vc->vc_origin +
++ vc->vc_size_row * vc->vc_top,
++ vc->vc_size_row * (vc->vc_bottom - vc->vc_top) / 2);
++ fbcon_decor_clear_margins(vc, info, 0);
++ }
++
++ printk(KERN_INFO "fbcondecor: switched decor state to 'on' on console %d\n",
++ vc->vc_num);
++
++ return 0;
++}
++
++static inline int fbcon_decor_ioctl_dosetstate(struct vc_data *vc, unsigned int state, unsigned char origin)
++{
++ int ret;
++
++// if (origin == FBCON_DECOR_IO_ORIG_USER)
++ console_lock();
++ if (!state)
++ ret = fbcon_decor_disable(vc, 1);
++ else
++ ret = fbcon_decor_enable(vc);
++// if (origin == FBCON_DECOR_IO_ORIG_USER)
++ console_unlock();
++
++ return ret;
++}
++
++static inline void fbcon_decor_ioctl_dogetstate(struct vc_data *vc, unsigned int *state)
++{
++ *state = vc->vc_decor.state;
++}
++
++static int fbcon_decor_ioctl_dosetcfg(struct vc_data *vc, struct vc_decor *cfg, unsigned char origin)
++{
++ struct fb_info *info;
++ int len;
++ char *tmp;
++
++ info = registered_fb[(int) con2fb_map[vc->vc_num]];
++
++ if (info == NULL || !cfg->twidth || !cfg->theight ||
++ cfg->tx + cfg->twidth > info->var.xres ||
++ cfg->ty + cfg->theight > info->var.yres)
++ return -EINVAL;
++
++ len = strlen_user(cfg->theme);
++ if (!len || len > FBCON_DECOR_THEME_LEN)
++ return -EINVAL;
++ tmp = kmalloc(len, GFP_KERNEL);
++ if (!tmp)
++ return -ENOMEM;
++ if (copy_from_user(tmp, (void __user *)cfg->theme, len))
++ return -EFAULT;
++ cfg->theme = tmp;
++ cfg->state = 0;
++
++ /* If this ioctl is a response to a request from kernel, the console sem
++ * is already held; we also don't need to disable decor because either the
++ * new config and background picture will be successfully loaded, and the
++ * decor will stay on, or in case of a failure it'll be turned off in fbcon. */
++// if (origin == FBCON_DECOR_IO_ORIG_USER) {
++ console_lock();
++ if (vc->vc_decor.state)
++ fbcon_decor_disable(vc, 1);
++// }
++
++ if (vc->vc_decor.theme)
++ kfree(vc->vc_decor.theme);
++
++ vc->vc_decor = *cfg;
++
++// if (origin == FBCON_DECOR_IO_ORIG_USER)
++ console_unlock();
++
++ printk(KERN_INFO "fbcondecor: console %d using theme '%s'\n",
++ vc->vc_num, vc->vc_decor.theme);
++ return 0;
++}
++
++static int fbcon_decor_ioctl_dogetcfg(struct vc_data *vc, struct vc_decor *decor)
++{
++ char __user *tmp;
++
++ tmp = decor->theme;
++ *decor = vc->vc_decor;
++ decor->theme = tmp;
++
++ if (vc->vc_decor.theme) {
++ if (copy_to_user(tmp, vc->vc_decor.theme, strlen(vc->vc_decor.theme) + 1))
++ return -EFAULT;
++ } else
++ if (put_user(0, tmp))
++ return -EFAULT;
++
++ return 0;
++}
++
++static int fbcon_decor_ioctl_dosetpic(struct vc_data *vc, struct fb_image *img, unsigned char origin)
++{
++ struct fb_info *info;
++ int len;
++ u8 *tmp;
++
++ if (vc->vc_num != fg_console)
++ return -EINVAL;
++
++ info = registered_fb[(int) con2fb_map[vc->vc_num]];
++
++ if (info == NULL)
++ return -EINVAL;
++
++ if (img->width != info->var.xres || img->height != info->var.yres) {
++ printk(KERN_ERR "fbcondecor: picture dimensions mismatch\n");
++ printk(KERN_ERR "%dx%d vs %dx%d\n", img->width, img->height, info->var.xres, info->var.yres);
++ return -EINVAL;
++ }
++
++ if (img->depth != info->var.bits_per_pixel) {
++ printk(KERN_ERR "fbcondecor: picture depth mismatch\n");
++ return -EINVAL;
++ }
++
++ if (img->depth == 8) {
++ if (!img->cmap.len || !img->cmap.red || !img->cmap.green ||
++ !img->cmap.blue)
++ return -EINVAL;
++
++ tmp = vmalloc(img->cmap.len * 3 * 2);
++ if (!tmp)
++ return -ENOMEM;
++
++ if (copy_from_user(tmp,
++ (void __user*)img->cmap.red, (img->cmap.len << 1)) ||
++ copy_from_user(tmp + (img->cmap.len << 1),
++ (void __user*)img->cmap.green, (img->cmap.len << 1)) ||
++ copy_from_user(tmp + (img->cmap.len << 2),
++ (void __user*)img->cmap.blue, (img->cmap.len << 1))) {
++ vfree(tmp);
++ return -EFAULT;
++ }
++
++ img->cmap.transp = NULL;
++ img->cmap.red = (u16*)tmp;
++ img->cmap.green = img->cmap.red + img->cmap.len;
++ img->cmap.blue = img->cmap.green + img->cmap.len;
++ } else {
++ img->cmap.red = NULL;
++ }
++
++ len = ((img->depth + 7) >> 3) * img->width * img->height;
++
++ /*
++ * Allocate an additional byte so that we never go outside of the
++ * buffer boundaries in the rendering functions in a 24 bpp mode.
++ */
++ tmp = vmalloc(len + 1);
++
++ if (!tmp)
++ goto out;
++
++ if (copy_from_user(tmp, (void __user*)img->data, len))
++ goto out;
++
++ img->data = tmp;
++
++ /* If this ioctl is a response to a request from kernel, the console sem
++ * is already held. */
++// if (origin == FBCON_DECOR_IO_ORIG_USER)
++ console_lock();
++
++ if (info->bgdecor.data)
++ vfree((u8*)info->bgdecor.data);
++ if (info->bgdecor.cmap.red)
++ vfree(info->bgdecor.cmap.red);
++
++ info->bgdecor = *img;
++
++ if (fbcon_decor_active_vc(vc) && fg_console == vc->vc_num) {
++ redraw_screen(vc, 0);
++ update_region(vc, vc->vc_origin +
++ vc->vc_size_row * vc->vc_top,
++ vc->vc_size_row * (vc->vc_bottom - vc->vc_top) / 2);
++ fbcon_decor_clear_margins(vc, info, 0);
++ }
++
++// if (origin == FBCON_DECOR_IO_ORIG_USER)
++ console_unlock();
++
++ return 0;
++
++out: if (img->cmap.red)
++ vfree(img->cmap.red);
++
++ if (tmp)
++ vfree(tmp);
++ return -ENOMEM;
++}
++
++static long fbcon_decor_ioctl(struct file *filp, u_int cmd, u_long arg)
++{
++ struct fbcon_decor_iowrapper __user *wrapper = (void __user*) arg;
++ struct vc_data *vc = NULL;
++ unsigned short vc_num = 0;
++ unsigned char origin = 0;
++ void __user *data = NULL;
++
++ if (!access_ok(VERIFY_READ, wrapper,
++ sizeof(struct fbcon_decor_iowrapper)))
++ return -EFAULT;
++
++ __get_user(vc_num, &wrapper->vc);
++ __get_user(origin, &wrapper->origin);
++ __get_user(data, &wrapper->data);
++
++ if (!vc_cons_allocated(vc_num))
++ return -EINVAL;
++
++ vc = vc_cons[vc_num].d;
++
++ switch (cmd) {
++ case FBIOCONDECOR_SETPIC:
++ {
++ struct fb_image img;
++ if (copy_from_user(&img, (struct fb_image __user *)data, sizeof(struct fb_image)))
++ return -EFAULT;
++
++ return fbcon_decor_ioctl_dosetpic(vc, &img, origin);
++ }
++ case FBIOCONDECOR_SETCFG:
++ {
++ struct vc_decor cfg;
++ if (copy_from_user(&cfg, (struct vc_decor __user *)data, sizeof(struct vc_decor)))
++ return -EFAULT;
++
++ return fbcon_decor_ioctl_dosetcfg(vc, &cfg, origin);
++ }
++ case FBIOCONDECOR_GETCFG:
++ {
++ int rval;
++ struct vc_decor cfg;
++
++ if (copy_from_user(&cfg, (struct vc_decor __user *)data, sizeof(struct vc_decor)))
++ return -EFAULT;
++
++ rval = fbcon_decor_ioctl_dogetcfg(vc, &cfg);
++
++ if (copy_to_user(data, &cfg, sizeof(struct vc_decor)))
++ return -EFAULT;
++ return rval;
++ }
++ case FBIOCONDECOR_SETSTATE:
++ {
++ unsigned int state = 0;
++ if (get_user(state, (unsigned int __user *)data))
++ return -EFAULT;
++ return fbcon_decor_ioctl_dosetstate(vc, state, origin);
++ }
++ case FBIOCONDECOR_GETSTATE:
++ {
++ unsigned int state = 0;
++ fbcon_decor_ioctl_dogetstate(vc, &state);
++ return put_user(state, (unsigned int __user *)data);
++ }
++
++ default:
++ return -ENOIOCTLCMD;
++ }
++}
++
++#ifdef CONFIG_COMPAT
++
++static long fbcon_decor_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) {
++
++ struct fbcon_decor_iowrapper32 __user *wrapper = (void __user *)arg;
++ struct vc_data *vc = NULL;
++ unsigned short vc_num = 0;
++ unsigned char origin = 0;
++ compat_uptr_t data_compat = 0;
++ void __user *data = NULL;
++
++ if (!access_ok(VERIFY_READ, wrapper,
++ sizeof(struct fbcon_decor_iowrapper32)))
++ return -EFAULT;
++
++ __get_user(vc_num, &wrapper->vc);
++ __get_user(origin, &wrapper->origin);
++ __get_user(data_compat, &wrapper->data);
++ data = compat_ptr(data_compat);
++
++ if (!vc_cons_allocated(vc_num))
++ return -EINVAL;
++
++ vc = vc_cons[vc_num].d;
++
++ switch (cmd) {
++ case FBIOCONDECOR_SETPIC32:
++ {
++ struct fb_image32 img_compat;
++ struct fb_image img;
++
++ if (copy_from_user(&img_compat, (struct fb_image32 __user *)data, sizeof(struct fb_image32)))
++ return -EFAULT;
++
++ fb_image_from_compat(img, img_compat);
++
++ return fbcon_decor_ioctl_dosetpic(vc, &img, origin);
++ }
++
++ case FBIOCONDECOR_SETCFG32:
++ {
++ struct vc_decor32 cfg_compat;
++ struct vc_decor cfg;
++
++ if (copy_from_user(&cfg_compat, (struct vc_decor32 __user *)data, sizeof(struct vc_decor32)))
++ return -EFAULT;
++
++ vc_decor_from_compat(cfg, cfg_compat);
++
++ return fbcon_decor_ioctl_dosetcfg(vc, &cfg, origin);
++ }
++
++ case FBIOCONDECOR_GETCFG32:
++ {
++ int rval;
++ struct vc_decor32 cfg_compat;
++ struct vc_decor cfg;
++
++ if (copy_from_user(&cfg_compat, (struct vc_decor32 __user *)data, sizeof(struct vc_decor32)))
++ return -EFAULT;
++ cfg.theme = compat_ptr(cfg_compat.theme);
++
++ rval = fbcon_decor_ioctl_dogetcfg(vc, &cfg);
++
++ vc_decor_to_compat(cfg_compat, cfg);
++
++ if (copy_to_user((struct vc_decor32 __user *)data, &cfg_compat, sizeof(struct vc_decor32)))
++ return -EFAULT;
++ return rval;
++ }
++
++ case FBIOCONDECOR_SETSTATE32:
++ {
++ compat_uint_t state_compat = 0;
++ unsigned int state = 0;
++
++ if (get_user(state_compat, (compat_uint_t __user *)data))
++ return -EFAULT;
++
++ state = (unsigned int)state_compat;
++
++ return fbcon_decor_ioctl_dosetstate(vc, state, origin);
++ }
++
++ case FBIOCONDECOR_GETSTATE32:
++ {
++ compat_uint_t state_compat = 0;
++ unsigned int state = 0;
++
++ fbcon_decor_ioctl_dogetstate(vc, &state);
++ state_compat = (compat_uint_t)state;
++
++ return put_user(state_compat, (compat_uint_t __user *)data);
++ }
++
++ default:
++ return -ENOIOCTLCMD;
++ }
++}
++#else
++ #define fbcon_decor_compat_ioctl NULL
++#endif
++
++static struct file_operations fbcon_decor_ops = {
++ .owner = THIS_MODULE,
++ .unlocked_ioctl = fbcon_decor_ioctl,
++ .compat_ioctl = fbcon_decor_compat_ioctl
++};
++
++static struct miscdevice fbcon_decor_dev = {
++ .minor = MISC_DYNAMIC_MINOR,
++ .name = "fbcondecor",
++ .fops = &fbcon_decor_ops
++};
++
++void fbcon_decor_reset()
++{
++ int i;
++
++ for (i = 0; i < num_registered_fb; i++) {
++ registered_fb[i]->bgdecor.data = NULL;
++ registered_fb[i]->bgdecor.cmap.red = NULL;
++ }
++
++ for (i = 0; i < MAX_NR_CONSOLES && vc_cons[i].d; i++) {
++ vc_cons[i].d->vc_decor.state = vc_cons[i].d->vc_decor.twidth =
++ vc_cons[i].d->vc_decor.theight = 0;
++ vc_cons[i].d->vc_decor.theme = NULL;
++ }
++
++ return;
++}
++
++int fbcon_decor_init()
++{
++ int i;
++
++ fbcon_decor_reset();
++
++ if (initialized)
++ return 0;
++
++ i = misc_register(&fbcon_decor_dev);
++ if (i) {
++ printk(KERN_ERR "fbcondecor: failed to register device\n");
++ return i;
++ }
++
++ fbcon_decor_call_helper("init", 0);
++ initialized = 1;
++ return 0;
++}
++
++int fbcon_decor_exit(void)
++{
++ fbcon_decor_reset();
++ return 0;
++}
++
++EXPORT_SYMBOL(fbcon_decor_path);
+diff -Nur linux-3.13.7.orig/drivers/video/console/fbcondecor.h linux-3.13.7/drivers/video/console/fbcondecor.h
+--- linux-3.13.7.orig/drivers/video/console/fbcondecor.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-3.13.7/drivers/video/console/fbcondecor.h 2014-03-29 21:17:27.000000000 +0100
+@@ -0,0 +1,79 @@
++/*
++ * linux/drivers/video/console/fbcondecor.h -- Framebuffer Console Decoration headers
++ *
++ * Copyright (C) 2004 Michal Januszewski <michalj+fbcondecor@gmail.com>
++ *
++ */
++
++#ifndef __FBCON_DECOR_H
++#define __FBCON_DECOR_H
++
++#ifndef _LINUX_FB_H
++#include <linux/fb.h>
++#endif
++
++/* This is needed for vc_cons in fbcmap.c */
++#include <linux/vt_kern.h>
++
++struct fb_cursor;
++struct fb_info;
++struct vc_data;
++
++#ifdef CONFIG_FB_CON_DECOR
++/* fbcondecor.c */
++int fbcon_decor_init(void);
++void fbcon_decor_reset(void);
++int fbcon_decor_exit(void);
++int fbcon_decor_call_helper(char* cmd, unsigned short cons);
++int fbcon_decor_disable(struct vc_data *vc, unsigned char redraw);
++
++/* cfbcondecor.c */
++void fbcon_decor_putcs(struct vc_data *vc, struct fb_info *info, const unsigned short *s, int count, int yy, int xx);
++void fbcon_decor_cursor(struct fb_info *info, struct fb_cursor *cursor);
++void fbcon_decor_clear(struct vc_data *vc, struct fb_info *info, int sy, int sx, int height, int width);
++void fbcon_decor_clear_margins(struct vc_data *vc, struct fb_info *info, int bottom_only);
++void fbcon_decor_blank(struct vc_data *vc, struct fb_info *info, int blank);
++void fbcon_decor_bmove_redraw(struct vc_data *vc, struct fb_info *info, int y, int sx, int dx, int width);
++void fbcon_decor_copy(u8 *dst, u8 *src, int height, int width, int linebytes, int srclinesbytes, int bpp);
++void fbcon_decor_fix_pseudo_pal(struct fb_info *info, struct vc_data *vc);
++
++/* vt.c */
++void acquire_console_sem(void);
++void release_console_sem(void);
++void do_unblank_screen(int entering_gfx);
++
++/* struct vc_data *y */
++#define fbcon_decor_active_vc(y) (y->vc_decor.state && y->vc_decor.theme)
++
++/* struct fb_info *x, struct vc_data *y */
++#define fbcon_decor_active_nores(x,y) (x->bgdecor.data && fbcon_decor_active_vc(y))
++
++/* struct fb_info *x, struct vc_data *y */
++#define fbcon_decor_active(x,y) (fbcon_decor_active_nores(x,y) && \
++ x->bgdecor.width == x->var.xres && \
++ x->bgdecor.height == x->var.yres && \
++ x->bgdecor.depth == x->var.bits_per_pixel)
++
++
++#else /* CONFIG_FB_CON_DECOR */
++
++static inline void fbcon_decor_putcs(struct vc_data *vc, struct fb_info *info, const unsigned short *s, int count, int yy, int xx) {}
++static inline void fbcon_decor_putc(struct vc_data *vc, struct fb_info *info, int c, int ypos, int xpos) {}
++static inline void fbcon_decor_cursor(struct fb_info *info, struct fb_cursor *cursor) {}
++static inline void fbcon_decor_clear(struct vc_data *vc, struct fb_info *info, int sy, int sx, int height, int width) {}
++static inline void fbcon_decor_clear_margins(struct vc_data *vc, struct fb_info *info, int bottom_only) {}
++static inline void fbcon_decor_blank(struct vc_data *vc, struct fb_info *info, int blank) {}
++static inline void fbcon_decor_bmove_redraw(struct vc_data *vc, struct fb_info *info, int y, int sx, int dx, int width) {}
++static inline void fbcon_decor_fix_pseudo_pal(struct fb_info *info, struct vc_data *vc) {}
++static inline int fbcon_decor_call_helper(char* cmd, unsigned short cons) { return 0; }
++static inline int fbcon_decor_init(void) { return 0; }
++static inline int fbcon_decor_exit(void) { return 0; }
++static inline int fbcon_decor_disable(struct vc_data *vc, unsigned char redraw) { return 0; }
++
++#define fbcon_decor_active_vc(y) (0)
++#define fbcon_decor_active_nores(x,y) (0)
++#define fbcon_decor_active(x,y) (0)
++
++#endif /* CONFIG_FB_CON_DECOR */
++
++#endif /* __FBCON_DECOR_H */
+diff -Nur linux-3.13.7.orig/drivers/video/fbcmap.c linux-3.13.7/drivers/video/fbcmap.c
+--- linux-3.13.7.orig/drivers/video/fbcmap.c 2014-03-24 05:45:42.000000000 +0100
++++ linux-3.13.7/drivers/video/fbcmap.c 2014-03-29 16:03:17.000000000 +0100
+@@ -17,6 +17,8 @@
+ #include <linux/slab.h>
+ #include <linux/uaccess.h>
+
++#include "console/fbcondecor.h"
++
+ static u16 red2[] __read_mostly = {
+ 0x0000, 0xaaaa
+ };
+@@ -249,14 +251,17 @@
+ if (transp)
+ htransp = *transp++;
+ if (info->fbops->fb_setcolreg(start++,
+- hred, hgreen, hblue,
++ hred, hgreen, hblue,
+ htransp, info))
+ break;
+ }
+ }
+- if (rc == 0)
++ if (rc == 0) {
+ fb_copy_cmap(cmap, &info->cmap);
+-
++ if (fbcon_decor_active(info, vc_cons[fg_console].d) &&
++ info->fix.visual == FB_VISUAL_DIRECTCOLOR)
++ fbcon_decor_fix_pseudo_pal(info, vc_cons[fg_console].d);
++ }
+ return rc;
+ }
+
+diff -Nur linux-3.13.7.orig/drivers/video/fbmem.c linux-3.13.7/drivers/video/fbmem.c
+--- linux-3.13.7.orig/drivers/video/fbmem.c 2014-03-24 05:45:42.000000000 +0100
++++ linux-3.13.7/drivers/video/fbmem.c 2014-03-29 16:03:17.000000000 +0100
+@@ -1250,15 +1250,6 @@
+ u16 reserved[3];
+ };
+
+-struct fb_cmap32 {
+- u32 start;
+- u32 len;
+- compat_caddr_t red;
+- compat_caddr_t green;
+- compat_caddr_t blue;
+- compat_caddr_t transp;
+-};
+-
+ static int fb_getput_cmap(struct fb_info *info, unsigned int cmd,
+ unsigned long arg)
+ {
+diff -Nur linux-3.13.7.orig/include/linux/console_decor.h linux-3.13.7/include/linux/console_decor.h
+--- linux-3.13.7.orig/include/linux/console_decor.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-3.13.7/include/linux/console_decor.h 2014-03-29 16:03:17.000000000 +0100
+@@ -0,0 +1,46 @@
++#ifndef _LINUX_CONSOLE_DECOR_H_
++#define _LINUX_CONSOLE_DECOR_H_ 1
++
++/* A structure used by the framebuffer console decorations (drivers/video/console/fbcondecor.c) */
++struct vc_decor {
++ __u8 bg_color; /* The color that is to be treated as transparent */
++ __u8 state; /* Current decor state: 0 = off, 1 = on */
++ __u16 tx, ty; /* Top left corner coordinates of the text field */
++ __u16 twidth, theight; /* Width and height of the text field */
++ char* theme;
++};
++
++#ifdef __KERNEL__
++#ifdef CONFIG_COMPAT
++#include <linux/compat.h>
++
++struct vc_decor32 {
++ __u8 bg_color; /* The color that is to be treated as transparent */
++ __u8 state; /* Current decor state: 0 = off, 1 = on */
++ __u16 tx, ty; /* Top left corner coordinates of the text field */
++ __u16 twidth, theight; /* Width and height of the text field */
++ compat_uptr_t theme;
++};
++
++#define vc_decor_from_compat(to, from) \
++ (to).bg_color = (from).bg_color; \
++ (to).state = (from).state; \
++ (to).tx = (from).tx; \
++ (to).ty = (from).ty; \
++ (to).twidth = (from).twidth; \
++ (to).theight = (from).theight; \
++ (to).theme = compat_ptr((from).theme)
++
++#define vc_decor_to_compat(to, from) \
++ (to).bg_color = (from).bg_color; \
++ (to).state = (from).state; \
++ (to).tx = (from).tx; \
++ (to).ty = (from).ty; \
++ (to).twidth = (from).twidth; \
++ (to).theight = (from).theight; \
++ (to).theme = ptr_to_compat((from).theme)
++
++#endif /* CONFIG_COMPAT */
++#endif /* __KERNEL__ */
++
++#endif
+diff -Nur linux-3.13.7.orig/include/linux/console_struct.h linux-3.13.7/include/linux/console_struct.h
+--- linux-3.13.7.orig/include/linux/console_struct.h 2014-03-24 05:45:42.000000000 +0100
++++ linux-3.13.7/include/linux/console_struct.h 2014-03-29 16:03:17.000000000 +0100
+@@ -19,6 +19,7 @@
+ struct vt_struct;
+
+ #define NPAR 16
++#include <linux/console_decor.h>
+
+ struct vc_data {
+ struct tty_port port; /* Upper level data */
+@@ -107,6 +108,8 @@
+ unsigned long vc_uni_pagedir;
+ unsigned long *vc_uni_pagedir_loc; /* [!] Location of uni_pagedir variable for this console */
+ bool vc_panic_force_write; /* when oops/panic this VC can accept forced output/blanking */
++
++ struct vc_decor vc_decor;
+ /* additional information is in vt_kern.h */
+ };
+
+diff -Nur linux-3.13.7.orig/include/linux/fb.h linux-3.13.7/include/linux/fb.h
+--- linux-3.13.7.orig/include/linux/fb.h 2014-03-24 05:45:42.000000000 +0100
++++ linux-3.13.7/include/linux/fb.h 2014-03-29 16:03:17.000000000 +0100
+@@ -219,6 +219,34 @@
+ };
+ #endif
+
++#ifdef __KERNEL__
++#ifdef CONFIG_COMPAT
++struct fb_image32 {
++ __u32 dx; /* Where to place image */
++ __u32 dy;
++ __u32 width; /* Size of image */
++ __u32 height;
++ __u32 fg_color; /* Only used when a mono bitmap */
++ __u32 bg_color;
++ __u8 depth; /* Depth of the image */
++ const compat_uptr_t data; /* Pointer to image data */
++ struct fb_cmap32 cmap; /* color map info */
++};
++
++#define fb_image_from_compat(to, from) \
++ (to).dx = (from).dx; \
++ (to).dy = (from).dy; \
++ (to).width = (from).width; \
++ (to).height = (from).height; \
++ (to).fg_color = (from).fg_color; \
++ (to).bg_color = (from).bg_color; \
++ (to).depth = (from).depth; \
++ (to).data = compat_ptr((from).data); \
++ fb_cmap_from_compat((to).cmap, (from).cmap)
++
++#endif /* CONFIG_COMPAT */
++#endif /* __KERNEL__ */
++
+ /*
+ * Frame buffer operations
+ *
+@@ -489,6 +517,9 @@
+ #define FBINFO_STATE_SUSPENDED 1
+ u32 state; /* Hardware state i.e suspend */
+ void *fbcon_par; /* fbcon use-only private area */
++
++ struct fb_image bgdecor;
++
+ /* From here on everything is device dependent */
+ void *par;
+ /* we need the PCI or similar aperture base/size not
+diff -Nur linux-3.13.7.orig/include/uapi/linux/fb.h linux-3.13.7/include/uapi/linux/fb.h
+--- linux-3.13.7.orig/include/uapi/linux/fb.h 2014-03-24 05:45:42.000000000 +0100
++++ linux-3.13.7/include/uapi/linux/fb.h 2014-03-29 16:03:17.000000000 +0100
+@@ -8,6 +8,25 @@
+
+ #define FB_MAX 32 /* sufficient for now */
+
++struct fbcon_decor_iowrapper
++{
++ unsigned short vc; /* Virtual console */
++ unsigned char origin; /* Point of origin of the request */
++ void *data;
++};
++
++#ifdef __KERNEL__
++#ifdef CONFIG_COMPAT
++#include <linux/compat.h>
++struct fbcon_decor_iowrapper32
++{
++ unsigned short vc; /* Virtual console */
++ unsigned char origin; /* Point of origin of the request */
++ compat_uptr_t data;
++};
++#endif /* CONFIG_COMPAT */
++#endif /* __KERNEL__ */
++
+ /* ioctls
+ 0x46 is 'F' */
+ #define FBIOGET_VSCREENINFO 0x4600
+@@ -35,6 +54,25 @@
+ #define FBIOGET_DISPINFO 0x4618
+ #define FBIO_WAITFORVSYNC _IOW('F', 0x20, __u32)
+
++#define FBIOCONDECOR_SETCFG _IOWR('F', 0x19, struct fbcon_decor_iowrapper)
++#define FBIOCONDECOR_GETCFG _IOR('F', 0x1A, struct fbcon_decor_iowrapper)
++#define FBIOCONDECOR_SETSTATE _IOWR('F', 0x1B, struct fbcon_decor_iowrapper)
++#define FBIOCONDECOR_GETSTATE _IOR('F', 0x1C, struct fbcon_decor_iowrapper)
++#define FBIOCONDECOR_SETPIC _IOWR('F', 0x1D, struct fbcon_decor_iowrapper)
++#ifdef __KERNEL__
++#ifdef CONFIG_COMPAT
++#define FBIOCONDECOR_SETCFG32 _IOWR('F', 0x19, struct fbcon_decor_iowrapper32)
++#define FBIOCONDECOR_GETCFG32 _IOR('F', 0x1A, struct fbcon_decor_iowrapper32)
++#define FBIOCONDECOR_SETSTATE32 _IOWR('F', 0x1B, struct fbcon_decor_iowrapper32)
++#define FBIOCONDECOR_GETSTATE32 _IOR('F', 0x1C, struct fbcon_decor_iowrapper32)
++#define FBIOCONDECOR_SETPIC32 _IOWR('F', 0x1D, struct fbcon_decor_iowrapper32)
++#endif /* CONFIG_COMPAT */
++#endif /* __KERNEL__ */
++
++#define FBCON_DECOR_THEME_LEN 128 /* Maximum lenght of a theme name */
++#define FBCON_DECOR_IO_ORIG_KERNEL 0 /* Kernel ioctl origin */
++#define FBCON_DECOR_IO_ORIG_USER 1 /* User ioctl origin */
++
+ #define FB_TYPE_PACKED_PIXELS 0 /* Packed Pixels */
+ #define FB_TYPE_PLANES 1 /* Non interleaved planes */
+ #define FB_TYPE_INTERLEAVED_PLANES 2 /* Interleaved planes */
+@@ -277,6 +315,29 @@
+ __u32 reserved[4]; /* Reserved for future compatibility */
+ };
+
++#ifdef __KERNEL__
++#ifdef CONFIG_COMPAT
++struct fb_cmap32 {
++ __u32 start;
++ __u32 len; /* Number of entries */
++ compat_uptr_t red; /* Red values */
++ compat_uptr_t green;
++ compat_uptr_t blue;
++ compat_uptr_t transp; /* transparency, can be NULL */
++};
++
++#define fb_cmap_from_compat(to, from) \
++ (to).start = (from).start; \
++ (to).len = (from).len; \
++ (to).red = compat_ptr((from).red); \
++ (to).green = compat_ptr((from).green); \
++ (to).blue = compat_ptr((from).blue); \
++ (to).transp = compat_ptr((from).transp)
++
++#endif /* CONFIG_COMPAT */
++#endif /* __KERNEL__ */
++
++
+ struct fb_cmap {
+ __u32 start; /* First entry */
+ __u32 len; /* Number of entries */
+diff -Nur linux-3.13.7.orig/kernel/sysctl.c linux-3.13.7/kernel/sysctl.c
+--- linux-3.13.7.orig/kernel/sysctl.c 2014-03-24 05:45:42.000000000 +0100
++++ linux-3.13.7/kernel/sysctl.c 2014-03-29 16:03:17.000000000 +0100
+@@ -143,6 +143,10 @@
+ static int ngroups_max = NGROUPS_MAX;
+ static const int cap_last_cap = CAP_LAST_CAP;
+
++#ifdef CONFIG_FB_CON_DECOR
++extern char fbcon_decor_path[];
++#endif
++
+ #ifdef CONFIG_INOTIFY_USER
+ #include <linux/inotify.h>
+ #endif
+@@ -252,6 +256,15 @@
+ .mode = 0555,
+ .child = dev_table,
+ },
++#ifdef CONFIG_FB_CON_DECOR
++ {
++ .procname = "fbcondecor",
++ .data = &fbcon_decor_path,
++ .maxlen = KMOD_PATH_LEN,
++ .mode = 0644,
++ .proc_handler = &proc_dostring,
++ },
++#endif
+ { }
+ };
+
diff --git a/target/linux/patches/3.13.6/gemalto.patch b/target/linux/patches/3.13.7/gemalto.patch
index 65f7af1d7..65f7af1d7 100644
--- a/target/linux/patches/3.13.6/gemalto.patch
+++ b/target/linux/patches/3.13.7/gemalto.patch
diff --git a/target/linux/patches/3.13.6/lemote-rfkill.patch b/target/linux/patches/3.13.7/lemote-rfkill.patch
index a61488434..a61488434 100644
--- a/target/linux/patches/3.13.6/lemote-rfkill.patch
+++ b/target/linux/patches/3.13.7/lemote-rfkill.patch
diff --git a/target/linux/patches/3.13.6/microblaze-axi.patch b/target/linux/patches/3.13.7/microblaze-axi.patch
index 1a4b17d8c..1a4b17d8c 100644
--- a/target/linux/patches/3.13.6/microblaze-axi.patch
+++ b/target/linux/patches/3.13.7/microblaze-axi.patch
diff --git a/target/linux/patches/3.13.6/microblaze-early-printk.patch b/target/linux/patches/3.13.7/microblaze-early-printk.patch
index 92027cea1..92027cea1 100644
--- a/target/linux/patches/3.13.6/microblaze-early-printk.patch
+++ b/target/linux/patches/3.13.7/microblaze-early-printk.patch
diff --git a/target/linux/patches/3.13.6/microblaze-ethernet.patch b/target/linux/patches/3.13.7/microblaze-ethernet.patch
index 742ab477e..742ab477e 100644
--- a/target/linux/patches/3.13.6/microblaze-ethernet.patch
+++ b/target/linux/patches/3.13.7/microblaze-ethernet.patch
diff --git a/target/linux/patches/3.13.6/microblaze-setup.patch b/target/linux/patches/3.13.7/microblaze-setup.patch
index 43815f274..43815f274 100644
--- a/target/linux/patches/3.13.6/microblaze-setup.patch
+++ b/target/linux/patches/3.13.7/microblaze-setup.patch
diff --git a/target/linux/patches/3.13.6/mtd-rootfs.patch b/target/linux/patches/3.13.7/mtd-rootfs.patch
index 775d5fc80..775d5fc80 100644
--- a/target/linux/patches/3.13.6/mtd-rootfs.patch
+++ b/target/linux/patches/3.13.7/mtd-rootfs.patch
diff --git a/target/linux/patches/3.13.6/non-static.patch b/target/linux/patches/3.13.7/non-static.patch
index a967703d0..a967703d0 100644
--- a/target/linux/patches/3.13.6/non-static.patch
+++ b/target/linux/patches/3.13.7/non-static.patch
diff --git a/target/linux/patches/3.13.6/ppc64-missing-zlib.patch b/target/linux/patches/3.13.7/ppc64-missing-zlib.patch
index c6e0616be..c6e0616be 100644
--- a/target/linux/patches/3.13.6/ppc64-missing-zlib.patch
+++ b/target/linux/patches/3.13.7/ppc64-missing-zlib.patch
diff --git a/target/linux/patches/3.13.6/ppc64-missing_arch_random.patch b/target/linux/patches/3.13.7/ppc64-missing_arch_random.patch
index b341a7be5..b341a7be5 100644
--- a/target/linux/patches/3.13.6/ppc64-missing_arch_random.patch
+++ b/target/linux/patches/3.13.7/ppc64-missing_arch_random.patch
diff --git a/target/linux/patches/3.13.6/raspberry.patch b/target/linux/patches/3.13.7/raspberry.patch
index 1e2050a44..1e2050a44 100644
--- a/target/linux/patches/3.13.6/raspberry.patch
+++ b/target/linux/patches/3.13.7/raspberry.patch
diff --git a/target/linux/patches/3.13.6/startup.patch b/target/linux/patches/3.13.7/startup.patch
index d396b75e4..d396b75e4 100644
--- a/target/linux/patches/3.13.6/startup.patch
+++ b/target/linux/patches/3.13.7/startup.patch
diff --git a/target/linux/patches/3.13.6/uuid.patch b/target/linux/patches/3.13.7/uuid.patch
index ca23accdf..ca23accdf 100644
--- a/target/linux/patches/3.13.6/uuid.patch
+++ b/target/linux/patches/3.13.7/uuid.patch
diff --git a/target/linux/patches/3.13.6/vga-cons-default-off.patch b/target/linux/patches/3.13.7/vga-cons-default-off.patch
index 08a57f783..08a57f783 100644
--- a/target/linux/patches/3.13.6/vga-cons-default-off.patch
+++ b/target/linux/patches/3.13.7/vga-cons-default-off.patch
diff --git a/target/linux/patches/3.13.6/wlan-cf.patch b/target/linux/patches/3.13.7/wlan-cf.patch
index fc20759e2..fc20759e2 100644
--- a/target/linux/patches/3.13.6/wlan-cf.patch
+++ b/target/linux/patches/3.13.7/wlan-cf.patch
diff --git a/target/linux/patches/3.13.6/xargs.patch b/target/linux/patches/3.13.7/xargs.patch
index 2c7b3df59..2c7b3df59 100644
--- a/target/linux/patches/3.13.6/xargs.patch
+++ b/target/linux/patches/3.13.7/xargs.patch
diff --git a/target/linux/patches/3.13.6/zlib-inflate.patch b/target/linux/patches/3.13.7/zlib-inflate.patch
index 58e1f6d21..58e1f6d21 100644
--- a/target/linux/patches/3.13.6/zlib-inflate.patch
+++ b/target/linux/patches/3.13.7/zlib-inflate.patch
diff --git a/target/linux/patches/3.4.82/bsd-compatibility.patch b/target/linux/patches/3.4.84/bsd-compatibility.patch
index 9e91a62de..9e91a62de 100644
--- a/target/linux/patches/3.4.82/bsd-compatibility.patch
+++ b/target/linux/patches/3.4.84/bsd-compatibility.patch
diff --git a/target/linux/patches/3.4.82/defaults.patch b/target/linux/patches/3.4.84/defaults.patch
index 58aae610b..58aae610b 100644
--- a/target/linux/patches/3.4.82/defaults.patch
+++ b/target/linux/patches/3.4.84/defaults.patch
diff --git a/target/linux/patches/3.4.82/gemalto.patch b/target/linux/patches/3.4.84/gemalto.patch
index 65f7af1d7..65f7af1d7 100644
--- a/target/linux/patches/3.4.82/gemalto.patch
+++ b/target/linux/patches/3.4.84/gemalto.patch
diff --git a/target/linux/patches/3.4.82/lemote-rfkill.patch b/target/linux/patches/3.4.84/lemote-rfkill.patch
index a61488434..a61488434 100644
--- a/target/linux/patches/3.4.82/lemote-rfkill.patch
+++ b/target/linux/patches/3.4.84/lemote-rfkill.patch
diff --git a/target/linux/patches/3.4.82/mips-error.patch b/target/linux/patches/3.4.84/mips-error.patch
index 800abc80d..800abc80d 100644
--- a/target/linux/patches/3.4.82/mips-error.patch
+++ b/target/linux/patches/3.4.84/mips-error.patch
diff --git a/target/linux/patches/3.4.82/module-alloc-size-check.patch b/target/linux/patches/3.4.84/module-alloc-size-check.patch
index a792ac60a..a792ac60a 100644
--- a/target/linux/patches/3.4.82/module-alloc-size-check.patch
+++ b/target/linux/patches/3.4.84/module-alloc-size-check.patch
diff --git a/target/linux/patches/3.4.82/non-static.patch b/target/linux/patches/3.4.84/non-static.patch
index a967703d0..a967703d0 100644
--- a/target/linux/patches/3.4.82/non-static.patch
+++ b/target/linux/patches/3.4.84/non-static.patch
diff --git a/target/linux/patches/3.4.82/sparc-include.patch b/target/linux/patches/3.4.84/sparc-include.patch
index 2f8ffd061..2f8ffd061 100644
--- a/target/linux/patches/3.4.82/sparc-include.patch
+++ b/target/linux/patches/3.4.84/sparc-include.patch
diff --git a/target/linux/patches/3.4.82/startup.patch b/target/linux/patches/3.4.84/startup.patch
index c26430bcb..c26430bcb 100644
--- a/target/linux/patches/3.4.82/startup.patch
+++ b/target/linux/patches/3.4.84/startup.patch
diff --git a/target/linux/patches/3.4.82/usb-defaults-off.patch b/target/linux/patches/3.4.84/usb-defaults-off.patch
index 31367108a..31367108a 100644
--- a/target/linux/patches/3.4.82/usb-defaults-off.patch
+++ b/target/linux/patches/3.4.84/usb-defaults-off.patch
diff --git a/target/linux/patches/3.4.82/uuid.patch b/target/linux/patches/3.4.84/uuid.patch
index ca23accdf..ca23accdf 100644
--- a/target/linux/patches/3.4.82/uuid.patch
+++ b/target/linux/patches/3.4.84/uuid.patch
diff --git a/target/linux/patches/3.4.82/vga-cons-default-off.patch b/target/linux/patches/3.4.84/vga-cons-default-off.patch
index 178aeeeb9..178aeeeb9 100644
--- a/target/linux/patches/3.4.82/vga-cons-default-off.patch
+++ b/target/linux/patches/3.4.84/vga-cons-default-off.patch
diff --git a/target/linux/patches/3.4.82/wlan-cf.patch b/target/linux/patches/3.4.84/wlan-cf.patch
index fc20759e2..fc20759e2 100644
--- a/target/linux/patches/3.4.82/wlan-cf.patch
+++ b/target/linux/patches/3.4.84/wlan-cf.patch
diff --git a/target/linux/patches/3.4.82/zlib-inflate.patch b/target/linux/patches/3.4.84/zlib-inflate.patch
index 58e1f6d21..58e1f6d21 100644
--- a/target/linux/patches/3.4.82/zlib-inflate.patch
+++ b/target/linux/patches/3.4.84/zlib-inflate.patch
diff --git a/target/m68k/Makefile b/target/m68k/Makefile
index 0e7324c25..78206042c 100644
--- a/target/m68k/Makefile
+++ b/target/m68k/Makefile
@@ -26,6 +26,14 @@ imageinstall: $(FW_DIR)/$(INITRAMFS)
@cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
@echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
@echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
+ifeq ($(ADK_TARGET_SYSTEM_ARANYM_M68K),y)
+ @sed -e "s#@@KERNEL@@#$(FW_DIR)/$(TARGET_KERNEL)#" \
+ -e "s#@@INITRAMFS@@#${FW_DIR}/${INITRAMFS}#" \
+ $(TOPDIR)/target/m68k/aranym.cfg.in \
+ > $(TOPDIR)/target/m68k/aranym.cfg
+ @echo 'Start aranym with: aranym-mmu -l -c target/m68k/aranym.cfg'
+ @echo 'Ungrab mouse with middle mouse click'
+endif
endif
ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
imageinstall: createinitramfs
diff --git a/target/m68k/aranym.cfg.in b/target/m68k/aranym.cfg.in
new file mode 100644
index 000000000..a2fd30170
--- /dev/null
+++ b/target/m68k/aranym.cfg.in
@@ -0,0 +1,195 @@
+[GLOBAL]
+FastRAM = 32
+Floppy =
+TOS = ROM
+EmuTOS = etos512k.img
+Bootstrap = mintara.prg
+BootstrapArgs =
+BootDrive =
+GMTime = No
+
+[STARTUP]
+GrabMouse = No
+Debugger = No
+
+[IKBD]
+WheelEiffel = No
+AltGr = Yes
+
+[HOTKEYS]
+Setup = 19:0
+Quit = 19:0x1
+Reboot = 19:0x40
+Ungrab = 27:0x141
+Debug = 19:0x100
+Screenshot = 316:0
+Fullscreen = 302:0
+
+[JIT]
+JIT = Yes
+JITFPU = Yes
+JITCacheSize = 8192
+JITLazyFlush = 1
+JITBlackList =
+JITInline = No
+
+[VIDEO]
+FullScreen = No
+BootColorDepth = -1
+VidelRefresh = 2
+VidelMonitor = -1
+SingleBlitComposing = No
+SingleBlitRefresh = No
+
+[TOS]
+Cookie_MCH = 50000
+RedirConsole = No
+
+[IDE0]
+Present = No
+IsCDROM = No
+ByteSwap = No
+ReadOnly = No
+Path =
+Cylinders = 0
+Heads = 0
+SectorsPerTrack = 0
+ModelName = Master
+
+[IDE1]
+Present = No
+IsCDROM = No
+ByteSwap = No
+ReadOnly = No
+Path =
+Cylinders = 0
+Heads = 0
+SectorsPerTrack = 0
+ModelName = Slave
+
+[PARTITION0]
+Path =
+Present = No
+PartID = BGM
+ByteSwap = No
+ReadOnly = No
+
+[HOSTFS]
+A =
+B =
+C =
+D =
+E =
+F =
+G =
+H =
+I =
+J =
+K =
+L =
+M =
+N =
+O =
+P =
+Q =
+R =
+S =
+T =
+U =
+V =
+W =
+X =
+Y =
+Z =
+
+[OPENGL]
+Enabled = No
+Filtered = No
+Library =
+
+[ETH0]
+Type = bridge
+Tunnel = tap0
+HostIP = 172.24.30.12
+AtariIP = 172.24.42.46
+Netmask = 255.255.0.0
+MAC = 00:41:45:54:48:30
+
+[LILO]
+Kernel = @@KERNEL@@
+Args = console=tty debug=par
+Ramdisk = @@INITRAMFS@@
+
+[MIDI]
+Type = none
+File =
+Sequencer = /dev/sequencer
+
+[CDROMS]
+A = -1
+B = -1
+C = -1
+D = -1
+E = -1
+F = -1
+G = -1
+H = -1
+I = -1
+J = -1
+K = -1
+L = -1
+M = -1
+N = -1
+O = -1
+P = -1
+Q = -1
+R = -1
+S = -1
+T = -1
+U = -1
+V = -1
+W = -1
+X = -1
+Y = -1
+Z = -1
+
+[AUTOZOOM]
+Enabled = No
+IntegerCoefs = No
+FixedSize = No
+Width = 640
+Height = 480
+
+[NFOSMESA]
+ChannelSize = 0
+LibGL = libGL.so
+LibOSMesa = libOSMesa.so
+
+[PARALLEL]
+Type = file
+File = stderr
+Parport = /dev/parport0
+
+[SERIAL]
+Serport = /dev/ttyS0
+
+[NATFEATS]
+CDROM = sdl
+Vdi = soft
+
+[NFVDI]
+UseHostMouseCursor = No
+
+[AUDIO]
+Frequency = 22050
+Channels = 2
+Bits = 16
+Samples = 1024
+
+[JOYSTICKS]
+Ikbd0 = -1
+Ikbd1 = 0
+JoypadA = -1
+JoypadAButtons = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
+JoypadB = -1
+JoypadBButtons = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
diff --git a/target/m68k/kernel/aranym-m68k b/target/m68k/kernel/aranym-m68k
index 93bf0022f..ac513fdc6 100644
--- a/target/m68k/kernel/aranym-m68k
+++ b/target/m68k/kernel/aranym-m68k
@@ -4,12 +4,8 @@ CONFIG_M68KCLASSIC=y
CONFIG_M68040=y
CONFIG_FPU=y
CONFIG_ATARI=y
-CONFIG_NET_VENDOR_AMD=y
-CONFIG_NET_CADENCE=y
+CONFIG_NATFEAT=y
+CONFIG_NFETH=y
CONFIG_SERIO=y
CONFIG_SERIO_SERPORT=y
CONFIG_SERIO_LIBPS2=y
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_NR_UARTS=4
-CONFIG_SERIAL_8250_RUNTIME_UARTS=4
diff --git a/target/m68k/sys-available/toolchain-m68k b/target/m68k/sys-available/toolchain-m68k
index 0bc27683b..b48c9b784 100644
--- a/target/m68k/sys-available/toolchain-m68k
+++ b/target/m68k/sys-available/toolchain-m68k
@@ -3,7 +3,7 @@ config ADK_TARGET_SYSTEM_TOOLCHAIN_M68K
select ADK_m68k
select ADK_toolchain_m68k
select ADK_TOOLCHAIN
- select ADK_TARGET_PACKAGE_TGZ
+ select ADK_TARGET_PACKAGE_TXZ
help
Build a m68k toolchain.
diff --git a/target/m68k/target.mk b/target/m68k/target.mk
index 1460b732b..80b1424a6 100644
--- a/target/m68k/target.mk
+++ b/target/m68k/target.mk
@@ -1,5 +1,4 @@
include $(TOPDIR)/mk/kernel-ver.mk
ARCH:= m68k
CPU_ARCH:= $(ADK_TARGET_CPU_ARCH)
-TARGET_OPTIMIZATION:= -Os -pipe
TARGET_CFLAGS_ARCH:= $(ADK_TARGET_CFLAGS)
diff --git a/target/microblaze/Makefile b/target/microblaze/Makefile
index 5ab2345e7..4a39e1c3b 100644
--- a/target/microblaze/Makefile
+++ b/target/microblaze/Makefile
@@ -10,22 +10,20 @@ include $(TOPDIR)/mk/image.mk
KERNEL:=$(LINUX_DIR)/arch/microblaze/boot/$(ADK_TARGET_KERNEL)
ifeq ($(ADK_TARGET_QEMU_MICROBLAZE_MODEL_ML605),y)
-MODEL:=petalogix-ml605
-DTB:=-dtb target/microblaze/ml605.dtb
+QEMU_ARGS+=-M petalogix-ml605 -dtb target/microblaze/ml605.dtb
endif
ifeq ($(ADK_TARGET_QEMU_MICROBLAZE_MODEL_S3ADSP1800),y)
-MODEL:=petalogix-s3adsp1800
-DTB:=
+QEMU_ARGS+=-M petalogix-s3adsp1800
endif
ifeq ($(ADK_TARGET_FS),squashfs)
imageinstall: $(BUILD_DIR)/root.squashfs
- qemu-img create -f raw $(FW_DIR)/$(ROOTFSSQUASHFS) $(ADK_TARGET_MTD_SIZE)
+ env PATH=$(HOST_PATH) qemu-img create -f raw $(FW_DIR)/$(ROOTFSSQUASHFS) $(ADK_TARGET_MTD_SIZE)
dd conv=notrunc if=$(BUILD_DIR)/root.squashfs of=$(FW_DIR)/$(ROOTFSSQUASHFS)
@cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
ifneq ($(ADK_HARDWARE_QEMU),)
@echo "Start qemu with following options:"
- @echo 'qemu-system-${CPU_ARCH} -M $(MODEL) -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL) -pflash $(FW_DIR)/$(ROOTFSSQUASHFS) $(DTB)'
+ @echo 'qemu-system-${CPU_ARCH} $(QEMU_ARGS) -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL) -pflash $(FW_DIR)/$(ROOTFSSQUASHFS)'
endif
endif
ifeq ($(ADK_TARGET_FS),jffs2)
@@ -33,7 +31,7 @@ imageinstall: $(FW_DIR)/$(ROOTFSJFFS2)
@cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
ifneq ($(ADK_HARDWARE_QEMU),)
@echo "Start qemu with following options:"
- @echo 'qemu-system-${CPU_ARCH} -M $(MODEL) -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL) -pflash $(FW_DIR)/$(ROOTFSJFFS2) $(DTB)'
+ @echo 'qemu-system-${CPU_ARCH} $(QEMU_ARGS) -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL) -pflash $(FW_DIR)/$(ROOTFSJFFS2)'
endif
endif
ifeq ($(ADK_TARGET_FS),initramfs)
@@ -43,7 +41,7 @@ imageinstall: $(FW_DIR)/$(INITRAMFS)
@echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
ifneq ($(ADK_HARDWARE_QEMU),)
@echo "Start qemu with following command line:"
- @echo 'qemu-system-${CPU_ARCH} -M $(MODEL) -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS} $(DTB)'
+ @echo 'qemu-system-${CPU_ARCH} $(QEMU_ARGS) -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
endif
endif
ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
@@ -52,7 +50,7 @@ imageinstall: createinitramfs
@echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
ifneq ($(ADK_HARDWARE_QEMU),)
@echo "Start qemu with following command line:"
- @echo 'qemu-system-${CPU_ARCH} -M $(MODEL) -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL) $(DTB)'
+ @echo 'qemu-system-${CPU_ARCH} $(QEMU_ARGS) -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL)'
endif
endif
ifeq ($(ADK_TARGET_FS),archive)
diff --git a/target/microblaze/kernel/qemu-microblaze-ml605 b/target/microblaze/kernel/qemu-microblaze-ml605
index 8d13c5ddd..cb8da0cec 100644
--- a/target/microblaze/kernel/qemu-microblaze-ml605
+++ b/target/microblaze/kernel/qemu-microblaze-ml605
@@ -22,3 +22,4 @@ CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_NR_UARTS=1
CONFIG_SERIAL_8250_RUNTIME_UARTS=1
CONFIG_SERIAL_OF_PLATFORM=y
+CONFIG_CMDLINE_FORCE=y
diff --git a/target/microblaze/kernel/qemu-microblaze-s3adsp1800 b/target/microblaze/kernel/qemu-microblaze-s3adsp1800
index fc43ab5f1..3c3546b47 100644
--- a/target/microblaze/kernel/qemu-microblaze-s3adsp1800
+++ b/target/microblaze/kernel/qemu-microblaze-s3adsp1800
@@ -19,3 +19,4 @@ CONFIG_NET_VENDOR_XILINX=y
CONFIG_XILINX_EMACLITE=y
CONFIG_SERIAL_UARTLITE=y
CONFIG_SERIAL_UARTLITE_CONSOLE=y
+CONFIG_CMDLINE_FORCE=y
diff --git a/target/microblaze/s3adsp1800.dtb b/target/microblaze/s3adsp1800.dtb
new file mode 100644
index 000000000..163f1632d
--- /dev/null
+++ b/target/microblaze/s3adsp1800.dtb
Binary files differ
diff --git a/target/microblaze/s3adsp1800.dts b/target/microblaze/s3adsp1800.dts
new file mode 100644
index 000000000..9cc6bdc13
--- /dev/null
+++ b/target/microblaze/s3adsp1800.dts
@@ -0,0 +1,287 @@
+/dts-v1/;
+
+/ {
+ #address-cells = <0x1>;
+ #size-cells = <0x1>;
+ compatible = "xlnx,microblaze";
+ model = "testing";
+
+ memory@90000000 {
+ device_type = "memory";
+ reg = <0x90000000 0x8000000>;
+ };
+
+ chosen {
+ bootargs = "console=ttyUL0,115200";
+ linux,stdout-path = "/plb@0/serial@84000000";
+ };
+
+ cpus {
+ #address-cells = <0x1>;
+ #cpus = <0x1>;
+ #size-cells = <0x0>;
+
+ cpu@0 {
+ clock-frequency = <0x3b9aca0>;
+ compatible = "xlnx,microblaze-7.10.d";
+ d-cache-baseaddr = <0x90000000>;
+ d-cache-highaddr = <0x97ffffff>;
+ d-cache-line-size = <0x10>;
+ d-cache-size = <0x800>;
+ device_type = "cpu";
+ i-cache-baseaddr = <0x90000000>;
+ i-cache-highaddr = <0x97ffffff>;
+ i-cache-line-size = <0x10>;
+ i-cache-size = <0x800>;
+ model = "microblaze,7.10.d";
+ reg = <0x0>;
+ timebase-frequency = <0x3b9aca0>;
+ xlnx,addr-tag-bits = <0x10>;
+ xlnx,allow-dcache-wr = <0x1>;
+ xlnx,allow-icache-wr = <0x1>;
+ xlnx,area-optimized = <0x0>;
+ xlnx,cache-byte-size = <0x800>;
+ xlnx,d-lmb = <0x1>;
+ xlnx,d-opb = <0x0>;
+ xlnx,d-plb = <0x1>;
+ xlnx,data-size = <0x20>;
+ xlnx,dcache-addr-tag = <0x10>;
+ xlnx,dcache-always-used = <0x0>;
+ xlnx,dcache-byte-size = <0x800>;
+ xlnx,dcache-line-len = <0x4>;
+ xlnx,dcache-use-fsl = <0x1>;
+ xlnx,debug-enabled = <0x1>;
+ xlnx,div-zero-exception = <0x0>;
+ xlnx,dopb-bus-exception = <0x0>;
+ xlnx,dynamic-bus-sizing = <0x1>;
+ xlnx,edge-is-positive = <0x1>;
+ xlnx,family = "spartan3adsp";
+ xlnx,fpu-exception = <0x0>;
+ xlnx,fsl-data-size = <0x20>;
+ xlnx,fsl-exception = <0x0>;
+ xlnx,fsl-links = <0x0>;
+ xlnx,i-lmb = <0x1>;
+ xlnx,i-opb = <0x0>;
+ xlnx,i-plb = <0x1>;
+ xlnx,icache-always-used = <0x0>;
+ xlnx,icache-line-len = <0x4>;
+ xlnx,icache-use-fsl = <0x1>;
+ xlnx,ill-opcode-exception = <0x0>;
+ xlnx,instance = "microblaze_0";
+ xlnx,interconnect = <0x1>;
+ xlnx,interrupt-is-edge = <0x0>;
+ xlnx,iopb-bus-exception = <0x0>;
+ xlnx,mmu-dtlb-size = <0x4>;
+ xlnx,mmu-itlb-size = <0x2>;
+ xlnx,mmu-tlb-access = <0x3>;
+ xlnx,mmu-zones = <0x10>;
+ xlnx,number-of-pc-brk = <0x3>;
+ xlnx,number-of-rd-addr-brk = <0x2>;
+ xlnx,number-of-wr-addr-brk = <0x2>;
+ xlnx,opcode-0x0-illegal = <0x0>;
+ xlnx,pvr = <0x1>;
+ xlnx,pvr-user1 = <0x0>;
+ xlnx,pvr-user2 = <0x0>;
+ xlnx,reset-msr = <0x0>;
+ xlnx,sco = <0x0>;
+ xlnx,unaligned-exceptions = <0x1>;
+ xlnx,use-barrel = <0x1>;
+ xlnx,use-dcache = <0x1>;
+ xlnx,use-div = <0x0>;
+ xlnx,use-ext-brk = <0x1>;
+ xlnx,use-ext-nm-brk = <0x1>;
+ xlnx,use-extended-fsl-instr = <0x0>;
+ xlnx,use-fpu = <0x0>;
+ xlnx,use-hw-mul = <0x1>;
+ xlnx,use-icache = <0x1>;
+ xlnx,use-interrupt = <0x1>;
+ xlnx,use-mmu = <0x3>;
+ xlnx,use-msr-instr = <0x1>;
+ xlnx,use-pcmp-instr = <0x1>;
+ };
+ };
+
+ plb@0 {
+ #address-cells = <0x1>;
+ #size-cells = <0x1>;
+ compatible = "xlnx,plb-v46-1.03.a", "simple-bus";
+ ranges;
+
+ ethernet@81000000 {
+ compatible = "xlnx,xps-ethernetlite-2.00.b";
+ device_type = "network";
+ interrupt-parent = <0x1>;
+ interrupts = <0x1 0x0>;
+ local-mac-address = [02 00 00 00 00 00];
+ reg = <0x81000000 0x10000>;
+ xlnx,duplex = <0x1>;
+ xlnx,family = "spartan3adsp";
+ xlnx,rx-ping-pong = <0x0>;
+ xlnx,tx-ping-pong = <0x0>;
+ };
+
+ flash@a0000000 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ bank-width = <0x1>;
+ compatible = "xlnx,xps-mch-emc-2.00.a", "cfi-flash";
+ reg = <0xa0000000 0x1000000>;
+ xlnx,family = "spartan3adsp";
+ xlnx,include-datawidth-matching-0 = <0x1>;
+ xlnx,include-datawidth-matching-1 = <0x0>;
+ xlnx,include-datawidth-matching-2 = <0x0>;
+ xlnx,include-datawidth-matching-3 = <0x0>;
+ xlnx,include-negedge-ioregs = <0x0>;
+ xlnx,include-plb-ipif = <0x1>;
+ xlnx,include-wrbuf = <0x1>;
+ xlnx,max-mem-width = <0x8>;
+ xlnx,mch-native-dwidth = <0x20>;
+ xlnx,mch-plb-clk-period-ps = <0x3e80>;
+ xlnx,mch-splb-awidth = <0x20>;
+ xlnx,mch0-accessbuf-depth = <0x10>;
+ xlnx,mch0-protocol = <0x0>;
+ xlnx,mch0-rddatabuf-depth = <0x10>;
+ xlnx,mch1-accessbuf-depth = <0x10>;
+ xlnx,mch1-protocol = <0x0>;
+ xlnx,mch1-rddatabuf-depth = <0x10>;
+ xlnx,mch2-accessbuf-depth = <0x10>;
+ xlnx,mch2-protocol = <0x0>;
+ xlnx,mch2-rddatabuf-depth = <0x10>;
+ xlnx,mch3-accessbuf-depth = <0x10>;
+ xlnx,mch3-protocol = <0x0>;
+ xlnx,mch3-rddatabuf-depth = <0x10>;
+ xlnx,mem0-width = <0x8>;
+ xlnx,mem1-width = <0x20>;
+ xlnx,mem2-width = <0x20>;
+ xlnx,mem3-width = <0x20>;
+ xlnx,num-banks-mem = <0x1>;
+ xlnx,num-channels = <0x0>;
+ xlnx,priority-mode = <0x0>;
+ xlnx,synch-mem-0 = <0x0>;
+ xlnx,synch-mem-1 = <0x0>;
+ xlnx,synch-mem-2 = <0x0>;
+ xlnx,synch-mem-3 = <0x0>;
+ xlnx,synch-pipedelay-0 = <0x2>;
+ xlnx,synch-pipedelay-1 = <0x2>;
+ xlnx,synch-pipedelay-2 = <0x2>;
+ xlnx,synch-pipedelay-3 = <0x2>;
+ xlnx,tavdv-ps-mem-0 = <0x11170>;
+ xlnx,tavdv-ps-mem-1 = <0x3a98>;
+ xlnx,tavdv-ps-mem-2 = <0x3a98>;
+ xlnx,tavdv-ps-mem-3 = <0x3a98>;
+ xlnx,tcedv-ps-mem-0 = <0x11170>;
+ xlnx,tcedv-ps-mem-1 = <0x3a98>;
+ xlnx,tcedv-ps-mem-2 = <0x3a98>;
+ xlnx,tcedv-ps-mem-3 = <0x3a98>;
+ xlnx,thzce-ps-mem-0 = <0x61a8>;
+ xlnx,thzce-ps-mem-1 = <0x1b58>;
+ xlnx,thzce-ps-mem-2 = <0x1b58>;
+ xlnx,thzce-ps-mem-3 = <0x1b58>;
+ xlnx,thzoe-ps-mem-0 = <0x61a8>;
+ xlnx,thzoe-ps-mem-1 = <0x1b58>;
+ xlnx,thzoe-ps-mem-2 = <0x1b58>;
+ xlnx,thzoe-ps-mem-3 = <0x1b58>;
+ xlnx,tlzwe-ps-mem-0 = <0x1388>;
+ xlnx,tlzwe-ps-mem-1 = <0x0>;
+ xlnx,tlzwe-ps-mem-2 = <0x0>;
+ xlnx,tlzwe-ps-mem-3 = <0x0>;
+ xlnx,twc-ps-mem-0 = <0x11170>;
+ xlnx,twc-ps-mem-1 = <0x3a98>;
+ xlnx,twc-ps-mem-2 = <0x3a98>;
+ xlnx,twc-ps-mem-3 = <0x3a98>;
+ xlnx,twp-ps-mem-0 = <0xafc8>;
+ xlnx,twp-ps-mem-1 = <0x2ee0>;
+ xlnx,twp-ps-mem-2 = <0x2ee0>;
+ xlnx,twp-ps-mem-3 = <0x2ee0>;
+ xlnx,xcl0-linesize = <0x4>;
+ xlnx,xcl0-writexfer = <0x1>;
+ xlnx,xcl1-linesize = <0x4>;
+ xlnx,xcl1-writexfer = <0x1>;
+ xlnx,xcl2-linesize = <0x4>;
+ xlnx,xcl2-writexfer = <0x1>;
+ xlnx,xcl3-linesize = <0x4>;
+ xlnx,xcl3-writexfer = <0x1>;
+ partition@0x00000000 {
+ label = "rootfs";
+ reg = <0x00000000 0x01000000>;
+ };
+ };
+
+ gpio@81400000 {
+ compatible = "xlnx,xps-gpio-1.00.a";
+ interrupt-parent = <0x1>;
+ interrupts = <0x2 0x2>;
+ reg = <0x81400000 0x10000>;
+ xlnx,all-inputs = <0x0>;
+ xlnx,all-inputs-2 = <0x0>;
+ xlnx,dout-default = <0x0>;
+ xlnx,dout-default-2 = <0x0>;
+ xlnx,family = "spartan3adsp";
+ xlnx,gpio-width = <0x8>;
+ xlnx,interrupt-present = <0x1>;
+ xlnx,is-bidir = <0x0>;
+ xlnx,is-bidir-2 = <0x1>;
+ xlnx,is-dual = <0x0>;
+ xlnx,tri-default = <0xffffffff>;
+ xlnx,tri-default-2 = <0xffffffff>;
+ };
+
+ serial@84000000 {
+ clock-frequency = <0x3b9aca0>;
+ compatible = "xlnx,xps-uartlite-1.00.a";
+ current-speed = <0x1c200>;
+ device_type = "serial";
+ interrupt-parent = <0x1>;
+ interrupts = <0x3 0x0>;
+ port-number = <0x0>;
+ reg = <0x84000000 0x10000>;
+ xlnx,baudrate = <0x1c200>;
+ xlnx,data-bits = <0x8>;
+ xlnx,family = "spartan3adsp";
+ xlnx,odd-parity = <0x0>;
+ xlnx,use-parity = <0x0>;
+ };
+
+ debug@84400000 {
+ compatible = "xlnx,mdm-1.00.d";
+ reg = <0x84400000 0x10000>;
+ xlnx,family = "spartan3adsp";
+ xlnx,interconnect = <0x1>;
+ xlnx,jtag-chain = <0x2>;
+ xlnx,mb-dbg-ports = <0x1>;
+ xlnx,uart-width = <0x8>;
+ xlnx,use-uart = <0x1>;
+ xlnx,write-fsl-ports = <0x0>;
+ };
+
+ mpmc@90000000 {
+ #address-cells = <0x1>;
+ #size-cells = <0x1>;
+ compatible = "xlnx,mpmc-4.03.a";
+ };
+
+ interrupt-controller@81800000 {
+ #interrupt-cells = <0x2>;
+ compatible = "xlnx,xps-intc-1.00.a";
+ interrupt-controller;
+ reg = <0x81800000 0x10000>;
+ xlnx,kind-of-intr = <0xa>;
+ xlnx,num-intr-inputs = <0x4>;
+ linux,phandle = <0x1>;
+ };
+
+ timer@83c00000 {
+ compatible = "xlnx,xps-timer-1.00.a";
+ interrupt-parent = <0x1>;
+ interrupts = <0x0 0x2>;
+ reg = <0x83c00000 0x10000>;
+ xlnx,count-width = <0x20>;
+ xlnx,family = "spartan3adsp";
+ xlnx,gen0-assert = <0x1>;
+ xlnx,gen1-assert = <0x1>;
+ xlnx,one-timer-only = <0x0>;
+ xlnx,trig0-assert = <0x1>;
+ xlnx,trig1-assert = <0x1>;
+ };
+ };
+};
diff --git a/target/microblaze/sys-available/qemu-microblaze b/target/microblaze/sys-available/qemu-microblaze
index 63214e39b..ee9cb6a52 100644
--- a/target/microblaze/sys-available/qemu-microblaze
+++ b/target/microblaze/sys-available/qemu-microblaze
@@ -4,6 +4,7 @@ config ADK_TARGET_SYSTEM_QEMU_MICROBLAZE
select ADK_big
select ADK_qemu_microblaze
select ADK_HARDWARE_QEMU
+ select ADK_TARGET_WITH_MTD
select ADK_TARGET_KERNEL_LINUXBIN
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 a58083770..8dff0e260 100644
--- a/target/microblaze/sys-available/qemu-microblazeel
+++ b/target/microblaze/sys-available/qemu-microblazeel
@@ -1,9 +1,10 @@
config ADK_TARGET_SYSTEM_QEMU_MICROBLAZEEL
bool "Qemu Emulator (little endian)"
- select ADK_microblazeel
+ select ADK_microblaze
select ADK_qemu_microblazeel
select ADK_little
select ADK_HARDWARE_QEMU
+ select ADK_TARGET_WITH_MTD
select ADK_TARGET_KERNEL_LINUXBIN
help
Qemu support for microblaze little endian architecture.
diff --git a/target/microblaze/sys-available/toolchain-microblaze b/target/microblaze/sys-available/toolchain-microblaze
index 6fb76c5f5..3b8d3512b 100644
--- a/target/microblaze/sys-available/toolchain-microblaze
+++ b/target/microblaze/sys-available/toolchain-microblaze
@@ -4,7 +4,7 @@ config ADK_TARGET_SYSTEM_TOOLCHAIN_MICROBLAZE
select ADK_big
select ADK_toolchain_microblaze
select ADK_TOOLCHAIN
- select ADK_TARGET_PACKAGE_TGZ
+ select ADK_TARGET_PACKAGE_TXZ
help
Microblaze toolchain.
diff --git a/target/microblaze/sys-available/toolchain-microblazeel b/target/microblaze/sys-available/toolchain-microblazeel
index 8992e5550..c41e26f91 100644
--- a/target/microblaze/sys-available/toolchain-microblazeel
+++ b/target/microblaze/sys-available/toolchain-microblazeel
@@ -4,7 +4,7 @@ config ADK_TARGET_SYSTEM_TOOLCHAIN_MICROBLAZEEL
select ADK_little
select ADK_toolchain_microblazeel
select ADK_TOOLCHAIN
- select ADK_TARGET_PACKAGE_TGZ
+ select ADK_TARGET_PACKAGE_TXZ
help
Microblaze toolchain.
diff --git a/target/microblaze/target.mk b/target/microblaze/target.mk
index bee74e465..c179123f9 100644
--- a/target/microblaze/target.mk
+++ b/target/microblaze/target.mk
@@ -1,5 +1,4 @@
include $(TOPDIR)/mk/kernel-ver.mk
ARCH:= microblaze
CPU_ARCH:= $(ADK_TARGET_CPU_ARCH)
-TARGET_OPTIMIZATION:= -Os -pipe
TARGET_CFLAGS_ARCH:= $(ADK_TARGET_CFLAGS)
diff --git a/target/mips/Makefile b/target/mips/Makefile
index 436b570e3..bd3a763b6 100644
--- a/target/mips/Makefile
+++ b/target/mips/Makefile
@@ -101,7 +101,7 @@ ifneq ($(ADK_HARDWARE_QEMU),)
@cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
@echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
@echo "Use following command to create a QEMU Image:"
- @echo "./scripts/create.sh +g qemu-${CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
+ @echo "./scripts/create.sh qemu-${CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
@echo "Start qemu with following options:"
@echo 'qemu-system-${CPU_ARCH} -nographic -M malta -device e1000,netdev=adk0 -netdev user,id=adk0 -kernel $(FW_DIR)/$(TARGET_KERNEL) qemu-${CPU_ARCH}.img'
endif
diff --git a/target/mips/kernel/qemu-mips b/target/mips/kernel/qemu-mips
index 3f06298bf..d3129fbda 100644
--- a/target/mips/kernel/qemu-mips
+++ b/target/mips/kernel/qemu-mips
@@ -2,7 +2,6 @@ CONFIG_MIPS=y
CONFIG_MIPS_MALTA=y
CONFIG_MIPS_BONITO64=y
CONFIG_MIPS_MSC=y
-CONFIG_CPU_BIG_ENDIAN=y
CONFIG_CPU_MIPS32_R1=y
CONFIG_PAGE_SIZE_4KB=y
CONFIG_PCI=y
diff --git a/target/mips/kernel/qemu-mips64 b/target/mips/kernel/qemu-mips64
index 5ceba460c..3a1be029e 100644
--- a/target/mips/kernel/qemu-mips64
+++ b/target/mips/kernel/qemu-mips64
@@ -1,6 +1,5 @@
CONFIG_MIPS=y
CONFIG_MIPS_MALTA=y
-CONFIG_CPU_BIG_ENDIAN=y
CONFIG_CPU_MIPS64_R1=y
CONFIG_PAGE_SIZE_4KB=y
CONFIG_PCI=y
diff --git a/target/mips/kernel/qemu-mips64el b/target/mips/kernel/qemu-mips64el
index 383b7f160..40192aff2 100644
--- a/target/mips/kernel/qemu-mips64el
+++ b/target/mips/kernel/qemu-mips64el
@@ -1,6 +1,5 @@
CONFIG_MIPS=y
CONFIG_MIPS_MALTA=y
-CONFIG_CPU_LITTLE_ENDIAN=y
CONFIG_CPU_MIPS64_R1=y
CONFIG_PAGE_SIZE_4KB=y
CONFIG_PCI=y
diff --git a/target/mips/kernel/qemu-mipsel b/target/mips/kernel/qemu-mipsel
index e16f008b7..d3129fbda 100644
--- a/target/mips/kernel/qemu-mipsel
+++ b/target/mips/kernel/qemu-mipsel
@@ -2,7 +2,6 @@ CONFIG_MIPS=y
CONFIG_MIPS_MALTA=y
CONFIG_MIPS_BONITO64=y
CONFIG_MIPS_MSC=y
-CONFIG_CPU_LITTLE_ENDIAN=y
CONFIG_CPU_MIPS32_R1=y
CONFIG_PAGE_SIZE_4KB=y
CONFIG_PCI=y
diff --git a/target/mips/sys-available/lemote-yeelong b/target/mips/sys-available/lemote-yeelong
index af58ff019..0a6fd9c32 100644
--- a/target/mips/sys-available/lemote-yeelong
+++ b/target/mips/sys-available/lemote-yeelong
@@ -12,6 +12,7 @@ config ADK_TARGET_SYSTEM_LEMOTE_YEELONG
select ADK_TARGET_WITH_RTC
select ADK_TARGET_WITH_HDD
select ADK_TARGET_WITH_PCI
+ select ADK_TARGET_WITH_ROOT_RW
select ADK_TARGET_KERNEL_VMLINUZ
help
System profile for Lemote Yeelong laptop.
diff --git a/target/mips/sys-available/mikrotik-rb532 b/target/mips/sys-available/mikrotik-rb532
index b787a3852..96ca4d46d 100644
--- a/target/mips/sys-available/mikrotik-rb532
+++ b/target/mips/sys-available/mikrotik-rb532
@@ -5,7 +5,6 @@ config ADK_TARGET_SYSTEM_MIKROTIK_RB532
select ADK_mikrotik_rb532
select ADK_TARGET_WITH_MINIPCI
select ADK_TARGET_WITH_WATCHDOG
- select ADK_TARGET_WITH_CF
select ADK_TARGET_WITH_NAND
select ADK_TARGET_WITH_LEDS
depends on ADK_BROKEN
diff --git a/target/mips/sys-available/qemu-mips b/target/mips/sys-available/qemu-mips
index 98aaf8a02..d3ea99011 100644
--- a/target/mips/sys-available/qemu-mips
+++ b/target/mips/sys-available/qemu-mips
@@ -1,10 +1,10 @@
config ADK_TARGET_SYSTEM_QEMU_MIPS
- bool "Qemu Emulator (big endian)"
+ bool "Qemu Emulator (mips32 big endian)"
select ADK_mips
select ADK_big
select ADK_qemu_mips
select ADK_HARDWARE_QEMU
select ADK_TARGET_KERNEL_VMLINUZ
help
- Qemu support for mips big endian architecture.
+ Qemu support for mips32 big endian architecture.
diff --git a/target/mips/sys-available/qemu-mips64 b/target/mips/sys-available/qemu-mips64
index 10da0835c..ce9c5b0fa 100644
--- a/target/mips/sys-available/qemu-mips64
+++ b/target/mips/sys-available/qemu-mips64
@@ -1,12 +1,13 @@
config ADK_TARGET_SYSTEM_QEMU_MIPS64
- bool "Qemu Emulator (mips64 big endian)"
+ bool "Qemu Emulator (mips64 big endian o32 abi)"
select ADK_mips
select ADK_big
+ select ADK_o32
select ADK_qemu_mips64
select ADK_CPU_MIPS64
select ADK_LINUX_64
select ADK_HARDWARE_QEMU
select ADK_TARGET_KERNEL_VMLINUZ
help
- Qemu support for mips64 big endian architecture.
+ Qemu support for mips64 big endian architecture with o32 abi.
diff --git a/target/mips/sys-available/qemu-mips64el b/target/mips/sys-available/qemu-mips64el
index 82bb7fbf2..067d0d6ed 100644
--- a/target/mips/sys-available/qemu-mips64el
+++ b/target/mips/sys-available/qemu-mips64el
@@ -1,11 +1,12 @@
config ADK_TARGET_SYSTEM_QEMU_MIPS64EL
- bool "Qemu Emulator (mips64 little endian)"
+ bool "Qemu Emulator (mips64 little endian o32 abi)"
select ADK_mips
select ADK_little
+ select ADK_o32
select ADK_qemu_mips64el
select ADK_CPU_MIPS64
select ADK_LINUX_64
select ADK_HARDWARE_QEMU
select ADK_TARGET_KERNEL_VMLINUZ
help
- Qemu support for mips64 little endian architecture.
+ Qemu support for mips64 little endian architecture with o32 abi.
diff --git a/target/mips/sys-available/qemu-mips64eln32 b/target/mips/sys-available/qemu-mips64eln32
new file mode 100644
index 000000000..31c93b75c
--- /dev/null
+++ b/target/mips/sys-available/qemu-mips64eln32
@@ -0,0 +1,12 @@
+config ADK_TARGET_SYSTEM_QEMU_MIPS64ELN32
+ bool "Qemu Emulator (mips64 little endian n32 abi)"
+ select ADK_mips
+ select ADK_little
+ select ADK_n32
+ select ADK_qemu_mips64el
+ select ADK_CPU_MIPS64
+ select ADK_LINUX_64
+ select ADK_HARDWARE_QEMU
+ select ADK_TARGET_KERNEL_VMLINUZ
+ help
+ Qemu support for mips64 little endian architecture with n32 abi.
diff --git a/target/mips/sys-available/qemu-mips64eln64 b/target/mips/sys-available/qemu-mips64eln64
new file mode 100644
index 000000000..0f0697602
--- /dev/null
+++ b/target/mips/sys-available/qemu-mips64eln64
@@ -0,0 +1,12 @@
+config ADK_TARGET_SYSTEM_QEMU_MIPS64ELN64
+ bool "Qemu Emulator (mips64 little endian n64 abi)"
+ select ADK_mips
+ select ADK_little
+ select ADK_n64
+ select ADK_qemu_mips64el
+ select ADK_CPU_MIPS64
+ select ADK_LINUX_64
+ select ADK_HARDWARE_QEMU
+ select ADK_TARGET_KERNEL_VMLINUZ
+ help
+ Qemu support for mips64 little endian architecture with n64 abi.
diff --git a/target/mips/sys-available/qemu-mips64n32 b/target/mips/sys-available/qemu-mips64n32
new file mode 100644
index 000000000..614edde0b
--- /dev/null
+++ b/target/mips/sys-available/qemu-mips64n32
@@ -0,0 +1,13 @@
+config ADK_TARGET_SYSTEM_QEMU_MIPS64N32
+ bool "Qemu Emulator (mips64 big endian n32 abi)"
+ select ADK_mips
+ select ADK_big
+ select ADK_n32
+ select ADK_qemu_mips64
+ select ADK_CPU_MIPS64
+ select ADK_LINUX_64
+ select ADK_HARDWARE_QEMU
+ select ADK_TARGET_KERNEL_VMLINUZ
+ help
+ Qemu support for mips64 big endian architecture with n32 abi.
+
diff --git a/target/mips/sys-available/qemu-mips64n64 b/target/mips/sys-available/qemu-mips64n64
new file mode 100644
index 000000000..49ad7bba8
--- /dev/null
+++ b/target/mips/sys-available/qemu-mips64n64
@@ -0,0 +1,13 @@
+config ADK_TARGET_SYSTEM_QEMU_MIPS64N64
+ bool "Qemu Emulator (mips64 big endian n64 abi)"
+ select ADK_mips
+ select ADK_big
+ select ADK_n64
+ select ADK_qemu_mips64
+ select ADK_CPU_MIPS64
+ select ADK_LINUX_64
+ select ADK_HARDWARE_QEMU
+ select ADK_TARGET_KERNEL_VMLINUZ
+ help
+ Qemu support for mips64 big endian architecture with n64 abi.
+
diff --git a/target/mips/sys-available/qemu-mipsel b/target/mips/sys-available/qemu-mipsel
index 7163ae120..688471d6d 100644
--- a/target/mips/sys-available/qemu-mipsel
+++ b/target/mips/sys-available/qemu-mipsel
@@ -1,10 +1,10 @@
config ADK_TARGET_SYSTEM_QEMU_MIPSEL
- bool "Qemu Emulator (little endian)"
+ bool "Qemu Emulator (mips32 little endian)"
select ADK_mips
select ADK_qemu_mipsel
select ADK_little
select ADK_HARDWARE_QEMU
select ADK_TARGET_KERNEL_VMLINUZ
help
- Qemu support for mips little endian architecture.
+ Qemu support for mips32 little endian architecture.
diff --git a/target/mips/sys-available/toolchain-mips b/target/mips/sys-available/toolchain-mips
index 9e93cfdcd..7c7e1c142 100644
--- a/target/mips/sys-available/toolchain-mips
+++ b/target/mips/sys-available/toolchain-mips
@@ -1,10 +1,10 @@
config ADK_TARGET_SYSTEM_TOOLCHAIN_MIPS
- bool "Toolchain only (big endian)"
+ bool "Toolchain only (mips32 big endian)"
select ADK_mips
select ADK_big
select ADK_toolchain_mips
select ADK_TOOLCHAIN
- select ADK_TARGET_PACKAGE_TGZ
+ select ADK_TARGET_PACKAGE_TXZ
help
- MIPS toolchain.
+ MIPS32 big endian toolchain.
diff --git a/target/mips/sys-available/toolchain-mips64 b/target/mips/sys-available/toolchain-mips64
index e9ea69170..f1cc555a2 100644
--- a/target/mips/sys-available/toolchain-mips64
+++ b/target/mips/sys-available/toolchain-mips64
@@ -7,6 +7,6 @@ config ADK_TARGET_SYSTEM_TOOLCHAIN_MIPS64
select ADK_CPU_MIPS64
select ADK_LINUX_64
select ADK_TOOLCHAIN
- select ADK_TARGET_PACKAGE_TGZ
+ select ADK_TARGET_PACKAGE_TXZ
help
MIPS64 big endian o32 ABI toolchain.
diff --git a/target/mips/sys-available/toolchain-mips64el b/target/mips/sys-available/toolchain-mips64el
index 0d54692ee..7aa82f05d 100644
--- a/target/mips/sys-available/toolchain-mips64el
+++ b/target/mips/sys-available/toolchain-mips64el
@@ -7,6 +7,6 @@ config ADK_TARGET_SYSTEM_TOOLCHAIN_MIPS64EL
select ADK_CPU_MIPS64
select ADK_LINUX_64
select ADK_TOOLCHAIN
- select ADK_TARGET_PACKAGE_TGZ
+ select ADK_TARGET_PACKAGE_TXZ
help
MIPS64 little endian o32 ABI toolchain.
diff --git a/target/mips/sys-available/toolchain-mips64eln32 b/target/mips/sys-available/toolchain-mips64eln32
index 9c0f44381..96f409ba6 100644
--- a/target/mips/sys-available/toolchain-mips64eln32
+++ b/target/mips/sys-available/toolchain-mips64eln32
@@ -7,6 +7,6 @@ config ADK_TARGET_SYSTEM_TOOLCHAIN_MIPS64ELN32
select ADK_CPU_MIPS64
select ADK_LINUX_64
select ADK_TOOLCHAIN
- select ADK_TARGET_PACKAGE_TGZ
+ select ADK_TARGET_PACKAGE_TXZ
help
MIPS64 little endian n32 ABI toolchain.
diff --git a/target/mips/sys-available/toolchain-mips64eln64 b/target/mips/sys-available/toolchain-mips64eln64
index 2795598d8..f28b14997 100644
--- a/target/mips/sys-available/toolchain-mips64eln64
+++ b/target/mips/sys-available/toolchain-mips64eln64
@@ -7,6 +7,6 @@ config ADK_TARGET_SYSTEM_TOOLCHAIN_MIPS64ELN64
select ADK_CPU_MIPS64
select ADK_LINUX_64
select ADK_TOOLCHAIN
- select ADK_TARGET_PACKAGE_TGZ
+ select ADK_TARGET_PACKAGE_TXZ
help
MIPS64 little endian n64 ABI toolchain.
diff --git a/target/mips/sys-available/toolchain-mips64n32 b/target/mips/sys-available/toolchain-mips64n32
index e2acd59b3..1337d3e37 100644
--- a/target/mips/sys-available/toolchain-mips64n32
+++ b/target/mips/sys-available/toolchain-mips64n32
@@ -7,6 +7,6 @@ config ADK_TARGET_SYSTEM_TOOLCHAIN_MIPS64N32
select ADK_CPU_MIPS64
select ADK_LINUX_64
select ADK_TOOLCHAIN
- select ADK_TARGET_PACKAGE_TGZ
+ select ADK_TARGET_PACKAGE_TXZ
help
MIPS64 big endian n64 ABI toolchain.
diff --git a/target/mips/sys-available/toolchain-mips64n64 b/target/mips/sys-available/toolchain-mips64n64
index e544008f4..4cb4939e5 100644
--- a/target/mips/sys-available/toolchain-mips64n64
+++ b/target/mips/sys-available/toolchain-mips64n64
@@ -7,6 +7,6 @@ config ADK_TARGET_SYSTEM_TOOLCHAIN_MIPS64N64
select ADK_CPU_MIPS64
select ADK_LINUX_64
select ADK_TOOLCHAIN
- select ADK_TARGET_PACKAGE_TGZ
+ select ADK_TARGET_PACKAGE_TXZ
help
MIPS64 big endian n64 ABI toolchain.
diff --git a/target/mips/sys-available/toolchain-mipsel b/target/mips/sys-available/toolchain-mipsel
index 4c197b808..4032f9d94 100644
--- a/target/mips/sys-available/toolchain-mipsel
+++ b/target/mips/sys-available/toolchain-mipsel
@@ -1,10 +1,10 @@
config ADK_TARGET_SYSTEM_TOOLCHAIN_MIPSEL
- bool "Toolchain only (little endian)"
+ bool "Toolchain only (mips32 little endian)"
select ADK_mips
select ADK_little
select ADK_toolchain_mipsel
select ADK_TOOLCHAIN
- select ADK_TARGET_PACKAGE_TGZ
+ select ADK_TARGET_PACKAGE_TXZ
help
- MIPS toolchain.
+ MIPS32 little endian toolchain.
diff --git a/target/mips/target.mk b/target/mips/target.mk
index f4864d2cc..8b13be890 100644
--- a/target/mips/target.mk
+++ b/target/mips/target.mk
@@ -1,5 +1,4 @@
include $(TOPDIR)/mk/kernel-ver.mk
ARCH:= mips
CPU_ARCH:= $(ADK_TARGET_CPU_ARCH)
-TARGET_OPTIMIZATION:= -Os -pipe
TARGET_CFLAGS_ARCH:= $(ADK_TARGET_CFLAGS)
diff --git a/target/packages/pkg-available/console b/target/packages/pkg-available/console
index ef688a3af..68ff1f0b5 100644
--- a/target/packages/pkg-available/console
+++ b/target/packages/pkg-available/console
@@ -3,6 +3,7 @@ config ADK_PKG_CONSOLE
default n
select ADK_PACKAGE_ALSA_UTILS
select ADK_PACKAGE_ALSA_UTILS_WITH_ALSAMIXER
+ select ADK_PACKAGE_DROPBEAR
select ADK_PACKAGE_SCREEN
select ADK_PACKAGE_SUDO
select ADK_PACKAGE_LINKS
diff --git a/target/packages/pkg-available/mpdbox b/target/packages/pkg-available/mpdbox
index b1edc40e1..31fd10381 100644
--- a/target/packages/pkg-available/mpdbox
+++ b/target/packages/pkg-available/mpdbox
@@ -2,9 +2,12 @@ config ADK_PKG_MPDBOX
bool "Choose packages for MPDBox system"
default n
select ADK_PACKAGE_MPDBOX
+ select ADK_PACKAGE_DROPBEAR
+ select BUSYBOX_NTPD
select ADK_PACKAGE_CIFS_UTILS
- select ADK_PACKAGE_NFS_UTILS if ADK_TARGET_LIB_GLIBC
- select ADK_PACKAGE_NFS_UTILS_CLIENT if ADK_TARGET_LIB_GLIBC
+ select ADK_PACKAGE_NFS_UTILS
+ select ADK_PACKAGE_NFS_UTILS_CLIENT
+ select ADK_PACKAGE_NTFS_3G
select ADK_PACKAGE_LIBMPDCLIENT
select ADK_PACKAGE_MPC
select ADK_PACKAGE_MPD
@@ -22,7 +25,6 @@ config ADK_PKG_MPDBOX
select ADK_PACKAGE_MPD_WITH_CURL
select ADK_PACKAGE_MPD_WITH_SAMPLERATE
select ADK_PACKAGE_MPD_WITH_HTTPD
- select ADK_PACKAGE_CPUFREQUTILS
select ADK_PACKAGE_FILE
select ADK_PACKAGE_HTOP
select ADK_PACKAGE_DROPBEAR
@@ -49,11 +51,13 @@ config ADK_PKG_MPDBOX
select ADK_PACKAGE_PHP_FASTCGI
select ADK_PACKAGE_SCREEN
select ADK_PACKAGE_VIM
+ select ADK_PACKAGE_E2FSCK
select ADK_PACKAGE_ALSA_UTILS
select ADK_PACKAGE_ALSA_UTILS_WITH_ALSAMIXER
select ADK_KPACKAGE_KMOD_SND_INTEL8X0 if ADK_TARGET_SYSTEM_QEMU_I686
select ADK_KPACKAGE_KMOD_SND_USB_AUDIO
select ADK_KPACKAGE_KMOD_USB_STORAGE
+ select ADK_KPACKAGE_KMOD_SND_BCM2708_SOC_HIFIBERRY_DAC if ADK_TARGET_SYSTEM_RASPBERRY_PI
help
Create a small mpdbox.
diff --git a/target/packages/pkg-available/test b/target/packages/pkg-available/test
index 7bbbe5310..e9db8161b 100644
--- a/target/packages/pkg-available/test
+++ b/target/packages/pkg-available/test
@@ -5,11 +5,13 @@ config ADK_PKG_TEST
select ADK_PACKAGE_SOCAT
select ADK_PACKAGE_MAKE
select ADK_PACKAGE_FILE
+ select ADK_PACKAGE_RDATE
select ADK_KERNEL_BLK_DEV_INITRD
select ADK_KERNEL_COMP_XZ
select ADK_KERNEL_INITRAMFS_COMPRESSION_XZ
select ADK_SIMPLE_NETWORK_CONFIG
select ADK_KPACKAGE_KMOD_IPV6
+ select ADK_TARGET_PACKAGE_TXZ
default n
help
Package collection used to build adk-test-framework root
diff --git a/target/ppc/Makefile b/target/ppc/Makefile
index aae63f1c0..fa1cd1698 100644
--- a/target/ppc/Makefile
+++ b/target/ppc/Makefile
@@ -17,7 +17,7 @@ imageinstall: $(FW_DIR)/$(ROOTFSTARBALL)
ifeq ($(ADK_HARDWARE_QEMU),y)
@cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
@echo "Use following command to create a QEMU Image:"
- @echo "./scripts/create.sh +g qemu-${CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
+ @echo "./scripts/create.sh qemu-${CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
@echo "Start qemu with following command line:"
@echo 'qemu-system-ppc -M mac99 -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL) qemu-${CPU_ARCH}.img'
endif
diff --git a/target/ppc/sys-available/toolchain-ppc b/target/ppc/sys-available/toolchain-ppc
index 54e35e6a5..dd432ecda 100644
--- a/target/ppc/sys-available/toolchain-ppc
+++ b/target/ppc/sys-available/toolchain-ppc
@@ -4,7 +4,7 @@ config ADK_TARGET_SYSTEM_TOOLCHAIN_PPC
select ADK_toolchain_ppc
select ADK_CPU_PPC
select ADK_TOOLCHAIN
- select ADK_TARGET_PACKAGE_TGZ
+ select ADK_TARGET_PACKAGE_TXZ
help
Build a ppc toolchain.
diff --git a/target/ppc/target.mk b/target/ppc/target.mk
index bd6624fe7..47ae3121f 100644
--- a/target/ppc/target.mk
+++ b/target/ppc/target.mk
@@ -1,5 +1,4 @@
include $(TOPDIR)/mk/kernel-ver.mk
ARCH:= powerpc
CPU_ARCH:= ppc
-TARGET_OPTIMIZATION:= -Os -pipe
TARGET_CFLAGS_ARCH:= $(ADK_TARGET_CFLAGS) -Wl,--secure-plt
diff --git a/target/ppc64/Makefile b/target/ppc64/Makefile
index 6ee949a09..5b9c1caa6 100644
--- a/target/ppc64/Makefile
+++ b/target/ppc64/Makefile
@@ -17,7 +17,7 @@ imageinstall: $(FW_DIR)/$(ROOTFSTARBALL)
ifeq ($(ADK_HARDWARE_QEMU),y)
@cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
@echo "Use following command to create a QEMU Image:"
- @echo "./scripts/create.sh +g qemu-${CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
+ @echo "./scripts/create.sh qemu-${CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
@echo "Start qemu with following command line:"
@echo 'qemu-system-ppc64 -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL) qemu-${CPU_ARCH}.img'
endif
diff --git a/target/ppc64/sys-available/qemu-ppc64 b/target/ppc64/sys-available/qemu-ppc64
index 8f7715cf8..ffc77a388 100644
--- a/target/ppc64/sys-available/qemu-ppc64
+++ b/target/ppc64/sys-available/qemu-ppc64
@@ -3,6 +3,7 @@ config ADK_TARGET_SYSTEM_QEMU_PPC64
select ADK_ppc64
select ADK_qemu_ppc64
select ADK_CPU_PPC64
+ select ADK_LINUX_64
select ADK_HARDWARE_QEMU
help
Support for Qemu Emulator (PPC64).
diff --git a/target/ppc64/sys-available/toolchain-ppc64 b/target/ppc64/sys-available/toolchain-ppc64
index 3615aab85..dce18a3a3 100644
--- a/target/ppc64/sys-available/toolchain-ppc64
+++ b/target/ppc64/sys-available/toolchain-ppc64
@@ -3,8 +3,9 @@ config ADK_TARGET_SYSTEM_TOOLCHAIN_PPC64
select ADK_ppc64
select ADK_toolchain_ppc64
select ADK_CPU_PPC64
+ select ADK_LINUX_64
select ADK_TOOLCHAIN
- select ADK_TARGET_PACKAGE_TGZ
+ select ADK_TARGET_PACKAGE_TXZ
help
Build a ppc64 toolchain.
diff --git a/target/ppc64/target.mk b/target/ppc64/target.mk
index 7ccf65b9c..5a0ecc30f 100644
--- a/target/ppc64/target.mk
+++ b/target/ppc64/target.mk
@@ -1,5 +1,4 @@
include $(TOPDIR)/mk/kernel-ver.mk
ARCH:= powerpc
CPU_ARCH:= ppc64
-TARGET_OPTIMIZATION:= -Os -pipe
TARGET_CFLAGS_ARCH:= $(ADK_TARGET_CFLAGS)
diff --git a/target/sh/Makefile b/target/sh/Makefile
index 0d5706eb3..12f8d0ce4 100644
--- a/target/sh/Makefile
+++ b/target/sh/Makefile
@@ -17,7 +17,7 @@ ifneq ($(ADK_HARDWARE_QEMU),)
@cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
@echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
@echo "Use following command to create a QEMU Image:"
- @echo "./scripts/create.sh +g qemu-${CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
+ @echo "./scripts/create.sh qemu-${CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
@echo "Start qemu with following options:"
@echo 'qemu-system-${CPU_ARCH} ${QEMU_ARGS} -M r2d -kernel $(FW_DIR)/$(TARGET_KERNEL) qemu-${CPU_ARCH}.img'
endif
diff --git a/target/sh/sys-available/toolchain-sh b/target/sh/sys-available/toolchain-sh
index 287401079..b9dedcfd2 100644
--- a/target/sh/sys-available/toolchain-sh
+++ b/target/sh/sys-available/toolchain-sh
@@ -5,7 +5,7 @@ config ADK_TARGET_SYSTEM_TOOLCHAIN_SH
select ADK_toolchain_sh
select ADK_CPU_SH4
select ADK_TOOLCHAIN
- select ADK_TARGET_PACKAGE_TGZ
+ select ADK_TARGET_PACKAGE_TXZ
help
Build a superh toolchain (sh4).
diff --git a/target/sh/sys-available/toolchain-sh4 b/target/sh/sys-available/toolchain-sh4
new file mode 100644
index 000000000..4d7fff826
--- /dev/null
+++ b/target/sh/sys-available/toolchain-sh4
@@ -0,0 +1,11 @@
+config ADK_TARGET_SYSTEM_TOOLCHAIN_SH4
+ bool "Toolchain only (little endian)"
+ select ADK_sh
+ select ADK_little
+ select ADK_toolchain_sh
+ select ADK_CPU_SH4
+ select ADK_TOOLCHAIN
+ select ADK_TARGET_PACKAGE_TXZ
+ help
+ Build a superh toolchain (sh4).
+
diff --git a/target/sh/sys-available/toolchain-sh4eb b/target/sh/sys-available/toolchain-sh4eb
new file mode 100644
index 000000000..cccc163e1
--- /dev/null
+++ b/target/sh/sys-available/toolchain-sh4eb
@@ -0,0 +1,11 @@
+config ADK_TARGET_SYSTEM_TOOLCHAIN_SH4EB
+ bool "Toolchain only (big endian)"
+ select ADK_sh
+ select ADK_big
+ select ADK_toolchain_sheb
+ select ADK_CPU_SH4
+ select ADK_TOOLCHAIN
+ select ADK_TARGET_PACKAGE_TXZ
+ help
+ Build a superh toolchain (sh4 big endian).
+
diff --git a/target/sh/sys-available/toolchain-sheb b/target/sh/sys-available/toolchain-sheb
index 236d4e486..f61547d24 100644
--- a/target/sh/sys-available/toolchain-sheb
+++ b/target/sh/sys-available/toolchain-sheb
@@ -5,7 +5,7 @@ config ADK_TARGET_SYSTEM_TOOLCHAIN_SHEB
select ADK_toolchain_sheb
select ADK_CPU_SH4
select ADK_TOOLCHAIN
- select ADK_TARGET_PACKAGE_TGZ
+ select ADK_TARGET_PACKAGE_TXZ
help
Build a superh toolchain (sh4 big endian).
diff --git a/target/sh/target.mk b/target/sh/target.mk
index b5630cced..408dd12c5 100644
--- a/target/sh/target.mk
+++ b/target/sh/target.mk
@@ -1,5 +1,4 @@
include $(TOPDIR)/mk/kernel-ver.mk
ARCH:= sh
CPU_ARCH:= $(ADK_TARGET_CPU_ARCH)
-TARGET_OPTIMIZATION:= -Os -pipe
TARGET_CFLAGS_ARCH:= $(ADK_TARGET_CFLAGS)
diff --git a/target/sparc/Makefile b/target/sparc/Makefile
index 1e15ee7f0..356f8745b 100644
--- a/target/sparc/Makefile
+++ b/target/sparc/Makefile
@@ -16,7 +16,7 @@ imageinstall: $(FW_DIR)/$(ROOTFSTARBALL)
@echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
ifeq ($(ADK_TARGET_SYSTEM_QEMU_SPARC),y)
@echo "Use following command to create a QEMU Image:"
- @echo "./scripts/create.sh +g qemu-${CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
+ @echo "./scripts/create.sh qemu-${CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
@echo "Start qemu with following command line:"
@echo 'qemu-system-sparc -M SS-5 -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL) qemu-${CPU_ARCH}.img -append "root=/dev/sda1"'
endif
diff --git a/target/sparc/sys-available/toolchain-sparc b/target/sparc/sys-available/toolchain-sparc
index e668592e2..e7f5aafc4 100644
--- a/target/sparc/sys-available/toolchain-sparc
+++ b/target/sparc/sys-available/toolchain-sparc
@@ -4,7 +4,7 @@ config ADK_TARGET_SYSTEM_TOOLCHAIN_SPARC
select ADK_toolchain_sparc
select ADK_CPU_SPARC_V8
select ADK_TOOLCHAIN
- select ADK_TARGET_PACKAGE_TGZ
+ select ADK_TARGET_PACKAGE_TXZ
help
Build a sparc toolchain.
diff --git a/target/sparc/target.mk b/target/sparc/target.mk
index 4de28f960..960a7cf19 100644
--- a/target/sparc/target.mk
+++ b/target/sparc/target.mk
@@ -1,5 +1,4 @@
include $(TOPDIR)/mk/kernel-ver.mk
ARCH:= sparc
CPU_ARCH:= sparc
-TARGET_OPTIMIZATION:= -Os -pipe
TARGET_CFLAGS_ARCH:= $(ADK_TARGET_CFLAGS)
diff --git a/target/sparc64/Makefile b/target/sparc64/Makefile
index 882189284..657d2ed4f 100644
--- a/target/sparc64/Makefile
+++ b/target/sparc64/Makefile
@@ -27,7 +27,7 @@ imageinstall: $(FW_DIR)/$(ROOTFSTARBALL)
@echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
ifeq ($(ADK_TARGET_SYSTEM_QEMU_SPARC64),y)
@echo "Use following command to create a QEMU Image:"
- @echo "./scripts/create.sh +g qemu-${CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
+ @echo "./scripts/create.sh qemu-${CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
@echo "Start qemu with following command line:"
@echo 'qemu-system-sparc64 $(QEMU_ARGS) -kernel $(FW_DIR)/$(TARGET_KERNEL) qemu-${CPU_ARCH}.img'
endif
diff --git a/target/sparc64/sys-available/qemu-sparc64 b/target/sparc64/sys-available/qemu-sparc64
index 062ad83e9..d750ea1e4 100644
--- a/target/sparc64/sys-available/qemu-sparc64
+++ b/target/sparc64/sys-available/qemu-sparc64
@@ -2,6 +2,7 @@ config ADK_TARGET_SYSTEM_QEMU_SPARC64
bool "Qemu Emulator"
select ADK_sparc64
select ADK_qemu_sparc64
+ select ADK_LINUX_64
select ADK_CPU_SPARC_V9
select ADK_HARDWARE_QEMU
select ADK_TARGET_KERNEL_ZIMAGE
diff --git a/target/sparc64/sys-available/toolchain-sparc64 b/target/sparc64/sys-available/toolchain-sparc64
index 15eaca575..a83ecd198 100644
--- a/target/sparc64/sys-available/toolchain-sparc64
+++ b/target/sparc64/sys-available/toolchain-sparc64
@@ -3,8 +3,9 @@ config ADK_TARGET_SYSTEM_TOOLCHAIN_SPARC64
select ADK_sparc64
select ADK_toolchain_sparc64
select ADK_CPU_SPARC_V9
+ select ADK_LINUX_64
select ADK_TOOLCHAIN
- select ADK_TARGET_PACKAGE_TGZ
+ select ADK_TARGET_PACKAGE_TXZ
help
Build a sparc64 toolchain.
diff --git a/target/sparc64/target.mk b/target/sparc64/target.mk
index 663e42d23..dda789e55 100644
--- a/target/sparc64/target.mk
+++ b/target/sparc64/target.mk
@@ -1,5 +1,4 @@
include $(TOPDIR)/mk/kernel-ver.mk
ARCH:= sparc
CPU_ARCH:= sparc64
-TARGET_OPTIMIZATION:= -Os -pipe
TARGET_CFLAGS_ARCH:= $(ADK_TARGET_CFLAGS)
diff --git a/target/tarch.lst b/target/tarch.lst
index 09eed2265..60e064398 100644
--- a/target/tarch.lst
+++ b/target/tarch.lst
@@ -9,9 +9,14 @@ mips64
mips64n32
mips64n64
mips64el
+mips64eln32
+mips64eln64
ppc
ppc64
+sh4
+sh4eb
sparc
sparc64
x86
x86_64
+x86_64_x32
diff --git a/target/x86/Makefile b/target/x86/Makefile
index 15d980d7c..27920819f 100644
--- a/target/x86/Makefile
+++ b/target/x86/Makefile
@@ -8,6 +8,11 @@ include $(TOPDIR)/mk/kernel-build.mk
include $(TOPDIR)/mk/image.mk
KERNEL:=$(LINUX_DIR)/arch/x86/boot/bzImage
+ifeq ($(ADK_TARGET_QEMU_WITH_BOOTLOADER),y)
+CREATE:=./scripts/create.sh -g
+else
+CREATE:=./scripts/create.sh
+endif
ifeq ($(ADK_TARGET_FS),genext2fs)
imageinstall: $(FW_DIR)/$(ROOTFSTARBALL)
@@ -31,10 +36,14 @@ imageinstall: $(FW_DIR)/$(ROOTFSTARBALL)
ifeq ($(ADK_HARDWARE_QEMU),y)
@cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
@echo "Use following command to create a QEMU Image:"
- @echo "./scripts/create.sh qemu-${CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
+ @echo "$(CREATE) qemu-${CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
@echo "Start qemu with following command line:"
+ifeq ($(ADK_TARGET_QEMU_WITH_BOOTLOADER),y)
+ @echo 'qemu-system-i386 ${ADK_QEMU_ARGS} -net user -net nic,model=e1000 qemu-${CPU_ARCH}.img'
+else
@echo 'qemu-system-i386 ${ADK_QEMU_ARGS} -net user -net nic,model=e1000 -kernel $(FW_DIR)/$(TARGET_KERNEL) qemu-${CPU_ARCH}.img'
endif
+endif
ifeq ($(ADK_HARDWARE_VBOX),y)
@cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
@echo "Use following command to create a VirtualBox Image:"
diff --git a/target/x86/kernel/generic-pc b/target/x86/kernel/generic-pc
new file mode 100644
index 000000000..8b26b4d30
--- /dev/null
+++ b/target/x86/kernel/generic-pc
@@ -0,0 +1,23 @@
+CONFIG_X86=y
+CONFIG_X86_32=y
+CONFIG_PCI=y
+CONFIG_PCI_GOANY=y
+CONFIG_PCI_BIOS=y
+CONFIG_PCI_DIRECT=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_NET_VENDOR_NATSEMI=y
+CONFIG_NET_VENDOR_8390=y
+CONFIG_NE2K_PCI=y
+CONFIG_PCNET32=y
+CONFIG_NET_VENDOR_REALTEK=y
+CONFIG_RTL8139CP=y
+CONFIG_8139TOO=y
+CONFIG_NET_VENDOR_INTEL=y
+CONFIG_E100=y
+CONFIG_E1000=y
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_ATA=y
+CONFIG_ATA_SFF=y
+CONFIG_ATA_BMDMA=y
+CONFIG_ATA_PIIX=y
diff --git a/target/x86/kernel/qemu-i686 b/target/x86/kernel/qemu-x86
index 7eb708745..7eb708745 100644
--- a/target/x86/kernel/qemu-i686
+++ b/target/x86/kernel/qemu-x86
diff --git a/target/x86/sys-available/generic-pc b/target/x86/sys-available/generic-pc
new file mode 100644
index 000000000..76d228936
--- /dev/null
+++ b/target/x86/sys-available/generic-pc
@@ -0,0 +1,9 @@
+config ADK_TARGET_SYSTEM_GENERIC_PC
+ bool "Generic PC (486)"
+ select ADK_x86
+ select ADK_generic_pc
+ select ADK_CPU_I486
+ select ADK_TARGET_KERNEL_BZIMAGE
+ help
+ Support for generic PC (i486).
+
diff --git a/target/x86/sys-available/ibm-x40 b/target/x86/sys-available/ibm-x40
index ac94bb1ec..80c5bf531 100644
--- a/target/x86/sys-available/ibm-x40
+++ b/target/x86/sys-available/ibm-x40
@@ -13,13 +13,14 @@ config ADK_TARGET_SYSTEM_IBM_X40
select ADK_TARGET_WITH_VGA
select ADK_TARGET_WITH_INPUT
select ADK_TARGET_WITH_RTC
- select ADK_TARGET_WITH_CF
select ADK_TARGET_WITH_MINIPCI
select ADK_TARGET_WITH_HDD
select ADK_TARGET_WITH_PCI
select ADK_TARGET_WITH_ACPI
# with docking station
select ADK_TARGET_WITH_PP
+ select ADK_TARGET_WITH_ROOT_RW
select ADK_TARGET_KERNEL_BZIMAGE
+ select ADK_PACKAGE_GRUB_BIN
help
System profile for IBM X40 laptop.
diff --git a/target/x86/sys-available/pcengines-alix1c b/target/x86/sys-available/pcengines-alix1c
index 902c004a1..484439328 100644
--- a/target/x86/sys-available/pcengines-alix1c
+++ b/target/x86/sys-available/pcengines-alix1c
@@ -14,7 +14,6 @@ config ADK_TARGET_SYSTEM_PCENGINES_ALIX1C
select ADK_TARGET_WITH_VGA
select ADK_TARGET_WITH_INPUT
select ADK_TARGET_WITH_RTC
- select ADK_TARGET_WITH_CF
select ADK_TARGET_WITH_WATCHDOG
select ADK_TARGET_WITH_USB_BOOT
select ADK_TARGET_KERNEL_BZIMAGE
diff --git a/target/x86/sys-available/pcengines-alix2d13 b/target/x86/sys-available/pcengines-alix2d13
index c92c0d36e..33e939348 100644
--- a/target/x86/sys-available/pcengines-alix2d13
+++ b/target/x86/sys-available/pcengines-alix2d13
@@ -12,7 +12,6 @@ config ADK_TARGET_SYSTEM_PCENGINES_ALIX2D13
select ADK_TARGET_WITH_RTC
select ADK_TARGET_WITH_LEDS
select ADK_TARGET_WITH_WATCHDOG
- select ADK_TARGET_WITH_CF
select ADK_TARGET_KERNEL_BZIMAGE
depends on ADK_BROKEN
help
diff --git a/target/x86/sys-available/pcengines-alix2d2 b/target/x86/sys-available/pcengines-alix2d2
index fd83a700a..a48bec2cc 100644
--- a/target/x86/sys-available/pcengines-alix2d2
+++ b/target/x86/sys-available/pcengines-alix2d2
@@ -12,7 +12,6 @@ config ADK_TARGET_SYSTEM_PCENGINES_ALIX2D2
select ADK_TARGET_WITH_USB
select ADK_TARGET_WITH_LEDS
select ADK_TARGET_WITH_WATCHDOG
- select ADK_TARGET_WITH_CF
select ADK_TARGET_KERNEL_BZIMAGE
depends on ADK_BROKEN
help
diff --git a/target/x86/sys-available/pcengines-wrap b/target/x86/sys-available/pcengines-wrap
index 2fa4e13c4..50db08ccf 100644
--- a/target/x86/sys-available/pcengines-wrap
+++ b/target/x86/sys-available/pcengines-wrap
@@ -4,7 +4,6 @@ config ADK_TARGET_SYSTEM_PCENGINES_WRAP
select ADK_pcengines_wrap
select ADK_CPU_I486
select ADK_KERNEL_I486
- select ADK_TARGET_WITH_CF
select ADK_TARGET_WITH_MINIPCI
select ADK_TARGET_WITH_WATCHDOG
select ADK_TARGET_KERNEL_BZIMAGE
diff --git a/target/x86/sys-available/qemu-i486 b/target/x86/sys-available/qemu-i486
new file mode 100644
index 000000000..dc0da52ca
--- /dev/null
+++ b/target/x86/sys-available/qemu-i486
@@ -0,0 +1,10 @@
+config ADK_TARGET_SYSTEM_QEMU_I486
+ bool "Qemu Emulator (i486)"
+ select ADK_x86
+ select ADK_qemu_i486
+ select ADK_CPU_I486
+ select ADK_HARDWARE_QEMU
+ select ADK_TARGET_KERNEL_BZIMAGE
+ help
+ Support for Qemu Emulator (i486).
+
diff --git a/target/x86/sys-available/qemu-i686 b/target/x86/sys-available/qemu-i686
index b047bc482..b2951a1e2 100644
--- a/target/x86/sys-available/qemu-i686
+++ b/target/x86/sys-available/qemu-i686
@@ -1,5 +1,5 @@
config ADK_TARGET_SYSTEM_QEMU_I686
- bool "Qemu Emulator"
+ bool "Qemu Emulator (i686)"
select ADK_x86
select ADK_qemu_i686
select ADK_CPU_I686
diff --git a/target/x86/sys-available/toolchain-i686 b/target/x86/sys-available/toolchain-i686
index bec515fca..b7c3be238 100644
--- a/target/x86/sys-available/toolchain-i686
+++ b/target/x86/sys-available/toolchain-i686
@@ -4,7 +4,7 @@ config ADK_TARGET_SYSTEM_TOOLCHAIN_X86
select ADK_toolchain_x86
select ADK_CPU_I686
select ADK_TOOLCHAIN
- select ADK_TARGET_PACKAGE_TGZ
+ select ADK_TARGET_PACKAGE_TXZ
help
Build a x86 toolchain (i686 optimized).
diff --git a/target/x86/target.mk b/target/x86/target.mk
index 30e558283..ecb811221 100644
--- a/target/x86/target.mk
+++ b/target/x86/target.mk
@@ -1,5 +1,4 @@
include $(TOPDIR)/mk/kernel-ver.mk
ARCH:= x86
CPU_ARCH:= $(strip $(subst ",, $(ADK_TARGET_CPU_ARCH)))
-TARGET_OPTIMIZATION:= -Os -pipe
TARGET_CFLAGS_ARCH:= $(ADK_TARGET_CFLAGS)
diff --git a/target/x86_64/sys-available/qemu-x86_64 b/target/x86_64/sys-available/qemu-x86_64
index 48b6fceab..5067a8ecf 100644
--- a/target/x86_64/sys-available/qemu-x86_64
+++ b/target/x86_64/sys-available/qemu-x86_64
@@ -2,6 +2,7 @@ config ADK_TARGET_SYSTEM_QEMU_X86_64
bool "Qemu Emulator"
select ADK_x86_64
select ADK_qemu_x86_64
+ select ADK_64
select ADK_CPU_X86_64
select ADK_LINUX_64
select ADK_HARDWARE_QEMU
diff --git a/target/x86_64/sys-available/qemu-x86_64_x32 b/target/x86_64/sys-available/qemu-x86_64_x32
new file mode 100644
index 000000000..9108c7951
--- /dev/null
+++ b/target/x86_64/sys-available/qemu-x86_64_x32
@@ -0,0 +1,12 @@
+config ADK_TARGET_SYSTEM_QEMU_X86_64_X32
+ bool "Qemu Emulator (x86_64 with X32 ABI)"
+ select ADK_x86_64
+ select ADK_qemu_x86_64
+ select ADK_x32
+ select ADK_CPU_X86_64
+ select ADK_LINUX_64
+ select ADK_HARDWARE_QEMU
+ select ADK_TARGET_KERNEL_BZIMAGE
+ help
+ Support for Qemu Emulator.
+
diff --git a/target/x86_64/sys-available/toolchain-x86_64 b/target/x86_64/sys-available/toolchain-x86_64
index c268e9687..b93b479a1 100644
--- a/target/x86_64/sys-available/toolchain-x86_64
+++ b/target/x86_64/sys-available/toolchain-x86_64
@@ -1,10 +1,12 @@
config ADK_TARGET_SYSTEM_TOOLCHAIN_X86_64
bool "Toolchain only"
select ADK_x86_64
+ select ADK_64
select ADK_toolchain_x86_64
select ADK_CPU_X86_64
+ select ADK_LINUX_64
select ADK_TOOLCHAIN
- select ADK_TARGET_PACKAGE_TGZ
+ select ADK_TARGET_PACKAGE_TXZ
help
Build a x86_64 toolchain.
diff --git a/target/x86_64/sys-available/toolchain-x86_64_32 b/target/x86_64/sys-available/toolchain-x86_64_32
new file mode 100644
index 000000000..9e8297ea4
--- /dev/null
+++ b/target/x86_64/sys-available/toolchain-x86_64_32
@@ -0,0 +1,12 @@
+config ADK_TARGET_SYSTEM_TOOLCHAIN_X86_64_32
+ bool "Toolchain only (32 ABI)"
+ select ADK_x86_64
+ select ADK_32
+ select ADK_toolchain_x86_64
+ select ADK_CPU_X86_64
+ select ADK_LINUX_64
+ select ADK_TOOLCHAIN
+ select ADK_TARGET_PACKAGE_TXZ
+ help
+ Build a x86_64 toolchain.
+
diff --git a/target/x86_64/sys-available/toolchain-x86_64_x32 b/target/x86_64/sys-available/toolchain-x86_64_x32
new file mode 100644
index 000000000..22d94171f
--- /dev/null
+++ b/target/x86_64/sys-available/toolchain-x86_64_x32
@@ -0,0 +1,12 @@
+config ADK_TARGET_SYSTEM_TOOLCHAIN_X86_64_X32
+ bool "Toolchain only (x32 ABI)"
+ select ADK_x86_64
+ select ADK_x32
+ select ADK_toolchain_x86_64
+ select ADK_CPU_X86_64
+ select ADK_LINUX_64
+ select ADK_TOOLCHAIN
+ select ADK_TARGET_PACKAGE_TXZ
+ help
+ Build a x86_64 toolchain.
+
diff --git a/target/x86_64/target.mk b/target/x86_64/target.mk
index 3eed00bf5..f381673fa 100644
--- a/target/x86_64/target.mk
+++ b/target/x86_64/target.mk
@@ -1,5 +1,4 @@
include $(TOPDIR)/mk/kernel-ver.mk
ARCH:= x86
CPU_ARCH:= x86_64
-TARGET_OPTIMIZATION:= -Os -pipe
TARGET_CFLAGS_ARCH:= $(ADK_TARGET_CFLAGS)
diff --git a/toolchain/Config.in b/toolchain/Config.in
index 54016212a..3a0306ac4 100644
--- a/toolchain/Config.in
+++ b/toolchain/Config.in
@@ -10,26 +10,38 @@ config ADK_TOOLCHAIN_GCC_CXX
boolean
default y
-config ADK_TOOLCHAIN_GCC_SSP
- prompt "Enable Stack Smashing Protection in GCC"
+config ADK_TOOLCHAIN_SSP
+ prompt "Enable Stack Smashing Protection"
boolean
default y
-config ADK_TOOLCHAIN_GCC_USE_SSP
+config ADK_TOOLCHAIN_USE_SSP
prompt "Use SSP for all packages"
boolean
- depends on ADK_TOOLCHAIN_GCC_SSP
+ depends on ADK_TOOLCHAIN_SSP
default n
-config ADK_TOOLCHAIN_GCC_LTO
- prompt "Enable Link Time Optimization in GCC"
+config ADK_TOOLCHAIN_LTO
+ prompt "Enable Link Time Optimization"
boolean
default y
-config ADK_TOOLCHAIN_GCC_USE_LTO
+config ADK_TOOLCHAIN_USE_LTO
prompt "Use Link Time Optimization for all packages"
boolean
- depends on ADK_TOOLCHAIN_GCC_LTO
+ depends on ADK_TOOLCHAIN_LTO
+ default n
+
+config ADK_TOOLCHAIN_GOLD
+ prompt "Enable GOLD as linker"
+ boolean
+ depends on !ADK_LINUX_MIPS
+ default n
+
+config ADK_TOOLCHAIN_USE_GOLD
+ prompt "Use GOLD as linker for all packages"
+ boolean
+ depends on ADK_TOOLCHAIN_GOLD
default n
endmenu
diff --git a/toolchain/Makefile b/toolchain/Makefile
index c70ea9820..d37117272 100644
--- a/toolchain/Makefile
+++ b/toolchain/Makefile
@@ -21,8 +21,8 @@ TARGETS+=glibc
LIBC:=glibc
endif
ifeq ($(ADK_TARGET_LIB_UCLIBC),y)
-TARGETS+=uClibc
-LIBC:=uClibc
+TARGETS+=uclibc
+LIBC:=uclibc
endif
ifeq ($(ADK_TARGET_LIB_MUSL),y)
TARGETS+=musl
diff --git a/toolchain/binutils/Makefile b/toolchain/binutils/Makefile
index 6490c19aa..87cea2987 100644
--- a/toolchain/binutils/Makefile
+++ b/toolchain/binutils/Makefile
@@ -6,17 +6,29 @@ include Makefile.inc
include ../rules.mk
include ${TOPDIR}/mk/buildhlp.mk
-ifeq ($(ADK_TOOLCHAIN_GCC_SSP),y)
+ifeq ($(ADK_TOOLCHAIN_SSP),y)
CONFOPTS+= --enable-libssp
else
CONFOPTS+= --disable-libssp
endif
+ifeq ($(ADK_TOOLCHAIN_LTO),y)
+CONFOPTS+= --enable-lto
+else
+CONFOPTS+= --disable-lto
+endif
+
+ifeq ($(ADK_TOOLCHAIN_GOLD),y)
+CONFOPTS+= --enable-gold
+else
+CONFOPTS+= --disable-gold
+endif
+
ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI),y)
CONFOPTS+= --with-arch=armv6
endif
-ifneq ($(strip $(ADK_LINUX_64)$(ADK_TARGET_KERNEL64)),)
+ifneq ($(ADK_LINUX_64),)
CONFOPTS+= --enable-64-bit-bfd
endif
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 b/toolchain/gcc/Makefile
index 6f70bfd12..eee524ba3 100644
--- a/toolchain/gcc/Makefile
+++ b/toolchain/gcc/Makefile
@@ -28,7 +28,7 @@ GCC_CONFOPTS:= --prefix=$(TOOLCHAIN_DIR)/usr \
--disable-libstdcxx-pch \
--disable-ppl-version-check \
--disable-cloog-version-check \
- --without-system-zlib \
+ --with-system-zlib \
--without-ppl \
--without-cloog \
--without-isl \
@@ -45,10 +45,10 @@ endif
ifeq ($(ADK_LINUX_X86_64),y)
ifeq ($(ADK_x32),y)
-GCC_FINAL_CONFOPTS+= --enable-multilib --with-multilib-list=mx32
+GCC_FINAL_CONFOPTS+= --with-abi=x32
endif
ifeq ($(ADK_32),y)
-GCC_FINAL_CONFOPTS+= --enable-multilib --with-multilib-list=m32
+GCC_FINAL_CONFOPTS+= --with-abi=32
endif
ifeq ($(ADK_64),y)
GCC_FINAL_CONFOPTS+= --disable-biarch --disable-multilib
@@ -202,11 +202,18 @@ $(WRKBUILD)/.installed: $(WRKBUILD)/.compiled
# remove duplicate tools, convert hardlinks to symlinks
set -e; \
cd $(TOOLCHAIN_DIR)/usr/$(GNU_TARGET_NAME)/bin; \
- for app in ar as c++ g++ gcc ld ld.bfd nm objcopy objdump ranlib strip; do \
+ for app in ar as c++ g++ gcc ld ld.gold ld.bfd nm objcopy objdump ranlib strip; do \
ln -sf ../../bin/$(GNU_TARGET_NAME)-$${app} $${app}; \
done;
(cd $(TOOLCHAIN_DIR)/usr/bin && \
ln -sf $(GNU_TARGET_NAME)-gcc $(GNU_TARGET_NAME)-gcc-${PKG_VERSION})
+ifeq ($(ADK_TOOLCHAIN_USE_GOLD),y)
+ (cd $(TOOLCHAIN_DIR)/usr/bin && \
+ ln -sf $(GNU_TARGET_NAME)-ld.gold $(GNU_TARGET_NAME)-ld)
+else
+ (cd $(TOOLCHAIN_DIR)/usr/bin && \
+ ln -sf $(GNU_TARGET_NAME)-ld.bfd $(GNU_TARGET_NAME)-ld)
+endif
cd $(STAGING_TARGET_DIR)/lib && \
ln -sf libstdc++.so.6.0.18 libstdc++.so && \
ln -sf libstdc++.so.6.0.18 libstdc++.so.6
diff --git a/toolchain/gcc/Makefile.inc b/toolchain/gcc/Makefile.inc
index 25e51178a..b441bf03d 100644
--- a/toolchain/gcc/Makefile.inc
+++ b/toolchain/gcc/Makefile.inc
@@ -2,13 +2,7 @@
# material, please see the LICENCE file in the top-level directory.
PKG_NAME:= gcc
-ifeq ($(ADK_LINUX_SPARC),y)
-PKG_VERSION:= 4.7.3
-PKG_MD5SUM:= 86f428a30379bdee0224e353ee2f999e
-else
PKG_VERSION:= 4.8.2
-PKG_MD5SUM:= a3d7d63b9cb6b6ea049469a0c4a43c9d
-endif
+PKG_MD5SUM:= deca88241c1135e2ff9fa5486ab5957b
PKG_RELEASE:= 1
PKG_SITES:= ${MASTER_SITE_GNU:=gcc/gcc-${PKG_VERSION}/}
-DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tar.bz2
diff --git a/toolchain/gcc/patches/4.8.2/abi32.patch b/toolchain/gcc/patches/4.8.2/abi32.patch
new file mode 100644
index 000000000..856d608bd
--- /dev/null
+++ b/toolchain/gcc/patches/4.8.2/abi32.patch
@@ -0,0 +1,54 @@
+diff -Nur gcc-4.8.2.orig/gcc/config/i386/biarch32.h gcc-4.8.2/gcc/config/i386/biarch32.h
+--- gcc-4.8.2.orig/gcc/config/i386/biarch32.h 1970-01-01 01:00:00.000000000 +0100
++++ gcc-4.8.2/gcc/config/i386/biarch32.h 2014-03-23 20:33:52.000000000 +0100
+@@ -0,0 +1,27 @@
++/* Make configure files to produce biarch compiler defaulting to 32bit mode.
++ This file must be included very first, while the OS specific file later
++ to overwrite otherwise wrong defaults.
++ Copyright (C) 2001-2014 Free Software Foundation, Inc.
++
++This file is part of GCC.
++
++GCC 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 3, or (at your option)
++any later version.
++
++GCC 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.
++
++Under Section 7 of GPL version 3, you are granted additional
++permissions described in the GCC Runtime Library Exception, version
++3.1, as published by the Free Software Foundation.
++
++You should have received a copy of the GNU General Public License and
++a copy of the GCC Runtime Library Exception along with this program;
++see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
++<http://www.gnu.org/licenses/>. */
++
++#define TARGET_64BIT_DEFAULT 0
+diff -Nur gcc-4.8.2.orig/gcc/config.gcc gcc-4.8.2/gcc/config.gcc
+--- gcc-4.8.2.orig/gcc/config.gcc 2013-10-03 02:47:24.000000000 +0200
++++ gcc-4.8.2/gcc/config.gcc 2014-03-22 13:15:18.000000000 +0100
+@@ -522,6 +522,9 @@
+ 64 | m64)
+ tm_file="i386/biarch64.h ${tm_file}"
+ ;;
++ 32 | m32)
++ tm_file="i386/biarch32.h ${tm_file}"
++ ;;
+ x32 | mx32)
+ tm_file="i386/biarchx32.h ${tm_file}"
+ ;;
+@@ -1343,6 +1346,9 @@
+ x32 | mx32)
+ x86_multilibs="mx32"
+ ;;
++ 32 | m32)
++ x86_multilibs="m32"
++ ;;
+ *)
+ x86_multilibs="m64,m32"
+ ;;
diff --git a/toolchain/gcc/patches/4.8.2/miscompile.sparc b/toolchain/gcc/patches/4.8.2/miscompile.sparc
new file mode 100644
index 000000000..4aef2e605
--- /dev/null
+++ b/toolchain/gcc/patches/4.8.2/miscompile.sparc
@@ -0,0 +1,154 @@
+diff -Nur gcc-4.8.2.orig/gcc/tree-ssa-forwprop.c gcc-4.8.2/gcc/tree-ssa-forwprop.c
+--- gcc-4.8.2.orig/gcc/tree-ssa-forwprop.c 2013-02-25 16:31:31.000000000 +0100
++++ gcc-4.8.2/gcc/tree-ssa-forwprop.c 2014-03-22 19:37:04.797991879 +0100
+@@ -688,6 +688,130 @@
+ recompute_tree_invariant_for_addr_expr (gimple_assign_rhs1 (stmt));
+ }
+
++ /* DEF_RHS contains the address of the 0th element in an array.
++ USE_STMT uses type of DEF_RHS to compute the address of an
++ arbitrary element within the array. The (variable) byte offset
++ of the element is contained in OFFSET.
++
++ We walk back through the use-def chains of OFFSET to verify that
++ it is indeed computing the offset of an element within the array
++ and extract the index corresponding to the given byte offset.
++
++ We then try to fold the entire address expression into a form
++ &array[index].
++
++ If we are successful, we replace the right hand side of USE_STMT
++ with the new address computation. */
++
++ static bool
++ forward_propagate_addr_into_variable_array_index (tree offset,
++ tree def_rhs,
++ gimple_stmt_iterator *use_stmt_gsi)
++ {
++ tree index, tunit;
++ gimple offset_def, use_stmt = gsi_stmt (*use_stmt_gsi);
++ tree new_rhs, tmp;
++
++ if (TREE_CODE (TREE_OPERAND (def_rhs, 0)) == ARRAY_REF)
++ tunit = TYPE_SIZE_UNIT (TREE_TYPE (TREE_TYPE (def_rhs)));
++ else if (TREE_CODE (TREE_TYPE (TREE_OPERAND (def_rhs, 0))) == ARRAY_TYPE)
++ tunit = TYPE_SIZE_UNIT (TREE_TYPE (TREE_TYPE (TREE_TYPE (def_rhs))));
++ else
++ return false;
++ if (!host_integerp (tunit, 1))
++ return false;
++
++ /* Get the offset's defining statement. */
++ offset_def = SSA_NAME_DEF_STMT (offset);
++
++ /* Try to find an expression for a proper index. This is either a
++ multiplication expression by the element size or just the ssa name we came
++ along in case the element size is one. In that case, however, we do not
++ allow multiplications because they can be computing index to a higher
++ level dimension (PR 37861). */
++ if (integer_onep (tunit))
++ {
++ if (is_gimple_assign (offset_def)
++ && gimple_assign_rhs_code (offset_def) == MULT_EXPR)
++ return false;
++
++ index = offset;
++ }
++ else
++ {
++ /* The statement which defines OFFSET before type conversion
++ must be a simple GIMPLE_ASSIGN. */
++ if (!is_gimple_assign (offset_def))
++ return false;
++
++ /* The RHS of the statement which defines OFFSET must be a
++ multiplication of an object by the size of the array elements.
++ This implicitly verifies that the size of the array elements
++ is constant. */
++ if (gimple_assign_rhs_code (offset_def) == MULT_EXPR
++ && TREE_CODE (gimple_assign_rhs2 (offset_def)) == INTEGER_CST
++ && tree_int_cst_equal (gimple_assign_rhs2 (offset_def), tunit))
++ {
++ /* The first operand to the MULT_EXPR is the desired index. */
++ index = gimple_assign_rhs1 (offset_def);
++ }
++ /* If we have idx * tunit + CST * tunit re-associate that. */
++ else if ((gimple_assign_rhs_code (offset_def) == PLUS_EXPR
++ || gimple_assign_rhs_code (offset_def) == MINUS_EXPR)
++ && TREE_CODE (gimple_assign_rhs1 (offset_def)) == SSA_NAME
++ && TREE_CODE (gimple_assign_rhs2 (offset_def)) == INTEGER_CST
++ && (tmp = div_if_zero_remainder (EXACT_DIV_EXPR,
++ gimple_assign_rhs2 (offset_def),
++ tunit)) != NULL_TREE)
++ {
++ gimple offset_def2 = SSA_NAME_DEF_STMT (gimple_assign_rhs1 (offset_def));
++ if (is_gimple_assign (offset_def2)
++ && gimple_assign_rhs_code (offset_def2) == MULT_EXPR
++ && TREE_CODE (gimple_assign_rhs2 (offset_def2)) == INTEGER_CST
++ && tree_int_cst_equal (gimple_assign_rhs2 (offset_def2), tunit))
++ {
++ index = fold_build2 (gimple_assign_rhs_code (offset_def),
++ TREE_TYPE (offset),
++ gimple_assign_rhs1 (offset_def2), tmp);
++ }
++ else
++ return false;
++ }
++ else
++ return false;
++ }
++
++ /* Replace the pointer addition with array indexing. */
++ index = force_gimple_operand_gsi (use_stmt_gsi, index, true, NULL_TREE,
++ true, GSI_SAME_STMT);
++ if (TREE_CODE (TREE_OPERAND (def_rhs, 0)) == ARRAY_REF)
++ {
++ new_rhs = unshare_expr (def_rhs);
++ TREE_OPERAND (TREE_OPERAND (new_rhs, 0), 1) = index;
++ }
++ else
++ {
++ new_rhs = build4 (ARRAY_REF, TREE_TYPE (TREE_TYPE (TREE_TYPE (def_rhs))),
++ unshare_expr (TREE_OPERAND (def_rhs, 0)),
++ index, integer_zero_node, NULL_TREE);
++ new_rhs = build_fold_addr_expr (new_rhs);
++ if (!useless_type_conversion_p (TREE_TYPE (gimple_assign_lhs (use_stmt)),
++ TREE_TYPE (new_rhs)))
++ {
++ new_rhs = force_gimple_operand_gsi (use_stmt_gsi, new_rhs, true,
++ NULL_TREE, true, GSI_SAME_STMT);
++ new_rhs = fold_convert (TREE_TYPE (gimple_assign_lhs (use_stmt)),
++ new_rhs);
++ }
++ }
++ gimple_assign_set_rhs_from_tree (use_stmt_gsi, new_rhs);
++ fold_stmt (use_stmt_gsi);
++ tidy_after_forward_propagate_addr (gsi_stmt (*use_stmt_gsi));
++ return true;
++ }
++
++
++
+ /* NAME is a SSA_NAME representing DEF_RHS which is of the form
+ ADDR_EXPR <whatever>.
+
+@@ -977,6 +1101,19 @@
+ tidy_after_forward_propagate_addr (use_stmt);
+ return true;
+ }
++ /* Try to optimize &x[0] p+ OFFSET where OFFSET is defined by
++ converting a multiplication of an index by the size of the
++ array elements, then the result is converted into the proper
++ type for the arithmetic. */
++ if (TREE_CODE (rhs2) == SSA_NAME
++ && (TREE_CODE (array_ref) != ARRAY_REF
++ || integer_zerop (TREE_OPERAND (array_ref, 1)))
++ && useless_type_conversion_p (TREE_TYPE (name), TREE_TYPE (def_rhs))
++ /* Avoid problems with IVopts creating PLUS_EXPRs with a
++ different type than their operands. */
++ && useless_type_conversion_p (TREE_TYPE (lhs), TREE_TYPE (def_rhs)))
++ return forward_propagate_addr_into_variable_array_index (rhs2, def_rhs,
++ use_stmt_gsi);
+
+ return false;
+ }
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/glibc/Makefile.inc b/toolchain/glibc/Makefile.inc
index 6671f1e2d..3a9f24e33 100644
--- a/toolchain/glibc/Makefile.inc
+++ b/toolchain/glibc/Makefile.inc
@@ -6,7 +6,7 @@ PKG_VERSION:= 2.19
PKG_RELEASE:= 1
PKG_MD5SUM:= 5374d29864b583622b62bfc6b8429418
PKG_SITES:= ${MASTER_SITE_GNU:=glibc/}
-ifeq ($(ADK_TARGET_ABI_32),y)
+ifeq ($(ADK_32),y)
GLIBC_TARGET_NAME:= i686-openadk-linux-gnu
else
GLIBC_TARGET_NAME:= $(GNU_TARGET_NAME)
diff --git a/toolchain/glibc/tarch.lst b/toolchain/glibc/tarch.lst
new file mode 100644
index 000000000..60e064398
--- /dev/null
+++ b/toolchain/glibc/tarch.lst
@@ -0,0 +1,22 @@
+arm
+armhf
+m68k
+microblaze
+microblazeel
+mips
+mipsel
+mips64
+mips64n32
+mips64n64
+mips64el
+mips64eln32
+mips64eln64
+ppc
+ppc64
+sh4
+sh4eb
+sparc
+sparc64
+x86
+x86_64
+x86_64_x32
diff --git a/toolchain/kernel-headers/patches/3.10.33/cleankernel.patch b/toolchain/kernel-headers/patches/3.10.34/cleankernel.patch
index 5f26a6b72..5f26a6b72 100644
--- a/toolchain/kernel-headers/patches/3.10.33/cleankernel.patch
+++ b/toolchain/kernel-headers/patches/3.10.34/cleankernel.patch
diff --git a/toolchain/kernel-headers/patches/3.10.33/mkpiggy.patch b/toolchain/kernel-headers/patches/3.10.34/mkpiggy.patch
index d4e815cd2..d4e815cd2 100644
--- a/toolchain/kernel-headers/patches/3.10.33/mkpiggy.patch
+++ b/toolchain/kernel-headers/patches/3.10.34/mkpiggy.patch
diff --git a/toolchain/kernel-headers/patches/3.10.33/relocs.patch b/toolchain/kernel-headers/patches/3.10.34/relocs.patch
index 649b9e73e..649b9e73e 100644
--- a/toolchain/kernel-headers/patches/3.10.33/relocs.patch
+++ b/toolchain/kernel-headers/patches/3.10.34/relocs.patch
diff --git a/toolchain/kernel-headers/patches/3.10.33/sgidefs.patch b/toolchain/kernel-headers/patches/3.10.34/sgidefs.patch
index f00a284d9..f00a284d9 100644
--- a/toolchain/kernel-headers/patches/3.10.33/sgidefs.patch
+++ b/toolchain/kernel-headers/patches/3.10.34/sgidefs.patch
diff --git a/toolchain/kernel-headers/patches/3.10.33/sortext.patch b/toolchain/kernel-headers/patches/3.10.34/sortext.patch
index 65bbbb64b..65bbbb64b 100644
--- a/toolchain/kernel-headers/patches/3.10.33/sortext.patch
+++ b/toolchain/kernel-headers/patches/3.10.34/sortext.patch
diff --git a/toolchain/kernel-headers/patches/3.11.10/microperl.patch b/toolchain/kernel-headers/patches/3.11.10/microperl.patch
deleted file mode 100644
index 298d96593..000000000
--- a/toolchain/kernel-headers/patches/3.11.10/microperl.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff -Nur linux-3.11.5.orig/scripts/headers_check.pl linux-3.11.5/scripts/headers_check.pl
---- linux-3.11.5.orig/scripts/headers_check.pl 2013-10-14 03:14:45.000000000 +0200
-+++ linux-3.11.5/scripts/headers_check.pl 2013-10-16 17:08:59.000000000 +0200
-@@ -18,7 +18,7 @@
- #
- # 3) Check for leaked CONFIG_ symbols
-
--use strict;
-+#use strict;
- use File::Basename;
-
- my ($dir, $arch, @files) = @ARGV;
-
diff --git a/toolchain/kernel-headers/patches/3.12.13/microperl.patch b/toolchain/kernel-headers/patches/3.12.13/microperl.patch
deleted file mode 100644
index 298d96593..000000000
--- a/toolchain/kernel-headers/patches/3.12.13/microperl.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff -Nur linux-3.11.5.orig/scripts/headers_check.pl linux-3.11.5/scripts/headers_check.pl
---- linux-3.11.5.orig/scripts/headers_check.pl 2013-10-14 03:14:45.000000000 +0200
-+++ linux-3.11.5/scripts/headers_check.pl 2013-10-16 17:08:59.000000000 +0200
-@@ -18,7 +18,7 @@
- #
- # 3) Check for leaked CONFIG_ symbols
-
--use strict;
-+#use strict;
- use File::Basename;
-
- my ($dir, $arch, @files) = @ARGV;
-
diff --git a/toolchain/kernel-headers/patches/3.12.13/cleankernel.patch b/toolchain/kernel-headers/patches/3.12.14/cleankernel.patch
index d8c055dc3..d8c055dc3 100644
--- a/toolchain/kernel-headers/patches/3.12.13/cleankernel.patch
+++ b/toolchain/kernel-headers/patches/3.12.14/cleankernel.patch
diff --git a/toolchain/kernel-headers/patches/3.12.13/mkpiggy.patch b/toolchain/kernel-headers/patches/3.12.14/mkpiggy.patch
index d4e815cd2..d4e815cd2 100644
--- a/toolchain/kernel-headers/patches/3.12.13/mkpiggy.patch
+++ b/toolchain/kernel-headers/patches/3.12.14/mkpiggy.patch
diff --git a/toolchain/kernel-headers/patches/3.12.13/relocs.patch b/toolchain/kernel-headers/patches/3.12.14/relocs.patch
index 649b9e73e..649b9e73e 100644
--- a/toolchain/kernel-headers/patches/3.12.13/relocs.patch
+++ b/toolchain/kernel-headers/patches/3.12.14/relocs.patch
diff --git a/toolchain/kernel-headers/patches/3.12.13/sgidefs.patch b/toolchain/kernel-headers/patches/3.12.14/sgidefs.patch
index f00a284d9..f00a284d9 100644
--- a/toolchain/kernel-headers/patches/3.12.13/sgidefs.patch
+++ b/toolchain/kernel-headers/patches/3.12.14/sgidefs.patch
diff --git a/toolchain/kernel-headers/patches/3.12.13/sortext.patch b/toolchain/kernel-headers/patches/3.12.14/sortext.patch
index 8fd4e1d6b..8fd4e1d6b 100644
--- a/toolchain/kernel-headers/patches/3.12.13/sortext.patch
+++ b/toolchain/kernel-headers/patches/3.12.14/sortext.patch
diff --git a/toolchain/kernel-headers/patches/3.13.6/microperl.patch b/toolchain/kernel-headers/patches/3.13.6/microperl.patch
deleted file mode 100644
index 298d96593..000000000
--- a/toolchain/kernel-headers/patches/3.13.6/microperl.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff -Nur linux-3.11.5.orig/scripts/headers_check.pl linux-3.11.5/scripts/headers_check.pl
---- linux-3.11.5.orig/scripts/headers_check.pl 2013-10-14 03:14:45.000000000 +0200
-+++ linux-3.11.5/scripts/headers_check.pl 2013-10-16 17:08:59.000000000 +0200
-@@ -18,7 +18,7 @@
- #
- # 3) Check for leaked CONFIG_ symbols
-
--use strict;
-+#use strict;
- use File::Basename;
-
- my ($dir, $arch, @files) = @ARGV;
-
diff --git a/toolchain/kernel-headers/patches/3.13.6/cleankernel.patch b/toolchain/kernel-headers/patches/3.13.7/cleankernel.patch
index d8c055dc3..d8c055dc3 100644
--- a/toolchain/kernel-headers/patches/3.13.6/cleankernel.patch
+++ b/toolchain/kernel-headers/patches/3.13.7/cleankernel.patch
diff --git a/toolchain/kernel-headers/patches/3.13.6/mkpiggy.patch b/toolchain/kernel-headers/patches/3.13.7/mkpiggy.patch
index 751678b74..751678b74 100644
--- a/toolchain/kernel-headers/patches/3.13.6/mkpiggy.patch
+++ b/toolchain/kernel-headers/patches/3.13.7/mkpiggy.patch
diff --git a/toolchain/kernel-headers/patches/3.13.6/relocs.patch b/toolchain/kernel-headers/patches/3.13.7/relocs.patch
index 69a7c88a9..69a7c88a9 100644
--- a/toolchain/kernel-headers/patches/3.13.6/relocs.patch
+++ b/toolchain/kernel-headers/patches/3.13.7/relocs.patch
diff --git a/toolchain/kernel-headers/patches/3.13.6/sgidefs.patch b/toolchain/kernel-headers/patches/3.13.7/sgidefs.patch
index f00a284d9..f00a284d9 100644
--- a/toolchain/kernel-headers/patches/3.13.6/sgidefs.patch
+++ b/toolchain/kernel-headers/patches/3.13.7/sgidefs.patch
diff --git a/toolchain/kernel-headers/patches/3.13.6/sortext.patch b/toolchain/kernel-headers/patches/3.13.7/sortext.patch
index 8fd4e1d6b..8fd4e1d6b 100644
--- a/toolchain/kernel-headers/patches/3.13.6/sortext.patch
+++ b/toolchain/kernel-headers/patches/3.13.7/sortext.patch
diff --git a/toolchain/kernel-headers/patches/3.4.82/microperl.patch b/toolchain/kernel-headers/patches/3.4.82/microperl.patch
deleted file mode 100644
index 44c39f6e8..000000000
--- a/toolchain/kernel-headers/patches/3.4.82/microperl.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff -Nur linux-3.4.2.orig/scripts/headers_check.pl linux-3.4.2/scripts/headers_check.pl
---- linux-3.4.2.orig/scripts/headers_check.pl 2012-06-09 17:36:33.000000000 +0200
-+++ linux-3.4.2/scripts/headers_check.pl 2012-06-15 12:45:43.000000000 +0200
-@@ -18,7 +18,7 @@
- #
- # 3) Check for leaked CONFIG_ symbols
-
--use strict;
-+#use strict;
- use File::Basename;
-
- my ($dir, $arch, @files) = @ARGV;
-diff -Nur linux-3.4.2.orig/scripts/headers_install.pl linux-3.4.2/scripts/headers_install.pl
---- linux-3.4.2.orig/scripts/headers_install.pl 2012-06-09 17:36:33.000000000 +0200
-+++ linux-3.4.2/scripts/headers_install.pl 2012-06-15 12:45:11.000000000 +0200
-@@ -16,7 +16,7 @@
- # 2) Drop include of compiler.h
- # 3) Drop all sections defined out by __KERNEL__ (using unifdef)
-
--use strict;
-+#use strict;
-
- my ($readdir, $installdir, $arch, @files) = @ARGV;
-
diff --git a/toolchain/kernel-headers/patches/3.4.82/aufs2.patch b/toolchain/kernel-headers/patches/3.4.84/aufs2.patch
index d40c9a3fe..d40c9a3fe 100644
--- a/toolchain/kernel-headers/patches/3.4.82/aufs2.patch
+++ b/toolchain/kernel-headers/patches/3.4.84/aufs2.patch
diff --git a/toolchain/kernel-headers/patches/3.4.82/linux-gcc-check.patch b/toolchain/kernel-headers/patches/3.4.84/linux-gcc-check.patch
index 7cc381845..7cc381845 100644
--- a/toolchain/kernel-headers/patches/3.4.82/linux-gcc-check.patch
+++ b/toolchain/kernel-headers/patches/3.4.84/linux-gcc-check.patch
diff --git a/toolchain/kernel-headers/patches/3.4.82/mkpiggy.patch b/toolchain/kernel-headers/patches/3.4.84/mkpiggy.patch
index d4e815cd2..d4e815cd2 100644
--- a/toolchain/kernel-headers/patches/3.4.82/mkpiggy.patch
+++ b/toolchain/kernel-headers/patches/3.4.84/mkpiggy.patch
diff --git a/toolchain/kernel-headers/patches/3.4.82/relocs.patch b/toolchain/kernel-headers/patches/3.4.84/relocs.patch
index 43c5bb580..43c5bb580 100644
--- a/toolchain/kernel-headers/patches/3.4.82/relocs.patch
+++ b/toolchain/kernel-headers/patches/3.4.84/relocs.patch
diff --git a/toolchain/musl/Makefile b/toolchain/musl/Makefile
index f13a2613d..7b0eeb104 100644
--- a/toolchain/musl/Makefile
+++ b/toolchain/musl/Makefile
@@ -9,15 +9,10 @@ include ${TOPDIR}/mk/buildhlp.mk
ifeq ($(CPU_ARCH),ppc)
GNU_TARGET_NAME:= $(subst ppc,powerpc,$(GNU_TARGET_NAME))
endif
-ifeq ($(CPU_ARCH),mips64el)
-GNU_TARGET_NAME:= $(subst mips64el,mips,$(GNU_TARGET_NAME))
-endif
-ifeq ($(CPU_ARCH),mips64)
-GNU_TARGET_NAME:= $(subst mips64,mips,$(GNU_TARGET_NAME))
-endif
$(WRKBUILD)/.headers:
(cd $(WRKBUILD); CC='$(TARGET_CC)' CROSS_COMPILE='$(TARGET_CROSS)' \
+ CFLAGS='$(TARGET_CFLAGS)' \
./configure --prefix=/usr \
--target=$(GNU_TARGET_NAME) \
--disable-gcc-wrapper \
@@ -28,29 +23,31 @@ $(WRKBUILD)/.headers:
$(WRKBUILD)/.compiled:
# reconfigure musl, otherwise linking with libgcc or libgcc_eh is disabled
- $(MAKE) CFLAGS='$(TARGET_CFLAGS)' -C $(WRKBUILD) clean
+ $(MAKE) -C $(WRKBUILD) clean
(cd $(WRKBUILD); CC='$(TARGET_CC)' CROSS_COMPILE='$(TARGET_CROSS)' \
+ CFLAGS='$(TARGET_CFLAGS)' \
./configure --prefix=/usr \
--target=$(GNU_TARGET_NAME) \
--disable-gcc-wrapper \
)
- $(MAKE) CFLAGS='$(TARGET_CFLAGS)' -C $(WRKBUILD) all
+ $(MAKE) -C $(WRKBUILD) CFLAGS='$(TARGET_CFLAGS)' all
touch $@
$(WRKBUILD)/.installed: $(WRKBUILD)/.compiled
- $(MAKE) -C $(WRKBUILD) DESTDIR=$(STAGING_TARGET_DIR) install
+ $(MAKE) -C $(WRKBUILD) CFLAGS='$(TARGET_CFLAGS)' DESTDIR=$(STAGING_TARGET_DIR) install
touch $@
$(WRKBUILD)/.fixup:
# reconfigure musl, otherwise linking with libgcc or libgcc_eh is disabled
- $(MAKE) CFLAGS='$(TARGET_CFLAGS)' -C $(WRKBUILD) clean
+ $(MAKE) -C $(WRKBUILD) clean
(cd $(WRKBUILD); CC='$(TARGET_CC)' CROSS_COMPILE='$(TARGET_CROSS)' \
+ CFLAGS='$(TARGET_CFLAGS)' \
./configure --prefix=/usr \
--target=$(GNU_TARGET_NAME) \
--disable-gcc-wrapper \
)
- $(MAKE) CFLAGS='$(TARGET_CFLAGS)' -C $(WRKBUILD) all
- $(MAKE) -C $(WRKBUILD) DESTDIR=$(STAGING_TARGET_DIR) install
+ $(MAKE) -C $(WRKBUILD) CFLAGS='$(TARGET_CFLAGS)' all
+ $(MAKE) -C $(WRKBUILD) CFLAGS='$(TARGET_CFLAGS)' DESTDIR=$(STAGING_TARGET_DIR) install
# cleanup toolchain
-find $(STAGING_TARGET_DIR) $(STAGING_HOST_DIR) -name \*.la -delete
ifeq ($(ADK_TOOLCHAIN),y)
diff --git a/toolchain/musl/Makefile.inc b/toolchain/musl/Makefile.inc
index 506280532..40cf4fcf0 100644
--- a/toolchain/musl/Makefile.inc
+++ b/toolchain/musl/Makefile.inc
@@ -2,8 +2,7 @@
# material, please see the LICENCE file in the top-level directory.
PKG_NAME:= musl
-PKG_VERSION:= 0.9.15
+PKG_VERSION:= 1.0.0
PKG_RELEASE:= 1
-PKG_MD5SUM:= 06f590a38c85722ee9343db2416425f4
+PKG_MD5SUM:= e54664fdf211d27737e328c4462b545e
PKG_SITES:= http://www.musl-libc.org/releases/
-DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tar.gz
diff --git a/toolchain/musl/patches/musl-git-20140319.patch b/toolchain/musl/patches/musl-git-20140319.patch
deleted file mode 100644
index f319d904a..000000000
--- a/toolchain/musl/patches/musl-git-20140319.patch
+++ /dev/null
@@ -1,8864 +0,0 @@
-diff -Nur musl-0.9.15/arch/arm/bits/sem.h musl-git/arch/arm/bits/sem.h
---- musl-0.9.15/arch/arm/bits/sem.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/arm/bits/sem.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,16 @@
-+struct semid_ds {
-+ struct ipc_perm sem_perm;
-+ time_t sem_otime;
-+ time_t __unused1;
-+ time_t sem_ctime;
-+ time_t __unused2;
-+#if __BYTE_ORDER == __LITTLE_ENDIAN
-+ unsigned short sem_nsems;
-+ char __sem_nsems_pad[sizeof(time_t)-sizeof(short)];
-+#else
-+ char __sem_nsems_pad[sizeof(time_t)-sizeof(short)];
-+ unsigned short sem_nsems;
-+#endif
-+ time_t __unused3;
-+ time_t __unused4;
-+};
-diff -Nur musl-0.9.15/arch/arm/bits/shm.h musl-git/arch/arm/bits/shm.h
---- musl-0.9.15/arch/arm/bits/shm.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/arch/arm/bits/shm.h 2014-03-19 07:42:48.000000000 +0100
-@@ -16,3 +16,14 @@
- unsigned long __pad1;
- unsigned long __pad2;
- };
-+
-+struct shminfo {
-+ unsigned long shmmax, shmmin, shmmni, shmseg, shmall, __unused[4];
-+};
-+
-+struct shm_info {
-+ int __used_ids;
-+ unsigned long shm_tot, shm_rss, shm_swp;
-+ unsigned long __swap_attempts, __swap_successes;
-+};
-+
-diff -Nur musl-0.9.15/arch/arm/bits/signal.h musl-git/arch/arm/bits/signal.h
---- musl-0.9.15/arch/arm/bits/signal.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/arch/arm/bits/signal.h 2014-03-19 07:42:48.000000000 +0100
-@@ -18,6 +18,12 @@
- } mcontext_t;
- #endif
-
-+struct sigaltstack {
-+ void *ss_sp;
-+ int ss_flags;
-+ size_t ss_size;
-+};
-+
- typedef struct __ucontext {
- unsigned long uc_flags;
- struct __ucontext *uc_link;
-diff -Nur musl-0.9.15/arch/arm/bits/termios.h musl-git/arch/arm/bits/termios.h
---- musl-0.9.15/arch/arm/bits/termios.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/arch/arm/bits/termios.h 2014-03-19 07:42:48.000000000 +0100
-@@ -42,6 +42,7 @@
- #define IXANY 0004000
- #define IXOFF 0010000
- #define IMAXBEL 0020000
-+#define IUTF8 0040000
-
- #define OPOST 0000001
- #define OLCUC 0000002
-@@ -75,9 +76,6 @@
- #define VT0 0000000
- #define VT1 0040000
-
--/* ?? */
--#define XTABS 0014000
--
- #define B0 0000000
- #define B50 0000001
- #define B75 0000002
-@@ -125,8 +123,6 @@
- #define HUPCL 0002000
- #define CLOCAL 0004000
-
--#define CRTSCTS 020000000000
--
- #define ISIG 0000001
- #define ICANON 0000002
- #define ECHO 0000010
-@@ -137,14 +133,11 @@
- #define TOSTOP 0000400
- #define IEXTEN 0100000
-
--/* Extensions? */
--#define CBAUDEX 0010000
- #define ECHOCTL 0001000
- #define ECHOPRT 0002000
- #define ECHOKE 0004000
- #define FLUSHO 0010000
- #define PENDIN 0040000
--#define EXTPROC 0200000
-
- #define TCOOFF 0
- #define TCOON 1
-@@ -158,3 +151,10 @@
- #define TCSANOW 0
- #define TCSADRAIN 1
- #define TCSAFLUSH 2
-+
-+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-+#define CBAUDEX 0010000
-+#define CRTSCTS 020000000000
-+#define EXTPROC 0200000
-+#define XTABS 0014000
-+#endif
-diff -Nur musl-0.9.15/arch/arm/syscall_arch.h musl-git/arch/arm/syscall_arch.h
---- musl-0.9.15/arch/arm/syscall_arch.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/arch/arm/syscall_arch.h 2014-03-19 07:42:48.000000000 +0100
-@@ -3,6 +3,8 @@
- ((union { long long ll; long l[2]; }){ .ll = x }).l[1]
- #define __SYSCALL_LL_O(x) 0, __SYSCALL_LL_E((x))
-
-+long (__syscall)(long, ...);
-+
- #ifndef __clang__
-
- #define __asm_syscall(...) do { \
-diff -Nur musl-0.9.15/arch/i386/bits/sem.h musl-git/arch/i386/bits/sem.h
---- musl-0.9.15/arch/i386/bits/sem.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/i386/bits/sem.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,16 @@
-+struct semid_ds {
-+ struct ipc_perm sem_perm;
-+ time_t sem_otime;
-+ time_t __unused1;
-+ time_t sem_ctime;
-+ time_t __unused2;
-+#if __BYTE_ORDER == __LITTLE_ENDIAN
-+ unsigned short sem_nsems;
-+ char __sem_nsems_pad[sizeof(time_t)-sizeof(short)];
-+#else
-+ char __sem_nsems_pad[sizeof(time_t)-sizeof(short)];
-+ unsigned short sem_nsems;
-+#endif
-+ time_t __unused3;
-+ time_t __unused4;
-+};
-diff -Nur musl-0.9.15/arch/i386/bits/shm.h musl-git/arch/i386/bits/shm.h
---- musl-0.9.15/arch/i386/bits/shm.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/arch/i386/bits/shm.h 2014-03-19 07:42:48.000000000 +0100
-@@ -16,3 +16,14 @@
- unsigned long __pad1;
- unsigned long __pad2;
- };
-+
-+struct shminfo {
-+ unsigned long shmmax, shmmin, shmmni, shmseg, shmall, __unused[4];
-+};
-+
-+struct shm_info {
-+ int __used_ids;
-+ unsigned long shm_tot, shm_rss, shm_swp;
-+ unsigned long __swap_attempts, __swap_successes;
-+};
-+
-diff -Nur musl-0.9.15/arch/i386/bits/signal.h musl-git/arch/i386/bits/signal.h
---- musl-0.9.15/arch/i386/bits/signal.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/arch/i386/bits/signal.h 2014-03-19 07:42:48.000000000 +0100
-@@ -53,6 +53,12 @@
- } mcontext_t;
- #endif
-
-+struct sigaltstack {
-+ void *ss_sp;
-+ int ss_flags;
-+ size_t ss_size;
-+};
-+
- typedef struct __ucontext {
- unsigned long uc_flags;
- struct __ucontext *uc_link;
-diff -Nur musl-0.9.15/arch/i386/bits/termios.h musl-git/arch/i386/bits/termios.h
---- musl-0.9.15/arch/i386/bits/termios.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/arch/i386/bits/termios.h 2014-03-19 07:42:48.000000000 +0100
-@@ -42,6 +42,7 @@
- #define IXANY 0004000
- #define IXOFF 0010000
- #define IMAXBEL 0020000
-+#define IUTF8 0040000
-
- #define OPOST 0000001
- #define OLCUC 0000002
-@@ -75,9 +76,6 @@
- #define VT0 0000000
- #define VT1 0040000
-
--/* ?? */
--#define XTABS 0014000
--
- #define B0 0000000
- #define B50 0000001
- #define B75 0000002
-@@ -125,8 +123,6 @@
- #define HUPCL 0002000
- #define CLOCAL 0004000
-
--#define CRTSCTS 020000000000
--
- #define ISIG 0000001
- #define ICANON 0000002
- #define ECHO 0000010
-@@ -137,14 +133,11 @@
- #define TOSTOP 0000400
- #define IEXTEN 0100000
-
--/* Extensions? */
--#define CBAUDEX 0010000
- #define ECHOCTL 0001000
- #define ECHOPRT 0002000
- #define ECHOKE 0004000
- #define FLUSHO 0010000
- #define PENDIN 0040000
--#define EXTPROC 0200000
-
- #define TCOOFF 0
- #define TCOON 1
-@@ -158,3 +151,10 @@
- #define TCSANOW 0
- #define TCSADRAIN 1
- #define TCSAFLUSH 2
-+
-+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-+#define CBAUDEX 0010000
-+#define CRTSCTS 020000000000
-+#define EXTPROC 0200000
-+#define XTABS 0014000
-+#endif
-diff -Nur musl-0.9.15/arch/microblaze/bits/sem.h musl-git/arch/microblaze/bits/sem.h
---- musl-0.9.15/arch/microblaze/bits/sem.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/microblaze/bits/sem.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,16 @@
-+struct semid_ds {
-+ struct ipc_perm sem_perm;
-+ time_t sem_otime;
-+ time_t __unused1;
-+ time_t sem_ctime;
-+ time_t __unused2;
-+#if __BYTE_ORDER == __LITTLE_ENDIAN
-+ unsigned short sem_nsems;
-+ char __sem_nsems_pad[sizeof(time_t)-sizeof(short)];
-+#else
-+ char __sem_nsems_pad[sizeof(time_t)-sizeof(short)];
-+ unsigned short sem_nsems;
-+#endif
-+ time_t __unused3;
-+ time_t __unused4;
-+};
-diff -Nur musl-0.9.15/arch/microblaze/bits/shm.h musl-git/arch/microblaze/bits/shm.h
---- musl-0.9.15/arch/microblaze/bits/shm.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/arch/microblaze/bits/shm.h 2014-03-19 07:42:48.000000000 +0100
-@@ -16,3 +16,14 @@
- unsigned long __pad1;
- unsigned long __pad2;
- };
-+
-+struct shminfo {
-+ unsigned long shmmax, shmmin, shmmni, shmseg, shmall, __unused[4];
-+};
-+
-+struct shm_info {
-+ int __used_ids;
-+ unsigned long shm_tot, shm_rss, shm_swp;
-+ unsigned long __swap_attempts, __swap_successes;
-+};
-+
-diff -Nur musl-0.9.15/arch/microblaze/bits/signal.h musl-git/arch/microblaze/bits/signal.h
---- musl-0.9.15/arch/microblaze/bits/signal.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/arch/microblaze/bits/signal.h 2014-03-19 07:42:48.000000000 +0100
-@@ -21,6 +21,12 @@
- } mcontext_t;
- #endif
-
-+struct sigaltstack {
-+ void *ss_sp;
-+ int ss_flags;
-+ size_t ss_size;
-+};
-+
- typedef struct __ucontext {
- unsigned long uc_flags;
- struct __ucontext *uc_link;
-diff -Nur musl-0.9.15/arch/microblaze/bits/termios.h musl-git/arch/microblaze/bits/termios.h
---- musl-0.9.15/arch/microblaze/bits/termios.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/arch/microblaze/bits/termios.h 2014-03-19 07:42:48.000000000 +0100
-@@ -42,6 +42,7 @@
- #define IXANY 0004000
- #define IXOFF 0010000
- #define IMAXBEL 0020000
-+#define IUTF8 0040000
-
- #define OPOST 0000001
- #define OLCUC 0000002
-@@ -75,9 +76,6 @@
- #define VT0 0000000
- #define VT1 0040000
-
--/* ?? */
--#define XTABS 0014000
--
- #define B0 0000000
- #define B50 0000001
- #define B75 0000002
-@@ -125,8 +123,6 @@
- #define HUPCL 0002000
- #define CLOCAL 0004000
-
--#define CRTSCTS 020000000000
--
- #define ISIG 0000001
- #define ICANON 0000002
- #define ECHO 0000010
-@@ -137,14 +133,11 @@
- #define TOSTOP 0000400
- #define IEXTEN 0100000
-
--/* Extensions? */
--#define CBAUDEX 0010000
- #define ECHOCTL 0001000
- #define ECHOPRT 0002000
- #define ECHOKE 0004000
- #define FLUSHO 0010000
- #define PENDIN 0040000
--#define EXTPROC 0200000
-
- #define TCOOFF 0
- #define TCOON 1
-@@ -158,3 +151,10 @@
- #define TCSANOW 0
- #define TCSADRAIN 1
- #define TCSAFLUSH 2
-+
-+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-+#define CBAUDEX 0010000
-+#define CRTSCTS 020000000000
-+#define EXTPROC 0200000
-+#define XTABS 0014000
-+#endif
-diff -Nur musl-0.9.15/arch/microblaze/syscall_arch.h musl-git/arch/microblaze/syscall_arch.h
---- musl-0.9.15/arch/microblaze/syscall_arch.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/arch/microblaze/syscall_arch.h 2014-03-19 07:42:48.000000000 +0100
-@@ -3,6 +3,8 @@
- ((union { long long ll; long l[2]; }){ .ll = x }).l[1]
- #define __SYSCALL_LL_O(x) 0, __SYSCALL_LL_E((x))
-
-+long (__syscall)(long, ...);
-+
- #ifndef __clang__
-
- static __inline long __syscall0(long n)
-diff -Nur musl-0.9.15/arch/mips/bits/fenv.h musl-git/arch/mips/bits/fenv.h
---- musl-0.9.15/arch/mips/bits/fenv.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/arch/mips/bits/fenv.h 2014-03-19 07:42:48.000000000 +0100
-@@ -1,3 +1,7 @@
-+#ifdef __mips_soft_float
-+#define FE_ALL_EXCEPT 0
-+#define FE_TONEAREST 0
-+#else
- #define FE_INEXACT 4
- #define FE_UNDERFLOW 8
- #define FE_OVERFLOW 16
-@@ -10,6 +14,7 @@
- #define FE_TOWARDZERO 1
- #define FE_UPWARD 2
- #define FE_DOWNWARD 3
-+#endif
-
- typedef unsigned short fexcept_t;
-
-diff -Nur musl-0.9.15/arch/mips/bits/sem.h musl-git/arch/mips/bits/sem.h
---- musl-0.9.15/arch/mips/bits/sem.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/mips/bits/sem.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,14 @@
-+struct semid_ds {
-+ struct ipc_perm sem_perm;
-+ time_t sem_otime;
-+ time_t sem_ctime;
-+#if __BYTE_ORDER == __LITTLE_ENDIAN
-+ unsigned short sem_nsems;
-+ char __sem_nsems_pad[sizeof(time_t)-sizeof(short)];
-+#else
-+ char __sem_nsems_pad[sizeof(time_t)-sizeof(short)];
-+ unsigned short sem_nsems;
-+#endif
-+ time_t __unused3;
-+ time_t __unused4;
-+};
-diff -Nur musl-0.9.15/arch/mips/bits/setjmp.h musl-git/arch/mips/bits/setjmp.h
---- musl-0.9.15/arch/mips/bits/setjmp.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/arch/mips/bits/setjmp.h 2014-03-19 07:42:48.000000000 +0100
-@@ -1 +1 @@
--typedef unsigned long long __jmp_buf[15];
-+typedef unsigned long long __jmp_buf[13];
-diff -Nur musl-0.9.15/arch/mips/bits/shm.h musl-git/arch/mips/bits/shm.h
---- musl-0.9.15/arch/mips/bits/shm.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/arch/mips/bits/shm.h 2014-03-19 07:42:48.000000000 +0100
-@@ -13,3 +13,14 @@
- unsigned long __pad1;
- unsigned long __pad2;
- };
-+
-+struct shminfo {
-+ unsigned long shmmax, shmmin, shmmni, shmseg, shmall, __unused[4];
-+};
-+
-+struct shm_info {
-+ int __used_ids;
-+ unsigned long shm_tot, shm_rss, shm_swp;
-+ unsigned long __swap_attempts, __swap_successes;
-+};
-+
-diff -Nur musl-0.9.15/arch/mips/bits/signal.h musl-git/arch/mips/bits/signal.h
---- musl-0.9.15/arch/mips/bits/signal.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/arch/mips/bits/signal.h 2014-03-19 07:42:48.000000000 +0100
-@@ -38,13 +38,18 @@
- } mcontext_t;
- #endif
-
-+struct sigaltstack {
-+ void *ss_sp;
-+ size_t ss_size;
-+ int ss_flags;
-+};
-+
- typedef struct __ucontext {
- unsigned long uc_flags;
- struct __ucontext *uc_link;
- stack_t uc_stack;
- mcontext_t uc_mcontext;
- sigset_t uc_sigmask;
-- unsigned long uc_regspace[128];
- } ucontext_t;
-
- #define SA_NOCLDSTOP 1
-diff -Nur musl-0.9.15/arch/mips/bits/statfs.h musl-git/arch/mips/bits/statfs.h
---- musl-0.9.15/arch/mips/bits/statfs.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/arch/mips/bits/statfs.h 2014-03-19 07:42:48.000000000 +0100
-@@ -1,7 +1,8 @@
- struct statfs {
-- unsigned long f_type, f_bsize;
-- fsblkcnt_t f_blocks, f_bfree, f_bavail;
-+ unsigned long f_type, f_bsize, f_frsize;
-+ fsblkcnt_t f_blocks, f_bfree;
- fsfilcnt_t f_files, f_ffree;
-+ fsblkcnt_t f_bavail;
- fsid_t f_fsid;
-- unsigned long f_namelen, f_frsize, f_flags, f_spare[4];
-+ unsigned long f_namelen, f_flags, f_spare[5];
- };
-diff -Nur musl-0.9.15/arch/mips/bits/termios.h musl-git/arch/mips/bits/termios.h
---- musl-0.9.15/arch/mips/bits/termios.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/arch/mips/bits/termios.h 2014-03-19 07:42:48.000000000 +0100
-@@ -77,9 +77,6 @@
- #define VT0 0000000
- #define VT1 0040000
-
--/* ?? */
--#define XTABS 0014000
--
- #define B0 0000000
- #define B50 0000001
- #define B75 0000002
-@@ -129,12 +126,6 @@
- #define PARODD 0001000
- #define HUPCL 0002000
- #define CLOCAL 0004000
--#define CBAUDEX 0010000
--
--#define CIBAUD 002003600000
--#define CMSPAR 010000000000
--#define CRTSCTS 020000000000
--#define IBSHIFT 16
-
- #define ISIG 0000001
- #define ICANON 0000002
-@@ -152,9 +143,6 @@
- #define PENDIN 0040000
- #define TOSTOP 0100000
- #define ITOSTOP 0100000
--#define EXTPROC 0200000
--
--#define TIOCSER_TEMT 1
-
- #define TCOOFF 0
- #define TCOON 1
-@@ -168,3 +156,14 @@
- #define TCSANOW 0
- #define TCSADRAIN 1
- #define TCSAFLUSH 2
-+
-+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-+#define CBAUDEX 0010000
-+#define CIBAUD 002003600000
-+#define IBSHIFT 16
-+#define CMSPAR 010000000000
-+#define CRTSCTS 020000000000
-+#define EXTPROC 0200000
-+#define XTABS 0014000
-+#define TIOCSER_TEMT 1
-+#endif
-diff -Nur musl-0.9.15/arch/mips/reloc.h musl-git/arch/mips/reloc.h
---- musl-0.9.15/arch/mips/reloc.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/arch/mips/reloc.h 2014-03-19 07:42:48.000000000 +0100
-@@ -8,7 +8,13 @@
- #define ENDIAN_SUFFIX ""
- #endif
-
--#define LDSO_ARCH "mips" ENDIAN_SUFFIX
-+#ifdef __mips_soft_float
-+#define FP_SUFFIX "-sf"
-+#else
-+#define FP_SUFFIX ""
-+#endif
-+
-+#define LDSO_ARCH "mips" ENDIAN_SUFFIX FP_SUFFIX
-
- #define IS_COPY(x) ((x)==R_MIPS_COPY)
- #define IS_PLT(x) 1
-diff -Nur musl-0.9.15/arch/mips/syscall_arch.h musl-git/arch/mips/syscall_arch.h
---- musl-0.9.15/arch/mips/syscall_arch.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/arch/mips/syscall_arch.h 2014-03-19 07:42:48.000000000 +0100
-@@ -3,6 +3,8 @@
- ((union { long long ll; long l[2]; }){ .ll = x }).l[1]
- #define __SYSCALL_LL_O(x) 0, __SYSCALL_LL_E((x))
-
-+long (__syscall)(long, ...);
-+
- #ifndef __clang__
-
- #define __asm_syscall(...) do { \
-diff -Nur musl-0.9.15/arch/powerpc/bits/ipc.h musl-git/arch/powerpc/bits/ipc.h
---- musl-0.9.15/arch/powerpc/bits/ipc.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/arch/powerpc/bits/ipc.h 2014-03-19 07:42:48.000000000 +0100
-@@ -7,8 +7,9 @@
- gid_t cgid;
- mode_t mode;
- int __ipc_perm_seq;
-- long __pad1;
-- long __pad2;
-+ int __pad1;
-+ long long __pad2;
-+ long long __pad3;
- };
-
- #define IPC_64 0x100
-diff -Nur musl-0.9.15/arch/powerpc/bits/msg.h musl-git/arch/powerpc/bits/msg.h
---- musl-0.9.15/arch/powerpc/bits/msg.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/arch/powerpc/bits/msg.h 2014-03-19 07:42:48.000000000 +0100
-@@ -1,12 +1,12 @@
- struct msqid_ds
- {
- struct ipc_perm msg_perm;
-- time_t msg_stime;
- int __unused1;
-- time_t msg_rtime;
-+ time_t msg_stime;
- int __unused2;
-- time_t msg_ctime;
-+ time_t msg_rtime;
- int __unused3;
-+ time_t msg_ctime;
- unsigned long msg_cbytes;
- msgqnum_t msg_qnum;
- msglen_t msg_qbytes;
-diff -Nur musl-0.9.15/arch/powerpc/bits/sem.h musl-git/arch/powerpc/bits/sem.h
---- musl-0.9.15/arch/powerpc/bits/sem.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/powerpc/bits/sem.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,10 @@
-+struct semid_ds {
-+ struct ipc_perm sem_perm;
-+ int __unused1;
-+ time_t sem_otime;
-+ int __unused2;
-+ time_t sem_ctime;
-+ unsigned short __sem_nsems_pad, sem_nsems;
-+ long __unused3;
-+ long __unused4;
-+};
-diff -Nur musl-0.9.15/arch/powerpc/bits/shm.h musl-git/arch/powerpc/bits/shm.h
---- musl-0.9.15/arch/powerpc/bits/shm.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/arch/powerpc/bits/shm.h 2014-03-19 07:42:48.000000000 +0100
-@@ -3,16 +3,28 @@
- struct shmid_ds
- {
- struct ipc_perm shm_perm;
-- size_t shm_segsz;
-- time_t shm_atime;
- int __unused1;
-- time_t shm_dtime;
-+ time_t shm_atime;
- int __unused2;
-- time_t shm_ctime;
-+ time_t shm_dtime;
- int __unused3;
-+ time_t shm_ctime;
-+ int __unused4;
-+ size_t shm_segsz;
- pid_t shm_cpid;
- pid_t shm_lpid;
- unsigned long shm_nattch;
- unsigned long __pad1;
- unsigned long __pad2;
- };
-+
-+struct shminfo {
-+ unsigned long shmmax, shmmin, shmmni, shmseg, shmall, __unused[4];
-+};
-+
-+struct shm_info {
-+ int __used_ids;
-+ unsigned long shm_tot, shm_rss, shm_swp;
-+ unsigned long __swap_attempts, __swap_successes;
-+};
-+
-diff -Nur musl-0.9.15/arch/powerpc/bits/signal.h musl-git/arch/powerpc/bits/signal.h
---- musl-0.9.15/arch/powerpc/bits/signal.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/arch/powerpc/bits/signal.h 2014-03-19 07:42:48.000000000 +0100
-@@ -49,6 +49,12 @@
-
- #endif
-
-+struct sigaltstack {
-+ void *ss_sp;
-+ int ss_flags;
-+ size_t ss_size;
-+};
-+
- typedef struct __ucontext {
- unsigned long uc_flags;
- struct __ucontext *uc_link;
-diff -Nur musl-0.9.15/arch/powerpc/bits/socket.h musl-git/arch/powerpc/bits/socket.h
---- musl-0.9.15/arch/powerpc/bits/socket.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/arch/powerpc/bits/socket.h 2014-03-19 07:42:48.000000000 +0100
-@@ -1,12 +1,12 @@
- struct msghdr
- {
- void *msg_name;
-- int msg_namelen;
-+ socklen_t msg_namelen;
- struct iovec *msg_iov;
-- unsigned long msg_iovlen;
-+ int msg_iovlen;
- void *msg_control;
-- unsigned long msg_controllen;
-- unsigned msg_flags;
-+ socklen_t msg_controllen;
-+ int msg_flags;
- };
-
- struct cmsghdr
-diff -Nur musl-0.9.15/arch/powerpc/bits/termios.h musl-git/arch/powerpc/bits/termios.h
---- musl-0.9.15/arch/powerpc/bits/termios.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/arch/powerpc/bits/termios.h 2014-03-19 07:42:48.000000000 +0100
-@@ -66,7 +66,6 @@
- #define TAB1 00002000
- #define TAB2 00004000
- #define TAB3 00006000
--#define XTABS 00006000
- #define CRDLY 00030000
- #define CR0 00000000
- #define CR1 00010000
-@@ -101,7 +100,6 @@
- #define B38400 0000017
- #define EXTA B19200
- #define EXTB B38400
--#define CBAUDEX 0000000
- #define B57600 00020
- #define B115200 00021
- #define B230400 00022
-@@ -120,9 +118,6 @@
- #define B4000000 00036
- #define BOTHER 00037
-
--#define CIBAUD 077600000
--#define IBSHIFT 16
--
- #define CSIZE 00001400
- #define CS5 00000000
- #define CS6 00000400
-@@ -136,8 +131,6 @@
- #define HUPCL 00040000
-
- #define CLOCAL 00100000
--#define CMSPAR 010000000000
--#define CRTSCTS 020000000000
-
- #define ISIG 0x00000080
- #define ICANON 0x00000100
-@@ -154,7 +147,6 @@
- #define FLUSHO 0x00800000
- #define PENDIN 0x20000000
- #define IEXTEN 0x00000400
--#define EXTPROC 0x10000000
-
- #define TCOOFF 0
- #define TCOON 1
-@@ -168,3 +160,13 @@
- #define TCSANOW 0
- #define TCSADRAIN 1
- #define TCSAFLUSH 2
-+
-+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-+#define CBAUDEX 0000000
-+#define CIBAUD 077600000
-+#define IBSHIFT 16
-+#define CMSPAR 010000000000
-+#define CRTSCTS 020000000000
-+#define EXTPROC 0x10000000
-+#define XTABS 00006000
-+#endif
-diff -Nur musl-0.9.15/arch/sh/atomic.h musl-git/arch/sh/atomic.h
---- musl-0.9.15/arch/sh/atomic.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/sh/atomic.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,87 @@
-+#ifndef _INTERNAL_ATOMIC_H
-+#define _INTERNAL_ATOMIC_H
-+
-+#include <stdint.h>
-+
-+static inline int a_ctz_l(unsigned long x)
-+{
-+ static const char debruijn32[32] = {
-+ 0, 1, 23, 2, 29, 24, 19, 3, 30, 27, 25, 11, 20, 8, 4, 13,
-+ 31, 22, 28, 18, 26, 10, 7, 12, 21, 17, 9, 6, 16, 5, 15, 14
-+ };
-+ return debruijn32[(x&-x)*0x076be629 >> 27];
-+}
-+
-+static inline int a_ctz_64(uint64_t x)
-+{
-+ uint32_t y = x;
-+ if (!y) {
-+ y = x>>32;
-+ return 32 + a_ctz_l(y);
-+ }
-+ return a_ctz_l(y);
-+}
-+
-+int __sh_cas(volatile int *, int, int);
-+int __sh_swap(volatile int *, int);
-+int __sh_fetch_add(volatile int *, int);
-+void __sh_store(volatile int *, int);
-+void __sh_and(volatile int *, int);
-+void __sh_or(volatile int *, int);
-+
-+#define a_cas(p,t,s) __sh_cas(p,t,s)
-+#define a_swap(x,v) __sh_swap(x,v)
-+#define a_fetch_add(x,v) __sh_fetch_add(x, v)
-+#define a_store(x,v) __sh_store(x, v)
-+#define a_and(x,v) __sh_and(x, v)
-+#define a_or(x,v) __sh_or(x, v)
-+
-+static inline void *a_cas_p(volatile void *p, void *t, void *s)
-+{
-+ return (void *)a_cas(p, (int)t, (int)s);
-+}
-+
-+static inline long a_cas_l(volatile void *p, long t, long s)
-+{
-+ return a_cas(p, t, s);
-+}
-+
-+static inline void a_inc(volatile int *x)
-+{
-+ a_fetch_add(x, 1);
-+}
-+
-+static inline void a_dec(volatile int *x)
-+{
-+ a_fetch_add(x, -1);
-+}
-+
-+static inline void a_spin()
-+{
-+}
-+
-+static inline void a_crash()
-+{
-+ *(volatile char *)0=0;
-+}
-+
-+static inline void a_or_l(volatile void *p, long v)
-+{
-+ a_or(p, v);
-+}
-+
-+static inline void a_and_64(volatile uint64_t *p, uint64_t v)
-+{
-+ union { uint64_t v; uint32_t r[2]; } u = { v };
-+ a_and((int *)p, u.r[0]);
-+ a_and((int *)p+1, u.r[1]);
-+}
-+
-+static inline void a_or_64(volatile uint64_t *p, uint64_t v)
-+{
-+ union { uint64_t v; uint32_t r[2]; } u = { v };
-+ a_or((int *)p, u.r[0]);
-+ a_or((int *)p+1, u.r[1]);
-+}
-+
-+#endif
-diff -Nur musl-0.9.15/arch/sh/bits/alltypes.h.in musl-git/arch/sh/bits/alltypes.h.in
---- musl-0.9.15/arch/sh/bits/alltypes.h.in 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/sh/bits/alltypes.h.in 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,23 @@
-+#define _Addr int
-+#define _Int64 long long
-+#define _Reg int
-+
-+TYPEDEF __builtin_va_list va_list;
-+TYPEDEF __builtin_va_list __isoc_va_list;
-+
-+#ifndef __cplusplus
-+TYPEDEF long wchar_t;
-+#endif
-+TYPEDEF unsigned wint_t;
-+
-+TYPEDEF float float_t;
-+TYPEDEF double double_t;
-+
-+TYPEDEF long time_t;
-+TYPEDEF long suseconds_t;
-+
-+TYPEDEF struct { union { int __i[9]; unsigned __s[9]; } __u; } pthread_attr_t;
-+TYPEDEF struct { union { int __i[6]; void *__p[6]; } __u; } pthread_mutex_t;
-+TYPEDEF struct { union { int __i[12]; void *__p[12]; } __u; } pthread_cond_t;
-+TYPEDEF struct { union { int __i[8]; void *__p[8]; } __u; } pthread_rwlock_t;
-+TYPEDEF struct { union { int __i[5]; void *__p[5]; } __u; } pthread_barrier_t;
-diff -Nur musl-0.9.15/arch/sh/bits/endian.h musl-git/arch/sh/bits/endian.h
---- musl-0.9.15/arch/sh/bits/endian.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/sh/bits/endian.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,5 @@
-+#if __BIG_ENDIAN__
-+#define __BYTE_ORDER __BIG_ENDIAN
-+#else
-+#define __BYTE_ORDER __LITTLE_ENDIAN
-+#endif
-diff -Nur musl-0.9.15/arch/sh/bits/errno.h musl-git/arch/sh/bits/errno.h
---- musl-0.9.15/arch/sh/bits/errno.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/sh/bits/errno.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,134 @@
-+#define EPERM 1
-+#define ENOENT 2
-+#define ESRCH 3
-+#define EINTR 4
-+#define EIO 5
-+#define ENXIO 6
-+#define E2BIG 7
-+#define ENOEXEC 8
-+#define EBADF 9
-+#define ECHILD 10
-+#define EAGAIN 11
-+#define ENOMEM 12
-+#define EACCES 13
-+#define EFAULT 14
-+#define ENOTBLK 15
-+#define EBUSY 16
-+#define EEXIST 17
-+#define EXDEV 18
-+#define ENODEV 19
-+#define ENOTDIR 20
-+#define EISDIR 21
-+#define EINVAL 22
-+#define ENFILE 23
-+#define EMFILE 24
-+#define ENOTTY 25
-+#define ETXTBSY 26
-+#define EFBIG 27
-+#define ENOSPC 28
-+#define ESPIPE 29
-+#define EROFS 30
-+#define EMLINK 31
-+#define EPIPE 32
-+#define EDOM 33
-+#define ERANGE 34
-+#define EDEADLK 35
-+#define ENAMETOOLONG 36
-+#define ENOLCK 37
-+#define ENOSYS 38
-+#define ENOTEMPTY 39
-+#define ELOOP 40
-+#define EWOULDBLOCK EAGAIN
-+#define ENOMSG 42
-+#define EIDRM 43
-+#define ECHRNG 44
-+#define EL2NSYNC 45
-+#define EL3HLT 46
-+#define EL3RST 47
-+#define ELNRNG 48
-+#define EUNATCH 49
-+#define ENOCSI 50
-+#define EL2HLT 51
-+#define EBADE 52
-+#define EBADR 53
-+#define EXFULL 54
-+#define ENOANO 55
-+#define EBADRQC 56
-+#define EBADSLT 57
-+#define EDEADLOCK EDEADLK
-+#define EBFONT 59
-+#define ENOSTR 60
-+#define ENODATA 61
-+#define ETIME 62
-+#define ENOSR 63
-+#define ENONET 64
-+#define ENOPKG 65
-+#define EREMOTE 66
-+#define ENOLINK 67
-+#define EADV 68
-+#define ESRMNT 69
-+#define ECOMM 70
-+#define EPROTO 71
-+#define EMULTIHOP 72
-+#define EDOTDOT 73
-+#define EBADMSG 74
-+#define EOVERFLOW 75
-+#define ENOTUNIQ 76
-+#define EBADFD 77
-+#define EREMCHG 78
-+#define ELIBACC 79
-+#define ELIBBAD 80
-+#define ELIBSCN 81
-+#define ELIBMAX 82
-+#define ELIBEXEC 83
-+#define EILSEQ 84
-+#define ERESTART 85
-+#define ESTRPIPE 86
-+#define EUSERS 87
-+#define ENOTSOCK 88
-+#define EDESTADDRREQ 89
-+#define EMSGSIZE 90
-+#define EPROTOTYPE 91
-+#define ENOPROTOOPT 92
-+#define EPROTONOSUPPORT 93
-+#define ESOCKTNOSUPPORT 94
-+#define EOPNOTSUPP 95
-+#define ENOTSUP EOPNOTSUPP
-+#define EPFNOSUPPORT 96
-+#define EAFNOSUPPORT 97
-+#define EADDRINUSE 98
-+#define EADDRNOTAVAIL 99
-+#define ENETDOWN 100
-+#define ENETUNREACH 101
-+#define ENETRESET 102
-+#define ECONNABORTED 103
-+#define ECONNRESET 104
-+#define ENOBUFS 105
-+#define EISCONN 106
-+#define ENOTCONN 107
-+#define ESHUTDOWN 108
-+#define ETOOMANYREFS 109
-+#define ETIMEDOUT 110
-+#define ECONNREFUSED 111
-+#define EHOSTDOWN 112
-+#define EHOSTUNREACH 113
-+#define EALREADY 114
-+#define EINPROGRESS 115
-+#define ESTALE 116
-+#define EUCLEAN 117
-+#define ENOTNAM 118
-+#define ENAVAIL 119
-+#define EISNAM 120
-+#define EREMOTEIO 121
-+#define EDQUOT 122
-+#define ENOMEDIUM 123
-+#define EMEDIUMTYPE 124
-+#define ECANCELED 125
-+#define ENOKEY 126
-+#define EKEYEXPIRED 127
-+#define EKEYREVOKED 128
-+#define EKEYREJECTED 129
-+#define EOWNERDEAD 130
-+#define ENOTRECOVERABLE 131
-+#define ERFKILL 132
-+#define EHWPOISON 133
-diff -Nur musl-0.9.15/arch/sh/bits/fcntl.h musl-git/arch/sh/bits/fcntl.h
---- musl-0.9.15/arch/sh/bits/fcntl.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/sh/bits/fcntl.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,39 @@
-+#define O_CREAT 0100
-+#define O_EXCL 0200
-+#define O_NOCTTY 0400
-+#define O_TRUNC 01000
-+#define O_APPEND 02000
-+#define O_NONBLOCK 04000
-+#define O_DSYNC 010000
-+#define O_SYNC 04010000
-+#define O_RSYNC 04010000
-+#define O_DIRECTORY 0200000
-+#define O_NOFOLLOW 0400000
-+#define O_CLOEXEC 02000000
-+
-+#define O_ASYNC 020000
-+#define O_DIRECT 040000
-+#define O_LARGEFILE 0100000
-+#define O_NOATIME 01000000
-+#define O_TMPFILE 020200000
-+#define O_NDELAY O_NONBLOCK
-+
-+#define F_DUPFD 0
-+#define F_GETFD 1
-+#define F_SETFD 2
-+#define F_GETFL 3
-+#define F_SETFL 4
-+
-+#define F_SETOWN 8
-+#define F_GETOWN 9
-+#define F_SETSIG 10
-+#define F_GETSIG 11
-+
-+#define F_GETLK 12
-+#define F_SETLK 13
-+#define F_SETLKW 14
-+
-+#define F_SETOWN_EX 15
-+#define F_GETOWN_EX 16
-+
-+#define F_GETOWNER_UIDS 17
-diff -Nur musl-0.9.15/arch/sh/bits/fenv.h musl-git/arch/sh/bits/fenv.h
---- musl-0.9.15/arch/sh/bits/fenv.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/sh/bits/fenv.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,26 @@
-+#ifndef __SH_FPU_ANY__
-+
-+#define FE_ALL_EXCEPT 0
-+#define FE_TONEAREST 0
-+
-+#else
-+
-+#define FE_TONEAREST 0
-+#define FE_TOWARDZERO 1
-+
-+#define FE_INEXACT 0x04
-+#define FE_UNDERFLOW 0x08
-+#define FE_OVERFLOW 0x10
-+#define FE_DIVBYZERO 0x20
-+#define FE_INVALID 0x40
-+#define FE_ALL_EXCEPT 0x7c
-+
-+#endif
-+
-+typedef unsigned long fexcept_t;
-+
-+typedef struct {
-+ unsigned long __cw;
-+} fenv_t;
-+
-+#define FE_DFL_ENV ((const fenv_t *) -1)
-diff -Nur musl-0.9.15/arch/sh/bits/float.h musl-git/arch/sh/bits/float.h
---- musl-0.9.15/arch/sh/bits/float.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/sh/bits/float.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,17 @@
-+#define FLT_ROUNDS 1
-+#define FLT_EVAL_METHOD 0
-+
-+#define LDBL_TRUE_MIN 4.94065645841246544177e-324L
-+#define LDBL_MIN 2.22507385850720138309e-308L
-+#define LDBL_MAX 1.79769313486231570815e+308L
-+#define LDBL_EPSILON 2.22044604925031308085e-16L
-+
-+#define LDBL_MANT_DIG 53
-+#define LDBL_MIN_EXP (-1021)
-+#define LDBL_MAX_EXP 1024
-+
-+#define LDBL_DIG 15
-+#define LDBL_MIN_10_EXP (-307)
-+#define LDBL_MAX_10_EXP 308
-+
-+#define DECIMAL_DIG 17
-diff -Nur musl-0.9.15/arch/sh/bits/ioctl.h musl-git/arch/sh/bits/ioctl.h
---- musl-0.9.15/arch/sh/bits/ioctl.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/sh/bits/ioctl.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,205 @@
-+#define _IOC(a,b,c,d) ( ((a)<<30) | ((b)<<8) | (c) | ((d)<<16) )
-+#define _IOC_NONE 0U
-+#define _IOC_WRITE 1U
-+#define _IOC_READ 2U
-+
-+#define _IO(a,b) _IOC(_IOC_NONE,(a),(b),0)
-+#define _IOW(a,b,c) _IOC(_IOC_WRITE,(a),(b),sizeof(c))
-+#define _IOR(a,b,c) _IOC(_IOC_READ,(a),(b),sizeof(c))
-+#define _IOWR(a,b,c) _IOC(_IOC_READ|_IOC_WRITE,(a),(b),sizeof(c))
-+
-+#define FIOCLEX _IO('f', 1)
-+#define FIONCLEX _IO('f', 2)
-+#define FIOASYNC _IOW('f', 125, int)
-+#define FIONBIO _IOW('f', 126, int)
-+#define FIONREAD _IOR('f', 127, int)
-+#define TIOCINQ FIONREAD
-+#define FIOQSIZE _IOR('f', 128, char[8])
-+
-+#define TCGETA _IOR('t', 23, char[18])
-+#define TCSETA _IOW('t', 24, char[18])
-+#define TCSETAW _IOW('t', 25, char[18])
-+#define TCSETAF _IOW('t', 28, char[18])
-+
-+#define TCSBRK _IO('t', 29)
-+#define TCXONC _IO('t', 30)
-+#define TCFLSH _IO('t', 31)
-+
-+#define TIOCSWINSZ _IOW('t', 103, char[8])
-+#define TIOCGWINSZ _IOR('t', 104, char[8])
-+#define TIOCSTART _IO('t', 110)
-+#define TIOCSTOP _IO('t', 111)
-+#define TIOCOUTQ _IOR('t', 115, int)
-+
-+#define TIOCSPGRP _IOW('t', 118, int)
-+#define TIOCGPGRP _IOR('t', 119, int)
-+
-+#define TIOCEXCL _IO('T', 12)
-+#define TIOCNXCL _IO('T', 13)
-+#define TIOCSCTTY _IO('T', 14)
-+
-+#define TIOCSTI _IOW('T', 18, char)
-+#define TIOCMGET _IOR('T', 21, unsigned int)
-+#define TIOCMBIS _IOW('T', 22, unsigned int)
-+#define TIOCMBIC _IOW('T', 23, unsigned int)
-+#define TIOCMSET _IOW('T', 24, unsigned int)
-+#define TIOCM_LE 0x001
-+#define TIOCM_DTR 0x002
-+#define TIOCM_RTS 0x004
-+#define TIOCM_ST 0x008
-+#define TIOCM_SR 0x010
-+#define TIOCM_CTS 0x020
-+#define TIOCM_CAR 0x040
-+#define TIOCM_RNG 0x080
-+#define TIOCM_DSR 0x100
-+#define TIOCM_CD TIOCM_CAR
-+#define TIOCM_RI TIOCM_RNG
-+#define TIOCM_OUT1 0x2000
-+#define TIOCM_OUT2 0x4000
-+#define TIOCM_LOOP 0x8000
-+
-+#define TIOCGSOFTCAR _IOR('T', 25, unsigned int)
-+#define TIOCSSOFTCAR _IOW('T', 26, unsigned int)
-+#define TIOCLINUX _IOW('T', 28, char)
-+#define TIOCCONS _IO('T', 29)
-+#define TIOCGSERIAL _IOR('T', 30, char[60])
-+#define TIOCSSERIAL _IOW('T', 31, char[60])
-+#define TIOCPKT _IOW('T', 32, int)
-+#define TIOCPKT_DATA 0
-+#define TIOCPKT_FLUSHREAD 1
-+#define TIOCPKT_FLUSHWRITE 2
-+#define TIOCPKT_STOP 4
-+#define TIOCPKT_START 8
-+#define TIOCPKT_NOSTOP 16
-+#define TIOCPKT_DOSTOP 32
-+#define TIOCPKT_IOCTL 64
-+
-+#define TIOCNOTTY _IO('T', 34)
-+#define TIOCSETD _IOW('T', 35, int)
-+#define TIOCGETD _IOR('T', 36, int)
-+#define TCSBRKP _IOW('T', 37, int)
-+#define TIOCSBRK _IO('T', 39)
-+#define TIOCCBRK _IO('T', 40)
-+#define TIOCGSID _IOR('T', 41, int)
-+#define TCGETS _IOR('T', 42, char[44])
-+#define TCSETS _IOW('T', 43, char[44])
-+#define TCSETSW _IOW('T', 44, char[44])
-+#define TCSETSF _IOW('T', 45, char[44])
-+#define TIOCGPTN _IOR('T', 48, unsigned int)
-+#define TIOCSPTLCK _IOW('T', 49, int)
-+#define TIOCGDEV _IOR('T', 50, unsigned int)
-+#define TIOCSIG _IOW('T', 54, int)
-+#define TIOCVHANGUP _IO('T', 55)
-+#define TIOCGPKT _IOR('T', 56, int)
-+#define TIOCGPTLCK _IOR('T', 57, int)
-+#define TIOCGEXCL _IOR('T', 64, int)
-+
-+#define TIOCSERCONFIG _IO('T', 83)
-+#define TIOCSERGWILD _IOR('T', 84, int)
-+#define TIOCSERSWILD _IOW('T', 85, int)
-+#define TIOCGLCKTRMIOS _IO('T', 86)
-+#define TIOCSLCKTRMIOS _IO('T', 87)
-+#define TIOCSERGSTRUCT _IOR('T', 88, char[216])
-+#define TIOCSERGETLSR _IOR('T', 89, unsigned int)
-+#define TIOCSER_TEMT 0x01
-+#define TIOCSERGETMULTI _IOR('T', 90, char[168])
-+#define TIOCSERSETMULTI _IOW('T', 91, char[168])
-+
-+#define TIOCMIWAIT _IO('T', 92)
-+#define TIOCGICOUNT _IO('T', 93)
-+
-+struct winsize {
-+ unsigned short ws_row;
-+ unsigned short ws_col;
-+ unsigned short ws_xpixel;
-+ unsigned short ws_ypixel;
-+};
-+
-+#define TIOCM_MODEM_BITS TIOCM_OUT2
-+
-+#define N_TTY 0
-+#define N_SLIP 1
-+#define N_MOUSE 2
-+#define N_PPP 3
-+#define N_STRIP 4
-+#define N_AX25 5
-+#define N_X25 6
-+#define N_6PACK 7
-+#define N_MASC 8
-+#define N_R3964 9
-+#define N_PROFIBUS_FDL 10
-+#define N_IRDA 11
-+#define N_SMSBLOCK 12
-+#define N_HDLC 13
-+#define N_SYNC_PPP 14
-+#define N_HCI 15
-+
-+#define FIOGETOWN _IOR('f', 123, int)
-+#define FIOSETOWN _IOW('f', 124, int)
-+
-+#define SIOCATMARK _IOR('s', 7, int)
-+#define SIOCSPGRP _IOW('s', 8, int)
-+#define SIOCGPGRP _IOW('s', 9, int)
-+#define SIOCGSTAMP _IOR('s', 100, char[8])
-+
-+#define SIOCADDRT 0x890B
-+#define SIOCDELRT 0x890C
-+#define SIOCRTMSG 0x890D
-+
-+#define SIOCGIFNAME 0x8910
-+#define SIOCSIFLINK 0x8911
-+#define SIOCGIFCONF 0x8912
-+#define SIOCGIFFLAGS 0x8913
-+#define SIOCSIFFLAGS 0x8914
-+#define SIOCGIFADDR 0x8915
-+#define SIOCSIFADDR 0x8916
-+#define SIOCGIFDSTADDR 0x8917
-+#define SIOCSIFDSTADDR 0x8918
-+#define SIOCGIFBRDADDR 0x8919
-+#define SIOCSIFBRDADDR 0x891a
-+#define SIOCGIFNETMASK 0x891b
-+#define SIOCSIFNETMASK 0x891c
-+#define SIOCGIFMETRIC 0x891d
-+#define SIOCSIFMETRIC 0x891e
-+#define SIOCGIFMEM 0x891f
-+#define SIOCSIFMEM 0x8920
-+#define SIOCGIFMTU 0x8921
-+#define SIOCSIFMTU 0x8922
-+#define SIOCSIFHWADDR 0x8924
-+#define SIOCGIFENCAP 0x8925
-+#define SIOCSIFENCAP 0x8926
-+#define SIOCGIFHWADDR 0x8927
-+#define SIOCGIFSLAVE 0x8929
-+#define SIOCSIFSLAVE 0x8930
-+#define SIOCADDMULTI 0x8931
-+#define SIOCDELMULTI 0x8932
-+#define SIOCGIFINDEX 0x8933
-+#define SIOGIFINDEX SIOCGIFINDEX
-+#define SIOCSIFPFLAGS 0x8934
-+#define SIOCGIFPFLAGS 0x8935
-+#define SIOCDIFADDR 0x8936
-+#define SIOCSIFHWBROADCAST 0x8937
-+#define SIOCGIFCOUNT 0x8938
-+
-+#define SIOCGIFBR 0x8940
-+#define SIOCSIFBR 0x8941
-+
-+#define SIOCGIFTXQLEN 0x8942
-+#define SIOCSIFTXQLEN 0x8943
-+
-+#define SIOCDARP 0x8953
-+#define SIOCGARP 0x8954
-+#define SIOCSARP 0x8955
-+
-+#define SIOCDRARP 0x8960
-+#define SIOCGRARP 0x8961
-+#define SIOCSRARP 0x8962
-+
-+#define SIOCGIFMAP 0x8970
-+#define SIOCSIFMAP 0x8971
-+
-+#define SIOCADDDLCI 0x8980
-+#define SIOCDELDLCI 0x8981
-+
-+#define SIOCDEVPRIVATE 0x89F0
-+#define SIOCPROTOPRIVATE 0x89E0
-diff -Nur musl-0.9.15/arch/sh/bits/ipc.h musl-git/arch/sh/bits/ipc.h
---- musl-0.9.15/arch/sh/bits/ipc.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/sh/bits/ipc.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,14 @@
-+struct ipc_perm
-+{
-+ key_t __ipc_perm_key;
-+ uid_t uid;
-+ gid_t gid;
-+ uid_t cuid;
-+ gid_t cgid;
-+ mode_t mode;
-+ int __ipc_perm_seq;
-+ long __pad1;
-+ long __pad2;
-+};
-+
-+#define IPC_64 0x100
-diff -Nur musl-0.9.15/arch/sh/bits/limits.h musl-git/arch/sh/bits/limits.h
---- musl-0.9.15/arch/sh/bits/limits.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/sh/bits/limits.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,8 @@
-+#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
-+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-+#define PAGE_SIZE 4096
-+#define LONG_BIT 32
-+#endif
-+
-+#define LONG_MAX 0x7fffffffL
-+#define LLONG_MAX 0x7fffffffffffffffLL
-diff -Nur musl-0.9.15/arch/sh/bits/mman.h musl-git/arch/sh/bits/mman.h
---- musl-0.9.15/arch/sh/bits/mman.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/sh/bits/mman.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,62 @@
-+#define MAP_FAILED ((void *) -1)
-+
-+#define PROT_NONE 0
-+#define PROT_READ 1
-+#define PROT_WRITE 2
-+#define PROT_EXEC 4
-+#define PROT_GROWSDOWN 0x01000000
-+#define PROT_GROWSUP 0x02000000
-+
-+#define MAP_SHARED 0x01
-+#define MAP_PRIVATE 0x02
-+#define MAP_FIXED 0x10
-+
-+#define MAP_TYPE 0x0f
-+#define MAP_FILE 0x00
-+#define MAP_ANON 0x20
-+#define MAP_ANONYMOUS MAP_ANON
-+#define MAP_32BIT 0x40
-+#define MAP_NORESERVE 0x4000
-+#define MAP_GROWSDOWN 0x0100
-+#define MAP_DENYWRITE 0x0800
-+#define MAP_EXECUTABLE 0x1000
-+#define MAP_LOCKED 0x2000
-+#define MAP_POPULATE 0x8000
-+#define MAP_NONBLOCK 0x10000
-+#define MAP_STACK 0x20000
-+#define MAP_HUGETLB 0x40000
-+
-+#define POSIX_MADV_NORMAL 0
-+#define POSIX_MADV_RANDOM 1
-+#define POSIX_MADV_SEQUENTIAL 2
-+#define POSIX_MADV_WILLNEED 3
-+#define POSIX_MADV_DONTNEED 4
-+
-+#define MS_ASYNC 1
-+#define MS_INVALIDATE 2
-+#define MS_SYNC 4
-+
-+#define MCL_CURRENT 1
-+#define MCL_FUTURE 2
-+
-+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-+#define MADV_NORMAL 0
-+#define MADV_RANDOM 1
-+#define MADV_SEQUENTIAL 2
-+#define MADV_WILLNEED 3
-+#define MADV_DONTNEED 4
-+#define MADV_REMOVE 9
-+#define MADV_DONTFORK 10
-+#define MADV_DOFORK 11
-+#define MADV_MERGEABLE 12
-+#define MADV_UNMERGEABLE 13
-+#define MADV_HUGEPAGE 14
-+#define MADV_NOHUGEPAGE 15
-+#define MADV_DONTDUMP 16
-+#define MADV_DODUMP 17
-+#define MADV_HWPOISON 100
-+#define MADV_SOFT_OFFLINE 101
-+
-+#define MREMAP_MAYMOVE 1
-+#define MREMAP_FIXED 2
-+#endif
-diff -Nur musl-0.9.15/arch/sh/bits/msg.h musl-git/arch/sh/bits/msg.h
---- musl-0.9.15/arch/sh/bits/msg.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/sh/bits/msg.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,16 @@
-+struct msqid_ds
-+{
-+ struct ipc_perm msg_perm;
-+ time_t msg_stime;
-+ int __unused1;
-+ time_t msg_rtime;
-+ int __unused2;
-+ time_t msg_ctime;
-+ int __unused3;
-+ unsigned long msg_cbytes;
-+ msgqnum_t msg_qnum;
-+ msglen_t msg_qbytes;
-+ pid_t msg_lspid;
-+ pid_t msg_lrpid;
-+ unsigned long __unused[2];
-+};
-diff -Nur musl-0.9.15/arch/sh/bits/posix.h musl-git/arch/sh/bits/posix.h
---- musl-0.9.15/arch/sh/bits/posix.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/sh/bits/posix.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,2 @@
-+#define _POSIX_V6_ILP32_OFFBIG 1
-+#define _POSIX_V7_ILP32_OFFBIG 1
-diff -Nur musl-0.9.15/arch/sh/bits/sem.h musl-git/arch/sh/bits/sem.h
---- musl-0.9.15/arch/sh/bits/sem.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/sh/bits/sem.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,16 @@
-+struct semid_ds {
-+ struct ipc_perm sem_perm;
-+ time_t sem_otime;
-+ time_t __unused1;
-+ time_t sem_ctime;
-+ time_t __unused2;
-+#if __BYTE_ORDER == __LITTLE_ENDIAN
-+ unsigned short sem_nsems;
-+ char __sem_nsems_pad[sizeof(time_t)-sizeof(short)];
-+#else
-+ char __sem_nsems_pad[sizeof(time_t)-sizeof(short)];
-+ unsigned short sem_nsems;
-+#endif
-+ time_t __unused3;
-+ time_t __unused4;
-+};
-diff -Nur musl-0.9.15/arch/sh/bits/setjmp.h musl-git/arch/sh/bits/setjmp.h
---- musl-0.9.15/arch/sh/bits/setjmp.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/sh/bits/setjmp.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1 @@
-+typedef unsigned long __jmp_buf[13];
-diff -Nur musl-0.9.15/arch/sh/bits/shm.h musl-git/arch/sh/bits/shm.h
---- musl-0.9.15/arch/sh/bits/shm.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/sh/bits/shm.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,28 @@
-+#define SHMLBA 16384
-+
-+struct shmid_ds
-+{
-+ struct ipc_perm shm_perm;
-+ size_t shm_segsz;
-+ time_t shm_atime;
-+ int __unused1;
-+ time_t shm_dtime;
-+ int __unused2;
-+ time_t shm_ctime;
-+ int __unused3;
-+ pid_t shm_cpid;
-+ pid_t shm_lpid;
-+ unsigned long shm_nattch;
-+ unsigned long __pad1;
-+ unsigned long __pad2;
-+};
-+
-+struct shminfo {
-+ unsigned long shmmax, shmmin, shmmni, shmseg, shmall, __unused[4];
-+};
-+
-+struct shm_info {
-+ int __used_ids;
-+ unsigned long shm_tot, shm_rss, shm_swp;
-+ unsigned long __swap_attempts, __swap_successes;
-+};
-diff -Nur musl-0.9.15/arch/sh/bits/signal.h musl-git/arch/sh/bits/signal.h
---- musl-0.9.15/arch/sh/bits/signal.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/sh/bits/signal.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,82 @@
-+#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
-+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-+
-+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-+typedef int greg_t, gregset_t[16];
-+typedef int freg_t, fpregset_t[16];
-+typedef struct sigcontext {
-+ unsigned long oldmask;
-+ unsigned long sc_regs[16];
-+ unsigned long sc_pc, sc_pr, sc_sr;
-+ unsigned long sc_gbr, sc_mach, sc_macl;
-+ unsigned long sc_fpregs[16];
-+ unsigned long sc_xfpregs[16];
-+ unsigned int sc_fpscr, sc_fpul, sc_ownedfp;
-+} mcontext_t;
-+#else
-+typedef struct {
-+ unsigned long __regs[58];
-+} mcontext_t;
-+#endif
-+
-+struct sigaltstack {
-+ void *ss_sp;
-+ int ss_flags;
-+ size_t ss_size;
-+};
-+
-+typedef struct __ucontext {
-+ unsigned long uc_flags;
-+ struct __ucontext *uc_link;
-+ stack_t uc_stack;
-+ mcontext_t uc_mcontext;
-+ sigset_t uc_sigmask;
-+} ucontext_t;
-+
-+#define SA_NOCLDSTOP 1
-+#define SA_NOCLDWAIT 2
-+#define SA_SIGINFO 4
-+#define SA_ONSTACK 0x08000000
-+#define SA_RESTART 0x10000000
-+#define SA_NODEFER 0x40000000
-+#define SA_RESETHAND 0x80000000
-+#define SA_RESTORER 0x04000000
-+
-+#endif
-+
-+#define SIGHUP 1
-+#define SIGINT 2
-+#define SIGQUIT 3
-+#define SIGILL 4
-+#define SIGTRAP 5
-+#define SIGABRT 6
-+#define SIGIOT SIGABRT
-+#define SIGBUS 7
-+#define SIGFPE 8
-+#define SIGKILL 9
-+#define SIGUSR1 10
-+#define SIGSEGV 11
-+#define SIGUSR2 12
-+#define SIGPIPE 13
-+#define SIGALRM 14
-+#define SIGTERM 15
-+#define SIGSTKFLT 16
-+#define SIGCHLD 17
-+#define SIGCONT 18
-+#define SIGSTOP 19
-+#define SIGTSTP 20
-+#define SIGTTIN 21
-+#define SIGTTOU 22
-+#define SIGURG 23
-+#define SIGXCPU 24
-+#define SIGXFSZ 25
-+#define SIGVTALRM 26
-+#define SIGPROF 27
-+#define SIGWINCH 28
-+#define SIGIO 29
-+#define SIGPOLL 29
-+#define SIGPWR 30
-+#define SIGSYS 31
-+#define SIGUNUSED SIGSYS
-+
-+#define _NSIG 65
-diff -Nur musl-0.9.15/arch/sh/bits/socket.h musl-git/arch/sh/bits/socket.h
---- musl-0.9.15/arch/sh/bits/socket.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/sh/bits/socket.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,17 @@
-+struct msghdr
-+{
-+ void *msg_name;
-+ socklen_t msg_namelen;
-+ struct iovec *msg_iov;
-+ int msg_iovlen;
-+ void *msg_control;
-+ socklen_t msg_controllen;
-+ int msg_flags;
-+};
-+
-+struct cmsghdr
-+{
-+ socklen_t cmsg_len;
-+ int cmsg_level;
-+ int cmsg_type;
-+};
-diff -Nur musl-0.9.15/arch/sh/bits/statfs.h musl-git/arch/sh/bits/statfs.h
---- musl-0.9.15/arch/sh/bits/statfs.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/sh/bits/statfs.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,7 @@
-+struct statfs {
-+ unsigned long f_type, f_bsize;
-+ fsblkcnt_t f_blocks, f_bfree, f_bavail;
-+ fsfilcnt_t f_files, f_ffree;
-+ fsid_t f_fsid;
-+ unsigned long f_namelen, f_frsize, f_flags, f_spare[4];
-+};
-diff -Nur musl-0.9.15/arch/sh/bits/stat.h musl-git/arch/sh/bits/stat.h
---- musl-0.9.15/arch/sh/bits/stat.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/sh/bits/stat.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,22 @@
-+/* copied from kernel definition, but with padding replaced
-+ * by the corresponding correctly-sized userspace types. */
-+
-+struct stat
-+{
-+ dev_t st_dev;
-+ int __st_dev_padding;
-+ long __st_ino_truncated;
-+ mode_t st_mode;
-+ nlink_t st_nlink;
-+ uid_t st_uid;
-+ gid_t st_gid;
-+ dev_t st_rdev;
-+ int __st_rdev_padding;
-+ off_t st_size;
-+ blksize_t st_blksize;
-+ blkcnt_t st_blocks;
-+ struct timespec st_atim;
-+ struct timespec st_mtim;
-+ struct timespec st_ctim;
-+ ino_t st_ino;
-+};
-diff -Nur musl-0.9.15/arch/sh/bits/stdarg.h musl-git/arch/sh/bits/stdarg.h
---- musl-0.9.15/arch/sh/bits/stdarg.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/sh/bits/stdarg.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,4 @@
-+#define va_start(v,l) __builtin_va_start(v,l)
-+#define va_end(v) __builtin_va_end(v)
-+#define va_arg(v,l) __builtin_va_arg(v,l)
-+#define va_copy(d,s) __builtin_va_copy(d,s)
-diff -Nur musl-0.9.15/arch/sh/bits/stdint.h musl-git/arch/sh/bits/stdint.h
---- musl-0.9.15/arch/sh/bits/stdint.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/sh/bits/stdint.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,20 @@
-+typedef int32_t int_fast16_t;
-+typedef int32_t int_fast32_t;
-+typedef uint32_t uint_fast16_t;
-+typedef uint32_t uint_fast32_t;
-+
-+#define INT_FAST16_MIN INT32_MIN
-+#define INT_FAST32_MIN INT32_MIN
-+
-+#define INT_FAST16_MAX INT32_MAX
-+#define INT_FAST32_MAX INT32_MAX
-+
-+#define UINT_FAST16_MAX UINT32_MAX
-+#define UINT_FAST32_MAX UINT32_MAX
-+
-+#define INTPTR_MIN INT32_MIN
-+#define INTPTR_MAX INT32_MAX
-+#define UINTPTR_MAX UINT32_MAX
-+#define PTRDIFF_MIN INT32_MIN
-+#define PTRDIFF_MAX INT32_MAX
-+#define SIZE_MAX UINT32_MAX
-diff -Nur musl-0.9.15/arch/sh/bits/syscall.h musl-git/arch/sh/bits/syscall.h
---- musl-0.9.15/arch/sh/bits/syscall.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/sh/bits/syscall.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,684 @@
-+#define __NR_restart_syscall 0
-+#define __NR_exit 1
-+#define __NR_fork 2
-+#define __NR_read 3
-+#define __NR_write 4
-+#define __NR_open 5
-+#define __NR_close 6
-+#define __NR_waitpid 7
-+#define __NR_creat 8
-+#define __NR_link 9
-+#define __NR_unlink 10
-+#define __NR_execve 11
-+#define __NR_chdir 12
-+#define __NR_time 13
-+#define __NR_mknod 14
-+#define __NR_chmod 15
-+#define __NR_lchown 16
-+#define __NR_oldstat 18
-+#define __NR_lseek 19
-+#define __NR_getpid 20
-+#define __NR_mount 21
-+#define __NR_umount 22
-+#define __NR_setuid 23
-+#define __NR_getuid 24
-+#define __NR_stime 25
-+#define __NR_ptrace 26
-+#define __NR_alarm 27
-+#define __NR_oldfstat 28
-+#define __NR_pause 29
-+#define __NR_utime 30
-+#define __NR_access 33
-+#define __NR_nice 34
-+#define __NR_sync 36
-+#define __NR_kill 37
-+#define __NR_rename 38
-+#define __NR_mkdir 39
-+#define __NR_rmdir 40
-+#define __NR_dup 41
-+#define __NR_pipe 42
-+#define __NR_times 43
-+#define __NR_brk 45
-+#define __NR_setgid 46
-+#define __NR_getgid 47
-+#define __NR_signal 48
-+#define __NR_geteuid 49
-+#define __NR_getegid 50
-+#define __NR_acct 51
-+#define __NR_umount2 52
-+#define __NR_ioctl 54
-+#define __NR_fcntl 55
-+#define __NR_setpgid 57
-+#define __NR_umask 60
-+#define __NR_chroot 61
-+#define __NR_ustat 62
-+#define __NR_dup2 63
-+#define __NR_getppid 64
-+#define __NR_getpgrp 65
-+#define __NR_setsid 66
-+#define __NR_sigaction 67
-+#define __NR_sgetmask 68
-+#define __NR_ssetmask 69
-+#define __NR_setreuid 70
-+#define __NR_setregid 71
-+#define __NR_sigsuspend 72
-+#define __NR_sigpending 73
-+#define __NR_sethostname 74
-+#define __NR_setrlimit 75
-+#define __NR_getrlimit 76
-+#define __NR_getrusage 77
-+#define __NR_gettimeofday 78
-+#define __NR_settimeofday 79
-+#define __NR_getgroups 80
-+#define __NR_setgroups 81
-+#define __NR_symlink 83
-+#define __NR_oldlstat 84
-+#define __NR_readlink 85
-+#define __NR_uselib 86
-+#define __NR_swapon 87
-+#define __NR_reboot 88
-+#define __NR_readdir 89
-+#define __NR_mmap 90
-+#define __NR_munmap 91
-+#define __NR_truncate 92
-+#define __NR_ftruncate 93
-+#define __NR_fchmod 94
-+#define __NR_fchown 95
-+#define __NR_getpriority 96
-+#define __NR_setpriority 97
-+#define __NR_statfs 99
-+#define __NR_fstatfs 100
-+#define __NR_socketcall 102
-+#define __NR_syslog 103
-+#define __NR_setitimer 104
-+#define __NR_getitimer 105
-+#define __NR_stat 106
-+#define __NR_lstat 107
-+#define __NR_fstat 108
-+#define __NR_olduname 109
-+#define __NR_vhangup 111
-+#define __NR_wait4 114
-+#define __NR_swapoff 115
-+#define __NR_sysinfo 116
-+#define __NR_ipc 117
-+#define __NR_fsync 118
-+#define __NR_sigreturn 119
-+#define __NR_clone 120
-+#define __NR_setdomainname 121
-+#define __NR_uname 122
-+#define __NR_cacheflush 123
-+#define __NR_adjtimex 124
-+#define __NR_mprotect 125
-+#define __NR_sigprocmask 126
-+#define __NR_init_module 128
-+#define __NR_delete_module 129
-+#define __NR_quotactl 131
-+#define __NR_getpgid 132
-+#define __NR_fchdir 133
-+#define __NR_bdflush 134
-+#define __NR_sysfs 135
-+#define __NR_personality 136
-+#define __NR_setfsuid 138
-+#define __NR_setfsgid 139
-+#define __NR__llseek 140
-+#define __NR_getdents 141
-+#define __NR__newselect 142
-+#define __NR_flock 143
-+#define __NR_msync 144
-+#define __NR_readv 145
-+#define __NR_writev 146
-+#define __NR_getsid 147
-+#define __NR_fdatasync 148
-+#define __NR__sysctl 149
-+#define __NR_mlock 150
-+#define __NR_munlock 151
-+#define __NR_mlockall 152
-+#define __NR_munlockall 153
-+#define __NR_sched_setparam 154
-+#define __NR_sched_getparam 155
-+#define __NR_sched_setscheduler 156
-+#define __NR_sched_getscheduler 157
-+#define __NR_sched_yield 158
-+#define __NR_sched_get_priority_max 159
-+#define __NR_sched_get_priority_min 160
-+#define __NR_sched_rr_get_interval 161
-+#define __NR_nanosleep 162
-+#define __NR_mremap 163
-+#define __NR_setresuid 164
-+#define __NR_getresuid 165
-+#define __NR_poll 168
-+#define __NR_nfsservctl 169
-+#define __NR_setresgid 170
-+#define __NR_getresgid 171
-+#define __NR_prctl 172
-+#define __NR_rt_sigreturn 173
-+#define __NR_rt_sigaction 174
-+#define __NR_rt_sigprocmask 175
-+#define __NR_rt_sigpending 176
-+#define __NR_rt_sigtimedwait 177
-+#define __NR_rt_sigqueueinfo 178
-+#define __NR_rt_sigsuspend 179
-+#define __NR_pread64 180
-+#define __NR_pwrite64 181
-+#define __NR_chown 182
-+#define __NR_getcwd 183
-+#define __NR_capget 184
-+#define __NR_capset 185
-+#define __NR_sigaltstack 186
-+#define __NR_sendfile 187
-+#define __NR_vfork 190
-+#define __NR_ugetrlimit 191
-+#define __NR_mmap2 192
-+#define __NR_truncate64 193
-+#define __NR_ftruncate64 194
-+#define __NR_stat64 195
-+#define __NR_lstat64 196
-+#define __NR_fstat64 197
-+#define __NR_lchown32 198
-+#define __NR_getuid32 199
-+#define __NR_getgid32 200
-+#define __NR_geteuid32 201
-+#define __NR_getegid32 202
-+#define __NR_setreuid32 203
-+#define __NR_setregid32 204
-+#define __NR_getgroups32 205
-+#define __NR_setgroups32 206
-+#define __NR_fchown32 207
-+#define __NR_setresuid32 208
-+#define __NR_getresuid32 209
-+#define __NR_setresgid32 210
-+#define __NR_getresgid32 211
-+#define __NR_chown32 212
-+#define __NR_setuid32 213
-+#define __NR_setgid32 214
-+#define __NR_setfsuid32 215
-+#define __NR_setfsgid32 216
-+#define __NR_pivot_root 217
-+#define __NR_mincore 218
-+#define __NR_madvise 219
-+#define __NR_getdents64 220
-+#define __NR_fcntl64 221
-+#define __NR_gettid 224
-+#define __NR_readahead 225
-+#define __NR_setxattr 226
-+#define __NR_lsetxattr 227
-+#define __NR_fsetxattr 228
-+#define __NR_getxattr 229
-+#define __NR_lgetxattr 230
-+#define __NR_fgetxattr 231
-+#define __NR_listxattr 232
-+#define __NR_llistxattr 233
-+#define __NR_flistxattr 234
-+#define __NR_removexattr 235
-+#define __NR_lremovexattr 236
-+#define __NR_fremovexattr 237
-+#define __NR_tkill 238
-+#define __NR_sendfile64 239
-+#define __NR_futex 240
-+#define __NR_sched_setaffinity 241
-+#define __NR_sched_getaffinity 242
-+#define __NR_io_setup 245
-+#define __NR_io_destroy 246
-+#define __NR_io_getevents 247
-+#define __NR_io_submit 248
-+#define __NR_io_cancel 249
-+#define __NR_fadvise64 250
-+#define __NR_exit_group 252
-+#define __NR_lookup_dcookie 253
-+#define __NR_epoll_create 254
-+#define __NR_epoll_ctl 255
-+#define __NR_epoll_wait 256
-+#define __NR_remap_file_pages 257
-+#define __NR_set_tid_address 258
-+#define __NR_timer_create 259
-+#define __NR_timer_settime 260
-+#define __NR_timer_gettime 261
-+#define __NR_timer_getoverrun 262
-+#define __NR_timer_delete 263
-+#define __NR_clock_settime 264
-+#define __NR_clock_gettime 265
-+#define __NR_clock_getres 266
-+#define __NR_clock_nanosleep 267
-+#define __NR_statfs64 268
-+#define __NR_fstatfs64 269
-+#define __NR_tgkill 270
-+#define __NR_utimes 271
-+#define __NR_fadvise64_64 272
-+#define __NR_mbind 274
-+#define __NR_get_mempolicy 275
-+#define __NR_set_mempolicy 276
-+#define __NR_mq_open 277
-+#define __NR_mq_unlink 278
-+#define __NR_mq_timedsend 279
-+#define __NR_mq_timedreceive 280
-+#define __NR_mq_notify 281
-+#define __NR_mq_getsetattr 282
-+#define __NR_kexec_load 283
-+#define __NR_waitid 284
-+#define __NR_add_key 285
-+#define __NR_request_key 286
-+#define __NR_keyctl 287
-+#define __NR_ioprio_set 288
-+#define __NR_ioprio_get 289
-+#define __NR_inotify_init 290
-+#define __NR_inotify_add_watch 291
-+#define __NR_inotify_rm_watch 292
-+#define __NR_migrate_pages 294
-+#define __NR_openat 295
-+#define __NR_mkdirat 296
-+#define __NR_mknodat 297
-+#define __NR_fchownat 298
-+#define __NR_futimesat 299
-+#define __NR_fstatat64 300
-+#define __NR_unlinkat 301
-+#define __NR_renameat 302
-+#define __NR_linkat 303
-+#define __NR_symlinkat 304
-+#define __NR_readlinkat 305
-+#define __NR_fchmodat 306
-+#define __NR_faccessat 307
-+#define __NR_pselect6 308
-+#define __NR_ppoll 309
-+#define __NR_unshare 310
-+#define __NR_set_robust_list 311
-+#define __NR_get_robust_list 312
-+#define __NR_splice 313
-+#define __NR_sync_file_range 314
-+#define __NR_tee 315
-+#define __NR_vmsplice 316
-+#define __NR_move_pages 317
-+#define __NR_getcpu 318
-+#define __NR_epoll_pwait 319
-+#define __NR_utimensat 320
-+#define __NR_signalfd 321
-+#define __NR_timerfd_create 322
-+#define __NR_eventfd 323
-+#define __NR_fallocate 324
-+#define __NR_timerfd_settime 325
-+#define __NR_timerfd_gettime 326
-+#define __NR_signalfd4 327
-+#define __NR_eventfd2 328
-+#define __NR_epoll_create1 329
-+#define __NR_dup3 330
-+#define __NR_pipe2 331
-+#define __NR_inotify_init1 332
-+#define __NR_preadv 333
-+#define __NR_pwritev 334
-+#define __NR_rt_tgsigqueueinfo 335
-+#define __NR_perf_event_open 336
-+#define __NR_fanotify_init 337
-+#define __NR_fanotify_mark 338
-+#define __NR_prlimit64 339
-+#define __NR_socket 340
-+#define __NR_bind 341
-+#define __NR_connect 342
-+#define __NR_listen 343
-+#define __NR_accept 344
-+#define __NR_getsockname 345
-+#define __NR_getpeername 346
-+#define __NR_socketpair 347
-+#define __NR_send 348
-+#define __NR_sendto 349
-+#define __NR_recv 350
-+#define __NR_recvfrom 351
-+#define __NR_shutdown 352
-+#define __NR_setsockopt 353
-+#define __NR_getsockopt 354
-+#define __NR_sendmsg 355
-+#define __NR_recvmsg 356
-+#define __NR_recvmmsg 357
-+#define __NR_accept4 358
-+#define __NR_name_to_handle_at 359
-+#define __NR_open_by_handle_at 360
-+#define __NR_clock_adjtime 361
-+#define __NR_syncfs 362
-+#define __NR_sendmmsg 363
-+#define __NR_setns 364
-+#define __NR_process_vm_readv 365
-+#define __NR_process_vm_writev 366
-+#define __NR_kcmp 367
-+#define __NR_finit_module 368
-+
-+
-+/* Repeated with SYS_ prefix */
-+
-+#define SYS_restart_syscall 0
-+#define SYS_exit 1
-+#define SYS_fork 2
-+#define SYS_read 3
-+#define SYS_write 4
-+#define SYS_open 5
-+#define SYS_close 6
-+#define SYS_waitpid 7
-+#define SYS_creat 8
-+#define SYS_link 9
-+#define SYS_unlink 10
-+#define SYS_execve 11
-+#define SYS_chdir 12
-+#define SYS_time 13
-+#define SYS_mknod 14
-+#define SYS_chmod 15
-+#define SYS_lchown 16
-+#define SYS_oldstat 18
-+#define SYS_lseek 19
-+#define SYS_getpid 20
-+#define SYS_mount 21
-+#define SYS_umount 22
-+#define SYS_setuid 23
-+#define SYS_getuid 24
-+#define SYS_stime 25
-+#define SYS_ptrace 26
-+#define SYS_alarm 27
-+#define SYS_oldfstat 28
-+#define SYS_pause 29
-+#define SYS_utime 30
-+#define SYS_access 33
-+#define SYS_nice 34
-+#define SYS_sync 36
-+#define SYS_kill 37
-+#define SYS_rename 38
-+#define SYS_mkdir 39
-+#define SYS_rmdir 40
-+#define SYS_dup 41
-+#define SYS_pipe 42
-+#define SYS_times 43
-+#define SYS_brk 45
-+#define SYS_setgid 46
-+#define SYS_getgid 47
-+#define SYS_signal 48
-+#define SYS_geteuid 49
-+#define SYS_getegid 50
-+#define SYS_acct 51
-+#define SYS_umount2 52
-+#define SYS_ioctl 54
-+#define SYS_fcntl 55
-+#define SYS_setpgid 57
-+#define SYS_umask 60
-+#define SYS_chroot 61
-+#define SYS_ustat 62
-+#define SYS_dup2 63
-+#define SYS_getppid 64
-+#define SYS_getpgrp 65
-+#define SYS_setsid 66
-+#define SYS_sigaction 67
-+#define SYS_sgetmask 68
-+#define SYS_ssetmask 69
-+#define SYS_setreuid 70
-+#define SYS_setregid 71
-+#define SYS_sigsuspend 72
-+#define SYS_sigpending 73
-+#define SYS_sethostname 74
-+#define SYS_setrlimit 75
-+#define SYS_getrlimit 76
-+#define SYS_getrusage 77
-+#define SYS_gettimeofday 78
-+#define SYS_settimeofday 79
-+#define SYS_getgroups 80
-+#define SYS_setgroups 81
-+#define SYS_symlink 83
-+#define SYS_oldlstat 84
-+#define SYS_readlink 85
-+#define SYS_uselib 86
-+#define SYS_swapon 87
-+#define SYS_reboot 88
-+#define SYS_readdir 89
-+#define SYS_mmap 90
-+#define SYS_munmap 91
-+#define SYS_truncate 92
-+#define SYS_ftruncate 93
-+#define SYS_fchmod 94
-+#define SYS_fchown 95
-+#define SYS_getpriority 96
-+#define SYS_setpriority 97
-+#define SYS_statfs 99
-+#define SYS_fstatfs 100
-+#define SYS_socketcall 102
-+#define SYS_syslog 103
-+#define SYS_setitimer 104
-+#define SYS_getitimer 105
-+#define SYS_stat 106
-+#define SYS_lstat 107
-+#define SYS_fstat 108
-+#define SYS_olduname 109
-+#define SYS_vhangup 111
-+#define SYS_wait4 114
-+#define SYS_swapoff 115
-+#define SYS_sysinfo 116
-+#define SYS_ipc 117
-+#define SYS_fsync 118
-+#define SYS_sigreturn 119
-+#define SYS_clone 120
-+#define SYS_setdomainname 121
-+#define SYS_uname 122
-+#define SYS_cacheflush 123
-+#define SYS_adjtimex 124
-+#define SYS_mprotect 125
-+#define SYS_sigprocmask 126
-+#define SYS_init_module 128
-+#define SYS_delete_module 129
-+#define SYS_quotactl 131
-+#define SYS_getpgid 132
-+#define SYS_fchdir 133
-+#define SYS_bdflush 134
-+#define SYS_sysfs 135
-+#define SYS_personality 136
-+#define SYS_setfsuid 138
-+#define SYS_setfsgid 139
-+#define SYS__llseek 140
-+#define SYS_getdents 141
-+#define SYS__newselect 142
-+#define SYS_flock 143
-+#define SYS_msync 144
-+#define SYS_readv 145
-+#define SYS_writev 146
-+#define SYS_getsid 147
-+#define SYS_fdatasync 148
-+#define SYS__sysctl 149
-+#define SYS_mlock 150
-+#define SYS_munlock 151
-+#define SYS_mlockall 152
-+#define SYS_munlockall 153
-+#define SYS_sched_setparam 154
-+#define SYS_sched_getparam 155
-+#define SYS_sched_setscheduler 156
-+#define SYS_sched_getscheduler 157
-+#define SYS_sched_yield 158
-+#define SYS_sched_get_priority_max 159
-+#define SYS_sched_get_priority_min 160
-+#define SYS_sched_rr_get_interval 161
-+#define SYS_nanosleep 162
-+#define SYS_mremap 163
-+#define SYS_setresuid 164
-+#define SYS_getresuid 165
-+#define SYS_poll 168
-+#define SYS_nfsservctl 169
-+#define SYS_setresgid 170
-+#define SYS_getresgid 171
-+#define SYS_prctl 172
-+#define SYS_rt_sigreturn 173
-+#define SYS_rt_sigaction 174
-+#define SYS_rt_sigprocmask 175
-+#define SYS_rt_sigpending 176
-+#define SYS_rt_sigtimedwait 177
-+#define SYS_rt_sigqueueinfo 178
-+#define SYS_rt_sigsuspend 179
-+#define SYS_pread64 180
-+#define SYS_pwrite64 181
-+#define SYS_chown 182
-+#define SYS_getcwd 183
-+#define SYS_capget 184
-+#define SYS_capset 185
-+#define SYS_sigaltstack 186
-+#define SYS_sendfile 187
-+#define SYS_vfork 190
-+#define SYS_ugetrlimit 191
-+#define SYS_mmap2 192
-+#define SYS_truncate64 193
-+#define SYS_ftruncate64 194
-+#define SYS_stat64 195
-+#define SYS_lstat64 196
-+#define SYS_fstat64 197
-+#define SYS_lchown32 198
-+#define SYS_getuid32 199
-+#define SYS_getgid32 200
-+#define SYS_geteuid32 201
-+#define SYS_getegid32 202
-+#define SYS_setreuid32 203
-+#define SYS_setregid32 204
-+#define SYS_getgroups32 205
-+#define SYS_setgroups32 206
-+#define SYS_fchown32 207
-+#define SYS_setresuid32 208
-+#define SYS_getresuid32 209
-+#define SYS_setresgid32 210
-+#define SYS_getresgid32 211
-+#define SYS_chown32 212
-+#define SYS_setuid32 213
-+#define SYS_setgid32 214
-+#define SYS_setfsuid32 215
-+#define SYS_setfsgid32 216
-+#define SYS_pivot_root 217
-+#define SYS_mincore 218
-+#define SYS_madvise 219
-+#define SYS_getdents64 220
-+#define SYS_fcntl64 221
-+#define SYS_gettid 224
-+#define SYS_readahead 225
-+#define SYS_setxattr 226
-+#define SYS_lsetxattr 227
-+#define SYS_fsetxattr 228
-+#define SYS_getxattr 229
-+#define SYS_lgetxattr 230
-+#define SYS_fgetxattr 231
-+#define SYS_listxattr 232
-+#define SYS_llistxattr 233
-+#define SYS_flistxattr 234
-+#define SYS_removexattr 235
-+#define SYS_lremovexattr 236
-+#define SYS_fremovexattr 237
-+#define SYS_tkill 238
-+#define SYS_sendfile64 239
-+#define SYS_futex 240
-+#define SYS_sched_setaffinity 241
-+#define SYS_sched_getaffinity 242
-+#define SYS_io_setup 245
-+#define SYS_io_destroy 246
-+#define SYS_io_getevents 247
-+#define SYS_io_submit 248
-+#define SYS_io_cancel 249
-+#define SYS_fadvise64 250
-+#define SYS_exit_group 252
-+#define SYS_lookup_dcookie 253
-+#define SYS_epoll_create 254
-+#define SYS_epoll_ctl 255
-+#define SYS_epoll_wait 256
-+#define SYS_remap_file_pages 257
-+#define SYS_set_tid_address 258
-+#define SYS_timer_create 259
-+#define SYS_timer_settime 260
-+#define SYS_timer_gettime 261
-+#define SYS_timer_getoverrun 262
-+#define SYS_timer_delete 263
-+#define SYS_clock_settime 264
-+#define SYS_clock_gettime 265
-+#define SYS_clock_getres 266
-+#define SYS_clock_nanosleep 267
-+#define SYS_statfs64 268
-+#define SYS_fstatfs64 269
-+#define SYS_tgkill 270
-+#define SYS_utimes 271
-+#define SYS_fadvise64_64 272
-+#define SYS_mbind 274
-+#define SYS_get_mempolicy 275
-+#define SYS_set_mempolicy 276
-+#define SYS_mq_open 277
-+#define SYS_mq_unlink 278
-+#define SYS_mq_timedsend 279
-+#define SYS_mq_timedreceive 280
-+#define SYS_mq_notify 281
-+#define SYS_mq_getsetattr 282
-+#define SYS_kexec_load 283
-+#define SYS_waitid 284
-+#define SYS_add_key 285
-+#define SYS_request_key 286
-+#define SYS_keyctl 287
-+#define SYS_ioprio_set 288
-+#define SYS_ioprio_get 289
-+#define SYS_inotify_init 290
-+#define SYS_inotify_add_watch 291
-+#define SYS_inotify_rm_watch 292
-+#define SYS_migrate_pages 294
-+#define SYS_openat 295
-+#define SYS_mkdirat 296
-+#define SYS_mknodat 297
-+#define SYS_fchownat 298
-+#define SYS_futimesat 299
-+#define SYS_fstatat64 300
-+#define SYS_unlinkat 301
-+#define SYS_renameat 302
-+#define SYS_linkat 303
-+#define SYS_symlinkat 304
-+#define SYS_readlinkat 305
-+#define SYS_fchmodat 306
-+#define SYS_faccessat 307
-+#define SYS_pselect6 308
-+#define SYS_ppoll 309
-+#define SYS_unshare 310
-+#define SYS_set_robust_list 311
-+#define SYS_get_robust_list 312
-+#define SYS_splice 313
-+#define SYS_sync_file_range 314
-+#define SYS_tee 315
-+#define SYS_vmsplice 316
-+#define SYS_move_pages 317
-+#define SYS_getcpu 318
-+#define SYS_epoll_pwait 319
-+#define SYS_utimensat 320
-+#define SYS_signalfd 321
-+#define SYS_timerfd_create 322
-+#define SYS_eventfd 323
-+#define SYS_fallocate 324
-+#define SYS_timerfd_settime 325
-+#define SYS_timerfd_gettime 326
-+#define SYS_signalfd4 327
-+#define SYS_eventfd2 328
-+#define SYS_epoll_create1 329
-+#define SYS_dup3 330
-+#define SYS_pipe2 331
-+#define SYS_inotify_init1 332
-+#define SYS_preadv 333
-+#define SYS_pwritev 334
-+#define SYS_rt_tgsigqueueinfo 335
-+#define SYS_perf_event_open 336
-+#define SYS_fanotify_init 337
-+#define SYS_fanotify_mark 338
-+#define SYS_prlimit64 339
-+#define SYS_socket 340
-+#define SYS_bind 341
-+#define SYS_connect 342
-+#define SYS_listen 343
-+#define SYS_accept 344
-+#define SYS_getsockname 345
-+#define SYS_getpeername 346
-+#define SYS_socketpair 347
-+#define SYS_send 348
-+#define SYS_sendto 349
-+#define SYS_recv 350
-+#define SYS_recvfrom 351
-+#define SYS_shutdown 352
-+#define SYS_setsockopt 353
-+#define SYS_getsockopt 354
-+#define SYS_sendmsg 355
-+#define SYS_recvmsg 356
-+#define SYS_recvmmsg 357
-+#define SYS_accept4 358
-+#define SYS_name_to_handle_at 359
-+#define SYS_open_by_handle_at 360
-+#define SYS_clock_adjtime 361
-+#define SYS_syncfs 362
-+#define SYS_sendmmsg 363
-+#define SYS_setns 364
-+#define SYS_process_vm_readv 365
-+#define SYS_process_vm_writev 366
-+#define SYS_kcmp 367
-+#define SYS_finit_module 368
-diff -Nur musl-0.9.15/arch/sh/bits/termios.h musl-git/arch/sh/bits/termios.h
---- musl-0.9.15/arch/sh/bits/termios.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/sh/bits/termios.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,160 @@
-+struct termios
-+{
-+ tcflag_t c_iflag;
-+ tcflag_t c_oflag;
-+ tcflag_t c_cflag;
-+ tcflag_t c_lflag;
-+ cc_t c_line;
-+ cc_t c_cc[NCCS];
-+ speed_t __c_ispeed;
-+ speed_t __c_ospeed;
-+};
-+
-+#define VINTR 0
-+#define VQUIT 1
-+#define VERASE 2
-+#define VKILL 3
-+#define VEOF 4
-+#define VTIME 5
-+#define VMIN 6
-+#define VSWTC 7
-+#define VSTART 8
-+#define VSTOP 9
-+#define VSUSP 10
-+#define VEOL 11
-+#define VREPRINT 12
-+#define VDISCARD 13
-+#define VWERASE 14
-+#define VLNEXT 15
-+#define VEOL2 16
-+
-+#define IGNBRK 0000001
-+#define BRKINT 0000002
-+#define IGNPAR 0000004
-+#define PARMRK 0000010
-+#define INPCK 0000020
-+#define ISTRIP 0000040
-+#define INLCR 0000100
-+#define IGNCR 0000200
-+#define ICRNL 0000400
-+#define IUCLC 0001000
-+#define IXON 0002000
-+#define IXANY 0004000
-+#define IXOFF 0010000
-+#define IMAXBEL 0020000
-+#define IUTF8 0040000
-+
-+#define OPOST 0000001
-+#define OLCUC 0000002
-+#define ONLCR 0000004
-+#define OCRNL 0000010
-+#define ONOCR 0000020
-+#define ONLRET 0000040
-+#define OFILL 0000100
-+#define OFDEL 0000200
-+#define NLDLY 0000400
-+#define NL0 0000000
-+#define NL1 0000400
-+#define CRDLY 0003000
-+#define CR0 0000000
-+#define CR1 0001000
-+#define CR2 0002000
-+#define CR3 0003000
-+#define TABDLY 0014000
-+#define TAB0 0000000
-+#define TAB1 0004000
-+#define TAB2 0010000
-+#define TAB3 0014000
-+#define BSDLY 0020000
-+#define BS0 0000000
-+#define BS1 0020000
-+#define FFDLY 0100000
-+#define FF0 0000000
-+#define FF1 0100000
-+
-+#define VTDLY 0040000
-+#define VT0 0000000
-+#define VT1 0040000
-+
-+#define B0 0000000
-+#define B50 0000001
-+#define B75 0000002
-+#define B110 0000003
-+#define B134 0000004
-+#define B150 0000005
-+#define B200 0000006
-+#define B300 0000007
-+#define B600 0000010
-+#define B1200 0000011
-+#define B1800 0000012
-+#define B2400 0000013
-+#define B4800 0000014
-+#define B9600 0000015
-+#define B19200 0000016
-+#define B38400 0000017
-+
-+#define B57600 0010001
-+#define B115200 0010002
-+#define B230400 0010003
-+#define B460800 0010004
-+#define B500000 0010005
-+#define B576000 0010006
-+#define B921600 0010007
-+#define B1000000 0010010
-+#define B1152000 0010011
-+#define B1500000 0010012
-+#define B2000000 0010013
-+#define B2500000 0010014
-+#define B3000000 0010015
-+#define B3500000 0010016
-+#define B4000000 0010017
-+
-+#define CBAUD 0010017
-+
-+#define CSIZE 0000060
-+#define CS5 0000000
-+#define CS6 0000020
-+#define CS7 0000040
-+#define CS8 0000060
-+#define CSTOPB 0000100
-+#define CREAD 0000200
-+#define PARENB 0000400
-+#define PARODD 0001000
-+#define HUPCL 0002000
-+#define CLOCAL 0004000
-+
-+#define ISIG 0000001
-+#define ICANON 0000002
-+#define ECHO 0000010
-+#define ECHOE 0000020
-+#define ECHOK 0000040
-+#define ECHONL 0000100
-+#define NOFLSH 0000200
-+#define TOSTOP 0000400
-+#define IEXTEN 0100000
-+
-+#define ECHOCTL 0001000
-+#define ECHOPRT 0002000
-+#define ECHOKE 0004000
-+#define FLUSHO 0010000
-+#define PENDIN 0040000
-+
-+#define TCOOFF 0
-+#define TCOON 1
-+#define TCIOFF 2
-+#define TCION 3
-+
-+#define TCIFLUSH 0
-+#define TCOFLUSH 1
-+#define TCIOFLUSH 2
-+
-+#define TCSANOW 0
-+#define TCSADRAIN 1
-+#define TCSAFLUSH 2
-+
-+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-+#define CBAUDEX 0010000
-+#define CRTSCTS 020000000000
-+#define EXTPROC 0200000
-+#define XTABS 0014000
-+#endif
-diff -Nur musl-0.9.15/arch/sh/bits/user.h musl-git/arch/sh/bits/user.h
---- musl-0.9.15/arch/sh/bits/user.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/sh/bits/user.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,75 @@
-+#undef __WORDSIZE
-+#define __WORDSIZE 32
-+
-+#define REG_REG0 0
-+#define REG_REG15 15
-+#define REG_PC 16
-+#define REG_PR 17
-+#define REG_SR 18
-+#define REG_GBR 19
-+#define REG_MACH 20
-+#define REG_MACL 21
-+#define REG_SYSCALL 22
-+#define REG_FPREG0 23
-+#define REG_FPREG15 38
-+#define REG_XFREG0 39
-+#define REG_XFREG15 54
-+#define REG_FPSCR 55
-+#define REG_FPUL 56
-+
-+struct pt_regs {
-+ unsigned long regs[16];
-+ unsigned long pc;
-+ unsigned long pr;
-+ unsigned long sr;
-+ unsigned long gbr;
-+ unsigned long mach;
-+ unsigned long macl;
-+ long tra;
-+};
-+
-+struct pt_dspregs {
-+ unsigned long a1;
-+ unsigned long a0g;
-+ unsigned long a1g;
-+ unsigned long m0;
-+ unsigned long m1;
-+ unsigned long a0;
-+ unsigned long x0;
-+ unsigned long x1;
-+ unsigned long y0;
-+ unsigned long y1;
-+ unsigned long dsr;
-+ unsigned long rs;
-+ unsigned long re;
-+ unsigned long mod;
-+};
-+
-+struct user_fpu_struct {
-+ unsigned long fp_regs[16];
-+ unsigned long xfp_regs[16];
-+ unsigned long fpscr;
-+ unsigned long fpul;
-+};
-+
-+#define ELF_NGREG 23
-+typedef unsigned long elf_greg_t;
-+typedef elf_greg_t elf_gregset_t[ELF_NGREG];
-+typedef struct user_fpu_struct elf_fpregset_t;
-+
-+struct user {
-+ struct pt_regs regs;
-+ struct user_fpu_struct fpu;
-+ int u_fpvalid;
-+ unsigned long u_tsize;
-+ unsigned long u_dsize;
-+ unsigned long u_ssize;
-+ unsigned long start_code;
-+ unsigned long start_data;
-+ unsigned long start_stack;
-+ long int signal;
-+ unsigned long u_ar0;
-+ struct user_fpu_struct *u_fpstate;
-+ unsigned long magic;
-+ char u_comm[32];
-+};
-diff -Nur musl-0.9.15/arch/sh/crt_arch.h musl-git/arch/sh/crt_arch.h
---- musl-0.9.15/arch/sh/crt_arch.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/sh/crt_arch.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,12 @@
-+__asm__("\
-+.global _start \n\
-+_start: \n\
-+ mov r15, r4 \n\
-+ mov #-16, r0 \n\
-+ and r0, r15 \n\
-+ bsr __cstart \n\
-+ nop \n\
-+");
-+
-+/* used by gcc for switching the FPU between single and double precision */
-+const unsigned long __fpscr_values[2] = { 0, 0x80000 };
-diff -Nur musl-0.9.15/arch/sh/pthread_arch.h musl-git/arch/sh/pthread_arch.h
---- musl-0.9.15/arch/sh/pthread_arch.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/sh/pthread_arch.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,11 @@
-+static inline struct pthread *__pthread_self()
-+{
-+ char *self;
-+ __asm__ __volatile__ ("stc gbr,%0" : "=r" (self) );
-+ return (struct pthread *) (self + 8 - sizeof(struct pthread));
-+}
-+
-+#define TLS_ABOVE_TP
-+#define TP_ADJ(p) ((char *)(p) + sizeof(struct pthread) - 8)
-+
-+#define CANCEL_REG_IP 17
-diff -Nur musl-0.9.15/arch/sh/reloc.h musl-git/arch/sh/reloc.h
---- musl-0.9.15/arch/sh/reloc.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/sh/reloc.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,47 @@
-+#if __BYTE_ORDER == __BIG_ENDIAN
-+#define ENDIAN_SUFFIX "eb"
-+#else
-+#define ENDIAN_SUFFIX ""
-+#endif
-+
-+#define LDSO_ARCH "sh" ENDIAN_SUFFIX
-+
-+#define IS_COPY(x) ((x) == R_SH_COPY)
-+#define IS_PLT(x) ((x) == R_SH_JMP_SLOT)
-+
-+static inline void do_single_reloc(
-+ struct dso *self, unsigned char *base_addr,
-+ size_t *reloc_addr, int type, size_t addend,
-+ Sym *sym, size_t sym_size,
-+ struct symdef def, size_t sym_val)
-+{
-+ switch(type) {
-+ case R_SH_GLOB_DAT:
-+ case R_SH_JMP_SLOT:
-+ *reloc_addr = sym_val;
-+ break;
-+ case R_SH_RELATIVE:
-+ *reloc_addr = (size_t)base_addr + addend;
-+ break;
-+ case R_SH_DIR32:
-+ *reloc_addr = sym_val + addend;
-+ break;
-+ case R_SH_REL32:
-+ *reloc_addr = sym_val + addend - (size_t)reloc_addr + (size_t)base_addr;
-+ break;
-+ case R_SH_COPY:
-+ memcpy(reloc_addr, (void *)sym_val, sym_size);
-+ break;
-+ case R_SH_TLS_DTPMOD32:
-+ *reloc_addr += def.dso ? def.dso->tls_id : self->tls_id;
-+ break;
-+ case R_SH_TLS_DTPOFF32:
-+ *reloc_addr += def.sym->st_value;
-+ break;
-+ case R_SH_TLS_TPOFF32:
-+ *reloc_addr += def.sym
-+ ? def.sym->st_value + def.dso->tls_offset + 8
-+ : self->tls_offset + 8;
-+ break;
-+ }
-+}
-diff -Nur musl-0.9.15/arch/sh/src/atomic.c musl-git/arch/sh/src/atomic.c
---- musl-0.9.15/arch/sh/src/atomic.c 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/sh/src/atomic.c 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,146 @@
-+#include "libc.h"
-+
-+#define LLSC_CLOBBERS "r0", "t", "memory"
-+#define LLSC_START(mem) \
-+ "0: movli.l @" mem ", r0\n"
-+#define LLSC_END(mem) \
-+ "1: movco.l r0, @" mem "\n" \
-+ " bf 0b\n" \
-+ " synco\n"
-+
-+/* gusa is a hack in the kernel which lets you create a sequence of instructions
-+ * which will be restarted if the process is preempted in the middle of the
-+ * sequence. It will do for implementing atomics on non-smp systems. ABI is:
-+ * r0 = address of first instruction after the atomic sequence
-+ * r1 = original stack pointer
-+ * r15 = -1 * length of atomic sequence in bytes
-+ */
-+#define GUSA_CLOBBERS "r0", "r1", "memory"
-+#define GUSA_START(mem,old,nop) \
-+ " .align 2\n" \
-+ " mova 1f, r0\n" \
-+ nop \
-+ " mov r15, r1\n" \
-+ " mov #(0f-1f), r15\n" \
-+ "0: mov.l @" mem ", " old "\n"
-+/* the target of mova must be 4 byte aligned, so we may need a nop */
-+#define GUSA_START_ODD(mem,old) GUSA_START(mem,old,"")
-+#define GUSA_START_EVEN(mem,old) GUSA_START(mem,old,"\tnop\n")
-+#define GUSA_END(mem,new) \
-+ " mov.l " new ", @" mem "\n" \
-+ "1: mov r1, r15\n"
-+
-+#define CPU_HAS_LLSC 0x0040
-+
-+int __sh_cas(volatile int *p, int t, int s)
-+{
-+ int old;
-+ if (__hwcap & CPU_HAS_LLSC) {
-+ __asm__ __volatile__(
-+ LLSC_START("%1")
-+ " mov r0, %0\n"
-+ " cmp/eq %0, %2\n"
-+ " bf 1f\n"
-+ " mov %3, r0\n"
-+ LLSC_END("%1")
-+ : "=&r"(old) : "r"(p), "r"(t), "r"(s) : LLSC_CLOBBERS);
-+ } else {
-+ __asm__ __volatile__(
-+ GUSA_START_EVEN("%1", "%0")
-+ " cmp/eq %0, %2\n"
-+ " bf 1f\n"
-+ GUSA_END("%1", "%3")
-+ : "=&r"(old) : "r"(p), "r"(t), "r"(s) : GUSA_CLOBBERS, "t");
-+ }
-+ return old;
-+}
-+
-+int __sh_swap(volatile int *x, int v)
-+{
-+ int old;
-+ if (__hwcap & CPU_HAS_LLSC) {
-+ __asm__ __volatile__(
-+ LLSC_START("%1")
-+ " mov r0, %0\n"
-+ " mov %2, r0\n"
-+ LLSC_END("%1")
-+ : "=&r"(old) : "r"(x), "r"(v) : LLSC_CLOBBERS);
-+ } else {
-+ __asm__ __volatile__(
-+ GUSA_START_EVEN("%1", "%0")
-+ GUSA_END("%1", "%2")
-+ : "=&r"(old) : "r"(x), "r"(v) : GUSA_CLOBBERS);
-+ }
-+ return old;
-+}
-+
-+int __sh_fetch_add(volatile int *x, int v)
-+{
-+ int old, dummy;
-+ if (__hwcap & CPU_HAS_LLSC) {
-+ __asm__ __volatile__(
-+ LLSC_START("%1")
-+ " mov r0, %0\n"
-+ " add %2, r0\n"
-+ LLSC_END("%1")
-+ : "=&r"(old) : "r"(x), "r"(v) : LLSC_CLOBBERS);
-+ } else {
-+ __asm__ __volatile__(
-+ GUSA_START_EVEN("%2", "%0")
-+ " mov %0, %1\n"
-+ " add %3, %1\n"
-+ GUSA_END("%2", "%1")
-+ : "=&r"(old), "=&r"(dummy) : "r"(x), "r"(v) : GUSA_CLOBBERS);
-+ }
-+ return old;
-+}
-+
-+void __sh_store(volatile int *p, int x)
-+{
-+ if (__hwcap & CPU_HAS_LLSC) {
-+ __asm__ __volatile__(
-+ " mov.l %1, @%0\n"
-+ " synco\n"
-+ : : "r"(p), "r"(x) : "memory");
-+ } else {
-+ __asm__ __volatile__(
-+ " mov.l %1, @%0\n"
-+ : : "r"(p), "r"(x) : "memory");
-+ }
-+}
-+
-+void __sh_and(volatile int *x, int v)
-+{
-+ int dummy;
-+ if (__hwcap & CPU_HAS_LLSC) {
-+ __asm__ __volatile__(
-+ LLSC_START("%0")
-+ " and %1, r0\n"
-+ LLSC_END("%0")
-+ : : "r"(x), "r"(v) : LLSC_CLOBBERS);
-+ } else {
-+ __asm__ __volatile__(
-+ GUSA_START_ODD("%1", "%0")
-+ " and %2, %0\n"
-+ GUSA_END("%1", "%0")
-+ : "=&r"(dummy) : "r"(x), "r"(v) : GUSA_CLOBBERS);
-+ }
-+}
-+
-+void __sh_or(volatile int *x, int v)
-+{
-+ int dummy;
-+ if (__hwcap & CPU_HAS_LLSC) {
-+ __asm__ __volatile__(
-+ LLSC_START("%0")
-+ " or %1, r0\n"
-+ LLSC_END("%0")
-+ : : "r"(x), "r"(v) : LLSC_CLOBBERS);
-+ } else {
-+ __asm__ __volatile__(
-+ GUSA_START_ODD("%1", "%0")
-+ " or %2, %0\n"
-+ GUSA_END("%1", "%0")
-+ : "=&r"(dummy) : "r"(x), "r"(v) : GUSA_CLOBBERS);
-+ }
-+}
-diff -Nur musl-0.9.15/arch/sh/src/__fpscr_values.c musl-git/arch/sh/src/__fpscr_values.c
---- musl-0.9.15/arch/sh/src/__fpscr_values.c 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/sh/src/__fpscr_values.c 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,5 @@
-+#include "libc.h"
-+
-+/* used by gcc for switching the FPU between single and double precision */
-+const unsigned long __fpscr_values[2] ATTR_LIBC_VISIBILITY = { 0, 0x80000 };
-+
-diff -Nur musl-0.9.15/arch/sh/syscall_arch.h musl-git/arch/sh/syscall_arch.h
---- musl-0.9.15/arch/sh/syscall_arch.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/sh/syscall_arch.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,87 @@
-+#define __SYSCALL_LL_E(x) \
-+((union { long long ll; long l[2]; }){ .ll = x }).l[0], \
-+((union { long long ll; long l[2]; }){ .ll = x }).l[1]
-+#define __SYSCALL_LL_O(x) __SYSCALL_LL_E((x))
-+
-+/* The extra OR instructions are to work around a hardware bug:
-+ * http://documentation.renesas.com/doc/products/mpumcu/tu/tnsh7456ae.pdf
-+ */
-+#define __asm_syscall(trapno, ...) do { \
-+ __asm__ __volatile__ ( \
-+ "trapa #" #trapno "\n" \
-+ "or r0, r0\n" \
-+ "or r0, r0\n" \
-+ "or r0, r0\n" \
-+ "or r0, r0\n" \
-+ "or r0, r0\n" \
-+ : "=r"(r0) : __VA_ARGS__ : "memory"); \
-+ return r0; \
-+ } while (0)
-+
-+static inline long __syscall0(long n)
-+{
-+ register long r3 __asm__("r3") = n;
-+ register long r0 __asm__("r0");
-+ __asm_syscall(16, "r"(r3));
-+}
-+
-+static inline long __syscall1(long n, long a)
-+{
-+ register long r3 __asm__("r3") = n;
-+ register long r4 __asm__("r4") = a;
-+ register long r0 __asm__("r0");
-+ __asm_syscall(17, "r"(r3), "r"(r4));
-+}
-+
-+static inline long __syscall2(long n, long a, long b)
-+{
-+ register long r3 __asm__("r3") = n;
-+ register long r4 __asm__("r4") = a;
-+ register long r5 __asm__("r5") = b;
-+ register long r0 __asm__("r0");
-+ __asm_syscall(18, "r"(r3), "r"(r4), "r"(r5));
-+}
-+
-+static inline long __syscall3(long n, long a, long b, long c)
-+{
-+ register long r3 __asm__("r3") = n;
-+ register long r4 __asm__("r4") = a;
-+ register long r5 __asm__("r5") = b;
-+ register long r6 __asm__("r6") = c;
-+ register long r0 __asm__("r0");
-+ __asm_syscall(19, "r"(r3), "r"(r4), "r"(r5), "r"(r6));
-+}
-+
-+static inline long __syscall4(long n, long a, long b, long c, long d)
-+{
-+ register long r3 __asm__("r3") = n;
-+ register long r4 __asm__("r4") = a;
-+ register long r5 __asm__("r5") = b;
-+ register long r6 __asm__("r6") = c;
-+ register long r7 __asm__("r7") = d;
-+ register long r0 __asm__("r0");
-+ __asm_syscall(20, "r"(r3), "r"(r4), "r"(r5), "r"(r6), "r"(r7));
-+}
-+
-+static inline long __syscall5(long n, long a, long b, long c, long d, long e)
-+{
-+ register long r3 __asm__("r3") = n;
-+ register long r4 __asm__("r4") = a;
-+ register long r5 __asm__("r5") = b;
-+ register long r6 __asm__("r6") = c;
-+ register long r7 __asm__("r7") = d;
-+ register long r0 __asm__("r0") = e;
-+ __asm_syscall(21, "r"(r3), "r"(r4), "r"(r5), "r"(r6), "r"(r7), "0"(r0));
-+}
-+
-+static inline long __syscall6(long n, long a, long b, long c, long d, long e, long f)
-+{
-+ register long r3 __asm__("r3") = n;
-+ register long r4 __asm__("r4") = a;
-+ register long r5 __asm__("r5") = b;
-+ register long r6 __asm__("r6") = c;
-+ register long r7 __asm__("r7") = d;
-+ register long r0 __asm__("r0") = e;
-+ register long r1 __asm__("r1") = f;
-+ __asm_syscall(22, "r"(r3), "r"(r4), "r"(r5), "r"(r6), "r"(r7), "0"(r0), "r"(r1));
-+}
-diff -Nur musl-0.9.15/arch/x32/atomic.h musl-git/arch/x32/atomic.h
---- musl-0.9.15/arch/x32/atomic.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/x32/atomic.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,125 @@
-+#ifndef _INTERNAL_ATOMIC_H
-+#define _INTERNAL_ATOMIC_H
-+
-+#include <stdint.h>
-+
-+static inline int a_ctz_64(uint64_t x)
-+{
-+ __asm__( "bsf %1,%0" : "=r"(x) : "r"(x) );
-+ return x;
-+}
-+
-+static inline int a_ctz_l(unsigned long x)
-+{
-+ __asm__( "bsf %1,%0" : "=r"(x) : "r"(x) );
-+ return x;
-+}
-+
-+static inline void a_and_64(volatile uint64_t *p, uint64_t v)
-+{
-+ __asm__( "lock ; and %1, %0"
-+ : "=m"(*p) : "r"(v) : "memory" );
-+}
-+
-+static inline void a_or_64(volatile uint64_t *p, uint64_t v)
-+{
-+ __asm__( "lock ; or %1, %0"
-+ : "=m"(*p) : "r"(v) : "memory" );
-+}
-+
-+static inline void a_store_l(volatile void *p, long x)
-+{
-+ __asm__( "mov %1, %0" : "=m"(*(long *)p) : "r"(x) : "memory" );
-+}
-+
-+static inline void a_or_l(volatile void *p, long v)
-+{
-+ __asm__( "lock ; or %1, %0"
-+ : "=m"(*(long *)p) : "r"(v) : "memory" );
-+}
-+
-+static inline void *a_cas_p(volatile void *p, void *t, void *s)
-+{
-+ __asm__( "lock ; cmpxchg %3, %1"
-+ : "=a"(t), "=m"(*(long *)p) : "a"(t), "r"(s) : "memory" );
-+ return t;
-+}
-+
-+static inline long a_cas_l(volatile void *p, long t, long s)
-+{
-+ __asm__( "lock ; cmpxchg %3, %1"
-+ : "=a"(t), "=m"(*(long *)p) : "a"(t), "r"(s) : "memory" );
-+ return t;
-+}
-+
-+static inline int a_cas(volatile int *p, int t, int s)
-+{
-+ __asm__( "lock ; cmpxchg %3, %1"
-+ : "=a"(t), "=m"(*p) : "a"(t), "r"(s) : "memory" );
-+ return t;
-+}
-+
-+static inline void *a_swap_p(void *volatile *x, void *v)
-+{
-+ __asm__( "xchg %0, %1" : "=r"(v), "=m"(*(void **)x) : "0"(v) : "memory" );
-+ return v;
-+}
-+static inline long a_swap_l(volatile void *x, long v)
-+{
-+ __asm__( "xchg %0, %1" : "=r"(v), "=m"(*(long *)x) : "0"(v) : "memory" );
-+ return v;
-+}
-+
-+static inline void a_or(volatile void *p, int v)
-+{
-+ __asm__( "lock ; or %1, %0"
-+ : "=m"(*(int *)p) : "r"(v) : "memory" );
-+}
-+
-+static inline void a_and(volatile void *p, int v)
-+{
-+ __asm__( "lock ; and %1, %0"
-+ : "=m"(*(int *)p) : "r"(v) : "memory" );
-+}
-+
-+static inline int a_swap(volatile int *x, int v)
-+{
-+ __asm__( "xchg %0, %1" : "=r"(v), "=m"(*x) : "0"(v) : "memory" );
-+ return v;
-+}
-+
-+#define a_xchg a_swap
-+
-+static inline int a_fetch_add(volatile int *x, int v)
-+{
-+ __asm__( "lock ; xadd %0, %1" : "=r"(v), "=m"(*x) : "0"(v) : "memory" );
-+ return v;
-+}
-+
-+static inline void a_inc(volatile int *x)
-+{
-+ __asm__( "lock ; incl %0" : "=m"(*x) : "m"(*x) : "memory" );
-+}
-+
-+static inline void a_dec(volatile int *x)
-+{
-+ __asm__( "lock ; decl %0" : "=m"(*x) : "m"(*x) : "memory" );
-+}
-+
-+static inline void a_store(volatile int *p, int x)
-+{
-+ __asm__( "mov %1, %0" : "=m"(*p) : "r"(x) : "memory" );
-+}
-+
-+static inline void a_spin()
-+{
-+ __asm__ __volatile__( "pause" : : : "memory" );
-+}
-+
-+static inline void a_crash()
-+{
-+ __asm__ __volatile__( "hlt" : : : "memory" );
-+}
-+
-+
-+#endif
-diff -Nur musl-0.9.15/arch/x32/bits/alltypes.h.in musl-git/arch/x32/bits/alltypes.h.in
---- musl-0.9.15/arch/x32/bits/alltypes.h.in 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/x32/bits/alltypes.h.in 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,28 @@
-+#define _Addr int
-+#define _Int64 long long
-+#define _Reg long long
-+
-+TYPEDEF __builtin_va_list va_list;
-+TYPEDEF __builtin_va_list __isoc_va_list;
-+
-+#ifndef __cplusplus
-+TYPEDEF long wchar_t;
-+#endif
-+TYPEDEF unsigned wint_t;
-+
-+#if defined(__FLT_EVAL_METHOD__) && __FLT_EVAL_METHOD__ == 2
-+TYPEDEF long double float_t;
-+TYPEDEF long double double_t;
-+#else
-+TYPEDEF float float_t;
-+TYPEDEF double double_t;
-+#endif
-+
-+TYPEDEF long long time_t;
-+TYPEDEF long long suseconds_t;
-+
-+TYPEDEF struct { union { int __i[14]; unsigned long __s[7]; } __u; } pthread_attr_t;
-+TYPEDEF struct { union { int __i[10]; void *__p[5]; } __u; } pthread_mutex_t;
-+TYPEDEF struct { union { int __i[12]; void *__p[6]; } __u; } pthread_cond_t;
-+TYPEDEF struct { union { int __i[14]; void *__p[7]; } __u; } pthread_rwlock_t;
-+TYPEDEF struct { union { int __i[8]; void *__p[4]; } __u; } pthread_barrier_t;
-diff -Nur musl-0.9.15/arch/x32/bits/endian.h musl-git/arch/x32/bits/endian.h
---- musl-0.9.15/arch/x32/bits/endian.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/x32/bits/endian.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1 @@
-+#define __BYTE_ORDER __LITTLE_ENDIAN
-diff -Nur musl-0.9.15/arch/x32/bits/errno.h musl-git/arch/x32/bits/errno.h
---- musl-0.9.15/arch/x32/bits/errno.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/x32/bits/errno.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,134 @@
-+#define EPERM 1
-+#define ENOENT 2
-+#define ESRCH 3
-+#define EINTR 4
-+#define EIO 5
-+#define ENXIO 6
-+#define E2BIG 7
-+#define ENOEXEC 8
-+#define EBADF 9
-+#define ECHILD 10
-+#define EAGAIN 11
-+#define ENOMEM 12
-+#define EACCES 13
-+#define EFAULT 14
-+#define ENOTBLK 15
-+#define EBUSY 16
-+#define EEXIST 17
-+#define EXDEV 18
-+#define ENODEV 19
-+#define ENOTDIR 20
-+#define EISDIR 21
-+#define EINVAL 22
-+#define ENFILE 23
-+#define EMFILE 24
-+#define ENOTTY 25
-+#define ETXTBSY 26
-+#define EFBIG 27
-+#define ENOSPC 28
-+#define ESPIPE 29
-+#define EROFS 30
-+#define EMLINK 31
-+#define EPIPE 32
-+#define EDOM 33
-+#define ERANGE 34
-+#define EDEADLK 35
-+#define ENAMETOOLONG 36
-+#define ENOLCK 37
-+#define ENOSYS 38
-+#define ENOTEMPTY 39
-+#define ELOOP 40
-+#define EWOULDBLOCK EAGAIN
-+#define ENOMSG 42
-+#define EIDRM 43
-+#define ECHRNG 44
-+#define EL2NSYNC 45
-+#define EL3HLT 46
-+#define EL3RST 47
-+#define ELNRNG 48
-+#define EUNATCH 49
-+#define ENOCSI 50
-+#define EL2HLT 51
-+#define EBADE 52
-+#define EBADR 53
-+#define EXFULL 54
-+#define ENOANO 55
-+#define EBADRQC 56
-+#define EBADSLT 57
-+#define EDEADLOCK EDEADLK
-+#define EBFONT 59
-+#define ENOSTR 60
-+#define ENODATA 61
-+#define ETIME 62
-+#define ENOSR 63
-+#define ENONET 64
-+#define ENOPKG 65
-+#define EREMOTE 66
-+#define ENOLINK 67
-+#define EADV 68
-+#define ESRMNT 69
-+#define ECOMM 70
-+#define EPROTO 71
-+#define EMULTIHOP 72
-+#define EDOTDOT 73
-+#define EBADMSG 74
-+#define EOVERFLOW 75
-+#define ENOTUNIQ 76
-+#define EBADFD 77
-+#define EREMCHG 78
-+#define ELIBACC 79
-+#define ELIBBAD 80
-+#define ELIBSCN 81
-+#define ELIBMAX 82
-+#define ELIBEXEC 83
-+#define EILSEQ 84
-+#define ERESTART 85
-+#define ESTRPIPE 86
-+#define EUSERS 87
-+#define ENOTSOCK 88
-+#define EDESTADDRREQ 89
-+#define EMSGSIZE 90
-+#define EPROTOTYPE 91
-+#define ENOPROTOOPT 92
-+#define EPROTONOSUPPORT 93
-+#define ESOCKTNOSUPPORT 94
-+#define EOPNOTSUPP 95
-+#define ENOTSUP EOPNOTSUPP
-+#define EPFNOSUPPORT 96
-+#define EAFNOSUPPORT 97
-+#define EADDRINUSE 98
-+#define EADDRNOTAVAIL 99
-+#define ENETDOWN 100
-+#define ENETUNREACH 101
-+#define ENETRESET 102
-+#define ECONNABORTED 103
-+#define ECONNRESET 104
-+#define ENOBUFS 105
-+#define EISCONN 106
-+#define ENOTCONN 107
-+#define ESHUTDOWN 108
-+#define ETOOMANYREFS 109
-+#define ETIMEDOUT 110
-+#define ECONNREFUSED 111
-+#define EHOSTDOWN 112
-+#define EHOSTUNREACH 113
-+#define EALREADY 114
-+#define EINPROGRESS 115
-+#define ESTALE 116
-+#define EUCLEAN 117
-+#define ENOTNAM 118
-+#define ENAVAIL 119
-+#define EISNAM 120
-+#define EREMOTEIO 121
-+#define EDQUOT 122
-+#define ENOMEDIUM 123
-+#define EMEDIUMTYPE 124
-+#define ECANCELED 125
-+#define ENOKEY 126
-+#define EKEYEXPIRED 127
-+#define EKEYREVOKED 128
-+#define EKEYREJECTED 129
-+#define EOWNERDEAD 130
-+#define ENOTRECOVERABLE 131
-+#define ERFKILL 132
-+#define EHWPOISON 133
-diff -Nur musl-0.9.15/arch/x32/bits/fcntl.h musl-git/arch/x32/bits/fcntl.h
---- musl-0.9.15/arch/x32/bits/fcntl.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/x32/bits/fcntl.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,39 @@
-+#define O_CREAT 0100
-+#define O_EXCL 0200
-+#define O_NOCTTY 0400
-+#define O_TRUNC 01000
-+#define O_APPEND 02000
-+#define O_NONBLOCK 04000
-+#define O_DSYNC 010000
-+#define O_SYNC 04010000
-+#define O_RSYNC 04010000
-+#define O_DIRECTORY 0200000
-+#define O_NOFOLLOW 0400000
-+#define O_CLOEXEC 02000000
-+
-+#define O_ASYNC 020000
-+#define O_DIRECT 040000
-+#define O_LARGEFILE 0
-+#define O_NOATIME 01000000
-+#define O_TMPFILE 020200000
-+#define O_NDELAY O_NONBLOCK
-+
-+#define F_DUPFD 0
-+#define F_GETFD 1
-+#define F_SETFD 2
-+#define F_GETFL 3
-+#define F_SETFL 4
-+
-+#define F_SETOWN 8
-+#define F_GETOWN 9
-+#define F_SETSIG 10
-+#define F_GETSIG 11
-+
-+#define F_GETLK 5
-+#define F_SETLK 6
-+#define F_SETLKW 7
-+
-+#define F_SETOWN_EX 15
-+#define F_GETOWN_EX 16
-+
-+#define F_GETOWNER_UIDS 17
-diff -Nur musl-0.9.15/arch/x32/bits/fenv.h musl-git/arch/x32/bits/fenv.h
---- musl-0.9.15/arch/x32/bits/fenv.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/x32/bits/fenv.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,34 @@
-+#define FE_INVALID 1
-+#define __FE_DENORM 2
-+#define FE_DIVBYZERO 4
-+#define FE_OVERFLOW 8
-+#define FE_UNDERFLOW 16
-+#define FE_INEXACT 32
-+
-+#define FE_ALL_EXCEPT 63
-+
-+#define FE_TONEAREST 0
-+#define FE_DOWNWARD 0x400
-+#define FE_UPWARD 0x800
-+#define FE_TOWARDZERO 0xc00
-+
-+typedef unsigned short fexcept_t;
-+
-+typedef struct {
-+ unsigned short __control_word;
-+ unsigned short __unused1;
-+ unsigned short __status_word;
-+ unsigned short __unused2;
-+ unsigned short __tags;
-+ unsigned short __unused3;
-+ unsigned int __eip;
-+ unsigned short __cs_selector;
-+ unsigned int __opcode:11;
-+ unsigned int __unused4:5;
-+ unsigned int __data_offset;
-+ unsigned short __data_selector;
-+ unsigned short __unused5;
-+ unsigned int __mxcsr;
-+} fenv_t;
-+
-+#define FE_DFL_ENV ((const fenv_t *) -1)
-diff -Nur musl-0.9.15/arch/x32/bits/float.h musl-git/arch/x32/bits/float.h
---- musl-0.9.15/arch/x32/bits/float.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/x32/bits/float.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,21 @@
-+#define FLT_ROUNDS 1
-+#ifdef __FLT_EVAL_METHOD__
-+#define FLT_EVAL_METHOD __FLT_EVAL_METHOD__
-+#else
-+#define FLT_EVAL_METHOD 0
-+#endif
-+
-+#define LDBL_TRUE_MIN 3.6451995318824746025e-4951L
-+#define LDBL_MIN 3.3621031431120935063e-4932L
-+#define LDBL_MAX 1.1897314953572317650e+4932L
-+#define LDBL_EPSILON 1.0842021724855044340e-19L
-+
-+#define LDBL_MANT_DIG 64
-+#define LDBL_MIN_EXP (-16381)
-+#define LDBL_MAX_EXP 16384
-+
-+#define LDBL_DIG 18
-+#define LDBL_MIN_10_EXP (-4931)
-+#define LDBL_MAX_10_EXP 4932
-+
-+#define DECIMAL_DIG 21
-diff -Nur musl-0.9.15/arch/x32/bits/ioctl.h musl-git/arch/x32/bits/ioctl.h
---- musl-0.9.15/arch/x32/bits/ioctl.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/x32/bits/ioctl.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,197 @@
-+#define _IOC(a,b,c,d) ( ((a)<<30) | ((b)<<8) | (c) | ((d)<<16) )
-+#define _IOC_NONE 0U
-+#define _IOC_WRITE 1U
-+#define _IOC_READ 2U
-+
-+#define _IO(a,b) _IOC(_IOC_NONE,(a),(b),0)
-+#define _IOW(a,b,c) _IOC(_IOC_WRITE,(a),(b),sizeof(c))
-+#define _IOR(a,b,c) _IOC(_IOC_READ,(a),(b),sizeof(c))
-+#define _IOWR(a,b,c) _IOC(_IOC_READ|_IOC_WRITE,(a),(b),sizeof(c))
-+
-+#define TCGETS 0x5401
-+#define TCSETS 0x5402
-+#define TCSETSW 0x5403
-+#define TCSETSF 0x5404
-+#define TCGETA 0x5405
-+#define TCSETA 0x5406
-+#define TCSETAW 0x5407
-+#define TCSETAF 0x5408
-+#define TCSBRK 0x5409
-+#define TCXONC 0x540A
-+#define TCFLSH 0x540B
-+#define TIOCEXCL 0x540C
-+#define TIOCNXCL 0x540D
-+#define TIOCSCTTY 0x540E
-+#define TIOCGPGRP 0x540F
-+#define TIOCSPGRP 0x5410
-+#define TIOCOUTQ 0x5411
-+#define TIOCSTI 0x5412
-+#define TIOCGWINSZ 0x5413
-+#define TIOCSWINSZ 0x5414
-+#define TIOCMGET 0x5415
-+#define TIOCMBIS 0x5416
-+#define TIOCMBIC 0x5417
-+#define TIOCMSET 0x5418
-+#define TIOCGSOFTCAR 0x5419
-+#define TIOCSSOFTCAR 0x541A
-+#define FIONREAD 0x541B
-+#define TIOCINQ FIONREAD
-+#define TIOCLINUX 0x541C
-+#define TIOCCONS 0x541D
-+#define TIOCGSERIAL 0x541E
-+#define TIOCSSERIAL 0x541F
-+#define TIOCPKT 0x5420
-+#define FIONBIO 0x5421
-+#define TIOCNOTTY 0x5422
-+#define TIOCSETD 0x5423
-+#define TIOCGETD 0x5424
-+#define TCSBRKP 0x5425
-+#define TIOCTTYGSTRUCT 0x5426
-+#define TIOCSBRK 0x5427
-+#define TIOCCBRK 0x5428
-+#define TIOCGSID 0x5429
-+#define TIOCGPTN 0x80045430
-+#define TIOCSPTLCK 0x40045431
-+#define TCGETX 0x5432
-+#define TCSETX 0x5433
-+#define TCSETXF 0x5434
-+#define TCSETXW 0x5435
-+
-+#define FIONCLEX 0x5450
-+#define FIOCLEX 0x5451
-+#define FIOASYNC 0x5452
-+#define TIOCSERCONFIG 0x5453
-+#define TIOCSERGWILD 0x5454
-+#define TIOCSERSWILD 0x5455
-+#define TIOCGLCKTRMIOS 0x5456
-+#define TIOCSLCKTRMIOS 0x5457
-+#define TIOCSERGSTRUCT 0x5458
-+#define TIOCSERGETLSR 0x5459
-+#define TIOCSERGETMULTI 0x545A
-+#define TIOCSERSETMULTI 0x545B
-+
-+#define TIOCMIWAIT 0x545C
-+#define TIOCGICOUNT 0x545D
-+#define TIOCGHAYESESP 0x545E
-+#define TIOCSHAYESESP 0x545F
-+#define FIOQSIZE 0x5460
-+
-+#define TIOCPKT_DATA 0
-+#define TIOCPKT_FLUSHREAD 1
-+#define TIOCPKT_FLUSHWRITE 2
-+#define TIOCPKT_STOP 4
-+#define TIOCPKT_START 8
-+#define TIOCPKT_NOSTOP 16
-+#define TIOCPKT_DOSTOP 32
-+#define TIOCPKT_IOCTL 64
-+
-+#define TIOCSER_TEMT 0x01
-+
-+struct winsize {
-+ unsigned short ws_row;
-+ unsigned short ws_col;
-+ unsigned short ws_xpixel;
-+ unsigned short ws_ypixel;
-+};
-+
-+#define TIOCM_LE 0x001
-+#define TIOCM_DTR 0x002
-+#define TIOCM_RTS 0x004
-+#define TIOCM_ST 0x008
-+#define TIOCM_SR 0x010
-+#define TIOCM_CTS 0x020
-+#define TIOCM_CAR 0x040
-+#define TIOCM_RNG 0x080
-+#define TIOCM_DSR 0x100
-+#define TIOCM_CD TIOCM_CAR
-+#define TIOCM_RI TIOCM_RNG
-+#define TIOCM_OUT1 0x2000
-+#define TIOCM_OUT2 0x4000
-+#define TIOCM_LOOP 0x8000
-+#define TIOCM_MODEM_BITS TIOCM_OUT2
-+
-+#define N_TTY 0
-+#define N_SLIP 1
-+#define N_MOUSE 2
-+#define N_PPP 3
-+#define N_STRIP 4
-+#define N_AX25 5
-+#define N_X25 6
-+#define N_6PACK 7
-+#define N_MASC 8
-+#define N_R3964 9
-+#define N_PROFIBUS_FDL 10
-+#define N_IRDA 11
-+#define N_SMSBLOCK 12
-+#define N_HDLC 13
-+#define N_SYNC_PPP 14
-+#define N_HCI 15
-+
-+#define FIOSETOWN 0x8901
-+#define SIOCSPGRP 0x8902
-+#define FIOGETOWN 0x8903
-+#define SIOCGPGRP 0x8904
-+#define SIOCATMARK 0x8905
-+#define SIOCGSTAMP 0x8906
-+
-+#define SIOCADDRT 0x890B
-+#define SIOCDELRT 0x890C
-+#define SIOCRTMSG 0x890D
-+
-+#define SIOCGIFNAME 0x8910
-+#define SIOCSIFLINK 0x8911
-+#define SIOCGIFCONF 0x8912
-+#define SIOCGIFFLAGS 0x8913
-+#define SIOCSIFFLAGS 0x8914
-+#define SIOCGIFADDR 0x8915
-+#define SIOCSIFADDR 0x8916
-+#define SIOCGIFDSTADDR 0x8917
-+#define SIOCSIFDSTADDR 0x8918
-+#define SIOCGIFBRDADDR 0x8919
-+#define SIOCSIFBRDADDR 0x891a
-+#define SIOCGIFNETMASK 0x891b
-+#define SIOCSIFNETMASK 0x891c
-+#define SIOCGIFMETRIC 0x891d
-+#define SIOCSIFMETRIC 0x891e
-+#define SIOCGIFMEM 0x891f
-+#define SIOCSIFMEM 0x8920
-+#define SIOCGIFMTU 0x8921
-+#define SIOCSIFMTU 0x8922
-+#define SIOCSIFHWADDR 0x8924
-+#define SIOCGIFENCAP 0x8925
-+#define SIOCSIFENCAP 0x8926
-+#define SIOCGIFHWADDR 0x8927
-+#define SIOCGIFSLAVE 0x8929
-+#define SIOCSIFSLAVE 0x8930
-+#define SIOCADDMULTI 0x8931
-+#define SIOCDELMULTI 0x8932
-+#define SIOCGIFINDEX 0x8933
-+#define SIOGIFINDEX SIOCGIFINDEX
-+#define SIOCSIFPFLAGS 0x8934
-+#define SIOCGIFPFLAGS 0x8935
-+#define SIOCDIFADDR 0x8936
-+#define SIOCSIFHWBROADCAST 0x8937
-+#define SIOCGIFCOUNT 0x8938
-+
-+#define SIOCGIFBR 0x8940
-+#define SIOCSIFBR 0x8941
-+
-+#define SIOCGIFTXQLEN 0x8942
-+#define SIOCSIFTXQLEN 0x8943
-+
-+#define SIOCDARP 0x8953
-+#define SIOCGARP 0x8954
-+#define SIOCSARP 0x8955
-+
-+#define SIOCDRARP 0x8960
-+#define SIOCGRARP 0x8961
-+#define SIOCSRARP 0x8962
-+
-+#define SIOCGIFMAP 0x8970
-+#define SIOCSIFMAP 0x8971
-+
-+#define SIOCADDDLCI 0x8980
-+#define SIOCDELDLCI 0x8981
-+
-+#define SIOCDEVPRIVATE 0x89F0
-+#define SIOCPROTOPRIVATE 0x89E0
-diff -Nur musl-0.9.15/arch/x32/bits/io.h musl-git/arch/x32/bits/io.h
---- musl-0.9.15/arch/x32/bits/io.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/x32/bits/io.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,77 @@
-+static __inline void outb(unsigned char __val, unsigned short __port)
-+{
-+ __asm__ volatile ("outb %0,%1" : : "a" (__val), "dN" (__port));
-+}
-+
-+static __inline void outw(unsigned short __val, unsigned short __port)
-+{
-+ __asm__ volatile ("outw %0,%1" : : "a" (__val), "dN" (__port));
-+}
-+
-+static __inline void outl(unsigned int __val, unsigned short __port)
-+{
-+ __asm__ volatile ("outl %0,%1" : : "a" (__val), "dN" (__port));
-+}
-+
-+static __inline unsigned char inb(unsigned short __port)
-+{
-+ unsigned char __val;
-+ __asm__ volatile ("inb %1,%0" : "=a" (__val) : "dN" (__port));
-+ return __val;
-+}
-+
-+static __inline unsigned short inw(unsigned short __port)
-+{
-+ unsigned short __val;
-+ __asm__ volatile ("inw %1,%0" : "=a" (__val) : "dN" (__port));
-+ return __val;
-+}
-+
-+static __inline unsigned int inl(unsigned short __port)
-+{
-+ unsigned int __val;
-+ __asm__ volatile ("inl %1,%0" : "=a" (__val) : "dN" (__port));
-+ return __val;
-+}
-+
-+static __inline void outsb(unsigned short __port, const void *__buf, unsigned long __n)
-+{
-+ __asm__ volatile ("cld; rep; outsb"
-+ : "+S" (__buf), "+c" (__n)
-+ : "d" (__port));
-+}
-+
-+static __inline void outsw(unsigned short __port, const void *__buf, unsigned long __n)
-+{
-+ __asm__ volatile ("cld; rep; outsw"
-+ : "+S" (__buf), "+c" (__n)
-+ : "d" (__port));
-+}
-+
-+static __inline void outsl(unsigned short __port, const void *__buf, unsigned long __n)
-+{
-+ __asm__ volatile ("cld; rep; outsl"
-+ : "+S" (__buf), "+c"(__n)
-+ : "d" (__port));
-+}
-+
-+static __inline void insb(unsigned short __port, void *__buf, unsigned long __n)
-+{
-+ __asm__ volatile ("cld; rep; insb"
-+ : "+D" (__buf), "+c" (__n)
-+ : "d" (__port));
-+}
-+
-+static __inline void insw(unsigned short __port, void *__buf, unsigned long __n)
-+{
-+ __asm__ volatile ("cld; rep; insw"
-+ : "+D" (__buf), "+c" (__n)
-+ : "d" (__port));
-+}
-+
-+static __inline void insl(unsigned short __port, void *__buf, unsigned long __n)
-+{
-+ __asm__ volatile ("cld; rep; insl"
-+ : "+D" (__buf), "+c" (__n)
-+ : "d" (__port));
-+}
-diff -Nur musl-0.9.15/arch/x32/bits/ipc.h musl-git/arch/x32/bits/ipc.h
---- musl-0.9.15/arch/x32/bits/ipc.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/x32/bits/ipc.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,14 @@
-+struct ipc_perm
-+{
-+ key_t __ipc_perm_key;
-+ uid_t uid;
-+ gid_t gid;
-+ uid_t cuid;
-+ gid_t cgid;
-+ mode_t mode;
-+ int __ipc_perm_seq;
-+ long long __pad1;
-+ long long __pad2;
-+};
-+
-+#define IPC_64 0
-diff -Nur musl-0.9.15/arch/x32/bits/limits.h musl-git/arch/x32/bits/limits.h
---- musl-0.9.15/arch/x32/bits/limits.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/x32/bits/limits.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,8 @@
-+#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
-+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-+#define PAGE_SIZE 4096
-+#define LONG_BIT 32
-+#endif
-+
-+#define LONG_MAX 0x7fffffffL
-+#define LLONG_MAX 0x7fffffffffffffffLL
-diff -Nur musl-0.9.15/arch/x32/bits/mman.h musl-git/arch/x32/bits/mman.h
---- musl-0.9.15/arch/x32/bits/mman.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/x32/bits/mman.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,62 @@
-+#define MAP_FAILED ((void *) -1)
-+
-+#define PROT_NONE 0
-+#define PROT_READ 1
-+#define PROT_WRITE 2
-+#define PROT_EXEC 4
-+#define PROT_GROWSDOWN 0x01000000
-+#define PROT_GROWSUP 0x02000000
-+
-+#define MAP_SHARED 0x01
-+#define MAP_PRIVATE 0x02
-+#define MAP_FIXED 0x10
-+
-+#define MAP_TYPE 0x0f
-+#define MAP_FILE 0x00
-+#define MAP_ANON 0x20
-+#define MAP_ANONYMOUS MAP_ANON
-+#define MAP_32BIT 0x40
-+#define MAP_NORESERVE 0x4000
-+#define MAP_GROWSDOWN 0x0100
-+#define MAP_DENYWRITE 0x0800
-+#define MAP_EXECUTABLE 0x1000
-+#define MAP_LOCKED 0x2000
-+#define MAP_POPULATE 0x8000
-+#define MAP_NONBLOCK 0x10000
-+#define MAP_STACK 0x20000
-+#define MAP_HUGETLB 0x40000
-+
-+#define POSIX_MADV_NORMAL 0
-+#define POSIX_MADV_RANDOM 1
-+#define POSIX_MADV_SEQUENTIAL 2
-+#define POSIX_MADV_WILLNEED 3
-+#define POSIX_MADV_DONTNEED 0
-+
-+#define MS_ASYNC 1
-+#define MS_INVALIDATE 2
-+#define MS_SYNC 4
-+
-+#define MCL_CURRENT 1
-+#define MCL_FUTURE 2
-+
-+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-+#define MADV_NORMAL 0
-+#define MADV_RANDOM 1
-+#define MADV_SEQUENTIAL 2
-+#define MADV_WILLNEED 3
-+#define MADV_DONTNEED 4
-+#define MADV_REMOVE 9
-+#define MADV_DONTFORK 10
-+#define MADV_DOFORK 11
-+#define MADV_MERGEABLE 12
-+#define MADV_UNMERGEABLE 13
-+#define MADV_HUGEPAGE 14
-+#define MADV_NOHUGEPAGE 15
-+#define MADV_DONTDUMP 16
-+#define MADV_DODUMP 17
-+#define MADV_HWPOISON 100
-+#define MADV_SOFT_OFFLINE 101
-+
-+#define MREMAP_MAYMOVE 1
-+#define MREMAP_FIXED 2
-+#endif
-diff -Nur musl-0.9.15/arch/x32/bits/msg.h musl-git/arch/x32/bits/msg.h
---- musl-0.9.15/arch/x32/bits/msg.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/x32/bits/msg.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,16 @@
-+struct msqid_ds
-+{
-+ struct ipc_perm msg_perm;
-+ time_t msg_stime;
-+ time_t msg_rtime;
-+ time_t msg_ctime;
-+ unsigned long msg_cbytes;
-+ long __unused1;
-+ msgqnum_t msg_qnum;
-+ long __unused2;
-+ msglen_t msg_qbytes;
-+ long __unused3;
-+ pid_t msg_lspid;
-+ pid_t msg_lrpid;
-+ unsigned long long __unused[2];
-+};
-diff -Nur musl-0.9.15/arch/x32/bits/posix.h musl-git/arch/x32/bits/posix.h
---- musl-0.9.15/arch/x32/bits/posix.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/x32/bits/posix.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,2 @@
-+#define _POSIX_V6_LP64_OFF64 1
-+#define _POSIX_V7_LP64_OFF64 1
-diff -Nur musl-0.9.15/arch/x32/bits/reg.h musl-git/arch/x32/bits/reg.h
---- musl-0.9.15/arch/x32/bits/reg.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/x32/bits/reg.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,29 @@
-+#undef __WORDSIZE
-+#define __WORDSIZE 32
-+#define R15 0
-+#define R14 1
-+#define R13 2
-+#define R12 3
-+#define RBP 4
-+#define RBX 5
-+#define R11 6
-+#define R10 7
-+#define R9 8
-+#define R8 9
-+#define RAX 10
-+#define RCX 11
-+#define RDX 12
-+#define RSI 13
-+#define RDI 14
-+#define ORIG_RAX 15
-+#define RIP 16
-+#define CS 17
-+#define EFLAGS 18
-+#define RSP 19
-+#define SS 20
-+#define FS_BASE 21
-+#define GS_BASE 22
-+#define DS 23
-+#define ES 24
-+#define FS 25
-+#define GS 26
-diff -Nur musl-0.9.15/arch/x32/bits/sem.h musl-git/arch/x32/bits/sem.h
---- musl-0.9.15/arch/x32/bits/sem.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/x32/bits/sem.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,16 @@
-+struct semid_ds {
-+ struct ipc_perm sem_perm;
-+ time_t sem_otime;
-+ time_t __unused1;
-+ time_t sem_ctime;
-+ time_t __unused2;
-+#if __BYTE_ORDER == __LITTLE_ENDIAN
-+ unsigned short sem_nsems;
-+ char __sem_nsems_pad[sizeof(time_t)-sizeof(short)];
-+#else
-+ char __sem_nsems_pad[sizeof(time_t)-sizeof(short)];
-+ unsigned short sem_nsems;
-+#endif
-+ time_t __unused3;
-+ time_t __unused4;
-+};
-diff -Nur musl-0.9.15/arch/x32/bits/setjmp.h musl-git/arch/x32/bits/setjmp.h
---- musl-0.9.15/arch/x32/bits/setjmp.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/x32/bits/setjmp.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1 @@
-+typedef unsigned long long __jmp_buf[8];
-diff -Nur musl-0.9.15/arch/x32/bits/shm.h musl-git/arch/x32/bits/shm.h
---- musl-0.9.15/arch/x32/bits/shm.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/x32/bits/shm.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,33 @@
-+#define SHMLBA 4096
-+
-+struct shmid_ds
-+{
-+ struct ipc_perm shm_perm;
-+ size_t shm_segsz;
-+ time_t shm_atime;
-+ time_t shm_dtime;
-+ time_t shm_ctime;
-+ pid_t shm_cpid;
-+ pid_t shm_lpid;
-+ unsigned long shm_nattch;
-+ unsigned long __pad0;
-+ unsigned long long __pad1;
-+ unsigned long long __pad2;
-+};
-+
-+struct shminfo {
-+ unsigned long shmmax, __pad0, shmmin, __pad1, shmmni, __pad2,
-+ shmseg, __pad3, shmall, __pad4;
-+ unsigned long long __unused[4];
-+};
-+
-+struct shm_info {
-+ int __used_ids;
-+ int __pad_ids;
-+ unsigned long shm_tot, __pad0, shm_rss, __pad1, shm_swp, __pad2;
-+ unsigned long __swap_attempts, __pad3, __swap_successes, __pad4;
-+}
-+#ifdef __GNUC__
-+__attribute__((__aligned__(8)))
-+#endif
-+;
-diff -Nur musl-0.9.15/arch/x32/bits/signal.h musl-git/arch/x32/bits/signal.h
---- musl-0.9.15/arch/x32/bits/signal.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/x32/bits/signal.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,125 @@
-+#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
-+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-+
-+#ifdef _GNU_SOURCE
-+#define REG_R8 0
-+#define REG_R9 1
-+#define REG_R10 2
-+#define REG_R11 3
-+#define REG_R12 4
-+#define REG_R13 5
-+#define REG_R14 6
-+#define REG_R15 7
-+#define REG_RDI 8
-+#define REG_RSI 9
-+#define REG_RBP 10
-+#define REG_RBX 11
-+#define REG_RDX 12
-+#define REG_RAX 13
-+#define REG_RCX 14
-+#define REG_RSP 15
-+#define REG_RIP 16
-+#define REG_EFL 17
-+#define REG_CSGSFS 18
-+#define REG_ERR 19
-+#define REG_TRAPNO 20
-+#define REG_OLDMASK 21
-+#define REG_CR2 22
-+#endif
-+
-+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-+typedef long long greg_t, gregset_t[23];
-+typedef struct _fpstate {
-+ unsigned short cwd, swd, ftw, fop;
-+ unsigned long long rip, rdp;
-+ unsigned mxcsr, mxcr_mask;
-+ struct {
-+ unsigned short significand[4], exponent, padding[3];
-+ } _st[8];
-+ struct {
-+ unsigned element[4];
-+ } _xmm[16];
-+ unsigned padding[24];
-+} *fpregset_t;
-+struct sigcontext {
-+ unsigned long long r8, r9, r10, r11, r12, r13, r14, r15;
-+ unsigned long long rdi, rsi, rbp, rbx, rdx, rax, rcx, rsp, rip, eflags;
-+ unsigned short cs, gs, fs, __pad0;
-+ unsigned long long err, trapno, oldmask, cr2;
-+ struct _fpstate *fpstate;
-+ unsigned long long __reserved1[8];
-+};
-+typedef struct {
-+ gregset_t gregs;
-+ fpregset_t fpregs;
-+ unsigned long long __reserved1[8];
-+} mcontext_t;
-+#else
-+typedef struct {
-+ unsigned long long __space[32];
-+} mcontext_t;
-+#endif
-+
-+struct sigaltstack {
-+ void *ss_sp;
-+ int ss_flags;
-+ size_t ss_size;
-+};
-+
-+typedef struct __ucontext {
-+ unsigned long uc_flags;
-+ struct __ucontext *uc_link;
-+ stack_t uc_stack;
-+ mcontext_t uc_mcontext;
-+ sigset_t uc_sigmask;
-+ unsigned long long __fpregs_mem[64];
-+} ucontext_t;
-+
-+#define SA_NOCLDSTOP 1
-+#define SA_NOCLDWAIT 2
-+#define SA_SIGINFO 4
-+#define SA_ONSTACK 0x08000000
-+#define SA_RESTART 0x10000000
-+#define SA_NODEFER 0x40000000
-+#define SA_RESETHAND 0x80000000
-+#define SA_RESTORER 0x04000000
-+
-+#endif
-+
-+#define SIGHUP 1
-+#define SIGINT 2
-+#define SIGQUIT 3
-+#define SIGILL 4
-+#define SIGTRAP 5
-+#define SIGABRT 6
-+#define SIGIOT SIGABRT
-+#define SIGBUS 7
-+#define SIGFPE 8
-+#define SIGKILL 9
-+#define SIGUSR1 10
-+#define SIGSEGV 11
-+#define SIGUSR2 12
-+#define SIGPIPE 13
-+#define SIGALRM 14
-+#define SIGTERM 15
-+#define SIGSTKFLT 16
-+#define SIGCHLD 17
-+#define SIGCONT 18
-+#define SIGSTOP 19
-+#define SIGTSTP 20
-+#define SIGTTIN 21
-+#define SIGTTOU 22
-+#define SIGURG 23
-+#define SIGXCPU 24
-+#define SIGXFSZ 25
-+#define SIGVTALRM 26
-+#define SIGPROF 27
-+#define SIGWINCH 28
-+#define SIGIO 29
-+#define SIGPOLL 29
-+#define SIGPWR 30
-+#define SIGSYS 31
-+#define SIGUNUSED SIGSYS
-+
-+#define _NSIG 65
-+
-diff -Nur musl-0.9.15/arch/x32/bits/socket.h musl-git/arch/x32/bits/socket.h
---- musl-0.9.15/arch/x32/bits/socket.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/x32/bits/socket.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,18 @@
-+struct msghdr
-+{
-+ void *msg_name;
-+ socklen_t msg_namelen;
-+ struct iovec *msg_iov;
-+ int msg_iovlen, __pad1;
-+ void *msg_control;
-+ socklen_t msg_controllen, __pad2;
-+ int msg_flags;
-+};
-+
-+struct cmsghdr
-+{
-+ socklen_t cmsg_len;
-+ int __pad1;
-+ int cmsg_level;
-+ int cmsg_type;
-+};
-diff -Nur musl-0.9.15/arch/x32/bits/statfs.h musl-git/arch/x32/bits/statfs.h
---- musl-0.9.15/arch/x32/bits/statfs.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/x32/bits/statfs.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,9 @@
-+struct statfs {
-+ unsigned long f_type, __pad0, f_bsize, __pad1;
-+ fsblkcnt_t f_blocks, f_bfree, f_bavail;
-+ fsfilcnt_t f_files, f_ffree;
-+ fsid_t f_fsid;
-+ unsigned long f_namelen, __pad2, f_frsize, __pad3;
-+ unsigned long f_flags, __pad4;
-+ unsigned long long f_spare[4];
-+};
-diff -Nur musl-0.9.15/arch/x32/bits/stat.h musl-git/arch/x32/bits/stat.h
---- musl-0.9.15/arch/x32/bits/stat.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/x32/bits/stat.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,22 @@
-+/* copied from kernel definition, but with padding replaced
-+ * by the corresponding correctly-sized userspace types. */
-+
-+struct stat {
-+ dev_t st_dev;
-+ ino_t st_ino;
-+ nlink_t st_nlink;
-+
-+ mode_t st_mode;
-+ uid_t st_uid;
-+ gid_t st_gid;
-+ unsigned int __pad0;
-+ dev_t st_rdev;
-+ off_t st_size;
-+ blksize_t st_blksize;
-+ blkcnt_t st_blocks;
-+
-+ struct timespec st_atim;
-+ struct timespec st_mtim;
-+ struct timespec st_ctim;
-+ long long __unused[3];
-+};
-diff -Nur musl-0.9.15/arch/x32/bits/stdarg.h musl-git/arch/x32/bits/stdarg.h
---- musl-0.9.15/arch/x32/bits/stdarg.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/x32/bits/stdarg.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,4 @@
-+#define va_start(v,l) __builtin_va_start(v,l)
-+#define va_end(v) __builtin_va_end(v)
-+#define va_arg(v,l) __builtin_va_arg(v,l)
-+#define va_copy(d,s) __builtin_va_copy(d,s)
-diff -Nur musl-0.9.15/arch/x32/bits/stdint.h musl-git/arch/x32/bits/stdint.h
---- musl-0.9.15/arch/x32/bits/stdint.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/x32/bits/stdint.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,20 @@
-+typedef int32_t int_fast16_t;
-+typedef int32_t int_fast32_t;
-+typedef uint32_t uint_fast16_t;
-+typedef uint32_t uint_fast32_t;
-+
-+#define INT_FAST16_MIN INT32_MIN
-+#define INT_FAST32_MIN INT32_MIN
-+
-+#define INT_FAST16_MAX INT32_MAX
-+#define INT_FAST32_MAX INT32_MAX
-+
-+#define UINT_FAST16_MAX UINT32_MAX
-+#define UINT_FAST32_MAX UINT32_MAX
-+
-+#define INTPTR_MIN INT32_MIN
-+#define INTPTR_MAX INT32_MAX
-+#define UINTPTR_MAX UINT32_MAX
-+#define PTRDIFF_MIN INT32_MIN
-+#define PTRDIFF_MAX INT32_MAX
-+#define SIZE_MAX UINT32_MAX
-diff -Nur musl-0.9.15/arch/x32/bits/syscall.h musl-git/arch/x32/bits/syscall.h
---- musl-0.9.15/arch/x32/bits/syscall.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/x32/bits/syscall.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,634 @@
-+#define __X32_SYSCALL_BIT 0x40000000
-+#define __NR_read (__X32_SYSCALL_BIT + 0)
-+#define __NR_write (__X32_SYSCALL_BIT + 1)
-+#define __NR_open (__X32_SYSCALL_BIT + 2)
-+#define __NR_close (__X32_SYSCALL_BIT + 3)
-+#define __NR_stat (__X32_SYSCALL_BIT + 4)
-+#define __NR_fstat (__X32_SYSCALL_BIT + 5)
-+#define __NR_lstat (__X32_SYSCALL_BIT + 6)
-+#define __NR_poll (__X32_SYSCALL_BIT + 7)
-+#define __NR_lseek (__X32_SYSCALL_BIT + 8)
-+#define __NR_mmap (__X32_SYSCALL_BIT + 9)
-+#define __NR_mprotect (__X32_SYSCALL_BIT + 10)
-+#define __NR_munmap (__X32_SYSCALL_BIT + 11)
-+#define __NR_brk (__X32_SYSCALL_BIT + 12)
-+#define __NR_rt_sigprocmask (__X32_SYSCALL_BIT + 14)
-+#define __NR_pread64 (__X32_SYSCALL_BIT + 17)
-+#define __NR_pwrite64 (__X32_SYSCALL_BIT + 18)
-+#define __NR_access (__X32_SYSCALL_BIT + 21)
-+#define __NR_pipe (__X32_SYSCALL_BIT + 22)
-+#define __NR_select (__X32_SYSCALL_BIT + 23)
-+#define __NR_sched_yield (__X32_SYSCALL_BIT + 24)
-+#define __NR_mremap (__X32_SYSCALL_BIT + 25)
-+#define __NR_msync (__X32_SYSCALL_BIT + 26)
-+#define __NR_mincore (__X32_SYSCALL_BIT + 27)
-+#define __NR_madvise (__X32_SYSCALL_BIT + 28)
-+#define __NR_shmget (__X32_SYSCALL_BIT + 29)
-+#define __NR_shmat (__X32_SYSCALL_BIT + 30)
-+#define __NR_shmctl (__X32_SYSCALL_BIT + 31)
-+#define __NR_dup (__X32_SYSCALL_BIT + 32)
-+#define __NR_dup2 (__X32_SYSCALL_BIT + 33)
-+#define __NR_pause (__X32_SYSCALL_BIT + 34)
-+#define __NR_nanosleep (__X32_SYSCALL_BIT + 35)
-+#define __NR_getitimer (__X32_SYSCALL_BIT + 36)
-+#define __NR_alarm (__X32_SYSCALL_BIT + 37)
-+#define __NR_setitimer (__X32_SYSCALL_BIT + 38)
-+#define __NR_getpid (__X32_SYSCALL_BIT + 39)
-+#define __NR_sendfile (__X32_SYSCALL_BIT + 40)
-+#define __NR_socket (__X32_SYSCALL_BIT + 41)
-+#define __NR_connect (__X32_SYSCALL_BIT + 42)
-+#define __NR_accept (__X32_SYSCALL_BIT + 43)
-+#define __NR_sendto (__X32_SYSCALL_BIT + 44)
-+#define __NR_shutdown (__X32_SYSCALL_BIT + 48)
-+#define __NR_bind (__X32_SYSCALL_BIT + 49)
-+#define __NR_listen (__X32_SYSCALL_BIT + 50)
-+#define __NR_getsockname (__X32_SYSCALL_BIT + 51)
-+#define __NR_getpeername (__X32_SYSCALL_BIT + 52)
-+#define __NR_socketpair (__X32_SYSCALL_BIT + 53)
-+#define __NR_clone (__X32_SYSCALL_BIT + 56)
-+#define __NR_fork (__X32_SYSCALL_BIT + 57)
-+#define __NR_vfork (__X32_SYSCALL_BIT + 58)
-+#define __NR_exit (__X32_SYSCALL_BIT + 60)
-+#define __NR_wait4 (__X32_SYSCALL_BIT + 61)
-+#define __NR_kill (__X32_SYSCALL_BIT + 62)
-+#define __NR_uname (__X32_SYSCALL_BIT + 63)
-+#define __NR_semget (__X32_SYSCALL_BIT + 64)
-+#define __NR_semop (__X32_SYSCALL_BIT + 65)
-+#define __NR_semctl (__X32_SYSCALL_BIT + 66)
-+#define __NR_shmdt (__X32_SYSCALL_BIT + 67)
-+#define __NR_msgget (__X32_SYSCALL_BIT + 68)
-+#define __NR_msgsnd (__X32_SYSCALL_BIT + 69)
-+#define __NR_msgrcv (__X32_SYSCALL_BIT + 70)
-+#define __NR_msgctl (__X32_SYSCALL_BIT + 71)
-+#define __NR_fcntl (__X32_SYSCALL_BIT + 72)
-+#define __NR_flock (__X32_SYSCALL_BIT + 73)
-+#define __NR_fsync (__X32_SYSCALL_BIT + 74)
-+#define __NR_fdatasync (__X32_SYSCALL_BIT + 75)
-+#define __NR_truncate (__X32_SYSCALL_BIT + 76)
-+#define __NR_ftruncate (__X32_SYSCALL_BIT + 77)
-+#define __NR_getdents (__X32_SYSCALL_BIT + 78)
-+#define __NR_getcwd (__X32_SYSCALL_BIT + 79)
-+#define __NR_chdir (__X32_SYSCALL_BIT + 80)
-+#define __NR_fchdir (__X32_SYSCALL_BIT + 81)
-+#define __NR_rename (__X32_SYSCALL_BIT + 82)
-+#define __NR_mkdir (__X32_SYSCALL_BIT + 83)
-+#define __NR_rmdir (__X32_SYSCALL_BIT + 84)
-+#define __NR_creat (__X32_SYSCALL_BIT + 85)
-+#define __NR_link (__X32_SYSCALL_BIT + 86)
-+#define __NR_unlink (__X32_SYSCALL_BIT + 87)
-+#define __NR_symlink (__X32_SYSCALL_BIT + 88)
-+#define __NR_readlink (__X32_SYSCALL_BIT + 89)
-+#define __NR_chmod (__X32_SYSCALL_BIT + 90)
-+#define __NR_fchmod (__X32_SYSCALL_BIT + 91)
-+#define __NR_chown (__X32_SYSCALL_BIT + 92)
-+#define __NR_fchown (__X32_SYSCALL_BIT + 93)
-+#define __NR_lchown (__X32_SYSCALL_BIT + 94)
-+#define __NR_umask (__X32_SYSCALL_BIT + 95)
-+#define __NR_gettimeofday (__X32_SYSCALL_BIT + 96)
-+#define __NR_getrlimit (__X32_SYSCALL_BIT + 97)
-+#define __NR_getrusage (__X32_SYSCALL_BIT + 98)
-+#define __NR_sysinfo (__X32_SYSCALL_BIT + 99)
-+#define __NR_times (__X32_SYSCALL_BIT + 100)
-+#define __NR_getuid (__X32_SYSCALL_BIT + 102)
-+#define __NR_syslog (__X32_SYSCALL_BIT + 103)
-+#define __NR_getgid (__X32_SYSCALL_BIT + 104)
-+#define __NR_setuid (__X32_SYSCALL_BIT + 105)
-+#define __NR_setgid (__X32_SYSCALL_BIT + 106)
-+#define __NR_geteuid (__X32_SYSCALL_BIT + 107)
-+#define __NR_getegid (__X32_SYSCALL_BIT + 108)
-+#define __NR_setpgid (__X32_SYSCALL_BIT + 109)
-+#define __NR_getppid (__X32_SYSCALL_BIT + 110)
-+#define __NR_getpgrp (__X32_SYSCALL_BIT + 111)
-+#define __NR_setsid (__X32_SYSCALL_BIT + 112)
-+#define __NR_setreuid (__X32_SYSCALL_BIT + 113)
-+#define __NR_setregid (__X32_SYSCALL_BIT + 114)
-+#define __NR_getgroups (__X32_SYSCALL_BIT + 115)
-+#define __NR_setgroups (__X32_SYSCALL_BIT + 116)
-+#define __NR_setresuid (__X32_SYSCALL_BIT + 117)
-+#define __NR_getresuid (__X32_SYSCALL_BIT + 118)
-+#define __NR_setresgid (__X32_SYSCALL_BIT + 119)
-+#define __NR_getresgid (__X32_SYSCALL_BIT + 120)
-+#define __NR_getpgid (__X32_SYSCALL_BIT + 121)
-+#define __NR_setfsuid (__X32_SYSCALL_BIT + 122)
-+#define __NR_setfsgid (__X32_SYSCALL_BIT + 123)
-+#define __NR_getsid (__X32_SYSCALL_BIT + 124)
-+#define __NR_capget (__X32_SYSCALL_BIT + 125)
-+#define __NR_capset (__X32_SYSCALL_BIT + 126)
-+#define __NR_rt_sigsuspend (__X32_SYSCALL_BIT + 130)
-+#define __NR_utime (__X32_SYSCALL_BIT + 132)
-+#define __NR_mknod (__X32_SYSCALL_BIT + 133)
-+#define __NR_personality (__X32_SYSCALL_BIT + 135)
-+#define __NR_ustat (__X32_SYSCALL_BIT + 136)
-+#define __NR_statfs (__X32_SYSCALL_BIT + 137)
-+#define __NR_fstatfs (__X32_SYSCALL_BIT + 138)
-+#define __NR_sysfs (__X32_SYSCALL_BIT + 139)
-+#define __NR_getpriority (__X32_SYSCALL_BIT + 140)
-+#define __NR_setpriority (__X32_SYSCALL_BIT + 141)
-+#define __NR_sched_setparam (__X32_SYSCALL_BIT + 142)
-+#define __NR_sched_getparam (__X32_SYSCALL_BIT + 143)
-+#define __NR_sched_setscheduler (__X32_SYSCALL_BIT + 144)
-+#define __NR_sched_getscheduler (__X32_SYSCALL_BIT + 145)
-+#define __NR_sched_get_priority_max (__X32_SYSCALL_BIT + 146)
-+#define __NR_sched_get_priority_min (__X32_SYSCALL_BIT + 147)
-+#define __NR_sched_rr_get_interval (__X32_SYSCALL_BIT + 148)
-+#define __NR_mlock (__X32_SYSCALL_BIT + 149)
-+#define __NR_munlock (__X32_SYSCALL_BIT + 150)
-+#define __NR_mlockall (__X32_SYSCALL_BIT + 151)
-+#define __NR_munlockall (__X32_SYSCALL_BIT + 152)
-+#define __NR_vhangup (__X32_SYSCALL_BIT + 153)
-+#define __NR_modify_ldt (__X32_SYSCALL_BIT + 154)
-+#define __NR_pivot_root (__X32_SYSCALL_BIT + 155)
-+#define __NR_prctl (__X32_SYSCALL_BIT + 157)
-+#define __NR_arch_prctl (__X32_SYSCALL_BIT + 158)
-+#define __NR_adjtimex (__X32_SYSCALL_BIT + 159)
-+#define __NR_setrlimit (__X32_SYSCALL_BIT + 160)
-+#define __NR_chroot (__X32_SYSCALL_BIT + 161)
-+#define __NR_sync (__X32_SYSCALL_BIT + 162)
-+#define __NR_acct (__X32_SYSCALL_BIT + 163)
-+#define __NR_settimeofday (__X32_SYSCALL_BIT + 164)
-+#define __NR_mount (__X32_SYSCALL_BIT + 165)
-+#define __NR_umount2 (__X32_SYSCALL_BIT + 166)
-+#define __NR_swapon (__X32_SYSCALL_BIT + 167)
-+#define __NR_swapoff (__X32_SYSCALL_BIT + 168)
-+#define __NR_reboot (__X32_SYSCALL_BIT + 169)
-+#define __NR_sethostname (__X32_SYSCALL_BIT + 170)
-+#define __NR_setdomainname (__X32_SYSCALL_BIT + 171)
-+#define __NR_iopl (__X32_SYSCALL_BIT + 172)
-+#define __NR_ioperm (__X32_SYSCALL_BIT + 173)
-+#define __NR_init_module (__X32_SYSCALL_BIT + 175)
-+#define __NR_delete_module (__X32_SYSCALL_BIT + 176)
-+#define __NR_quotactl (__X32_SYSCALL_BIT + 179)
-+#define __NR_getpmsg (__X32_SYSCALL_BIT + 181)
-+#define __NR_putpmsg (__X32_SYSCALL_BIT + 182)
-+#define __NR_afs_syscall (__X32_SYSCALL_BIT + 183)
-+#define __NR_tuxcall (__X32_SYSCALL_BIT + 184)
-+#define __NR_security (__X32_SYSCALL_BIT + 185)
-+#define __NR_gettid (__X32_SYSCALL_BIT + 186)
-+#define __NR_readahead (__X32_SYSCALL_BIT + 187)
-+#define __NR_setxattr (__X32_SYSCALL_BIT + 188)
-+#define __NR_lsetxattr (__X32_SYSCALL_BIT + 189)
-+#define __NR_fsetxattr (__X32_SYSCALL_BIT + 190)
-+#define __NR_getxattr (__X32_SYSCALL_BIT + 191)
-+#define __NR_lgetxattr (__X32_SYSCALL_BIT + 192)
-+#define __NR_fgetxattr (__X32_SYSCALL_BIT + 193)
-+#define __NR_listxattr (__X32_SYSCALL_BIT + 194)
-+#define __NR_llistxattr (__X32_SYSCALL_BIT + 195)
-+#define __NR_flistxattr (__X32_SYSCALL_BIT + 196)
-+#define __NR_removexattr (__X32_SYSCALL_BIT + 197)
-+#define __NR_lremovexattr (__X32_SYSCALL_BIT + 198)
-+#define __NR_fremovexattr (__X32_SYSCALL_BIT + 199)
-+#define __NR_tkill (__X32_SYSCALL_BIT + 200)
-+#define __NR_time (__X32_SYSCALL_BIT + 201)
-+#define __NR_futex (__X32_SYSCALL_BIT + 202)
-+#define __NR_sched_setaffinity (__X32_SYSCALL_BIT + 203)
-+#define __NR_sched_getaffinity (__X32_SYSCALL_BIT + 204)
-+#define __NR_io_setup (__X32_SYSCALL_BIT + 206)
-+#define __NR_io_destroy (__X32_SYSCALL_BIT + 207)
-+#define __NR_io_getevents (__X32_SYSCALL_BIT + 208)
-+#define __NR_io_submit (__X32_SYSCALL_BIT + 209)
-+#define __NR_io_cancel (__X32_SYSCALL_BIT + 210)
-+#define __NR_lookup_dcookie (__X32_SYSCALL_BIT + 212)
-+#define __NR_epoll_create (__X32_SYSCALL_BIT + 213)
-+#define __NR_remap_file_pages (__X32_SYSCALL_BIT + 216)
-+#define __NR_getdents64 (__X32_SYSCALL_BIT + 217)
-+#define __NR_set_tid_address (__X32_SYSCALL_BIT + 218)
-+#define __NR_restart_syscall (__X32_SYSCALL_BIT + 219)
-+#define __NR_semtimedop (__X32_SYSCALL_BIT + 220)
-+#define __NR_fadvise64 (__X32_SYSCALL_BIT + 221)
-+#define __NR_timer_settime (__X32_SYSCALL_BIT + 223)
-+#define __NR_timer_gettime (__X32_SYSCALL_BIT + 224)
-+#define __NR_timer_getoverrun (__X32_SYSCALL_BIT + 225)
-+#define __NR_timer_delete (__X32_SYSCALL_BIT + 226)
-+#define __NR_clock_settime (__X32_SYSCALL_BIT + 227)
-+#define __NR_clock_gettime (__X32_SYSCALL_BIT + 228)
-+#define __NR_clock_getres (__X32_SYSCALL_BIT + 229)
-+#define __NR_clock_nanosleep (__X32_SYSCALL_BIT + 230)
-+#define __NR_exit_group (__X32_SYSCALL_BIT + 231)
-+#define __NR_epoll_wait (__X32_SYSCALL_BIT + 232)
-+#define __NR_epoll_ctl (__X32_SYSCALL_BIT + 233)
-+#define __NR_tgkill (__X32_SYSCALL_BIT + 234)
-+#define __NR_utimes (__X32_SYSCALL_BIT + 235)
-+#define __NR_mbind (__X32_SYSCALL_BIT + 237)
-+#define __NR_set_mempolicy (__X32_SYSCALL_BIT + 238)
-+#define __NR_get_mempolicy (__X32_SYSCALL_BIT + 239)
-+#define __NR_mq_open (__X32_SYSCALL_BIT + 240)
-+#define __NR_mq_unlink (__X32_SYSCALL_BIT + 241)
-+#define __NR_mq_timedsend (__X32_SYSCALL_BIT + 242)
-+#define __NR_mq_timedreceive (__X32_SYSCALL_BIT + 243)
-+#define __NR_mq_getsetattr (__X32_SYSCALL_BIT + 245)
-+#define __NR_add_key (__X32_SYSCALL_BIT + 248)
-+#define __NR_request_key (__X32_SYSCALL_BIT + 249)
-+#define __NR_keyctl (__X32_SYSCALL_BIT + 250)
-+#define __NR_ioprio_set (__X32_SYSCALL_BIT + 251)
-+#define __NR_ioprio_get (__X32_SYSCALL_BIT + 252)
-+#define __NR_inotify_init (__X32_SYSCALL_BIT + 253)
-+#define __NR_inotify_add_watch (__X32_SYSCALL_BIT + 254)
-+#define __NR_inotify_rm_watch (__X32_SYSCALL_BIT + 255)
-+#define __NR_migrate_pages (__X32_SYSCALL_BIT + 256)
-+#define __NR_openat (__X32_SYSCALL_BIT + 257)
-+#define __NR_mkdirat (__X32_SYSCALL_BIT + 258)
-+#define __NR_mknodat (__X32_SYSCALL_BIT + 259)
-+#define __NR_fchownat (__X32_SYSCALL_BIT + 260)
-+#define __NR_futimesat (__X32_SYSCALL_BIT + 261)
-+#define __NR_newfstatat (__X32_SYSCALL_BIT + 262)
-+#define __NR_unlinkat (__X32_SYSCALL_BIT + 263)
-+#define __NR_renameat (__X32_SYSCALL_BIT + 264)
-+#define __NR_linkat (__X32_SYSCALL_BIT + 265)
-+#define __NR_symlinkat (__X32_SYSCALL_BIT + 266)
-+#define __NR_readlinkat (__X32_SYSCALL_BIT + 267)
-+#define __NR_fchmodat (__X32_SYSCALL_BIT + 268)
-+#define __NR_faccessat (__X32_SYSCALL_BIT + 269)
-+#define __NR_pselect6 (__X32_SYSCALL_BIT + 270)
-+#define __NR_ppoll (__X32_SYSCALL_BIT + 271)
-+#define __NR_unshare (__X32_SYSCALL_BIT + 272)
-+#define __NR_splice (__X32_SYSCALL_BIT + 275)
-+#define __NR_tee (__X32_SYSCALL_BIT + 276)
-+#define __NR_sync_file_range (__X32_SYSCALL_BIT + 277)
-+#define __NR_utimensat (__X32_SYSCALL_BIT + 280)
-+#define __NR_epoll_pwait (__X32_SYSCALL_BIT + 281)
-+#define __NR_signalfd (__X32_SYSCALL_BIT + 282)
-+#define __NR_timerfd_create (__X32_SYSCALL_BIT + 283)
-+#define __NR_eventfd (__X32_SYSCALL_BIT + 284)
-+#define __NR_fallocate (__X32_SYSCALL_BIT + 285)
-+#define __NR_timerfd_settime (__X32_SYSCALL_BIT + 286)
-+#define __NR_timerfd_gettime (__X32_SYSCALL_BIT + 287)
-+#define __NR_accept4 (__X32_SYSCALL_BIT + 288)
-+#define __NR_signalfd4 (__X32_SYSCALL_BIT + 289)
-+#define __NR_eventfd2 (__X32_SYSCALL_BIT + 290)
-+#define __NR_epoll_create1 (__X32_SYSCALL_BIT + 291)
-+#define __NR_dup3 (__X32_SYSCALL_BIT + 292)
-+#define __NR_pipe2 (__X32_SYSCALL_BIT + 293)
-+#define __NR_inotify_init1 (__X32_SYSCALL_BIT + 294)
-+#define __NR_perf_event_open (__X32_SYSCALL_BIT + 298)
-+#define __NR_fanotify_init (__X32_SYSCALL_BIT + 300)
-+#define __NR_fanotify_mark (__X32_SYSCALL_BIT + 301)
-+#define __NR_prlimit64 (__X32_SYSCALL_BIT + 302)
-+#define __NR_name_to_handle_at (__X32_SYSCALL_BIT + 303)
-+#define __NR_open_by_handle_at (__X32_SYSCALL_BIT + 304)
-+#define __NR_clock_adjtime (__X32_SYSCALL_BIT + 305)
-+#define __NR_syncfs (__X32_SYSCALL_BIT + 306)
-+#define __NR_setns (__X32_SYSCALL_BIT + 308)
-+#define __NR_getcpu (__X32_SYSCALL_BIT + 309)
-+#define __NR_kcmp (__X32_SYSCALL_BIT + 312)
-+#define __NR_finit_module (__X32_SYSCALL_BIT + 313)
-+#define __NR_rt_sigaction (__X32_SYSCALL_BIT + 512)
-+#define __NR_rt_sigreturn (__X32_SYSCALL_BIT + 513)
-+#define __NR_ioctl (__X32_SYSCALL_BIT + 514)
-+#define __NR_readv (__X32_SYSCALL_BIT + 515)
-+#define __NR_writev (__X32_SYSCALL_BIT + 516)
-+#define __NR_recvfrom (__X32_SYSCALL_BIT + 517)
-+#define __NR_sendmsg (__X32_SYSCALL_BIT + 518)
-+#define __NR_recvmsg (__X32_SYSCALL_BIT + 519)
-+#define __NR_execve (__X32_SYSCALL_BIT + 520)
-+#define __NR_ptrace (__X32_SYSCALL_BIT + 521)
-+#define __NR_rt_sigpending (__X32_SYSCALL_BIT + 522)
-+#define __NR_rt_sigtimedwait (__X32_SYSCALL_BIT + 523)
-+#define __NR_rt_sigqueueinfo (__X32_SYSCALL_BIT + 524)
-+#define __NR_sigaltstack (__X32_SYSCALL_BIT + 525)
-+#define __NR_timer_create (__X32_SYSCALL_BIT + 526)
-+#define __NR_mq_notify (__X32_SYSCALL_BIT + 527)
-+#define __NR_kexec_load (__X32_SYSCALL_BIT + 528)
-+#define __NR_waitid (__X32_SYSCALL_BIT + 529)
-+#define __NR_set_robust_list (__X32_SYSCALL_BIT + 530)
-+#define __NR_get_robust_list (__X32_SYSCALL_BIT + 531)
-+#define __NR_vmsplice (__X32_SYSCALL_BIT + 532)
-+#define __NR_move_pages (__X32_SYSCALL_BIT + 533)
-+#define __NR_preadv (__X32_SYSCALL_BIT + 534)
-+#define __NR_pwritev (__X32_SYSCALL_BIT + 535)
-+#define __NR_rt_tgsigqueueinfo (__X32_SYSCALL_BIT + 536)
-+#define __NR_recvmmsg (__X32_SYSCALL_BIT + 537)
-+#define __NR_sendmmsg (__X32_SYSCALL_BIT + 538)
-+#define __NR_process_vm_readv (__X32_SYSCALL_BIT + 539)
-+#define __NR_process_vm_writev (__X32_SYSCALL_BIT + 540)
-+#define __NR_setsockopt (__X32_SYSCALL_BIT + 541)
-+#define __NR_getsockopt (__X32_SYSCALL_BIT + 542)
-+
-+#undef __NR_fstatat
-+#undef __NR_pread
-+#undef __NR_pwrite
-+#undef __NR_getdents
-+#define __NR_fstatat __NR_newfstatat
-+#define __NR_pread __NR_pread64
-+#define __NR_pwrite __NR_pwrite64
-+#define __NR_getdents __NR_getdents64
-+#define __NR_fadvise __NR_fadvise64
-+
-+
-+
-+/* Repeat with SYS_ prefix */
-+
-+
-+
-+#define SYS_read __NR_read
-+#define SYS_write __NR_write
-+#define SYS_open __NR_open
-+#define SYS_close __NR_close
-+#define SYS_stat __NR_stat
-+#define SYS_fstat __NR_fstat
-+#define SYS_lstat __NR_lstat
-+#define SYS_poll __NR_poll
-+#define SYS_lseek __NR_lseek
-+#define SYS_mmap __NR_mmap
-+#define SYS_mprotect __NR_mprotect
-+#define SYS_munmap __NR_munmap
-+#define SYS_brk __NR_brk
-+#define SYS_rt_sigprocmask __NR_rt_sigprocmask
-+#define SYS_pread64 __NR_pread64
-+#define SYS_pwrite64 __NR_pwrite64
-+#define SYS_access __NR_access
-+#define SYS_pipe __NR_pipe
-+#define SYS_select __NR_select
-+#define SYS_sched_yield __NR_sched_yield
-+#define SYS_mremap __NR_mremap
-+#define SYS_msync __NR_msync
-+#define SYS_mincore __NR_mincore
-+#define SYS_madvise __NR_madvise
-+#define SYS_shmget __NR_shmget
-+#define SYS_shmat __NR_shmat
-+#define SYS_shmctl __NR_shmctl
-+#define SYS_dup __NR_dup
-+#define SYS_dup2 __NR_dup2
-+#define SYS_pause __NR_pause
-+#define SYS_nanosleep __NR_nanosleep
-+#define SYS_getitimer __NR_getitimer
-+#define SYS_alarm __NR_alarm
-+#define SYS_setitimer __NR_setitimer
-+#define SYS_getpid __NR_getpid
-+#define SYS_sendfile __NR_sendfile
-+#define SYS_socket __NR_socket
-+#define SYS_connect __NR_connect
-+#define SYS_accept __NR_accept
-+#define SYS_sendto __NR_sendto
-+#define SYS_shutdown __NR_shutdown
-+#define SYS_bind __NR_bind
-+#define SYS_listen __NR_listen
-+#define SYS_getsockname __NR_getsockname
-+#define SYS_getpeername __NR_getpeername
-+#define SYS_socketpair __NR_socketpair
-+#define SYS_clone __NR_clone
-+#define SYS_fork __NR_fork
-+#define SYS_vfork __NR_vfork
-+#define SYS_exit __NR_exit
-+#define SYS_wait4 __NR_wait4
-+#define SYS_kill __NR_kill
-+#define SYS_uname __NR_uname
-+#define SYS_semget __NR_semget
-+#define SYS_semop __NR_semop
-+#define SYS_semctl __NR_semctl
-+#define SYS_shmdt __NR_shmdt
-+#define SYS_msgget __NR_msgget
-+#define SYS_msgsnd __NR_msgsnd
-+#define SYS_msgrcv __NR_msgrcv
-+#define SYS_msgctl __NR_msgctl
-+#define SYS_fcntl __NR_fcntl
-+#define SYS_flock __NR_flock
-+#define SYS_fsync __NR_fsync
-+#define SYS_fdatasync __NR_fdatasync
-+#define SYS_truncate __NR_truncate
-+#define SYS_ftruncate __NR_ftruncate
-+#define SYS_getdents __NR_getdents
-+#define SYS_getcwd __NR_getcwd
-+#define SYS_chdir __NR_chdir
-+#define SYS_fchdir __NR_fchdir
-+#define SYS_rename __NR_rename
-+#define SYS_mkdir __NR_mkdir
-+#define SYS_rmdir __NR_rmdir
-+#define SYS_creat __NR_creat
-+#define SYS_link __NR_link
-+#define SYS_unlink __NR_unlink
-+#define SYS_symlink __NR_symlink
-+#define SYS_readlink __NR_readlink
-+#define SYS_chmod __NR_chmod
-+#define SYS_fchmod __NR_fchmod
-+#define SYS_chown __NR_chown
-+#define SYS_fchown __NR_fchown
-+#define SYS_lchown __NR_lchown
-+#define SYS_umask __NR_umask
-+#define SYS_gettimeofday __NR_gettimeofday
-+#define SYS_getrlimit __NR_getrlimit
-+#define SYS_getrusage __NR_getrusage
-+#define SYS_sysinfo __NR_sysinfo
-+#define SYS_times __NR_times
-+#define SYS_getuid __NR_getuid
-+#define SYS_syslog __NR_syslog
-+#define SYS_getgid __NR_getgid
-+#define SYS_setuid __NR_setuid
-+#define SYS_setgid __NR_setgid
-+#define SYS_geteuid __NR_geteuid
-+#define SYS_getegid __NR_getegid
-+#define SYS_setpgid __NR_setpgid
-+#define SYS_getppid __NR_getppid
-+#define SYS_getpgrp __NR_getpgrp
-+#define SYS_setsid __NR_setsid
-+#define SYS_setreuid __NR_setreuid
-+#define SYS_setregid __NR_setregid
-+#define SYS_getgroups __NR_getgroups
-+#define SYS_setgroups __NR_setgroups
-+#define SYS_setresuid __NR_setresuid
-+#define SYS_getresuid __NR_getresuid
-+#define SYS_setresgid __NR_setresgid
-+#define SYS_getresgid __NR_getresgid
-+#define SYS_getpgid __NR_getpgid
-+#define SYS_setfsuid __NR_setfsuid
-+#define SYS_setfsgid __NR_setfsgid
-+#define SYS_getsid __NR_getsid
-+#define SYS_capget __NR_capget
-+#define SYS_capset __NR_capset
-+#define SYS_rt_sigsuspend __NR_rt_sigsuspend
-+#define SYS_utime __NR_utime
-+#define SYS_mknod __NR_mknod
-+#define SYS_personality __NR_personality
-+#define SYS_ustat __NR_ustat
-+#define SYS_statfs __NR_statfs
-+#define SYS_fstatfs __NR_fstatfs
-+#define SYS_sysfs __NR_sysfs
-+#define SYS_getpriority __NR_getpriority
-+#define SYS_setpriority __NR_setpriority
-+#define SYS_sched_setparam __NR_sched_setparam
-+#define SYS_sched_getparam __NR_sched_getparam
-+#define SYS_sched_setscheduler __NR_sched_setscheduler
-+#define SYS_sched_getscheduler __NR_sched_getscheduler
-+#define SYS_sched_get_priority_max __NR_sched_get_priority_max
-+#define SYS_sched_get_priority_min __NR_sched_get_priority_min
-+#define SYS_sched_rr_get_interval __NR_sched_rr_get_interval
-+#define SYS_mlock __NR_mlock
-+#define SYS_munlock __NR_munlock
-+#define SYS_mlockall __NR_mlockall
-+#define SYS_munlockall __NR_munlockall
-+#define SYS_vhangup __NR_vhangup
-+#define SYS_modify_ldt __NR_modify_ldt
-+#define SYS_pivot_root __NR_pivot_root
-+#define SYS_prctl __NR_prctl
-+#define SYS_arch_prctl __NR_arch_prctl
-+#define SYS_adjtimex __NR_adjtimex
-+#define SYS_setrlimit __NR_setrlimit
-+#define SYS_chroot __NR_chroot
-+#define SYS_sync __NR_sync
-+#define SYS_acct __NR_acct
-+#define SYS_settimeofday __NR_settimeofday
-+#define SYS_mount __NR_mount
-+#define SYS_umount2 __NR_umount2
-+#define SYS_swapon __NR_swapon
-+#define SYS_swapoff __NR_swapoff
-+#define SYS_reboot __NR_reboot
-+#define SYS_sethostname __NR_sethostname
-+#define SYS_setdomainname __NR_setdomainname
-+#define SYS_iopl __NR_iopl
-+#define SYS_ioperm __NR_ioperm
-+#define SYS_init_module __NR_init_module
-+#define SYS_delete_module __NR_delete_module
-+#define SYS_quotactl __NR_quotactl
-+#define SYS_getpmsg __NR_getpmsg
-+#define SYS_putpmsg __NR_putpmsg
-+#define SYS_afs_syscall __NR_afs_syscall
-+#define SYS_tuxcall __NR_tuxcall
-+#define SYS_security __NR_security
-+#define SYS_gettid __NR_gettid
-+#define SYS_readahead __NR_readahead
-+#define SYS_setxattr __NR_setxattr
-+#define SYS_lsetxattr __NR_lsetxattr
-+#define SYS_fsetxattr __NR_fsetxattr
-+#define SYS_getxattr __NR_getxattr
-+#define SYS_lgetxattr __NR_lgetxattr
-+#define SYS_fgetxattr __NR_fgetxattr
-+#define SYS_listxattr __NR_listxattr
-+#define SYS_llistxattr __NR_llistxattr
-+#define SYS_flistxattr __NR_flistxattr
-+#define SYS_removexattr __NR_removexattr
-+#define SYS_lremovexattr __NR_lremovexattr
-+#define SYS_fremovexattr __NR_fremovexattr
-+#define SYS_tkill __NR_tkill
-+#define SYS_time __NR_time
-+#define SYS_futex __NR_futex
-+#define SYS_sched_setaffinity __NR_sched_setaffinity
-+#define SYS_sched_getaffinity __NR_sched_getaffinity
-+#define SYS_io_setup __NR_io_setup
-+#define SYS_io_destroy __NR_io_destroy
-+#define SYS_io_getevents __NR_io_getevents
-+#define SYS_io_submit __NR_io_submit
-+#define SYS_io_cancel __NR_io_cancel
-+#define SYS_lookup_dcookie __NR_lookup_dcookie
-+#define SYS_epoll_create __NR_epoll_create
-+#define SYS_remap_file_pages __NR_remap_file_pages
-+#define SYS_getdents64 __NR_getdents64
-+#define SYS_set_tid_address __NR_set_tid_address
-+#define SYS_restart_syscall __NR_restart_syscall
-+#define SYS_semtimedop __NR_semtimedop
-+#define SYS_fadvise64 __NR_fadvise64
-+#define SYS_timer_settime __NR_timer_settime
-+#define SYS_timer_gettime __NR_timer_gettime
-+#define SYS_timer_getoverrun __NR_timer_getoverrun
-+#define SYS_timer_delete __NR_timer_delete
-+#define SYS_clock_settime __NR_clock_settime
-+#define SYS_clock_gettime __NR_clock_gettime
-+#define SYS_clock_getres __NR_clock_getres
-+#define SYS_clock_nanosleep __NR_clock_nanosleep
-+#define SYS_exit_group __NR_exit_group
-+#define SYS_epoll_wait __NR_epoll_wait
-+#define SYS_epoll_ctl __NR_epoll_ctl
-+#define SYS_tgkill __NR_tgkill
-+#define SYS_utimes __NR_utimes
-+#define SYS_mbind __NR_mbind
-+#define SYS_set_mempolicy __NR_set_mempolicy
-+#define SYS_get_mempolicy __NR_get_mempolicy
-+#define SYS_mq_open __NR_mq_open
-+#define SYS_mq_unlink __NR_mq_unlink
-+#define SYS_mq_timedsend __NR_mq_timedsend
-+#define SYS_mq_timedreceive __NR_mq_timedreceive
-+#define SYS_mq_getsetattr __NR_mq_getsetattr
-+#define SYS_add_key __NR_add_key
-+#define SYS_request_key __NR_request_key
-+#define SYS_keyctl __NR_keyctl
-+#define SYS_ioprio_set __NR_ioprio_set
-+#define SYS_ioprio_get __NR_ioprio_get
-+#define SYS_inotify_init __NR_inotify_init
-+#define SYS_inotify_add_watch __NR_inotify_add_watch
-+#define SYS_inotify_rm_watch __NR_inotify_rm_watch
-+#define SYS_migrate_pages __NR_migrate_pages
-+#define SYS_openat __NR_openat
-+#define SYS_mkdirat __NR_mkdirat
-+#define SYS_mknodat __NR_mknodat
-+#define SYS_fchownat __NR_fchownat
-+#define SYS_futimesat __NR_futimesat
-+#define SYS_newfstatat __NR_newfstatat
-+#define SYS_unlinkat __NR_unlinkat
-+#define SYS_renameat __NR_renameat
-+#define SYS_linkat __NR_linkat
-+#define SYS_symlinkat __NR_symlinkat
-+#define SYS_readlinkat __NR_readlinkat
-+#define SYS_fchmodat __NR_fchmodat
-+#define SYS_faccessat __NR_faccessat
-+#define SYS_pselect6 __NR_pselect6
-+#define SYS_ppoll __NR_ppoll
-+#define SYS_unshare __NR_unshare
-+#define SYS_splice __NR_splice
-+#define SYS_tee __NR_tee
-+#define SYS_sync_file_range __NR_sync_file_range
-+#define SYS_utimensat __NR_utimensat
-+#define SYS_epoll_pwait __NR_epoll_pwait
-+#define SYS_signalfd __NR_signalfd
-+#define SYS_timerfd_create __NR_timerfd_create
-+#define SYS_eventfd __NR_eventfd
-+#define SYS_fallocate __NR_fallocate
-+#define SYS_timerfd_settime __NR_timerfd_settime
-+#define SYS_timerfd_gettime __NR_timerfd_gettime
-+#define SYS_accept4 __NR_accept4
-+#define SYS_signalfd4 __NR_signalfd4
-+#define SYS_eventfd2 __NR_eventfd2
-+#define SYS_epoll_create1 __NR_epoll_create1
-+#define SYS_dup3 __NR_dup3
-+#define SYS_pipe2 __NR_pipe2
-+#define SYS_inotify_init1 __NR_inotify_init1
-+#define SYS_perf_event_open __NR_perf_event_open
-+#define SYS_fanotify_init __NR_fanotify_init
-+#define SYS_fanotify_mark __NR_fanotify_mark
-+#define SYS_prlimit64 __NR_prlimit64
-+#define SYS_name_to_handle_at __NR_name_to_handle_at
-+#define SYS_open_by_handle_at __NR_open_by_handle_at
-+#define SYS_clock_adjtime __NR_clock_adjtime
-+#define SYS_syncfs __NR_syncfs
-+#define SYS_setns __NR_setns
-+#define SYS_getcpu __NR_getcpu
-+#define SYS_kcmp __NR_kcmp
-+#define SYS_finit_module __NR_finit_module
-+#define SYS_rt_sigaction __NR_rt_sigaction
-+#define SYS_rt_sigreturn __NR_rt_sigreturn
-+#define SYS_ioctl __NR_ioctl
-+#define SYS_readv __NR_readv
-+#define SYS_writev __NR_writev
-+#define SYS_recvfrom __NR_recvfrom
-+#define SYS_sendmsg __NR_sendmsg
-+#define SYS_recvmsg __NR_recvmsg
-+#define SYS_execve __NR_execve
-+#define SYS_ptrace __NR_ptrace
-+#define SYS_rt_sigpending __NR_rt_sigpending
-+#define SYS_rt_sigtimedwait __NR_rt_sigtimedwait
-+#define SYS_rt_sigqueueinfo __NR_rt_sigqueueinfo
-+#define SYS_sigaltstack __NR_sigaltstack
-+#define SYS_timer_create __NR_timer_create
-+#define SYS_mq_notify __NR_mq_notify
-+#define SYS_kexec_load __NR_kexec_load
-+#define SYS_waitid __NR_waitid
-+#define SYS_set_robust_list __NR_set_robust_list
-+#define SYS_get_robust_list __NR_get_robust_list
-+#define SYS_vmsplice __NR_vmsplice
-+#define SYS_move_pages __NR_move_pages
-+#define SYS_preadv __NR_preadv
-+#define SYS_pwritev __NR_pwritev
-+#define SYS_rt_tgsigqueueinfo __NR_rt_tgsigqueueinfo
-+#define SYS_recvmmsg __NR_recvmmsg
-+#define SYS_sendmmsg __NR_sendmmsg
-+#define SYS_process_vm_readv __NR_process_vm_readv
-+#define SYS_process_vm_writev __NR_process_vm_writev
-+#define SYS_setsockopt __NR_setsockopt
-+#define SYS_getsockopt __NR_getsockopt
-+
-+#undef SYS_fstatat
-+#undef SYS_pread
-+#undef SYS_pwrite
-+#undef SYS_getdents
-+#define SYS_fstatat SYS_newfstatat
-+#define SYS_pread SYS_pread64
-+#define SYS_pwrite SYS_pwrite64
-+#define SYS_getdents SYS_getdents64
-+#define SYS_fadvise SYS_fadvise64
-diff -Nur musl-0.9.15/arch/x32/bits/termios.h musl-git/arch/x32/bits/termios.h
---- musl-0.9.15/arch/x32/bits/termios.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/x32/bits/termios.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,160 @@
-+struct termios
-+{
-+ tcflag_t c_iflag;
-+ tcflag_t c_oflag;
-+ tcflag_t c_cflag;
-+ tcflag_t c_lflag;
-+ cc_t c_line;
-+ cc_t c_cc[NCCS];
-+ speed_t __c_ispeed;
-+ speed_t __c_ospeed;
-+};
-+
-+#define VINTR 0
-+#define VQUIT 1
-+#define VERASE 2
-+#define VKILL 3
-+#define VEOF 4
-+#define VTIME 5
-+#define VMIN 6
-+#define VSWTC 7
-+#define VSTART 8
-+#define VSTOP 9
-+#define VSUSP 10
-+#define VEOL 11
-+#define VREPRINT 12
-+#define VDISCARD 13
-+#define VWERASE 14
-+#define VLNEXT 15
-+#define VEOL2 16
-+
-+#define IGNBRK 0000001
-+#define BRKINT 0000002
-+#define IGNPAR 0000004
-+#define PARMRK 0000010
-+#define INPCK 0000020
-+#define ISTRIP 0000040
-+#define INLCR 0000100
-+#define IGNCR 0000200
-+#define ICRNL 0000400
-+#define IUCLC 0001000
-+#define IXON 0002000
-+#define IXANY 0004000
-+#define IXOFF 0010000
-+#define IMAXBEL 0020000
-+#define IUTF8 0040000
-+
-+#define OPOST 0000001
-+#define OLCUC 0000002
-+#define ONLCR 0000004
-+#define OCRNL 0000010
-+#define ONOCR 0000020
-+#define ONLRET 0000040
-+#define OFILL 0000100
-+#define OFDEL 0000200
-+#define NLDLY 0000400
-+#define NL0 0000000
-+#define NL1 0000400
-+#define CRDLY 0003000
-+#define CR0 0000000
-+#define CR1 0001000
-+#define CR2 0002000
-+#define CR3 0003000
-+#define TABDLY 0014000
-+#define TAB0 0000000
-+#define TAB1 0004000
-+#define TAB2 0010000
-+#define TAB3 0014000
-+#define BSDLY 0020000
-+#define BS0 0000000
-+#define BS1 0020000
-+#define FFDLY 0100000
-+#define FF0 0000000
-+#define FF1 0100000
-+
-+#define VTDLY 0040000
-+#define VT0 0000000
-+#define VT1 0040000
-+
-+#define B0 0000000
-+#define B50 0000001
-+#define B75 0000002
-+#define B110 0000003
-+#define B134 0000004
-+#define B150 0000005
-+#define B200 0000006
-+#define B300 0000007
-+#define B600 0000010
-+#define B1200 0000011
-+#define B1800 0000012
-+#define B2400 0000013
-+#define B4800 0000014
-+#define B9600 0000015
-+#define B19200 0000016
-+#define B38400 0000017
-+
-+#define B57600 0010001
-+#define B115200 0010002
-+#define B230400 0010003
-+#define B460800 0010004
-+#define B500000 0010005
-+#define B576000 0010006
-+#define B921600 0010007
-+#define B1000000 0010010
-+#define B1152000 0010011
-+#define B1500000 0010012
-+#define B2000000 0010013
-+#define B2500000 0010014
-+#define B3000000 0010015
-+#define B3500000 0010016
-+#define B4000000 0010017
-+
-+#define CBAUD 0010017
-+
-+#define CSIZE 0000060
-+#define CS5 0000000
-+#define CS6 0000020
-+#define CS7 0000040
-+#define CS8 0000060
-+#define CSTOPB 0000100
-+#define CREAD 0000200
-+#define PARENB 0000400
-+#define PARODD 0001000
-+#define HUPCL 0002000
-+#define CLOCAL 0004000
-+
-+#define ISIG 0000001
-+#define ICANON 0000002
-+#define ECHO 0000010
-+#define ECHOE 0000020
-+#define ECHOK 0000040
-+#define ECHONL 0000100
-+#define NOFLSH 0000200
-+#define TOSTOP 0000400
-+#define IEXTEN 0100000
-+
-+#define ECHOCTL 0001000
-+#define ECHOPRT 0002000
-+#define ECHOKE 0004000
-+#define FLUSHO 0010000
-+#define PENDIN 0040000
-+
-+#define TCOOFF 0
-+#define TCOON 1
-+#define TCIOFF 2
-+#define TCION 3
-+
-+#define TCIFLUSH 0
-+#define TCOFLUSH 1
-+#define TCIOFLUSH 2
-+
-+#define TCSANOW 0
-+#define TCSADRAIN 1
-+#define TCSAFLUSH 2
-+
-+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-+#define CBAUDEX 0010000
-+#define CRTSCTS 020000000000
-+#define EXTPROC 0200000
-+#define XTABS 0014000
-+#endif
-diff -Nur musl-0.9.15/arch/x32/bits/user.h musl-git/arch/x32/bits/user.h
---- musl-0.9.15/arch/x32/bits/user.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/x32/bits/user.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,44 @@
-+#undef __WORDSIZE
-+#define __WORDSIZE 64
-+
-+typedef struct user_fpregs_struct
-+{
-+ uint16_t cwd, swd, ftw, fop;
-+ uint64_t rip, rdp;
-+ uint32_t mxcsr, mxcs_mask;
-+ uint32_t st_space[32], xmm_space[64], padding[24];
-+} elf_fpregset_t;
-+
-+struct user_regs_struct
-+{
-+ unsigned long r15, r14, r13, r12, rbp, rbx, r11, r10, r9, r8;
-+ unsigned long rax, rcx, rdx, rsi, rdi, orig_rax, rip;
-+ unsigned long cs, eflags, rsp, ss, fs_base, gs_base, ds, es, fs, gs;
-+};
-+#define ELF_NGREG 27
-+typedef unsigned long long elf_greg_t, elf_gregset_t[ELF_NGREG];
-+
-+struct user
-+{
-+ struct user_regs_struct regs;
-+ int u_fpvalid;
-+ struct user_fpregs_struct i387;
-+ unsigned long u_tsize;
-+ unsigned long u_dsize;
-+ unsigned long u_ssize;
-+ unsigned long start_code;
-+ unsigned long start_stack;
-+ long signal;
-+ int reserved;
-+ struct user_regs_struct *u_ar0;
-+ struct user_fpregs_struct *u_fpstate;
-+ unsigned long magic;
-+ char u_comm[32];
-+ unsigned long u_debugreg[8];
-+};
-+
-+#define PAGE_MASK (~(PAGE_SIZE-1))
-+#define NBPG PAGE_SIZE
-+#define UPAGES 1
-+#define HOST_TEXT_START_ADDR (u.start_code)
-+#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
-diff -Nur musl-0.9.15/arch/x32/crt_arch.h musl-git/arch/x32/crt_arch.h
---- musl-0.9.15/arch/x32/crt_arch.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/x32/crt_arch.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,9 @@
-+__asm__("\
-+.text \n\
-+.global _start \n\
-+_start: \n\
-+ xor %rbp,%rbp \n\
-+ mov %rsp,%rdi \n\
-+ andq $-16,%rsp \n\
-+ call __cstart \n\
-+");
-diff -Nur musl-0.9.15/arch/x32/pthread_arch.h musl-git/arch/x32/pthread_arch.h
---- musl-0.9.15/arch/x32/pthread_arch.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/x32/pthread_arch.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,10 @@
-+static inline struct pthread *__pthread_self()
-+{
-+ struct pthread *self;
-+ __asm__ __volatile__ ("mov %%fs:0,%0" : "=r" (self) );
-+ return self;
-+}
-+
-+#define TP_ADJ(p) (p)
-+
-+#define CANCEL_REG_IP 16
-diff -Nur musl-0.9.15/arch/x32/reloc.h musl-git/arch/x32/reloc.h
---- musl-0.9.15/arch/x32/reloc.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/x32/reloc.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,46 @@
-+#include <stdint.h>
-+#include <string.h>
-+#include <elf.h>
-+
-+#define LDSO_ARCH "x32"
-+
-+#define IS_COPY(x) ((x)==R_X86_64_COPY)
-+#define IS_PLT(x) ((x)==R_X86_64_JUMP_SLOT)
-+
-+static inline void do_single_reloc(
-+ struct dso *self, unsigned char *base_addr,
-+ size_t *reloc_addr, int type, size_t addend,
-+ Sym *sym, size_t sym_size,
-+ struct symdef def, size_t sym_val)
-+{
-+ switch(type) {
-+ case R_X86_64_GLOB_DAT:
-+ case R_X86_64_JUMP_SLOT:
-+ case R_X86_64_64:
-+ *reloc_addr = sym_val + addend;
-+ break;
-+ case R_X86_64_32:
-+ *(uint32_t *)reloc_addr = sym_val + addend;
-+ break;
-+ case R_X86_64_PC32:
-+ *reloc_addr = sym_val + addend - (size_t)reloc_addr + (size_t)base_addr;
-+ break;
-+ case R_X86_64_RELATIVE:
-+ *reloc_addr = (size_t)base_addr + addend;
-+ break;
-+ case R_X86_64_COPY:
-+ memcpy(reloc_addr, (void *)sym_val, sym_size);
-+ break;
-+ case R_X86_64_DTPMOD64:
-+ *reloc_addr = def.dso ? def.dso->tls_id : self->tls_id;
-+ break;
-+ case R_X86_64_DTPOFF64:
-+ *reloc_addr = def.sym->st_value + addend;
-+ break;
-+ case R_X86_64_TPOFF64:
-+ *reloc_addr = (def.sym
-+ ? def.sym->st_value - def.dso->tls_offset
-+ : 0 - self->tls_offset) + addend;
-+ break;
-+ }
-+}
-diff -Nur musl-0.9.15/arch/x32/src/syscall_cp_fixup.c musl-git/arch/x32/src/syscall_cp_fixup.c
---- musl-0.9.15/arch/x32/src/syscall_cp_fixup.c 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/x32/src/syscall_cp_fixup.c 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,31 @@
-+#include <sys/syscall.h>
-+long __syscall_cp_internal(volatile void*, long long, long long, long long, long long,
-+ long long, long long, long long);
-+
-+struct __timespec { long long tv_sec; long tv_nsec; };
-+struct __timespec_kernel { long long tv_sec; long long tv_nsec; };
-+#define __tsc(X) ((struct __timespec*)(unsigned long)(X))
-+#define __fixup(X) do { if(X) X = (unsigned long) (&(struct __timespec_kernel) \
-+ { .tv_sec = __tsc(X)->tv_sec, .tv_nsec = __tsc(X)->tv_nsec}); } while(0)
-+
-+long __syscall_cp_asm (volatile void * foo, long long n, long long a1, long long a2, long long a3,
-+ long long a4, long long a5, long long a6) {
-+ switch (n) {
-+ case SYS_mq_timedsend: case SYS_mq_timedreceive: case SYS_pselect6:
-+ __fixup(a5);
-+ break;
-+ case SYS_futex:
-+ if((a2 & (~128 /* FUTEX_PRIVATE_FLAG */)) == 0 /* FUTEX_WAIT */)
-+ __fixup(a4);
-+ break;
-+ case SYS_clock_nanosleep:
-+ case SYS_rt_sigtimedwait: case SYS_ppoll:
-+ __fixup(a3);
-+ break;
-+ case SYS_nanosleep:
-+ __fixup(a1);
-+ break;
-+ }
-+ return __syscall_cp_internal(foo, n, a1, a2, a3, a4, a5, a6);
-+}
-+
-diff -Nur musl-0.9.15/arch/x32/src/sysinfo.c musl-git/arch/x32/src/sysinfo.c
---- musl-0.9.15/arch/x32/src/sysinfo.c 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/x32/src/sysinfo.c 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,47 @@
-+#include <sys/sysinfo.h>
-+#include "syscall.h"
-+
-+#define klong long long
-+#define kulong unsigned long long
-+
-+struct kernel_sysinfo {
-+ klong uptime;
-+ kulong loads[3];
-+ kulong totalram;
-+ kulong freeram;
-+ kulong sharedram;
-+ kulong bufferram;
-+ kulong totalswap;
-+ kulong freeswap;
-+ short procs;
-+ short pad;
-+ kulong totalhigh;
-+ kulong freehigh;
-+ unsigned mem_unit;
-+};
-+
-+int __x32_sysinfo(struct sysinfo *info)
-+{
-+ struct kernel_sysinfo tmp;
-+ int ret = syscall(SYS_sysinfo, &tmp);
-+ if(ret == -1) return ret;
-+ info->uptime = tmp.uptime;
-+ info->loads[0] = tmp.loads[0];
-+ info->loads[1] = tmp.loads[1];
-+ info->loads[2] = tmp.loads[2];
-+ kulong shifts;
-+ kulong max = tmp.totalram | tmp.totalswap;
-+ __asm__("bsr %1,%0" : "=r"(shifts) : "r"(max));
-+ shifts = shifts >= 32 ? shifts - 31 : 0;
-+ info->totalram = tmp.totalram >> shifts;
-+ info->freeram = tmp.freeram >> shifts;
-+ info->sharedram = tmp.sharedram >> shifts;
-+ info->bufferram = tmp.bufferram >> shifts;
-+ info->totalswap = tmp.totalswap >> shifts;
-+ info->freeswap = tmp.freeswap >> shifts;
-+ info->procs = tmp.procs ;
-+ info->totalhigh = tmp.totalhigh >> shifts;
-+ info->freehigh = tmp.freehigh >> shifts;
-+ info->mem_unit = (tmp.mem_unit ? tmp.mem_unit : 1) << shifts;
-+ return ret;
-+}
-diff -Nur musl-0.9.15/arch/x32/syscall_arch.h musl-git/arch/x32/syscall_arch.h
---- musl-0.9.15/arch/x32/syscall_arch.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/x32/syscall_arch.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,117 @@
-+#define __SYSCALL_LL_E(x) (x)
-+#define __SYSCALL_LL_O(x) (x)
-+
-+#define __scc(X) sizeof(1?(X):0ULL) < 8 ? (unsigned long) (X) : (long long) (X)
-+typedef long long syscall_arg_t;
-+struct __timespec { long long tv_sec; long tv_nsec; };
-+struct __timespec_kernel { long long tv_sec; long long tv_nsec; };
-+#define __tsc(X) ((struct __timespec*)(unsigned long)(X))
-+#define __fixup(X) do { if(X) X = (unsigned long) (&(struct __timespec_kernel) \
-+ { .tv_sec = __tsc(X)->tv_sec, .tv_nsec = __tsc(X)->tv_nsec}); } while(0)
-+#define __fixup_case_2 \
-+ case SYS_nanosleep: \
-+ __fixup(a1); break; \
-+ case SYS_clock_settime: \
-+ __fixup(a2); break;
-+#define __fixup_case_3 \
-+ case SYS_clock_nanosleep: case SYS_rt_sigtimedwait: case SYS_ppoll: \
-+ __fixup(a3); break; \
-+ case SYS_utimensat: \
-+ if(a3) a3 = (unsigned long) ((struct __timespec_kernel[2]) { \
-+ [0] = {.tv_sec = __tsc(a3)[0].tv_sec, .tv_nsec = __tsc(a3)[0].tv_nsec}, \
-+ [1] = {.tv_sec = __tsc(a3)[1].tv_sec, .tv_nsec = __tsc(a3)[1].tv_nsec}, \
-+ }); break;
-+#define __fixup_case_4 \
-+ case SYS_futex: \
-+ if((a2 & (~128 /* FUTEX_PRIVATE_FLAG */)) == 0 /* FUTEX_WAIT */) __fixup(a4); break;
-+#define __fixup_case_5 \
-+ case SYS_mq_timedsend: case SYS_mq_timedreceive: case SYS_pselect6: \
-+ __fixup(a5); break;
-+
-+static __inline long __syscall0(long long n)
-+{
-+ unsigned long ret;
-+ __asm__ __volatile__ ("syscall" : "=a"(ret) : "a"(n) : "rcx", "r11", "memory");
-+ return ret;
-+}
-+
-+static __inline long __syscall1(long long n, long long a1)
-+{
-+ unsigned long ret;
-+ __asm__ __volatile__ ("syscall" : "=a"(ret) : "a"(n), "D"(a1) : "rcx", "r11", "memory");
-+ return ret;
-+}
-+
-+static __inline long __syscall2(long long n, long long a1, long long a2)
-+{
-+ unsigned long ret;
-+ struct __timespec *ts2 = 0;
-+ switch (n) {
-+ __fixup_case_2;
-+ }
-+ __asm__ __volatile__ ("syscall" : "=a"(ret) : "a"(n), "D"(a1), "S"(a2)
-+ : "rcx", "r11", "memory");
-+ return ret;
-+}
-+
-+static __inline long __syscall3(long long n, long long a1, long long a2, long long a3)
-+{
-+ unsigned long ret;
-+ switch (n) {
-+ __fixup_case_2;
-+ __fixup_case_3;
-+ }
-+ __asm__ __volatile__ ("syscall" : "=a"(ret) : "a"(n), "D"(a1), "S"(a2),
-+ "d"(a3) : "rcx", "r11", "memory");
-+ return ret;
-+}
-+
-+static __inline long __syscall4(long long n, long long a1, long long a2, long long a3,
-+ long long a4_)
-+{
-+ unsigned long ret;
-+ register long long a4 __asm__("r10") = a4_;
-+ switch (n) {
-+ __fixup_case_2;
-+ __fixup_case_3;
-+ __fixup_case_4;
-+ }
-+ __asm__ __volatile__ ("syscall" : "=a"(ret) : "a"(n), "D"(a1), "S"(a2),
-+ "d"(a3), "r"(a4): "rcx", "r11", "memory");
-+ return ret;
-+}
-+
-+static __inline long __syscall5(long long n, long long a1, long long a2, long long a3,
-+ long long a4_, long long a5_)
-+{
-+ unsigned long ret;
-+ register long long a4 __asm__("r10") = a4_;
-+ register long long a5 __asm__("r8") = a5_;
-+ switch (n) {
-+ __fixup_case_2;
-+ __fixup_case_3;
-+ __fixup_case_4;
-+ __fixup_case_5;
-+ }
-+ __asm__ __volatile__ ("syscall" : "=a"(ret) : "a"(n), "D"(a1), "S"(a2),
-+ "d"(a3), "r"(a4), "r"(a5) : "rcx", "r11", "memory");
-+ return ret;
-+}
-+
-+static __inline long __syscall6(long long n, long long a1, long long a2, long long a3,
-+ long long a4_, long long a5_, long long a6_)
-+{
-+ unsigned long ret;
-+ register long long a4 __asm__("r10") = a4_;
-+ register long long a5 __asm__("r8") = a5_;
-+ register long long a6 __asm__("r9") = a6_;
-+ switch (n) {
-+ __fixup_case_2;
-+ __fixup_case_3;
-+ __fixup_case_4;
-+ __fixup_case_5;
-+ }
-+ __asm__ __volatile__ ("syscall" : "=a"(ret) : "a"(n), "D"(a1), "S"(a2),
-+ "d"(a3), "r"(a4), "r"(a5), "r"(a6) : "rcx", "r11", "memory");
-+ return ret;
-+}
-diff -Nur musl-0.9.15/arch/x86_64/atomic.h musl-git/arch/x86_64/atomic.h
---- musl-0.9.15/arch/x86_64/atomic.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/arch/x86_64/atomic.h 2014-03-19 07:42:48.000000000 +0100
-@@ -5,38 +5,36 @@
-
- static inline int a_ctz_64(uint64_t x)
- {
-- long r;
-- __asm__( "bsf %1,%0" : "=r"(r) : "r"(x) );
-- return r;
-+ __asm__( "bsf %1,%0" : "=r"(x) : "r"(x) );
-+ return x;
- }
-
- static inline int a_ctz_l(unsigned long x)
- {
-- long r;
-- __asm__( "bsf %1,%0" : "=r"(r) : "r"(x) );
-- return r;
-+ __asm__( "bsf %1,%0" : "=r"(x) : "r"(x) );
-+ return x;
- }
-
- static inline void a_and_64(volatile uint64_t *p, uint64_t v)
- {
-- __asm__( "lock ; andq %1, %0"
-- : "=m"(*(long *)p) : "r"(v) : "memory" );
-+ __asm__( "lock ; and %1, %0"
-+ : "=m"(*p) : "r"(v) : "memory" );
- }
-
- static inline void a_or_64(volatile uint64_t *p, uint64_t v)
- {
-- __asm__( "lock ; orq %1, %0"
-- : "=m"(*(long *)p) : "r"(v) : "memory" );
-+ __asm__( "lock ; or %1, %0"
-+ : "=m"(*p) : "r"(v) : "memory" );
- }
-
- static inline void a_store_l(volatile void *p, long x)
- {
-- __asm__( "movq %1, %0" : "=m"(*(long *)p) : "r"(x) : "memory" );
-+ __asm__( "mov %1, %0" : "=m"(*(long *)p) : "r"(x) : "memory" );
- }
-
- static inline void a_or_l(volatile void *p, long v)
- {
-- __asm__( "lock ; orq %1, %0"
-+ __asm__( "lock ; or %1, %0"
- : "=m"(*(long *)p) : "r"(v) : "memory" );
- }
-
-@@ -56,7 +54,7 @@
-
- static inline int a_cas(volatile int *p, int t, int s)
- {
-- __asm__( "lock ; cmpxchgl %3, %1"
-+ __asm__( "lock ; cmpxchg %3, %1"
- : "=a"(t), "=m"(*p) : "a"(t), "r"(s) : "memory" );
- return t;
- }
-@@ -74,13 +72,13 @@
-
- static inline void a_or(volatile void *p, int v)
- {
-- __asm__( "lock ; orl %1, %0"
-+ __asm__( "lock ; or %1, %0"
- : "=m"(*(int *)p) : "r"(v) : "memory" );
- }
-
- static inline void a_and(volatile void *p, int v)
- {
-- __asm__( "lock ; andl %1, %0"
-+ __asm__( "lock ; and %1, %0"
- : "=m"(*(int *)p) : "r"(v) : "memory" );
- }
-
-@@ -110,7 +108,7 @@
-
- static inline void a_store(volatile int *p, int x)
- {
-- __asm__( "movl %1, %0" : "=m"(*p) : "r"(x) : "memory" );
-+ __asm__( "mov %1, %0" : "=m"(*p) : "r"(x) : "memory" );
- }
-
- static inline void a_spin()
-diff -Nur musl-0.9.15/arch/x86_64/bits/sem.h musl-git/arch/x86_64/bits/sem.h
---- musl-0.9.15/arch/x86_64/bits/sem.h 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/arch/x86_64/bits/sem.h 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,16 @@
-+struct semid_ds {
-+ struct ipc_perm sem_perm;
-+ time_t sem_otime;
-+ time_t __unused1;
-+ time_t sem_ctime;
-+ time_t __unused2;
-+#if __BYTE_ORDER == __LITTLE_ENDIAN
-+ unsigned short sem_nsems;
-+ char __sem_nsems_pad[sizeof(time_t)-sizeof(short)];
-+#else
-+ char __sem_nsems_pad[sizeof(time_t)-sizeof(short)];
-+ unsigned short sem_nsems;
-+#endif
-+ time_t __unused3;
-+ time_t __unused4;
-+};
-diff -Nur musl-0.9.15/arch/x86_64/bits/shm.h musl-git/arch/x86_64/bits/shm.h
---- musl-0.9.15/arch/x86_64/bits/shm.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/arch/x86_64/bits/shm.h 2014-03-19 07:42:48.000000000 +0100
-@@ -13,3 +13,14 @@
- unsigned long __pad1;
- unsigned long __pad2;
- };
-+
-+struct shminfo {
-+ unsigned long shmmax, shmmin, shmmni, shmseg, shmall, __unused[4];
-+};
-+
-+struct shm_info {
-+ int __used_ids;
-+ unsigned long shm_tot, shm_rss, shm_swp;
-+ unsigned long __swap_attempts, __swap_successes;
-+};
-+
-diff -Nur musl-0.9.15/arch/x86_64/bits/signal.h musl-git/arch/x86_64/bits/signal.h
---- musl-0.9.15/arch/x86_64/bits/signal.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/arch/x86_64/bits/signal.h 2014-03-19 07:42:48.000000000 +0100
-@@ -60,6 +60,12 @@
- } mcontext_t;
- #endif
-
-+struct sigaltstack {
-+ void *ss_sp;
-+ int ss_flags;
-+ size_t ss_size;
-+};
-+
- typedef struct __ucontext {
- unsigned long uc_flags;
- struct __ucontext *uc_link;
-diff -Nur musl-0.9.15/arch/x86_64/bits/stat.h musl-git/arch/x86_64/bits/stat.h
---- musl-0.9.15/arch/x86_64/bits/stat.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/arch/x86_64/bits/stat.h 2014-03-19 07:42:48.000000000 +0100
-@@ -2,7 +2,7 @@
- * by the corresponding correctly-sized userspace types. */
-
- struct stat {
-- unsigned long st_dev;
-+ dev_t st_dev;
- ino_t st_ino;
- nlink_t st_nlink;
-
-diff -Nur musl-0.9.15/arch/x86_64/bits/termios.h musl-git/arch/x86_64/bits/termios.h
---- musl-0.9.15/arch/x86_64/bits/termios.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/arch/x86_64/bits/termios.h 2014-03-19 07:42:48.000000000 +0100
-@@ -42,6 +42,7 @@
- #define IXANY 0004000
- #define IXOFF 0010000
- #define IMAXBEL 0020000
-+#define IUTF8 0040000
-
- #define OPOST 0000001
- #define OLCUC 0000002
-@@ -75,9 +76,6 @@
- #define VT0 0000000
- #define VT1 0040000
-
--/* ?? */
--#define XTABS 0014000
--
- #define B0 0000000
- #define B50 0000001
- #define B75 0000002
-@@ -125,8 +123,6 @@
- #define HUPCL 0002000
- #define CLOCAL 0004000
-
--#define CRTSCTS 020000000000
--
- #define ISIG 0000001
- #define ICANON 0000002
- #define ECHO 0000010
-@@ -137,14 +133,11 @@
- #define TOSTOP 0000400
- #define IEXTEN 0100000
-
--/* Extensions? */
--#define CBAUDEX 0010000
- #define ECHOCTL 0001000
- #define ECHOPRT 0002000
- #define ECHOKE 0004000
- #define FLUSHO 0010000
- #define PENDIN 0040000
--#define EXTPROC 0200000
-
- #define TCOOFF 0
- #define TCOON 1
-@@ -158,3 +151,10 @@
- #define TCSANOW 0
- #define TCSADRAIN 1
- #define TCSAFLUSH 2
-+
-+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-+#define CBAUDEX 0010000
-+#define CRTSCTS 020000000000
-+#define EXTPROC 0200000
-+#define XTABS 0014000
-+#endif
-diff -Nur musl-0.9.15/arch/x86_64/pthread_arch.h musl-git/arch/x86_64/pthread_arch.h
---- musl-0.9.15/arch/x86_64/pthread_arch.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/arch/x86_64/pthread_arch.h 2014-03-19 07:42:48.000000000 +0100
-@@ -1,7 +1,7 @@
- static inline struct pthread *__pthread_self()
- {
- struct pthread *self;
-- __asm__ __volatile__ ("movq %%fs:0,%0" : "=r" (self) );
-+ __asm__ __volatile__ ("mov %%fs:0,%0" : "=r" (self) );
- return self;
- }
-
-diff -Nur musl-0.9.15/configure musl-git/configure
---- musl-0.9.15/configure 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/configure 2014-03-19 07:42:48.000000000 +0100
-@@ -222,12 +222,16 @@
- # Convert to just ARCH
- #
- case "$target" in
-+# Catch these early to simplify matching for 32-bit archs
-+mips64*|powerpc64*) fail "$0: unsupported target \"$target\"" ;;
- arm*) ARCH=arm ;;
- i?86*) ARCH=i386 ;;
-+x86_64-x32*|x32*|x86_64*x32) ARCH=x32 ;;
- x86_64*) ARCH=x86_64 ;;
--mips-*|mipsel-*) ARCH=mips ;;
--microblaze-*) ARCH=microblaze ;;
--powerpc-*) ARCH=powerpc ;;
-+mips*) ARCH=mips ;;
-+microblaze*) ARCH=microblaze ;;
-+powerpc*) ARCH=powerpc ;;
-+sh[1-9bel-]*|sh|superh*) ARCH=sh ;;
- unknown) fail "$0: unable to detect target arch; try $0 --target=..." ;;
- *) fail "$0: unknown or unsupported target \"$target\"" ;;
- esac
-@@ -381,6 +385,7 @@
- tryflag CFLAGS_AUTO -Wno-unused-value
- tryflag CFLAGS_AUTO -Wno-unused-but-set-variable
- tryflag CFLAGS_AUTO -Wno-unknown-pragmas
-+tryflag CFLAGS_AUTO -Wno-pointer-to-int-cast
- fi
-
- # Some patched GCC builds have these defaults messed up...
-@@ -410,12 +415,33 @@
- trycppif __ARM_PCS_VFP "$t" && SUBARCH=${SUBARCH}hf
- fi
-
--test "$ARCH" = "mips" && trycppif "_MIPSEL || __MIPSEL || __MIPSEL__" "$t" \
--&& SUBARCH=${SUBARCH}el
-+if test "$ARCH" = "mips" ; then
-+trycppif "_MIPSEL || __MIPSEL || __MIPSEL__" "$t" && SUBARCH=${SUBARCH}el
-+trycppif __mips_soft_float "$t" && SUBARCH=${SUBARCH}-sf
-+fi
-
- test "$ARCH" = "microblaze" && trycppif __MICROBLAZEEL__ "$t" \
- && SUBARCH=${SUBARCH}el
-
-+if test "$ARCH" = "sh" ; then
-+trycppif __BIG_ENDIAN__ "$t" && SUBARCH=${SUBARCH}eb
-+if trycppif __SH_FPU_ANY__ "$t" ; then
-+# Some sh configurations are broken and replace double with float
-+# rather than using softfloat when the fpu is present but only
-+# supports single precision. Reject them.
-+printf "checking whether compiler's double type is IEEE double... "
-+echo 'typedef char dblcheck[(int)sizeof(double)-5];' > "$tmpc"
-+if $CC $CFLAGS_C99FSE $CPPFLAGS $CFLAGS -c -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
-+printf "yes\n"
-+else
-+printf "no\n"
-+fail "$0: error: compiler's floating point configuration is unsupported"
-+fi
-+else
-+SUBARCH=${SUBARCH}-nofpu
-+fi
-+fi
-+
- test "$SUBARCH" \
- && printf "configured for %s variant: %s\n" "$ARCH" "$ARCH$SUBARCH"
-
-diff -Nur musl-0.9.15/COPYRIGHT musl-git/COPYRIGHT
---- musl-0.9.15/COPYRIGHT 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/COPYRIGHT 2014-03-19 07:42:48.000000000 +0100
-@@ -1,6 +1,6 @@
- musl as a whole is licensed under the following standard MIT license:
-
--Copyright © 2005-2013 Rich Felker
-+Copyright © 2005-2014 Rich Felker
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
-@@ -79,7 +79,7 @@
- from Bionic libc, used on Android.
-
- All other files which have no copyright comments are original works
--Copyright © 2005-2013 Rich Felker, the main author of this library.
-+Copyright © 2005-2014 Rich Felker, the main author of this library.
- The decision to exclude such comments is intentional, as it should be
- possible to carry around the complete source code on tiny storage
- media. All public header files (include/* and arch/*/bits/*) should be
-diff -Nur musl-0.9.15/crt/superh/crti.s musl-git/crt/superh/crti.s
---- musl-0.9.15/crt/superh/crti.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/crt/superh/crti.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,13 @@
-+.section .init
-+.global _init
-+.type _init, @function
-+_init:
-+ sts.l pr, @-r15
-+ nop
-+
-+.section .fini
-+.global _fini
-+.type _fini, @function
-+_fini:
-+ sts.l pr, @-r15
-+ nop
-diff -Nur musl-0.9.15/crt/superh/crtn.s musl-git/crt/superh/crtn.s
---- musl-0.9.15/crt/superh/crtn.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/crt/superh/crtn.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,9 @@
-+.section .init
-+ lds.l @r15+, pr
-+ rts
-+ nop
-+
-+.section .fini
-+ lds.l @r15+, pr
-+ rts
-+ nop
-diff -Nur musl-0.9.15/crt/x32/crti.s musl-git/crt/x32/crti.s
---- musl-0.9.15/crt/x32/crti.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/crt/x32/crti.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,9 @@
-+.section .init
-+.global _init
-+_init:
-+ push %rax
-+
-+.section .fini
-+.global _fini
-+_fini:
-+ push %rax
-diff -Nur musl-0.9.15/crt/x32/crtn.s musl-git/crt/x32/crtn.s
---- musl-0.9.15/crt/x32/crtn.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/crt/x32/crtn.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,7 @@
-+.section .init
-+ pop %rax
-+ ret
-+
-+.section .fini
-+ pop %rax
-+ ret
-diff -Nur musl-0.9.15/.gitignore musl-git/.gitignore
---- musl-0.9.15/.gitignore 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/.gitignore 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,11 @@
-+*.o
-+*.lo
-+*.a
-+*.so
-+*.so.1
-+arch/*/bits/alltypes.h
-+config.mak
-+include/bits
-+tools/musl-gcc
-+lib/musl-gcc.specs
-+src/internal/version.h
-diff -Nur musl-0.9.15/include/arpa/inet.h musl-git/include/arpa/inet.h
---- musl-0.9.15/include/arpa/inet.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/include/arpa/inet.h 2014-03-19 07:42:48.000000000 +0100
-@@ -20,7 +20,7 @@
- const char *inet_ntop (int, const void *__restrict, char *__restrict, socklen_t);
-
- int inet_aton (const char *, struct in_addr *);
--struct in_addr inet_makeaddr(int, int);
-+struct in_addr inet_makeaddr(in_addr_t, in_addr_t);
- in_addr_t inet_lnaof(struct in_addr);
- in_addr_t inet_netof(struct in_addr);
-
-diff -Nur musl-0.9.15/include/dlfcn.h musl-git/include/dlfcn.h
---- musl-0.9.15/include/dlfcn.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/include/dlfcn.h 2014-03-19 07:42:48.000000000 +0100
-@@ -31,7 +31,7 @@
- const char *dli_sname;
- void *dli_saddr;
- } Dl_info;
--int dladdr(void *, Dl_info *);
-+int dladdr(const void *, Dl_info *);
- int dlinfo(void *, int, void *);
- #endif
-
-diff -Nur musl-0.9.15/include/elf.h musl-git/include/elf.h
---- musl-0.9.15/include/elf.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/include/elf.h 2014-03-19 07:42:48.000000000 +0100
-@@ -1153,6 +1153,7 @@
- #define EF_MIPS_64BIT_WHIRL 16
- #define EF_MIPS_ABI2 32
- #define EF_MIPS_ABI_ON32 64
-+#define EF_MIPS_NAN2008 1024
- #define EF_MIPS_ARCH 0xf0000000
-
-
-@@ -2092,6 +2093,117 @@
- #define R_AARCH64_NONE 0
- #define R_AARCH64_ABS64 257
- #define R_AARCH64_ABS32 258
-+#define R_AARCH64_ABS16 259
-+#define R_AARCH64_PREL64 260
-+#define R_AARCH64_PREL32 261
-+#define R_AARCH64_PREL16 262
-+#define R_AARCH64_MOVW_UABS_G0 263
-+#define R_AARCH64_MOVW_UABS_G0_NC 264
-+#define R_AARCH64_MOVW_UABS_G1 265
-+#define R_AARCH64_MOVW_UABS_G1_NC 266
-+#define R_AARCH64_MOVW_UABS_G2 267
-+#define R_AARCH64_MOVW_UABS_G2_NC 268
-+#define R_AARCH64_MOVW_UABS_G3 269
-+#define R_AARCH64_MOVW_SABS_G0 270
-+#define R_AARCH64_MOVW_SABS_G1 271
-+#define R_AARCH64_MOVW_SABS_G2 272
-+#define R_AARCH64_LD_PREL_LO19 273
-+#define R_AARCH64_ADR_PREL_LO21 274
-+#define R_AARCH64_ADR_PREL_PG_HI21 275
-+#define R_AARCH64_ADR_PREL_PG_HI21_NC 276
-+#define R_AARCH64_ADD_ABS_LO12_NC 277
-+#define R_AARCH64_LDST8_ABS_LO12_NC 278
-+#define R_AARCH64_TSTBR14 279
-+#define R_AARCH64_CONDBR19 280
-+#define R_AARCH64_JUMP26 282
-+#define R_AARCH64_CALL26 283
-+#define R_AARCH64_LDST16_ABS_LO12_NC 284
-+#define R_AARCH64_LDST32_ABS_LO12_NC 285
-+#define R_AARCH64_LDST64_ABS_LO12_NC 286
-+#define R_AARCH64_MOVW_PREL_G0 287
-+#define R_AARCH64_MOVW_PREL_G0_NC 288
-+#define R_AARCH64_MOVW_PREL_G1 289
-+#define R_AARCH64_MOVW_PREL_G1_NC 290
-+#define R_AARCH64_MOVW_PREL_G2 291
-+#define R_AARCH64_MOVW_PREL_G2_NC 292
-+#define R_AARCH64_MOVW_PREL_G3 293
-+#define R_AARCH64_LDST128_ABS_LO12_NC 299
-+#define R_AARCH64_MOVW_GOTOFF_G0 300
-+#define R_AARCH64_MOVW_GOTOFF_G0_NC 301
-+#define R_AARCH64_MOVW_GOTOFF_G1 302
-+#define R_AARCH64_MOVW_GOTOFF_G1_NC 303
-+#define R_AARCH64_MOVW_GOTOFF_G2 304
-+#define R_AARCH64_MOVW_GOTOFF_G2_NC 305
-+#define R_AARCH64_MOVW_GOTOFF_G3 306
-+#define R_AARCH64_GOTREL64 307
-+#define R_AARCH64_GOTREL32 308
-+#define R_AARCH64_GOT_LD_PREL19 309
-+#define R_AARCH64_LD64_GOTOFF_LO15 310
-+#define R_AARCH64_ADR_GOT_PAGE 311
-+#define R_AARCH64_LD64_GOT_LO12_NC 312
-+#define R_AARCH64_LD64_GOTPAGE_LO15 313
-+#define R_AARCH64_TLSGD_ADR_PREL21 512
-+#define R_AARCH64_TLSGD_ADR_PAGE21 513
-+#define R_AARCH64_TLSGD_ADD_LO12_NC 514
-+#define R_AARCH64_TLSGD_MOVW_G1 515
-+#define R_AARCH64_TLSGD_MOVW_G0_NC 516
-+#define R_AARCH64_TLSLD_ADR_PREL21 517
-+#define R_AARCH64_TLSLD_ADR_PAGE21 518
-+#define R_AARCH64_TLSLD_ADD_LO12_NC 519
-+#define R_AARCH64_TLSLD_MOVW_G1 520
-+#define R_AARCH64_TLSLD_MOVW_G0_NC 521
-+#define R_AARCH64_TLSLD_LD_PREL19 522
-+#define R_AARCH64_TLSLD_MOVW_DTPREL_G2 523
-+#define R_AARCH64_TLSLD_MOVW_DTPREL_G1 524
-+#define R_AARCH64_TLSLD_MOVW_DTPREL_G1_NC 525
-+#define R_AARCH64_TLSLD_MOVW_DTPREL_G0 526
-+#define R_AARCH64_TLSLD_MOVW_DTPREL_G0_NC 527
-+#define R_AARCH64_TLSLD_ADD_DTPREL_HI12 528
-+#define R_AARCH64_TLSLD_ADD_DTPREL_LO12 529
-+#define R_AARCH64_TLSLD_ADD_DTPREL_LO12_NC 530
-+#define R_AARCH64_TLSLD_LDST8_DTPREL_LO12 531
-+#define R_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC 532
-+#define R_AARCH64_TLSLD_LDST16_DTPREL_LO12 533
-+#define R_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC 534
-+#define R_AARCH64_TLSLD_LDST32_DTPREL_LO12 535
-+#define R_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC 536
-+#define R_AARCH64_TLSLD_LDST64_DTPREL_LO12 537
-+#define R_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC 538
-+#define R_AARCH64_TLSIE_MOVW_GOTTPREL_G1 539
-+#define R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC 540
-+#define R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21 541
-+#define R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC 542
-+#define R_AARCH64_TLSIE_LD_GOTTPREL_PREL19 543
-+#define R_AARCH64_TLSLE_MOVW_TPREL_G2 544
-+#define R_AARCH64_TLSLE_MOVW_TPREL_G1 545
-+#define R_AARCH64_TLSLE_MOVW_TPREL_G1_NC 546
-+#define R_AARCH64_TLSLE_MOVW_TPREL_G0 547
-+#define R_AARCH64_TLSLE_MOVW_TPREL_G0_NC 548
-+#define R_AARCH64_TLSLE_ADD_TPREL_HI12 549
-+#define R_AARCH64_TLSLE_ADD_TPREL_LO12 550
-+#define R_AARCH64_TLSLE_ADD_TPREL_LO12_NC 551
-+#define R_AARCH64_TLSLE_LDST8_TPREL_LO12 552
-+#define R_AARCH64_TLSLE_LDST8_TPREL_LO12_NC 553
-+#define R_AARCH64_TLSLE_LDST16_TPREL_LO12 554
-+#define R_AARCH64_TLSLE_LDST16_TPREL_LO12_NC 555
-+#define R_AARCH64_TLSLE_LDST32_TPREL_LO12 556
-+#define R_AARCH64_TLSLE_LDST32_TPREL_LO12_NC 557
-+#define R_AARCH64_TLSLE_LDST64_TPREL_LO12 558
-+#define R_AARCH64_TLSLE_LDST64_TPREL_LO12_NC 559
-+#define R_AARCH64_TLSDESC_LD_PREL19 560
-+#define R_AARCH64_TLSDESC_ADR_PREL21 561
-+#define R_AARCH64_TLSDESC_ADR_PAGE21 562
-+#define R_AARCH64_TLSDESC_LD64_LO12 563
-+#define R_AARCH64_TLSDESC_ADD_LO12 564
-+#define R_AARCH64_TLSDESC_OFF_G1 565
-+#define R_AARCH64_TLSDESC_OFF_G0_NC 566
-+#define R_AARCH64_TLSDESC_LDR 567
-+#define R_AARCH64_TLSDESC_ADD 568
-+#define R_AARCH64_TLSDESC_CALL 569
-+#define R_AARCH64_TLSLE_LDST128_TPREL_LO12 570
-+#define R_AARCH64_TLSLE_LDST128_TPREL_LO12_NC 571
-+#define R_AARCH64_TLSLD_LDST128_DTPREL_LO12 572
-+#define R_AARCH64_TLSLD_LDST128_DTPREL_LO12_NC 573
- #define R_AARCH64_COPY 1024
- #define R_AARCH64_GLOB_DAT 1025
- #define R_AARCH64_JUMP_SLOT 1026
-diff -Nur musl-0.9.15/include/fcntl.h musl-git/include/fcntl.h
---- musl-0.9.15/include/fcntl.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/include/fcntl.h 2014-03-19 07:42:48.000000000 +0100
-@@ -148,6 +148,7 @@
- #define SPLICE_F_MORE 4
- #define SPLICE_F_GIFT 8
- int fallocate(int, int, off_t, off_t);
-+#define fallocate64 fallocate
- ssize_t readahead(int, off_t, size_t);
- int sync_file_range(int, off_t, off_t, unsigned);
- ssize_t vmsplice(int, const struct iovec *, size_t, unsigned);
-@@ -160,6 +161,7 @@
- #define F_GETLK64 F_GETLK
- #define F_SETLK64 F_SETLK
- #define F_SETLKW64 F_SETLKW
-+#define flock64 flock
- #define open64 open
- #define openat64 openat
- #define creat64 creat
-diff -Nur musl-0.9.15/include/math.h musl-git/include/math.h
---- musl-0.9.15/include/math.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/include/math.h 2014-03-19 07:42:48.000000000 +0100
-@@ -42,12 +42,14 @@
-
- static __inline unsigned __FLOAT_BITS(float __f)
- {
-- union {float __f; unsigned __i;} __u = {__f};
-+ union {float __f; unsigned __i;} __u;
-+ __u.__f = __f;
- return __u.__i;
- }
- static __inline unsigned long long __DOUBLE_BITS(double __f)
- {
-- union {double __f; unsigned long long __i;} __u = {__f};
-+ union {double __f; unsigned long long __i;} __u;
-+ __u.__f = __f;
- return __u.__i;
- }
-
-diff -Nur musl-0.9.15/include/netdb.h musl-git/include/netdb.h
---- musl-0.9.15/include/netdb.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/include/netdb.h 2014-03-19 07:42:48.000000000 +0100
-@@ -131,6 +131,7 @@
- #define TRY_AGAIN 2
- #define NO_RECOVERY 3
- #define NO_DATA 4
-+#define NO_ADDRESS NO_DATA
- #endif
-
- #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-diff -Nur musl-0.9.15/include/netinet/if_ether.h musl-git/include/netinet/if_ether.h
---- musl-0.9.15/include/netinet/if_ether.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/include/netinet/if_ether.h 2014-03-19 07:42:48.000000000 +0100
-@@ -54,6 +54,7 @@
- #define ETH_P_8021AH 0x88E7
- #define ETH_P_MVRP 0x88F5
- #define ETH_P_1588 0x88F7
-+#define ETH_P_PRP 0x88FB
- #define ETH_P_FCOE 0x8906
- #define ETH_P_TDLS 0x890D
- #define ETH_P_FIP 0x8914
-diff -Nur musl-0.9.15/include/netinet/in.h musl-git/include/netinet/in.h
---- musl-0.9.15/include/netinet/in.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/include/netinet/in.h 2014-03-19 07:42:48.000000000 +0100
-@@ -149,7 +149,7 @@
- (IN6_IS_ADDR_MULTICAST(a) && ((((uint8_t *) (a))[1] & 0xf) == 0xe))
-
- #define __ARE_4_EQUAL(a,b) \
-- (!( 0[a]-0[b] | 1[a]-1[b] | 2[a]-2[b] | 3[a]-3[b] ))
-+ (!( (0[a]-0[b]) | (1[a]-1[b]) | (2[a]-2[b]) | (3[a]-3[b]) ))
- #define IN6_ARE_ADDR_EQUAL(a,b) \
- __ARE_4_EQUAL((const uint32_t *)(a), (const uint32_t *)(b))
-
-@@ -211,27 +211,13 @@
- #define IP_MULTICAST_ALL 49
- #define IP_UNICAST_IF 50
-
--#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
--#define MCAST_JOIN_GROUP 42
--#define MCAST_BLOCK_SOURCE 43
--#define MCAST_UNBLOCK_SOURCE 44
--#define MCAST_LEAVE_GROUP 45
--#define MCAST_JOIN_SOURCE_GROUP 46
--#define MCAST_LEAVE_SOURCE_GROUP 47
--#define MCAST_MSFILTER 48
--
--#define MCAST_EXCLUDE 0
--#define MCAST_INCLUDE 1
--#endif
--
- #define IP_RECVRETOPTS IP_RETOPTS
-
- #define IP_PMTUDISC_DONT 0
- #define IP_PMTUDISC_WANT 1
- #define IP_PMTUDISC_DO 2
- #define IP_PMTUDISC_PROBE 3
--
--#define SOL_IP 0
-+#define IP_PMTUDISC_INTERFACE 4
-
- #define IP_DEFAULT_MULTICAST_TTL 1
- #define IP_DEFAULT_MULTICAST_LOOP 1
-@@ -243,6 +229,19 @@
- char ip_opts[40];
- };
-
-+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-+
-+#define MCAST_JOIN_GROUP 42
-+#define MCAST_BLOCK_SOURCE 43
-+#define MCAST_UNBLOCK_SOURCE 44
-+#define MCAST_LEAVE_GROUP 45
-+#define MCAST_JOIN_SOURCE_GROUP 46
-+#define MCAST_LEAVE_SOURCE_GROUP 47
-+#define MCAST_MSFILTER 48
-+
-+#define MCAST_EXCLUDE 0
-+#define MCAST_INCLUDE 1
-+
- struct ip_mreq
- {
- struct in_addr imr_multiaddr;
-@@ -273,7 +272,6 @@
- (sizeof(struct ip_msfilter) - sizeof(struct in_addr) \
- + (numsrc) * sizeof(struct in_addr))
-
--#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
- struct group_req {
- uint32_t gr_interface;
- struct sockaddr_storage gr_group;
-@@ -295,7 +293,6 @@
- #define GROUP_FILTER_SIZE(numsrc) \
- (sizeof(struct group_filter) - sizeof(struct sockaddr_storage) \
- + (numsrc) * sizeof(struct sockaddr_storage))
--#endif
-
- struct in_pktinfo
- {
-@@ -315,6 +312,7 @@
- struct sockaddr_in6 ip6m_addr;
- uint32_t ip6m_mtu;
- };
-+#endif
-
- #define IPV6_ADDRFORM 1
- #define IPV6_2292PKTINFO 2
-@@ -324,7 +322,6 @@
- #define IPV6_2292PKTOPTIONS 6
- #define IPV6_CHECKSUM 7
- #define IPV6_2292HOPLIMIT 8
--#define SCM_SRCRT IPV6_RXSRCRT
- #define IPV6_NEXTHOP 9
- #define IPV6_AUTHHDR 10
- #define IPV6_UNICAST_HOPS 16
-@@ -363,15 +360,11 @@
- #define IPV6_RXHOPOPTS IPV6_HOPOPTS
- #define IPV6_RXDSTOPTS IPV6_DSTOPTS
-
--
- #define IPV6_PMTUDISC_DONT 0
- #define IPV6_PMTUDISC_WANT 1
- #define IPV6_PMTUDISC_DO 2
- #define IPV6_PMTUDISC_PROBE 3
-
--#define SOL_IPV6 41
--#define SOL_ICMPV6 58
--
- #define IPV6_RTHDR_LOOSE 0
- #define IPV6_RTHDR_STRICT 1
-
-diff -Nur musl-0.9.15/include/netinet/tcp.h musl-git/include/netinet/tcp.h
---- musl-0.9.15/include/netinet/tcp.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/include/netinet/tcp.h 2014-03-19 07:42:48.000000000 +0100
-@@ -44,42 +44,80 @@
- #define SOL_TCP 6
- #include <sys/types.h>
- #include <sys/socket.h>
--#endif
-+#include <stdint.h>
-+#include <endian.h>
-+
-+typedef uint32_t tcp_seq;
-
-+#define TH_FIN 0x01
-+#define TH_SYN 0x02
-+#define TH_RST 0x04
-+#define TH_PUSH 0x08
-+#define TH_ACK 0x10
-+#define TH_URG 0x20
-+
-+struct tcphdr {
- #ifdef _GNU_SOURCE
--#include <endian.h>
--struct tcphdr
--{
-- u_int16_t source;
-- u_int16_t dest;
-- u_int32_t seq;
-- u_int32_t ack_seq;
-+#ifdef __GNUC__
-+ __extension__
-+#endif
-+ union { struct {
-+
-+ uint16_t source;
-+ uint16_t dest;
-+ uint32_t seq;
-+ uint32_t ack_seq;
-+#if __BYTE_ORDER == __LITTLE_ENDIAN
-+ uint16_t res1:4;
-+ uint16_t doff:4;
-+ uint16_t fin:1;
-+ uint16_t syn:1;
-+ uint16_t rst:1;
-+ uint16_t psh:1;
-+ uint16_t ack:1;
-+ uint16_t urg:1;
-+ uint16_t res2:2;
-+#else
-+ uint16_t doff:4;
-+ uint16_t res1:4;
-+ uint16_t res2:2;
-+ uint16_t urg:1;
-+ uint16_t ack:1;
-+ uint16_t psh:1;
-+ uint16_t rst:1;
-+ uint16_t syn:1;
-+ uint16_t fin:1;
-+#endif
-+ uint16_t window;
-+ uint16_t check;
-+ uint16_t urg_ptr;
-+
-+ }; struct {
-+#endif
-+
-+ uint16_t th_sport;
-+ uint16_t th_dport;
-+ uint32_t th_seq;
-+ uint32_t th_ack;
- #if __BYTE_ORDER == __LITTLE_ENDIAN
-- u_int16_t res1:4;
-- u_int16_t doff:4;
-- u_int16_t fin:1;
-- u_int16_t syn:1;
-- u_int16_t rst:1;
-- u_int16_t psh:1;
-- u_int16_t ack:1;
-- u_int16_t urg:1;
-- u_int16_t res2:2;
-+ uint8_t th_x2:4;
-+ uint8_t th_off:4;
- #else
-- u_int16_t doff:4;
-- u_int16_t res1:4;
-- u_int16_t res2:2;
-- u_int16_t urg:1;
-- u_int16_t ack:1;
-- u_int16_t psh:1;
-- u_int16_t rst:1;
-- u_int16_t syn:1;
-- u_int16_t fin:1;
--#endif
-- u_int16_t window;
-- u_int16_t check;
-- u_int16_t urg_ptr;
-+ uint8_t th_off:4;
-+ uint8_t th_x2:4;
-+#endif
-+ uint8_t th_flags;
-+ uint16_t th_win;
-+ uint16_t th_sum;
-+ uint16_t th_urp;
-+
-+#ifdef _GNU_SOURCE
-+ }; };
-+#endif
- };
-+#endif
-
-+#ifdef _GNU_SOURCE
- #define TCPI_OPT_TIMESTAMPS 1
- #define TCPI_OPT_SACK 2
- #define TCPI_OPT_WSCALE 4
-@@ -93,37 +131,37 @@
-
- struct tcp_info
- {
-- u_int8_t tcpi_state;
-- u_int8_t tcpi_ca_state;
-- u_int8_t tcpi_retransmits;
-- u_int8_t tcpi_probes;
-- u_int8_t tcpi_backoff;
-- u_int8_t tcpi_options;
-- u_int8_t tcpi_snd_wscale : 4, tcpi_rcv_wscale : 4;
-- u_int32_t tcpi_rto;
-- u_int32_t tcpi_ato;
-- u_int32_t tcpi_snd_mss;
-- u_int32_t tcpi_rcv_mss;
-- u_int32_t tcpi_unacked;
-- u_int32_t tcpi_sacked;
-- u_int32_t tcpi_lost;
-- u_int32_t tcpi_retrans;
-- u_int32_t tcpi_fackets;
-- u_int32_t tcpi_last_data_sent;
-- u_int32_t tcpi_last_ack_sent;
-- u_int32_t tcpi_last_data_recv;
-- u_int32_t tcpi_last_ack_recv;
-- u_int32_t tcpi_pmtu;
-- u_int32_t tcpi_rcv_ssthresh;
-- u_int32_t tcpi_rtt;
-- u_int32_t tcpi_rttvar;
-- u_int32_t tcpi_snd_ssthresh;
-- u_int32_t tcpi_snd_cwnd;
-- u_int32_t tcpi_advmss;
-- u_int32_t tcpi_reordering;
-- u_int32_t tcpi_rcv_rtt;
-- u_int32_t tcpi_rcv_space;
-- u_int32_t tcpi_total_retrans;
-+ uint8_t tcpi_state;
-+ uint8_t tcpi_ca_state;
-+ uint8_t tcpi_retransmits;
-+ uint8_t tcpi_probes;
-+ uint8_t tcpi_backoff;
-+ uint8_t tcpi_options;
-+ uint8_t tcpi_snd_wscale : 4, tcpi_rcv_wscale : 4;
-+ uint32_t tcpi_rto;
-+ uint32_t tcpi_ato;
-+ uint32_t tcpi_snd_mss;
-+ uint32_t tcpi_rcv_mss;
-+ uint32_t tcpi_unacked;
-+ uint32_t tcpi_sacked;
-+ uint32_t tcpi_lost;
-+ uint32_t tcpi_retrans;
-+ uint32_t tcpi_fackets;
-+ uint32_t tcpi_last_data_sent;
-+ uint32_t tcpi_last_ack_sent;
-+ uint32_t tcpi_last_data_recv;
-+ uint32_t tcpi_last_ack_recv;
-+ uint32_t tcpi_pmtu;
-+ uint32_t tcpi_rcv_ssthresh;
-+ uint32_t tcpi_rtt;
-+ uint32_t tcpi_rttvar;
-+ uint32_t tcpi_snd_ssthresh;
-+ uint32_t tcpi_snd_cwnd;
-+ uint32_t tcpi_advmss;
-+ uint32_t tcpi_reordering;
-+ uint32_t tcpi_rcv_rtt;
-+ uint32_t tcpi_rcv_space;
-+ uint32_t tcpi_total_retrans;
- };
-
- #define TCP_MD5SIG_MAXKEYLEN 80
-@@ -131,10 +169,10 @@
- struct tcp_md5sig
- {
- struct sockaddr_storage tcpm_addr;
-- u_int16_t __tcpm_pad1;
-- u_int16_t tcpm_keylen;
-- u_int32_t __tcpm_pad2;
-- u_int8_t tcpm_key[TCP_MD5SIG_MAXKEYLEN];
-+ uint16_t __tcpm_pad1;
-+ uint16_t tcpm_keylen;
-+ uint32_t __tcpm_pad2;
-+ uint8_t tcpm_key[TCP_MD5SIG_MAXKEYLEN];
- };
-
- #endif
-diff -Nur musl-0.9.15/include/netinet/udp.h musl-git/include/netinet/udp.h
---- musl-0.9.15/include/netinet/udp.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/include/netinet/udp.h 2014-03-19 07:42:48.000000000 +0100
-@@ -5,19 +5,22 @@
- extern "C" {
- #endif
-
-+#include <features.h>
- #include <stdint.h>
-
--struct udphdr {
-- uint16_t source;
-- uint16_t dest;
-- uint16_t len;
-- uint16_t check;
--};
--
-+#ifdef _GNU_SOURCE
- #define uh_sport source
- #define uh_dport dest
- #define uh_ulen len
- #define uh_sum check
-+#endif
-+
-+struct udphdr {
-+ uint16_t uh_sport;
-+ uint16_t uh_dport;
-+ uint16_t uh_ulen;
-+ uint16_t uh_sum;
-+};
-
- #define UDP_CORK 1
- #define UDP_ENCAP 100
-diff -Nur musl-0.9.15/include/sched.h musl-git/include/sched.h
---- musl-0.9.15/include/sched.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/include/sched.h 2014-03-19 07:42:48.000000000 +0100
-@@ -78,7 +78,7 @@
- int sched_getaffinity(pid_t, size_t, cpu_set_t *);
- int sched_setaffinity(pid_t, size_t, const cpu_set_t *);
-
--#define __CPU_op_S(i, size, set, op) ( (i)/8 >= (size) ? 0 : \
-+#define __CPU_op_S(i, size, set, op) ( (i)/8U >= (size) ? 0 : \
- ((set)->__bits[(i)/8/sizeof(long)] op (1UL<<((i)%(8*sizeof(long))))) )
-
- #define CPU_SET_S(i, size, set) __CPU_op_S(i, size, set, |=)
-diff -Nur musl-0.9.15/include/signal.h musl-git/include/signal.h
---- musl-0.9.15/include/signal.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/include/signal.h 2014-03-19 07:42:48.000000000 +0100
-@@ -77,11 +77,7 @@
- #define CLD_STOPPED 5
- #define CLD_CONTINUED 6
-
--typedef struct sigaltstack {
-- void *ss_sp;
-- int ss_flags;
-- size_t ss_size;
--} stack_t;
-+typedef struct sigaltstack stack_t;
-
- union sigval {
- int sival_int;
-@@ -227,8 +223,8 @@
- typedef void (*sighandler_t)(int);
- void (*bsd_signal(int, void (*)(int)))(int);
- int sigisemptyset(const sigset_t *);
--int sigorset (sigset_t *, sigset_t *, sigset_t *);
--int sigandset(sigset_t *, sigset_t *, sigset_t *);
-+int sigorset (sigset_t *, const sigset_t *, const sigset_t *);
-+int sigandset(sigset_t *, const sigset_t *, const sigset_t *);
-
- #define SA_NOMASK SA_NODEFER
- #define SA_ONESHOT SA_RESETHAND
-diff -Nur musl-0.9.15/include/stdlib.h musl-git/include/stdlib.h
---- musl-0.9.15/include/stdlib.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/include/stdlib.h 2014-03-19 07:42:48.000000000 +0100
-@@ -93,7 +93,7 @@
- #define WSTOPSIG(s) WEXITSTATUS(s)
- #define WIFEXITED(s) (!WTERMSIG(s))
- #define WIFSTOPPED(s) ((short)((((s)&0xffff)*0x10001)>>8) > 0x7f00)
--#define WIFSIGNALED(s) (((s)&0xffff)-1 < 0xffu)
-+#define WIFSIGNALED(s) (((s)&0xffff)-1U < 0xffu)
-
- int posix_memalign (void **, size_t, size_t);
- int setenv (const char *, const char *, int);
-diff -Nur musl-0.9.15/include/sys/inotify.h musl-git/include/sys/inotify.h
---- musl-0.9.15/include/sys/inotify.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/include/sys/inotify.h 2014-03-19 07:42:48.000000000 +0100
-@@ -48,7 +48,7 @@
- int inotify_init(void);
- int inotify_init1(int);
- int inotify_add_watch(int, const char *, uint32_t);
--int inotify_rm_watch(int, uint32_t);
-+int inotify_rm_watch(int, int);
-
- #ifdef __cplusplus
- }
-diff -Nur musl-0.9.15/include/sys/mman.h musl-git/include/sys/mman.h
---- musl-0.9.15/include/sys/mman.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/include/sys/mman.h 2014-03-19 07:42:48.000000000 +0100
-@@ -33,7 +33,7 @@
-
- #ifdef _GNU_SOURCE
- void *mremap (void *, size_t, size_t, int, ...);
--int remap_file_pages (void *, size_t, int, ssize_t, int);
-+int remap_file_pages (void *, size_t, int, size_t, int);
- #endif
-
- #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-diff -Nur musl-0.9.15/include/sys/procfs.h musl-git/include/sys/procfs.h
---- musl-0.9.15/include/sys/procfs.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/include/sys/procfs.h 2014-03-19 07:42:48.000000000 +0100
-@@ -40,7 +40,7 @@
- char pr_zomb;
- char pr_nice;
- unsigned long int pr_flag;
--#if __WORDSIZE == 32
-+#if UINTPTR_MAX == 0xffffffff
- unsigned short int pr_uid;
- unsigned short int pr_gid;
- #else
-diff -Nur musl-0.9.15/include/sys/sem.h musl-git/include/sys/sem.h
---- musl-0.9.15/include/sys/sem.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/include/sys/sem.h 2014-03-19 07:42:48.000000000 +0100
-@@ -27,22 +27,7 @@
-
- #include <endian.h>
-
--struct semid_ds {
-- struct ipc_perm sem_perm;
-- long sem_otime;
-- unsigned long __unused1;
-- long sem_ctime;
-- unsigned long __unused2;
--#if __BYTE_ORDER == __LITTLE_ENDIAN
-- unsigned short sem_nsems;
-- char __sem_nsems_pad[sizeof(long)-sizeof(short)];
--#else
-- char __sem_nsems_pad[sizeof(long)-sizeof(short)];
-- unsigned short sem_nsems;
--#endif
-- unsigned long __unused3;
-- unsigned long __unused4;
--};
-+#include <bits/sem.h>
-
- #define _SEM_SEMUN_UNDEFINED 1
-
-diff -Nur musl-0.9.15/include/sys/shm.h musl-git/include/sys/shm.h
---- musl-0.9.15/include/sys/shm.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/include/sys/shm.h 2014-03-19 07:42:48.000000000 +0100
-@@ -14,6 +14,13 @@
- #include <bits/alltypes.h>
-
- #include <sys/ipc.h>
-+
-+#ifdef _GNU_SOURCE
-+#define __used_ids used_ids
-+#define __swap_attempts swap_attempts
-+#define __swap_successes swap_successes
-+#endif
-+
- #include <bits/shm.h>
-
- #define SHM_R 0400
-@@ -33,20 +40,6 @@
- #define SHM_HUGETLB 04000
- #define SHM_NORESERVE 010000
-
--struct shminfo {
-- unsigned long shmmax, shmmin, shmmni, shmseg, shmall, __unused[4];
--};
--
--struct shm_info {
-- int used_ids;
-- unsigned long shm_tot, shm_rss, shm_swp;
--#ifdef _GNU_SOURCE
-- unsigned long swap_attempts, swap_successes;
--#else
-- unsigned long __reserved[2];
--#endif
--};
--
- typedef unsigned long shmatt_t;
-
- void *shmat(int, const void *, int);
-diff -Nur musl-0.9.15/include/sys/socket.h musl-git/include/sys/socket.h
---- musl-0.9.15/include/sys/socket.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/include/sys/socket.h 2014-03-19 07:42:48.000000000 +0100
-@@ -202,11 +202,16 @@
- #define SO_LOCK_FILTER 44
- #define SO_SELECT_ERR_QUEUE 45
- #define SO_BUSY_POLL 46
-+#define SO_MAX_PACING_RATE 47
-
- #ifndef SOL_SOCKET
- #define SOL_SOCKET 1
- #endif
-
-+#define SOL_IP 0
-+#define SOL_IPV6 41
-+#define SOL_ICMPV6 58
-+
- #define SOL_RAW 255
- #define SOL_DECNET 261
- #define SOL_X25 262
-diff -Nur musl-0.9.15/include/sys/sysctl.h musl-git/include/sys/sysctl.h
---- musl-0.9.15/include/sys/sysctl.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/include/sys/sysctl.h 1970-01-01 01:00:00.000000000 +0100
-@@ -1,17 +0,0 @@
--#ifndef _SYS_SYSCTL_H
--#define _SYS_SYSCTL_H
--
--#ifdef __cplusplus
--extern "C" {
--#endif
--
--#define __NEED_size_t
--#include <bits/alltypes.h>
--
--int sysctl (int *, int, void *, size_t *, void *, size_t);
--
--#ifdef __cplusplus
--}
--#endif
--
--#endif
-diff -Nur musl-0.9.15/include/sys/time.h musl-git/include/sys/time.h
---- musl-0.9.15/include/sys/time.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/include/sys/time.h 2014-03-19 07:42:48.000000000 +0100
-@@ -51,6 +51,17 @@
- ((a)->tv_usec += 1000000, (a)->tv_sec--) )
- #endif
-
-+#if defined(_GNU_SOURCE)
-+#define TIMEVAL_TO_TIMESPEC(tv, ts) ( \
-+ (ts)->tv_sec = (tv)->tv_sec, \
-+ (ts)->tv_nsec = (tv)->tv_usec * 1000, \
-+ (void)0 )
-+#define TIMESPEC_TO_TIMEVAL(tv, ts) ( \
-+ (tv)->tv_sec = (ts)->tv_sec, \
-+ (tv)->tv_usec = (ts)->tv_nsec / 1000, \
-+ (void)0 )
-+#endif
-+
- #ifdef __cplusplus
- }
- #endif
-diff -Nur musl-0.9.15/include/sys/wait.h musl-git/include/sys/wait.h
---- musl-0.9.15/include/sys/wait.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/include/sys/wait.h 2014-03-19 07:42:48.000000000 +0100
-@@ -50,7 +50,7 @@
- #define WCOREDUMP(s) ((s) & 0x80)
- #define WIFEXITED(s) (!WTERMSIG(s))
- #define WIFSTOPPED(s) ((short)((((s)&0xffff)*0x10001)>>8) > 0x7f00)
--#define WIFSIGNALED(s) (((s)&0xffff)-1 < 0xffu)
-+#define WIFSIGNALED(s) (((s)&0xffff)-1U < 0xffu)
- #define WIFCONTINUED(s) ((s) == 0xffff)
-
- #ifdef __cplusplus
-diff -Nur musl-0.9.15/include/syslog.h musl-git/include/syslog.h
---- musl-0.9.15/include/syslog.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/include/syslog.h 2014-03-19 07:42:48.000000000 +0100
-@@ -21,7 +21,7 @@
- #define LOG_MAKEPRI(f, p) (((f)<<3)|(p))
-
- #define LOG_MASK(p) (1<<(p))
--#define LOG_UPTO(p) ((1<<(p)+1)-1)
-+#define LOG_UPTO(p) ((1<<((p)+1))-1)
-
- #define LOG_KERN (0<<3)
- #define LOG_USER (1<<3)
-diff -Nur musl-0.9.15/include/time.h musl-git/include/time.h
---- musl-0.9.15/include/time.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/include/time.h 2014-03-19 07:42:48.000000000 +0100
-@@ -125,7 +125,7 @@
-
-
- #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
--int stime(time_t *);
-+int stime(const time_t *);
- time_t timegm(struct tm *);
- #endif
-
-diff -Nur musl-0.9.15/include/utmp.h musl-git/include/utmp.h
---- musl-0.9.15/include/utmp.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/include/utmp.h 2014-03-19 07:42:48.000000000 +0100
-@@ -10,6 +10,7 @@
- #define ACCOUNTING 9
- #define UT_NAMESIZE 32
- #define UT_HOSTSIZE 256
-+#define UT_LINESIZE 32
-
- struct lastlog {
- time_t ll_time;
-@@ -22,6 +23,8 @@
- #define ut_addr ut_addr_v6[0]
- #define utmp utmpx
- #define utmpname(x) (-1)
-+#define e_exit __e_exit
-+#define e_termination __e_termination
-
- void endutent(void);
- struct utmp *getutent(void);
-diff -Nur musl-0.9.15/include/utmpx.h musl-git/include/utmpx.h
---- musl-0.9.15/include/utmpx.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/include/utmpx.h 2014-03-19 07:42:48.000000000 +0100
-@@ -5,6 +5,8 @@
- extern "C" {
- #endif
-
-+#include <features.h>
-+
- #define __NEED_pid_t
- #define __NEED_time_t
- #define __NEED_suseconds_t
-@@ -12,19 +14,17 @@
-
- #include <bits/alltypes.h>
-
--#define UT_LINESIZE 32
--
- struct utmpx
- {
- short ut_type;
- pid_t ut_pid;
-- char ut_line[UT_LINESIZE];
-+ char ut_line[32];
- char ut_id[4];
- char ut_user[32];
- char ut_host[256];
- struct {
-- short e_termination;
-- short e_exit;
-+ short __e_termination;
-+ short __e_exit;
- } ut_exit;
- long ut_session;
- struct timeval ut_tv;
-@@ -39,7 +39,11 @@
- struct utmpx *pututxline(const struct utmpx *);
- void setutxent(void);
-
-+#if defined(_BSD_SOURCE) | defined(_GNU_SOURCE)
-+#define e_exit __e_exit
-+#define e_termination __e_termination
- void updwtmpx(const char *, const struct utmpx *);
-+#endif
-
- #define EMPTY 0
- #define RUN_LVL 1
-diff -Nur musl-0.9.15/src/crypt/crypt_des.c musl-git/src/crypt/crypt_des.c
---- musl-0.9.15/src/crypt/crypt_des.c 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/src/crypt/crypt_des.c 2014-03-19 07:42:48.000000000 +0100
-@@ -692,7 +692,7 @@
- return saltbits;
- }
-
--static void des_setkey(const unsigned char *key, struct expanded_key *ekey)
-+void __des_setkey(const unsigned char *key, struct expanded_key *ekey)
- {
- uint32_t k0, k1, rawkey0, rawkey1;
- unsigned int shifts, round, i, ibit;
-@@ -753,7 +753,7 @@
- /*
- * l_in, r_in, l_out, and r_out are in pseudo-"big-endian" format.
- */
--static void do_des(uint32_t l_in, uint32_t r_in,
-+void __do_des(uint32_t l_in, uint32_t r_in,
- uint32_t *l_out, uint32_t *r_out,
- uint32_t count, uint32_t saltbits, const struct expanded_key *ekey)
- {
-@@ -862,7 +862,7 @@
- ((uint32_t)in[5] << 16) |
- ((uint32_t)in[4] << 24);
-
-- do_des(rawl, rawr, &l_out, &r_out, count, saltbits, ekey);
-+ __do_des(rawl, rawr, &l_out, &r_out, count, saltbits, ekey);
-
- out[0] = l_out >> 24;
- out[1] = l_out >> 16;
-@@ -894,7 +894,7 @@
- if (*key)
- key++;
- }
-- des_setkey(keybuf, &ekey);
-+ __des_setkey(keybuf, &ekey);
-
- if (*setting == _PASSWORD_EFMT1) {
- /*
-@@ -929,7 +929,7 @@
- q = keybuf;
- while (q <= &keybuf[sizeof(keybuf) - 1] && *key)
- *q++ ^= *key++ << 1;
-- des_setkey(keybuf, &ekey);
-+ __des_setkey(keybuf, &ekey);
- }
-
- memcpy(output, setting, 9);
-@@ -957,7 +957,7 @@
- /*
- * Do it.
- */
-- do_des(0, 0, &r0, &r1, count, setup_salt(salt), &ekey);
-+ __do_des(0, 0, &r0, &r1, count, setup_salt(salt), &ekey);
-
- /*
- * Now encode the result...
-diff -Nur musl-0.9.15/src/crypt/encrypt.c musl-git/src/crypt/encrypt.c
---- musl-0.9.15/src/crypt/encrypt.c 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/crypt/encrypt.c 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,60 @@
-+#include <stdint.h>
-+#include <stdlib.h>
-+#include <unistd.h>
-+
-+struct expanded_key {
-+ uint32_t l[16], r[16];
-+};
-+
-+void __des_setkey(const unsigned char *key, struct expanded_key *ekey);
-+void __do_des(uint32_t l_in, uint32_t r_in,
-+ uint32_t *l_out, uint32_t *r_out,
-+ uint32_t count, uint32_t saltbits, const struct expanded_key *ekey);
-+
-+
-+static struct expanded_key __encrypt_key;
-+
-+void setkey(const char *key)
-+{
-+ unsigned char bkey[8];
-+ int i, j;
-+
-+ for (i = 0; i < 8; i++) {
-+ bkey[i] = 0;
-+ for (j = 7; j >= 0; j--, key++)
-+ bkey[i] |= (uint32_t)(*key & 1) << j;
-+ }
-+
-+ __des_setkey(bkey, &__encrypt_key);
-+}
-+
-+void encrypt(char *block, int edflag)
-+{
-+ struct expanded_key decrypt_key, *key;
-+ uint32_t b[2];
-+ int i, j;
-+ char *p;
-+
-+ p = block;
-+ for (i = 0; i < 2; i++) {
-+ b[i] = 0;
-+ for (j = 31; j >= 0; j--, p++)
-+ b[i] |= (uint32_t)(*p & 1) << j;
-+ }
-+
-+ key = &__encrypt_key;
-+ if (edflag) {
-+ key = &decrypt_key;
-+ for (i = 0; i < 16; i++) {
-+ decrypt_key.l[i] = __encrypt_key.l[15-i];
-+ decrypt_key.r[i] = __encrypt_key.r[15-i];
-+ }
-+ }
-+
-+ __do_des(b[0], b[1], b, b + 1, 1, 0, key);
-+
-+ p = block;
-+ for (i = 0; i < 2; i++)
-+ for (j = 31; j >= 0; j--)
-+ *p++ = b[i]>>j & 1;
-+}
-diff -Nur musl-0.9.15/src/dirent/readdir.c musl-git/src/dirent/readdir.c
---- musl-0.9.15/src/dirent/readdir.c 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/src/dirent/readdir.c 2014-03-19 07:42:48.000000000 +0100
-@@ -1,5 +1,7 @@
- #include <dirent.h>
-+#include <errno.h>
- #include "__dirent.h"
-+#include "syscall.h"
- #include "libc.h"
-
- int __getdents(int, struct dirent *, size_t);
-@@ -9,8 +11,11 @@
- struct dirent *de;
-
- if (dir->buf_pos >= dir->buf_end) {
-- int len = __getdents(dir->fd, (void *)dir->buf, sizeof dir->buf);
-- if (len <= 0) return 0;
-+ int len = __syscall(SYS_getdents, dir->fd, dir->buf, sizeof dir->buf);
-+ if (len <= 0) {
-+ if (len < 0 && len != -ENOENT) errno = -len;
-+ return 0;
-+ }
- dir->buf_end = len;
- dir->buf_pos = 0;
- }
-diff -Nur musl-0.9.15/src/errno/strerror.c musl-git/src/errno/strerror.c
---- musl-0.9.15/src/errno/strerror.c 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/src/errno/strerror.c 2014-03-19 07:42:48.000000000 +0100
-@@ -1,7 +1,7 @@
- #include <errno.h>
- #include <string.h>
-
--#define E(a,b) a,
-+#define E(a,b) ((unsigned char)a),
- static const unsigned char errid[] = {
- #include "__strerror.h"
- };
-@@ -16,6 +16,12 @@
- {
- const char *s;
- int i;
-+ /* mips has one error code outside of the 8-bit range due to a
-+ * historical typo, so we just remap it. */
-+ if (EDQUOT==1133) {
-+ if (e==109) e=-1;
-+ else if (e==EDQUOT) e=109;
-+ }
- for (i=0; errid[i] && errid[i] != e; i++);
- for (s=errmsg; i; s++, i--) for (; *s; s++);
- return (char *)s;
-diff -Nur musl-0.9.15/src/fcntl/fcntl.c musl-git/src/fcntl/fcntl.c
---- musl-0.9.15/src/fcntl/fcntl.c 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/src/fcntl/fcntl.c 2014-03-19 07:42:48.000000000 +0100
-@@ -7,17 +7,17 @@
-
- int fcntl(int fd, int cmd, ...)
- {
-- long arg;
-+ unsigned long arg;
- va_list ap;
- va_start(ap, cmd);
-- arg = va_arg(ap, long);
-+ arg = va_arg(ap, unsigned long);
- va_end(ap);
- if (cmd == F_SETFL) arg |= O_LARGEFILE;
-- if (cmd == F_SETLKW) return syscall_cp(SYS_fcntl, fd, cmd, arg);
-+ if (cmd == F_SETLKW) return syscall_cp(SYS_fcntl, fd, cmd, (void *)arg);
- if (cmd == F_GETOWN) {
- struct f_owner_ex ex;
- int ret = __syscall(SYS_fcntl, fd, F_GETOWN_EX, &ex);
-- if (ret == -EINVAL) return __syscall(SYS_fcntl, fd, cmd, arg);
-+ if (ret == -EINVAL) return __syscall(SYS_fcntl, fd, cmd, (void *)arg);
- if (ret) return __syscall_ret(ret);
- return ex.type == F_OWNER_PGRP ? -ex.pid : ex.pid;
- }
-@@ -37,5 +37,14 @@
- if (ret >= 0) __syscall(SYS_fcntl, ret, F_SETFD, FD_CLOEXEC);
- return __syscall_ret(ret);
- }
-- return syscall(SYS_fcntl, fd, cmd, arg);
-+ switch (cmd) {
-+ case F_SETLK:
-+ case F_SETLKW:
-+ case F_GETLK:
-+ case F_GETOWN_EX:
-+ case F_SETOWN_EX:
-+ return syscall(SYS_fcntl, fd, cmd, (void *)arg);
-+ default:
-+ return syscall(SYS_fcntl, fd, cmd, arg);
-+ }
- }
-diff -Nur musl-0.9.15/src/fcntl/posix_fadvise.c musl-git/src/fcntl/posix_fadvise.c
---- musl-0.9.15/src/fcntl/posix_fadvise.c 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/src/fcntl/posix_fadvise.c 2014-03-19 07:42:48.000000000 +0100
-@@ -1,8 +1,11 @@
- #include <fcntl.h>
- #include "syscall.h"
-+#include "libc.h"
-
- int posix_fadvise(int fd, off_t base, off_t len, int advice)
- {
- return -(__syscall)(SYS_fadvise, fd, __SYSCALL_LL_O(base),
- __SYSCALL_LL_E(len), advice);
- }
-+
-+LFS64(posix_fadvise);
-diff -Nur musl-0.9.15/src/fcntl/posix_fallocate.c musl-git/src/fcntl/posix_fallocate.c
---- musl-0.9.15/src/fcntl/posix_fallocate.c 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/src/fcntl/posix_fallocate.c 2014-03-19 07:42:48.000000000 +0100
-@@ -1,8 +1,11 @@
- #include <fcntl.h>
- #include "syscall.h"
-+#include "libc.h"
-
- int posix_fallocate(int fd, off_t base, off_t len)
- {
- return -__syscall(SYS_fallocate, fd, 0, __SYSCALL_LL_E(base),
- __SYSCALL_LL_E(len));
- }
-+
-+LFS64(posix_fallocate);
-diff -Nur musl-0.9.15/src/fenv/i386/fenv.s musl-git/src/fenv/i386/fenv.s
---- musl-0.9.15/src/fenv/i386/fenv.s 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/src/fenv/i386/fenv.s 2014-03-19 07:42:48.000000000 +0100
-@@ -126,7 +126,7 @@
- push %eax
- push %eax
- push %eax
-- push %eax
-+ pushl $0xffff
- push %eax
- pushl $0x37f
- fldenv (%esp)
-diff -Nur musl-0.9.15/src/fenv/mipsel-sf/fenv.sub musl-git/src/fenv/mipsel-sf/fenv.sub
---- musl-0.9.15/src/fenv/mipsel-sf/fenv.sub 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/fenv/mipsel-sf/fenv.sub 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1 @@
-+../fenv.c
-diff -Nur musl-0.9.15/src/fenv/mips-sf/fenv.sub musl-git/src/fenv/mips-sf/fenv.sub
---- musl-0.9.15/src/fenv/mips-sf/fenv.sub 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/fenv/mips-sf/fenv.sub 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1 @@
-+../fenv.c
-diff -Nur musl-0.9.15/src/fenv/sh/fenv.s musl-git/src/fenv/sh/fenv.s
---- musl-0.9.15/src/fenv/sh/fenv.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/fenv/sh/fenv.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,74 @@
-+.global fegetround
-+.type fegetround, @function
-+fegetround:
-+ sts fpscr, r0
-+ rts
-+ and #3, r0
-+
-+.global __fesetround
-+.type __fesetround, @function
-+__fesetround:
-+ sts fpscr, r0
-+ or r4, r0
-+ lds r0, fpscr
-+ rts
-+ mov #0, r0
-+
-+.global fetestexcept
-+.type fetestexcept, @function
-+fetestexcept:
-+ sts fpscr, r0
-+ and r4, r0
-+ rts
-+ and #0x7c, r0
-+
-+.global feclearexcept
-+.type feclearexcept, @function
-+feclearexcept:
-+ mov r4, r0
-+ and #0x7c, r0
-+ not r0, r4
-+ sts fpscr, r0
-+ and r4, r0
-+ lds r0, fpscr
-+ rts
-+ mov #0, r0
-+
-+.global feraiseexcept
-+.type feraiseexcept, @function
-+feraiseexcept:
-+ mov r4, r0
-+ and #0x7c, r0
-+ sts fpscr, r4
-+ or r4, r0
-+ lds r0, fpscr
-+ rts
-+ mov #0, r0
-+
-+.global fegetenv
-+.type fegetenv, @function
-+fegetenv:
-+ sts fpscr, r0
-+ mov.l r0, @r4
-+ rts
-+ mov #0, r0
-+
-+.global fesetenv
-+.type fesetenv, @function
-+fesetenv:
-+ mov r4, r0
-+ cmp/eq #-1, r0
-+ bf 1f
-+
-+ ! the default environment is complicated by the fact that we need to
-+ ! preserve the current precision bit, which we do not know a priori
-+ sts fpscr, r0
-+ mov #8, r1
-+ swap.w r1, r1
-+ bra 2f
-+ and r1, r0
-+
-+1: mov.l @r4, r0 ! non-default environment
-+2: lds r0, fpscr
-+ rts
-+ mov #0, r0
-diff -Nur musl-0.9.15/src/fenv/sheb-nofpu/fenv.sub musl-git/src/fenv/sheb-nofpu/fenv.sub
---- musl-0.9.15/src/fenv/sheb-nofpu/fenv.sub 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/fenv/sheb-nofpu/fenv.sub 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1 @@
-+../fenv.c
-diff -Nur musl-0.9.15/src/fenv/sh-nofpu/fenv.sub musl-git/src/fenv/sh-nofpu/fenv.sub
---- musl-0.9.15/src/fenv/sh-nofpu/fenv.sub 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/fenv/sh-nofpu/fenv.sub 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1 @@
-+../fenv.c
-diff -Nur musl-0.9.15/src/fenv/x32/fenv.s musl-git/src/fenv/x32/fenv.s
---- musl-0.9.15/src/fenv/x32/fenv.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/fenv/x32/fenv.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,97 @@
-+.global feclearexcept
-+.type feclearexcept,@function
-+feclearexcept:
-+ # maintain exceptions in the sse mxcsr, clear x87 exceptions
-+ mov %edi,%ecx
-+ and $0x3f,%ecx
-+ fnstsw %ax
-+ test %eax,%ecx
-+ jz 1f
-+ fnclex
-+1: stmxcsr -8(%esp)
-+ and $0x3f,%eax
-+ or %eax,-8(%esp)
-+ test %ecx,-8(%esp)
-+ jz 1f
-+ not %ecx
-+ and %ecx,-8(%esp)
-+ ldmxcsr -8(%esp)
-+1: xor %eax,%eax
-+ ret
-+
-+.global feraiseexcept
-+.type feraiseexcept,@function
-+feraiseexcept:
-+ and $0x3f,%edi
-+ stmxcsr -8(%esp)
-+ or %edi,-8(%esp)
-+ ldmxcsr -8(%esp)
-+ xor %eax,%eax
-+ ret
-+
-+.global __fesetround
-+.type __fesetround,@function
-+__fesetround:
-+ push %rax
-+ xor %eax,%eax
-+ mov %edi,%ecx
-+ fnstcw (%esp)
-+ andb $0xf3,1(%esp)
-+ or %ch,1(%esp)
-+ fldcw (%esp)
-+ stmxcsr (%esp)
-+ shl $3,%ch
-+ andb $0x9f,1(%esp)
-+ or %ch,1(%esp)
-+ ldmxcsr (%esp)
-+ pop %rcx
-+ ret
-+
-+.global fegetround
-+.type fegetround,@function
-+fegetround:
-+ push %rax
-+ stmxcsr (%esp)
-+ pop %rax
-+ shr $3,%eax
-+ and $0xc00,%eax
-+ ret
-+
-+.global fegetenv
-+.type fegetenv,@function
-+fegetenv:
-+ xor %eax,%eax
-+ fnstenv (%edi)
-+ stmxcsr 28(%edi)
-+ ret
-+
-+.global fesetenv
-+.type fesetenv,@function
-+fesetenv:
-+ xor %eax,%eax
-+ inc %edi
-+ jz 1f
-+ fldenv -1(%edi)
-+ ldmxcsr 27(%edi)
-+ ret
-+1: push %rax
-+ push %rax
-+ pushq $0xffff
-+ pushq $0x37f
-+ fldenv (%esp)
-+ pushq $0x1f80
-+ ldmxcsr (%esp)
-+ add $40,%esp
-+ ret
-+
-+.global fetestexcept
-+.type fetestexcept,@function
-+fetestexcept:
-+ and $0x3f,%edi
-+ push %rax
-+ stmxcsr (%esp)
-+ pop %rsi
-+ fnstsw %ax
-+ or %esi,%eax
-+ and %edi,%eax
-+ ret
-diff -Nur musl-0.9.15/src/fenv/x86_64/fenv.s musl-git/src/fenv/x86_64/fenv.s
---- musl-0.9.15/src/fenv/x86_64/fenv.s 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/src/fenv/x86_64/fenv.s 2014-03-19 07:42:48.000000000 +0100
-@@ -76,7 +76,7 @@
- ret
- 1: push %rax
- push %rax
-- push %rax
-+ pushq $0xffff
- pushq $0x37f
- fldenv (%rsp)
- pushq $0x1f80
-diff -Nur musl-0.9.15/src/internal/sh/syscall.s musl-git/src/internal/sh/syscall.s
---- musl-0.9.15/src/internal/sh/syscall.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/internal/sh/syscall.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,22 @@
-+.global __syscall
-+.type __syscall, @function
-+__syscall:
-+ ! The kernel syscall entry point documents that the trap number indicates
-+ ! the number of arguments being passed, but it then ignores that information.
-+ ! Since we do not actually know how many arguments are being passed, we will
-+ ! say there are six, since that is the maximum we support here.
-+ mov r4, r3
-+ mov r5, r4
-+ mov r6, r5
-+ mov r7, r6
-+ mov.l @r15, r7
-+ mov.l @(4,r15), r0
-+ mov.l @(8,r15), r1
-+ trapa #22
-+ or r0, r0
-+ or r0, r0
-+ or r0, r0
-+ or r0, r0
-+ or r0, r0
-+ rts
-+ nop
-diff -Nur musl-0.9.15/src/internal/stdio_impl.h musl-git/src/internal/stdio_impl.h
---- musl-0.9.15/src/internal/stdio_impl.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/src/internal/stdio_impl.h 2014-03-19 07:42:48.000000000 +0100
-@@ -17,6 +17,7 @@
- #define F_EOF 16
- #define F_ERR 32
- #define F_SVB 64
-+#define F_APP 128
-
- struct _IO_FILE {
- unsigned flags;
-diff -Nur musl-0.9.15/src/internal/syscall.h musl-git/src/internal/syscall.h
---- musl-0.9.15/src/internal/syscall.h 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/src/internal/syscall.h 2014-03-19 07:42:48.000000000 +0100
-@@ -1,22 +1,28 @@
- #ifndef _INTERNAL_SYSCALL_H
- #define _INTERNAL_SYSCALL_H
-
--#if defined(__PIC__) && (100*__GNUC__+__GNUC_MINOR__ >= 303)
--__attribute__((visibility("protected")))
--#endif
--long __syscall_ret(unsigned long), __syscall(long, ...),
-- __syscall_cp(long, long, long, long, long, long, long);
--
- #include <sys/syscall.h>
- #include "syscall_arch.h"
-
--#define __syscall1(n,a) __syscall1(n,(long)(a))
--#define __syscall2(n,a,b) __syscall2(n,(long)(a),(long)(b))
--#define __syscall3(n,a,b,c) __syscall3(n,(long)(a),(long)(b),(long)(c))
--#define __syscall4(n,a,b,c,d) __syscall4(n,(long)(a),(long)(b),(long)(c),(long)(d))
--#define __syscall5(n,a,b,c,d,e) __syscall5(n,(long)(a),(long)(b),(long)(c),(long)(d),(long)(e))
--#define __syscall6(n,a,b,c,d,e,f) __syscall6(n,(long)(a),(long)(b),(long)(c),(long)(d),(long)(e),(long)(f))
--#define __syscall7(n,a,b,c,d,e,f,g) (__syscall)(n,(long)(a),(long)(b),(long)(c),(long)(d),(long)(e),(long)(f),(long)g)
-+#ifndef __scc
-+#define __scc(X) ((long) (X))
-+typedef long syscall_arg_t;
-+#endif
-+
-+#if defined(__PIC__) && (100*__GNUC__+__GNUC_MINOR__ >= 303)
-+__attribute__((visibility("protected")))
-+#endif
-+long __syscall_ret(unsigned long), __syscall(syscall_arg_t, ...),
-+ __syscall_cp(syscall_arg_t, syscall_arg_t, syscall_arg_t, syscall_arg_t,
-+ syscall_arg_t, syscall_arg_t, syscall_arg_t);
-+
-+#define __syscall1(n,a) __syscall1(n,__scc(a))
-+#define __syscall2(n,a,b) __syscall2(n,__scc(a),__scc(b))
-+#define __syscall3(n,a,b,c) __syscall3(n,__scc(a),__scc(b),__scc(c))
-+#define __syscall4(n,a,b,c,d) __syscall4(n,__scc(a),__scc(b),__scc(c),__scc(d))
-+#define __syscall5(n,a,b,c,d,e) __syscall5(n,__scc(a),__scc(b),__scc(c),__scc(d),__scc(e))
-+#define __syscall6(n,a,b,c,d,e,f) __syscall6(n,__scc(a),__scc(b),__scc(c),__scc(d),__scc(e),__scc(f))
-+#define __syscall7(n,a,b,c,d,e,f,g) (__syscall)(n,__scc(a),__scc(b),__scc(c),__scc(d),__scc(e),__scc(f),__scc(g))
-
- #define __SYSCALL_NARGS_X(a,b,c,d,e,f,g,h,n,...) n
- #define __SYSCALL_NARGS(...) __SYSCALL_NARGS_X(__VA_ARGS__,7,6,5,4,3,2,1,0,)
-@@ -31,12 +37,12 @@
- #define socketcall_cp __socketcall_cp
-
- #define __syscall_cp0(n) (__syscall_cp)(n,0,0,0,0,0,0)
--#define __syscall_cp1(n,a) (__syscall_cp)(n,(long)(a),0,0,0,0,0)
--#define __syscall_cp2(n,a,b) (__syscall_cp)(n,(long)(a),(long)(b),0,0,0,0)
--#define __syscall_cp3(n,a,b,c) (__syscall_cp)(n,(long)(a),(long)(b),(long)(c),0,0,0)
--#define __syscall_cp4(n,a,b,c,d) (__syscall_cp)(n,(long)(a),(long)(b),(long)(c),(long)(d),0,0)
--#define __syscall_cp5(n,a,b,c,d,e) (__syscall_cp)(n,(long)(a),(long)(b),(long)(c),(long)(d),(long)(e),0)
--#define __syscall_cp6(n,a,b,c,d,e,f) (__syscall_cp)(n,(long)(a),(long)(b),(long)(c),(long)(d),(long)(e),(long)(f))
-+#define __syscall_cp1(n,a) (__syscall_cp)(n,__scc(a),0,0,0,0,0)
-+#define __syscall_cp2(n,a,b) (__syscall_cp)(n,__scc(a),__scc(b),0,0,0,0)
-+#define __syscall_cp3(n,a,b,c) (__syscall_cp)(n,__scc(a),__scc(b),__scc(c),0,0,0)
-+#define __syscall_cp4(n,a,b,c,d) (__syscall_cp)(n,__scc(a),__scc(b),__scc(c),__scc(d),0,0)
-+#define __syscall_cp5(n,a,b,c,d,e) (__syscall_cp)(n,__scc(a),__scc(b),__scc(c),__scc(d),__scc(e),0)
-+#define __syscall_cp6(n,a,b,c,d,e,f) (__syscall_cp)(n,__scc(a),__scc(b),__scc(c),__scc(d),__scc(e),__scc(f))
-
- #define __syscall_cp(...) __SYSCALL_DISP(__syscall_cp,__VA_ARGS__)
- #define syscall_cp(...) __syscall_ret(__syscall_cp(__VA_ARGS__))
-diff -Nur musl-0.9.15/src/internal/x32/syscall.s musl-git/src/internal/x32/syscall.s
---- musl-0.9.15/src/internal/x32/syscall.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/internal/x32/syscall.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,12 @@
-+.global __syscall
-+.type __syscall,@function
-+__syscall:
-+ movq %rdi,%rax
-+ movq %rsi,%rdi
-+ movq %rdx,%rsi
-+ movq %rcx,%rdx
-+ movq %r8,%r10
-+ movq %r9,%r8
-+ movq 8(%rsp),%r9
-+ syscall
-+ ret
-diff -Nur musl-0.9.15/src/ipc/semctl.c musl-git/src/ipc/semctl.c
---- musl-0.9.15/src/ipc/semctl.c 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/src/ipc/semctl.c 2014-03-19 07:42:48.000000000 +0100
-@@ -3,16 +3,26 @@
- #include "syscall.h"
- #include "ipc.h"
-
-+union semun {
-+ int val;
-+ struct semid_ds *buf;
-+ unsigned short *array;
-+};
-+
- int semctl(int id, int num, int cmd, ...)
- {
-- long arg;
-+ union semun arg = {0};
- va_list ap;
-- va_start(ap, cmd);
-- arg = va_arg(ap, long);
-- va_end(ap);
-+ switch (cmd) {
-+ case SETVAL: case GETALL: case SETALL: case IPC_STAT: case IPC_SET:
-+ case IPC_INFO: case SEM_INFO: case SEM_STAT:
-+ va_start(ap, cmd);
-+ arg = va_arg(ap, union semun);
-+ va_end(ap);
-+ }
- #ifdef SYS_semctl
-- return syscall(SYS_semctl, id, num, cmd | IPC_64, arg);
-+ return syscall(SYS_semctl, id, num, cmd | IPC_64, arg.buf);
- #else
-- return syscall(SYS_ipc, IPCOP_semctl, id, num, cmd | IPC_64, &arg);
-+ return syscall(SYS_ipc, IPCOP_semctl, id, num, cmd | IPC_64, &arg.buf);
- #endif
- }
-diff -Nur musl-0.9.15/src/ldso/dladdr.c musl-git/src/ldso/dladdr.c
---- musl-0.9.15/src/ldso/dladdr.c 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/src/ldso/dladdr.c 2014-03-19 07:42:48.000000000 +0100
-@@ -1,9 +1,9 @@
- #define _GNU_SOURCE
- #include <dlfcn.h>
-
--int __dladdr(void *, Dl_info *);
-+int __dladdr(const void *, Dl_info *);
-
--int dladdr(void *addr, Dl_info *info)
-+int dladdr(const void *addr, Dl_info *info)
- {
- return __dladdr(addr, info);
- }
-diff -Nur musl-0.9.15/src/ldso/dynlink.c musl-git/src/ldso/dynlink.c
---- musl-0.9.15/src/ldso/dynlink.c 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/src/ldso/dynlink.c 2014-03-19 07:42:48.000000000 +0100
-@@ -253,7 +253,8 @@
- name = strings + sym->st_name;
- ctx = IS_COPY(type) ? head->next : head;
- def = find_sym(ctx, name, IS_PLT(type));
-- if (!def.sym && sym->st_info>>4 != STB_WEAK) {
-+ if (!def.sym && (sym->st_shndx != SHN_UNDEF
-+ || sym->st_info>>4 != STB_WEAK)) {
- snprintf(errbuf, sizeof errbuf,
- "Error relocating %s: %s: symbol not found",
- dso->name, name);
-@@ -1331,7 +1332,7 @@
- return 0;
- }
-
--int __dladdr(void *addr, Dl_info *info)
-+int __dladdr(const void *addr, Dl_info *info)
- {
- struct dso *p;
- Sym *sym;
-@@ -1441,7 +1442,7 @@
- {
- return 0;
- }
--int __dladdr (void *addr, Dl_info *info)
-+int __dladdr (const void *addr, Dl_info *info)
- {
- return 0;
- }
-diff -Nur musl-0.9.15/src/ldso/sh/dlsym.s musl-git/src/ldso/sh/dlsym.s
---- musl-0.9.15/src/ldso/sh/dlsym.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/ldso/sh/dlsym.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,10 @@
-+.text
-+.global dlsym
-+.type dlsym, @function
-+dlsym:
-+ mov.l L1, r0
-+ braf r0
-+1: mov.l @r15, r6
-+
-+.align 2
-+L1: .long __dlsym@PLT-(1b-.)
-diff -Nur musl-0.9.15/src/ldso/sh/start.s musl-git/src/ldso/sh/start.s
---- musl-0.9.15/src/ldso/sh/start.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/ldso/sh/start.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,26 @@
-+.text
-+.global _start
-+.type _start, @function
-+_start:
-+ mov.l @r15, r4
-+ mov r15, r5
-+ mov.l L1, r0
-+ bsrf r0
-+ add #4, r5
-+
-+2: mov r0, r2
-+ mov.l @r15+, r1
-+1: mov.l @r15+, r0
-+ cmp/eq #-1, r0
-+ bt/s 1b
-+ add #-1, r1
-+
-+ add #1, r1
-+ mov.l r0, @-r15
-+ mov.l r1, @-r15
-+ mov #0, r4
-+ jmp @r2
-+ nop
-+
-+.align 2
-+L1: .long __dynlink@PLT-(2b-.)
-diff -Nur musl-0.9.15/src/ldso/x32/dlsym.s musl-git/src/ldso/x32/dlsym.s
---- musl-0.9.15/src/ldso/x32/dlsym.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/ldso/x32/dlsym.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,6 @@
-+.text
-+.global dlsym
-+.type dlsym,@function
-+dlsym:
-+ mov (%rsp),%rdx
-+ jmp __dlsym
-diff -Nur musl-0.9.15/src/ldso/x32/start.s musl-git/src/ldso/x32/start.s
---- musl-0.9.15/src/ldso/x32/start.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/ldso/x32/start.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,24 @@
-+.text
-+.global _start
-+_start:
-+ mov (%rsp),%rdi /* move argc into 1st argument slot */
-+ lea 4(%rsp),%rsi /* move argv into 2nd argument slot */
-+ call __dynlink
-+ /* in case the dynlinker was called directly, it sets the "consumed"
-+ argv values to -1. so we must loop over the array as long as -1
-+ is in the top argv slot, decrement argc, and then set the stackpointer
-+ to the new argc as well as argc's new value.
-+ as the x32 abi has longs in the argv array, we cannot use push/pop.*/
-+ movl (%rsp),%edi /* copy argc into edi */
-+ xor %rdx,%rdx /* we use rdx as an offset to the current argv member */
-+1: dec %edi
-+ addl $4, %edx
-+ movl (%rsp, %rdx), %esi
-+ cmp $-1,%esi
-+ jz 1b
-+ inc %edi
-+ subl $4, %edx
-+ lea (%rsp, %rdx), %rsp /* set rsp to new argv[-1] */
-+ movl %edi, (%rsp) /* write new argc there */
-+ xor %edx,%edx
-+ jmp *%rax
-diff -Nur musl-0.9.15/src/linux/clone.c musl-git/src/linux/clone.c
---- musl-0.9.15/src/linux/clone.c 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/linux/clone.c 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,19 @@
-+#include <stdarg.h>
-+#include <unistd.h>
-+#include "pthread_impl.h"
-+#include "syscall.h"
-+
-+int clone(int (*func)(void *), void *stack, int flags, void *arg, ...)
-+{
-+ va_list ap;
-+ pid_t *ptid, *ctid;
-+ void *tls;
-+
-+ va_start(ap, arg);
-+ ptid = va_arg(ap, pid_t *);
-+ tls = va_arg(ap, void *);
-+ ctid = va_arg(ap, pid_t *);
-+ va_end(ap);
-+
-+ return __syscall_ret(__clone(func, stack, flags, arg, ptid, tls, ctid));
-+}
-diff -Nur musl-0.9.15/src/linux/fallocate.c musl-git/src/linux/fallocate.c
---- musl-0.9.15/src/linux/fallocate.c 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/src/linux/fallocate.c 2014-03-19 07:42:48.000000000 +0100
-@@ -1,9 +1,13 @@
- #define _GNU_SOURCE
- #include <fcntl.h>
- #include "syscall.h"
-+#include "libc.h"
-
- int fallocate(int fd, int mode, off_t base, off_t len)
- {
- return syscall(SYS_fallocate, fd, mode, __SYSCALL_LL_E(base),
- __SYSCALL_LL_E(len));
- }
-+
-+#undef fallocate64
-+LFS64(fallocate);
-diff -Nur musl-0.9.15/src/linux/inotify.c musl-git/src/linux/inotify.c
---- musl-0.9.15/src/linux/inotify.c 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/src/linux/inotify.c 2014-03-19 07:42:48.000000000 +0100
-@@ -15,7 +15,7 @@
- return syscall(SYS_inotify_add_watch, fd, pathname, mask);
- }
-
--int inotify_rm_watch(int fd, uint32_t wd)
-+int inotify_rm_watch(int fd, int wd)
- {
- return syscall(SYS_inotify_rm_watch, fd, wd);
- }
-diff -Nur musl-0.9.15/src/linux/remap_file_pages.c musl-git/src/linux/remap_file_pages.c
---- musl-0.9.15/src/linux/remap_file_pages.c 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/src/linux/remap_file_pages.c 2014-03-19 07:42:48.000000000 +0100
-@@ -2,7 +2,7 @@
- #include <sys/mman.h>
- #include "syscall.h"
-
--int remap_file_pages(void *addr, size_t size, int prot, ssize_t pgoff, int flags)
-+int remap_file_pages(void *addr, size_t size, int prot, size_t pgoff, int flags)
- {
- return syscall(SYS_remap_file_pages, addr, size, prot, pgoff, flags);
- }
-diff -Nur musl-0.9.15/src/linux/stime.c musl-git/src/linux/stime.c
---- musl-0.9.15/src/linux/stime.c 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/src/linux/stime.c 2014-03-19 07:42:48.000000000 +0100
-@@ -2,7 +2,7 @@
- #include <time.h>
- #include <sys/time.h>
-
--int stime(time_t *t)
-+int stime(const time_t *t)
- {
- struct timeval tv = { .tv_sec = *t, .tv_usec = 0 };
- return settimeofday(&tv, (void *)0);
-diff -Nur musl-0.9.15/src/linux/x32/sysinfo.s musl-git/src/linux/x32/sysinfo.s
---- musl-0.9.15/src/linux/x32/sysinfo.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/linux/x32/sysinfo.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,5 @@
-+.text
-+.global sysinfo
-+.type sysinfo,@function
-+sysinfo:
-+ jmp __x32_sysinfo
-diff -Nur musl-0.9.15/src/locale/wcsxfrm.c musl-git/src/locale/wcsxfrm.c
---- musl-0.9.15/src/locale/wcsxfrm.c 2014-01-03 21:12:17.000000000 +0100
-+++ musl-git/src/locale/wcsxfrm.c 2014-03-19 07:42:48.000000000 +0100
-@@ -6,10 +6,12 @@
- size_t __wcsxfrm_l(wchar_t *restrict dest, const wchar_t *restrict src, size_t n, locale_t loc)
- {
- size_t l = wcslen(src);
-- if (l >= n) {
-+ if (l < n) {
-+ wmemcpy(dest, src, l+1);
-+ } else if (n) {
- wmemcpy(dest, src, n-1);
- dest[n-1] = 0;
-- } else wcscpy(dest, src);
-+ }
- return l;
- }
-
-diff -Nur musl-0.9.15/src/math/i386/remainderf.s musl-git/src/math/i386/remainderf.s
---- musl-0.9.15/src/math/i386/remainderf.s 2014-01-03 21:12:18.000000000 +0100
-+++ musl-git/src/math/i386/remainderf.s 2014-03-19 07:42:48.000000000 +0100
-@@ -1,6 +1,9 @@
- .global remainderf
- .type remainderf,@function
- remainderf:
-+.weak dremf
-+.type dremf,@function
-+dremf:
- flds 8(%esp)
- flds 4(%esp)
- 1: fprem1
-diff -Nur musl-0.9.15/src/math/i386/remainder.s musl-git/src/math/i386/remainder.s
---- musl-0.9.15/src/math/i386/remainder.s 2014-01-03 21:12:18.000000000 +0100
-+++ musl-git/src/math/i386/remainder.s 2014-03-19 07:42:48.000000000 +0100
-@@ -1,6 +1,9 @@
- .global remainder
- .type remainder,@function
- remainder:
-+.weak drem
-+.type drem,@function
-+drem:
- fldl 12(%esp)
- fldl 4(%esp)
- 1: fprem1
-diff -Nur musl-0.9.15/src/math/x32/acosl.s musl-git/src/math/x32/acosl.s
---- musl-0.9.15/src/math/x32/acosl.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/math/x32/acosl.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,16 @@
-+# see ../i386/acos.s
-+
-+.global acosl
-+.type acosl,@function
-+acosl:
-+ fldt 8(%esp)
-+1: fld %st(0)
-+ fld1
-+ fsub %st(0),%st(1)
-+ fadd %st(2)
-+ fmulp
-+ fsqrt
-+ fabs
-+ fxch %st(1)
-+ fpatan
-+ ret
-diff -Nur musl-0.9.15/src/math/x32/asinl.s musl-git/src/math/x32/asinl.s
---- musl-0.9.15/src/math/x32/asinl.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/math/x32/asinl.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,12 @@
-+.global asinl
-+.type asinl,@function
-+asinl:
-+ fldt 8(%esp)
-+1: fld %st(0)
-+ fld1
-+ fsub %st(0),%st(1)
-+ fadd %st(2)
-+ fmulp
-+ fsqrt
-+ fpatan
-+ ret
-diff -Nur musl-0.9.15/src/math/x32/atan2l.s musl-git/src/math/x32/atan2l.s
---- musl-0.9.15/src/math/x32/atan2l.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/math/x32/atan2l.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,7 @@
-+.global atan2l
-+.type atan2l,@function
-+atan2l:
-+ fldt 8(%esp)
-+ fldt 24(%esp)
-+ fpatan
-+ ret
-diff -Nur musl-0.9.15/src/math/x32/atanl.s musl-git/src/math/x32/atanl.s
---- musl-0.9.15/src/math/x32/atanl.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/math/x32/atanl.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,7 @@
-+.global atanl
-+.type atanl,@function
-+atanl:
-+ fldt 8(%esp)
-+ fld1
-+ fpatan
-+ ret
-diff -Nur musl-0.9.15/src/math/x32/ceill.s musl-git/src/math/x32/ceill.s
---- musl-0.9.15/src/math/x32/ceill.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/math/x32/ceill.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1 @@
-+# see floorl.s
-diff -Nur musl-0.9.15/src/math/x32/exp2l.s musl-git/src/math/x32/exp2l.s
---- musl-0.9.15/src/math/x32/exp2l.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/math/x32/exp2l.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,90 @@
-+.global expm1l
-+.type expm1l,@function
-+expm1l:
-+ fldt 8(%esp)
-+ fldl2e
-+ fmulp
-+ movl $0xc2820000,-4(%esp)
-+ flds -4(%esp)
-+ fucomp %st(1)
-+ fnstsw %ax
-+ sahf
-+ fld1
-+ jb 1f
-+ # x*log2e <= -65, return -1 without underflow
-+ fstp %st(1)
-+ fchs
-+ ret
-+1: fld %st(1)
-+ fabs
-+ fucom %st(1)
-+ fnstsw %ax
-+ fstp %st(0)
-+ fstp %st(0)
-+ sahf
-+ ja 1f
-+ f2xm1
-+ ret
-+1: push %rax
-+ call 1f
-+ pop %rax
-+ fld1
-+ fsubrp
-+ ret
-+
-+.global exp2l
-+.type exp2l,@function
-+exp2l:
-+ fldt 8(%esp)
-+1: fld %st(0)
-+ sub $16,%esp
-+ fstpt (%esp)
-+ mov 8(%esp),%ax
-+ and $0x7fff,%ax
-+ cmp $0x3fff+13,%ax
-+ jb 4f # |x| < 8192
-+ cmp $0x3fff+15,%ax
-+ jae 3f # |x| >= 32768
-+ fsts (%esp)
-+ cmpl $0xc67ff800,(%esp)
-+ jb 2f # x > -16382
-+ movl $0x5f000000,(%esp)
-+ flds (%esp) # 0x1p63
-+ fld %st(1)
-+ fsub %st(1)
-+ faddp
-+ fucomp %st(1)
-+ fnstsw
-+ sahf
-+ je 2f # x - 0x1p63 + 0x1p63 == x
-+ movl $1,(%esp)
-+ flds (%esp) # 0x1p-149
-+ fdiv %st(1)
-+ fstps (%esp) # raise underflow
-+2: fld1
-+ fld %st(1)
-+ frndint
-+ fxch %st(2)
-+ fsub %st(2) # st(0)=x-rint(x), st(1)=1, st(2)=rint(x)
-+ f2xm1
-+ faddp # 2^(x-rint(x))
-+1: fscale
-+ fstp %st(1)
-+ add $16,%esp
-+ ret
-+3: xor %eax,%eax
-+4: cmp $0x3fff-64,%ax
-+ fld1
-+ jb 1b # |x| < 0x1p-64
-+ fstpt (%esp)
-+ fistl 8(%esp)
-+ fildl 8(%esp)
-+ fsubrp %st(1)
-+ addl $0x3fff,8(%esp)
-+ f2xm1
-+ fld1
-+ faddp # 2^(x-rint(x))
-+ fldt (%esp) # 2^rint(x)
-+ fmulp
-+ add $16,%esp
-+ ret
-diff -Nur musl-0.9.15/src/math/x32/expl.s musl-git/src/math/x32/expl.s
---- musl-0.9.15/src/math/x32/expl.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/math/x32/expl.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,101 @@
-+# exp(x) = 2^hi + 2^hi (2^lo - 1)
-+# where hi+lo = log2e*x with 128bit precision
-+# exact log2e*x calculation depends on nearest rounding mode
-+# using the exact multiplication method of Dekker and Veltkamp
-+
-+.global expl
-+.type expl,@function
-+expl:
-+ fldt 8(%esp)
-+
-+ # interesting case: 0x1p-32 <= |x| < 16384
-+ # check if (exponent|0x8000) is in [0xbfff-32, 0xbfff+13]
-+ mov 16(%esp), %ax
-+ or $0x8000, %ax
-+ sub $0xbfdf, %ax
-+ cmp $45, %ax
-+ jbe 2f
-+ test %ax, %ax
-+ fld1
-+ js 1f
-+ # if |x|>=0x1p14 or nan return 2^trunc(x)
-+ fscale
-+ fstp %st(1)
-+ ret
-+ # if |x|<0x1p-32 return 1+x
-+1: faddp
-+ ret
-+
-+ # should be 0x1.71547652b82fe178p0L == 0x3fff b8aa3b29 5c17f0bc
-+ # it will be wrong on non-nearest rounding mode
-+2: fldl2e
-+ sub $48, %esp
-+ # hi = log2e_hi*x
-+ # 2^hi = exp2l(hi)
-+ fmul %st(1),%st
-+ fld %st(0)
-+ fstpt (%esp)
-+ fstpt 16(%esp)
-+ fstpt 32(%esp)
-+ call exp2l
-+ # if 2^hi == inf return 2^hi
-+ fld %st(0)
-+ fstpt (%esp)
-+ cmpw $0x7fff, 8(%esp)
-+ je 1f
-+ fldt 32(%esp)
-+ fldt 16(%esp)
-+ # fpu stack: 2^hi x hi
-+ # exact mult: x*log2e
-+ fld %st(1)
-+ # c = 0x1p32+1
-+ movq $0x41f0000000100000,%rax
-+ pushq %rax
-+ fldl (%esp)
-+ # xh = x - c*x + c*x
-+ # xl = x - xh
-+ fmulp
-+ fld %st(2)
-+ fsub %st(1), %st
-+ faddp
-+ fld %st(2)
-+ fsub %st(1), %st
-+ # yh = log2e_hi - c*log2e_hi + c*log2e_hi
-+ movq $0x3ff7154765200000,%rax
-+ pushq %rax
-+ fldl (%esp)
-+ # fpu stack: 2^hi x hi xh xl yh
-+ # lo = hi - xh*yh + xl*yh
-+ fld %st(2)
-+ fmul %st(1), %st
-+ fsubp %st, %st(4)
-+ fmul %st(1), %st
-+ faddp %st, %st(3)
-+ # yl = log2e_hi - yh
-+ movq $0x3de705fc2f000000,%rax
-+ pushq %rax
-+ fldl (%esp)
-+ # fpu stack: 2^hi x lo xh xl yl
-+ # lo += xh*yl + xl*yl
-+ fmul %st, %st(2)
-+ fmulp %st, %st(1)
-+ fxch %st(2)
-+ faddp
-+ faddp
-+ # log2e_lo
-+ movq $0xbfbe,%rax
-+ pushq %rax
-+ movq $0x82f0025f2dc582ee,%rax
-+ pushq %rax
-+ fldt (%esp)
-+ add $40,%esp
-+ # fpu stack: 2^hi x lo log2e_lo
-+ # lo += log2e_lo*x
-+ # return 2^hi + 2^hi (2^lo - 1)
-+ fmulp %st, %st(2)
-+ faddp
-+ f2xm1
-+ fmul %st(1), %st
-+ faddp
-+1: add $48, %esp
-+ ret
-diff -Nur musl-0.9.15/src/math/x32/expm1l.s musl-git/src/math/x32/expm1l.s
---- musl-0.9.15/src/math/x32/expm1l.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/math/x32/expm1l.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1 @@
-+# see exp2l.s
-diff -Nur musl-0.9.15/src/math/x32/fabsf.s musl-git/src/math/x32/fabsf.s
---- musl-0.9.15/src/math/x32/fabsf.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/math/x32/fabsf.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,7 @@
-+.global fabsf
-+.type fabsf,@function
-+fabsf:
-+ mov $0x7fffffff,%eax
-+ movq %rax,%xmm1
-+ andps %xmm1,%xmm0
-+ ret
-diff -Nur musl-0.9.15/src/math/x32/fabsl.s musl-git/src/math/x32/fabsl.s
---- musl-0.9.15/src/math/x32/fabsl.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/math/x32/fabsl.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,6 @@
-+.global fabsl
-+.type fabsl,@function
-+fabsl:
-+ fldt 8(%esp)
-+ fabs
-+ ret
-diff -Nur musl-0.9.15/src/math/x32/fabs.s musl-git/src/math/x32/fabs.s
---- musl-0.9.15/src/math/x32/fabs.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/math/x32/fabs.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,9 @@
-+.global fabs
-+.type fabs,@function
-+fabs:
-+ xor %eax,%eax
-+ dec %rax
-+ shr %rax
-+ movq %rax,%xmm1
-+ andpd %xmm1,%xmm0
-+ ret
-diff -Nur musl-0.9.15/src/math/x32/floorl.s musl-git/src/math/x32/floorl.s
---- musl-0.9.15/src/math/x32/floorl.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/math/x32/floorl.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,27 @@
-+.global floorl
-+.type floorl,@function
-+floorl:
-+ fldt 8(%esp)
-+1: mov $0x7,%al
-+1: fstcw 8(%esp)
-+ mov 9(%esp),%ah
-+ mov %al,9(%esp)
-+ fldcw 8(%esp)
-+ frndint
-+ mov %ah,9(%esp)
-+ fldcw 8(%esp)
-+ ret
-+
-+.global ceill
-+.type ceill,@function
-+ceill:
-+ fldt 8(%esp)
-+ mov $0xb,%al
-+ jmp 1b
-+
-+.global truncl
-+.type truncl,@function
-+truncl:
-+ fldt 8(%esp)
-+ mov $0xf,%al
-+ jmp 1b
-diff -Nur musl-0.9.15/src/math/x32/fmodl.s musl-git/src/math/x32/fmodl.s
---- musl-0.9.15/src/math/x32/fmodl.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/math/x32/fmodl.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,11 @@
-+.global fmodl
-+.type fmodl,@function
-+fmodl:
-+ fldt 24(%esp)
-+ fldt 8(%esp)
-+1: fprem
-+ fstsw %ax
-+ sahf
-+ jp 1b
-+ fstp %st(1)
-+ ret
-diff -Nur musl-0.9.15/src/math/x32/llrintf.s musl-git/src/math/x32/llrintf.s
---- musl-0.9.15/src/math/x32/llrintf.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/math/x32/llrintf.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,5 @@
-+.global llrintf
-+.type llrintf,@function
-+llrintf:
-+ cvtss2si %xmm0,%rax
-+ ret
-diff -Nur musl-0.9.15/src/math/x32/llrintl.s musl-git/src/math/x32/llrintl.s
---- musl-0.9.15/src/math/x32/llrintl.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/math/x32/llrintl.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,7 @@
-+.global llrintl
-+.type llrintl,@function
-+llrintl:
-+ fldt 8(%esp)
-+ fistpll 8(%esp)
-+ mov 8(%esp),%rax
-+ ret
-diff -Nur musl-0.9.15/src/math/x32/llrint.s musl-git/src/math/x32/llrint.s
---- musl-0.9.15/src/math/x32/llrint.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/math/x32/llrint.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,5 @@
-+.global llrint
-+.type llrint,@function
-+llrint:
-+ cvtsd2si %xmm0,%rax
-+ ret
-diff -Nur musl-0.9.15/src/math/x32/log10l.s musl-git/src/math/x32/log10l.s
---- musl-0.9.15/src/math/x32/log10l.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/math/x32/log10l.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,7 @@
-+.global log10l
-+.type log10l,@function
-+log10l:
-+ fldlg2
-+ fldt 8(%esp)
-+ fyl2x
-+ ret
-diff -Nur musl-0.9.15/src/math/x32/log1pl.s musl-git/src/math/x32/log1pl.s
---- musl-0.9.15/src/math/x32/log1pl.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/math/x32/log1pl.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,15 @@
-+.global log1pl
-+.type log1pl,@function
-+log1pl:
-+ mov 14(%esp),%eax
-+ fldln2
-+ and $0x7fffffff,%eax
-+ fldt 8(%esp)
-+ cmp $0x3ffd9400,%eax
-+ ja 1f
-+ fyl2xp1
-+ ret
-+1: fld1
-+ faddp
-+ fyl2x
-+ ret
-diff -Nur musl-0.9.15/src/math/x32/log2l.s musl-git/src/math/x32/log2l.s
---- musl-0.9.15/src/math/x32/log2l.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/math/x32/log2l.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,7 @@
-+.global log2l
-+.type log2l,@function
-+log2l:
-+ fld1
-+ fldt 8(%esp)
-+ fyl2x
-+ ret
-diff -Nur musl-0.9.15/src/math/x32/logl.s musl-git/src/math/x32/logl.s
---- musl-0.9.15/src/math/x32/logl.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/math/x32/logl.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,7 @@
-+.global logl
-+.type logl,@function
-+logl:
-+ fldln2
-+ fldt 8(%esp)
-+ fyl2x
-+ ret
-diff -Nur musl-0.9.15/src/math/x32/lrintf.s musl-git/src/math/x32/lrintf.s
---- musl-0.9.15/src/math/x32/lrintf.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/math/x32/lrintf.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,5 @@
-+.global lrintf
-+.type lrintf,@function
-+lrintf:
-+ cvtss2si %xmm0,%rax
-+ ret
-diff -Nur musl-0.9.15/src/math/x32/lrintl.s musl-git/src/math/x32/lrintl.s
---- musl-0.9.15/src/math/x32/lrintl.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/math/x32/lrintl.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,7 @@
-+.global lrintl
-+.type lrintl,@function
-+lrintl:
-+ fldt 8(%esp)
-+ fistpll 8(%esp)
-+ mov 8(%esp),%rax
-+ ret
-diff -Nur musl-0.9.15/src/math/x32/lrint.s musl-git/src/math/x32/lrint.s
---- musl-0.9.15/src/math/x32/lrint.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/math/x32/lrint.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,5 @@
-+.global lrint
-+.type lrint,@function
-+lrint:
-+ cvtsd2si %xmm0,%rax
-+ ret
-diff -Nur musl-0.9.15/src/math/x32/remainderl.s musl-git/src/math/x32/remainderl.s
---- musl-0.9.15/src/math/x32/remainderl.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/math/x32/remainderl.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,11 @@
-+.global remainderl
-+.type remainderl,@function
-+remainderl:
-+ fldt 24(%esp)
-+ fldt 8(%esp)
-+1: fprem1
-+ fstsw %ax
-+ sahf
-+ jp 1b
-+ fstp %st(1)
-+ ret
-diff -Nur musl-0.9.15/src/math/x32/rintl.s musl-git/src/math/x32/rintl.s
---- musl-0.9.15/src/math/x32/rintl.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/math/x32/rintl.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,6 @@
-+.global rintl
-+.type rintl,@function
-+rintl:
-+ fldt 8(%esp)
-+ frndint
-+ ret
-diff -Nur musl-0.9.15/src/math/x32/sqrtf.s musl-git/src/math/x32/sqrtf.s
---- musl-0.9.15/src/math/x32/sqrtf.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/math/x32/sqrtf.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,4 @@
-+.global sqrtf
-+.type sqrtf,@function
-+sqrtf: sqrtss %xmm0, %xmm0
-+ ret
-diff -Nur musl-0.9.15/src/math/x32/sqrtl.s musl-git/src/math/x32/sqrtl.s
---- musl-0.9.15/src/math/x32/sqrtl.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/math/x32/sqrtl.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,5 @@
-+.global sqrtl
-+.type sqrtl,@function
-+sqrtl: fldt 8(%esp)
-+ fsqrt
-+ ret
-diff -Nur musl-0.9.15/src/math/x32/sqrt.s musl-git/src/math/x32/sqrt.s
---- musl-0.9.15/src/math/x32/sqrt.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/math/x32/sqrt.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,4 @@
-+.global sqrt
-+.type sqrt,@function
-+sqrt: sqrtsd %xmm0, %xmm0
-+ ret
-diff -Nur musl-0.9.15/src/math/x32/truncl.s musl-git/src/math/x32/truncl.s
---- musl-0.9.15/src/math/x32/truncl.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/math/x32/truncl.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1 @@
-+# see floorl.s
-diff -Nur musl-0.9.15/src/misc/nftw.c musl-git/src/misc/nftw.c
---- musl-0.9.15/src/misc/nftw.c 2014-01-03 21:12:18.000000000 +0100
-+++ musl-git/src/misc/nftw.c 2014-03-19 07:42:48.000000000 +0100
-@@ -46,8 +46,7 @@
- type = FTW_F;
- }
-
-- if ((flags & FTW_MOUNT) && h
-- && (st.st_dev != h->dev || st.st_ino != h->ino))
-+ if ((flags & FTW_MOUNT) && h && st.st_dev != h->dev)
- return 0;
-
- new.chain = h;
-diff -Nur musl-0.9.15/src/misc/pty.c musl-git/src/misc/pty.c
---- musl-0.9.15/src/misc/pty.c 2014-01-03 21:12:18.000000000 +0100
-+++ musl-git/src/misc/pty.c 2014-03-19 07:42:48.000000000 +0100
-@@ -26,7 +26,7 @@
- {
- int pty, err;
- if (!buf) len = 0;
-- if ((err = __syscall(SYS_ioctl, fd, TIOCGPTN, &pty))) return err;
-+ if ((err = __syscall(SYS_ioctl, fd, TIOCGPTN, &pty))) return -err;
- if (snprintf(buf, len, "/dev/pts/%d", pty) >= len) return ERANGE;
- return 0;
- }
-diff -Nur musl-0.9.15/src/misc/syscall.c musl-git/src/misc/syscall.c
---- musl-0.9.15/src/misc/syscall.c 2014-01-03 21:12:18.000000000 +0100
-+++ musl-git/src/misc/syscall.c 2014-03-19 07:42:48.000000000 +0100
-@@ -6,14 +6,14 @@
- long syscall(long n, ...)
- {
- va_list ap;
-- long a,b,c,d,e,f;
-+ syscall_arg_t a,b,c,d,e,f;
- va_start(ap, n);
-- a=va_arg(ap, long);
-- b=va_arg(ap, long);
-- c=va_arg(ap, long);
-- d=va_arg(ap, long);
-- e=va_arg(ap, long);
-- f=va_arg(ap, long);
-+ a=va_arg(ap, syscall_arg_t);
-+ b=va_arg(ap, syscall_arg_t);
-+ c=va_arg(ap, syscall_arg_t);
-+ d=va_arg(ap, syscall_arg_t);
-+ e=va_arg(ap, syscall_arg_t);
-+ f=va_arg(ap, syscall_arg_t);
- va_end(ap);
- return __syscall_ret(__syscall(n,a,b,c,d,e,f));
- }
-diff -Nur musl-0.9.15/src/network/accept4.c musl-git/src/network/accept4.c
---- musl-0.9.15/src/network/accept4.c 2014-01-03 21:12:18.000000000 +0100
-+++ musl-git/src/network/accept4.c 2014-03-19 07:42:48.000000000 +0100
-@@ -1,9 +1,20 @@
- #define _GNU_SOURCE
- #include <sys/socket.h>
-+#include <errno.h>
-+#include <fcntl.h>
- #include "syscall.h"
- #include "libc.h"
-
- int accept4(int fd, struct sockaddr *restrict addr, socklen_t *restrict len, int flg)
- {
-- return socketcall_cp(accept4, fd, addr, len, flg, 0, 0);
-+ if (!flg) return accept(fd, addr, len);
-+ int ret = socketcall_cp(accept4, fd, addr, len, flg, 0, 0);
-+ if (ret>=0 || (errno != ENOSYS && errno != EINVAL)) return ret;
-+ ret = accept(fd, addr, len);
-+ if (ret<0) return ret;
-+ if (flg & SOCK_CLOEXEC)
-+ __syscall(SYS_fcntl, ret, F_SETFD, FD_CLOEXEC);
-+ if (flg & SOCK_NONBLOCK)
-+ __syscall(SYS_fcntl, ret, F_SETFL, O_NONBLOCK);
-+ return ret;
- }
-diff -Nur musl-0.9.15/src/network/inet_legacy.c musl-git/src/network/inet_legacy.c
---- musl-0.9.15/src/network/inet_legacy.c 2014-01-03 21:12:18.000000000 +0100
-+++ musl-git/src/network/inet_legacy.c 2014-03-19 07:42:48.000000000 +0100
-@@ -16,9 +16,8 @@
- return 1;
- }
-
--struct in_addr inet_makeaddr(int net, int host)
-+struct in_addr inet_makeaddr(in_addr_t n, in_addr_t h)
- {
-- uint32_t n = net, h = host;
- if (n < 256) h |= n<<24;
- else if (n < 65536) h |= n<<16;
- else h |= n<<8;
-diff -Nur musl-0.9.15/src/network/proto.c musl-git/src/network/proto.c
---- musl-0.9.15/src/network/proto.c 2014-01-03 21:12:18.000000000 +0100
-+++ musl-git/src/network/proto.c 2014-03-19 07:42:48.000000000 +0100
-@@ -4,7 +4,7 @@
- /* do we really need all these?? */
-
- static int idx;
--static const unsigned char protos[][6] = {
-+static const unsigned char protos[][8] = {
- "\000ip",
- "\001icmp",
- "\002igmp",
-@@ -13,7 +13,9 @@
- "\014pup",
- "\021udp",
- "\026idp",
-- "\377raw"
-+ "\051ipv6",
-+ "\072icmpv6",
-+ "\377raw",
- "\0\0"
- };
-
-diff -Nur musl-0.9.15/src/prng/random.c musl-git/src/prng/random.c
---- musl-0.9.15/src/prng/random.c 2014-01-03 21:12:18.000000000 +0100
-+++ musl-git/src/prng/random.c 2014-03-19 07:42:48.000000000 +0100
-@@ -1,10 +1,3 @@
--/*
-- * random.c - Copyright © 2011 Szabolcs Nagy
-- * Permission to use, copy, modify, and/or distribute this code
-- * for any purpose with or without fee is hereby granted.
-- * There is no warranty.
--*/
--
- #include <stdlib.h>
- #include <stdint.h>
- #include "libc.h"
-@@ -12,11 +5,7 @@
- /*
- this code uses the same lagged fibonacci generator as the
- original bsd random implementation except for the seeding
--
--different seeds produce different sequences with long period
--(other libcs seed the state with a park-miller generator
--when seed=0 some fail to produce good random sequence
--others produce the same sequence as another seed)
-+which was broken in the original
- */
-
- static uint32_t init[] = {
-@@ -98,6 +87,7 @@
- n = 63;
- x = (uint32_t*)state + 1;
- __srandom(seed);
-+ savestate();
- UNLOCK(lock);
- return old;
- }
-diff -Nur musl-0.9.15/src/process/posix_spawn.c musl-git/src/process/posix_spawn.c
---- musl-0.9.15/src/process/posix_spawn.c 2014-01-03 21:12:18.000000000 +0100
-+++ musl-git/src/process/posix_spawn.c 2014-03-19 07:42:48.000000000 +0100
-@@ -166,7 +166,7 @@
-
- close(args.p[0]);
-
-- if (!ec) *res = pid;
-+ if (!ec && res) *res = pid;
-
- pthread_sigmask(SIG_SETMASK, &args.oldmask, 0);
- pthread_setcancelstate(cs, 0);
-diff -Nur musl-0.9.15/src/process/x32/vfork.s musl-git/src/process/x32/vfork.s
---- musl-0.9.15/src/process/x32/vfork.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/process/x32/vfork.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,12 @@
-+.global __vfork
-+.weak vfork
-+.type __vfork,@function
-+.type vfork,@function
-+__vfork:
-+vfork:
-+ pop %rdx
-+ mov $0x4000003a,%eax /* SYS_vfork */
-+ syscall
-+ push %rdx
-+ mov %rax,%rdi
-+ jmp __syscall_ret
-diff -Nur musl-0.9.15/src/setjmp/mipsel-sf/longjmp.sub musl-git/src/setjmp/mipsel-sf/longjmp.sub
---- musl-0.9.15/src/setjmp/mipsel-sf/longjmp.sub 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/setjmp/mipsel-sf/longjmp.sub 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1 @@
-+../mips-sf/longjmp.s
-diff -Nur musl-0.9.15/src/setjmp/mipsel-sf/setjmp.sub musl-git/src/setjmp/mipsel-sf/setjmp.sub
---- musl-0.9.15/src/setjmp/mipsel-sf/setjmp.sub 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/setjmp/mipsel-sf/setjmp.sub 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1 @@
-+../mips-sf/setjmp.s
-diff -Nur musl-0.9.15/src/setjmp/mips-sf/longjmp.s musl-git/src/setjmp/mips-sf/longjmp.s
---- musl-0.9.15/src/setjmp/mips-sf/longjmp.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/setjmp/mips-sf/longjmp.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,25 @@
-+.set noreorder
-+
-+.global _longjmp
-+.global longjmp
-+.type _longjmp,@function
-+.type longjmp,@function
-+_longjmp:
-+longjmp:
-+ move $2, $5
-+ bne $2, $0, 1f
-+ nop
-+ addu $2, $2, 1
-+1: lw $ra, 0($4)
-+ lw $sp, 4($4)
-+ lw $16, 8($4)
-+ lw $17, 12($4)
-+ lw $18, 16($4)
-+ lw $19, 20($4)
-+ lw $20, 24($4)
-+ lw $21, 28($4)
-+ lw $22, 32($4)
-+ lw $23, 36($4)
-+ lw $30, 40($4)
-+ jr $ra
-+ lw $28, 44($4)
-diff -Nur musl-0.9.15/src/setjmp/mips-sf/longjmp.sub musl-git/src/setjmp/mips-sf/longjmp.sub
---- musl-0.9.15/src/setjmp/mips-sf/longjmp.sub 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/setjmp/mips-sf/longjmp.sub 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1 @@
-+longjmp.s
-diff -Nur musl-0.9.15/src/setjmp/mips-sf/setjmp.s musl-git/src/setjmp/mips-sf/setjmp.s
---- musl-0.9.15/src/setjmp/mips-sf/setjmp.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/setjmp/mips-sf/setjmp.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,25 @@
-+.set noreorder
-+
-+.global __setjmp
-+.global _setjmp
-+.global setjmp
-+.type __setjmp,@function
-+.type _setjmp,@function
-+.type setjmp,@function
-+__setjmp:
-+_setjmp:
-+setjmp:
-+ sw $ra, 0($4)
-+ sw $sp, 4($4)
-+ sw $16, 8($4)
-+ sw $17, 12($4)
-+ sw $18, 16($4)
-+ sw $19, 20($4)
-+ sw $20, 24($4)
-+ sw $21, 28($4)
-+ sw $22, 32($4)
-+ sw $23, 36($4)
-+ sw $30, 40($4)
-+ sw $28, 44($4)
-+ jr $ra
-+ li $2, 0
-diff -Nur musl-0.9.15/src/setjmp/mips-sf/setjmp.sub musl-git/src/setjmp/mips-sf/setjmp.sub
---- musl-0.9.15/src/setjmp/mips-sf/setjmp.sub 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/setjmp/mips-sf/setjmp.sub 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1 @@
-+setjmp.s
-diff -Nur musl-0.9.15/src/setjmp/sh/longjmp.s musl-git/src/setjmp/sh/longjmp.s
---- musl-0.9.15/src/setjmp/sh/longjmp.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/setjmp/sh/longjmp.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,26 @@
-+.global _longjmp
-+.global longjmp
-+.type _longjmp, @function
-+.type longjmp, @function
-+_longjmp:
-+longjmp:
-+ mov.l @r4+, r8
-+ mov.l @r4+, r9
-+ mov.l @r4+, r10
-+ mov.l @r4+, r11
-+ mov.l @r4+, r12
-+ mov.l @r4+, r13
-+ mov.l @r4+, r14
-+ mov.l @r4+, r15
-+ lds.l @r4+, pr
-+ fmov.s @r4+, fr12
-+ fmov.s @r4+, fr13
-+ fmov.s @r4+, fr14
-+ fmov.s @r4+, fr15
-+
-+ tst r5, r5
-+ movt r0
-+ add r5, r0
-+
-+ rts
-+ nop
-diff -Nur musl-0.9.15/src/setjmp/sh/setjmp.s musl-git/src/setjmp/sh/setjmp.s
---- musl-0.9.15/src/setjmp/sh/setjmp.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/setjmp/sh/setjmp.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,25 @@
-+.global __setjmp
-+.global _setjmp
-+.global setjmp
-+.type __setjmp, @function
-+.type _setjmp, @function
-+.type setjmp, @function
-+__setjmp:
-+_setjmp:
-+setjmp:
-+ add #52, r4
-+ fmov.s fr15, @-r4
-+ fmov.s fr14, @-r4
-+ fmov.s fr13, @-r4
-+ fmov.s fr12, @-r4
-+ sts.l pr, @-r4
-+ mov.l r15 @-r4
-+ mov.l r14, @-r4
-+ mov.l r13, @-r4
-+ mov.l r12, @-r4
-+ mov.l r11, @-r4
-+ mov.l r10, @-r4
-+ mov.l r9, @-r4
-+ mov.l r8, @-r4
-+ rts
-+ mov #0, r0
-diff -Nur musl-0.9.15/src/setjmp/sheb-nofpu/longjmp.sub musl-git/src/setjmp/sheb-nofpu/longjmp.sub
---- musl-0.9.15/src/setjmp/sheb-nofpu/longjmp.sub 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/setjmp/sheb-nofpu/longjmp.sub 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1 @@
-+../sh-nofpu/longjmp.s
-diff -Nur musl-0.9.15/src/setjmp/sheb-nofpu/setjmp.sub musl-git/src/setjmp/sheb-nofpu/setjmp.sub
---- musl-0.9.15/src/setjmp/sheb-nofpu/setjmp.sub 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/setjmp/sheb-nofpu/setjmp.sub 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1 @@
-+../sh-nofpu/setjmp.s
-diff -Nur musl-0.9.15/src/setjmp/sh-nofpu/longjmp.s musl-git/src/setjmp/sh-nofpu/longjmp.s
---- musl-0.9.15/src/setjmp/sh-nofpu/longjmp.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/setjmp/sh-nofpu/longjmp.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,22 @@
-+.global _longjmp
-+.global longjmp
-+.type _longjmp, @function
-+.type longjmp, @function
-+_longjmp:
-+longjmp:
-+ mov.l @r4+, r8
-+ mov.l @r4+, r9
-+ mov.l @r4+, r10
-+ mov.l @r4+, r11
-+ mov.l @r4+, r12
-+ mov.l @r4+, r13
-+ mov.l @r4+, r14
-+ mov.l @r4+, r15
-+ lds.l @r4+, pr
-+
-+ tst r5, r5
-+ movt r0
-+ add r5, r0
-+
-+ rts
-+ nop
-diff -Nur musl-0.9.15/src/setjmp/sh-nofpu/longjmp.sub musl-git/src/setjmp/sh-nofpu/longjmp.sub
---- musl-0.9.15/src/setjmp/sh-nofpu/longjmp.sub 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/setjmp/sh-nofpu/longjmp.sub 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1 @@
-+longjmp.s
-diff -Nur musl-0.9.15/src/setjmp/sh-nofpu/setjmp.s musl-git/src/setjmp/sh-nofpu/setjmp.s
---- musl-0.9.15/src/setjmp/sh-nofpu/setjmp.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/setjmp/sh-nofpu/setjmp.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,21 @@
-+.global __setjmp
-+.global _setjmp
-+.global setjmp
-+.type __setjmp, @function
-+.type _setjmp, @function
-+.type setjmp, @function
-+__setjmp:
-+_setjmp:
-+setjmp:
-+ add #36, r4
-+ sts.l pr, @-r4
-+ mov.l r15 @-r4
-+ mov.l r14, @-r4
-+ mov.l r13, @-r4
-+ mov.l r12, @-r4
-+ mov.l r11, @-r4
-+ mov.l r10, @-r4
-+ mov.l r9, @-r4
-+ mov.l r8, @-r4
-+ rts
-+ mov #0, r0
-diff -Nur musl-0.9.15/src/setjmp/sh-nofpu/setjmp.sub musl-git/src/setjmp/sh-nofpu/setjmp.sub
---- musl-0.9.15/src/setjmp/sh-nofpu/setjmp.sub 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/setjmp/sh-nofpu/setjmp.sub 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1 @@
-+setjmp.s
-diff -Nur musl-0.9.15/src/setjmp/x32/longjmp.s musl-git/src/setjmp/x32/longjmp.s
---- musl-0.9.15/src/setjmp/x32/longjmp.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/setjmp/x32/longjmp.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,22 @@
-+/* Copyright 2011-2012 Nicholas J. Kain, licensed under standard MIT license */
-+.global _longjmp
-+.global longjmp
-+.type _longjmp,@function
-+.type longjmp,@function
-+_longjmp:
-+longjmp:
-+ mov %rsi,%rax /* val will be longjmp return */
-+ test %rax,%rax
-+ jnz 1f
-+ inc %rax /* if val==0, val=1 per longjmp semantics */
-+1:
-+ mov (%rdi),%rbx /* rdi is the jmp_buf, restore regs from it */
-+ mov 8(%rdi),%rbp
-+ mov 16(%rdi),%r12
-+ mov 24(%rdi),%r13
-+ mov 32(%rdi),%r14
-+ mov 40(%rdi),%r15
-+ mov 48(%rdi),%rdx /* this ends up being the stack pointer */
-+ mov %rdx,%rsp
-+ mov 56(%rdi),%rdx /* this is the instruction pointer */
-+ jmp *%rdx /* goto saved address without altering rsp */
-diff -Nur musl-0.9.15/src/setjmp/x32/setjmp.s musl-git/src/setjmp/x32/setjmp.s
---- musl-0.9.15/src/setjmp/x32/setjmp.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/setjmp/x32/setjmp.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,22 @@
-+/* Copyright 2011-2012 Nicholas J. Kain, licensed under standard MIT license */
-+.global __setjmp
-+.global _setjmp
-+.global setjmp
-+.type __setjmp,@function
-+.type _setjmp,@function
-+.type setjmp,@function
-+__setjmp:
-+_setjmp:
-+setjmp:
-+ mov %rbx,(%rdi) /* rdi is jmp_buf, move registers onto it */
-+ mov %rbp,8(%rdi)
-+ mov %r12,16(%rdi)
-+ mov %r13,24(%rdi)
-+ mov %r14,32(%rdi)
-+ mov %r15,40(%rdi)
-+ lea 8(%rsp),%rdx /* this is our rsp WITHOUT current ret addr */
-+ mov %rdx,48(%rdi)
-+ mov (%rsp),%rdx /* save return addr ptr for new rip */
-+ mov %rdx,56(%rdi)
-+ xor %rax,%rax /* always return 0 */
-+ ret
-diff -Nur musl-0.9.15/src/signal/mips/sigsetjmp.s musl-git/src/signal/mips/sigsetjmp.s
---- musl-0.9.15/src/signal/mips/sigsetjmp.s 2014-01-03 21:12:18.000000000 +0100
-+++ musl-git/src/signal/mips/sigsetjmp.s 2014-03-19 07:42:48.000000000 +0100
-@@ -11,7 +11,7 @@
- sw $4, 20($sp)
- sw $ra, 24($sp)
- sw $gp, 28($sp)
-- addu $6, $4, 124
-+ addu $6, $4, 108
- li $5, 0
- li $4, 1
- sw $4, -4($6)
-diff -Nur musl-0.9.15/src/signal/sh/restore.s musl-git/src/signal/sh/restore.s
---- musl-0.9.15/src/signal/sh/restore.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/signal/sh/restore.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,24 @@
-+.global __restore
-+.type __restore, @function
-+__restore:
-+ mov #119, r3 !__NR_sigreturn
-+ trapa #16
-+
-+ or r0, r0
-+ or r0, r0
-+ or r0, r0
-+ or r0, r0
-+ or r0, r0
-+
-+.global __restore_rt
-+.type __restore_rt, @function
-+__restore_rt:
-+ mov #100, r3 !__NR_rt_sigreturn
-+ add #73, r3
-+ trapa #16
-+
-+ or r0, r0
-+ or r0, r0
-+ or r0, r0
-+ or r0, r0
-+ or r0, r0
-diff -Nur musl-0.9.15/src/signal/sh/sigsetjmp.s musl-git/src/signal/sh/sigsetjmp.s
---- musl-0.9.15/src/signal/sh/sigsetjmp.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/signal/sh/sigsetjmp.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,27 @@
-+.global sigsetjmp
-+.type sigsetjmp, @function
-+sigsetjmp:
-+ mov.l r5, @(36,r4)
-+ tst r5, r5
-+ bf 2f
-+
-+ sts.l pr, @-r15
-+ mov.l r4, @-r15
-+ mov r4, r6
-+ add #40, r6
-+ mov #0, r5
-+ mov #2, r4
-+ mov.l L1, r0
-+ bsrf r0
-+ nop
-+1: mov.l @r15+, r4
-+ lds.l @r15+, pr
-+
-+2: mov.l L2, r0
-+ braf r0
-+ nop
-+3:
-+
-+.align 2
-+L1: .long pthread_sigmask@PLT-(1b-.)
-+L2: .long setjmp@PLT-(3b-.)
-diff -Nur musl-0.9.15/src/signal/sigandset.c musl-git/src/signal/sigandset.c
---- musl-0.9.15/src/signal/sigandset.c 2014-01-03 21:12:18.000000000 +0100
-+++ musl-git/src/signal/sigandset.c 2014-03-19 07:42:48.000000000 +0100
-@@ -3,7 +3,7 @@
-
- #define SST_SIZE (_NSIG/8/sizeof(long))
-
--int sigandset(sigset_t *dest, sigset_t *left, sigset_t *right)
-+int sigandset(sigset_t *dest, const sigset_t *left, const sigset_t *right)
- {
- unsigned long i = 0, *d = (void*) dest, *l = (void*) left, *r = (void*) right;
- for(; i < SST_SIZE; i++) d[i] = l[i] & r[i];
-diff -Nur musl-0.9.15/src/signal/sigorset.c musl-git/src/signal/sigorset.c
---- musl-0.9.15/src/signal/sigorset.c 2014-01-03 21:12:18.000000000 +0100
-+++ musl-git/src/signal/sigorset.c 2014-03-19 07:42:48.000000000 +0100
-@@ -3,7 +3,7 @@
-
- #define SST_SIZE (_NSIG/8/sizeof(long))
-
--int sigorset(sigset_t *dest, sigset_t *left, sigset_t *right)
-+int sigorset(sigset_t *dest, const sigset_t *left, const sigset_t *right)
- {
- unsigned long i = 0, *d = (void*) dest, *l = (void*) left, *r = (void*) right;
- for(; i < SST_SIZE; i++) d[i] = l[i] | r[i];
-diff -Nur musl-0.9.15/src/signal/x32/restore.s musl-git/src/signal/x32/restore.s
---- musl-0.9.15/src/signal/x32/restore.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/signal/x32/restore.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,8 @@
-+.global __restore_rt
-+.global __restore
-+.type __restore_rt,@function
-+.type __restore,@function
-+__restore_rt:
-+__restore:
-+ movl $0x40000201, %eax /* SYS_rt_sigreturn */
-+ syscall
-diff -Nur musl-0.9.15/src/signal/x32/sigsetjmp.s musl-git/src/signal/x32/sigsetjmp.s
---- musl-0.9.15/src/signal/x32/sigsetjmp.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/signal/x32/sigsetjmp.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,14 @@
-+/* Copyright 2011-2012 Nicholas J. Kain, licensed under standard MIT license */
-+.global sigsetjmp
-+.type sigsetjmp,@function
-+sigsetjmp:
-+ andl %esi,%esi
-+ movq %rsi,64(%rdi)
-+ jz 1f
-+ pushq %rdi
-+ leaq 72(%rdi),%rdx
-+ xorl %esi,%esi
-+ movl $2,%edi
-+ call sigprocmask
-+ popq %rdi
-+1: jmp setjmp
-diff -Nur musl-0.9.15/src/stdio/__fdopen.c musl-git/src/stdio/__fdopen.c
---- musl-0.9.15/src/stdio/__fdopen.c 2014-01-03 21:12:18.000000000 +0100
-+++ musl-git/src/stdio/__fdopen.c 2014-03-19 07:42:48.000000000 +0100
-@@ -32,7 +32,9 @@
- /* Set append mode on fd if opened for append */
- if (*mode == 'a') {
- int flags = __syscall(SYS_fcntl, fd, F_GETFL);
-- __syscall(SYS_fcntl, fd, F_SETFL, flags | O_APPEND);
-+ if (!(flags & O_APPEND))
-+ __syscall(SYS_fcntl, fd, F_SETFL, flags | O_APPEND);
-+ f->flags |= F_APP;
- }
-
- f->fd = fd;
-diff -Nur musl-0.9.15/src/stdio/ftell.c musl-git/src/stdio/ftell.c
---- musl-0.9.15/src/stdio/ftell.c 2014-01-03 21:12:18.000000000 +0100
-+++ musl-git/src/stdio/ftell.c 2014-03-19 07:42:48.000000000 +0100
-@@ -4,7 +4,9 @@
-
- off_t __ftello_unlocked(FILE *f)
- {
-- off_t pos = f->seek(f, 0, SEEK_CUR);
-+ off_t pos = f->seek(f, 0,
-+ (f->flags & F_APP) && f->wpos > f->wbase
-+ ? SEEK_END : SEEK_CUR);
- if (pos < 0) return pos;
-
- /* Adjust for data in buffer. */
-diff -Nur musl-0.9.15/src/stdio/vfprintf.c musl-git/src/stdio/vfprintf.c
---- musl-0.9.15/src/stdio/vfprintf.c 2014-01-03 21:12:18.000000000 +0100
-+++ musl-git/src/stdio/vfprintf.c 2014-03-19 07:42:48.000000000 +0100
-@@ -207,7 +207,8 @@
-
- static int fmt_fp(FILE *f, long double y, int w, int p, int fl, int t)
- {
-- uint32_t big[(LDBL_MAX_EXP+LDBL_MANT_DIG)/9+1];
-+ uint32_t big[(LDBL_MANT_DIG+28)/29 + 1 // mantissa expansion
-+ + (LDBL_MAX_EXP+LDBL_MANT_DIG+28+8)/9]; // exponent expansion
- uint32_t *a, *d, *r, *z;
- int e2=0, e, i, j, l;
- char buf[9+LDBL_MANT_DIG/4], *s;
-@@ -313,7 +314,7 @@
- }
- while (e2<0) {
- uint32_t carry=0, *b;
-- int sh=MIN(9,-e2);
-+ int sh=MIN(9,-e2), need=1+(p+LDBL_MANT_DIG/3+8)/9;
- for (d=a; d<z; d++) {
- uint32_t rm = *d & (1<<sh)-1;
- *d = (*d>>sh) + carry;
-@@ -323,7 +324,7 @@
- if (carry) *z++ = carry;
- /* Avoid (slow!) computation past requested precision */
- b = (t|32)=='f' ? r : a;
-- if (z-b > 2+p/9) z = b+2+p/9;
-+ if (z-b > need) z = b+need;
- e2+=sh;
- }
-
-diff -Nur musl-0.9.15/src/stdio/vfscanf.c musl-git/src/stdio/vfscanf.c
---- musl-0.9.15/src/stdio/vfscanf.c 2014-01-03 21:12:18.000000000 +0100
-+++ musl-git/src/stdio/vfscanf.c 2014-03-19 07:42:48.000000000 +0100
-@@ -328,3 +328,5 @@
- FUNLOCK(f);
- return matches;
- }
-+
-+weak_alias(vfscanf,__isoc99_vfscanf);
-diff -Nur musl-0.9.15/src/thread/arm/clone.s musl-git/src/thread/arm/clone.s
---- musl-0.9.15/src/thread/arm/clone.s 2014-01-03 21:12:18.000000000 +0100
-+++ musl-git/src/thread/arm/clone.s 2014-03-19 07:42:48.000000000 +0100
-@@ -1,10 +1,7 @@
- .text
- .global __clone
--.weak clone
- .type __clone,%function
--.type clone,%function
- __clone:
--clone:
- stmfd sp!,{r4,r5,r6,r7}
- mov r7,#120
- mov r6,r3
-diff -Nur musl-0.9.15/src/thread/cancel_dummy.c musl-git/src/thread/cancel_dummy.c
---- musl-0.9.15/src/thread/cancel_dummy.c 2014-01-03 21:12:18.000000000 +0100
-+++ musl-git/src/thread/cancel_dummy.c 2014-03-19 07:42:48.000000000 +0100
-@@ -1,6 +1,9 @@
- #include "pthread_impl.h"
-+#include "syscall.h"
-
--static long sccp(long nr, long u, long v, long w, long x, long y, long z)
-+static long sccp(syscall_arg_t nr,
-+ syscall_arg_t u, syscall_arg_t v, syscall_arg_t w,
-+ syscall_arg_t x, syscall_arg_t y, syscall_arg_t z)
- {
- return (__syscall)(nr, u, v, w, x, y, z);
- }
-diff -Nur musl-0.9.15/src/thread/cancel_impl.c musl-git/src/thread/cancel_impl.c
---- musl-0.9.15/src/thread/cancel_impl.c 2014-01-03 21:12:18.000000000 +0100
-+++ musl-git/src/thread/cancel_impl.c 2014-03-19 07:42:48.000000000 +0100
-@@ -1,4 +1,5 @@
- #include "pthread_impl.h"
-+#include "syscall.h"
-
- void __cancel()
- {
-@@ -8,9 +9,13 @@
- pthread_exit(PTHREAD_CANCELED);
- }
-
--long __syscall_cp_asm(volatile void *, long, long, long, long, long, long, long);
-+long __syscall_cp_asm(volatile void *, syscall_arg_t,
-+ syscall_arg_t, syscall_arg_t, syscall_arg_t,
-+ syscall_arg_t, syscall_arg_t, syscall_arg_t);
-
--long (__syscall_cp)(long nr, long u, long v, long w, long x, long y, long z)
-+long (__syscall_cp)(syscall_arg_t nr,
-+ syscall_arg_t u, syscall_arg_t v, syscall_arg_t w,
-+ syscall_arg_t x, syscall_arg_t y, syscall_arg_t z)
- {
- pthread_t self;
- long r;
-diff -Nur musl-0.9.15/src/thread/clone.c musl-git/src/thread/clone.c
---- musl-0.9.15/src/thread/clone.c 2014-01-03 21:12:18.000000000 +0100
-+++ musl-git/src/thread/clone.c 2014-03-19 07:42:48.000000000 +0100
-@@ -1,10 +1,7 @@
- #include <errno.h>
--#include "libc.h"
-+#include "pthread_impl.h"
-
- int __clone(int (*func)(void *), void *stack, int flags, void *arg, ...)
- {
-- errno = ENOSYS;
-- return -1;
-+ return -ENOSYS;
- }
--
--weak_alias(__clone, clone);
-diff -Nur musl-0.9.15/src/thread/i386/clone.s musl-git/src/thread/i386/clone.s
---- musl-0.9.15/src/thread/i386/clone.s 2014-01-03 21:12:18.000000000 +0100
-+++ musl-git/src/thread/i386/clone.s 2014-03-19 07:42:48.000000000 +0100
-@@ -1,10 +1,7 @@
- .text
- .global __clone
--.weak clone
- .type __clone,@function
--.type clone,@function
- __clone:
--clone:
- push %ebp
- mov %esp,%ebp
- push %ebx
-diff -Nur musl-0.9.15/src/thread/microblaze/clone.s musl-git/src/thread/microblaze/clone.s
---- musl-0.9.15/src/thread/microblaze/clone.s 2014-01-03 21:12:18.000000000 +0100
-+++ musl-git/src/thread/microblaze/clone.s 2014-03-19 07:42:48.000000000 +0100
-@@ -1,14 +1,11 @@
- .global __clone
--.weak clone
- .type __clone,@function
--.type clone,@function
-
- # r5, r6, r7, r8, r9, r10, stack
- # fn, st, fl, ar, pt, tl, ct
- # fl, st, __, pt, ct, tl
-
- __clone:
--clone:
- andi r6, r6, -16
- addi r6, r6, -16
- swi r5, r6, 0
-@@ -23,7 +20,7 @@
- beqi r3, 1f
- rtsd r15, 8
- nop
--
-+
- 1: lwi r3, r1, 0
- lwi r5, r1, 4
- brald r15, r3
-diff -Nur musl-0.9.15/src/thread/sh/clone.s musl-git/src/thread/sh/clone.s
---- musl-0.9.15/src/thread/sh/clone.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/thread/sh/clone.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,47 @@
-+.text
-+.global __clone
-+.type __clone, @function
-+__clone:
-+! incoming: fn stack flags arg ptid tls ctid
-+! r4 r5 r6 r7 @r15 @(4,r15) @(8,r15)
-+
-+ mov #-16, r0
-+ and r0, r5
-+
-+ mov r4, r1 ! r1 = fn
-+ mov r7, r2 ! r2 = arg
-+
-+ mov #120, r3 ! r3 = __NR_clone
-+ mov r6, r4 ! r4 = flags
-+ !mov r5, r5 ! r5 = stack
-+ mov.l @r15, r6 ! r6 = ptid
-+ mov.l @(8,r15), r7 ! r7 = ctid
-+ mov.l @(4,r15), r0 ! r0 = tls
-+ trapa #21
-+
-+ or r0, r0
-+ or r0, r0
-+ or r0, r0
-+ or r0, r0
-+ or r0, r0
-+
-+ cmp/eq #0, r0
-+ bt 1f
-+
-+ ! we are the parent, return
-+ rts
-+ nop
-+
-+1: ! we are the child, call fn(arg)
-+ jsr @r1
-+ mov r2, r4
-+
-+ mov #1, r3 ! __NR_exit
-+ mov r0, r4
-+ trapa #17
-+
-+ or r0, r0
-+ or r0, r0
-+ or r0, r0
-+ or r0, r0
-+ or r0, r0
-diff -Nur musl-0.9.15/src/thread/sh/__set_thread_area.s musl-git/src/thread/sh/__set_thread_area.s
---- musl-0.9.15/src/thread/sh/__set_thread_area.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/thread/sh/__set_thread_area.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,5 @@
-+.global __set_thread_area
-+.type __set_thread_area, @function
-+__set_thread_area:
-+ rts
-+ ldc r4, gbr
-diff -Nur musl-0.9.15/src/thread/sh/syscall_cp.s musl-git/src/thread/sh/syscall_cp.s
---- musl-0.9.15/src/thread/sh/syscall_cp.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/thread/sh/syscall_cp.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,39 @@
-+.text
-+.global __syscall_cp_asm
-+.type __syscall_cp_asm, @function
-+__syscall_cp_asm:
-+
-+.global __cp_begin
-+__cp_begin:
-+ mov.l @r4, r4
-+ tst r4, r4
-+ bt 2f
-+
-+ mov.l L1, r0
-+ braf r0
-+ nop
-+1:
-+
-+.align 2
-+L1: .long __cancel@PLT-(1b-.)
-+
-+2: mov r5, r3
-+ mov r6, r4
-+ mov r7, r5
-+ mov.l @r15, r6
-+ mov.l @(4,r15), r7
-+ mov.l @(8,r15), r0
-+ mov.l @(12,r15), r1
-+ trapa #22
-+
-+.global __cp_end
-+__cp_end:
-+ ! work around hardware bug
-+ or r0, r0
-+ or r0, r0
-+ or r0, r0
-+ or r0, r0
-+ or r0, r0
-+
-+ rts
-+ nop
-diff -Nur musl-0.9.15/src/thread/sh/__unmapself.s musl-git/src/thread/sh/__unmapself.s
---- musl-0.9.15/src/thread/sh/__unmapself.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/thread/sh/__unmapself.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,22 @@
-+.text
-+.global __unmapself
-+.type __unmapself, @function
-+__unmapself:
-+ mov #91, r3 ! SYS_munmap
-+ trapa #18
-+
-+ or r0, r0
-+ or r0, r0
-+ or r0, r0
-+ or r0, r0
-+ or r0, r0
-+
-+ mov #1, r3 ! SYS_exit
-+ mov #0, r4
-+ trapa #17
-+
-+ or r0, r0
-+ or r0, r0
-+ or r0, r0
-+ or r0, r0
-+ or r0, r0
-diff -Nur musl-0.9.15/src/thread/__wait.c musl-git/src/thread/__wait.c
---- musl-0.9.15/src/thread/__wait.c 2014-01-03 21:12:18.000000000 +0100
-+++ musl-git/src/thread/__wait.c 2014-03-19 07:42:48.000000000 +0100
-@@ -10,6 +10,6 @@
- }
- if (waiters) a_inc(waiters);
- while (*addr==val)
-- __syscall(SYS_futex, (long)addr, FUTEX_WAIT|priv, val, 0);
-+ __syscall(SYS_futex, addr, FUTEX_WAIT|priv, val, 0);
- if (waiters) a_dec(waiters);
- }
-diff -Nur musl-0.9.15/src/thread/x32/clone.s musl-git/src/thread/x32/clone.s
---- musl-0.9.15/src/thread/x32/clone.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/thread/x32/clone.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,25 @@
-+.text
-+.global __clone
-+.type __clone,@function
-+__clone:
-+ movl $0x40000038,%eax /* SYS_clone */
-+ mov %rdi,%r11
-+ mov %rdx,%rdi
-+ mov %r8,%rdx
-+ mov %r9,%r8
-+ mov 8(%rsp),%r10
-+ mov %r11,%r9
-+ and $-16,%rsi
-+ sub $8,%rsi
-+ mov %rcx,(%rsi)
-+ syscall
-+ test %eax,%eax
-+ jnz 1f
-+ xor %ebp,%ebp
-+ pop %rdi
-+ call *%r9
-+ mov %eax,%edi
-+ movl $0x4000003c,%eax /* SYS_exit */
-+ syscall
-+ hlt
-+1: ret
-diff -Nur musl-0.9.15/src/thread/x32/__set_thread_area.s musl-git/src/thread/x32/__set_thread_area.s
---- musl-0.9.15/src/thread/x32/__set_thread_area.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/thread/x32/__set_thread_area.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,10 @@
-+/* Copyright 2011-2012 Nicholas J. Kain, licensed under standard MIT license */
-+.text
-+.global __set_thread_area
-+.type __set_thread_area,@function
-+__set_thread_area:
-+ mov %rdi,%rsi /* shift for syscall */
-+ movl $0x1002,%edi /* SET_FS register */
-+ movl $0x4000009e,%eax /* set fs segment to */
-+ syscall /* arch_prctl(SET_FS, arg)*/
-+ ret
-diff -Nur musl-0.9.15/src/thread/x32/syscall_cp.s musl-git/src/thread/x32/syscall_cp.s
---- musl-0.9.15/src/thread/x32/syscall_cp.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/thread/x32/syscall_cp.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,23 @@
-+.text
-+.global __syscall_cp_internal
-+.type __syscall_cp_internal,@function
-+__syscall_cp_internal:
-+
-+.global __cp_begin
-+__cp_begin:
-+ mov (%rdi),%eax
-+ test %eax,%eax
-+ jnz __cancel
-+ mov %rdi,%r11
-+ mov %rsi,%rax
-+ mov %rdx,%rdi
-+ mov %rcx,%rsi
-+ mov %r8,%rdx
-+ mov %r9,%r10
-+ mov 8(%rsp),%r8
-+ mov 16(%rsp),%r9
-+ mov %r11,8(%rsp)
-+ syscall
-+.global __cp_end
-+__cp_end:
-+ ret
-diff -Nur musl-0.9.15/src/thread/x32/__unmapself.s musl-git/src/thread/x32/__unmapself.s
---- musl-0.9.15/src/thread/x32/__unmapself.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/thread/x32/__unmapself.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,10 @@
-+/* Copyright 2011-2012 Nicholas J. Kain, licensed under standard MIT license */
-+.text
-+.global __unmapself
-+.type __unmapself,@function
-+__unmapself:
-+ movl $0x4000000b,%eax /* SYS_munmap */
-+ syscall /* munmap(arg2,arg3) */
-+ xor %rdi,%rdi /* exit() args: always return success */
-+ movl $0x4000003c,%eax /* SYS_exit */
-+ syscall /* exit(0) */
-diff -Nur musl-0.9.15/src/thread/x86_64/clone.s musl-git/src/thread/x86_64/clone.s
---- musl-0.9.15/src/thread/x86_64/clone.s 2014-01-03 21:12:18.000000000 +0100
-+++ musl-git/src/thread/x86_64/clone.s 2014-03-19 07:42:48.000000000 +0100
-@@ -1,10 +1,7 @@
- .text
- .global __clone
--.weak clone
- .type __clone,@function
--.type clone,@function
- __clone:
--clone:
- xor %eax,%eax
- mov $56,%al
- mov %rdi,%r11
-diff -Nur musl-0.9.15/src/time/timer_delete.c musl-git/src/time/timer_delete.c
---- musl-0.9.15/src/time/timer_delete.c 2014-01-03 21:12:18.000000000 +0100
-+++ musl-git/src/time/timer_delete.c 2014-03-19 07:42:48.000000000 +0100
-@@ -10,5 +10,5 @@
- __wake(&td->timer_id, 1, 1);
- return 0;
- }
-- return __syscall(SYS_timer_delete, (long)t);
-+ return __syscall(SYS_timer_delete, t);
- }
-diff -Nur musl-0.9.15/src/time/timer_getoverrun.c musl-git/src/time/timer_getoverrun.c
---- musl-0.9.15/src/time/timer_getoverrun.c 2014-01-03 21:12:18.000000000 +0100
-+++ musl-git/src/time/timer_getoverrun.c 2014-03-19 07:42:48.000000000 +0100
-@@ -8,5 +8,5 @@
- pthread_t td = (void *)((uintptr_t)t << 1);
- t = (void *)(uintptr_t)(td->timer_id & INT_MAX);
- }
-- return syscall(SYS_timer_getoverrun, (long)t);
-+ return syscall(SYS_timer_getoverrun, t);
- }
-diff -Nur musl-0.9.15/src/time/timer_gettime.c musl-git/src/time/timer_gettime.c
---- musl-0.9.15/src/time/timer_gettime.c 2014-01-03 21:12:18.000000000 +0100
-+++ musl-git/src/time/timer_gettime.c 2014-03-19 07:42:48.000000000 +0100
-@@ -8,5 +8,5 @@
- pthread_t td = (void *)((uintptr_t)t << 1);
- t = (void *)(uintptr_t)(td->timer_id & INT_MAX);
- }
-- return syscall(SYS_timer_gettime, (long)t, val);
-+ return syscall(SYS_timer_gettime, t, val);
- }
-diff -Nur musl-0.9.15/src/time/timer_settime.c musl-git/src/time/timer_settime.c
---- musl-0.9.15/src/time/timer_settime.c 2014-01-03 21:12:18.000000000 +0100
-+++ musl-git/src/time/timer_settime.c 2014-03-19 07:42:48.000000000 +0100
-@@ -8,5 +8,5 @@
- pthread_t td = (void *)((uintptr_t)t << 1);
- t = (void *)(uintptr_t)(td->timer_id & INT_MAX);
- }
-- return syscall(SYS_timer_settime, (long)t, flags, val, old);
-+ return syscall(SYS_timer_settime, t, flags, val, old);
- }
-diff -Nur musl-0.9.15/src/unistd/sh/pipe.s musl-git/src/unistd/sh/pipe.s
---- musl-0.9.15/src/unistd/sh/pipe.s 1970-01-01 01:00:00.000000000 +0100
-+++ musl-git/src/unistd/sh/pipe.s 2014-03-19 07:42:48.000000000 +0100
-@@ -0,0 +1,27 @@
-+.global pipe
-+.type pipe, @function
-+pipe:
-+ mov #42, r3
-+ trapa #17
-+
-+ ! work around hardware bug
-+ or r0, r0
-+ or r0, r0
-+ or r0, r0
-+ or r0, r0
-+ or r0, r0
-+
-+ cmp/pz r0
-+ bt 1f
-+
-+ mov.l L1, r1
-+ braf r1
-+ mov r0, r4
-+
-+1: mov.l r0, @(0,r4)
-+ mov.l r1, @(4,r4)
-+ rts
-+ mov #0, r0
-+
-+.align 2
-+L1: .long __syscall_ret@PLT-(1b-.)
-diff -Nur musl-0.9.15/tools/install.sh musl-git/tools/install.sh
---- musl-0.9.15/tools/install.sh 2014-01-03 21:12:18.000000000 +0100
-+++ musl-git/tools/install.sh 2014-03-19 07:42:48.000000000 +0100
-@@ -51,6 +51,7 @@
- ln -s "$1" "$tmp"
- else
- cat < "$1" > "$tmp"
-+chmod "$mode" "$tmp"
- fi
-
- mv -f "$tmp" "$2"
-@@ -60,6 +61,4 @@
- exit 1
- }
-
--test "$symlink" || chmod "$mode" "$2"
--
- exit 0
diff --git a/toolchain/musl/tarch.lst b/toolchain/musl/tarch.lst
new file mode 100644
index 000000000..272259d6b
--- /dev/null
+++ b/toolchain/musl/tarch.lst
@@ -0,0 +1,12 @@
+arm
+armhf
+microblaze
+microblazeel
+mips
+mipsel
+ppc
+sh4
+sh4eb
+x86
+x86_64
+x86_64_x32
diff --git a/toolchain/uClibc/Makefile b/toolchain/uclibc/Makefile
index c691a8b2b..94a81391d 100644
--- a/toolchain/uClibc/Makefile
+++ b/toolchain/uclibc/Makefile
@@ -105,7 +105,10 @@ $(WRKBUILD)/.installed: $(WRKBUILD)/.install_headers
$(WRKBUILD)/.fixup:
# DOSTRIP kills x86 target (ld.so can not map libc.so.0), always use DODEBUG
+ # DODEBUG compile failure linking with libgcc_eh.a on arm hf
+ifneq ($(ADK_LINUX_ARM),y)
$(SED) 's,DOSTRIP,DODEBUG,' ${WRKBUILD}/.config
+endif
$(MAKE) -C $(WRKBUILD) \
PREFIX=$(STAGING_TARGET_DIR) \
DEVEL_PREFIX=/usr/ \
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/toolchain/uClibc/patches/uclibc-git-20140313.patch b/toolchain/uclibc/patches/uclibc-git-20140313.patch
index 561c08007..561c08007 100644
--- a/toolchain/uClibc/patches/uclibc-git-20140313.patch
+++ b/toolchain/uclibc/patches/uclibc-git-20140313.patch
diff --git a/toolchain/uClibc/patches/xxx-origin.patch b/toolchain/uclibc/patches/xxx-origin.patch
index 42b524017..42b524017 100644
--- a/toolchain/uClibc/patches/xxx-origin.patch
+++ b/toolchain/uclibc/patches/xxx-origin.patch
diff --git a/toolchain/uClibc/patches/xxx-sparc-wait4.patch b/toolchain/uclibc/patches/xxx-sparc-wait4.patch
index e219ed773..e219ed773 100644
--- a/toolchain/uClibc/patches/xxx-sparc-wait4.patch
+++ b/toolchain/uclibc/patches/xxx-sparc-wait4.patch
diff --git a/toolchain/uclibc/tarch.lst b/toolchain/uclibc/tarch.lst
new file mode 100644
index 000000000..b25549e23
--- /dev/null
+++ b/toolchain/uclibc/tarch.lst
@@ -0,0 +1,16 @@
+arm
+armhf
+mips
+mipsel
+mips64
+mips64n32
+mips64n64
+mips64el
+mips64eln32
+mips64eln64
+ppc
+sh4
+sh4eb
+sparc
+x86
+x86_64
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/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 423008ff8..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}' \
- 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/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