1
1

Initial dump from Zyxel

This commit is contained in:
2026-04-17 17:00:52 +02:00
commit 81fec250f4
23116 changed files with 5231237 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=jsonfilter
PKG_VERSION:=2014-06-19
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=http://git.openwrt.org/project/jsonpath.git
#PKG_SOURCE_URL:=@ZyXEL_SITE/WIFI_Router
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=cdc760c58077f44fc40adbbe41e1556a67c1b9a9
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
CMAKE_INSTALL:=1
PKG_MAINTAINER:=Jo-Philipp Wich <jow@openwrt.org>
PKG_LICENSE:=ISC
PATCH_DIR:=patches-tr069
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/jsonfilter
SECTION:=base
CATEGORY:=Base system
DEPENDS:=+libubox +libjson-c
TITLE:=OpenWrt JSON filter utility
URL:=http://git.openwrt.org/?p=project/jsonpath.git
endef
define Package/jsonfilter/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/jsonpath $(1)/usr/bin/jsonfilter
endef
ifeq ("$(strip ${ZCFG_PLATFORM})","QUALCOMM")
$(eval $(call BuildPackage,jsonfilter))
endif
@@ -0,0 +1,21 @@
diff -ruN a/main.c b/main.c
--- a/main.c 2016-09-05 10:46:37.000000000 +0800
+++ b/main.c 2016-09-30 20:51:18.678706563 +0800
@@ -190,6 +190,8 @@
case json_type_null:
break;
+ default:
+ break;
}
}
@@ -218,6 +220,8 @@
case json_type_null:
break;
+ default:
+ break;
}
}
}
@@ -0,0 +1,12 @@
diff -urN jsonfilter-2014-06-19.org/main.c jsonfilter-2014-06-19/main.c
--- jsonfilter-2014-06-19.org/main.c 2018-07-16 17:10:56.163129300 +0800
+++ jsonfilter-2014-06-19/main.c 2018-07-16 17:23:37.338500176 +0800
@@ -175,7 +175,7 @@
case json_type_int:
print_separator(sep, &sc, sl);
- printf("%d", json_object_get_int(item->jsobj));
+ printf("%llu", json_object_get_int(item->jsobj));
break;
case json_type_double:
+55
View File
@@ -0,0 +1,55 @@
#
# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=picocom
PKG_VERSION:=1.6
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
#PKG_SOURCE_URL:=http://picocom.googlecode.com/files
PKG_SOURCE_URL:=@ZyXEL_SITE/opensource/utils
#PKG_MD5SUM:=426c3d30b82cbc80b0dafdccd6020c6c
include $(INCLUDE_DIR)/package.mk
define Package/picocom
SECTION:=utils
CATEGORY:=Utilities
TITLE:=A minimal dumb-terminal emulation program
URL:=http://code.google.com/p/picocom/
SUBMENU:=Terminal
endef
define Package/picocom/description
As its name suggests, picocom is a minimal dumb-terminal emulation
program. It is, in principle, very much like minicom, only it's pico
instead of mini! It was designed to serve as a simple, manual, modem
configuration, testing, and debugging tool. It has also served (quite
well) as a low-tech "terminal-window" to allow operator intervention
in PPP connection scripts. It could also prove useful in many other
similar tasks.
endef
define Build/Configure
endef
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
picocom
endef
define Package/picocom/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/picocom $(1)/usr/bin/
endef
$(eval $(call BuildPackage,picocom))
+53
View File
@@ -0,0 +1,53 @@
# Copyright (C) 2006-2012 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=strace
PKG_VERSION:=4.7
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_MD5SUM:=6054c3880a00c6703f83b57f15e04642
DL_DIR:=$(TOPDIR)/dl
PKG_SOURCE_URL:=@ZyXEL_SITE/opensource/utils
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
define Package/strace
SECTION:=utils
CATEGORY:=Utilities
TITLE:=System call tracer
URL:=http://strace.sourceforge.net/
endef
define Package/strace/description
A useful diagnostic, instructional, and debugging tool. Allows you to track what
system calls a program makes while it is running.
endef
# needed when compiling against Linux 2.4
CONFIGURE_VARS += \
ac_cv_header_linux_netlink_h=yes
ifneq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
TARGET_CFLAGS += -I$(LINUX_DIR)/user_headers/include
endif
MAKE_FLAGS := \
CCOPT="$(TARGET_CFLAGS)"
define Package/strace/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/strace $(1)/usr/bin/
endef
$(eval $(call BuildPackage,strace))
+59
View File
@@ -0,0 +1,59 @@
#
# Copyright (C) 2009-2014 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=ubi-utils
PKG_REV:=7d2839b8dede3ae368780364b4a07473d2303219
PKG_VERSION:=1.5.1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@ZyXEL_SITE/opensource/utils
PKG_MIRROR_MD5SUM:=69b68adcfcbe786584771e5978534ab4
PKG_INSTALL:=1
#PKG_BUILD_DEPENDS:=util-linux liblzo zlib
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=
PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
include $(INCLUDE_DIR)/package.mk
define Package/ubi-utils
TITLE:=Utilities for ubi info/debug
SECTION:=utils
CATEGORY:=Utilities
URL:=http://www.linux-mtd.infradead.org/
DEPENDS:=@NAND_SUPPORT +util-linux +liblzo +zlib
endef
define Package/ubi-utils/description
Utilities for manipulating memory technology devices.
endef
MAKE_FLAGS += \
DESTDIR="$(PKG_INSTALL_DIR)" \
BUILDDIR="$(PKG_BUILD_DIR)" \
LDLIBS+="$(LIBGCC_S)" \
WITHOUT_XATTR=1 \
WITHOUT_LZO=1
define Package/ubi-utils/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) \
$(PKG_INSTALL_DIR)/usr/sbin/{ubiattach,ubicrc32,ubiblock,ubidetach,ubiformat,ubimkvol} $(1)/usr/sbin/
$(INSTALL_BIN) \
$(PKG_INSTALL_DIR)/usr/sbin/{ubinfo,ubinize,ubirename,ubirmvol,ubirsvol,ubiupdatevol} $(1)/usr/sbin/
endef
ifeq ("$(strip ${ZCFG_PLATFORM})","QUALCOMM")
$(eval $(call BuildPackage,ubi-utils))
endif
+19
View File
@@ -0,0 +1,19 @@
--- a/include/common.h
+++ b/include/common.h
@@ -137,10 +137,12 @@ static inline bool prompt(const char *ms
}
if (strcmp("\n", line) != 0) {
- switch (rpmatch(line)) {
- case 0: ret = false; break;
- case 1: ret = true; break;
- case -1:
+ switch (line[0]) {
+ case 'N':
+ case 'n': ret = false; break;
+ case 'Y':
+ case 'y': ret = true; break;
+ default:
puts("unknown response; please try again");
continue;
}
+30
View File
@@ -0,0 +1,30 @@
--- a/lib/libfec.c
+++ b/lib/libfec.c
@@ -45,6 +45,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <sys/types.h>
/*
* stuff used for testing purposes only
--- a/serve_image.c
+++ b/serve_image.c
@@ -3,7 +3,6 @@
#include <time.h>
#include <errno.h>
-#include <error.h>
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
--- a/recv_image.c
+++ b/recv_image.c
@@ -4,7 +4,6 @@
#define _BSD_SOURCE /* struct ip_mreq */
#include <errno.h>
-#include <error.h>
#include <stdio.h>
#include <netdb.h>
#include <stdlib.h>
+41
View File
@@ -0,0 +1,41 @@
--- a/mkfs.ubifs/hashtable/hashtable_itr.c
+++ b/mkfs.ubifs/hashtable/hashtable_itr.c
@@ -35,18 +35,6 @@ hashtable_iterator(struct hashtable *h)
}
/*****************************************************************************/
-/* key - return the key of the (key,value) pair at the current position */
-/* value - return the value of the (key,value) pair at the current position */
-
-void *
-hashtable_iterator_key(struct hashtable_itr *i)
-{ return i->e->k; }
-
-void *
-hashtable_iterator_value(struct hashtable_itr *i)
-{ return i->e->v; }
-
-/*****************************************************************************/
/* advance - advance the iterator to the next element
* returns zero if advanced to end of table */
--- a/mkfs.ubifs/hashtable/hashtable_itr.h
+++ b/mkfs.ubifs/hashtable/hashtable_itr.h
@@ -28,7 +28,7 @@ hashtable_iterator(struct hashtable *h);
/* hashtable_iterator_key
* - return the value of the (key,value) pair at the current position */
-extern inline void *
+static inline void *
hashtable_iterator_key(struct hashtable_itr *i)
{
return i->e->k;
@@ -37,7 +37,7 @@ hashtable_iterator_key(struct hashtable_
/*****************************************************************************/
/* value - return the value of the (key,value) pair at the current position */
-extern inline void *
+static inline void *
hashtable_iterator_value(struct hashtable_itr *i)
{
return i->e->v;
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,185 @@
--- a/include/mtd/ubi-user.h
+++ b/include/mtd/ubi-user.h
@@ -176,6 +176,7 @@
#define UBI_IOCATT _IOW(UBI_CTRL_IOC_MAGIC, 64, struct ubi_attach_req)
/* Detach an MTD device */
#define UBI_IOCDET _IOW(UBI_CTRL_IOC_MAGIC, 65, int32_t)
+#define UBI_IOCFDET _IOW(UBI_CTRL_IOC_MAGIC, 99, int32_t)
/* ioctl commands of UBI volume character devices */
--- a/ubi-utils/include/libubi.h
+++ b/ubi-utils/include/libubi.h
@@ -48,6 +48,7 @@ typedef void * libubi_t;
* number)
* @mtd_num: MTD device number to attach (used if @mtd_dev_node is %NULL)
* @mtd_dev_node: path to MTD device node to attach
+ * @force: set if the device should be removed even if it's busy
* @vid_hdr_offset: VID header offset (%0 means default offset and this is what
* most of the users want)
* @max_beb_per1024: Maximum expected bad eraseblocks per 1024 eraseblocks
@@ -240,29 +241,33 @@ int ubi_attach(libubi_t desc, const char
* corresponding UBI device is removed. Returns zero in case of success and %-1
* in case of failure.
*/
-int ubi_detach_mtd(libubi_t desc, const char *node, int mtd_num);
+int ubi_detach_mtd(libubi_t desc, const char *node, int mtd_num, int force);
/**
* ubi_detach - detach an MTD device by its node path.
* @desc: UBI library descriptor
* @node: name of the UBI control character device node
* @mtd_dev_node: path to an MTD device node
+ * @force: set if the device should be removed even if it's busy
*
* This function detaches an MTD device @mtd_dev_node from UBI. Returns zero in
* case of success and %-1 in case of failure.
*/
-int ubi_detach(libubi_t desc, const char *node, const char *mtd_dev_node);
+int ubi_detach(libubi_t desc, const char *node, const char *mtd_dev_node,
+ int force);
/**
* ubi_remove_dev - remove an UBI device.
* @desc: UBI library descriptor
* @node: name of the UBI control character device node
* @ubi_dev: UBI device number to remove
+ * @force: set if the device should be removed even if it's busy
*
* This function removes UBI device number @ubi_dev and returns zero in case of
* success and %-1 in case of failure.
*/
-int ubi_remove_dev(libubi_t desc, const char *node, int ubi_dev);
+int ubi_remove_dev(libubi_t desc, const char *node, int ubi_dev,
+ int force);
/**
* ubi_mkvol - create an UBI volume.
--- a/ubi-utils/libubi.c
+++ b/ubi-utils/libubi.c
@@ -808,7 +808,7 @@ int ubi_attach(libubi_t desc, const char
return ret;
}
-int ubi_detach_mtd(libubi_t desc, const char *node, int mtd_num)
+int ubi_detach_mtd(libubi_t desc, const char *node, int mtd_num, int force)
{
int ret, ubi_dev;
@@ -818,10 +818,11 @@ int ubi_detach_mtd(libubi_t desc, const
return ret;
}
- return ubi_remove_dev(desc, node, ubi_dev);
+ return ubi_remove_dev(desc, node, ubi_dev, force);
}
-int ubi_detach(libubi_t desc, const char *node, const char *mtd_dev_node)
+int ubi_detach(libubi_t desc, const char *node, const char *mtd_dev_node,
+ int force)
{
int mtd_num;
@@ -834,10 +835,10 @@ int ubi_detach(libubi_t desc, const char
if (mtd_num == -1)
return -1;
- return ubi_detach_mtd(desc, node, mtd_num);
+ return ubi_detach_mtd(desc, node, mtd_num, force);
}
-int ubi_remove_dev(libubi_t desc, const char *node, int ubi_dev)
+int ubi_remove_dev(libubi_t desc, const char *node, int ubi_dev, int force)
{
int fd, ret;
@@ -847,6 +848,10 @@ int ubi_remove_dev(libubi_t desc, const
if (fd == -1)
return sys_errmsg("cannot open \"%s\"", node);
ret = ioctl(fd, UBI_IOCDET, &ubi_dev);
+ if (force)
+ ret = ioctl(fd, UBI_IOCFDET, &ubi_dev);
+ else
+ ret = ioctl(fd, UBI_IOCDET, &ubi_dev);
if (ret == -1)
goto out_close;
--- a/ubi-utils/ubidetach.c
+++ b/ubi-utils/ubidetach.c
@@ -40,6 +40,7 @@ struct args {
int mtdn;
const char *node;
const char *dev;
+ int force;
};
static struct args args = {
@@ -47,6 +48,7 @@ static struct args args = {
.mtdn = -1,
.node = NULL,
.dev = NULL,
+ .force = 0,
};
static const char doc[] = PROGRAM_NAME " version " VERSION
@@ -56,13 +58,14 @@ static const char optionsstr[] =
"-d, --devn=<UBI device number> UBI device number to delete\n"
"-p, --dev-path=<path to device> or alternatively, MTD device node path to detach\n"
"-m, --mtdn=<MTD device number> or alternatively, MTD device number to detach\n"
+"-f, --force Force UBI detach even if it is still busy\n"
"-h, --help print help message\n"
"-V, --version print program version";
static const char usage[] =
"Usage: " PROGRAM_NAME " [<UBI control device node file name>]\n"
"\t[-d <UBI device number>] [-m <MTD device number>] [-p <path to device>]\n"
-"\t[--devn=<UBI device number>] [--mtdn=<MTD device number>]\n"
+"\t[--devn=<UBI device number>] [--mtdn=<MTD device number>] [-f]\n"
"\t[--dev-path=<path to device>]\n"
"UBI control device defaults to " DEFAULT_CTRL_DEV " if not supplied.\n"
"Example 1: " PROGRAM_NAME " -p /dev/mtd0 - detach MTD device /dev/mtd0\n"
@@ -83,7 +86,7 @@ static int parse_opt(int argc, char * co
while (1) {
int key, error = 0;
- key = getopt_long(argc, argv, "p:m:d:hV", long_options, NULL);
+ key = getopt_long(argc, argv, "p:m:d:fhV", long_options, NULL);
if (key == -1)
break;
@@ -104,6 +107,9 @@ static int parse_opt(int argc, char * co
return errmsg("bad MTD device number: \"%s\"", optarg);
break;
+ case 'f':
+ args.force = 1;
+ break;
case 'h':
printf("%s\n\n", doc);
@@ -176,20 +182,22 @@ int main(int argc, char * const argv[])
}
if (args.devn != -1) {
- err = ubi_remove_dev(libubi, args.node, args.devn);
+ err = ubi_remove_dev(libubi, args.node, args.devn, args.force);
if (err) {
sys_errmsg("cannot remove ubi%d", args.devn);
goto out_libubi;
}
} else {
if (args.dev != NULL) {
- err = ubi_detach(libubi, args.node, args.dev);
+ err = ubi_detach(libubi, args.node, args.dev,
+ args.force);
if (err) {
sys_errmsg("cannot detach \"%s\"", args.dev);
goto out_libubi;
}
} else {
- err = ubi_detach_mtd(libubi, args.node, args.mtdn);
+ err = ubi_detach_mtd(libubi, args.node, args.mtdn,
+ args.force);
if (err) {
sys_errmsg("cannot detach mtd%d", args.mtdn);
goto out_libubi;
+260
View File
@@ -0,0 +1,260 @@
#
# Copyright (C) 2007-2018 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# Author: Michael Geddes
include $(TOPDIR)/rules.mk
PKG_NAME:=zoneinfo
PKG_VERSION:=2018d
PKG_VERSION_CODE:=2018d
PKG_RELEASE:=1
#As i couldn't find real license used "Public Domain"
#as referense to http://www.iana.org/time-zones/repository/tz-link.html
PKG_LICENSE:=Public Domain
PKG_SOURCE:=tzdata$(PKG_VERSION).tar.gz
PKG_SOURCE_CODE:=tzcode$(PKG_VERSION_CODE).tar.gz
PKG_SOURCE_URL:=@ZyXEL_SITE/opensource/utils
PATCH_DIR:=patches-$(PKG_VERSION)
#PKG_SOURCE_URL:=http://www.iana.org/time-zones/repository/releases
#PKG_HASH:=5106eddceb5f1ae3a91dbd3960e1b8b11ba0dc08579a31cf0724a7691b10c054
include $(INCLUDE_DIR)/package.mk
define Download/tzcode
FILE=$(PKG_SOURCE_CODE)
URL=$(PKG_SOURCE_URL)
HASH:=7de44e85baad748d217e3fd60706f599f9aec68bce6356b163f52b0dbd40a8d9
endef
$(eval $(call Download,tzcode))
define Package/zoneinfo/Default
SUBMENU:=Zoneinfo
TITLE:=Zone Information
SECTION:=utils
CATEGORY:=Utilities
MAINTAINER:=Vladimir Ulrich <admin@evl.su>
endef
define Package/zoneinfo-core
$(call Package/zoneinfo/Default)
TITLE:=Zone Information (core)
endef
define Package/zoneinfo-simple
$(call Package/zoneinfo/Default)
TITLE:=Zone Information (simple)
endef
define Package/zoneinfo-africa
$(call Package/zoneinfo/Default)
TITLE:=Zone Information (Africa)
endef
define Package/zoneinfo-northamerica
$(call Package/zoneinfo/Default)
TITLE:=Zone Information (NorthAmerica)
endef
define Package/zoneinfo-southamerica
$(call Package/zoneinfo/Default)
TITLE:=Zone Information (SouthAmerica)
endef
define Package/zoneinfo-poles
$(call Package/zoneinfo/Default)
TITLE:=Zone Information (Arctic, Antarctic)
endef
define Package/zoneinfo-asia
$(call Package/zoneinfo/Default)
TITLE:=Zone Information (Asia)
endef
define Package/zoneinfo-atlantic
$(call Package/zoneinfo/Default)
TITLE:=Zone Information (Atlantic)
endef
define Package/zoneinfo-australia-nz
$(call Package/zoneinfo/Default)
TITLE:=Zone Information (Australia-NZ)
endef
define Package/zoneinfo-pacific
$(call Package/zoneinfo/Default)
TITLE:=Zone Information (Pacific)
endef
define Package/zoneinfo-europe
$(call Package/zoneinfo/Default)
TITLE:=Zone Information (Europe)
endef
define Package/zoneinfo-india
$(call Package/zoneinfo/Default)
TITLE:=Zone Information (India)
endef
define Package/zoneinfo-command
$(call Package/zoneinfo/Default)
TITLE:=Zone Information (command)
endef
define Build/Prepare
(cd $(PKG_BUILD_DIR) && tar -xzf $(DL_DIR)/$(PKG_SOURCE_CODE) && tar -xzf $(DL_DIR)/$(PKG_SOURCE))
$(call Build/Prepare/Default,)
endef
define Build/Compile
CFLAGS="$(HOST_CFLAGS)" \
$(MAKE) -C $(PKG_BUILD_DIR) -f Makefile \
$(HOST_CONFIGURE_OPTS) \
CC="$(HOSTCC)" \
CC2="$(TARGET_CROSS)gcc" \
LD="\$$$$(CC)" \
CPPFLAGS="$(HOST_CPPFLAGS) -DHAVE_SNPRINTF=1" \
LDFLAGS="$(HOST_LDFLAGS)" \
TOPDIR="$(PKG_INSTALL_DIR)" \
TZDIR="$(PKG_INSTALL_DIR)/zoneinfo" \
install
endef
define Package/zoneinfo-core/install
$(INSTALL_DIR) $(1)/usr/share/zoneinfo
for i in \
CET CST6CDT EET EST EST5EDT GB-Eire Eire \
GB GMT GMT+0 GMT-0 GMT0 Greenwich \
HST MET MST MST7MDT \
PRC PST8PDT ROC ROK UCT UTC \
Universal W-SU WET Zulu Etc/* zone.tab ; do \
$(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
$(1)/usr/share/zoneinfo ; \
done
endef
define Package/zoneinfo-simple/install
$(INSTALL_DIR) $(1)/usr/share/zoneinfo
for i in Pacific/Honolulu \
America/Anchorage America/Los_Angeles America/Denver \
America/Chicago America/New_York America/Caracas \
America/Sao_Paulo Europe/London Europe/Paris \
Africa/Cairo Europe/Moscow Asia/Dubai \
Asia/Karachi Asia/Dhaka Asia/Bankok \
Asia/Hong_Kong Asia/Tokyo Australia/Darwin \
Australia/Adelaide Australia/Brisbane Australia/Sydney \
Australia/Perth Pacific/Noumea ; do \
$(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
$(1)/usr/share/zoneinfo ; \
done
endef
define Package/zoneinfo-africa/install
$(INSTALL_DIR) $(1)/usr/share/zoneinfo/Africa
$(CP) $(PKG_INSTALL_DIR)/zoneinfo/Africa/* \
$(1)/usr/share/zoneinfo/Africa
endef
define Package/zoneinfo-northamerica/install
$(INSTALL_DIR) $(1)/usr/share/zoneinfo
for i in US America Canada Mexico Cuba Jamaica Navajo ; do \
$(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
$(1)/usr/share/zoneinfo ; \
done
rm -rf $(1)/usr/share/zoneinfo/America/Argentina
endef
define Package/zoneinfo-southamerica/install
$(INSTALL_DIR) $(1)/usr/share/zoneinfo
for i in Brazil Chile ; do \
$(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
$(1)/usr/share/zoneinfo ; \
done
$(INSTALL_DIR) $(1)/usr/share/zoneinfo/America/Argentina
$(CP) $(PKG_INSTALL_DIR)/zoneinfo/America/Argentina/* \
$(1)/usr/share/zoneinfo/America/Argentina
endef
define Package/zoneinfo-poles/install
$(INSTALL_DIR) $(1)/usr/share/zoneinfo
for i in Antarctica Arctic ; do \
$(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
$(1)/usr/share/zoneinfo ; \
done
endef
define Package/zoneinfo-asia/install
$(INSTALL_DIR) $(1)/usr/share/zoneinfo
for i in Asia Japan Singapore Hongkong ; do \
$(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
$(1)/usr/share/zoneinfo ; \
done
endef
define Package/zoneinfo-atlantic/install
$(INSTALL_DIR) $(1)/usr/share/zoneinfo
for i in Atlantic Iceland ; do \
$(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
$(1)/usr/share/zoneinfo ; \
done
endef
define Package/zoneinfo-australia-nz/install
$(INSTALL_DIR) $(1)/usr/share/zoneinfo
for i in NZ NZ-CHAT Australia ; do \
$(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
$(1)/usr/share/zoneinfo ; \
done
endef
define Package/zoneinfo-pacific/install
$(INSTALL_DIR) $(1)/usr/share/zoneinfo
for i in Pacific Kwajalein ; do \
$(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
$(1)/usr/share/zoneinfo ; \
done
endef
define Package/zoneinfo-europe/install
$(INSTALL_DIR) $(1)/usr/share/zoneinfo
for i in Europe Portugal Poland ; do \
$(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
$(1)/usr/share/zoneinfo ; \
done
endef
define Package/zoneinfo-india/install
$(INSTALL_DIR) $(1)/usr/share/zoneinfo
for i in Indian ; do \
$(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
$(1)/usr/share/zoneinfo ; \
done
endef
define Package/zoneinfo-command/install
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_INSTALL_DIR)/usr/bin/zdump_arm $(1)/usr/bin
$(INSTALL_DIR) $(1)/usr/sbin
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/zic_arm $(1)/usr/sbin
$(INSTALL_DIR) $(1)/usr/share/zoneinfo
$(CP) ./zonerule.txt $(1)/usr/share/zoneinfo
endef
$(eval $(call BuildPackage,zoneinfo-simple))
$(eval $(call BuildPackage,zoneinfo-core))
$(eval $(call BuildPackage,zoneinfo-africa))
$(eval $(call BuildPackage,zoneinfo-northamerica))
$(eval $(call BuildPackage,zoneinfo-southamerica))
$(eval $(call BuildPackage,zoneinfo-poles))
$(eval $(call BuildPackage,zoneinfo-asia))
$(eval $(call BuildPackage,zoneinfo-atlantic))
$(eval $(call BuildPackage,zoneinfo-australia-nz))
$(eval $(call BuildPackage,zoneinfo-pacific))
$(eval $(call BuildPackage,zoneinfo-europe))
$(eval $(call BuildPackage,zoneinfo-india))
$(eval $(call BuildPackage,zoneinfo-command))
@@ -0,0 +1,49 @@
Index: zoneinfo-2018d/Makefile
===================================================================
--- zoneinfo-2018d.orig/Makefile 2018-03-21 07:10:33.000000000 +0800
+++ zoneinfo-2018d/Makefile 2018-12-28 09:23:46.372667412 +0800
@@ -537,7 +537,9 @@
cp -f $(TABDATA) '$(DESTDIR)$(TZDIR)/.'
cp tzselect '$(DESTDIR)$(BINDIR)/.'
cp zdump '$(DESTDIR)$(ZDUMPDIR)/.'
+ cp zdump_arm '$(DESTDIR)$(ZDUMPDIR)/.'
cp zic '$(DESTDIR)$(ZICDIR)/.'
+ cp zic_arm '$(DESTDIR)$(ZICDIR)/.'
cp libtz.a '$(DESTDIR)$(LIBDIR)/.'
$(RANLIB) '$(DESTDIR)$(LIBDIR)/libtz.a'
cp -f newctime.3 newtzset.3 '$(DESTDIR)$(MANDIR)/man3/.'
@@ -578,9 +580,16 @@
zdump: $(TZDOBJS)
$(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(TZDOBJS) $(LDLIBS)
+ $(CC2) $(CPPFLAGS) -c -o zdump_arm.o zdump.c
+ $(CC2) $(CPPFLAGS) -c -o localtime1.o localtime.c
+ $(CC2) $(CPPFLAGS) -c -o asctime1.o asctime.c
+ $(CC2) $(CPPFLAGS) -c -o strftime1.o strftime.c
+ $(CC2) -o zdump_arm $(CFLAGS) $(LDFLAGS) zdump_arm.o localtime1.o asctime1.o strftime1.o $(LDLIBS)
zic: $(TZCOBJS)
$(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(TZCOBJS) $(LDLIBS)
+ $(CC2) $(CPPFLAGS) -c -o zic_arm.o zic.c
+ $(CC2) -o zic_arm $(CFLAGS) $(LDFLAGS) zic_arm.o $(LDLIBS)
yearistype: yearistype.sh
cp yearistype.sh yearistype
@@ -958,12 +967,17 @@
@$(AWK) '/^Z/ { print $$2 } /^L/ { print $$3 }' tzdata.zi
asctime.o: private.h tzfile.h
+asctime1.o: private.h tzfile.h
date.o: private.h
difftime.o: private.h
localtime.o: private.h tzfile.h
+localtime1.o: private.h tzfile.h
strftime.o: private.h tzfile.h
+strftime1.o: private.h tzfile.h
zdump.o: version.h
+zdump_arm.o: version.h
zic.o: private.h tzfile.h version.h
+zic_arm.o: private.h tzfile.h version.h
.KEEP_STATE:
@@ -0,0 +1,26 @@
Index: zoneinfo-2018d/etcetera
===================================================================
--- zoneinfo-2018d.orig/etcetera 2016-08-24 07:52:15.000000000 +0800
+++ zoneinfo-2018d/etcetera 2019-08-16 15:14:20.085728731 +0800
@@ -55,18 +55,21 @@
Zone Etc/GMT-12 12 - +12
Zone Etc/GMT-11 11 - +11
Zone Etc/GMT-10 10 - +10
+Zone Etc/GMT-930 9:30 - +09:30
Zone Etc/GMT-9 9 - +09
Zone Etc/GMT-8 8 - +08
Zone Etc/GMT-7 7 - +07
Zone Etc/GMT-6 6 - +06
Zone Etc/GMT-5 5 - +05
Zone Etc/GMT-4 4 - +04
+Zone Etc/GMT-330 3:30 - +03:30
Zone Etc/GMT-3 3 - +03
Zone Etc/GMT-2 2 - +02
Zone Etc/GMT-1 1 - +01
Zone Etc/GMT+1 -1 - -01
Zone Etc/GMT+2 -2 - -02
Zone Etc/GMT+3 -3 - -03
+Zone Etc/GMT+330 -03:30 - -03:30
Zone Etc/GMT+4 -4 - -04
Zone Etc/GMT+5 -5 - -05
Zone Etc/GMT+6 -6 - -06
+89
View File
@@ -0,0 +1,89 @@
Zone GMT+12 -12 rule_user -12
Zone Pacific/Midway -11:00 rule_user SST
Zone US/Hawaii -10:00 rule_user HST
Zone US/Alaska -9:00 rule_user AK%sT
Zone America/Tijuana -8:00 rule_user P%sT
Zone America/Mazatlan -7:00 rule_user M%sT
Zone Canada/Mountain -7:00 rule_user M%sT
Zone America/Guatemala -6:00 rule_user C%sT
Zone Canada/Central -6:00 rule_user C%sT
Zone Canada/Saskatchewan -6:00 rule_user CST
Zone America/Bogota -5:00 rule_user -05/-04
Zone US/Eastern -5:00 rule_user E%sT
Zone America/Indiana -5:00 rule_user E%sT
Zone Atlantic -4:00 rule_user -04
Zone America/Caracas -4:00 rule_user -04
Zone America/Santiago -4:00 rule_user -04/-03
Zone America/Guyana -4:00 rule_user -04
Zone Canada/Newfoundland -3:30 rule_user N%sT
Zone Brazil/East -3:00 rule_user -03/-02
Zone America/Argentina/Buenos_Aires -3:00 rule_user -03/-02
Zone America/Godthab -3:00 rule_user -03/-02
Zone GMT+2 -2 rule_user -02
Zone Atlantic/Azores -1:00 rule_user -01/+00
Zone Atlantic/Cape_Verde -1:00 rule_user -01
Zone Africa/Casablanca 0:00 rule_user WE%sT
Zone Africa/Monrovia 0:00 rule_user GMT
Zone Europe/London 0:00 rule_user GMT/BST
Zone Europe/Dublin 0:00 rule_user GMT/IST
Zone Europe/Lisbon 0:00 rule_user WE%sT
Zone Europe/Berlin 1:00 rule_user CE%sT
Zone Europe/Prague 1:00 rule_user CE%sT
Zone Europe/Paris 1:00 rule_user CE%sT
Zone Europe/Warsaw 1:00 rule_user CE%sT
Zone GMT-1 1 rule_user +01
Zone Europe/Athens 2:00 rule_user EE%sT
Zone Europe/Bucharest 2:00 rule_user EE%sT
Zone Africa/Cairo 2:00 rule_user EE%sT
Zone Africa/Harare 2:00 rule_user CAT
Zone Europe/Helsinki 2:00 rule_user EE%sT
Zone Asia/Jerusalem 2:00 rule_user I%sT
Zone Asia/Baghdad 3:00 rule_user +03/+04
Zone Asia/Kuwait 3:00 rule_user +03
Zone Europe/Moscow 3:00 rule_user MSK
Zone Africa/Nairobi 3:00 rule_user EAT
Zone Asia/Tehran 3:30 rule_user +0330/+0430
Zone Asia/Muscat 4:00 rule_user +04
Zone Asia/Baku 4:00 rule_user +04/+05
Zone Asia/Yerevan 4:00 rule_user +04/+05
Zone Asia/Tbilisi 4:00 rule_user +04
Zone Asia/Kabul 4:30 rule_user +0430
Zone Asia/Yekaterinburg 5:00 rule_user +05
Zone Asia/Karachi 5:00 rule_user PK%sT
Zone Asia/Tashkent 5:00 rule_user +05
Zone Asia/Kolkata 5:30 rule_user IST
Zone Asia/Kathmandu 5:45 rule_user +0545
Zone Asia/Almaty 6:00 rule_user +06
Zone Asia/Novosibirsk 7:00 rule_user +07
Zone Asia/Dhaka 6:00 rule_user +06/+07
Zone Asia/Colombo 5:30 rule_user +0530
Zone Asia/Rangoon 6:30 rule_user +0630
Zone Asia/Bangkok 7:00 rule_user +07
Zone Asia/Jakarta 7:00 rule_user WIB
Zone Asia/Krasnoyarsk 7:00 rule_user +07
Zone Asia/Hong_Kong 8:00 rule_user HK%sT
Zone Asia/Shanghai 8:00 rule_user C%sT
Zone Asia/Irkutsk 8:00 rule_user +08
Zone Asia/Ulaanbaatar 8:00 rule_user +08/+09
Zone Asia/Kuala_Lumpur 8:00 rule_user +08
Zone Asia/Singapore 8:00 rule_user +08
Zone Australia/Perth 8:00 rule_user AW%sT
Zone Asia/Taipei 8:00 rule_user C%sT
Zone Asia/Tokyo 9:00 rule_user J%sT
Zone Asia/Seoul 9:00 rule_user K%sT
Zone Asia/Yakutsk 9:00 rule_user +09
Zone Australia/Adelaide 9:30 rule_user AC%sT
Zone Australia/Darwin 9:30 rule_user AC%sT
Zone Australia/Brisbane 10:00 rule_user AE%sT
Zone Australia/Canberra 10:00 rule_user AE%sT
Zone Pacific/Guam 10:00 rule_user ChST
Zone Pacific/Port_Moresby 10:00 rule_user +10
Zone Australia/Hobart 10:00 rule_user AE%sT
Zone Asia/Vladivostok 10:00 rule_user +10
Zone Asia/Magadan 11:00 rule_user +11
Zone Pacific/Guadalcanal 11:00 rule_user +11
Zone Pacific/Noumea 11:00 rule_user +11/+12
Zone Pacific/Auckland 12:00 rule_user NZ%sT
Zone Asia/Kamchatka 12:00 rule_user +12
Zone Pacific/Majuro 12:00 rule_user +12
Zone Pacific/Fiji 12:00 rule_user +12/+13