fix
This commit is contained in:
parent
3df4294ce8
commit
453d0e8694
10
Config.in
10
Config.in
@ -5,7 +5,7 @@
|
||||
mainmenu "OpenWrt Configuration"
|
||||
|
||||
config MODULES
|
||||
option modules
|
||||
modules
|
||||
bool
|
||||
default y
|
||||
|
||||
@ -13,6 +13,14 @@ config HAVE_DOT_CONFIG
|
||||
bool
|
||||
default y
|
||||
|
||||
HOST_OS := $(shell, uname)
|
||||
|
||||
config HOST_OS_LINUX
|
||||
def_bool $(shell, ./config/check-uname.sh Linux)
|
||||
|
||||
config HOST_OS_MACOS
|
||||
def_bool $(shell, ./config/check-uname.sh Darwin)
|
||||
|
||||
source "target/Config.in"
|
||||
|
||||
source "config/Config-images.in"
|
||||
|
21
Makefile
21
Makefile
@ -14,7 +14,7 @@ $(if $(findstring $(space),$(TOPDIR)),$(error ERROR: The path to the OpenWrt dir
|
||||
|
||||
world:
|
||||
|
||||
DISTRO_PKG_CONFIG:=$(shell which -a pkg-config | grep -E '\/usr' | head -n 1)
|
||||
DISTRO_PKG_CONFIG:=$(shell $(TOPDIR)/scripts/command_all.sh pkg-config | grep '/usr' -m 1)
|
||||
export PATH:=$(TOPDIR)/staging_dir/host/bin:$(PATH)
|
||||
|
||||
ifneq ($(OPENWRT_BUILD),1)
|
||||
@ -38,7 +38,7 @@ else
|
||||
include tools/Makefile
|
||||
include toolchain/Makefile
|
||||
|
||||
$(toolchain/stamp-compile): $(tools/stamp-compile)
|
||||
$(toolchain/stamp-compile): $(tools/stamp-compile) $(if $(CONFIG_BUILDBOT),toolchain_rebuild_check)
|
||||
$(target/stamp-compile): $(toolchain/stamp-compile) $(tools/stamp-compile) $(BUILD_DIR)/.prepared
|
||||
$(package/stamp-compile): $(target/stamp-compile) $(package/stamp-cleanup)
|
||||
$(package/stamp-install): $(package/stamp-compile)
|
||||
@ -50,14 +50,23 @@ printdb:
|
||||
|
||||
prepare: $(target/stamp-compile)
|
||||
|
||||
clean: FORCE
|
||||
rm -rf $(BUILD_DIR) $(STAGING_DIR) $(BIN_DIR) $(OUTPUT_DIR)/packages/$(ARCH_PACKAGES) $(BUILD_LOG_DIR) $(TOPDIR)/staging_dir/packages
|
||||
_clean: FORCE
|
||||
rm -rf $(BUILD_DIR) $(STAGING_DIR) $(BIN_DIR) $(OUTPUT_DIR)/packages/$(ARCH_PACKAGES) $(TOPDIR)/staging_dir/packages
|
||||
|
||||
dirclean: clean
|
||||
rm -rf $(STAGING_DIR_HOST) $(STAGING_DIR_HOSTPKG) $(TOOLCHAIN_DIR) $(BUILD_DIR_BASE)/host $(BUILD_DIR_BASE)/hostpkg $(BUILD_DIR_TOOLCHAIN)
|
||||
clean: _clean
|
||||
rm -rf $(BUILD_LOG_DIR)
|
||||
|
||||
targetclean: _clean
|
||||
rm -rf $(TOOLCHAIN_DIR) $(BUILD_DIR_BASE)/hostpkg $(BUILD_DIR_TOOLCHAIN)
|
||||
|
||||
dirclean: targetclean clean
|
||||
rm -rf $(STAGING_DIR_HOST) $(STAGING_DIR_HOSTPKG) $(BUILD_DIR_BASE)/host
|
||||
rm -rf $(TMP_DIR)
|
||||
$(MAKE) -C $(TOPDIR)/scripts/config clean
|
||||
|
||||
toolchain_rebuild_check:
|
||||
$(SCRIPT_DIR)/check-toolchain-clean.sh
|
||||
|
||||
cacheclean:
|
||||
ifneq ($(CONFIG_CCACHE),)
|
||||
$(STAGING_DIR_HOST)/bin/ccache -C
|
||||
|
@ -21,7 +21,7 @@ menu "Global build settings"
|
||||
|
||||
config JSON_OVERVIEW_IMAGE_INFO
|
||||
bool "Create JSON info file overview per target"
|
||||
default BUILDBOT
|
||||
default y
|
||||
help
|
||||
Create a JSON info file called profiles.json in the target
|
||||
directory containing machine readable list of built profiles
|
||||
@ -78,7 +78,7 @@ menu "Global build settings"
|
||||
default n
|
||||
|
||||
config BUILD_PATENTED
|
||||
default y
|
||||
default n
|
||||
bool "Compile with support for patented functionality"
|
||||
help
|
||||
When this option is disabled, software which provides patented functionality
|
||||
@ -111,7 +111,7 @@ menu "Global build settings"
|
||||
default n
|
||||
help
|
||||
This makes file checksums part of package metadata. It increases size
|
||||
but provides you with pkg_check command to check for flash coruptions.
|
||||
but provides you with pkg_check command to check for flash corruptions.
|
||||
|
||||
config INCLUDE_CONFIG
|
||||
bool "Include build configuration in firmware" if DEVEL
|
||||
@ -154,17 +154,12 @@ menu "Global build settings"
|
||||
Adds -g3 to the CFLAGS.
|
||||
|
||||
config IPV6
|
||||
bool
|
||||
prompt "Enable IPv6 support in packages"
|
||||
default y
|
||||
help
|
||||
Enables IPv6 support in kernel (builtin) and packages.
|
||||
def_bool y
|
||||
|
||||
comment "Stripping options"
|
||||
|
||||
choice
|
||||
prompt "Binary stripping method"
|
||||
default USE_STRIP if EXTERNAL_TOOLCHAIN
|
||||
default USE_STRIP if USE_GLIBC
|
||||
default USE_SSTRIP
|
||||
help
|
||||
@ -221,20 +216,6 @@ menu "Global build settings"
|
||||
make the system libraries incompatible with most of the packages that are
|
||||
not selected during the build process.
|
||||
|
||||
choice
|
||||
prompt "Preferred standard C++ library"
|
||||
default USE_LIBSTDCXX if USE_GLIBC
|
||||
default USE_UCLIBCXX
|
||||
help
|
||||
Select the preferred standard C++ library for all packages that support this.
|
||||
|
||||
config USE_UCLIBCXX
|
||||
bool "uClibc++"
|
||||
|
||||
config USE_LIBSTDCXX
|
||||
bool "libstdc++"
|
||||
endchoice
|
||||
|
||||
comment "Hardening build options"
|
||||
|
||||
config PKG_CHECK_FORMAT_SECURITY
|
||||
@ -390,4 +371,16 @@ menu "Global build settings"
|
||||
|
||||
endchoice
|
||||
|
||||
config SECCOMP
|
||||
bool "Enable SECCOMP"
|
||||
select KERNEL_SECCOMP
|
||||
select PACKAGE_procd-seccomp
|
||||
depends on (aarch64 || arm || armeb || mips || mipsel || mips64 || mips64el || i386 || powerpc || x86_64)
|
||||
depends on !TARGET_uml
|
||||
default y
|
||||
help
|
||||
This option enables seccomp kernel features to safely
|
||||
execute untrusted bytecode and selects the seccomp-variants
|
||||
of procd
|
||||
|
||||
endmenu
|
||||
|
@ -59,6 +59,13 @@ menuconfig DEVEL
|
||||
This allows you to symlink build_dir into a scratch location, e.g. a ramdisk,
|
||||
which does not have enough space to keep a complete build_dir.
|
||||
|
||||
config BUILD_ALL_HOST_TOOLS
|
||||
bool "Compile all host tools" if DEVEL
|
||||
default n
|
||||
help
|
||||
Compile all host host tools even if not needed. This is needed to prepare a
|
||||
universal precompiled host tools archive to use in another buildroot.
|
||||
|
||||
config BUILD_SUFFIX
|
||||
string "Build suffix to append to the target BUILD_DIR variable" if DEVEL
|
||||
default ""
|
||||
@ -88,6 +95,11 @@ menuconfig DEVEL
|
||||
Store ccache in this directory.
|
||||
If not set, uses './.ccache'
|
||||
|
||||
config KERNEL_CFLAGS
|
||||
string "Kernel extra CFLAGS" if DEVEL
|
||||
default "-falign-functions=32" if TARGET_bcm53xx
|
||||
default ""
|
||||
|
||||
config EXTERNAL_KERNEL_TREE
|
||||
string "Use external kernel tree" if DEVEL
|
||||
default ""
|
||||
|
@ -48,7 +48,7 @@ menu "Target Images"
|
||||
bool "xz"
|
||||
|
||||
config TARGET_INITRAMFS_COMPRESSION_ZSTD
|
||||
depends on !LINUX_5_4 && !LINUX_4_19
|
||||
depends on !LINUX_5_4
|
||||
bool "zstd"
|
||||
endchoice
|
||||
|
||||
@ -152,7 +152,7 @@ menu "Target Images"
|
||||
bool "squashfs"
|
||||
default y if USES_SQUASHFS
|
||||
help
|
||||
Build a squashfs-lzma root filesystem.
|
||||
Build a squashfs root filesystem.
|
||||
|
||||
config TARGET_SQUASHFS_BLOCK_SIZE
|
||||
int "Block size (in KiB)"
|
||||
@ -160,6 +160,9 @@ menu "Target Images"
|
||||
default 64 if LOW_MEMORY_FOOTPRINT
|
||||
default 1024 if (SMALL_FLASH && !LOW_MEMORY_FOOTPRINT)
|
||||
default 1024
|
||||
help
|
||||
Select squashfs block size, must be one of:
|
||||
4, 8, 16, 32, 64, 128, 256, 512, 1024
|
||||
|
||||
menuconfig TARGET_ROOTFS_UBIFS
|
||||
bool "ubifs"
|
||||
@ -287,23 +290,24 @@ menu "Target Images"
|
||||
config TARGET_IMAGES_GZIP
|
||||
bool "GZip images"
|
||||
depends on TARGET_ROOTFS_EXT4FS || TARGET_x86 || TARGET_armvirt || TARGET_malta
|
||||
default n
|
||||
default y
|
||||
|
||||
comment "Image Options"
|
||||
|
||||
source "target/linux/*/image/Config.in"
|
||||
|
||||
config TARGET_KERNEL_PARTSIZE
|
||||
int "Kernel partition size (in MB)"
|
||||
int "Kernel partition size (in MiB)"
|
||||
depends on USES_BOOT_PART
|
||||
default 8 if TARGET_apm821xx_sata
|
||||
default 64 if TARGET_bcm27xx
|
||||
default 64
|
||||
default 64 if TARGET_rockchip
|
||||
default 16
|
||||
|
||||
config TARGET_ROOTFS_PARTSIZE
|
||||
int "Root filesystem partition size (in MB)"
|
||||
depends on USES_ROOTFS_PART || TARGET_ROOTFS_EXT4FS || TARGET_omap || TARGET_sunxi || TARGET_uml
|
||||
default 160
|
||||
int "Root filesystem partition size (in MiB)"
|
||||
depends on USES_ROOTFS_PART || TARGET_ROOTFS_EXT4FS
|
||||
default 400
|
||||
help
|
||||
Select the root filesystem partition size.
|
||||
|
||||
|
@ -24,11 +24,6 @@ config KERNEL_PRINTK
|
||||
bool "Enable support for printk"
|
||||
default y
|
||||
|
||||
config KERNEL_CRASHLOG
|
||||
bool "Crash logging"
|
||||
depends on !(arm || powerpc || sparc || TARGET_uml || i386 || x86_64)
|
||||
default y
|
||||
|
||||
config KERNEL_SWAP
|
||||
bool "Support for paging of anonymous memory (swap)"
|
||||
default y if !SMALL_FLASH
|
||||
@ -48,8 +43,7 @@ config KERNEL_DEBUG_FS
|
||||
|
||||
config KERNEL_MIPS_FP_SUPPORT
|
||||
bool
|
||||
default y
|
||||
depends on (mips || mipsel || mips64 || mips64el)
|
||||
default y if TARGET_pistachio
|
||||
|
||||
config KERNEL_ARM_PMU
|
||||
bool
|
||||
@ -87,6 +81,11 @@ config KERNEL_PROFILING
|
||||
Enable the extended profiling support mechanisms used by profilers such
|
||||
as OProfile.
|
||||
|
||||
config KERNEL_RPI_AXIPERF
|
||||
bool "Compile the kernel with RaspberryPi AXI Performance monitors"
|
||||
default y
|
||||
depends on KERNEL_PERF_EVENTS && TARGET_bcm27xx
|
||||
|
||||
config KERNEL_UBSAN
|
||||
bool "Compile the kernel with undefined behaviour sanity checker"
|
||||
help
|
||||
@ -115,6 +114,16 @@ config KERNEL_UBSAN_ALIGNMENT
|
||||
Enabling this option on architectures that support unaligned
|
||||
accesses may produce a lot of false positives.
|
||||
|
||||
config KERNEL_UBSAN_BOUNDS
|
||||
bool "Perform array index bounds checking"
|
||||
depends on KERNEL_UBSAN
|
||||
help
|
||||
This option enables detection of directly indexed out of bounds array
|
||||
accesses, where the array size is known at compile time. Note that
|
||||
this does not protect array overflows via bad calls to the
|
||||
{str,mem}*cpy() family of functions (that is addressed by
|
||||
FORTIFY_SOURCE).
|
||||
|
||||
config KERNEL_UBSAN_NULL
|
||||
bool "Enable checking of null pointers"
|
||||
depends on KERNEL_UBSAN
|
||||
@ -122,6 +131,19 @@ config KERNEL_UBSAN_NULL
|
||||
This option enables detection of memory accesses via a
|
||||
null pointer.
|
||||
|
||||
config KERNEL_UBSAN_TRAP
|
||||
bool "On Sanitizer warnings, abort the running kernel code"
|
||||
depends on KERNEL_UBSAN
|
||||
help
|
||||
Building kernels with Sanitizer features enabled tends to grow the
|
||||
kernel size by around 5%, due to adding all the debugging text on
|
||||
failure paths. To avoid this, Sanitizer instrumentation can just
|
||||
issue a trap. This reduces the kernel size overhead but turns all
|
||||
warnings (including potentially harmless conditions) into full
|
||||
exceptions that abort the running kernel code (regardless of context,
|
||||
locks held, etc), which may destabilize the system. For some system
|
||||
builders this is an acceptable trade-off.
|
||||
|
||||
config KERNEL_KASAN
|
||||
bool "Compile the kernel with KASan: runtime memory debugger"
|
||||
select KERNEL_SLUB_DEBUG
|
||||
@ -148,6 +170,30 @@ config KERNEL_KASAN_EXTRA
|
||||
compile time.
|
||||
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81715 has more
|
||||
|
||||
config KERNEL_KASAN_VMALLOC
|
||||
bool "Back mappings in vmalloc space with real shadow memory"
|
||||
depends on KERNEL_KASAN
|
||||
help
|
||||
By default, the shadow region for vmalloc space is the read-only
|
||||
zero page. This means that KASAN cannot detect errors involving
|
||||
vmalloc space.
|
||||
|
||||
Enabling this option will hook in to vmap/vmalloc and back those
|
||||
mappings with real shadow memory allocated on demand. This allows
|
||||
for KASAN to detect more sorts of errors (and to support vmapped
|
||||
stacks), but at the cost of higher memory usage.
|
||||
|
||||
This option depends on HAVE_ARCH_KASAN_VMALLOC, but we can't
|
||||
depend on that in here, so it is possible that enabling this
|
||||
will have no effect.
|
||||
|
||||
if KERNEL_KASAN
|
||||
config KERNEL_KASAN_GENERIC
|
||||
def_bool y
|
||||
|
||||
config KERNEL_KASAN_SW_TAGS
|
||||
def_bool n
|
||||
endif
|
||||
|
||||
choice
|
||||
prompt "Instrumentation type"
|
||||
@ -303,6 +349,19 @@ config KERNEL_PREEMPT_TRACER
|
||||
enabled. This option and the irqs-off timing option can be
|
||||
used together or separately.)
|
||||
|
||||
config KERNEL_HIST_TRIGGERS
|
||||
bool "Histogram triggers"
|
||||
depends on KERNEL_FTRACE
|
||||
help
|
||||
Hist triggers allow one or more arbitrary trace event fields to be
|
||||
aggregated into hash tables and dumped to stdout by reading a
|
||||
debugfs/tracefs file. They're useful for gathering quick and dirty
|
||||
(though precise) summaries of event activity as an initial guide for
|
||||
further investigation using more advanced tools.
|
||||
|
||||
Inter-event tracing of quantities such as latencies is also
|
||||
supported using hist triggers under this option.
|
||||
|
||||
config KERNEL_DEBUG_KERNEL
|
||||
bool
|
||||
default n
|
||||
@ -314,6 +373,34 @@ config KERNEL_DEBUG_INFO
|
||||
help
|
||||
This will compile your kernel and modules with debug information.
|
||||
|
||||
config KERNEL_DEBUG_INFO_BTF
|
||||
|
||||
bool "Enable additional BTF type information"
|
||||
default n
|
||||
depends on !HOST_OS_MACOS
|
||||
depends on KERNEL_DEBUG_INFO && !KERNEL_DEBUG_INFO_REDUCED
|
||||
select DWARVES
|
||||
help
|
||||
Generate BPF Type Format (BTF) information from DWARF debug info.
|
||||
Turning this on expects presence of pahole tool, which will convert
|
||||
DWARF type info into equivalent deduplicated BTF type info.
|
||||
|
||||
Required to run BPF CO-RE applications.
|
||||
|
||||
config KERNEL_DEBUG_INFO_REDUCED
|
||||
bool "Reduce debugging information"
|
||||
default y
|
||||
depends on KERNEL_DEBUG_INFO
|
||||
help
|
||||
If you say Y here gcc is instructed to generate less debugging
|
||||
information for structure types. This means that tools that
|
||||
need full debugging information (like kgdb or systemtap) won't
|
||||
be happy. But if you merely need debugging information to
|
||||
resolve line numbers there is no loss. Advantage is that
|
||||
build directory object sizes shrink dramatically over a full
|
||||
DEBUG_INFO build and compile times are reduced too.
|
||||
Only works with newer gcc versions.
|
||||
|
||||
config KERNEL_DEBUG_LL_UART_NONE
|
||||
bool
|
||||
default n
|
||||
@ -327,6 +414,14 @@ config KERNEL_DEBUG_LL
|
||||
help
|
||||
ARM low level debugging.
|
||||
|
||||
config KERNEL_DEBUG_VIRTUAL
|
||||
bool "Compile the kernel with VM translations debugging"
|
||||
select KERNEL_DEBUG_KERNEL
|
||||
default n
|
||||
help
|
||||
Enable checks sanity checks to catch invalid uses of
|
||||
virt_to_phys()/phys_to_virt() against the non-linear address space.
|
||||
|
||||
config KERNEL_DYNAMIC_DEBUG
|
||||
bool "Compile the kernel with dynamic printk"
|
||||
select KERNEL_DEBUG_FS
|
||||
@ -368,6 +463,21 @@ config KERNEL_KPROBE_EVENTS
|
||||
bool
|
||||
default y if KERNEL_KPROBES
|
||||
|
||||
config KERNEL_BPF_EVENTS
|
||||
bool "Compile the kernel with BPF event support"
|
||||
default n
|
||||
select KERNEL_KPROBES
|
||||
help
|
||||
Allows to attach BPF programs to kprobe, uprobe and tracepoint events.
|
||||
This is required to use BPF maps of type BPF_MAP_TYPE_PERF_EVENT_ARRAY
|
||||
for sending data from BPF programs to user-space for post-processing
|
||||
or logging.
|
||||
|
||||
config KERNEL_BPF_KPROBE_OVERRIDE
|
||||
bool
|
||||
default n
|
||||
depends on KERNEL_KPROBES
|
||||
|
||||
config KERNEL_AIO
|
||||
bool "Compile the kernel with asynchronous IO support"
|
||||
default y if !SMALL_FLASH
|
||||
@ -437,34 +547,22 @@ config KERNEL_PROVE_LOCKING
|
||||
select KERNEL_DEBUG_KERNEL
|
||||
default n
|
||||
|
||||
config KERNEL_LOCKUP_DETECTOR
|
||||
bool "Compile the kernel with detect Hard and Soft Lockups"
|
||||
config KERNEL_SOFTLOCKUP_DETECTOR
|
||||
bool "Compile the kernel with detect Soft Lockups"
|
||||
depends on KERNEL_DEBUG_KERNEL
|
||||
help
|
||||
Say Y here to enable the kernel to act as a watchdog to detect
|
||||
hard and soft lockups.
|
||||
soft lockups.
|
||||
|
||||
Softlockups are bugs that cause the kernel to loop in kernel
|
||||
mode for more than 20 seconds, without giving other tasks a
|
||||
chance to run. The current stack trace is displayed upon
|
||||
detection and the system will stay locked up.
|
||||
|
||||
Hardlockups are bugs that cause the CPU to loop in kernel mode
|
||||
for more than 10 seconds, without letting other interrupts have a
|
||||
chance to run. The current stack trace is displayed upon detection
|
||||
and the system will stay locked up.
|
||||
|
||||
The overhead should be minimal. A periodic hrtimer runs to
|
||||
generate interrupts and kick the watchdog task every 4 seconds.
|
||||
An NMI is generated every 10 seconds or so to check for hardlockups.
|
||||
|
||||
The frequency of hrtimer and NMI events and the soft and hard lockup
|
||||
thresholds can be controlled through the sysctl watchdog_thresh.
|
||||
|
||||
config KERNEL_DETECT_HUNG_TASK
|
||||
bool "Compile the kernel with detect Hung Tasks"
|
||||
depends on KERNEL_DEBUG_KERNEL
|
||||
default KERNEL_LOCKUP_DETECTOR
|
||||
default KERNEL_SOFTLOCKUP_DETECTOR
|
||||
help
|
||||
Say Y here to enable the kernel to detect "hung tasks",
|
||||
which are bugs that cause the task to be stuck in
|
||||
@ -681,7 +779,7 @@ if KERNEL_CGROUPS
|
||||
bool "Memory Resource Controller for Control Groups"
|
||||
default y
|
||||
select KERNEL_FREEZER
|
||||
depends on KERNEL_RESOURCE_COUNTERS || !LINUX_3_18
|
||||
depends on KERNEL_RESOURCE_COUNTERS
|
||||
help
|
||||
Provides a memory resource controller that manages both anonymous
|
||||
memory and page cache. (See Documentation/cgroups/memory.txt)
|
||||
@ -944,6 +1042,19 @@ config KERNEL_IP_MROUTE
|
||||
Multicast routing requires a multicast routing daemon in
|
||||
addition to kernel support.
|
||||
|
||||
if KERNEL_IP_MROUTE
|
||||
|
||||
config KERNEL_IP_MROUTE_MULTIPLE_TABLES
|
||||
def_bool y
|
||||
|
||||
config KERNEL_IP_PIMSM_V1
|
||||
def_bool y
|
||||
|
||||
config KERNEL_IP_PIMSM_V2
|
||||
def_bool y
|
||||
|
||||
endif
|
||||
|
||||
#
|
||||
# IPv6 configuration
|
||||
#
|
||||
@ -966,8 +1077,15 @@ if KERNEL_IPV6
|
||||
Multicast routing requires a multicast routing daemon in
|
||||
addition to kernel support.
|
||||
|
||||
config KERNEL_IPV6_PIMSM_V2
|
||||
def_bool n
|
||||
if KERNEL_IPV6_MROUTE
|
||||
|
||||
config KERNEL_IPV6_MROUTE_MULTIPLE_TABLES
|
||||
def_bool y
|
||||
|
||||
config KERNEL_IPV6_PIMSM_V2
|
||||
def_bool y
|
||||
|
||||
endif
|
||||
|
||||
config KERNEL_IPV6_SEG6_LWTUNNEL
|
||||
bool "Enable support for lightweight tunnels"
|
||||
@ -980,6 +1098,16 @@ if KERNEL_IPV6
|
||||
|
||||
endif
|
||||
|
||||
#
|
||||
# Miscellaneous network configuration
|
||||
#
|
||||
|
||||
config KERNEL_NET_L3_MASTER_DEV
|
||||
bool "L3 Master device support"
|
||||
help
|
||||
This module provides glue between core networking code and device
|
||||
drivers to support L3 master devices like VRF.
|
||||
|
||||
#
|
||||
# NFS related symbols
|
||||
#
|
||||
@ -1125,7 +1253,7 @@ config KERNEL_SQUASHFS_XATTR
|
||||
bool "Squashfs XATTR support"
|
||||
|
||||
#
|
||||
# compile optimiziation setting
|
||||
# compile optimization setting
|
||||
#
|
||||
choice
|
||||
prompt "Compiler optimization level"
|
||||
|
1
config/check-uname.sh
Executable file
1
config/check-uname.sh
Executable file
@ -0,0 +1 @@
|
||||
[ "$(uname)" = "$1" ] && echo y || echo n
|
@ -35,7 +35,7 @@ define autoreconf
|
||||
$(patsubst %,rm -f %;,$(2)) \
|
||||
$(foreach p,$(3), \
|
||||
if [ -f $(p)/configure.ac ] || [ -f $(p)/configure.in ]; then \
|
||||
[ -d $(p)/autom4te.cache ] && rm -rf autom4te.cache; \
|
||||
[ -d $(p)/autom4te.cache ] && rm -rf $(p)/autom4te.cache; \
|
||||
[ -e $(p)/config.rpath ] || \
|
||||
ln -s $(SCRIPT_DIR)/config.rpath $(p)/config.rpath; \
|
||||
touch NEWS AUTHORS COPYING ABOUT-NLS ChangeLog; \
|
||||
@ -113,7 +113,7 @@ ifneq ($(filter patch-libtool,$(PKG_FIXUP)),)
|
||||
endif
|
||||
|
||||
ifneq ($(filter libtool,$(PKG_FIXUP)),)
|
||||
PKG_BUILD_DEPENDS += libtool gettext libiconv
|
||||
PKG_BUILD_DEPENDS += libtool
|
||||
ifeq ($(filter no-autoreconf,$(PKG_FIXUP)),)
|
||||
Hooks/Configure/Pre += autoreconf_target
|
||||
endif
|
||||
@ -124,7 +124,7 @@ ifneq ($(filter libtool-abiver,$(PKG_FIXUP)),)
|
||||
endif
|
||||
|
||||
ifneq ($(filter libtool-ucxx,$(PKG_FIXUP)),)
|
||||
PKG_BUILD_DEPENDS += libtool gettext libiconv
|
||||
PKG_BUILD_DEPENDS += libtool
|
||||
ifeq ($(filter no-autoreconf,$(PKG_FIXUP)),)
|
||||
Hooks/Configure/Pre += autoreconf_target
|
||||
endif
|
||||
|
85
include/bpf.mk
Normal file
85
include/bpf.mk
Normal file
@ -0,0 +1,85 @@
|
||||
BPF_DEPENDS := @HAS_BPF_TOOLCHAIN
|
||||
LLVM_VER:=
|
||||
|
||||
CLANG_MIN_VER:=12
|
||||
|
||||
ifneq ($(CONFIG_USE_LLVM_HOST),)
|
||||
BPF_TOOLCHAIN_HOST_PATH:=$(call qstrip,$(CONFIG_BPF_TOOLCHAIN_HOST_PATH))
|
||||
ifneq ($(BPF_TOOLCHAIN_HOST_PATH),)
|
||||
BPF_PATH:=$(BPF_TOOLCHAIN_HOST_PATH)/bin:$(PATH)
|
||||
else
|
||||
BPF_PATH:=$(PATH)
|
||||
endif
|
||||
CLANG:=$(firstword $(shell PATH='$(BPF_PATH)' command -v clang clang-13 clang-12 clang-11))
|
||||
LLVM_VER:=$(subst clang,,$(notdir $(CLANG)))
|
||||
endif
|
||||
ifneq ($(CONFIG_USE_LLVM_PREBUILT),)
|
||||
CLANG:=$(TOPDIR)/llvm-bpf/bin/clang
|
||||
endif
|
||||
ifneq ($(CONFIG_USE_LLVM_BUILD),)
|
||||
CLANG:=$(STAGING_DIR_HOST)/llvm-bpf/bin/clang
|
||||
endif
|
||||
|
||||
LLVM_PATH:=$(dir $(CLANG))
|
||||
LLVM_LLC:=$(LLVM_PATH)/llc$(LLVM_VER)
|
||||
LLVM_DIS:=$(LLVM_PATH)/llvm-dis$(LLVM_VER)
|
||||
LLVM_OPT:=$(LLVM_PATH)/opt$(LLVM_VER)
|
||||
LLVM_STRIP:=$(LLVM_PATH)/llvm-strip$(LLVM_VER)
|
||||
|
||||
BPF_KARCH:=mips
|
||||
BPF_ARCH:=mips$(if $(CONFIG_ARCH_64BIT),64)$(if $(CONFIG_BIG_ENDIAN),,el)
|
||||
BPF_TARGET:=bpf$(if $(CONFIG_BIG_ENDIAN),eb,el)
|
||||
|
||||
BPF_HEADERS_DIR:=$(STAGING_DIR)/bpf-headers
|
||||
|
||||
BPF_KERNEL_INCLUDE := \
|
||||
-nostdinc -isystem $(TOOLCHAIN_DIR)/include \
|
||||
-I$(BPF_HEADERS_DIR)/arch/$(BPF_KARCH)/include \
|
||||
-I$(BPF_HEADERS_DIR)/arch/$(BPF_KARCH)/include/asm/mach-generic \
|
||||
-I$(BPF_HEADERS_DIR)/arch/$(BPF_KARCH)/include/generated \
|
||||
-I$(BPF_HEADERS_DIR)/include \
|
||||
-I$(BPF_HEADERS_DIR)/arch/$(BPF_KARCH)/include/uapi \
|
||||
-I$(BPF_HEADERS_DIR)/arch/$(BPF_KARCH)/include/generated/uapi \
|
||||
-I$(BPF_HEADERS_DIR)/include/uapi \
|
||||
-I$(BPF_HEADERS_DIR)/include/generated/uapi \
|
||||
-I$(BPF_HEADERS_DIR)/tools/lib \
|
||||
-I$(BPF_HEADERS_DIR)/tools/testing/selftests \
|
||||
-I$(BPF_HEADERS_DIR)/samples/bpf \
|
||||
-include linux/kconfig.h -include asm_goto_workaround.h
|
||||
|
||||
BPF_CFLAGS := \
|
||||
$(BPF_KERNEL_INCLUDE) -I$(PKG_BUILD_DIR) \
|
||||
-D__KERNEL__ -D__BPF_TRACING__ -DCONFIG_GENERIC_CSUM \
|
||||
-D__TARGET_ARCH_${BPF_KARCH} \
|
||||
-m$(if $(CONFIG_BIG_ENDIAN),big,little)-endian \
|
||||
-fno-stack-protector -Wall \
|
||||
-Wno-unused-value -Wno-pointer-sign \
|
||||
-Wno-compare-distinct-pointer-types \
|
||||
-Wno-gnu-variable-sized-type-not-at-end \
|
||||
-Wno-address-of-packed-member -Wno-tautological-compare \
|
||||
-Wno-unknown-warning-option \
|
||||
-fno-asynchronous-unwind-tables \
|
||||
-Wno-uninitialized -Wno-unused-variable \
|
||||
-Wno-unused-label \
|
||||
-O2 -emit-llvm -Xclang -disable-llvm-passes
|
||||
|
||||
ifneq ($(CONFIG_HAS_BPF_TOOLCHAIN),)
|
||||
ifeq ($(DUMP),)
|
||||
CLANG_VER:=$(shell $(CLANG) -dM -E - < /dev/null | grep __clang_major__ | cut -d' ' -f3)
|
||||
CLANG_VER_VALID:=$(shell [ "$(CLANG_VER)" -ge "$(CLANG_MIN_VER)" ] && echo 1 )
|
||||
ifeq ($(CLANG_VER_VALID),)
|
||||
$(error ERROR: LLVM/clang version too old. Minimum required: $(CLANG_MIN_VER), found: $(CLANG_VER))
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
define CompileBPF
|
||||
$(CLANG) -g -target $(BPF_ARCH)-linux-gnu $(BPF_CFLAGS) $(2) \
|
||||
-c $(1) -o $(patsubst %.c,%.bc,$(1))
|
||||
$(LLVM_OPT) -O2 -mtriple=$(BPF_TARGET) < $(patsubst %.c,%.bc,$(1)) > $(patsubst %.c,%.opt,$(1))
|
||||
$(LLVM_DIS) < $(patsubst %.c,%.opt,$(1)) > $(patsubst %.c,%.S,$(1))
|
||||
$(LLVM_LLC) -march=$(BPF_TARGET) -mcpu=v3 -filetype=obj -o $(patsubst %.c,%.o,$(1)) < $(patsubst %.c,%.S,$(1))
|
||||
$(CP) $(patsubst %.c,%.o,$(1)) $(patsubst %.c,%.debug.o,$(1))
|
||||
$(LLVM_STRIP) --strip-debug $(patsubst %.c,%.o,$(1))
|
||||
endef
|
||||
|
@ -52,7 +52,7 @@ CMAKE_RANLIB:=$(call cmake_tool,$(TARGET_RANLIB))
|
||||
CMAKE_FIND_ROOT_PATH:=$(STAGING_DIR)/usr;$(TOOLCHAIN_DIR)$(if $(CONFIG_EXTERNAL_TOOLCHAIN),;$(CONFIG_TOOLCHAIN_ROOT))
|
||||
CMAKE_HOST_FIND_ROOT_PATH:=$(STAGING_DIR)/host;$(STAGING_DIR_HOSTPKG);$(STAGING_DIR_HOST)
|
||||
CMAKE_SHARED_LDFLAGS:=-Wl,-Bsymbolic-functions
|
||||
CMAKE_HOST_INSTALL_PREFIX ?= $(HOST_BUILD_PREFIX)
|
||||
CMAKE_HOST_INSTALL_PREFIX = $(HOST_BUILD_PREFIX)
|
||||
|
||||
ifeq ($(HOST_USE_NINJA),1)
|
||||
CMAKE_HOST_OPTIONS += -DCMAKE_GENERATOR="Ninja"
|
||||
|
@ -12,6 +12,7 @@
|
||||
DEP_FINDPARAMS := -x "*/.svn*" -x ".*" -x "*:*" -x "*\!*" -x "* *" -x "*\\\#*" -x "*/.*_check" -x "*/.*.swp" -x "*/.pkgdir*"
|
||||
|
||||
find_md5=find $(wildcard $(1)) -type f $(patsubst -x,-and -not -path,$(DEP_FINDPARAMS) $(2)) -printf "%p%T@\n" | sort | $(MKHASH) md5
|
||||
find_md5_reproducible=find $(wildcard $(1)) -type f $(patsubst -x,-and -not -path,$(DEP_FINDPARAMS) $(2)) -print0 | xargs -0 $(MKHASH) md5 | sort | $(MKHASH) md5
|
||||
|
||||
define rdep
|
||||
.PRECIOUS: $(2)
|
||||
@ -27,7 +28,7 @@ ifneq ($(wildcard $(2)),)
|
||||
{ [ \! -f "$(3)" ] || diff $(3) $(3).1 >/dev/null; } && \
|
||||
) \
|
||||
{ \
|
||||
[ -f "$(2)_check.1" ] && mv "$(2)_check.1"; \
|
||||
[ -f "$(2)_check.1" ] && mv "$(2)_check.1" "$(2)_check"; \
|
||||
$(TOPDIR)/scripts/timestamp.pl $(DEP_FINDPARAMS) $(4) -n $(2) $(1) && { \
|
||||
$(call debug_eval,$(SUBDIR),r,echo "No need to rebuild $(2)";) \
|
||||
touch -r "$(2)" "$(2)_check"; \
|
||||
|
@ -63,6 +63,21 @@ define dl_tar_pack
|
||||
$$$${TAR_TIMESTAMP:+--mtime="$$$$TAR_TIMESTAMP"} -c $(2) | $(call dl_pack,$(1))
|
||||
endef
|
||||
|
||||
gen_sha256sum = $(shell $(MKHASH) sha256 $(DL_DIR)/$(1))
|
||||
|
||||
# Used in Build/CoreTargets and HostBuild/Core as an integrity check for
|
||||
# downloaded files. It will add a FORCE rule if the sha256 hash does not
|
||||
# match, so that the download can be more thoroughly handled by download.pl.
|
||||
define check_download_integrity
|
||||
expected_hash:=$(strip $(if $(filter-out x,$(HASH)),$(HASH),$(MIRROR_HASH)))
|
||||
$$(if $$(and $(FILE),$$(wildcard $(DL_DIR)/$(FILE)), \
|
||||
$$(filter undefined,$$(flavor DownloadChecked/$(FILE)))), \
|
||||
$$(eval DownloadChecked/$(FILE):=1) \
|
||||
$$(if $$(filter-out $$(call gen_sha256sum,$(FILE)),$$(expected_hash)), \
|
||||
$(DL_DIR)/$(FILE): FORCE) \
|
||||
)
|
||||
endef
|
||||
|
||||
ifdef CHECK
|
||||
check_escape=$(subst ','\'',$(1))
|
||||
#')
|
||||
@ -78,8 +93,6 @@ else
|
||||
check_warn = $(if $(filter-out undefined,$(origin F_$(1))),$(filter ,$(shell $(call F_$(1),$(2),$(3),$(4)) >&2)),$(check_warn_nofix))
|
||||
endif
|
||||
|
||||
gen_sha256sum = $(shell $(MKHASH) sha256 $(DL_DIR)/$(1))
|
||||
|
||||
ifdef FIXUP
|
||||
F_hash_deprecated = $(SCRIPT_DIR)/fixup-makefile.pl $(CURDIR)/Makefile fix-hash $(3) $(call gen_sha256sum,$(1)) $(2)
|
||||
F_hash_mismatch = $(F_hash_deprecated)
|
||||
|
@ -21,7 +21,7 @@ include $(INCLUDE_DIR)/depends.mk
|
||||
include $(INCLUDE_DIR)/quilt.mk
|
||||
|
||||
BUILD_TYPES += host
|
||||
HOST_STAMP_PREPARED=$(HOST_BUILD_DIR)/.prepared$(if $(HOST_QUILT)$(DUMP),,$(shell $(call find_md5,${CURDIR} $(PKG_FILE_DEPENDS),))_$(call confvar,CONFIG_AUTOREMOVE $(HOST_PREPARED_DEPENDS)))
|
||||
HOST_STAMP_PREPARED=$(HOST_BUILD_DIR)/.prepared$(if $(HOST_QUILT)$(DUMP),,$(shell $(call $(if $(CONFIG_AUTOREMOVE),find_md5_reproducible,find_md5),${CURDIR} $(PKG_FILE_DEPENDS),))_$(call confvar,CONFIG_AUTOREMOVE $(HOST_PREPARED_DEPENDS)))
|
||||
HOST_STAMP_CONFIGURED:=$(HOST_BUILD_DIR)/.configured
|
||||
HOST_STAMP_BUILT:=$(HOST_BUILD_DIR)/.built
|
||||
HOST_BUILD_PREFIX?=$(if $(IS_PACKAGE_BUILD),$(STAGING_DIR_HOSTPKG),$(STAGING_DIR_HOST))
|
||||
@ -51,6 +51,7 @@ HOST_CONFIGURE_VARS = \
|
||||
CFLAGS="$(HOST_CFLAGS)" \
|
||||
CXX="$(HOSTCXX)" \
|
||||
CPPFLAGS="$(HOST_CPPFLAGS)" \
|
||||
CXXFLAGS="$(HOST_CXXFLAGS)" \
|
||||
LDFLAGS="$(HOST_LDFLAGS)" \
|
||||
CONFIG_SHELL="$(SHELL)"
|
||||
|
||||
@ -180,7 +181,7 @@ ifndef DUMP
|
||||
clean-build: host-clean-build
|
||||
endif
|
||||
|
||||
$(DL_DIR)/$(FILE): FORCE
|
||||
$(call check_download_integrity)
|
||||
|
||||
$(_host_target)host-prepare: $(HOST_STAMP_PREPARED)
|
||||
$(_host_target)host-configure: $(HOST_STAMP_CONFIGURED)
|
||||
@ -197,13 +198,13 @@ ifndef DUMP
|
||||
|
||||
ifneq ($(CONFIG_AUTOREMOVE),)
|
||||
host-compile:
|
||||
$(FIND) $(HOST_BUILD_DIR) -mindepth 1 -maxdepth 1 -not '(' -type f -and -name '.*' -and -size 0 ')' | \
|
||||
$(XARGS) rm -rf
|
||||
$(FIND) $(HOST_BUILD_DIR) -mindepth 1 -maxdepth 1 -not '(' -type f -and -name '.*' -and -size 0 ')' -print0 | \
|
||||
$(XARGS) -0 rm -rf
|
||||
endif
|
||||
endef
|
||||
endif
|
||||
|
||||
define HostBuild
|
||||
$(HostBuild/Core)
|
||||
$(if $(if $(PKG_HOST_ONLY),,$(STAMP_PREPARED)),,$(if $(strip $(PKG_SOURCE_URL)),$(call Download,default)))
|
||||
$(if $(if $(PKG_HOST_ONLY),,$(if $(and $(filter host-%,$(MAKECMDGOALS)),$(PKG_SKIP_DOWNLOAD)),,$(STAMP_PREPARED))),,$(if $(strip $(PKG_SOURCE_URL)),$(call Download,default)))
|
||||
endef
|
||||
|
@ -4,7 +4,7 @@ IMAGE_KERNEL = $(word 1,$^)
|
||||
IMAGE_ROOTFS = $(word 2,$^)
|
||||
|
||||
define ModelNameLimit16
|
||||
$(shell expr substr "$(word 2, $(subst _, ,$(1)))" 1 16)
|
||||
$(shell printf %.16s "$(word 2, $(subst _, ,$(1)))")
|
||||
endef
|
||||
|
||||
define rootfs_align
|
||||
@ -27,8 +27,21 @@ define Build/append-kernel
|
||||
dd if=$(IMAGE_KERNEL) >> $@
|
||||
endef
|
||||
|
||||
define Build/package-kernel-ubifs
|
||||
mkdir $@.kernelubifs
|
||||
cp $@ $@.kernelubifs/kernel
|
||||
$(STAGING_DIR_HOST)/bin/mkfs.ubifs \
|
||||
$(KERNEL_UBIFS_OPTS) \
|
||||
-r $@.kernelubifs $@
|
||||
rm -r $@.kernelubifs
|
||||
endef
|
||||
|
||||
define Build/append-image
|
||||
dd if=$(BIN_DIR)/$(DEVICE_IMG_PREFIX)-$(1) >> $@
|
||||
cp "$(BIN_DIR)/$(DEVICE_IMG_PREFIX)-$(1)" "$@.stripmeta"
|
||||
fwtool -s /dev/null -t "$@.stripmeta" || :
|
||||
fwtool -i /dev/null -t "$@.stripmeta" || :
|
||||
dd if="$@.stripmeta" >> "$@"
|
||||
rm "$@.stripmeta"
|
||||
endef
|
||||
|
||||
ifdef IB
|
||||
@ -37,8 +50,13 @@ define Build/append-image-stage
|
||||
endef
|
||||
else
|
||||
define Build/append-image-stage
|
||||
dd if=$(BIN_DIR)/$(DEVICE_IMG_PREFIX)-$(1) of=$(STAGING_DIR_IMAGE)/$(BOARD)$(if $(SUBTARGET),-$(SUBTARGET))-$(DEVICE_NAME)-$(1)
|
||||
dd if=$(BIN_DIR)/$(DEVICE_IMG_PREFIX)-$(1) >> $@
|
||||
cp "$(BIN_DIR)/$(DEVICE_IMG_PREFIX)-$(1)" "$@.stripmeta"
|
||||
fwtool -s /dev/null -t "$@.stripmeta" || :
|
||||
fwtool -i /dev/null -t "$@.stripmeta" || :
|
||||
mkdir -p "$(STAGING_DIR_IMAGE)"
|
||||
dd if="$@.stripmeta" of="$(STAGING_DIR_IMAGE)/$(BOARD)$(if $(SUBTARGET),-$(SUBTARGET))-$(DEVICE_NAME)-$(1)"
|
||||
dd if="$@.stripmeta" >> "$@"
|
||||
rm "$@.stripmeta"
|
||||
endef
|
||||
endif
|
||||
|
||||
@ -72,6 +90,7 @@ metadata_json = \
|
||||
|
||||
define Build/append-metadata
|
||||
$(if $(SUPPORTED_DEVICES),-echo $(call metadata_json) | fwtool -I - $@)
|
||||
sha256sum "$@" | cut -d" " -f1 > "$@.sha256sum"
|
||||
[ ! -s "$(BUILD_KEY)" -o ! -s "$(BUILD_KEY).ucert" -o ! -s "$@" ] || { \
|
||||
cp "$(BUILD_KEY).ucert" "$@.ucert" ;\
|
||||
usign -S -m "$@" -s "$(BUILD_KEY)" -x "$@.sig" ;\
|
||||
@ -94,6 +113,15 @@ define Build/append-squashfs-fakeroot-be
|
||||
cat $@.fakesquashfs >> $@
|
||||
endef
|
||||
|
||||
define Build/append-squashfs4-fakeroot
|
||||
rm -rf $@.fakefs $@.fakesquashfs
|
||||
mkdir $@.fakefs
|
||||
$(STAGING_DIR_HOST)/bin/mksquashfs4 \
|
||||
$@.fakefs $@.fakesquashfs \
|
||||
-nopad -noappend -root-owned
|
||||
cat $@.fakesquashfs >> $@
|
||||
endef
|
||||
|
||||
define Build/append-string
|
||||
echo -n $(1) >> $@
|
||||
endef
|
||||
@ -103,7 +131,7 @@ define Build/append-ubi
|
||||
$(if $(UBOOTENV_IN_UBI),--uboot-env) \
|
||||
$(if $(KERNEL_IN_UBI),--kernel $(IMAGE_KERNEL)) \
|
||||
$(foreach part,$(UBINIZE_PARTS),--part $(part)) \
|
||||
$(IMAGE_ROOTFS) \
|
||||
--rootfs $(IMAGE_ROOTFS) \
|
||||
$@.tmp \
|
||||
-p $(BLOCKSIZE:%k=%KiB) -m $(PAGESIZE) \
|
||||
$(if $(SUBPAGESIZE),-s $(SUBPAGESIZE)) \
|
||||
@ -113,6 +141,18 @@ define Build/append-ubi
|
||||
rm $@.tmp
|
||||
endef
|
||||
|
||||
define Build/ubinize-kernel
|
||||
cp $@ $@.tmp
|
||||
sh $(TOPDIR)/scripts/ubinize-image.sh \
|
||||
--kernel $@.tmp \
|
||||
$@ \
|
||||
-p $(BLOCKSIZE:%k=%KiB) -m $(PAGESIZE) \
|
||||
$(if $(SUBPAGESIZE),-s $(SUBPAGESIZE)) \
|
||||
$(if $(VID_HDR_OFFSET),-O $(VID_HDR_OFFSET)) \
|
||||
$(UBINIZE_OPTS)
|
||||
rm $@.tmp
|
||||
endef
|
||||
|
||||
define Build/append-uboot
|
||||
dd if=$(UBOOT_PATH) >> $@
|
||||
endef
|
||||
@ -170,11 +210,20 @@ define Build/check-size
|
||||
@imagesize="$$(stat -c%s $@)"; \
|
||||
limitsize="$$(($(subst k,* 1024,$(subst m, * 1024k,$(if $(1),$(1),$(IMAGE_SIZE))))))"; \
|
||||
[ $$limitsize -ge $$imagesize ] || { \
|
||||
echo "WARNING: Image file $@ is too big: $$imagesize > $$limitsize" >&2; \
|
||||
$(call ERROR_MESSAGE, WARNING: Image file $@ is too big: $$imagesize > $$limitsize); \
|
||||
rm -f $@; \
|
||||
}
|
||||
endef
|
||||
|
||||
define Build/copy-file
|
||||
cat "$(1)" > "$@"
|
||||
endef
|
||||
|
||||
define Build/edimax-header
|
||||
$(STAGING_DIR_HOST)/bin/mkedimaximg -i $@ -o $@.new $(1)
|
||||
@mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/elecom-product-header
|
||||
$(eval product=$(word 1,$(1)))
|
||||
$(eval fw=$(if $(word 2,$(1)),$(word 2,$(1)),$@))
|
||||
@ -187,6 +236,19 @@ define Build/elecom-product-header
|
||||
mv $(fw).new $(fw)
|
||||
endef
|
||||
|
||||
define Build/elecom-wrc-gs-factory
|
||||
$(eval product=$(word 1,$(1)))
|
||||
$(eval version=$(word 2,$(1)))
|
||||
$(eval hash_opt=$(word 3,$(1)))
|
||||
$(MKHASH) md5 $(hash_opt) $@ >> $@
|
||||
( \
|
||||
echo -n "ELECOM $(product) v$(version)" | \
|
||||
dd bs=32 count=1 conv=sync; \
|
||||
dd if=$@; \
|
||||
) > $@.new
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/elx-header
|
||||
$(eval hw_id=$(word 1,$(1)))
|
||||
$(eval xor_pattern=$(word 2,$(1)))
|
||||
@ -223,15 +285,19 @@ endef
|
||||
define Build/fit
|
||||
$(TOPDIR)/scripts/mkits.sh \
|
||||
-D $(DEVICE_NAME) -o $@.its -k $@ \
|
||||
-C $(word 1,$(1)) $(if $(word 2,$(1)),\
|
||||
$(if $(DEVICE_DTS_OVERLAY),-d $(KERNEL_BUILD_DIR)/image-$$(basename $(word 2,$(1))),\
|
||||
-d $(word 2,$(1)))) \
|
||||
-C $(word 1,$(1)) \
|
||||
$(if $(word 2,$(1)),\
|
||||
$(if $(findstring 11,$(if $(DEVICE_DTS_OVERLAY),1)$(if $(findstring $(KERNEL_BUILD_DIR)/image-,$(word 2,$(1))),,1)), \
|
||||
-d $(KERNEL_BUILD_DIR)/image-$$(basename $(word 2,$(1))), \
|
||||
-d $(word 2,$(1)))) \
|
||||
$(if $(findstring with-rootfs,$(word 3,$(1))),-r $(IMAGE_ROOTFS)) \
|
||||
$(if $(findstring with-initrd,$(word 3,$(1))), \
|
||||
$(if $(CONFIG_TARGET_ROOTFS_INITRAMFS_SEPARATE), \
|
||||
-i $(KERNEL_BUILD_DIR)/initrd.cpio$(strip $(call Build/initrd_compression)))) \
|
||||
-a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
|
||||
$(if $(DEVICE_FDT_NUM),-n $(DEVICE_FDT_NUM)) \
|
||||
$(if $(DEVICE_DTS_DELIMITER),-l $(DEVICE_DTS_DELIMITER)) \
|
||||
$(if $(DEVICE_DTS_LOADADDR),-s $(DEVICE_DTS_LOADADDR)) \
|
||||
$(if $(DEVICE_DTS_OVERLAY),$(foreach dtso,$(DEVICE_DTS_OVERLAY), -O $(dtso):$(KERNEL_BUILD_DIR)/image-$(dtso).dtb)) \
|
||||
-c $(if $(DEVICE_DTS_CONFIG),$(DEVICE_DTS_CONFIG),"config-1") \
|
||||
-A $(LINUX_KARCH) -v $(LINUX_VERSION)
|
||||
@ -240,8 +306,13 @@ define Build/fit
|
||||
@mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/libdeflate-gzip
|
||||
$(STAGING_DIR_HOST)/bin/libdeflate-gzip -f -12 -c $@ $(1) > $@.new
|
||||
@mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/gzip
|
||||
gzip -f -9n -c $@ $(1) > $@.new
|
||||
$(STAGING_DIR_HOST)/bin/gzip -f -9n -c $@ $(1) > $@.new
|
||||
@mv $@.new $@
|
||||
endef
|
||||
|
||||
@ -256,6 +327,16 @@ define Build/install-dtb
|
||||
)
|
||||
endef
|
||||
|
||||
define Build/iptime-crc32
|
||||
$(STAGING_DIR_HOST)/bin/iptime-crc32 $(1) $@ $@.new
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/iptime-naspkg
|
||||
$(STAGING_DIR_HOST)/bin/iptime-naspkg $(1) $@ $@.new
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/jffs2
|
||||
rm -rf $(KDIR_TMP)/$(DEVICE_NAME)/jffs2 && \
|
||||
mkdir -p $(KDIR_TMP)/$(DEVICE_NAME)/jffs2/$$(dirname $(1)) && \
|
||||
@ -318,6 +399,19 @@ define Build/netgear-dni
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/netgear-encrypted-factory
|
||||
$(TOPDIR)/scripts/netgear-encrypted-factory.py \
|
||||
--input-file $@ \
|
||||
--output-file $@ \
|
||||
--model $(NETGEAR_ENC_MODEL) \
|
||||
--region $(NETGEAR_ENC_REGION) \
|
||||
--version V1.0.0.0.$(VERSION_DIST).$(firstword $(subst -, ,$(REVISION))) \
|
||||
--encryption-block-size 0x20000 \
|
||||
--openssl-bin "$(STAGING_DIR_HOST)/bin/openssl" \
|
||||
--key 6865392d342b4d212964363d6d7e7765312c7132613364316e26322a5a5e2538 \
|
||||
--iv 4a253169516c38243d6c6d2d3b384145
|
||||
endef
|
||||
|
||||
define Build/openmesh-image
|
||||
$(TOPDIR)/scripts/om-fwupgradecfg-gen.sh \
|
||||
"$(call param_get_default,ce_type,$(1),$(DEVICE_NAME))" \
|
||||
@ -370,16 +464,16 @@ define Build/qemu-image
|
||||
fi
|
||||
endef
|
||||
|
||||
define Build/qsdk-ipq-factory-mmc
|
||||
define Build/qsdk-ipq-factory-nand
|
||||
$(TOPDIR)/scripts/mkits-qsdk-ipq-image.sh \
|
||||
$@.its kernel $(IMAGE_KERNEL) rootfs $(IMAGE_ROOTFS)
|
||||
$@.its ubi $@
|
||||
PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new
|
||||
@mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/qsdk-ipq-factory-nand
|
||||
define Build/qsdk-ipq-factory-mmc
|
||||
$(TOPDIR)/scripts/mkits-qsdk-ipq-image.sh \
|
||||
$@.its ubi $@
|
||||
$@.its kernel $(IMAGE_KERNEL) rootfs $(IMAGE_ROOTFS)
|
||||
PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new
|
||||
@mv $@.new $@
|
||||
endef
|
||||
@ -496,12 +590,12 @@ define Build/xor-image
|
||||
endef
|
||||
|
||||
define Build/zip
|
||||
rm -rf $@.tmp
|
||||
mkdir $@.tmp
|
||||
mv $@ $@.tmp/$(1)
|
||||
|
||||
zip -j -X \
|
||||
$(if $(SOURCE_DATE_EPOCH),--mtime="$(SOURCE_DATE_EPOCH)") \
|
||||
$@ $@.tmp/$(if $(1),$(1),$@)
|
||||
mv $@ $@.tmp/$(word 1,$(1))
|
||||
TZ=UTC $(STAGING_DIR_HOST)/bin/zip -j -X \
|
||||
$(wordlist 2,$(words $(1)),$(1)) \
|
||||
$@ $@.tmp/$(if $(word 1,$(1)),$(word 1,$(1)),$$(basename $@))
|
||||
rm -rf $@.tmp
|
||||
endef
|
||||
|
||||
|
@ -137,14 +137,6 @@ define Image/BuildKernel/MkuImage
|
||||
-n '$(call toupper,$(ARCH)) $(VERSION_DIST) Linux-$(LINUX_VERSION)' -d $(4) $(5)
|
||||
endef
|
||||
|
||||
define Image/BuildKernel/MkFIT
|
||||
$(TOPDIR)/scripts/mkits.sh \
|
||||
-D $(1) -o $(KDIR)/fit-$(1).its -k $(2) $(if $(3),-d $(3)) -C $(4) -a $(5) -e $(6) \
|
||||
-c $(if $(DEVICE_DTS_CONFIG),$(DEVICE_DTS_CONFIG),"config-1") \
|
||||
-A $(LINUX_KARCH) -v $(LINUX_VERSION)
|
||||
PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $(KDIR)/fit-$(1).its $(KDIR)/fit-$(1)$(7).itb
|
||||
endef
|
||||
|
||||
ifdef CONFIG_TARGET_IMAGES_GZIP
|
||||
define Image/Gzip
|
||||
rm -f $(1).gz
|
||||
@ -184,6 +176,7 @@ endef
|
||||
# $(4) extra DTC flags
|
||||
define Image/BuildDTB
|
||||
$(TARGET_CROSS)cpp -nostdinc -x assembler-with-cpp \
|
||||
$(DTS_CPPFLAGS) \
|
||||
-I$(DTS_DIR) \
|
||||
-I$(DTS_DIR)/include \
|
||||
-I$(LINUX_DIR)/include/ \
|
||||
@ -229,8 +222,7 @@ $(eval $(foreach S,$(NAND_BLOCKSIZE),$(call Image/mkfs/jffs2-nand/template,$(S))
|
||||
define Image/mkfs/squashfs-common
|
||||
$(STAGING_DIR_HOST)/bin/mksquashfs4 $(call mkfs_target_dir,$(1)) $@ \
|
||||
-nopad -noappend -root-owned \
|
||||
-comp $(SQUASHFSCOMP) $(SQUASHFSOPT) \
|
||||
-processors $(shell nproc)
|
||||
-comp $(SQUASHFSCOMP) $(SQUASHFSOPT)
|
||||
endef
|
||||
|
||||
ifeq ($(CONFIG_TARGET_ROOTFS_SECURITY_LABELS),y)
|
||||
@ -394,7 +386,9 @@ define Device/Init
|
||||
|
||||
DEVICE_DTS :=
|
||||
DEVICE_DTS_CONFIG :=
|
||||
DEVICE_DTS_DELIMITER :=
|
||||
DEVICE_DTS_DIR :=
|
||||
DEVICE_DTS_LOADADDR :=
|
||||
DEVICE_DTS_OVERLAY :=
|
||||
DEVICE_FDT_NUM :=
|
||||
SOC :=
|
||||
@ -419,8 +413,9 @@ DEFAULT_DEVICE_VARS := \
|
||||
DEVICE_NAME KERNEL KERNEL_INITRAMFS KERNEL_INITRAMFS_IMAGE KERNEL_SIZE \
|
||||
CMDLINE UBOOTENV_IN_UBI KERNEL_IN_UBI BLOCKSIZE PAGESIZE SUBPAGESIZE \
|
||||
VID_HDR_OFFSET UBINIZE_OPTS UBINIZE_PARTS MKUBIFS_OPTS DEVICE_DTS \
|
||||
DEVICE_DTS_CONFIG DEVICE_DTS_DIR DEVICE_DTS_OVERLAY DEVICE_FDT_NUM \
|
||||
DEVICE_IMG_PREFIX SOC BOARD_NAME UIMAGE_MAGIC UIMAGE_NAME \
|
||||
DEVICE_DTS_CONFIG DEVICE_DTS_DELIMITER DEVICE_DTS_DIR DEVICE_DTS_OVERLAY \
|
||||
DEVICE_DTS_LOADADDR \
|
||||
DEVICE_FDT_NUM DEVICE_IMG_PREFIX SOC BOARD_NAME UIMAGE_MAGIC UIMAGE_NAME \
|
||||
SUPPORTED_DEVICES IMAGE_METADATA KERNEL_ENTRY KERNEL_LOADADDR \
|
||||
UBOOT_PATH IMAGE_SIZE \
|
||||
DEVICE_PACKAGES DEVICE_COMPAT_VERSION DEVICE_COMPAT_MESSAGE \
|
||||
@ -492,11 +487,11 @@ define Device/Build/initramfs
|
||||
$(BUILD_DIR)/json_info_files/$$(KERNEL_INITRAMFS_IMAGE).json: $(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE)
|
||||
@mkdir -p $$(shell dirname $$@)
|
||||
DEVICE_ID="$(1)" \
|
||||
BIN_DIR="$(BIN_DIR)" \
|
||||
SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH) \
|
||||
DEVICE_IMG_NAME="$$(notdir $$^)" \
|
||||
IMAGE_TYPE="kernel" \
|
||||
IMAGE_FILESYSTEM="initramfs" \
|
||||
FILE_NAME="$$(notdir $$^)" \
|
||||
FILE_DIR="$(KDIR)/tmp" \
|
||||
FILE_TYPE="kernel" \
|
||||
FILE_FILESYSTEM="initramfs" \
|
||||
DEVICE_IMG_PREFIX="$$(DEVICE_IMG_PREFIX)" \
|
||||
DEVICE_VENDOR="$$(DEVICE_VENDOR)" \
|
||||
DEVICE_MODEL="$$(DEVICE_MODEL)" \
|
||||
@ -524,7 +519,8 @@ endif
|
||||
define Device/Build/compile
|
||||
$$(_COMPILE_TARGET): $(KDIR)/$(1)
|
||||
$(eval $(call Device/Export,$(KDIR)/$(1)))
|
||||
$(KDIR)/$(1):
|
||||
$(KDIR)/$(1): FORCE
|
||||
rm -f $(KDIR)/$(1)
|
||||
$$(call concat_cmd,$(COMPILE/$(1)))
|
||||
|
||||
endef
|
||||
@ -599,11 +595,11 @@ define Device/Build/image
|
||||
$(BUILD_DIR)/json_info_files/$(call DEVICE_IMG_NAME,$(1),$(2)).json: $(BIN_DIR)/$(call DEVICE_IMG_NAME,$(1),$(2))$$(GZ_SUFFIX)
|
||||
@mkdir -p $$(shell dirname $$@)
|
||||
DEVICE_ID="$(DEVICE_NAME)" \
|
||||
BIN_DIR="$(BIN_DIR)" \
|
||||
SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH) \
|
||||
DEVICE_IMG_NAME="$(DEVICE_IMG_NAME)" \
|
||||
IMAGE_TYPE=$(word 1,$(subst ., ,$(2))) \
|
||||
IMAGE_FILESYSTEM="$(1)" \
|
||||
FILE_NAME="$(DEVICE_IMG_NAME)" \
|
||||
FILE_DIR="$(KDIR)/tmp" \
|
||||
FILE_TYPE=$(word 1,$(subst ., ,$(2))) \
|
||||
FILE_FILESYSTEM="$(1)" \
|
||||
DEVICE_IMG_PREFIX="$(DEVICE_IMG_PREFIX)" \
|
||||
DEVICE_VENDOR="$(DEVICE_VENDOR)" \
|
||||
DEVICE_MODEL="$(DEVICE_MODEL)" \
|
||||
@ -629,7 +625,9 @@ define Device/Build/image
|
||||
endef
|
||||
|
||||
define Device/Build/artifact
|
||||
$$(_TARGET): $(BIN_DIR)/$(DEVICE_IMG_PREFIX)-$(1)
|
||||
$$(_TARGET): $(if $(CONFIG_JSON_OVERVIEW_IMAGE_INFO), \
|
||||
$(BUILD_DIR)/json_info_files/$(DEVICE_IMG_PREFIX)-$(1).json, \
|
||||
$(BIN_DIR)/$(DEVICE_IMG_PREFIX)-$(1))
|
||||
$(eval $(call Device/Export,$(KDIR)/tmp/$(DEVICE_IMG_PREFIX)-$(1)))
|
||||
$(KDIR)/tmp/$(DEVICE_IMG_PREFIX)-$(1): $$(KDIR_KERNEL_IMAGE) $(2)-images
|
||||
@rm -f $$@
|
||||
@ -640,6 +638,35 @@ define Device/Build/artifact
|
||||
$(BIN_DIR)/$(DEVICE_IMG_PREFIX)-$(1): $(KDIR)/tmp/$(DEVICE_IMG_PREFIX)-$(1)
|
||||
cp $$^ $$@
|
||||
|
||||
$(BUILD_DIR)/json_info_files/$(DEVICE_IMG_PREFIX)-$(1).json: $(BIN_DIR)/$(DEVICE_IMG_PREFIX)-$(1)
|
||||
@mkdir -p $$(shell dirname $$@)
|
||||
DEVICE_ID="$(DEVICE_NAME)" \
|
||||
SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH) \
|
||||
FILE_NAME="$(DEVICE_IMG_PREFIX)-$(1)" \
|
||||
FILE_DIR="$(KDIR)/tmp" \
|
||||
FILE_TYPE="$(1)" \
|
||||
DEVICE_IMG_PREFIX="$(DEVICE_IMG_PREFIX)" \
|
||||
DEVICE_VENDOR="$(DEVICE_VENDOR)" \
|
||||
DEVICE_MODEL="$(DEVICE_MODEL)" \
|
||||
DEVICE_VARIANT="$(DEVICE_VARIANT)" \
|
||||
DEVICE_ALT0_VENDOR="$(DEVICE_ALT0_VENDOR)" \
|
||||
DEVICE_ALT0_MODEL="$(DEVICE_ALT0_MODEL)" \
|
||||
DEVICE_ALT0_VARIANT="$(DEVICE_ALT0_VARIANT)" \
|
||||
DEVICE_ALT1_VENDOR="$(DEVICE_ALT1_VENDOR)" \
|
||||
DEVICE_ALT1_MODEL="$(DEVICE_ALT1_MODEL)" \
|
||||
DEVICE_ALT1_VARIANT="$(DEVICE_ALT1_VARIANT)" \
|
||||
DEVICE_ALT2_VENDOR="$(DEVICE_ALT2_VENDOR)" \
|
||||
DEVICE_ALT2_MODEL="$(DEVICE_ALT2_MODEL)" \
|
||||
DEVICE_ALT2_VARIANT="$(DEVICE_ALT2_VARIANT)" \
|
||||
DEVICE_TITLE="$(DEVICE_TITLE)" \
|
||||
DEVICE_PACKAGES="$(DEVICE_PACKAGES)" \
|
||||
TARGET="$(BOARD)" \
|
||||
SUBTARGET="$(if $(SUBTARGET),$(SUBTARGET),generic)" \
|
||||
VERSION_NUMBER="$(VERSION_NUMBER)" \
|
||||
VERSION_CODE="$(VERSION_CODE)" \
|
||||
SUPPORTED_DEVICES="$(SUPPORTED_DEVICES)" \
|
||||
$(TOPDIR)/scripts/json_add_image_info.py $$@
|
||||
|
||||
endef
|
||||
|
||||
define Device/Build
|
||||
@ -732,6 +759,7 @@ define BuildImage
|
||||
|
||||
else
|
||||
image_prepare:
|
||||
rm -rf $(KDIR)/tmp
|
||||
mkdir -p $(BIN_DIR) $(KDIR)/tmp
|
||||
endif
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
LINUX_VERSION-5.10 = .108
|
||||
LINUX_KERNEL_HASH-5.10.108 = bf6cc2d6e0918b8f34d1cde2fa39a6ad69c45025425048be1a1dac4a5b3641d8
|
||||
LINUX_VERSION-5.10 = .161
|
||||
LINUX_KERNEL_HASH-5.10.161 = 7aaaf6d0bcd8a2cfa14ad75f02ca62bb2de08aad3bee3eff198de49ea5254079
|
||||
|
@ -1,2 +1,2 @@
|
||||
LINUX_VERSION-5.15 = .79
|
||||
LINUX_KERNEL_HASH-5.15.79 = cba39031dbc0eed0785b8afdc8c58cf23df83e47001b2354fa44486ae699c154
|
||||
LINUX_VERSION-5.15 = .86
|
||||
LINUX_KERNEL_HASH-5.15.86 = 80fcd9efa443502de9e2750f6dfb59e8de43a5d87a6d2be09dca748d79b5f2ee
|
||||
|
@ -10,7 +10,7 @@ ifneq ($(DUMP),1)
|
||||
endif
|
||||
|
||||
KERNEL_FILE_DEPENDS=$(GENERIC_BACKPORT_DIR) $(GENERIC_PATCH_DIR) $(GENERIC_HACK_DIR) $(PATCH_DIR) $(GENERIC_FILES_DIR) $(FILES_DIR)
|
||||
STAMP_PREPARED=$(LINUX_DIR)/.prepared$(if $(QUILT)$(DUMP),,_$(shell $(call find_md5,$(KERNEL_FILE_DEPENDS),)))
|
||||
STAMP_PREPARED=$(LINUX_DIR)/.prepared$(if $(QUILT)$(DUMP),,_$(shell $(call $(if $(CONFIG_AUTOREMOVE),find_md5_reproducible,find_md5),$(KERNEL_FILE_DEPENDS),)))
|
||||
STAMP_CONFIGURED:=$(LINUX_DIR)/.configured
|
||||
include $(INCLUDE_DIR)/download.mk
|
||||
include $(INCLUDE_DIR)/quilt.mk
|
||||
@ -132,6 +132,7 @@ define BuildKernel
|
||||
$(LINUX_DIR)/.modules: export STAGING_PREFIX=$$(STAGING_DIR_HOST)
|
||||
$(LINUX_DIR)/.modules: export PKG_CONFIG_PATH=$$(STAGING_DIR_HOST)/lib/pkgconfig
|
||||
$(LINUX_DIR)/.modules: export PKG_CONFIG_LIBDIR=$$(STAGING_DIR_HOST)/lib/pkgconfig
|
||||
$(LINUX_DIR)/.modules: export FAIL_ON_UNCONFIGURED=1
|
||||
$(LINUX_DIR)/.modules: $(STAMP_CONFIGURED) $(LINUX_DIR)/.config FORCE
|
||||
$(Kernel/CompileModules)
|
||||
touch $$@
|
||||
@ -161,7 +162,6 @@ define BuildKernel
|
||||
$(LINUX_RECONF_CMD) > $(LINUX_DIR)/.config
|
||||
$(_SINGLE)$(KERNEL_MAKE) \
|
||||
$(if $(findstring Darwin,$(HOST_OS)), \
|
||||
HOST_LOADLIBES="-L$(STAGING_DIR_HOST)/lib -lncurses" \
|
||||
HOSTLDLIBS_mconf="-L$(STAGING_DIR_HOST)/lib -lncurses" \
|
||||
filechk_conf_cfg=" :" \
|
||||
) \
|
||||
|
@ -117,7 +117,7 @@ define Kernel/Configure/Default
|
||||
cp $(LINUX_DIR)/.config.set $(LINUX_DIR)/.config; \
|
||||
cp $(LINUX_DIR)/.config.set $(LINUX_DIR)/.config.prev; \
|
||||
}
|
||||
$(_SINGLE) [ -d $(LINUX_DIR)/user_headers ] || $(KERNEL_MAKE) INSTALL_HDR_PATH=$(LINUX_DIR)/user_headers headers_install
|
||||
$(_SINGLE) [ -d $(LINUX_DIR)/user_headers ] || $(KERNEL_MAKE) $(if $(findstring uml,$(BOARD)),ARCH=$(ARCH)) INSTALL_HDR_PATH=$(LINUX_DIR)/user_headers headers_install
|
||||
grep '=[ym]' $(LINUX_DIR)/.config.set | LC_ALL=C sort | $(MKHASH) md5 > $(LINUX_DIR)/.vermagic
|
||||
endef
|
||||
|
||||
@ -129,6 +129,10 @@ define Kernel/CompileModules/Default
|
||||
rm -f $(LINUX_DIR)/vmlinux $(LINUX_DIR)/System.map
|
||||
+$(KERNEL_MAKE) olddefconfig
|
||||
+$(KERNEL_MAKE) $(if $(KERNELNAME),$(KERNELNAME),all) modules
|
||||
# If .config did not change, use the previous timestamp to avoid package rebuilds
|
||||
cmp -s $(LINUX_DIR)/.config $(LINUX_DIR)/.config.modules.save && \
|
||||
mv $(LINUX_DIR)/.config.modules.save $(LINUX_DIR)/.config; \
|
||||
$(CP) $(LINUX_DIR)/.config $(LINUX_DIR)/.config.modules.save
|
||||
endef
|
||||
|
||||
OBJCOPY_STRIP = -R .reginfo -R .notes -R .note -R .comment -R .mdebug -R .note.gnu.build-id
|
||||
@ -165,19 +169,20 @@ ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
|
||||
define Kernel/CompileImage/Initramfs
|
||||
$(call Kernel/Configure/Initramfs)
|
||||
$(CP) $(GENERIC_PLATFORM_DIR)/other-files/init $(TARGET_DIR)/init
|
||||
$(if $(SOURCE_DATE_EPOCH),touch -hcd "@$(SOURCE_DATE_EPOCH)" $(TARGET_DIR)/init)
|
||||
$(if $(SOURCE_DATE_EPOCH),touch -hcd "@$(SOURCE_DATE_EPOCH)" $(TARGET_DIR) $(TARGET_DIR)/init)
|
||||
rm -rf $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/usr/initramfs_data.cpio*
|
||||
ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS_SEPARATE),y)
|
||||
ifeq ($(CONFIG_EXTERNAL_CPIO),y)
|
||||
ifneq ($(qstrip $(CONFIG_EXTERNAL_CPIO)),)
|
||||
$(CP) $(CONFIG_EXTERNAL_CPIO) $(KERNEL_BUILD_DIR)/initrd.cpio
|
||||
else
|
||||
( cd $(TARGET_DIR); find . | $(STAGING_DIR_HOST)/bin/cpio -o -H newc -R 0:0 > $(KERNEL_BUILD_DIR)/initrd.cpio )
|
||||
( cd $(TARGET_DIR); find . | LC_ALL=C sort | $(STAGING_DIR_HOST)/bin/cpio --reproducible -o -H newc -R 0:0 > $(KERNEL_BUILD_DIR)/initrd.cpio )
|
||||
endif
|
||||
$(if $(SOURCE_DATE_EPOCH),touch -hcd "@$(SOURCE_DATE_EPOCH)" $(KERNEL_BUILD_DIR)/initrd.cpio)
|
||||
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_BZIP2),bzip2 -9 -c < $(KERNEL_BUILD_DIR)/initrd.cpio > $(KERNEL_BUILD_DIR)/initrd.cpio.bzip2)
|
||||
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_GZIP),gzip -f -S .gzip -9n $(KERNEL_BUILD_DIR)/initrd.cpio)
|
||||
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_GZIP),gzip -n -f -S .gzip -9n $(KERNEL_BUILD_DIR)/initrd.cpio)
|
||||
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZMA),$(STAGING_DIR_HOST)/bin/lzma e -lc1 -lp2 -pb2 $(KERNEL_BUILD_DIR)/initrd.cpio $(KERNEL_BUILD_DIR)/initrd.cpio.lzma)
|
||||
# ? $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZO),)
|
||||
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_XZ),$(STAGING_DIR_HOST)/bin/xz -9 -fz --check=crc32 $(KERNEL_BUILD_DIR)/initrd.cpio)
|
||||
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_XZ),$(STAGING_DIR_HOST)/bin/xz -T$(if $(filter 1,$(NPROC)),2,0) -9 -fz --check=crc32 $(KERNEL_BUILD_DIR)/initrd.cpio)
|
||||
# ? $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZ4),)
|
||||
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_ZSTD),$(STAGING_DIR_HOST)/bin/zstd -T0 -f -o $(KERNEL_BUILD_DIR)/initrd.cpio.zstd $(KERNEL_BUILD_DIR)/initrd.cpio)
|
||||
endif
|
||||
|
@ -101,7 +101,7 @@ endif
|
||||
KERNEL_MAKE = $(MAKE) $(KERNEL_MAKEOPTS)
|
||||
|
||||
KERNEL_MAKE_FLAGS = \
|
||||
KCFLAGS="$(call iremap,$(BUILD_DIR),$(notdir $(BUILD_DIR)))" \
|
||||
KCFLAGS="$(call iremap,$(BUILD_DIR),$(notdir $(BUILD_DIR))) $(filter-out -fno-plt,$(call qstrip,$(CONFIG_EXTRA_OPTIMIZATION))) $(call qstrip,$(CONFIG_KERNEL_CFLAGS))" \
|
||||
HOSTCFLAGS="$(HOST_CFLAGS) -Wall -Wmissing-prototypes -Wstrict-prototypes" \
|
||||
CROSS_COMPILE="$(KERNEL_CROSS)" \
|
||||
ARCH="$(LINUX_KARCH)" \
|
||||
@ -110,8 +110,7 @@ KERNEL_MAKE_FLAGS = \
|
||||
KBUILD_BUILD_HOST="$(call qstrip,$(CONFIG_KERNEL_BUILD_DOMAIN))" \
|
||||
KBUILD_BUILD_TIMESTAMP="$(KBUILD_BUILD_TIMESTAMP)" \
|
||||
KBUILD_BUILD_VERSION="0" \
|
||||
HOST_LOADLIBES="-L$(STAGING_DIR_HOST)/lib" \
|
||||
KBUILD_HOSTLDLIBS="-L$(STAGING_DIR_HOST)/lib" \
|
||||
KBUILD_HOSTLDFLAGS="-L$(STAGING_DIR_HOST)/lib" \
|
||||
CONFIG_SHELL="$(BASH)" \
|
||||
$(if $(findstring c,$(OPENWRT_VERBOSE)),V=1,V='') \
|
||||
$(if $(PKG_BUILD_ID),LDFLAGS_MODULE=--build-id=0x$(PKG_BUILD_ID)) \
|
||||
@ -126,17 +125,17 @@ ifeq ($(call qstrip,$(CONFIG_EXTERNAL_KERNEL_TREE))$(call qstrip,$(CONFIG_KERNEL
|
||||
KERNELRELEASE=$(LINUX_VERSION)
|
||||
endif
|
||||
|
||||
KERNEL_MAKEOPTS := -C $(LINUX_DIR) $(KERNEL_MAKE_FLAGS)
|
||||
ifneq ($(HOST_OS),Linux)
|
||||
KERNEL_MAKE_FLAGS += CONFIG_STACK_VALIDATION=
|
||||
export SKIP_STACK_VALIDATION:=1
|
||||
endif
|
||||
|
||||
KERNEL_MAKEOPTS = -C $(LINUX_DIR) $(KERNEL_MAKE_FLAGS)
|
||||
|
||||
ifdef CONFIG_USE_SPARSE
|
||||
KERNEL_MAKEOPTS += C=1 CHECK=$(STAGING_DIR_HOST)/bin/sparse
|
||||
endif
|
||||
|
||||
ifneq ($(HOST_OS),Linux)
|
||||
KERNEL_MAKEOPTS += CONFIG_STACK_VALIDATION=
|
||||
export SKIP_STACK_VALIDATION:=1
|
||||
endif
|
||||
|
||||
PKG_EXTMOD_SUBDIRS ?= .
|
||||
|
||||
PKG_SYMVERS_DIR = $(KERNEL_BUILD_DIR)/symvers
|
||||
|
@ -48,9 +48,6 @@ $(eval $(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_MATCH_COMMENT, $(P_XT)xt_comme
|
||||
$(eval $(call nf_add,IPT_CLUSTER,CONFIG_NETFILTER_XT_MATCH_CLUSTER, $(P_XT)xt_cluster))
|
||||
|
||||
$(eval $(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_TARGET_LOG, $(P_XT)xt_LOG))
|
||||
$(eval $(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_TARGET_LOG, $(P_XT)nf_log_common, lt 5.13))
|
||||
$(eval $(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_TARGET_LOG, $(P_V4)nf_log_ipv4, lt 5.13))
|
||||
$(eval $(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_TARGET_LOG, $(P_XT)nf_log_syslog, ge 5.13))
|
||||
$(eval $(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_TARGET_TCPMSS, $(P_XT)xt_TCPMSS))
|
||||
$(eval $(call nf_add,IPT_CORE,CONFIG_IP_NF_TARGET_REJECT, $(P_V4)ipt_REJECT))
|
||||
$(eval $(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_MATCH_TIME, $(P_XT)xt_time))
|
||||
@ -173,11 +170,21 @@ $(eval $(call nf_add,IPT_IPV6_EXTRA,CONFIG_IP6_NF_MATCH_OPTS, $(P_V6)ip6t_hbh))
|
||||
$(eval $(call nf_add,IPT_IPV6_EXTRA,CONFIG_IP6_NF_MATCH_FRAG, $(P_V6)ip6t_frag))
|
||||
$(eval $(call nf_add,IPT_IPV6_EXTRA,CONFIG_IP6_NF_MATCH_RT, $(P_V6)ip6t_rt))
|
||||
|
||||
# log
|
||||
|
||||
$(eval $(call nf_add,NF_LOG,CONFIG_NF_LOG_COMMON, $(P_XT)nf_log_common, lt 5.13))
|
||||
$(eval $(call nf_add,NF_LOG,CONFIG_NF_LOG_IPV4, $(P_V4)nf_log_ipv4, lt 5.13))
|
||||
$(eval $(call nf_add,NF_LOG,CONFIG_NF_LOG_SYSLOG, $(P_XT)nf_log_syslog, ge 5.13))
|
||||
# $(eval $(if $(NF_KMOD),$(call nf_add,NF_LOG6,CONFIG_NF_LOG_IPV6, $(P_V6)nf_log_ipv6,lt 5.13),))
|
||||
|
||||
# nat
|
||||
|
||||
# kernel only
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_NAT,CONFIG_NF_NAT, $(P_XT)nf_nat),))
|
||||
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_NAT,CONFIG_NF_NAT_IPV4, $(P_V4)nf_nat_ipv4, lt 5.1)))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_NAT6,CONFIG_NF_NAT_IPV6, $(P_V6)nf_nat_ipv6, lt 5.1)))
|
||||
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_NAT,CONFIG_NETFILTER_XT_NAT, $(P_XT)xt_nat),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_NAT,CONFIG_IP_NF_NAT, $(P_V4)iptable_nat),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_NAT6,CONFIG_IP6_NF_NAT, $(P_V6)ip6table_nat),))
|
||||
@ -207,6 +214,8 @@ $(eval $(call nf_add,NF_NATHELPER,CONFIG_NF_NAT_FTP, $(P_XT)nf_nat_ftp))
|
||||
$(eval $(call nf_add,NF_NATHELPER_EXTRA,CONFIG_NF_CONNTRACK_BROADCAST, $(P_XT)nf_conntrack_broadcast))
|
||||
$(eval $(call nf_add,NF_NATHELPER_EXTRA,CONFIG_NF_CONNTRACK_AMANDA, $(P_XT)nf_conntrack_amanda))
|
||||
$(eval $(call nf_add,NF_NATHELPER_EXTRA,CONFIG_NF_NAT_AMANDA, $(P_XT)nf_nat_amanda))
|
||||
$(eval $(call nf_add,NF_NATHELPER_EXTRA,CONFIG_NF_CT_PROTO_GRE, $(P_XT)nf_conntrack_proto_gre, lt 5.1))
|
||||
$(eval $(call nf_add,NF_NATHELPER_EXTRA,CONFIG_NF_NAT_PROTO_GRE, $(P_V4)nf_nat_proto_gre, lt 5.0))
|
||||
$(eval $(call nf_add,NF_NATHELPER_EXTRA,CONFIG_NF_CONNTRACK_H323, $(P_XT)nf_conntrack_h323))
|
||||
$(eval $(call nf_add,NF_NATHELPER_EXTRA,CONFIG_NF_NAT_H323, $(P_V4)nf_nat_h323))
|
||||
$(eval $(call nf_add,NF_NATHELPER_EXTRA,CONFIG_NF_CONNTRACK_PPTP, $(P_XT)nf_conntrack_pptp))
|
||||
@ -235,14 +244,15 @@ $(eval $(call nf_add,IPT_NFQUEUE,CONFIG_NETFILTER_XT_TARGET_NFQUEUE, $(P_XT)xt_N
|
||||
|
||||
$(eval $(call nf_add,IPT_DEBUG,CONFIG_NETFILTER_XT_TARGET_TRACE, $(P_XT)xt_TRACE))
|
||||
|
||||
# tproxy
|
||||
# socket
|
||||
$(eval $(call nf_add,NF_SOCKET,CONFIG_NF_SOCKET_IPV4, $(P_V4)nf_socket_ipv4))
|
||||
$(eval $(call nf_add,NF_SOCKET,CONFIG_NF_SOCKET_IPV6, $(P_V6)nf_socket_ipv6))
|
||||
$(eval $(call nf_add,IPT_SOCKET,CONFIG_NETFILTER_XT_MATCH_SOCKET, $(P_XT)xt_socket))
|
||||
|
||||
$(eval $(call nf_add,IPT_TPROXY,CONFIG_NETFILTER_XT_MATCH_SOCKET, $(P_XT)xt_socket))
|
||||
$(eval $(call nf_add,IPT_TPROXY,CONFIG_NF_SOCKET_IPV4, $(P_V4)nf_socket_ipv4))
|
||||
$(eval $(call nf_add,IPT_TPROXY,CONFIG_NF_SOCKET_IPV6, $(P_V6)nf_socket_ipv6))
|
||||
# tproxy
|
||||
$(eval $(call nf_add,NF_TPROXY,CONFIG_NF_TPROXY_IPV4, $(P_V4)nf_tproxy_ipv4))
|
||||
$(eval $(call nf_add,NF_TPROXY,CONFIG_NF_TPROXY_IPV6, $(P_V6)nf_tproxy_ipv6))
|
||||
$(eval $(call nf_add,IPT_TPROXY,CONFIG_NETFILTER_XT_TARGET_TPROXY, $(P_XT)xt_TPROXY))
|
||||
$(eval $(call nf_add,IPT_TPROXY,CONFIG_NF_TPROXY_IPV4, $(P_V4)nf_tproxy_ipv4))
|
||||
$(eval $(call nf_add,IPT_TPROXY,CONFIG_NF_TPROXY_IPV6, $(P_V6)nf_tproxy_ipv6))
|
||||
|
||||
# led
|
||||
$(eval $(call nf_add,IPT_LED,CONFIG_NETFILTER_XT_TARGET_LED, $(P_XT)xt_LED))
|
||||
@ -327,6 +337,7 @@ $(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_REJECT_INET, $(P_XT)nft
|
||||
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_BRIDGE,CONFIG_NFT_BRIDGE_META, $(P_EBT)nft_meta_bridge),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_BRIDGE,CONFIG_NFT_BRIDGE_REJECT, $(P_EBT)nft_reject_bridge),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_BRIDGE,CONFIG_NF_CONNTRACK_BRIDGE, $(P_EBT)nf_conntrack_bridge),))
|
||||
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT,CONFIG_NFT_NAT, $(P_XT)nft_nat),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT,CONFIG_NFT_NAT, $(P_XT)nft_chain_nat),))
|
||||
@ -344,6 +355,14 @@ $(eval $(if $(NF_KMOD),$(call nf_add,NFT_FIB,CONFIG_NFT_FIB_IPV6, $(P_V6)nft_fib
|
||||
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_QUEUE,CONFIG_NFT_QUEUE, $(P_XT)nft_queue),))
|
||||
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_SOCKET,CONFIG_NFT_SOCKET, $(P_XT)nft_socket),))
|
||||
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_TPROXY,CONFIG_NFT_TPROXY, $(P_XT)nft_tproxy),))
|
||||
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_COMPAT,CONFIG_NFT_COMPAT, $(P_XT)nft_compat),))
|
||||
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_XFRM,CONFIG_NFT_XFRM, $(P_XT)nft_xfrm),))
|
||||
|
||||
# userland only
|
||||
IPT_BUILTIN += $(NF_IPT-y) $(NF_IPT-m)
|
||||
IPT_BUILTIN += $(IPT_CORE-y) $(IPT_CORE-m)
|
||||
|
@ -10,27 +10,38 @@ ifeq ($(CONFIG_BUILD_NLS),y)
|
||||
INTL_PREFIX:=$(STAGING_DIR)/usr/lib/libintl-full
|
||||
INTL_FULL:=1
|
||||
|
||||
# iconv stub
|
||||
CMAKE_OPTIONS += -DCMAKE_PREFIX_PATH="$(ICONV_PREFIX);$(INTL_PREFIX)"
|
||||
else
|
||||
ICONV_PREFIX:=$(STAGING_DIR)/usr/lib/libiconv-stub
|
||||
ICONV_PREFIX:=
|
||||
ICONV_FULL:=
|
||||
|
||||
INTL_PREFIX:=$(STAGING_DIR)/usr/lib/libintl-stub
|
||||
INTL_PREFIX:=
|
||||
INTL_FULL:=
|
||||
endif
|
||||
|
||||
PKG_CONFIG_DEPENDS += CONFIG_BUILD_NLS
|
||||
PKG_BUILD_DEPENDS += !BUILD_NLS:libiconv !BUILD_NLS:gettext
|
||||
|
||||
ICONV_DEPENDS:=+BUILD_NLS:libiconv-full
|
||||
ICONV_CFLAGS:=-I$(ICONV_PREFIX)/include
|
||||
ICONV_CPPFLAGS:=-I$(ICONV_PREFIX)/include
|
||||
ICONV_LDFLAGS:=-L$(ICONV_PREFIX)/lib -Wl,-rpath-link=$(ICONV_PREFIX)/lib
|
||||
ifeq ($(CONFIG_BUILD_NLS),y)
|
||||
ICONV_CFLAGS:=-I$(ICONV_PREFIX)/include
|
||||
ICONV_CPPFLAGS:=-I$(ICONV_PREFIX)/include
|
||||
ICONV_LDFLAGS:=-L$(ICONV_PREFIX)/lib -Wl,-rpath-link=$(ICONV_PREFIX)/lib
|
||||
else
|
||||
ICONV_CFLAGS:=
|
||||
ICONV_CPPFLAGS:=
|
||||
ICONV_LDFLAGS:=
|
||||
endif
|
||||
|
||||
INTL_DEPENDS:=+BUILD_NLS:libintl-full
|
||||
INTL_CFLAGS:=-I$(INTL_PREFIX)/include
|
||||
INTL_CPPFLAGS:=-I$(INTL_PREFIX)/include
|
||||
INTL_LDFLAGS:=-L$(INTL_PREFIX)/lib -Wl,-rpath-link=$(INTL_PREFIX)/lib
|
||||
ifeq ($(CONFIG_BUILD_NLS),y)
|
||||
INTL_CFLAGS:=-I$(INTL_PREFIX)/include
|
||||
INTL_CPPFLAGS:=-I$(INTL_PREFIX)/include
|
||||
INTL_LDFLAGS:=-L$(INTL_PREFIX)/lib -Wl,-rpath-link=$(INTL_PREFIX)/lib
|
||||
else
|
||||
INTL_CFLAGS:=
|
||||
INTL_CPPFLAGS:=
|
||||
INTL_LDFLAGS:=
|
||||
endif
|
||||
|
||||
TARGET_CFLAGS += $(ICONV_CFLAGS) $(INTL_CFLAGS)
|
||||
TARGET_CPPFLAGS += $(ICONV_CPPFLAGS) $(INTL_CPPFLAGS)
|
||||
|
@ -4,7 +4,8 @@
|
||||
|
||||
ifeq ($(DUMP),)
|
||||
define BuildTarget/bin
|
||||
ifeq ($(if $(VARIANT),$(BUILD_VARIANT)),$(VARIANT))
|
||||
TARGET_VARIANT=$(if $(ALL_VARIANTS),$(if $(VARIANT),$(filter-out *,$(VARIANT)),$(firstword $(ALL_VARIANTS))))
|
||||
ifeq ($(if $(TARGET_VARIANT),$(BUILD_VARIANT)),$(TARGET_VARIANT))
|
||||
ifdef Package/$(1)/install
|
||||
ifneq ($(CONFIG_PACKAGE_$(1))$(DEVELOPER),)
|
||||
$(_pkg_target)compile: $(PKG_BUILD_DIR)/.pkgdir/$(1).installed
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# Copyright (C) 2006-2020 OpenWrt.org
|
||||
|
||||
PKG_DEFAULT_DEPENDS = +libc +USE_GLIBC:librt +USE_GLIBC:libpthread
|
||||
PKG_DEFAULT_DEPENDS = +libc
|
||||
|
||||
ifneq ($(PKG_NAME),toolchain)
|
||||
PKG_FIXUP_DEPENDS = $(if $(filter kmod-%,$(1)),$(2),$(PKG_DEFAULT_DEPENDS) $(filter-out $(PKG_DEFAULT_DEPENDS),$(2)))
|
||||
|
@ -105,7 +105,8 @@ ifeq ($(DUMP),)
|
||||
IDIR_$(1):=$(PKG_BUILD_DIR)/ipkg-$(PKGARCH)/$(1)
|
||||
KEEP_$(1):=$(strip $(call Package/$(1)/conffiles))
|
||||
|
||||
ifeq ($(BUILD_VARIANT),$$(if $$(VARIANT),$$(VARIANT),$(BUILD_VARIANT)))
|
||||
TARGET_VARIANT:=$$(if $(ALL_VARIANTS),$$(if $$(VARIANT),$$(filter-out *,$$(VARIANT)),$(firstword $(ALL_VARIANTS))))
|
||||
ifeq ($(BUILD_VARIANT),$$(if $$(TARGET_VARIANT),$$(TARGET_VARIANT),$(BUILD_VARIANT)))
|
||||
do_install=
|
||||
ifdef Package/$(1)/install
|
||||
do_install=yes
|
||||
@ -263,7 +264,7 @@ $(_endef)
|
||||
endif
|
||||
|
||||
$(INSTALL_DIR) $$(PDIR_$(1))
|
||||
$(FAKEROOT) $(SCRIPT_DIR)/ipkg-build -m "$(FILE_MODES)" $$(IDIR_$(1)) $$(PDIR_$(1))
|
||||
$(FAKEROOT) $(STAGING_DIR_HOST)/bin/bash $(SCRIPT_DIR)/ipkg-build -m "$(FILE_MODES)" $$(IDIR_$(1)) $$(PDIR_$(1))
|
||||
@[ -f $$(IPKG_$(1)) ]
|
||||
|
||||
$(1)-clean:
|
||||
|
@ -13,6 +13,7 @@ PKG_INSTALL_DIR ?= $(PKG_BUILD_DIR)/ipkg-install
|
||||
PKG_BUILD_PARALLEL ?=
|
||||
PKG_USE_MIPS16 ?= 1
|
||||
PKG_IREMAP ?= 1
|
||||
PKG_SKIP_DOWNLOAD=$(USE_SOURCE_DIR)$(USE_GIT_TREE)$(USE_GIT_SRC_CHECKOUT)
|
||||
|
||||
MAKE_J:=$(if $(MAKE_JOBSERVER),$(MAKE_JOBSERVER) $(if $(filter 3.% 4.0 4.1,$(MAKE_VERSION)),-j))
|
||||
|
||||
@ -84,7 +85,7 @@ ifneq ($(PREV_STAMP_PREPARED),)
|
||||
STAMP_PREPARED:=$(PREV_STAMP_PREPARED)
|
||||
CONFIG_AUTOREBUILD:=
|
||||
else
|
||||
STAMP_PREPARED=$(PKG_BUILD_DIR)/.prepared$(if $(QUILT)$(DUMP),,_$(shell $(call find_md5,${CURDIR} $(PKG_FILE_DEPENDS),))_$(call confvar,CONFIG_AUTOREMOVE $(PKG_PREPARED_DEPENDS)))
|
||||
STAMP_PREPARED=$(PKG_BUILD_DIR)/.prepared$(if $(QUILT)$(DUMP),,_$(shell $(call $(if $(CONFIG_AUTOREMOVE),find_md5_reproducible,find_md5),${CURDIR} $(PKG_FILE_DEPENDS),))_$(call confvar,CONFIG_AUTOREMOVE $(PKG_PREPARED_DEPENDS)))
|
||||
endif
|
||||
STAMP_CONFIGURED=$(PKG_BUILD_DIR)/.configured$(if $(DUMP),,_$(call confvar,$(PKG_CONFIG_DEPENDS)))
|
||||
STAMP_CONFIGURED_WILDCARD=$(PKG_BUILD_DIR)/.configured_*
|
||||
@ -183,7 +184,7 @@ define Build/CoreTargets
|
||||
$(call Build/Autoclean)
|
||||
$(call DefaultTargets)
|
||||
|
||||
$(DL_DIR)/$(FILE): FORCE
|
||||
$(call check_download_integrity)
|
||||
|
||||
download:
|
||||
$(foreach hook,$(Hooks/Download),
|
||||
@ -258,13 +259,13 @@ define Build/CoreTargets
|
||||
ifneq ($(CONFIG_AUTOREMOVE),)
|
||||
compile:
|
||||
-touch -r $(PKG_BUILD_DIR)/.built $(PKG_BUILD_DIR)/.autoremove 2>/dev/null >/dev/null
|
||||
$(FIND) $(PKG_BUILD_DIR) -mindepth 1 -maxdepth 1 -not '(' -type f -and -name '.*' -and -size 0 ')' -and -not -name '.pkgdir' | \
|
||||
$(XARGS) rm -rf
|
||||
$(FIND) $(PKG_BUILD_DIR) -mindepth 1 -maxdepth 1 -not '(' -type f -and -name '.*' -and -size 0 ')' -and -not -name '.pkgdir' -print0 | \
|
||||
$(XARGS) -0 rm -rf
|
||||
endif
|
||||
endef
|
||||
|
||||
define Build/DefaultTargets
|
||||
$(if $(USE_SOURCE_DIR)$(USE_GIT_TREE)$(USE_GIT_SRC_CHECKOUT),,$(if $(strip $(PKG_SOURCE_URL)),$(call Download,default)))
|
||||
$(if $(PKG_SKIP_DOWNLOAD),,$(if $(strip $(PKG_SOURCE_URL)),$(call Download,default)))
|
||||
$(if $(DUMP),,$(Build/CoreTargets))
|
||||
|
||||
define Build/DefaultTargets
|
||||
|
@ -53,6 +53,13 @@ $(eval $(call TestHostCommand,ncurses, \
|
||||
Please install ncurses. (Missing libncurses.so or ncurses.h), \
|
||||
echo 'int main(int argc, char **argv) { initscr(); return 0; }' | \
|
||||
gcc -include ncurses.h -x c -o $(TMP_DIR)/a.out - -lncurses))
|
||||
|
||||
$(eval $(call SetupHostCommand,git,Please install Git (git-core) >= 1.7.12.2, \
|
||||
git --exec-path | xargs -I % -- grep -q -- --recursive %/git-submodule, \
|
||||
git submodule --help | grep -- --recursive))
|
||||
|
||||
$(eval $(call SetupHostCommand,rsync,Please install 'rsync', \
|
||||
rsync --version </dev/null))
|
||||
endif # IB
|
||||
|
||||
ifeq ($(HOST_OS),Linux)
|
||||
@ -130,13 +137,21 @@ $(eval $(call SetupHostCommand,getopt, \
|
||||
Please install an extended getopt version that supports --long, \
|
||||
gnugetopt -o t --long test -- --test | grep '^ *--test *--', \
|
||||
getopt -o t --long test -- --test | grep '^ *--test *--', \
|
||||
/usr/local/opt/gnu-getopt/bin/getopt -o t --long test -- --test | grep '^ *--test *--'))
|
||||
/usr/local/opt/gnu-getopt/bin/getopt -o t --long test -- --test | grep '^ *--test *--', \
|
||||
/opt/local/bin/getopt -o t --long test -- --test | grep '^ *--test *--'))
|
||||
|
||||
$(eval $(call SetupHostCommand,realpath,Please install a 'realpath' utility, \
|
||||
grealpath /, \
|
||||
realpath /))
|
||||
|
||||
$(eval $(call SetupHostCommand,stat,Cannot find a file stat utility, \
|
||||
gnustat -c%s $(TOPDIR)/Makefile, \
|
||||
gstat -c%s $(TOPDIR)/Makefile, \
|
||||
stat -c%s $(TOPDIR)/Makefile))
|
||||
|
||||
$(eval $(call SetupHostCommand,gzip,Please install 'gzip', \
|
||||
gzip --version </dev/null))
|
||||
|
||||
$(eval $(call SetupHostCommand,unzip,Please install 'unzip', \
|
||||
unzip 2>&1 | grep zipfile, \
|
||||
unzip))
|
||||
@ -157,44 +172,48 @@ $(eval $(call SetupHostCommand,perl,Please install Perl 5.x, \
|
||||
$(eval $(call CleanupPython2))
|
||||
|
||||
$(eval $(call SetupHostCommand,python,Please install Python >= 3.6, \
|
||||
python3.11 -V 2>&1 | grep 'Python 3', \
|
||||
python3.10 -V 2>&1 | grep 'Python 3', \
|
||||
python3.9 -V 2>&1 | grep 'Python 3', \
|
||||
python3.8 -V 2>&1 | grep 'Python 3', \
|
||||
python3.7 -V 2>&1 | grep 'Python 3', \
|
||||
python3.6 -V 2>&1 | grep 'Python 3', \
|
||||
python3 -V 2>&1 | grep -E 'Python 3\.([6-9]|10)\.?'))
|
||||
python3 -V 2>&1 | grep -E 'Python 3\.([6-9]|[0-9][0-9])\.?'))
|
||||
|
||||
$(eval $(call SetupHostCommand,python3,Please install Python >= 3.6, \
|
||||
python3.11 -V 2>&1 | grep 'Python 3', \
|
||||
python3.10 -V 2>&1 | grep 'Python 3', \
|
||||
python3.9 -V 2>&1 | grep 'Python 3', \
|
||||
python3.8 -V 2>&1 | grep 'Python 3', \
|
||||
python3.7 -V 2>&1 | grep 'Python 3', \
|
||||
python3.6 -V 2>&1 | grep 'Python 3', \
|
||||
python3 -V 2>&1 | grep -E 'Python 3\.([6-9]|10)\.?'))
|
||||
python3 -V 2>&1 | grep -E 'Python 3\.([6-9]|[0-9][0-9])\.?'))
|
||||
|
||||
$(eval $(call TestHostCommand,python3-distutils, \
|
||||
Please install the Python3 distutils module, \
|
||||
$(STAGING_DIR_HOST)/bin/python3 -c 'import distutils'))
|
||||
$(STAGING_DIR_HOST)/bin/python3 -c 'from distutils import util'))
|
||||
|
||||
$(eval $(call SetupHostCommand,git,Please install Git (git-core) >= 1.7.12.2, \
|
||||
git --exec-path | xargs -I % -- grep -q -- --recursive %/git-submodule))
|
||||
$(eval $(call TestHostCommand,python3-stdlib, \
|
||||
Please install the Python3 stdlib module, \
|
||||
$(STAGING_DIR_HOST)/bin/python3 -c 'import ntpath'))
|
||||
|
||||
$(eval $(call SetupHostCommand,file,Please install the 'file' package, \
|
||||
file --version 2>&1 | grep file))
|
||||
|
||||
$(eval $(call SetupHostCommand,rsync,Please install 'rsync', \
|
||||
rsync --version </dev/null))
|
||||
|
||||
$(eval $(call SetupHostCommand,which,Please install 'which', \
|
||||
which which | grep which))
|
||||
/usr/bin/which which, \
|
||||
/bin/which which, \
|
||||
which which))
|
||||
|
||||
$(STAGING_DIR_HOST)/bin/mkhash: $(SCRIPT_DIR)/mkhash.c
|
||||
mkdir -p $(dir $@)
|
||||
$(CC) -O2 -I$(TOPDIR)/tools/include -o $@ $<
|
||||
|
||||
prereq: $(STAGING_DIR_HOST)/bin/mkhash
|
||||
$(STAGING_DIR_HOST)/bin/xxd: $(SCRIPT_DIR)/xxdi.pl
|
||||
$(LN) $< $@
|
||||
|
||||
prereq: $(STAGING_DIR_HOST)/bin/mkhash $(STAGING_DIR_HOST)/bin/xxd
|
||||
|
||||
# Install ldconfig stub
|
||||
$(eval $(call TestHostCommand,ldconfig-stub,Failed to install stub, \
|
||||
touch $(STAGING_DIR_HOST)/bin/ldconfig && \
|
||||
chmod +x $(STAGING_DIR_HOST)/bin/ldconfig))
|
||||
$(LN) $(firstword $(wildcard /bin/true /usr/bin/true)) $(STAGING_DIR_HOST)/bin/ldconfig))
|
||||
|
@ -49,7 +49,7 @@ endef
|
||||
|
||||
define RequireCommand
|
||||
define Require/$(1)
|
||||
which $(1)
|
||||
command -v $(1)
|
||||
endef
|
||||
|
||||
$$(eval $$(call Require,$(1),$(2)))
|
||||
@ -103,7 +103,7 @@ define SetupHostCommand
|
||||
$(call QuoteHostCommand,$(11)) $(call QuoteHostCommand,$(12)); do \
|
||||
if [ -n "$$$$$$$$cmd" ]; then \
|
||||
bin="$$$$$$$$(PATH="$(subst $(space),:,$(filter-out $(STAGING_DIR_HOST)/%,$(subst :,$(space),$(PATH))))" \
|
||||
which "$$$$$$$${cmd%% *}")"; \
|
||||
command -v "$$$$$$$${cmd%% *}")"; \
|
||||
if [ -x "$$$$$$$$bin" ] && eval "$$$$$$$$cmd" >/dev/null 2>/dev/null; then \
|
||||
mkdir -p "$(STAGING_DIR_HOST)/bin"; \
|
||||
ln -sf "$$$$$$$$bin" "$(STAGING_DIR_HOST)/bin/$(strip $(1))"; \
|
||||
|
@ -116,7 +116,7 @@ define Quilt/RefreshDir
|
||||
endef
|
||||
|
||||
define Quilt/Refresh/Host
|
||||
$(call Quilt/RefreshDir,$(HOST_BUILD_DIR),$(PATCH_DIR))
|
||||
$(call Quilt/RefreshDir,$(HOST_BUILD_DIR),$(HOST_PATCH_DIR))
|
||||
endef
|
||||
|
||||
define Quilt/Refresh/Package
|
||||
|
@ -72,7 +72,7 @@ endif
|
||||
|
||||
$(FILELIST): $(OVERRIDELIST)
|
||||
rm -f $(TMP_DIR)/info/.files-$(SCAN_TARGET)-*
|
||||
find -L $(SCAN_DIR) $(SCAN_EXTRA) -mindepth 1 $(if $(SCAN_DEPTH),-maxdepth $(SCAN_DEPTH)) -name Makefile | xargs grep -aHE 'call $(GREP_STRING)' | sed -e 's#^$(SCAN_DIR)/##' -e 's#/Makefile:.*##' | uniq | awk -v of=$(OVERRIDELIST) -f include/scan.awk > $@
|
||||
find -L $(SCAN_DIR) -mindepth 1 $(if $(SCAN_DEPTH),-maxdepth $(SCAN_DEPTH)) $(SCAN_EXTRA) -name Makefile | xargs grep -aHE 'call $(GREP_STRING)' | sed -e 's#^$(SCAN_DIR)/##' -e 's#/Makefile:.*##' | uniq | awk -v of=$(OVERRIDELIST) -f include/scan.awk > $@
|
||||
|
||||
$(TMP_DIR)/info/.files-$(SCAN_TARGET).mk: $(FILELIST)
|
||||
( \
|
||||
|
@ -27,14 +27,16 @@ lastdir=$(word $(words $(subst /, ,$(1))),$(subst /, ,$(1)))
|
||||
diralias=$(if $(findstring $(1),$(call lastdir,$(1))),,$(call lastdir,$(1)))
|
||||
|
||||
subdir_make_opts = \
|
||||
-r -C $(1) \
|
||||
$(if $(SUBDIR_MAKE_DEBUG),-d) -r -C $(1) \
|
||||
BUILD_SUBDIR="$(1)" \
|
||||
BUILD_VARIANT="$(4)"
|
||||
BUILD_VARIANT="$(4)" \
|
||||
ALL_VARIANTS="$(5)"
|
||||
|
||||
# 1: subdir
|
||||
# 2: target
|
||||
# 3: build type
|
||||
# 4: build variant
|
||||
# 5: all variants
|
||||
log_make = \
|
||||
$(if $(call debug,$(1),v),,@)+ \
|
||||
$(if $(BUILD_LOG), \
|
||||
@ -62,15 +64,15 @@ define subdir
|
||||
$(foreach target,$(SUBTARGETS) $($(1)/subtargets),
|
||||
$(foreach btype,$(buildtypes-$(bd)),
|
||||
$(call warn_eval,$(1)/$(bd),t,T,$(1)/$(bd)/$(btype)/$(target): $(if $(NO_DEPS)$(QUILT),,$($(1)/$(bd)/$(btype)/$(target)) $(call $(1)//$(btype)/$(target),$(1)/$(bd)/$(btype))))
|
||||
$(call log_make,$(1)/$(bd),$(target),$(btype),$(filter-out __default,$(variant))) \
|
||||
$(call log_make,$(1)/$(bd),$(target),$(btype),$(filter-out __default,$(variant)),$($(1)/$(bd)/variants)) \
|
||||
|| $(call ERROR,$(2), ERROR: $(1)/$(bd) [$(btype)] failed to build.,$(findstring $(bd),$($(1)/builddirs-ignore-$(btype)-$(target))))
|
||||
$(if $(call diralias,$(bd)),$(call warn_eval,$(1)/$(bd),l,T,$(1)/$(call diralias,$(bd))/$(btype)/$(target): $(1)/$(bd)/$(btype)/$(target)))
|
||||
)
|
||||
$(call warn_eval,$(1)/$(bd),t,T,$(1)/$(bd)/$(target): $(if $(NO_DEPS)$(QUILT),,$($(1)/$(bd)/$(target)) $(call $(1)//$(target),$(1)/$(bd))))
|
||||
$(foreach variant,$(if $(BUILD_VARIANT),$(BUILD_VARIANT),$(if $(strip $($(1)/$(bd)/variants)),$($(1)/$(bd)/variants),$(if $($(1)/$(bd)/default-variant),$($(1)/$(bd)/default-variant),__default))),
|
||||
$(foreach variant,$(filter-out *,$(if $(BUILD_VARIANT),$(BUILD_VARIANT),$(if $(strip $($(1)/$(bd)/variants)),$($(1)/$(bd)/variants),$(if $($(1)/$(bd)/default-variant),$($(1)/$(bd)/default-variant),__default)))),
|
||||
$(if $(BUILD_LOG),@mkdir -p $(BUILD_LOG_DIR)/$(1)/$(bd)/$(filter-out __default,$(variant)))
|
||||
$(if $($(1)/autoremove),$(call rebuild_check,$(1)/$(bd),$(target),,$(filter-out __default,$(variant))))
|
||||
$(call log_make,$(1)/$(bd),$(target),,$(filter-out __default,$(variant))) \
|
||||
$(if $($(1)/autoremove),$(call rebuild_check,$(1)/$(bd),$(target),,$(filter-out __default,$(variant)),$($(1)/$(bd)/variants)))
|
||||
$(call log_make,$(1)/$(bd),$(target),,$(filter-out __default,$(variant)),$($(1)/$(bd)/variants)) \
|
||||
|| $(call ERROR,$(1), ERROR: $(1)/$(bd) failed to build$(if $(filter-out __default,$(variant)), (build variant: $(variant))).,$(findstring $(bd),$($(1)/builddirs-ignore-$(target))))
|
||||
)
|
||||
$(if $(PREREQ_ONLY)$(DUMP_TARGET_DB),,
|
||||
|
@ -12,6 +12,7 @@ DEVICE_TYPE?=router
|
||||
# Default packages - the really basic set
|
||||
DEFAULT_PACKAGES:=\
|
||||
base-files \
|
||||
ca-bundle \
|
||||
dropbear \
|
||||
fstools \
|
||||
libc \
|
||||
@ -23,7 +24,8 @@ DEFAULT_PACKAGES:=\
|
||||
opkg \
|
||||
uci \
|
||||
uclient-fetch \
|
||||
urandom-seed
|
||||
urandom-seed \
|
||||
urngd
|
||||
|
||||
ifneq ($(CONFIG_SELINUX),)
|
||||
DEFAULT_PACKAGES+=busybox-selinux procd-selinux
|
||||
@ -31,6 +33,16 @@ else
|
||||
DEFAULT_PACKAGES+=busybox procd
|
||||
endif
|
||||
|
||||
# include ujail on systems with enough storage
|
||||
ifeq ($(CONFIG_SMALL_FLASH),)
|
||||
DEFAULT_PACKAGES+=procd-ujail
|
||||
endif
|
||||
|
||||
# include seccomp ld-preload hooks if kernel supports it
|
||||
ifneq ($(CONFIG_SECCOMP),)
|
||||
DEFAULT_PACKAGES+=procd-seccomp
|
||||
endif
|
||||
|
||||
# For the basic set
|
||||
DEFAULT_PACKAGES.basic:=
|
||||
# For nas targets
|
||||
@ -41,16 +53,12 @@ DEFAULT_PACKAGES.nas:=\
|
||||
mdadm
|
||||
# For router targets
|
||||
DEFAULT_PACKAGES.router:=\
|
||||
dnsmasq-full \
|
||||
firewall \
|
||||
iptables \
|
||||
ppp \
|
||||
ppp-mod-pppoe \
|
||||
luci-newapi block-mount coremark kmod-nf-nathelper kmod-nf-nathelper-extra kmod-ipt-raw \
|
||||
default-settings luci luci-app-ddns luci-app-upnp luci-app-autoreboot \
|
||||
luci-app-filetransfer luci-app-vsftpd luci-app-ssr-plus luci-app-unblockmusic luci-app-arpbind \
|
||||
luci-app-vlmcsd luci-app-wol luci-app-ramfree \
|
||||
luci-app-turboacc luci-app-nlbwmon luci-app-accesscontrol ddns-scripts_aliyun ddns-scripts_dnspod
|
||||
dnsmasq-full firewall iptables ppp ppp-mod-pppoe \
|
||||
block-mount coremark kmod-nf-nathelper kmod-nf-nathelper-extra kmod-ipt-raw kmod-tun \
|
||||
iptables-mod-tproxy iptables-mod-extra ipset ip-full default-settings luci luci-newapi \
|
||||
ddns-scripts_aliyun ddns-scripts_dnspod luci-app-ddns luci-app-upnp luci-app-autoreboot \
|
||||
luci-app-arpbind luci-app-filetransfer luci-app-vsftpd luci-app-ssr-plus luci-app-vlmcsd \
|
||||
luci-app-accesscontrol luci-app-nlbwmon luci-app-turboacc luci-app-wol curl ca-certificates
|
||||
|
||||
ifneq ($(DUMP),)
|
||||
all: dumpinfo
|
||||
@ -58,7 +66,7 @@ endif
|
||||
|
||||
target_conf=$(subst .,_,$(subst -,_,$(subst /,_,$(1))))
|
||||
ifeq ($(DUMP),)
|
||||
PLATFORM_DIR:=$(TOPDIR)/target/linux/$(BOARD)
|
||||
PLATFORM_DIR:=$(firstword $(wildcard $(TOPDIR)/target/linux/feeds/$(BOARD) $(TOPDIR)/target/linux/$(BOARD)))
|
||||
SUBTARGET:=$(strip $(foreach subdir,$(patsubst $(PLATFORM_DIR)/%/target.mk,%,$(wildcard $(PLATFORM_DIR)/*/target.mk)),$(if $(CONFIG_TARGET_$(call target_conf,$(BOARD)_$(subdir))),$(subdir))))
|
||||
else
|
||||
PLATFORM_DIR:=${CURDIR}
|
||||
@ -163,22 +171,30 @@ USE_SUBTARGET_CONFIG = $(if $(wildcard $(LINUX_TARGET_CONFIG)),,$(if $(LINUX_SUB
|
||||
LINUX_RECONFIG_LIST = $(wildcard $(GENERIC_LINUX_CONFIG) $(LINUX_TARGET_CONFIG) $(if $(USE_SUBTARGET_CONFIG),$(LINUX_SUBTARGET_CONFIG)))
|
||||
LINUX_RECONFIG_TARGET = $(if $(USE_SUBTARGET_CONFIG),$(LINUX_SUBTARGET_CONFIG),$(LINUX_TARGET_CONFIG))
|
||||
|
||||
CFG_TARGET = $(CONFIG_TARGET)
|
||||
ifeq ($(CFG_TARGET),platform)
|
||||
CFG_TARGET = target
|
||||
$(warning Deprecation warning: use CONFIG_TARGET=target instead.)
|
||||
else ifeq ($(CFG_TARGET),subtarget_platform)
|
||||
CFG_TARGET = subtarget_target
|
||||
$(warning Deprecation warning: use CONFIG_TARGET=subtarget_target instead.)
|
||||
endif
|
||||
|
||||
# select the config file to be changed by kernel_menuconfig/kernel_oldconfig
|
||||
ifeq ($(CONFIG_TARGET),platform)
|
||||
ifeq ($(CFG_TARGET),target)
|
||||
LINUX_RECONFIG_LIST = $(wildcard $(GENERIC_LINUX_CONFIG) $(LINUX_TARGET_CONFIG))
|
||||
LINUX_RECONFIG_TARGET = $(LINUX_TARGET_CONFIG)
|
||||
endif
|
||||
ifeq ($(CONFIG_TARGET),subtarget)
|
||||
else ifeq ($(CFG_TARGET),subtarget)
|
||||
LINUX_RECONFIG_LIST = $(wildcard $(GENERIC_LINUX_CONFIG) $(LINUX_TARGET_CONFIG) $(LINUX_SUBTARGET_CONFIG))
|
||||
LINUX_RECONFIG_TARGET = $(LINUX_SUBTARGET_CONFIG)
|
||||
endif
|
||||
ifeq ($(CONFIG_TARGET),subtarget_platform)
|
||||
else ifeq ($(CFG_TARGET),subtarget_target)
|
||||
LINUX_RECONFIG_LIST = $(wildcard $(GENERIC_LINUX_CONFIG) $(LINUX_SUBTARGET_CONFIG) $(LINUX_TARGET_CONFIG))
|
||||
LINUX_RECONFIG_TARGET = $(LINUX_TARGET_CONFIG)
|
||||
endif
|
||||
ifeq ($(CONFIG_TARGET),env)
|
||||
else ifeq ($(CFG_TARGET),env)
|
||||
LINUX_RECONFIG_LIST = $(LINUX_KCONFIG_LIST)
|
||||
LINUX_RECONFIG_TARGET = $(TOPDIR)/env/kernel-config
|
||||
else ifneq ($(strip $(CFG_TARGET)),)
|
||||
$(error CONFIG_TARGET=$(CFG_TARGET) is invalid. Valid: target|subtarget|subtarget_target|env)
|
||||
endif
|
||||
|
||||
__linux_confcmd = $(2) $(patsubst %,+,$(wordlist 2,9999,$(1))) $(1)
|
||||
@ -217,12 +233,14 @@ ifeq ($(DUMP),1)
|
||||
ifeq ($(ARCH),powerpc)
|
||||
CPU_CFLAGS_603e:=-mcpu=603e
|
||||
CPU_CFLAGS_8540:=-mcpu=8540
|
||||
CPU_CFLAGS_8548:=-mcpu=8548
|
||||
CPU_CFLAGS_405:=-mcpu=405
|
||||
CPU_CFLAGS_440:=-mcpu=440
|
||||
CPU_CFLAGS_464fp:=-mcpu=464fp
|
||||
endif
|
||||
ifeq ($(ARCH),powerpc64)
|
||||
CPU_TYPE ?= powerpc64
|
||||
CPU_CFLAGS_e5500:=-mcpu=e5500
|
||||
CPU_CFLAGS_powerpc64:=-mcpu=powerpc64
|
||||
endif
|
||||
ifeq ($(ARCH),sparc)
|
||||
|
@ -18,6 +18,6 @@ define FixupLibdir
|
||||
mkdir -p $(1)/lib; \
|
||||
mv $(1)/lib64/* $(1)/lib/; \
|
||||
rm -rf $(1)/lib64; \
|
||||
ln -sf lib $(1)/lib64; \
|
||||
fi
|
||||
ln -sf lib $(1)/lib64
|
||||
endef
|
||||
|
@ -60,6 +60,7 @@ endif
|
||||
|
||||
SCAN_COOKIE?=$(shell echo $$$$)
|
||||
export SCAN_COOKIE
|
||||
export STAGING_DIR_HOST=$(TOPDIR)/staging_dir/host
|
||||
|
||||
SUBMAKE:=umask 022; $(SUBMAKE)
|
||||
|
||||
@ -77,7 +78,7 @@ prepare-tmpinfo: FORCE
|
||||
@+$(MAKE) -r -s staging_dir/host/.prereq-build $(PREP_MK)
|
||||
mkdir -p tmp/info
|
||||
$(_SINGLE)$(NO_TRACE_MAKE) -j1 -r -s -f include/scan.mk SCAN_TARGET="packageinfo" SCAN_DIR="package" SCAN_NAME="package" SCAN_DEPTH=5 SCAN_EXTRA=""
|
||||
$(_SINGLE)$(NO_TRACE_MAKE) -j1 -r -s -f include/scan.mk SCAN_TARGET="targetinfo" SCAN_DIR="target/linux" SCAN_NAME="target" SCAN_DEPTH=2 SCAN_EXTRA="" SCAN_MAKEOPTS="TARGET_BUILD=1"
|
||||
$(_SINGLE)$(NO_TRACE_MAKE) -j1 -r -s -f include/scan.mk SCAN_TARGET="targetinfo" SCAN_DIR="target/linux" SCAN_NAME="target" SCAN_DEPTH=3 SCAN_EXTRA="" SCAN_MAKEOPTS="TARGET_BUILD=1"
|
||||
for type in package target; do \
|
||||
f=tmp/.$${type}info; t=tmp/.config-$${type}.in; \
|
||||
[ "$$t" -nt "$$f" ] || ./scripts/$${type}-metadata.pl $(_ignore) config "$$f" > "$$t" || { rm -f "$$t"; echo "Failed to build $$t"; false; break; }; \
|
||||
@ -101,7 +102,7 @@ ifneq ($(DISTRO_PKG_CONFIG),)
|
||||
scripts/config/%onf: export PATH:=$(dir $(DISTRO_PKG_CONFIG)):$(PATH)
|
||||
endif
|
||||
scripts/config/%onf: CFLAGS+= -O2
|
||||
scripts/config/%onf:
|
||||
scripts/config/%onf: FORCE
|
||||
@$(_SINGLE)$(SUBMAKE) $(if $(findstring s,$(OPENWRT_VERBOSE)),,-s) \
|
||||
-C scripts/config $(notdir $@)
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
PKG_NAME ?= trusted-firmware-a
|
||||
PKG_CPE_ID ?= cpe:/a:arm:arm_trusted_firmware
|
||||
PKG_CPE_ID ?= cpe:/a:arm:trusted_firmware-a
|
||||
|
||||
ifndef PKG_SOURCE_PROTO
|
||||
PKG_SOURCE = trusted-firmware-a-$(PKG_VERSION).tar.gz
|
||||
@ -68,13 +68,20 @@ define Build/Trusted-Firmware-A/Target
|
||||
endef
|
||||
endef
|
||||
|
||||
define Build/Configure/Trusted-Firmware-A
|
||||
$(INSTALL_DIR) $(STAGING_DIR)/usr/include
|
||||
endef
|
||||
|
||||
DTC=$(wildcard $(LINUX_DIR)/scripts/dtc/dtc)
|
||||
|
||||
define Build/Compile/Trusted-Firmware-A
|
||||
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
|
||||
CROSS_COMPILE=$(TARGET_CROSS) \
|
||||
OPENSSL_DIR=$(STAGING_DIR_HOST) \
|
||||
$(if $(DTC),DTC="$(DTC)") \
|
||||
PLAT=$(PLAT) \
|
||||
BUILD_STRING="OpenWrt v$(PKG_VERSION)-$(PKG_RELEASE) ($(VARIANT))" \
|
||||
$(if $(CONFIG_BINUTILS_VERSION_2_39),LDFLAGS="-no-warn-rwx-segments") \
|
||||
$(TFA_MAKE_FLAGS)
|
||||
endef
|
||||
|
||||
|
@ -45,6 +45,11 @@ UBOOT_MAKE_FLAGS = \
|
||||
HOSTCC="$(HOSTCC)" \
|
||||
HOSTCFLAGS="$(HOST_CFLAGS) $(HOST_CPPFLAGS) -std=gnu11" \
|
||||
HOSTLDFLAGS="$(HOST_LDFLAGS)" \
|
||||
LOCALVERSION="-OpenWrt-$(REVISION)" \
|
||||
STAGING_PREFIX="$(STAGING_DIR_HOST)" \
|
||||
PKG_CONFIG_PATH="$(STAGING_DIR_HOST)/lib/pkgconfig" \
|
||||
PKG_CONFIG_LIBDIR="$(STAGING_DIR_HOST)/lib/pkgconfig" \
|
||||
PKG_CONFIG_EXTRAARGS="--static" \
|
||||
$(if $(findstring c,$(OPENWRT_VERBOSE)),V=1,V='')
|
||||
|
||||
define Build/U-Boot/Target
|
||||
|
@ -1,16 +1,2 @@
|
||||
ifndef DUMP
|
||||
ifdef __package_mk
|
||||
$(error uclibc++.mk must be included before package.mk)
|
||||
endif
|
||||
endif
|
||||
|
||||
PKG_PREPARED_DEPENDS += CONFIG_USE_UCLIBCXX
|
||||
CXX_DEPENDS = +USE_UCLIBCXX:uclibcxx +USE_LIBSTDCXX:libstdcpp
|
||||
|
||||
ifneq ($(CONFIG_USE_UCLIBCXX),)
|
||||
ifneq ($(CONFIG_CCACHE),)
|
||||
TARGET_CXX_NOCACHE=g++-uc
|
||||
else
|
||||
TARGET_CXX=g++-uc
|
||||
endif
|
||||
endif
|
||||
$(warn uclibc++.mk is deprecated. Please remove it and CXX_DEPENDS)
|
||||
CXX_DEPENDS = +libstdcpp
|
||||
|
@ -29,15 +29,15 @@ ifeq ($(IS_TTY),1)
|
||||
endif
|
||||
endif
|
||||
|
||||
define ERROR_MESSAGE
|
||||
printf "$(_R)%s$(_N)\n" "$(1)" >&8
|
||||
endef
|
||||
|
||||
ifeq ($(findstring s,$(OPENWRT_VERBOSE)),)
|
||||
define MESSAGE
|
||||
printf "$(_Y)%s$(_N)\n" "$(1)" >&8
|
||||
endef
|
||||
|
||||
define ERROR_MESSAGE
|
||||
printf "$(_R)%s$(_N)\n" "$(1)" >&8
|
||||
endef
|
||||
|
||||
ifeq ($(QUIET),1)
|
||||
ifneq ($(CURDIR),$(TOPDIR))
|
||||
_DIR:=$(patsubst $(TOPDIR)/%,%,${CURDIR})
|
||||
@ -60,5 +60,4 @@ else
|
||||
define MESSAGE
|
||||
printf "%s\n" "$(1)"
|
||||
endef
|
||||
ERROR_MESSAGE=$(MESSAGE)
|
||||
endif
|
||||
|
@ -114,7 +114,7 @@ NDIS_STATUS RTMPAllocAdapterBlock(VOID *handle, VOID **ppAdapter)
|
||||
pAd->OS_Cookie = handle;
|
||||
((POS_COOKIE)(handle))->pAd_va = (UINT32)pAd;
|
||||
}
|
||||
DBGPRINT(RT_DEBUG_OFF, ("\n\n=== pAd = %p, size = %d ===\n\n", pAd, sizeof(RTMP_ADAPTER)));
|
||||
DBGPRINT(RT_DEBUG_OFF, ("\n=== pAd = %p, size = %d ===\n", pAd, sizeof(RTMP_ADAPTER)));
|
||||
|
||||
if (RtmpOsStatsAlloc(&pAd->stats, &pAd->iw_stats) == FALSE)
|
||||
{
|
||||
|
@ -2253,15 +2253,15 @@ static NDIS_STATUS AndesMTLoadFwMethod1(RTMP_ADAPTER *ad)
|
||||
|
||||
Ctl->Stage = FW_DOWNLOAD;
|
||||
|
||||
DBGPRINT(RT_DEBUG_OFF, ("FW Version:"));
|
||||
printk(KERN_CONT "FW Version:");
|
||||
for (loop = 0; loop < 10; loop++)
|
||||
DBGPRINT(RT_DEBUG_OFF, ("%c", *(cap->FWImageName + cap->fw_len - 29 + loop)));
|
||||
DBGPRINT(RT_DEBUG_OFF, ("\n"));
|
||||
printk(KERN_CONT "%c", *(cap->FWImageName + cap->fw_len - 29 + loop));
|
||||
printk(KERN_CONT "\n");
|
||||
|
||||
DBGPRINT(RT_DEBUG_OFF, ("FW Build Date:"));
|
||||
printk(KERN_CONT "FW Build Date:");
|
||||
for (loop = 0; loop < 15; loop++)
|
||||
DBGPRINT(RT_DEBUG_OFF, ("%c", *(cap->FWImageName + cap->fw_len - 19 + loop)));
|
||||
DBGPRINT(RT_DEBUG_OFF, ("\n"));
|
||||
printk(KERN_CONT "%c", *(cap->FWImageName + cap->fw_len - 19 + loop));
|
||||
printk(KERN_CONT "\n");
|
||||
|
||||
dl_len = (*(cap->FWImageName + cap->fw_len - 1) << 24) |
|
||||
(*(cap->FWImageName + cap->fw_len - 2) << 16) |
|
||||
|
@ -914,6 +914,7 @@ static inline void __RtmpOSFSInfoChange(OS_FS_INFO * pOSFSInfo, BOOLEAN bSet)
|
||||
|
||||
#endif
|
||||
#endif
|
||||
#if 0
|
||||
pOSFSInfo->fs = get_fs();
|
||||
set_fs(KERNEL_DS);
|
||||
} else {
|
||||
@ -921,6 +922,7 @@ static inline void __RtmpOSFSInfoChange(OS_FS_INFO * pOSFSInfo, BOOLEAN bSet)
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
|
||||
current->fsuid = pOSFSInfo->fsuid;
|
||||
current->fsgid = pOSFSInfo->fsgid;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@ -1936,8 +1938,10 @@ VOID RtmpDrvAllMacPrint(
|
||||
if (!msg)
|
||||
return;
|
||||
|
||||
#if 0
|
||||
orig_fs = get_fs();
|
||||
set_fs(KERNEL_DS);
|
||||
#endif
|
||||
|
||||
/* open file */
|
||||
file_w = filp_open(fileName, O_WRONLY | O_CREAT, 0);
|
||||
@ -1965,7 +1969,9 @@ VOID RtmpDrvAllMacPrint(
|
||||
}
|
||||
filp_close(file_w, NULL);
|
||||
}
|
||||
#if 0
|
||||
set_fs(orig_fs);
|
||||
#endif
|
||||
os_free_mem(NULL, msg);
|
||||
}
|
||||
|
||||
@ -1987,8 +1993,10 @@ VOID RtmpDrvAllE2PPrint(
|
||||
if (!msg)
|
||||
return;
|
||||
|
||||
#if 0
|
||||
orig_fs = get_fs();
|
||||
set_fs(KERNEL_DS);
|
||||
#endif
|
||||
|
||||
/* open file */
|
||||
file_w = filp_open(fileName, O_WRONLY | O_CREAT, 0);
|
||||
@ -2017,7 +2025,9 @@ VOID RtmpDrvAllE2PPrint(
|
||||
}
|
||||
filp_close(file_w, NULL);
|
||||
}
|
||||
#if 0
|
||||
set_fs(orig_fs);
|
||||
#endif
|
||||
os_free_mem(NULL, msg);
|
||||
}
|
||||
|
||||
@ -2031,8 +2041,10 @@ VOID RtmpDrvAllRFPrint(
|
||||
RTMP_STRING *fileName = "RFDump.txt";
|
||||
mm_segment_t orig_fs;
|
||||
|
||||
#if 0
|
||||
orig_fs = get_fs();
|
||||
set_fs(KERNEL_DS);
|
||||
#endif
|
||||
|
||||
/* open file */
|
||||
file_w = filp_open(fileName, O_WRONLY | O_CREAT, 0);
|
||||
@ -2048,7 +2060,9 @@ VOID RtmpDrvAllRFPrint(
|
||||
}
|
||||
filp_close(file_w, NULL);
|
||||
}
|
||||
#if 0
|
||||
set_fs(orig_fs);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -154,7 +154,7 @@ config MT7603E_SECURITY_IMPROVEMENT_SUPPORT
|
||||
bool "WPA2 security improvement support"
|
||||
depends on MT7603E_RLT_AP_SUPPORT
|
||||
default n
|
||||
---help---
|
||||
help
|
||||
WPA2 security improvement support
|
||||
|
||||
|
||||
@ -164,7 +164,7 @@ config MT7603E_WPA3_SUPPORT
|
||||
select MT7603E_SECURITY_IMPROVEMENT_SUPPORT
|
||||
depends on MT7603E_RLT_AP_SUPPORT
|
||||
default n
|
||||
---help---
|
||||
help
|
||||
WPA3 support
|
||||
|
||||
config MT7603E_OWE_SUPPORT
|
||||
@ -172,12 +172,12 @@ config MT7603E_OWE_SUPPORT
|
||||
select MT7603E_DOT11W_PMF_SUPPORT
|
||||
depends on MT7603E_RLT_AP_SUPPORT
|
||||
default n
|
||||
---help---
|
||||
help
|
||||
Enhanced Open/OWE support
|
||||
|
||||
config MT7603E_NEW_BW2040_COEXIST_SUPPORT
|
||||
bool "New BW20/40 Coexist support"
|
||||
depends on MT7603E_RLT_AP_SUPPORT
|
||||
default y
|
||||
---help---
|
||||
help
|
||||
Both Beacon and Radio fallback to BW20 for anti-interference
|
||||
|
@ -124,7 +124,7 @@ NDIS_STATUS RTMPAllocAdapterBlock(VOID *handle, VOID **ppAdapter)
|
||||
#endif /* WORKQUEUE_BH */
|
||||
}
|
||||
pAd->BeaconBuf = pBeaconBuf;
|
||||
DBGPRINT(RT_DEBUG_OFF, ("\n\n=== pAd = %p, size = %d ===\n\n", pAd, sizeof(RTMP_ADAPTER)));
|
||||
DBGPRINT(RT_DEBUG_OFF, ("\n=== pAd = %p, size = %d ===\n", pAd, sizeof(RTMP_ADAPTER)));
|
||||
|
||||
if (RtmpOsStatsAlloc(&pAd->iw_stats) == FALSE)
|
||||
{
|
||||
|
@ -100,10 +100,10 @@ loadfw_protect:
|
||||
|
||||
#ifdef DBG
|
||||
/* get rom patch information */
|
||||
DBGPRINT(RT_DEBUG_OFF, ("build time = "));
|
||||
printk(KERN_CONT "build time = ");
|
||||
for (loop = 0; loop < 16; loop++)
|
||||
DBGPRINT(RT_DEBUG_OFF, ("%c", *(cap->rom_patch + loop)));
|
||||
DBGPRINT(RT_DEBUG_OFF, ("\n"));
|
||||
printk(KERN_CONT "%c", *(cap->rom_patch + loop));
|
||||
printk(KERN_CONT "\n");
|
||||
#endif
|
||||
|
||||
if (IS_MT76x2(ad)) {
|
||||
@ -121,22 +121,22 @@ loadfw_protect:
|
||||
}
|
||||
|
||||
#ifdef DBG
|
||||
DBGPRINT(RT_DEBUG_OFF, ("\n"));
|
||||
printk(KERN_CONT "\n");
|
||||
|
||||
DBGPRINT(RT_DEBUG_OFF, ("platform = "));
|
||||
printk(KERN_CONT "platform = ");
|
||||
for (loop = 0; loop < 4; loop++)
|
||||
DBGPRINT(RT_DEBUG_OFF, ("%c", *(cap->rom_patch + 16 + loop)));
|
||||
DBGPRINT(RT_DEBUG_OFF, ("\n"));
|
||||
printk(KERN_CONT "%c", *(cap->rom_patch + 16 + loop));
|
||||
printk(KERN_CONT "\n");
|
||||
|
||||
DBGPRINT(RT_DEBUG_OFF, ("hw/sw version = "));
|
||||
printk(KERN_CONT "hw/sw version = ");
|
||||
for (loop = 0; loop < 4; loop++)
|
||||
DBGPRINT(RT_DEBUG_OFF, ("%x", *(cap->rom_patch + 20 + loop)));
|
||||
DBGPRINT(RT_DEBUG_OFF, ("\n"));
|
||||
printk(KERN_CONT "%x", *(cap->rom_patch + 20 + loop));
|
||||
printk(KERN_CONT "\n");
|
||||
|
||||
DBGPRINT(RT_DEBUG_OFF, ("patch version = "));
|
||||
printk(KERN_CONT "patch version = ");
|
||||
for (loop = 0; loop < 4; loop++)
|
||||
DBGPRINT(RT_DEBUG_OFF, ("%x", *(cap->rom_patch + 24 + loop)));
|
||||
DBGPRINT(RT_DEBUG_OFF, ("\n"));
|
||||
printk(KERN_CONT "%x", *(cap->rom_patch + 24 + loop));
|
||||
printk(KERN_CONT "\n");
|
||||
#endif
|
||||
|
||||
RTMP_IO_WRITE32(ad, PCIE_REMAP_BASE4, cap->rom_patch_offset - 10000);
|
||||
@ -239,10 +239,10 @@ int andes_pci_erasefw(RTMP_ADAPTER *ad)
|
||||
(fw_ver & 0x0f00) >> 8, fw_ver & 0x00ff));
|
||||
DBGPRINT(RT_DEBUG_TRACE, ("Build:%x\n", build_ver));
|
||||
|
||||
DBGPRINT(RT_DEBUG_TRACE, ("Build Time:"));
|
||||
printk(KERN_CONT "Build Time:");
|
||||
for (loop = 0; loop < 16; loop++)
|
||||
DBGPRINT(RT_DEBUG_TRACE, ("%c", *(cap->FWImageName + 16 + loop)));
|
||||
DBGPRINT(RT_DEBUG_TRACE, ("\n"));
|
||||
printk(KERN_CONT "%c", *(cap->FWImageName + 16 + loop));
|
||||
printk(KERN_CONT "\n");
|
||||
|
||||
DBGPRINT(RT_DEBUG_TRACE, ("ILM Length = %d(bytes)\n", ilm_len));
|
||||
DBGPRINT(RT_DEBUG_TRACE, ("DLM Length = %d(bytes)\n", dlm_len));
|
||||
@ -386,10 +386,10 @@ loadfw_protect:
|
||||
(fw_ver & 0x0f00) >> 8, fw_ver & 0x00ff));
|
||||
DBGPRINT(RT_DEBUG_OFF, ("Build:%x\n", build_ver));
|
||||
|
||||
DBGPRINT(RT_DEBUG_OFF, ("Build Time:"));
|
||||
printk(KERN_CONT "Build Time:");
|
||||
for (loop = 0; loop < 16; loop++)
|
||||
DBGPRINT(RT_DEBUG_OFF, ("%c", *(cap->FWImageName + 16 + loop)));
|
||||
DBGPRINT(RT_DEBUG_OFF, ("\n"));
|
||||
printk(KERN_CONT "%c", *(cap->FWImageName + 16 + loop));
|
||||
printk(KERN_CONT "\n");
|
||||
#endif
|
||||
|
||||
if (IS_MT76x2(ad)) {
|
||||
|
@ -5,8 +5,9 @@
|
||||
# Copyright (c) 2013, Hoowa <hoowa.sun@gmail.com>
|
||||
# Copyright (c) 2015-2017, GuoGuo <gch981213@gmail.com>
|
||||
# Copyright (c) 2020, jjm2473 <jjm2473@gmail.com>
|
||||
# Copyright (c) 2022, nanchuci <nanchuci023@gmail.com>
|
||||
#
|
||||
# netifd config script for MT7615 DBDC mode.
|
||||
# netifd config script for MT7615/MT7915 DBDC mode.
|
||||
#
|
||||
# 嘿,对着屏幕的哥们,为了表示对原作者辛苦工作的尊重,任何引用跟借用都不允许你抹去所有作者的信息,请保留这段话。
|
||||
#
|
||||
@ -68,7 +69,10 @@ drv_mt_dbdc_init_device_config() {
|
||||
drv_mt_dbdc_init_iface_config() {
|
||||
config_add_boolean disabled
|
||||
config_add_string mode bssid ssid encryption
|
||||
config_add_boolean hidden isolate doth ieee80211k
|
||||
config_add_boolean hidden isolate doth ieee80211v
|
||||
config_add_boolean hidden isolate doth ieee80211r
|
||||
config_add_boolean hidden isolate doth ieee80211w
|
||||
config_add_string key key1 key2 key3 key4
|
||||
config_add_string wps
|
||||
config_add_string pin
|
||||
@ -97,7 +101,7 @@ mt_dbdc_ap_vif_pre_config() {
|
||||
local name="$1"
|
||||
|
||||
json_select config
|
||||
json_get_vars disabled encryption key key1 key2 key3 key4 ssid mode wps pin isolate doth hidden disassoc_low_ack rssiassoc ieee80211r macfilter
|
||||
json_get_vars disabled encryption key key1 key2 key3 key4 ssid mode wps pin isolate doth hidden disassoc_low_ack rssiassoc ieee80211k ieee80211v ieee80211r ieee80211w macfilter
|
||||
json_get_values maclist maclist
|
||||
json_select ..
|
||||
[ "$disabled" == "1" ] && return
|
||||
@ -192,7 +196,7 @@ mt_dbdc_ap_vif_pre_config() {
|
||||
mt_cmd echo "Interface $ifname now up."
|
||||
mt_cmd iwpriv $ifname set NoForwarding=${isolate:-0}
|
||||
mt_cmd iwpriv $ifname set IEEE80211H=${doth:-0}
|
||||
if [ "$wps" == "pbc" ] && [ "$encryption" != "none" ]; then
|
||||
if [ "$wps" == "pbc" ] || [ "$wps" == "pin" ] && [ "$encryption" != "none" ]; then
|
||||
echo "Enable WPS for ${ifname}."
|
||||
mt_cmd iwpriv $ifname set WscConfMode=4
|
||||
mt_cmd iwpriv $ifname set WscConfStatus=2
|
||||
@ -203,7 +207,10 @@ mt_dbdc_ap_vif_pre_config() {
|
||||
fi
|
||||
[ -n "$disassoc_low_ack" ] && [ "$disassoc_low_ack" != "0" ] && mt_cmd iwpriv $ifname set KickStaRssiLow=$disassoc_low_ack
|
||||
[ -n "$rssiassoc" ] && [ "$rssiassoc" != "0" ] && mt_cmd iwpriv $ifname set AssocReqRssiThres=$rssiassoc
|
||||
[ -n "$ieee80211k" ] && [ "$ieee80211k" != "0" ] && mt_cmd iwpriv $ifname set rrmenable=1
|
||||
[ -n "$ieee80211v" ] && [ "$ieee80211v" != "0" ] && mt_cmd iwpriv $ifname set wnmenable=1
|
||||
[ -n "$ieee80211r" ] && [ "$ieee80211r" != "0" ] && mt_cmd iwpriv $ifname set ftenable=1
|
||||
[ -n "$ieee80211w" ] && [ "$ieee80211w" != "0" ] && mt_cmd iwpriv $ifname set pmfenable=1
|
||||
}
|
||||
|
||||
mt_dbdc_wds_vif_pre_config() {
|
||||
@ -272,7 +279,7 @@ mt_dbdc_ap_vif_post_config() {
|
||||
local name="$1"
|
||||
|
||||
json_select config
|
||||
json_get_vars disabled encryption key key1 key2 key3 key4 ssid mode wps pin isolate doth hidden disassoc_low_ack rssiassoc ieee80211r
|
||||
json_get_vars disabled encryption key key1 key2 key3 key4 ssid mode wps pin isolate doth hidden disassoc_low_ack rssiassoc ieee80211k ieee80211v ieee80211r ieee80211w
|
||||
json_select ..
|
||||
|
||||
[ "$disabled" == "1" ] && return
|
||||
@ -532,6 +539,10 @@ MacAddress=${macaddr}
|
||||
CountryRegion=${countryregion:-5}
|
||||
CountryRegionABand=${countryregion_a:-7}
|
||||
CountryCode=${country:-CN}
|
||||
RRMEnable=${RRMEnable:-0};${RRMEnable:-0};${RRMEnable:-0};${RRMEnable:-0}
|
||||
WNMEnable=${WNMEnable:-0};${WNMEnable:-0};${WNMEnable:-0};${WNMEnable:-0}
|
||||
FTEnable=${FTEnable:-0};${FTEnable:-0};${FTEnable:-0};${FTEnable:-0}
|
||||
PMFenable=${PMFenable:-0};${PMFenable:-0};${PMFenable:-0};${PMFenable:-0}
|
||||
WirelessMode=${WirelessMode}
|
||||
G_BAND_256QAM=1
|
||||
FixedTxMode=
|
||||
@ -547,8 +558,8 @@ BFBACKOFFenable=0
|
||||
CalCacheApply=0
|
||||
DisableOLBC=0
|
||||
BGProtection=0
|
||||
TxAntenna=
|
||||
RxAntenna=
|
||||
TxAntenna=${TxAntenna:-2};${TxAntenna:-2};${TxAntenna:-4};${TxAntenna:-4}
|
||||
RxAntenna=${RxAntenna:-2};${RxAntenna:-2};${RxAntenna:-4};${RxAntenna:-4}
|
||||
TxPreamble=1
|
||||
RTSThreshold=${rts:-2347}
|
||||
FragThreshold=${frag:-2346}
|
||||
@ -677,8 +688,8 @@ VHT_STBC=${tx_stbc:-1}
|
||||
VHT_BW_SIGNAL=0
|
||||
VHT_DisallowNonVHT=${VHT_DisallowNonVHT:-0}
|
||||
VHT_LDPC=${ldpc:-1}
|
||||
#HT_TxStream=2
|
||||
#HT_RxStream=2
|
||||
HT_TxStream=2;2;2;2
|
||||
HT_RxStream=2;2;2;2
|
||||
HT_PROTECT=0
|
||||
HT_DisallowTKIP=${HT_DisallowTKIP:-0}
|
||||
HT_BSSCoexistence=${HT_CE:-1}
|
||||
|
@ -865,6 +865,7 @@ static inline void __RtmpOSFSInfoChange(OS_FS_INFO *pOSFSInfo, BOOLEAN bSet)
|
||||
/* pOSFSInfo->fsgid = (int)(current_fsgid()); */
|
||||
#endif
|
||||
#endif
|
||||
#if 0
|
||||
pOSFSInfo->fs = get_fs();
|
||||
set_fs(KERNEL_DS);
|
||||
} else {
|
||||
@ -872,6 +873,7 @@ static inline void __RtmpOSFSInfoChange(OS_FS_INFO *pOSFSInfo, BOOLEAN bSet)
|
||||
#if (KERNEL_VERSION(2, 6, 29) > LINUX_VERSION_CODE)
|
||||
current->fsuid = pOSFSInfo->fsuid;
|
||||
current->fsgid = pOSFSInfo->fsgid;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@ -1925,8 +1927,10 @@ VOID RtmpDrvAllMacPrint(
|
||||
if (!msg)
|
||||
return;
|
||||
|
||||
#if 0
|
||||
orig_fs = get_fs();
|
||||
set_fs(KERNEL_DS);
|
||||
#endif
|
||||
/* open file */
|
||||
file_w = filp_open(fileName, O_WRONLY | O_CREAT, 0);
|
||||
|
||||
@ -1968,7 +1972,9 @@ VOID RtmpDrvAllMacPrint(
|
||||
filp_close(file_w, NULL);
|
||||
}
|
||||
|
||||
#if 0
|
||||
set_fs(orig_fs);
|
||||
#endif
|
||||
os_free_mem(msg);
|
||||
}
|
||||
|
||||
@ -1991,8 +1997,10 @@ VOID RtmpDrvAllE2PPrint(
|
||||
if (!msg)
|
||||
return;
|
||||
|
||||
#if 0
|
||||
orig_fs = get_fs();
|
||||
set_fs(KERNEL_DS);
|
||||
#endif
|
||||
/* open file */
|
||||
file_w = filp_open(fileName, O_WRONLY | O_CREAT, 0);
|
||||
|
||||
@ -2035,7 +2043,9 @@ VOID RtmpDrvAllE2PPrint(
|
||||
filp_close(file_w, NULL);
|
||||
}
|
||||
|
||||
#if 0
|
||||
set_fs(orig_fs);
|
||||
#endif
|
||||
os_free_mem(msg);
|
||||
}
|
||||
|
||||
@ -2049,8 +2059,10 @@ VOID RtmpDrvAllRFPrint(
|
||||
RTMP_STRING *fileName = "RFDump.txt";
|
||||
mm_segment_t orig_fs;
|
||||
|
||||
#if 0
|
||||
orig_fs = get_fs();
|
||||
set_fs(KERNEL_DS);
|
||||
#endif
|
||||
/* open file */
|
||||
file_w = filp_open(fileName, O_WRONLY | O_CREAT, 0);
|
||||
|
||||
@ -2081,7 +2093,9 @@ VOID RtmpDrvAllRFPrint(
|
||||
filp_close(file_w, NULL);
|
||||
}
|
||||
|
||||
#if 0
|
||||
set_fs(orig_fs);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
56
package/lean/mt/mtkiappd/Makefile
Normal file
56
package/lean/mt/mtkiappd/Makefile
Normal file
@ -0,0 +1,56 @@
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=mtkiappd
|
||||
PKG_VERSION:=1
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_CONFIG_DEPENDS := \
|
||||
CONFIG_MTK_CHIP_MT7615E_DBDC \
|
||||
CONFIG_PACKAGE_mtkiappd_DUAL_BAND
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/mtkiappd
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=MTK 802.11f supporting daemon
|
||||
DEPENDS:=@TARGET_ramips
|
||||
SUBMENU:=Wireless
|
||||
endef
|
||||
|
||||
define Package/mtkiappd/description
|
||||
Mtkiappd is an optional user space component for MT76xx SoftAP driver.
|
||||
endef
|
||||
|
||||
define Package/mtkiappd/config
|
||||
config PACKAGE_mtkiappd_DUAL_BAND
|
||||
bool "dual band"
|
||||
depends on MTK_CHIP_MT7615E
|
||||
default y if TARGET_ramips_mt7621_DEVICE_phicomm_k2p
|
||||
default y if TARGET_ramips_mt7621_DEVICE_raisecom_msg1500-x-00
|
||||
default n
|
||||
endef
|
||||
|
||||
ifeq ($(CONFIG_PACKAGE_mtkiappd_DUAL_BAND),y)
|
||||
WIRELESS_IOCTL_PARAM:=-wi ra0 -wi rax0
|
||||
else
|
||||
WIRELESS_IOCTL_PARAM:=-wi ra0
|
||||
endif
|
||||
|
||||
define Package/mtkiappd/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_DIR) $(1)/usr/share/mtkiappd
|
||||
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/mtkiappd $(1)/usr/sbin/
|
||||
$(INSTALL_BIN) ./files/mtkiappd.sh $(1)/etc/init.d/mtkiappd
|
||||
sed -i 's/WIRELESS_IOCTL_PARAM/$(WIRELESS_IOCTL_PARAM)/' $(1)/etc/init.d/mtkiappd
|
||||
$(INSTALL_DATA) ./files/firewall.include $(1)/usr/share/mtkiappd/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,mtkiappd))
|
49
package/lean/mt/mtkiappd/files/README
Normal file
49
package/lean/mt/mtkiappd/files/README
Normal file
@ -0,0 +1,49 @@
|
||||
mtkiappd - user space daemon supported 802.11f protocol
|
||||
for RTxxxx a/b/g/n SoftAP driver, Ralink Technology, Corp.
|
||||
=================================================================
|
||||
|
||||
This is the README file for the 802.11f/802.11r/802.11k daemon - mtkiappd,
|
||||
which comes with RTxxxx SoftAP driver.
|
||||
|
||||
|
||||
I. Introduction
|
||||
=================================================================
|
||||
mtkiappd is an optional user space component for RTxxxx SoftAP driver.
|
||||
|
||||
|
||||
II. 802.11f features in mtkiappd
|
||||
=================================================================
|
||||
IEEE Std 802.11F-2003 is a standard for inter-access point protocol(IAPP).
|
||||
It can handle issues on multi-verder access point interoperability.
|
||||
|
||||
There are three major topics which 802.11f supported,
|
||||
1. ADD-notify
|
||||
2. MOVE-notify
|
||||
3. CACHE-notify
|
||||
|
||||
mtkiappd only supports ADD-notify in current phase due to lack of support from radius server
|
||||
|
||||
There are three major topics which 802.11r supported,
|
||||
1. Key Distribution Protocol
|
||||
|
||||
There are three major topics which 802.11k supported,
|
||||
1. Neighbor Report
|
||||
|
||||
Some ethernet card needs special configuration to support multicasting.
|
||||
Make sure your ethernet card support multicasting
|
||||
|
||||
|
||||
III. How to start mtkiappd
|
||||
=================================================================
|
||||
Note: the broadcast/netmask address of all AP must be the same.
|
||||
1. If you want to debug mtkiappd, add CFLAGS with DBG.
|
||||
2. If you want to extend wifi control interface,
|
||||
modify "MAX_WIFI_COUNT" in rtmpiapp.h. (default setting is 2)
|
||||
3. First we need to compile the source code using 'make' command
|
||||
4. Load RTxxxx SoftAP driver - ex: rt2860ap.ko
|
||||
5. Manually start mtkiappd, type $mtkiappd
|
||||
6. For wifi multi-interface, type $mtkiappd -wi ra0 -wi rai0
|
||||
|
||||
|
||||
IV. Reference
|
||||
IEEE Std 802.11F-2003, IEEE802.11r, IEEE802.11k
|
2
package/lean/mt/mtkiappd/files/firewall.include
Normal file
2
package/lean/mt/mtkiappd/files/firewall.include
Normal file
@ -0,0 +1,2 @@
|
||||
-A INPUT -i br-lan -p tcp --dport 3517 -j ACCEPT
|
||||
-A INPUT -i br-lan -p udp --dport 3517 -j ACCEPT
|
12
package/lean/mt/mtkiappd/files/mtkiappd.defaults
Normal file
12
package/lean/mt/mtkiappd/files/mtkiappd.defaults
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
uci -q batch <<-EOT
|
||||
delete firewall.mtkiappd
|
||||
set firewall.mtkiappd=include
|
||||
set firewall.mtkiappd.type=restore
|
||||
set firewall.mtkiappd.path=/usr/share/mtkiappd/firewall.include
|
||||
set firewall.mtkiappd.reload=1
|
||||
commit firewall
|
||||
EOT
|
||||
|
||||
exit 0
|
20
package/lean/mt/mtkiappd/files/mtkiappd.sh
Normal file
20
package/lean/mt/mtkiappd/files/mtkiappd.sh
Normal file
@ -0,0 +1,20 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=99
|
||||
STOP=01
|
||||
|
||||
USE_PROCD=1
|
||||
|
||||
start_service() {
|
||||
procd_open_instance mtkiappd
|
||||
procd_set_param command /usr/sbin/mtkiappd -e br-lan WIRELESS_IOCTL_PARAM
|
||||
procd_set_param respawn
|
||||
procd_set_param netdev br-lan
|
||||
procd_set_param netdev ra0
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
stop
|
||||
start
|
||||
}
|
10
package/lean/mt/mtkiappd/src/Makefile
Normal file
10
package/lean/mt/mtkiappd/src/Makefile
Normal file
@ -0,0 +1,10 @@
|
||||
OBJS = rtmpiapp.o mt_iapp_util.o
|
||||
|
||||
# If you want to debug daemon, uncomment following line
|
||||
# CFLAGS += -ggdb3 -DDBG
|
||||
|
||||
mtkiappd: $(OBJS)
|
||||
$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS)
|
||||
|
||||
clean:
|
||||
rm -f core *.o mtkiappd
|
128
package/lean/mt/mtkiappd/src/iappdefs.h
Normal file
128
package/lean/mt/mtkiappd/src/iappdefs.h
Normal file
@ -0,0 +1,128 @@
|
||||
/****************************************************************************
|
||||
* Ralink Tech Inc.
|
||||
* Taiwan, R.O.C.
|
||||
*
|
||||
* (c) Copyright 2002, Ralink Technology, Inc.
|
||||
*
|
||||
* All rights reserved. Ralink's source code is an unpublished work and the
|
||||
* use of a copyright notice does not imply otherwise. This source code
|
||||
* contains confidential trade secret material of Ralink Tech. Any attemp
|
||||
* or participation in deciphering, decoding, reverse engineering or in any
|
||||
* way altering the source code is stricitly prohibited, unless the prior
|
||||
* written consent of Ralink Technology, Inc. is obtained.
|
||||
***************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
Abstract:
|
||||
|
||||
All related IEEE802.11f IAPP + IEEE802.11r IAPP extension.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef __IAPP_DEF_H__
|
||||
#define __IAPP_DEF_H__
|
||||
|
||||
/* Some Notes */
|
||||
|
||||
#define IAPP_DS_LINK_LOST
|
||||
/*
|
||||
When an AP continues to accept associations without a link to the DS,
|
||||
it is a black hole in the WLAN, where STAs associate and cannot
|
||||
communicate with anything beyond the AP’s BSS. When an AP loses its link
|
||||
to the DS, it should cease transmitting Beacons, disassociate all
|
||||
associated stations, and cease responding to Probe Request,
|
||||
Authentication, and Association Request frames.
|
||||
*/
|
||||
|
||||
/* Local use file */
|
||||
#define PROC_NET_ARP_PATH "/proc/net/arp"
|
||||
#define IAPP_PID_BACKUP_FILE "/var/run/mtkiappd.pid"
|
||||
|
||||
/* Definition of IAPP */
|
||||
#define IAPP_DAEMON_VERSION "v1.1.0"
|
||||
#define IAPP_VERSION 0
|
||||
//#define IAPP_MULTICAST_ADDR "224.0.1.178" /* used in
|
||||
// ADD-req frame*/ #define IAPP_MULTICAST_ADDR
|
||||
//"192.168.15.255" /* used in ADD-req frame*/
|
||||
|
||||
/*
|
||||
The UDP Port parameter is the UDP port number to be opened for the IAPP
|
||||
for transmission and reception of IAPP packets.
|
||||
*/
|
||||
#define IAPP_UDP_PORT 3517 /* used in UDP connection */
|
||||
|
||||
/*
|
||||
The TCP Port parameter is the TCP port number that the IAPP entity opens
|
||||
to listen for new IAPP TCP connections from the IAPP entities of other
|
||||
APs.
|
||||
*/
|
||||
#define IAPP_TCP_PORT 3517 /* used in TCP connection */
|
||||
|
||||
/* Message type */
|
||||
#define IAPP_ETH_PRO 0xEEEE
|
||||
#define IAPPMSGQUEID 1
|
||||
#define RADIUSMSGQUEID 2
|
||||
#define RRB_ETH_PRO 0x890D
|
||||
|
||||
/* Message subtype */
|
||||
#define IAPP_OPEN_SERVICE_REQ 0
|
||||
#define IAPP_OPEN_SERVICE_RSP 1
|
||||
#define IAPP_CLOSE_SERVICE_REQ 2
|
||||
#define IAPP_SIGNAL_REQ 3
|
||||
#define IAPP_SET_OID_REQ 4
|
||||
#define IAPP_QUERY_OID_REQ 5
|
||||
#define IAPP_QUERY_OID_RSP 6
|
||||
|
||||
/* Definition of signal */
|
||||
#define IAPP_SIG_NONE 0
|
||||
#define IAPP_SIG_ASSOCIATION 1
|
||||
#define IAPP_SIG_REASSOCIATION 2
|
||||
#define IAPP_SIG_TERMINATE 3
|
||||
|
||||
/* Definition of IAPP command */ /* reference to IEEE802.11f page 50 */
|
||||
#define IAPP_CMD_ADD_NOTIFY 0 /* ADD-notify */
|
||||
#define IAPP_CMD_MOVE_NOTIFY 1 /* MOVE-notify */
|
||||
#define IAPP_CMD_MOVE_RESPONSE 2 /* MOVE-response */
|
||||
#define IAPP_CMD_SEND_SECURITY_BLOCK 3 /* Send-Security-Block */
|
||||
#define IAPP_CMD_ACK_SECURITY_BLOCK 4 /* ACK-Security-Block */
|
||||
#define IAPP_CMD_CACHE_NOTIFY 5 /* CACHE-notify */
|
||||
#define IAPP_CMD_CACHE_RESPONSE 6 /* CACHE-response */
|
||||
|
||||
#define IAPP_CMD_FT_SEND_SECURITY_BLOCK \
|
||||
50 /* proprietary FT Send-Security-Block */
|
||||
#define IAPP_CMD_FT_ACK_SECURITY_BLOCK \
|
||||
51 /* proprietary FT ACK-Security-Block */
|
||||
|
||||
#define IAPP_CMD_INFO_BROADCAST 60 /* proprietary INFO broadcast */
|
||||
#define IAPP_CMD_INFO_REQUEST 61 /* proprietary INFO request */
|
||||
#define IAPP_CMD_INFO_RESPONSE 62 /* proprietary INFO response */
|
||||
|
||||
#define IAPP_CMD_SECURITY_MONITOR 128 /* proprietary, for SM broadcast */
|
||||
|
||||
/* Definition of event log */
|
||||
#define IAPP_MAX_SIZE_OF_EVENT_LOG 1024
|
||||
|
||||
/* Definition of general */
|
||||
#define IAPP_SELECT_TIMEOUT 5 /* unit: second */
|
||||
|
||||
#define IAPP_MAX_RCV_PKT_SIZE 1600
|
||||
#define IAPP_MAX_RCV_PKT_SIZE_SAFE 100
|
||||
|
||||
#define IAPP_IP_HEADER_OFFSET 14 /* skip MAC header */
|
||||
#define IAPP_IP_PROTO_OFFSET 9
|
||||
#define IAPP_IP_PROTO_UDP 17
|
||||
#define IAPP_UDP_DST_PORT_OFFSET (20 + 2)
|
||||
|
||||
#define IAPP_MAC_IP_UDP_LEN (14 + 20 + 8)
|
||||
|
||||
/* 16 for extra 8B encryption & 8B-align, other 16B for safe */
|
||||
#define IAPP_SECURITY_EXTEND_LEN 32
|
||||
|
||||
#define IAPP_IN
|
||||
#define IAPP_OUT
|
||||
#define IAPP_INOUT
|
||||
|
||||
#endif /* __IAPP_DEF_H__ */
|
||||
|
||||
/* End of iapp_def.h */
|
234
package/lean/mt/mtkiappd/src/mt_iapp_util.c
Normal file
234
package/lean/mt/mtkiappd/src/mt_iapp_util.c
Normal file
@ -0,0 +1,234 @@
|
||||
/****************************************************************************
|
||||
* Ralink Tech Inc.
|
||||
* Taiwan, R.O.C.
|
||||
*
|
||||
* (c) Copyright 2002, Ralink Technology, Inc.
|
||||
*
|
||||
* All rights reserved. Ralink's source code is an unpublished work and the
|
||||
* use of a copyright notice does not imply otherwise. This source code
|
||||
* contains confidential trade secret material of Ralink Tech. Any attemp
|
||||
* or participation in deciphering, decoding, reverse engineering or in any
|
||||
* way altering the source code is stricitly prohibited, unless the prior
|
||||
* written consent of Ralink Technology, Inc. is obtained.
|
||||
***************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
Abstract:
|
||||
|
||||
All related IEEE802.11f IAPP + IEEE802.11r/11k IAPP extension.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
/* Include */
|
||||
|
||||
#include "iappdefs.h"
|
||||
#include "rt_config.h"
|
||||
#include "rt_typedef.h"
|
||||
#include "rtmpiapp.h"
|
||||
|
||||
VOID os_alloc_mem(UCHAR *pAd, UCHAR **ppMem, UINT32 Size) {
|
||||
*ppMem = (UCHAR *)malloc(Size);
|
||||
}
|
||||
|
||||
VOID os_free_mem(UCHAR *pAd, VOID *pMem) { free(pMem); }
|
||||
|
||||
BOOLEAN mt_iapp_get_wifi_iface_mac(RTMP_IAPP *pCtrlBK) {
|
||||
#ifdef IAPP_OS_LINUX
|
||||
INT idx;
|
||||
for (idx = 0; idx < pCtrlBK->IfNameWlanCount; idx++) {
|
||||
struct ifreq ReqIf;
|
||||
|
||||
NdisZeroMemory(pCtrlBK->IfNameWlanMAC[idx], ETH_ALEN);
|
||||
NdisCopyMemory(ReqIf.ifr_name, pCtrlBK->IfNameWlanIoctl[idx], IFNAMSIZ);
|
||||
/* get mac address of the interface */
|
||||
if (ioctl(pCtrlBK->SocketIoctl, SIOCGIFHWADDR, &ReqIf) < 0) {
|
||||
DBGPRINT(RT_DEBUG_ERROR,
|
||||
("iapp> %s - Fail to get MAC of IfName[%d]: %s\n", __FUNCTION__,
|
||||
idx, pCtrlBK->IfNameWlanIoctl[idx]));
|
||||
return FALSE;
|
||||
} else {
|
||||
NdisCopyMemory(pCtrlBK->IfNameWlanMAC[idx],
|
||||
&ReqIf.ifr_ifru.ifru_hwaddr.sa_data[0], ETH_ALEN);
|
||||
DBGPRINT(RT_DEBUG_OFF, ("iapp> %s - IfName[%d]: %s\n", __FUNCTION__, idx,
|
||||
pCtrlBK->IfNameWlanIoctl[idx]));
|
||||
IAPP_HEX_DUMP("MAC", pCtrlBK->IfNameWlanMAC[idx], ETH_ALEN);
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
INT32 mt_iapp_find_ifidx_by_mac(RTMP_IAPP *pCtrlBK, UCHAR *WifiMAC) {
|
||||
INT32 idx = 0;
|
||||
|
||||
if (WifiMAC == NULL) {
|
||||
DBGPRINT(RT_DEBUG_OFF, ("iapp> %s - WifiMAC is null.\n", __FUNCTION__));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (pCtrlBK->IfNameWlanCount < MAX_WIFI_COUNT) {
|
||||
DBGPRINT(RT_DEBUG_OFF,
|
||||
("iapp> %s - pCtrlBK->IfNameWlanCount (%d) is less than %d.\n",
|
||||
__FUNCTION__, pCtrlBK->IfNameWlanCount, MAX_WIFI_COUNT));
|
||||
}
|
||||
|
||||
for (idx = 0; idx < MAX_WIFI_COUNT; idx++) {
|
||||
if (NdisCompareMemory(WifiMAC, pCtrlBK->IfNameWlanMAC[idx], ETH_ALEN) ==
|
||||
0) {
|
||||
return idx;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
VOID mt_iapp_set_daemon_information(RTMP_IAPP *pCtrlBK, pid_t *pPidAuth) {
|
||||
INT32 ComLen = 0;
|
||||
INT32 idx = 0;
|
||||
|
||||
for (idx = 0; idx < pCtrlBK->IfNameWlanCount; idx++) {
|
||||
ComLen = sizeof(INT32);
|
||||
IAPP_IOCTL_TO_WLAN(pCtrlBK, RT_IOCTL_IAPP, pPidAuth, &ComLen, idx,
|
||||
RT_SET_IAPP_PID | OID_GET_SET_TOGGLE);
|
||||
#ifdef FT_KDP_KEY_FROM_DAEMON
|
||||
ComLen = strlen(pCtrlBK->CommonKey);
|
||||
IAPP_IOCTL_TO_WLAN(pCtrlBK, RT_IOCTL_IAPP, pCtrlBK->CommonKey, &ComLen, idx,
|
||||
RT_FT_KEY_SET | OID_GET_SET_TOGGLE);
|
||||
#endif /* FT_KDP_KEY_FROM_DAEMON */
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
VOID mt_iapp_ft_client_table_init(RTMP_IAPP *pCtrlBK) {
|
||||
INT i;
|
||||
NdisZeroMemory(&pCtrlBK->SelfFtStaTable, sizeof(pCtrlBK->SelfFtStaTable));
|
||||
for (i = 0; i < HASH_TABLE_SIZE; i++)
|
||||
pCtrlBK->SelfFtStaTable.hash[i] = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
FT_CLIENT_INFO *mt_iapp_ft_client_look_up(FT_CLIENT_TABLE *pFtTable,
|
||||
UCHAR *pAddr) {
|
||||
ULONG HashIdx;
|
||||
FT_CLIENT_INFO *ft_entry = NULL;
|
||||
|
||||
HashIdx = MAC_ADDR_HASH_INDEX(pAddr);
|
||||
ft_entry = pFtTable->hash[HashIdx];
|
||||
|
||||
while (ft_entry) {
|
||||
if (NdisCompareMemory(ft_entry->sta_mac, pAddr, ETH_ALEN) == 0)
|
||||
break;
|
||||
else
|
||||
ft_entry = ft_entry->next;
|
||||
}
|
||||
|
||||
return ft_entry;
|
||||
}
|
||||
|
||||
FT_CLIENT_INFO *mt_iapp_ft_client_insert(FT_CLIENT_TABLE *pFtTable,
|
||||
UCHAR *pStaAddr, UCHAR *pApAddr,
|
||||
INT32 ApIfIdx) {
|
||||
UCHAR HashIdx;
|
||||
INT idx = 0;
|
||||
FT_CLIENT_INFO *ft_entry = NULL;
|
||||
FT_CLIENT_INFO *current_ft_entry = NULL;
|
||||
|
||||
ft_entry = mt_iapp_ft_client_look_up(pFtTable, pStaAddr);
|
||||
if (ft_entry) {
|
||||
/* Update information */
|
||||
if (pApAddr)
|
||||
NdisCopyMemory(ft_entry->ap_mac, pApAddr, ETH_ALEN);
|
||||
ft_entry->if_idx = ApIfIdx;
|
||||
ft_entry->used = 1;
|
||||
return ft_entry;
|
||||
}
|
||||
|
||||
if (pFtTable->ft_sta_table_size >= MAX_NUM_OF_CLIENT) {
|
||||
DBGPRINT(RT_DEBUG_ERROR,
|
||||
("iapp> %s - FT client table is full. (FtStaTableSize=%d)\n",
|
||||
__FUNCTION__, pFtTable->ft_sta_table_size));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
for (idx = 0; idx < MAX_NUM_OF_CLIENT; idx++) {
|
||||
ft_entry = &pFtTable->ft_sta_info[idx];
|
||||
if (ft_entry->used)
|
||||
continue;
|
||||
if (pStaAddr)
|
||||
NdisCopyMemory(ft_entry->sta_mac, pStaAddr, ETH_ALEN);
|
||||
if (pApAddr)
|
||||
NdisCopyMemory(ft_entry->ap_mac, pApAddr, ETH_ALEN);
|
||||
ft_entry->if_idx = ApIfIdx;
|
||||
ft_entry->used = 1;
|
||||
break;
|
||||
}
|
||||
pFtTable->ft_sta_table_size++;
|
||||
|
||||
HashIdx = MAC_ADDR_HASH_INDEX(pStaAddr);
|
||||
ft_entry->hash_idx = HashIdx;
|
||||
if (pFtTable->hash[HashIdx] == NULL)
|
||||
pFtTable->hash[HashIdx] = ft_entry;
|
||||
else {
|
||||
current_ft_entry = pFtTable->hash[HashIdx];
|
||||
while (current_ft_entry->next != NULL)
|
||||
current_ft_entry = current_ft_entry->next;
|
||||
current_ft_entry->next = ft_entry;
|
||||
}
|
||||
return ft_entry;
|
||||
}
|
||||
|
||||
VOID mt_iapp_ft_client_delete(FT_CLIENT_TABLE *pFtTable, UCHAR *pStaAddr) {
|
||||
UCHAR HashIdx = 0xFF;
|
||||
FT_CLIENT_INFO *ft_entry = NULL;
|
||||
FT_CLIENT_INFO *hash_ft_entry = NULL;
|
||||
FT_CLIENT_INFO *pre_hash_ft_entry = NULL;
|
||||
|
||||
ft_entry = mt_iapp_ft_client_look_up(pFtTable, pStaAddr);
|
||||
|
||||
if (ft_entry == NULL) {
|
||||
DBGPRINT(
|
||||
RT_DEBUG_TRACE,
|
||||
("iapp> %s - cannot find this entry (%02x:%02x:%02x:%02x:%02x:%02x)\n",
|
||||
__FUNCTION__, pStaAddr[0], pStaAddr[1], pStaAddr[2], pStaAddr[3],
|
||||
pStaAddr[4], pStaAddr[5]));
|
||||
return;
|
||||
}
|
||||
|
||||
ft_entry->used = 0;
|
||||
NdisZeroMemory(ft_entry->ap_mac, ETH_ALEN);
|
||||
NdisZeroMemory(ft_entry->sta_mac, ETH_ALEN);
|
||||
ft_entry->if_idx = -1;
|
||||
|
||||
HashIdx = ft_entry->hash_idx;
|
||||
hash_ft_entry = pFtTable->hash[HashIdx];
|
||||
pre_hash_ft_entry = NULL;
|
||||
if (hash_ft_entry != NULL) {
|
||||
/* update Hash list*/
|
||||
do {
|
||||
if (hash_ft_entry == ft_entry) {
|
||||
if (pre_hash_ft_entry == NULL)
|
||||
pFtTable->hash[HashIdx] = ft_entry->next;
|
||||
else
|
||||
pre_hash_ft_entry->next = ft_entry->next;
|
||||
break;
|
||||
}
|
||||
|
||||
pre_hash_ft_entry = hash_ft_entry;
|
||||
hash_ft_entry = hash_ft_entry->next;
|
||||
} while (hash_ft_entry);
|
||||
}
|
||||
pFtTable->ft_sta_table_size--;
|
||||
}
|
||||
|
||||
INT32 mt_iapp_find_ifidx_by_sta_mac(FT_CLIENT_TABLE *pFtTable, UCHAR *pStaMAC) {
|
||||
FT_CLIENT_INFO *ft_entry = NULL;
|
||||
ft_entry = mt_iapp_ft_client_look_up(pFtTable, pStaMAC);
|
||||
if (ft_entry)
|
||||
return ft_entry->if_idx;
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
/* End of mt_iapp_util.c */
|
187
package/lean/mt/mtkiappd/src/rt_config.h
Normal file
187
package/lean/mt/mtkiappd/src/rt_config.h
Normal file
@ -0,0 +1,187 @@
|
||||
/****************************************************************************
|
||||
* Ralink Tech Inc.
|
||||
* Taiwan, R.O.C.
|
||||
*
|
||||
* (c) Copyright 2002, Ralink Technology, Inc.
|
||||
*
|
||||
* All rights reserved. Ralink's source code is an unpublished work and the
|
||||
* use of a copyright notice does not imply otherwise. This source code
|
||||
* contains confidential trade secret material of Ralink Tech. Any attemp
|
||||
* or participation in deciphering, decoding, reverse engineering or in any
|
||||
* way altering the source code is stricitly prohibited, unless the prior
|
||||
* written consent of Ralink Technology, Inc. is obtained.
|
||||
***************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
Abstract:
|
||||
|
||||
All related IEEE802.11f IAPP + IEEE802.11r IAPP extension.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef __RT_CONFIG_H__
|
||||
#define __RT_CONFIG_H__
|
||||
|
||||
/* Include Kernel file */
|
||||
#include <arpa/inet.h>
|
||||
#include <fcntl.h>
|
||||
#include <linux/if.h>
|
||||
#include <linux/if_packet.h>
|
||||
#include <linux/wireless.h>
|
||||
#include <net/if_arp.h>
|
||||
#include <netdb.h>
|
||||
#include <netinet/if_ether.h>
|
||||
#include <netinet/in.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/msg.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "rt_typedef.h"
|
||||
|
||||
/* Definition of OID to RALINK AP driver */
|
||||
#define OID_GET_SET_TOGGLE 0x8000
|
||||
#define RT_QUERY_SIGNAL_CONTEXT 0x0402
|
||||
#define RT_SET_IAPP_PID 0x0404
|
||||
#define RT_SET_APD_PID 0x0405
|
||||
#define RT_SET_DEL_MAC_ENTRY 0x0406
|
||||
#define RT_QUERY_EVENT_TABLE 0x0407
|
||||
|
||||
#define RT_SET_FT_STATION_NOTIFY 0x0408
|
||||
#define RT_SET_FT_KEY_REQ 0x0409
|
||||
#define RT_SET_FT_KEY_RSP 0x040a
|
||||
|
||||
#define RT_FT_KEY_SET 0x040b
|
||||
#define RT_FT_DATA_ENCRYPT 0x040c
|
||||
#define RT_FT_DATA_DECRYPT 0x040d
|
||||
#define RT_FT_NEIGHBOR_REPORT 0x040e
|
||||
#define RT_FT_NEIGHBOR_REQUEST 0x040f
|
||||
#define RT_FT_NEIGHBOR_RESPONSE 0x0410
|
||||
#define RT_FT_ACTION_FORWARD 0x0411
|
||||
|
||||
/* File path */
|
||||
// #define MSG_FILE "/etc/wireless/mt7615/mtkiappd.dat"
|
||||
#define EVENT_LOG_FILE "/var/log/mtkiappd.log"
|
||||
|
||||
/* ReDefinition */
|
||||
#define NdisZeroMemory(__Dst, __Len) memset(__Dst, 0, __Len)
|
||||
#define NdisFillMemory(__Dst, __Len, __Val) memset(__Dst, __Val, __Len)
|
||||
#define NdisMoveMemory(__Dst, __Src, __Len) memmove(__Dst, __Src, __Len)
|
||||
#define NdisCopyMemory(__Dst, __Src, __Len) memcpy(__Dst, __Src, __Len)
|
||||
#define NdisCompareMemory(__Dst, __Src, __Len) memcmp(__Dst, __Src, __Len)
|
||||
|
||||
VOID os_alloc_mem(UCHAR *pAd, UCHAR **ppMem, UINT32 Size);
|
||||
VOID os_free_mem(UCHAR *pAd, VOID *pMem);
|
||||
|
||||
/* Debug flag */
|
||||
#define RT_DEBUG_OFF 0
|
||||
#define RT_DEBUG_ERROR 1
|
||||
#define RT_DEBUG_WARN 2
|
||||
#define RT_DEBUG_TRACE 3
|
||||
#define RT_DEBUG_INFO 4
|
||||
|
||||
#define NIC_DBG_STRING (" ")
|
||||
|
||||
#ifdef DBG
|
||||
#define DBGPRINT(Level, Fmt) \
|
||||
{ \
|
||||
if (Level <= RTDebugLevel) { \
|
||||
printf Fmt; \
|
||||
} \
|
||||
}
|
||||
#else
|
||||
|
||||
/* no debug information */
|
||||
#define DBGPRINT(Level, Fmt)
|
||||
#endif
|
||||
|
||||
#define MAX_NUM_OF_EVENT 30 /* entry # in EVENT table */
|
||||
|
||||
typedef struct _RT_802_11_EVENT_LOG {
|
||||
|
||||
ULONG SystemTime; /* timestammp (jiffies) */
|
||||
UCHAR TriggerAddr[ETH_ALEN];
|
||||
UCHAR DetectorAddr[ETH_ALEN];
|
||||
UINT16 Event; /* EVENT_xxx */
|
||||
} RT_802_11_EVENT_LOG, *PRT_802_11_EVENT_LOG;
|
||||
|
||||
typedef struct _RT_802_11_EVENT_TABLE {
|
||||
|
||||
ULONG Num;
|
||||
RT_802_11_EVENT_LOG Log[MAX_NUM_OF_EVENT];
|
||||
} RT_802_11_EVENT_TABLE, *PRT_802_11_EVENT_TABLE;
|
||||
|
||||
#define PACKED __attribute__((packed))
|
||||
|
||||
typedef struct PACKED _FT_KDP_EVT_HEADER {
|
||||
|
||||
UINT32 EventLen;
|
||||
UINT32 PeerIpAddr;
|
||||
|
||||
} FT_KDP_EVT_HEADER;
|
||||
|
||||
typedef struct PACKED _RT_SIGNAL_STRUC {
|
||||
|
||||
VOID *pNext; /* point to next signal */
|
||||
|
||||
UINT16 Sequence;
|
||||
UCHAR MacAddr[ETH_ALEN];
|
||||
UCHAR CurrAPAddr[ETH_ALEN];
|
||||
|
||||
#define FT_KDP_SIG_NOTHING 0x00 /* no signal */
|
||||
#define FT_KDP_SIG_IAPP_ASSOCIATION 0x01 /* A station has associated */
|
||||
#define FT_KDP_SIG_IAPP_REASSOCIATION 0x02 /* A station has re-associated */
|
||||
#define FT_KDP_SIG_TERMINATE 0x03 /* terminate the daemon */
|
||||
|
||||
#define FT_KDP_SIG_FT_ASSOCIATION 0x50 /* A FT station has associated */
|
||||
#define FT_KDP_SIG_FT_REASSOCIATION 0x51 /* A FT station has re-associated */
|
||||
#define FT_KDP_SIG_KEY_TIMEOUT 0x52 /* PMK-R1 KEY Timeout */
|
||||
#define FT_KDP_SIG_KEY_REQ 0x53 /* Request PMK-R1 KEY from R0KH */
|
||||
#define FT_KDP_SIG_ACTION 0x54 /* Forward FT Action frame to DS */
|
||||
|
||||
#define FT_KDP_SIG_AP_INFO_REQ 0x70 /* request neighbor AP info. */
|
||||
#define FT_KDP_SIG_AP_INFO_RSP 0x71 /* response my AP info. */
|
||||
|
||||
/* FT KDP internal use */
|
||||
#define FT_KDP_SIG_KEY_REQ_AUTO 0xA0 /* Request PMK-R1 KEY from R0KH */
|
||||
#define FT_KDP_SIG_KEY_RSP_AUTO 0xA1 /* Response PMK-R1 KEY to R1KH */
|
||||
#define FT_KDP_SIG_INFO_BROADCAST 0xB0 /* broadcast our AP information */
|
||||
|
||||
#define FT_KSP_SIG_DEBUG_TRACE 0xC0 /* enable debug flag to TRACE */
|
||||
UCHAR Sig;
|
||||
|
||||
UCHAR MacAddrSa[ETH_ALEN];
|
||||
|
||||
/* IEEE80211R_SUPPORT */
|
||||
/* the first 6B are FT_KDP_EVT_HEADER */
|
||||
/*
|
||||
For FT_KDP_SIG_NOTHING: nothing
|
||||
For FT_KDP_SIG_IAPP_ASSOCIATION:nothing
|
||||
For FT_KDP_SIG_REASSOCIATION: nothing
|
||||
For FT_KDP_SIG_TERMINATE: nothing
|
||||
For FT_KDP_SIG_FT_ASSOCIATION: nothing
|
||||
FT_KDP_SIG_FT_REASSOCIATION: nothing
|
||||
For FT_KDP_SIG_KEY_TIMEOUT: it is
|
||||
For FT_KDP_SIG_KEY_REQ_AUTO: it is FT_KDP_EVT_KEY_REQ
|
||||
For FT_KDP_SIG_KEY_RSP_AUTO: it is FT_KDP_SIG_KEY_RSP
|
||||
*/
|
||||
UCHAR Reserved[3]; /* let Content address four-byte align */
|
||||
UCHAR Content[1024]; /* signal content */
|
||||
|
||||
#define RT_SIGNAL_STRUC_HDR_SIZE (sizeof(RT_SIGNAL_STRUC) - 1024)
|
||||
} RT_SIGNAL_STRUC, *PRT_SIGNAL_STRUC;
|
||||
|
||||
static INT32 RTDebugLevel = RT_DEBUG_ERROR;
|
||||
|
||||
#endif /* __RT_CONFIG_H__ */
|
||||
|
||||
/* End of rt_config.h */
|
22
package/lean/mt/mtkiappd/src/rt_typedef.h
Normal file
22
package/lean/mt/mtkiappd/src/rt_typedef.h
Normal file
@ -0,0 +1,22 @@
|
||||
#ifndef __RT_TYPEDEF_H__
|
||||
#define __RT_TYPEDEF_H__
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
typedef enum _BOOLEAN { FALSE = 0, TRUE = 1 } BOOLEAN;
|
||||
|
||||
typedef char CHAR;
|
||||
typedef int INT;
|
||||
|
||||
typedef int INT32;
|
||||
typedef int16_t INT16;
|
||||
typedef uint8_t UCHAR;
|
||||
typedef uint16_t UINT16;
|
||||
typedef uint32_t UINT;
|
||||
typedef uint32_t ULONG;
|
||||
typedef uint32_t UINT32;
|
||||
|
||||
typedef void VOID;
|
||||
typedef void *PVOID;
|
||||
|
||||
#endif
|
3946
package/lean/mt/mtkiappd/src/rtmpiapp.c
Normal file
3946
package/lean/mt/mtkiappd/src/rtmpiapp.c
Normal file
File diff suppressed because it is too large
Load Diff
580
package/lean/mt/mtkiappd/src/rtmpiapp.h
Normal file
580
package/lean/mt/mtkiappd/src/rtmpiapp.h
Normal file
@ -0,0 +1,580 @@
|
||||
/****************************************************************************
|
||||
* Ralink Tech Inc.
|
||||
* Taiwan, R.O.C.
|
||||
*
|
||||
* (c) Copyright 2002, Ralink Technology, Inc.
|
||||
*
|
||||
* All rights reserved. Ralink's source code is an unpublished work and the
|
||||
* use of a copyright notice does not imply otherwise. This source code
|
||||
* contains confidential trade secret material of Ralink Tech. Any attemp
|
||||
* or participation in deciphering, decoding, reverse engineering or in any
|
||||
* way altering the source code is stricitly prohibited, unless the prior
|
||||
* written consent of Ralink Technology, Inc. is obtained.
|
||||
***************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
Abstract:
|
||||
|
||||
All related IEEE802.11f IAPP + IEEE802.11r IAPP extension.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef __RTMP_IAPP_H__
|
||||
#define __RTMP_IAPP_H__
|
||||
|
||||
#include "rt_config.h"
|
||||
#include "rt_typedef.h"
|
||||
|
||||
#define IAPP_OS_LINUX
|
||||
//#define IAPP_OS_VXWORKS
|
||||
|
||||
/*
|
||||
IAPP issues:
|
||||
|
||||
1. Lack of fast roaming support, particularly required for voice;
|
||||
2. Only supports use of RADIUS (in a non-standard way);
|
||||
*/
|
||||
|
||||
/*
|
||||
Three levels of support for ESS formation are possible with the IAPP
|
||||
capabilities described here:
|
||||
|
||||
Level 1: no administrative or security support;
|
||||
Level 2: support for dynamic mapping of BSSID to IP addresses; and
|
||||
Level 3: support for encryption and authentication of IAPP messages.
|
||||
|
||||
Level 1 support can be achieved by configuring each AP in the ESS with
|
||||
the BSSID to IP address mapping for all other APs in the ESS. This may
|
||||
be acceptable for a small ESS.
|
||||
|
||||
Many ESS providers will need levels 2 or 3, which require RADIUS
|
||||
support.
|
||||
*/
|
||||
|
||||
/*
|
||||
Note with RALINK driver:
|
||||
|
||||
1. OID to RALINK AP driver;
|
||||
2. RT_SIGNAL_STRUC
|
||||
3. IAPP daemon must be run after br-lan & ra0 built up.
|
||||
*/
|
||||
|
||||
/* ---------------------------- User Definition ------------------------ */
|
||||
|
||||
#define FT_KDP_FUNC_SOCK_COMM /* use socket to communicate with driver */
|
||||
#define FT_KDP_FUNC_PKT_ENCRYPT /* do encryption for each IAPP packet */
|
||||
#define FT_KDP_SELECT_TIMEOUT /* use timeout to wait for any packet */
|
||||
#define FT_KDP_KEY_FROM_DAEMON /* key is set in daemon */
|
||||
#define FT_KDP_DEFAULT_IF_ETH "br-lan"
|
||||
#define FT_KDP_DEFAULT_IF_WLAN \
|
||||
"br-lan" /* used to receive command from WLAN \
|
||||
*/
|
||||
#define FT_KDP_DEFAULT_IF_WLAN_IOCTL "ra0" /* ioctl command to WLAN */
|
||||
|
||||
/*
|
||||
Inter-AP communications present opportunities to an attacker.
|
||||
The attacker can use IAPP or forged 802.11 MAC management frames as a
|
||||
Denial-of-Service (DoS) attack against a STA state in its AP.
|
||||
It can capture MOVE packets to gather information on the STA that is
|
||||
roaming. It can act as a rogue AP in the ESS.
|
||||
|
||||
If use RADIUS server, the IAPP entity sends the RADIUS Initiate-Request
|
||||
and receives the RADIUS Initiate-Accept or Initiate-Reject.
|
||||
If the Initiate-Accept is received, then the IAPP entity initializes
|
||||
its data structures, functions, and protocols. If an Initiate-Reject
|
||||
is received, the IAPP does not start.
|
||||
|
||||
The RADIUS servers provide two functions, mapping the BSSID of an AP to
|
||||
its IP address on the DSM and distribution of keys to the APs to allow
|
||||
the encryption of the communications between the APs.
|
||||
|
||||
The function of mapping the BSSID of an AP to its IP address on the DSM
|
||||
can also be accomplished by local configuration information or the IETF
|
||||
Inverse Address Resolution Protocol (RFC 2390:1998).
|
||||
|
||||
We don't support RADIUS server so we use a fixed PSK key to encrypt.
|
||||
*/
|
||||
#define FT_KDP_DEFAULT_PTK "zpxrjs9uo2kvbuqo"
|
||||
|
||||
#ifdef IAPP_OS_LINUX
|
||||
#define RT_IOCTL_IAPP (SIOCIWFIRSTPRIV + 0x01)
|
||||
#endif // IAPP_OS_LINUX //
|
||||
|
||||
#ifdef IAPP_OS_VXWORKS
|
||||
#define PF_PACKET AF_INET
|
||||
#define RT_IOCTL_IAPP VX_RT_PRIV_IOCTL
|
||||
#define FT_KDP_WLAN_NAME "ra"
|
||||
#define FT_KDP_WLAN_UNIT 0
|
||||
#define FT_KDP_ETH_NAME "eth" /* must not use mirror */
|
||||
#define FT_KDP_BR_ETH_IF_NUM 2 /* eth0 and eth1 */
|
||||
#define FT_KDP_BR_NAME "mirror"
|
||||
#define FT_KDP_BR_UNIT 0
|
||||
#endif // IAPP_OS_VXWORKS //
|
||||
|
||||
#define HASH_TABLE_SIZE 128
|
||||
#define MAX_NUM_OF_CLIENT 64
|
||||
|
||||
#define MAC_ADDR_HASH(Addr) \
|
||||
(Addr[0] ^ Addr[1] ^ Addr[2] ^ Addr[3] ^ Addr[4] ^ Addr[5])
|
||||
#define MAC_ADDR_HASH_INDEX(Addr) (MAC_ADDR_HASH(Addr) & (HASH_TABLE_SIZE - 1))
|
||||
|
||||
/* ---------------------------- MACRO Definition ---------------------------- */
|
||||
#define IAPP_LITTLE_ENDIAN /* __BIG_ENDIAN */
|
||||
|
||||
#ifdef IAPP_LITTLE_ENDIAN
|
||||
#define SWAP_16(x) \
|
||||
((UINT16)((((UINT16)(x) & (UINT16)0x00ffU) << 8) | \
|
||||
(((UINT16)(x) & (UINT16)0xff00U) >> 8)))
|
||||
#else
|
||||
|
||||
#define SWAP_16(x) x
|
||||
#endif
|
||||
|
||||
/* 16 for extra 8B encryption & 8B-align */
|
||||
#define IAPP_PKT_ALLOCATE(__pPkt, __Len) \
|
||||
IAPP_MEM_ALLOC(__pPkt, __Len + IAPP_SECURITY_EXTEND_LEN)
|
||||
#define IAPP_PKT_ZERO(__pPkt, __Len) \
|
||||
IAPP_MEM_ZERO(__pPkt, __Len + IAPP_SECURITY_EXTEND_LEN)
|
||||
|
||||
#define IAPP_MEM_ALLOC(__pMem, __Size) \
|
||||
{ \
|
||||
os_alloc_mem(NULL, (UCHAR **)(&__pMem), __Size); \
|
||||
IAPP_MemAllocNum++; \
|
||||
}
|
||||
#define IAPP_MEM_FREE(__Mem) \
|
||||
{ \
|
||||
os_free_mem(NULL, __Mem); \
|
||||
IAPP_MemFreeNum++; \
|
||||
}
|
||||
|
||||
/* calculate the size to the multiple of 8 */
|
||||
#define IAPP_ENCRYPTED_DATA_SIZE_CAL(__LenOfAction) \
|
||||
if ((__LenOfAction)&0x07) \
|
||||
(__LenOfAction) += 8 - ((__LenOfAction)&0x07); \
|
||||
__LenOfAction += 8;
|
||||
|
||||
#define IAPP_MEM_ZERO(__Dst, __Len) NdisZeroMemory(__Dst, __Len)
|
||||
#define IAPP_MEM_FILL(__Dst, __Val, __Len) NdisFillMemory(__Dst, __Len, __Val)
|
||||
#define IAPP_MEM_MOVE(__Dst, __Src, __Len) NdisMoveMemory(__Dst, __Src, __Len)
|
||||
|
||||
#define IAPP_HEX_DUMP(__pPrompt, __pBuf, __Len) \
|
||||
IAPP_HexDump((CHAR *)__pPrompt, (CHAR *)__pBuf, __Len)
|
||||
|
||||
#define IAPP_IOCTL_TO_WLAN(__pCtrlBK, __Param, __pData, __pLen, __ApIdx, \
|
||||
__Flags) \
|
||||
{ \
|
||||
IAPP_IoctlToWLAN(__pCtrlBK, __Param, (CHAR *)(__pData), (INT32 *)(__pLen), \
|
||||
__ApIdx, __Flags); \
|
||||
}
|
||||
|
||||
/* ---------------------------- Structure Definition ------------------------ */
|
||||
|
||||
/*
|
||||
IAPP supports three protocol sequences.
|
||||
|
||||
One is initiated by invoking the IAPP-ADD.request after the APME
|
||||
receives an MLME-ASSOCIATE.indication.
|
||||
|
||||
The second is initiated by invoking the IAPPMOVE.request after the APME
|
||||
receives an MLME-REASSOCIATE.indication.
|
||||
|
||||
The third is initiated by invoking the IAPP-CACHE.request to cache
|
||||
context in neighboring APs to facilitate fast roaming.
|
||||
*/
|
||||
|
||||
/* event log */
|
||||
#define FT_IP_ADDRESS_SIZE 4
|
||||
|
||||
/* IAPP header in the frame body, 6B */
|
||||
typedef struct PACKED _RT_IAPP_HEADER {
|
||||
|
||||
UCHAR Version; /* indicates the protocol version of the IAPP */
|
||||
UCHAR Command; /* ADD-notify, MOVE-notify, etc. */
|
||||
UINT16 Identifier; /* aids in matching requests and responses */
|
||||
UINT16 Length; /* indicates the length of the entire packet */
|
||||
} RT_IAPP_HEADER;
|
||||
|
||||
/* IAPP Action Frame */
|
||||
/* ADD notify frame */
|
||||
typedef struct PACKED _RT_IAPP_ADD_NOTIFY {
|
||||
|
||||
RT_IAPP_HEADER IappHeader;
|
||||
|
||||
/* the number of octets in the MAC Address */
|
||||
UCHAR AddressLen;
|
||||
|
||||
/* should be sent with a value of zero */
|
||||
#define FT_KDP_ADD_NOTIFY_RSVD_11R_SUPPORT 0x01
|
||||
UCHAR Rsvd;
|
||||
|
||||
/* the MAC address of the STA that has associated */
|
||||
UCHAR MacAddr[ETH_ALEN];
|
||||
|
||||
/* the integer value of the sequence number of the association request frame
|
||||
*/
|
||||
/*
|
||||
The 802.11 sequence number may be an ambiguous indication of the most
|
||||
recent association. But, this information may be useful to an
|
||||
algorithm making a determination of the location of the most recent
|
||||
association of a STA.
|
||||
*/
|
||||
UINT16 Sequence;
|
||||
|
||||
} RT_IAPP_ADD_NOTIFY;
|
||||
|
||||
/* MOVE requset frame */
|
||||
typedef struct PACKED _RT_IAPP_MOVE_NOTIFY {
|
||||
|
||||
RT_IAPP_HEADER IappHeader;
|
||||
|
||||
/* the number of octets in the MAC Address */
|
||||
UCHAR AddressLen;
|
||||
|
||||
/* should be sent with a value of zero */
|
||||
UCHAR Rsvd;
|
||||
|
||||
/* the MAC address of the STA that has associated */
|
||||
UCHAR MacAddr[ETH_ALEN];
|
||||
|
||||
/* the integer value of the sequence number of the association request frame
|
||||
*/
|
||||
UINT16 Sequence;
|
||||
|
||||
/* indicates the number of octets in the Context Block field, always 0 */
|
||||
UINT16 LenOfContextBlock;
|
||||
|
||||
} RT_IAPP_MOVE_NOTIFY;
|
||||
|
||||
/* MOVE response frame */
|
||||
typedef struct PACKED _RT_IAPP_MOVE_RSP {
|
||||
|
||||
RT_IAPP_HEADER IappHeader;
|
||||
|
||||
/* the number of octets in the MAC Address */
|
||||
UCHAR AddressLen;
|
||||
|
||||
#define IAPP_MOVE_RSP_STATUS_SUCCESS 0
|
||||
#define IAPP_MOVE_RSP_STATUS_DENY 1
|
||||
#define IAPP_MOVE_RSP_STATUS_STALE 2
|
||||
/* 0 Successful, 1 Move denied, 2 Stale move */
|
||||
/*
|
||||
FAIL indicates that a RADIUS Access-Reject was received in response
|
||||
to the RADIUS Access-Request sent to the RADUS server to look up the
|
||||
IP address of the Old AP. (not use the IP in the MOVE-notify frame)
|
||||
*/
|
||||
UCHAR Status;
|
||||
|
||||
/* the MAC address of the STA that has associated */
|
||||
UCHAR MacAddr[ETH_ALEN];
|
||||
|
||||
/* the integer value of the sequence number of the association request frame
|
||||
*/
|
||||
UINT16 Sequence;
|
||||
|
||||
/* indicates the number of octets in the Context Block field, always 0 */
|
||||
UINT16 LenOfContextBlock;
|
||||
|
||||
} RT_IAPP_MOVE_RSP;
|
||||
|
||||
/* SEND-SECURITY-BLOCK frame */
|
||||
typedef struct PACKED _RT_IAPP_SEND_SECURITY_BLOCK {
|
||||
|
||||
RT_IAPP_HEADER IappHeader;
|
||||
|
||||
/* first 8 bytes of the ACK nonce */
|
||||
#define IAPP_SB_INIT_VEC_SIZE 8
|
||||
UCHAR InitVec[8];
|
||||
|
||||
/* indicates the number of octets in the Security Block field */
|
||||
UINT16 Length;
|
||||
|
||||
/*
|
||||
Contains the security information being forwarded from the
|
||||
RADIUS Server through the new AP to the old AP.
|
||||
*/
|
||||
UCHAR SB[0];
|
||||
|
||||
} RT_IAPP_SEND_SECURITY_BLOCK;
|
||||
|
||||
/* no use */
|
||||
typedef struct PACKED _RT_IAPP_ACK_SECURITY_BLOCK {
|
||||
|
||||
RT_IAPP_HEADER IappHeader;
|
||||
|
||||
/* copied from the Date/Time stamp */
|
||||
UCHAR InitVec[8];
|
||||
|
||||
/*
|
||||
Content of the New-AP-ACK-Authenticator information element that
|
||||
the old AP received in the Security Block.
|
||||
*/
|
||||
UCHAR NewApAckAuth[48];
|
||||
|
||||
} RT_IAPP_ACK_SECURITY_BLOCK;
|
||||
|
||||
/* private frame */
|
||||
typedef struct PACKED _RT_IAPP_INFORMATION {
|
||||
|
||||
#define IAPP_INFO_TYPE_BC 0
|
||||
#define IAPP_INFO_TYPE_REQ 1
|
||||
#define IAPP_INFO_TYPE_RSP 2
|
||||
#define IAPP_INFO_TYPE_MAX_NUM 3
|
||||
|
||||
RT_IAPP_HEADER IappHeader;
|
||||
|
||||
/* indicates the number of octets in the Information Block field */
|
||||
UINT16 Length;
|
||||
|
||||
/* contains the AP information being forwarded */
|
||||
UCHAR IB[0];
|
||||
|
||||
} RT_IAPP_INFORMATION;
|
||||
|
||||
typedef struct PACKED _RT_IAPP_SECURITY_MONITOR {
|
||||
|
||||
RT_IAPP_HEADER IappHeader;
|
||||
RT_802_11_EVENT_TABLE EvtTab;
|
||||
} RT_IAPP_SECURITY_MONITOR, *PRT_IAPP_SECURITY_MONITOR;
|
||||
|
||||
/* Event structure between daemon and driver */
|
||||
#define FT_KDP_EVT_HEADER_SIZE sizeof(FT_KDP_EVT_HEADER)
|
||||
|
||||
typedef struct _OID_REQ {
|
||||
|
||||
INT32 OID;
|
||||
INT32 Len;
|
||||
CHAR Buf[0];
|
||||
} OID_REQ, *POID_REQ;
|
||||
|
||||
typedef struct _MSG_BUF {
|
||||
|
||||
INT32 MsgType;
|
||||
INT32 MsgSubType;
|
||||
CHAR Buf[1024];
|
||||
} MSG_BUF, *PMSG_BUF;
|
||||
|
||||
/* Layer 2 Update frame to switch/bridge */
|
||||
typedef struct PACKED _FT_ETH_HEADER {
|
||||
|
||||
UCHAR DA[ETH_ALEN];
|
||||
UCHAR SA[ETH_ALEN];
|
||||
UINT16 Len;
|
||||
|
||||
} FT_ETH_HEADER;
|
||||
|
||||
/* For any Layer2 devices, e.g., bridges, switches and other APs, the frame
|
||||
can update their forwarding tables with the correct port to reach the new
|
||||
location of the STA */
|
||||
typedef struct PACKED _RT_IAPP_L2_UPDATE_FRAME {
|
||||
|
||||
FT_ETH_HEADER ETH;
|
||||
UCHAR DSAP; /* must be NULL */
|
||||
UCHAR SSAP; /* must be NULL */
|
||||
UCHAR Control; /* reference to IEEE Std 802.2 */
|
||||
UCHAR XIDInfo[3]; /* reference to IEEE Std 802.2 */
|
||||
} RT_IAPP_L2_UPDATE_FRAME, *PRT_IAPP_L2_UPDATE_FRAME;
|
||||
|
||||
/* RRB protocol */
|
||||
typedef struct PACKED _FT_RRB_FRAME {
|
||||
/* ethernet header */
|
||||
FT_ETH_HEADER ETH;
|
||||
|
||||
/* shall be set to 1 */
|
||||
#define FT_RRB_FRAME_TYPE 1
|
||||
UCHAR RemoteFrameType;
|
||||
|
||||
/* 0 for Remote Request, and to 1 for Remote Response */
|
||||
UCHAR FTPacketType;
|
||||
|
||||
/* the length in octets of the FT Action Frame field */
|
||||
UINT16 FTActionLength;
|
||||
|
||||
/* the BSSID of the current AP */
|
||||
UCHAR ApAddress[ETH_ALEN];
|
||||
|
||||
/*
|
||||
The contents of the FT Action frame, from the Category field to the
|
||||
end of the Action Frame body.
|
||||
*/
|
||||
#define FT_RRB_HEADER_SIZE (sizeof(FT_RRB_FRAME))
|
||||
UCHAR FTActionFrame[0];
|
||||
} FT_RRB_FRAME;
|
||||
|
||||
typedef struct _FT_CLIENT_INFO {
|
||||
struct _FT_CLIENT_INFO *next;
|
||||
INT if_idx;
|
||||
UCHAR sta_mac[ETH_ALEN];
|
||||
UCHAR ap_mac[ETH_ALEN];
|
||||
UCHAR used;
|
||||
UCHAR hash_idx;
|
||||
} FT_CLIENT_INFO;
|
||||
|
||||
typedef struct _FT_CLIENT_TABLE {
|
||||
FT_CLIENT_INFO *hash[HASH_TABLE_SIZE];
|
||||
FT_CLIENT_INFO ft_sta_info[MAX_NUM_OF_CLIENT];
|
||||
INT32 ft_sta_table_size;
|
||||
} FT_CLIENT_TABLE;
|
||||
|
||||
/* IAPP control block */
|
||||
#define IAPP_ENCRYPT_KEY_MAX_SIZE 64
|
||||
#define MAX_WIFI_COUNT 2
|
||||
typedef struct _RTMP_IAPP {
|
||||
|
||||
CHAR IfNameEth[IFNAMSIZ]; /* ethernet interface name */
|
||||
CHAR IfNameWlan[IFNAMSIZ]; /* wireless interface name */
|
||||
CHAR IfNameWlanIoctl[MAX_WIFI_COUNT][IFNAMSIZ]; /* wireless interface name */
|
||||
UCHAR IfNameWlanMAC[MAX_WIFI_COUNT][ETH_ALEN]; /* wireless interface name */
|
||||
INT32 IfNameWlanCount;
|
||||
|
||||
BOOLEAN FlgIsTerminated; /* if terminate IAPP daemon */
|
||||
|
||||
struct in_addr AddrOwn; /* IP address of ethernet interface */
|
||||
struct in_addr AddrNetmask; /* netmask of ethernet interface */
|
||||
struct in_addr AddrBroadcast; /* broadcast address of ethernet interface */
|
||||
|
||||
BOOLEAN FlgIsRcvRunning; /* if rcv handler is running */
|
||||
|
||||
INT32 SocketUdpSend; /* used to send/rcv IAPP multicast frame */
|
||||
INT32 SocketTcpRcv; /* used to rcv unicast frame from a peer */
|
||||
INT32 SocketRawBr; /* used to send bridge L2 frame */
|
||||
INT32 SocketIoctl; /* used to ioctl() to WLAN driver */
|
||||
INT32 SocketRawRRB; /* used in RRB RAW protocol */
|
||||
|
||||
#ifdef FT_KDP_FUNC_SOCK_COMM
|
||||
INT32 SocketRawDrv; /* used to receive message from driver */
|
||||
#endif // FT_KDP_FUNC_SOCK_COMM //
|
||||
|
||||
#ifndef FT_KDP_FUNC_SOCK_COMM
|
||||
#ifdef IAPP_OS_LINUX
|
||||
#define FT_KDP_PIPE_ID_READ 0
|
||||
#define FT_KDP_PIPE_ID_WRITE 1
|
||||
INT32 PipeRawDrv[2]; /* used to receive message from driver */
|
||||
#endif // IAPP_OS_LINUX //
|
||||
#endif // FT_KDP_FUNC_SOCK_COMM //
|
||||
|
||||
#ifdef IAPP_OS_VXWORKS
|
||||
VOID *pBcCookie[FT_KDP_BR_ETH_IF_NUM]; /* for bridge L2 frame */
|
||||
VOID *pDrvCookieTo; /* for ioctl to WLAN driver */
|
||||
VOID *pDrvCookieFrom; /* for ioctl from WLAN driver */
|
||||
VOID *pRrbCookieTo[FT_KDP_BR_ETH_IF_NUM]; /* used in RRB protocol */
|
||||
VOID *pRrbCookieFrom; /* for ioctl from WLAN driver */
|
||||
|
||||
#define IAPP_KDP_PIPE_DRV "/pipe/IAPP_Drv"
|
||||
#define IAPP_KDP_PIPE_ETH "/pipe/IAPP_Eth"
|
||||
#endif // IAPP_OS_VXWORKS //
|
||||
|
||||
#ifdef IAPP_EVENT_LOG
|
||||
INT32 MsgId;
|
||||
BOOLEAN FlgIsMsgReady;
|
||||
#endif // IAPP_EVENT_LOG //
|
||||
|
||||
pid_t PID; /* IAPP task PID */
|
||||
UINT16 PacketIdentifier; /* used in IAPP frame identifier */
|
||||
|
||||
#ifdef FT_KDP_FUNC_PKT_ENCRYPT
|
||||
/* common key, ASCII, the last byte must be 0x00 */
|
||||
CHAR CommonKey[IAPP_ENCRYPT_KEY_MAX_SIZE + 1];
|
||||
#endif // FT_KDP_FUNC_PKT_ENCRYPT //
|
||||
|
||||
FT_CLIENT_TABLE SelfFtStaTable;
|
||||
} RTMP_IAPP, *PRTMP_IAPP;
|
||||
|
||||
/* key information */
|
||||
#define FT_IP_ADDRESS_SIZE 4
|
||||
#define FT_NONCE_SIZE 8
|
||||
|
||||
#define FT_KDP_WPA_NAME_MAX_SIZE 16
|
||||
#define FT_KDP_R0KHID_MAX_SIZE 48
|
||||
#define FT_KDP_R1KHID_MAX_SIZE 6
|
||||
#define FT_KDP_S1KHID_MAX_SIZE 6
|
||||
#define FT_KDP_PMKR1_MAX_SIZE 32 /* 256-bit key */
|
||||
|
||||
#define FT_R1KH_ENTRY_TABLE_SIZE 64
|
||||
#define FT_R1KH_ENTRY_HASH_TABLE_SIZE FT_R1KH_ENTRY_TABLE_SIZE
|
||||
|
||||
typedef struct PACKED _FT_KDP_PMK_KEY_INFO {
|
||||
|
||||
UCHAR R0KHID[FT_KDP_R0KHID_MAX_SIZE];
|
||||
UCHAR R0KHIDLen;
|
||||
UCHAR PMKR0Name[FT_KDP_WPA_NAME_MAX_SIZE]; /* an ID that names the PMK-R0 */
|
||||
|
||||
UCHAR R1KHID[FT_KDP_R1KHID_MAX_SIZE];
|
||||
UCHAR S1KHID[FT_KDP_S1KHID_MAX_SIZE];
|
||||
|
||||
/* reserved field */
|
||||
UCHAR RSV[4];
|
||||
|
||||
} FT_KDP_PMK_KEY_INFO;
|
||||
|
||||
typedef struct PACKED _FT_KDP_EVT_KEY_ELM {
|
||||
/* must be 65535, Proprietary Information */
|
||||
#define FT_KDP_ELM_ID_PRI 65535
|
||||
UINT16 ElmId;
|
||||
|
||||
#define FT_KDP_ELM_PRI_LEN (sizeof(FT_KDP_EVT_KEY_ELM) - 4)
|
||||
UINT16 ElmLen;
|
||||
|
||||
/* must be 0x00 0x0E 0x2E, RALINK */
|
||||
#define FT_KDP_ELM_PRI_OUI_0 0x00
|
||||
#define FT_KDP_ELM_PRI_OUI_1 0x0E
|
||||
#define FT_KDP_ELM_PRI_OUI_2 0x2E
|
||||
#define FT_KDP_ELM_PRI_OUI_SIZE 3
|
||||
UCHAR OUI[3];
|
||||
|
||||
/* station MAC */
|
||||
UCHAR MacAddr[ETH_ALEN];
|
||||
UCHAR RSV[3];
|
||||
|
||||
/* used in request */
|
||||
FT_KDP_PMK_KEY_INFO KeyInfo;
|
||||
|
||||
/* used in response */
|
||||
UCHAR PMKR1Name[FT_KDP_WPA_NAME_MAX_SIZE]; /* an ID that names the PMK-R1 */
|
||||
UCHAR PMKR1[FT_KDP_PMKR1_MAX_SIZE]; /* PMK R1 Key */
|
||||
UCHAR R0KH_MAC[ETH_ALEN]; /* MAC of R0KH */
|
||||
|
||||
/*
|
||||
During a Fast BSS Transition a non-AP STA shall negotiate the same
|
||||
pairwise cipher suite with Target APs as was negotiated in the FT
|
||||
Initial Mobility Domain association. The target AP shall verify
|
||||
that the same pairwise cipher suite selector is used, using the
|
||||
pairwise cipher suite selector value in the PMK-R1 SA received from
|
||||
the R0KH.
|
||||
*/
|
||||
UCHAR PairwisChipher[4];
|
||||
UCHAR AkmSuite[4];
|
||||
|
||||
UINT32 KeyLifeTime;
|
||||
UINT32 ReassocDeadline;
|
||||
} FT_KDP_EVT_KEY_ELM;
|
||||
|
||||
/* ---------------------------- API Definition ------------------------ */
|
||||
|
||||
VOID IAPP_HexDump(CHAR *pPromptStr, CHAR *pSrcBufVA, UINT32 SrcBufLen);
|
||||
|
||||
BOOLEAN IAPP_IoctlToWLAN(RTMP_IAPP *pCtrlBK, INT32 Param, CHAR *pData,
|
||||
INT32 *pDataLen, UCHAR ApIdx, INT32 Flags);
|
||||
|
||||
BOOLEAN mt_iapp_get_wifi_iface_mac(RTMP_IAPP *pCtrlBK);
|
||||
|
||||
INT32 mt_iapp_find_ifidx_by_mac(RTMP_IAPP *pCtrlBK, UCHAR *WifiMAC);
|
||||
|
||||
VOID mt_iapp_set_daemon_information(RTMP_IAPP *pCtrlBK, pid_t *pPidAuth);
|
||||
|
||||
VOID mt_iapp_ft_client_table_init(RTMP_IAPP *pCtrlBK);
|
||||
|
||||
FT_CLIENT_INFO *mt_iapp_ft_client_look_up(FT_CLIENT_TABLE *pFtTable,
|
||||
UCHAR *pAddr);
|
||||
|
||||
FT_CLIENT_INFO *mt_iapp_ft_client_insert(FT_CLIENT_TABLE *pFtTable,
|
||||
UCHAR *pStaAddr, UCHAR *pApAddr,
|
||||
INT32 ApIfIdx);
|
||||
|
||||
VOID mt_iapp_ft_client_delete(FT_CLIENT_TABLE *pFtTable, UCHAR *pStaAddr);
|
||||
|
||||
INT32 mt_iapp_find_ifidx_by_sta_mac(FT_CLIENT_TABLE *pFtTable, UCHAR *pStaMAC);
|
||||
|
||||
#endif /* __RTMP_IAPP_H__ */
|
||||
|
||||
/* End of rtmp_iapp.h */
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=argp-standalone
|
||||
PKG_VERSION:=1.3
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=http://www.lysator.liu.se/~nisse/misc/
|
||||
@ -20,6 +20,7 @@ PKG_LICENSE:=LGPL-2.1
|
||||
PKG_LICENSE:=Makefile.am
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
|
||||
define Package/argp-standalone
|
||||
SECTION:=libs
|
||||
@ -33,8 +34,10 @@ define Package/argp-standalone/description
|
||||
endef
|
||||
|
||||
MAKE_FLAGS += \
|
||||
CFLAGS="$(TARGET_CFLAGS) $(FPIC)"
|
||||
CFLAGS="$(TARGET_CFLAGS) $(FPIC) -std=gnu89"
|
||||
|
||||
HOST_MAKE_FLAGS += \
|
||||
CFLAGS="$(HOST_CFLAGS) $(FPIC) -std=gnu89"
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
@ -45,4 +48,14 @@ define Build/InstallDev
|
||||
$(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Host/Install
|
||||
$(INSTALL_DIR) $(1)/include
|
||||
$(CP) $(HOST_BUILD_DIR)/argp.h \
|
||||
$(1)/include/
|
||||
$(INSTALL_DIR) $(1)/lib
|
||||
$(CP) $(HOST_BUILD_DIR)/libargp.a \
|
||||
$(1)/lib/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,argp-standalone))
|
||||
$(eval $(call HostBuild))
|
||||
|
@ -7,12 +7,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=elfutils
|
||||
PKG_VERSION:=0.186
|
||||
PKG_VERSION:=0.188
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=https://sourceware.org/$(PKG_NAME)/ftp/$(PKG_VERSION)
|
||||
PKG_HASH:=7f6fb9149b1673d38d9178a0d3e0fb8a1ec4f53a9f4c2ff89469609879641177
|
||||
PKG_HASH:=fb8b0e8d0802005b9a309c60c1d8de32dd2951b56f0c3a3cb56d21ce01595dff
|
||||
|
||||
PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
|
||||
PKG_LICENSE:=GPL-3.0-or-later
|
||||
@ -26,7 +26,6 @@ PKG_BUILD_DEPENDS:=!USE_GLIBC:argp-standalone
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/nls.mk
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
|
||||
define Package/elfutils/Default
|
||||
SECTION:=libs
|
||||
@ -62,6 +61,8 @@ CONFIGURE_ARGS += --disable-nls
|
||||
endif
|
||||
|
||||
HOST_CONFIGURE_ARGS += \
|
||||
--disable-shared \
|
||||
--disable-nls \
|
||||
--disable-debuginfod \
|
||||
--disable-libdebuginfod \
|
||||
--without-lzma \
|
||||
@ -110,7 +111,6 @@ define Package/libelf/install
|
||||
endef
|
||||
|
||||
# these lines need to be ordered by dependency because of ABI versioning
|
||||
$(eval $(call HostBuild))
|
||||
$(eval $(call BuildPackage,libelf))
|
||||
$(eval $(call BuildPackage,libdw))
|
||||
$(eval $(call BuildPackage,libasm))
|
||||
|
@ -11,7 +11,7 @@
|
||||
Requires.private: zlib
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -610,6 +610,9 @@ dnl AM_GNU_GETTEXT_REQUIRE_VERSION suppo
|
||||
@@ -652,6 +652,9 @@ dnl AM_GNU_GETTEXT_REQUIRE_VERSION suppo
|
||||
AM_GNU_GETTEXT_VERSION([0.19.6])
|
||||
AM_GNU_GETTEXT_REQUIRE_VERSION([0.19.6])
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
}
|
||||
--- a/libdwfl/dwfl_error.c
|
||||
+++ b/libdwfl/dwfl_error.c
|
||||
@@ -140,6 +140,7 @@ __libdwfl_seterrno (Dwfl_Error error)
|
||||
@@ -139,6 +139,7 @@ __libdwfl_seterrno (Dwfl_Error error)
|
||||
static const char *
|
||||
errnomsg(int error)
|
||||
{
|
||||
@ -17,7 +17,7 @@
|
||||
/* Won't be changed by strerror_r, but not const so compiler doesn't throw warning */
|
||||
static char unknown[] = "unknown error";
|
||||
|
||||
@@ -150,6 +151,9 @@ errnomsg(int error)
|
||||
@@ -149,6 +150,9 @@ errnomsg(int error)
|
||||
static __thread char msg[128];
|
||||
return strerror_r (error, msg, sizeof (msg)) ? unknown : msg;
|
||||
#endif
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/libdwfl/argp-std.c
|
||||
+++ b/libdwfl/argp-std.c
|
||||
@@ -53,9 +53,6 @@ static const struct argp_option options[
|
||||
@@ -51,9 +51,6 @@ static const struct argp_option options[
|
||||
{ "linux-process-map", 'M', "FILE", 0,
|
||||
N_("Find addresses in files mapped as read from FILE"
|
||||
" in Linux /proc/PID/maps format"), 0 },
|
||||
@ -10,7 +10,7 @@
|
||||
{ "debuginfo-path", OPT_DEBUGINFO, "PATH", 0,
|
||||
N_("Search path for separate debuginfo files"), 0 },
|
||||
{ NULL, 0, NULL, 0, NULL, 0 }
|
||||
@@ -82,15 +79,6 @@ static const Dwfl_Callbacks proc_callbac
|
||||
@@ -80,15 +77,6 @@ static const Dwfl_Callbacks proc_callbac
|
||||
.find_elf = INTUSE(dwfl_linux_proc_find_elf),
|
||||
};
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
/* Structure held at state->HOOK. */
|
||||
struct parse_opt
|
||||
{
|
||||
@@ -223,43 +211,6 @@ parse_opt (int key, char *arg, struct ar
|
||||
@@ -221,43 +209,6 @@ parse_opt (int key, char *arg, struct ar
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -8,12 +8,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=gettext-full
|
||||
PKG_VERSION:=0.21
|
||||
PKG_RELEASE:=2
|
||||
PKG_VERSION:=0.21.1
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=gettext-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=@GNU/gettext
|
||||
PKG_HASH:=d20fcbb537e02dcf1383197ba05bd0734ef7bf5db06bdb241eb69b7d16b73192
|
||||
PKG_HASH:=50dbc8f39797950aa2c98e939947c527e5ac9ebd2c1b99dd7b06ba33a6767ae6
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/gettext-$(PKG_VERSION)
|
||||
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/gettext-$(PKG_VERSION)
|
||||
|
||||
@ -24,8 +24,8 @@ PKG_CPE_ID:=cpe:/a:gnu:gettext
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_INSTALL:=1
|
||||
PKG_BUILD_DEPENDS:=gettext-full/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
HOST_BUILD_PARALLEL:=1
|
||||
PKG_BUILD_PARALLEL:=0
|
||||
HOST_BUILD_PARALLEL:=0
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
@ -88,6 +88,11 @@ define Build/InstallDev
|
||||
$(SED) '/read dummy/d' $(STAGING_DIR_HOSTPKG)/bin/gettextize
|
||||
endef
|
||||
|
||||
define Host/Install
|
||||
$(call Host/Install/Default)
|
||||
$(LN) msgfmt $(STAGING_DIR_HOSTPKG)/bin/gmsgfmt
|
||||
endef
|
||||
|
||||
define Package/libintl-full/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libintl.so.* $(1)/usr/lib/
|
||||
|
@ -12,7 +12,7 @@
|
||||
$(INSTALL_DATA) $$dir/$$file $(DESTDIR)$(htmldir)/$$file; \
|
||||
--- a/gettext-tools/man/Makefile.am
|
||||
+++ b/gettext-tools/man/Makefile.am
|
||||
@@ -157,8 +157,7 @@ recode-sr-latin.1.html: recode-sr-latin.
|
||||
@@ -158,8 +158,7 @@ recode-sr-latin.1.html: recode-sr-latin.
|
||||
gettextize.1.html: gettextize.1
|
||||
autopoint.1.html: autopoint.1
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
--- a/gettext-runtime/gnulib-m4/stddef_h.m4
|
||||
+++ b/gettext-runtime/gnulib-m4/stddef_h.m4
|
||||
@@ -8,7 +8,7 @@ dnl with or without modifications, as lo
|
||||
AC_DEFUN([gl_STDDEF_H],
|
||||
@@ -9,7 +9,7 @@ dnl A placeholder for <stddef.h>, for pl
|
||||
AC_DEFUN_ONCE([gl_STDDEF_H],
|
||||
[
|
||||
AC_REQUIRE([gl_STDDEF_H_DEFAULTS])
|
||||
- AC_REQUIRE([gt_TYPE_WCHAR_T])
|
||||
+ AC_REQUIRE([gt_TYPE_WCHAR_T_GT])
|
||||
STDDEF_H=
|
||||
|
||||
dnl Test whether the type max_align_t exists and whether its alignment
|
||||
dnl Persuade OpenBSD <stddef.h> to declare max_align_t.
|
||||
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
|
||||
--- a/gettext-runtime/gnulib-m4/stdint.m4
|
||||
+++ b/gettext-runtime/gnulib-m4/stdint.m4
|
||||
@@ -15,7 +15,7 @@ AC_DEFUN_ONCE([gl_STDINT_H],
|
||||
@ -22,7 +22,7 @@
|
||||
dnl macros.
|
||||
--- a/gettext-runtime/gnulib-m4/wchar_h.m4
|
||||
+++ b/gettext-runtime/gnulib-m4/wchar_h.m4
|
||||
@@ -27,7 +27,7 @@ AC_DEFUN([gl_WCHAR_H],
|
||||
@@ -27,7 +27,7 @@ AC_DEFUN_ONCE([gl_WCHAR_H],
|
||||
|
||||
AC_REQUIRE([gl_FEATURES_H])
|
||||
|
||||
@ -44,7 +44,7 @@
|
||||
[AC_COMPILE_IFELSE(
|
||||
--- a/gettext-runtime/gnulib-m4/wctype_h.m4
|
||||
+++ b/gettext-runtime/gnulib-m4/wctype_h.m4
|
||||
@@ -22,7 +22,7 @@ AC_DEFUN([gl_WCTYPE_H],
|
||||
@@ -22,7 +22,7 @@ AC_DEFUN_ONCE([gl_WCTYPE_H],
|
||||
fi
|
||||
AC_SUBST([HAVE_ISWCNTRL])
|
||||
|
||||
@ -77,26 +77,6 @@
|
||||
[
|
||||
AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t],
|
||||
[AC_COMPILE_IFELSE(
|
||||
--- a/gettext-runtime/intl/Makefile.am
|
||||
+++ b/gettext-runtime/intl/Makefile.am
|
||||
@@ -274,7 +274,7 @@ libgnuintl.h: $(srcdir)/libgnuintl.in.h
|
||||
-e 's,@''HAVE_ASPRINTF''@,@HAVE_ASPRINTF@,g' \
|
||||
-e 's,@''HAVE_SNPRINTF''@,@HAVE_SNPRINTF@,g' \
|
||||
-e 's,@''HAVE_WPRINTF''@,@HAVE_WPRINTF@,g' \
|
||||
- -e 's,@''HAVE_NAMELESS_LOCALES''@,@HAVE_NAMELESS_LOCALES@,g' \
|
||||
+ -e 's,@''HAVE_NAMELESS_LOCALES''@,0,g' \
|
||||
-e 's,@''HAVE_NEWLOCALE''@,@HAVE_NEWLOCALE@,g' \
|
||||
< $(srcdir)/libgnuintl.in.h \
|
||||
| if test '@WOE32DLL@' = yes; then \
|
||||
@@ -294,7 +294,7 @@ libintl.h: $(srcdir)/libgnuintl.in.h
|
||||
-e 's,@''HAVE_ASPRINTF''@,@HAVE_ASPRINTF@,g' \
|
||||
-e 's,@''HAVE_SNPRINTF''@,@HAVE_SNPRINTF@,g' \
|
||||
-e 's,@''HAVE_WPRINTF''@,@HAVE_WPRINTF@,g' \
|
||||
- -e 's,@''HAVE_NAMELESS_LOCALES''@,@HAVE_NAMELESS_LOCALES@,g' \
|
||||
+ -e 's,@''HAVE_NAMELESS_LOCALES''@,0,g' \
|
||||
-e 's,@''HAVE_NEWLOCALE''@,@HAVE_NEWLOCALE@,g' \
|
||||
< $(srcdir)/libgnuintl.in.h > libintl.h
|
||||
MOSTLYCLEANFILES += libintl.h
|
||||
--- a/gettext-runtime/libasprintf/configure.ac
|
||||
+++ b/gettext-runtime/libasprintf/configure.ac
|
||||
@@ -76,8 +76,8 @@ dnl Checks for typedefs, structures, and
|
||||
@ -145,30 +125,6 @@
|
||||
AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
|
||||
AC_REQUIRE([gt_TYPE_INTMAX_T])
|
||||
AC_REQUIRE([gt_PRINTF_POSIX])
|
||||
--- a/gettext-tools/gnulib-m4/gnulib-comp.m4
|
||||
+++ b/gettext-tools/gnulib-m4/gnulib-comp.m4
|
||||
@@ -1843,8 +1843,8 @@ changequote([, ])dnl
|
||||
AC_REQUIRE([gl_SOCKETS])
|
||||
gl_TYPE_SOCKLEN_T
|
||||
gl_STDALIGN_H
|
||||
- AC_REQUIRE([gt_TYPE_WCHAR_T])
|
||||
- AC_REQUIRE([gt_TYPE_WINT_T])
|
||||
+ AC_REQUIRE([gt_TYPE_WCHAR_T_GT])
|
||||
+ AC_REQUIRE([gt_TYPE_WINT_T_GT])
|
||||
gl_FUNC_STRERROR_R
|
||||
if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
|
||||
AC_LIBOBJ([strerror_r])
|
||||
--- a/gettext-tools/gnulib-m4/stddef_h.m4
|
||||
+++ b/gettext-tools/gnulib-m4/stddef_h.m4
|
||||
@@ -8,7 +8,7 @@ dnl with or without modifications, as lo
|
||||
AC_DEFUN([gl_STDDEF_H],
|
||||
[
|
||||
AC_REQUIRE([gl_STDDEF_H_DEFAULTS])
|
||||
- AC_REQUIRE([gt_TYPE_WCHAR_T])
|
||||
+ AC_REQUIRE([gt_TYPE_WCHAR_T_GT])
|
||||
STDDEF_H=
|
||||
|
||||
dnl Test whether the type max_align_t exists and whether its alignment
|
||||
--- a/gettext-tools/gnulib-m4/stdint.m4
|
||||
+++ b/gettext-tools/gnulib-m4/stdint.m4
|
||||
@@ -15,7 +15,7 @@ AC_DEFUN_ONCE([gl_STDINT_H],
|
||||
@ -216,7 +172,7 @@
|
||||
dnl is defined as a weak alias of snprintf; we prefer to use the latter).
|
||||
--- a/gettext-tools/gnulib-m4/wchar_h.m4
|
||||
+++ b/gettext-tools/gnulib-m4/wchar_h.m4
|
||||
@@ -27,7 +27,7 @@ AC_DEFUN([gl_WCHAR_H],
|
||||
@@ -27,7 +27,7 @@ AC_DEFUN_ONCE([gl_WCHAR_H],
|
||||
|
||||
AC_REQUIRE([gl_FEATURES_H])
|
||||
|
||||
@ -238,7 +194,7 @@
|
||||
[AC_COMPILE_IFELSE(
|
||||
--- a/gettext-tools/gnulib-m4/wctype_h.m4
|
||||
+++ b/gettext-tools/gnulib-m4/wctype_h.m4
|
||||
@@ -22,7 +22,7 @@ AC_DEFUN([gl_WCTYPE_H],
|
||||
@@ -22,7 +22,7 @@ AC_DEFUN_ONCE([gl_WCTYPE_H],
|
||||
fi
|
||||
AC_SUBST([HAVE_ISWCNTRL])
|
||||
|
||||
@ -271,37 +227,6 @@
|
||||
[
|
||||
AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t],
|
||||
[AC_COMPILE_IFELSE(
|
||||
--- a/gettext-tools/intl/Makefile.am
|
||||
+++ b/gettext-tools/intl/Makefile.am
|
||||
@@ -274,7 +274,7 @@ libgnuintl.h: $(srcdir)/libgnuintl.in.h
|
||||
-e 's,@''HAVE_ASPRINTF''@,@HAVE_ASPRINTF@,g' \
|
||||
-e 's,@''HAVE_SNPRINTF''@,@HAVE_SNPRINTF@,g' \
|
||||
-e 's,@''HAVE_WPRINTF''@,@HAVE_WPRINTF@,g' \
|
||||
- -e 's,@''HAVE_NAMELESS_LOCALES''@,@HAVE_NAMELESS_LOCALES@,g' \
|
||||
+ -e 's,@''HAVE_NAMELESS_LOCALES''@,0,g' \
|
||||
-e 's,@''HAVE_NEWLOCALE''@,@HAVE_NEWLOCALE@,g' \
|
||||
< $(srcdir)/libgnuintl.in.h \
|
||||
| if test '@WOE32DLL@' = yes; then \
|
||||
@@ -294,7 +294,7 @@ libintl.h: $(srcdir)/libgnuintl.in.h
|
||||
-e 's,@''HAVE_ASPRINTF''@,@HAVE_ASPRINTF@,g' \
|
||||
-e 's,@''HAVE_SNPRINTF''@,@HAVE_SNPRINTF@,g' \
|
||||
-e 's,@''HAVE_WPRINTF''@,@HAVE_WPRINTF@,g' \
|
||||
- -e 's,@''HAVE_NAMELESS_LOCALES''@,@HAVE_NAMELESS_LOCALES@,g' \
|
||||
+ -e 's,@''HAVE_NAMELESS_LOCALES''@,0,g' \
|
||||
-e 's,@''HAVE_NEWLOCALE''@,@HAVE_NEWLOCALE@,g' \
|
||||
< $(srcdir)/libgnuintl.in.h > libintl.h
|
||||
MOSTLYCLEANFILES += libintl.h
|
||||
--- a/libtextstyle/gnulib-m4/stddef_h.m4
|
||||
+++ b/libtextstyle/gnulib-m4/stddef_h.m4
|
||||
@@ -8,7 +8,7 @@ dnl with or without modifications, as lo
|
||||
AC_DEFUN([gl_STDDEF_H],
|
||||
[
|
||||
AC_REQUIRE([gl_STDDEF_H_DEFAULTS])
|
||||
- AC_REQUIRE([gt_TYPE_WCHAR_T])
|
||||
+ AC_REQUIRE([gt_TYPE_WCHAR_T_GT])
|
||||
STDDEF_H=
|
||||
|
||||
dnl Test whether the type max_align_t exists and whether its alignment
|
||||
--- a/libtextstyle/gnulib-m4/stdint.m4
|
||||
+++ b/libtextstyle/gnulib-m4/stdint.m4
|
||||
@@ -15,7 +15,7 @@ AC_DEFUN_ONCE([gl_STDINT_H],
|
||||
@ -349,7 +274,7 @@
|
||||
dnl is defined as a weak alias of snprintf; we prefer to use the latter).
|
||||
--- a/libtextstyle/gnulib-m4/wchar_h.m4
|
||||
+++ b/libtextstyle/gnulib-m4/wchar_h.m4
|
||||
@@ -27,7 +27,7 @@ AC_DEFUN([gl_WCHAR_H],
|
||||
@@ -27,7 +27,7 @@ AC_DEFUN_ONCE([gl_WCHAR_H],
|
||||
|
||||
AC_REQUIRE([gl_FEATURES_H])
|
||||
|
||||
@ -380,3 +305,38 @@
|
||||
[
|
||||
AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t],
|
||||
[AC_COMPILE_IFELSE(
|
||||
--- a/gettext-tools/gnulib-m4/gnulib-comp.m4
|
||||
+++ b/gettext-tools/gnulib-m4/gnulib-comp.m4
|
||||
@@ -2218,8 +2218,8 @@ changequote([, ])dnl
|
||||
AC_REQUIRE([gl_SOCKETLIB])
|
||||
AC_REQUIRE([gl_SOCKETS])
|
||||
gl_TYPE_SOCKLEN_T
|
||||
- AC_REQUIRE([gt_TYPE_WCHAR_T])
|
||||
- AC_REQUIRE([gt_TYPE_WINT_T])
|
||||
+ AC_REQUIRE([gt_TYPE_WCHAR_T_GT])
|
||||
+ AC_REQUIRE([gt_TYPE_WINT_T_GT])
|
||||
gl_FUNC_STRERROR_R
|
||||
AS_IF([test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1], [
|
||||
AC_LIBOBJ([strerror_r])
|
||||
--- a/libtextstyle/gnulib-m4/stddef_h.m4
|
||||
+++ b/libtextstyle/gnulib-m4/stddef_h.m4
|
||||
@@ -9,7 +9,7 @@ dnl A placeholder for <stddef.h>, for pl
|
||||
AC_DEFUN_ONCE([gl_STDDEF_H],
|
||||
[
|
||||
AC_REQUIRE([gl_STDDEF_H_DEFAULTS])
|
||||
- AC_REQUIRE([gt_TYPE_WCHAR_T])
|
||||
+ AC_REQUIRE([gt_TYPE_WCHAR_T_GT])
|
||||
|
||||
dnl Persuade OpenBSD <stddef.h> to declare max_align_t.
|
||||
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
|
||||
--- a/gettext-tools/gnulib-m4/stddef_h.m4
|
||||
+++ b/gettext-tools/gnulib-m4/stddef_h.m4
|
||||
@@ -9,7 +9,7 @@ dnl A placeholder for <stddef.h>, for pl
|
||||
AC_DEFUN_ONCE([gl_STDDEF_H],
|
||||
[
|
||||
AC_REQUIRE([gl_STDDEF_H_DEFAULTS])
|
||||
- AC_REQUIRE([gt_TYPE_WCHAR_T])
|
||||
+ AC_REQUIRE([gt_TYPE_WCHAR_T_GT])
|
||||
|
||||
dnl Persuade OpenBSD <stddef.h> to declare max_align_t.
|
||||
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
|
||||
|
@ -1,63 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 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:=gettext
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_LICENSE:=FSFULLR
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
|
||||
define Package/libintl
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=Stub header for the GNU Internationalization library
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/lib/libintl-stub/include
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/include/libintl.h $(1)/usr/lib/libintl-stub/include/
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/share/aclocal
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/m4/* $(1)/usr/share/aclocal/
|
||||
endef
|
||||
|
||||
define Host/Prepare
|
||||
mkdir -p $(HOST_BUILD_DIR)
|
||||
endef
|
||||
|
||||
define Host/Compile
|
||||
|
||||
endef
|
||||
|
||||
define Host/Install
|
||||
$(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/include
|
||||
$(INSTALL_DATA) ./src/include/libintl.h $(STAGING_DIR_HOSTPKG)/include/
|
||||
|
||||
$(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/share/aclocal
|
||||
$(INSTALL_DATA) ./src/m4/* $(STAGING_DIR_HOSTPKG)/share/aclocal/
|
||||
endef
|
||||
|
||||
define Package/libintl/install
|
||||
$(INSTALL_DIR) $(1)/tmp
|
||||
touch $(1)/tmp/.libintl-placeholder
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
$(eval $(call BuildPackage,libintl))
|
@ -1,7 +0,0 @@
|
||||
Each source file contains the following message:
|
||||
|
||||
Copyright (C) 1995-2010 Free Software Foundation, Inc.
|
||||
This file is free software; the Free Software Foundation
|
||||
gives unlimited permission to copy and/or distribute it,
|
||||
with or without modifications, as long as this notice is preserved.
|
||||
|
@ -1,53 +0,0 @@
|
||||
/*
|
||||
* This code is lifted from http://permalink.gmane.org/gmane.linux.gentoo.embedded/3218
|
||||
*/
|
||||
|
||||
#ifndef _LIBINTL_H
|
||||
#define _LIBINTL_H 1
|
||||
|
||||
#include <locale.h>
|
||||
|
||||
/* Undef gettext macros, if any... */
|
||||
#undef gettext
|
||||
#undef dgettext
|
||||
#undef dcgettext
|
||||
#undef ngettext
|
||||
#undef dngettext
|
||||
#undef dcngettext
|
||||
#undef textdomain
|
||||
#undef bindtextdomain
|
||||
#undef bind_textdomain_codeset
|
||||
|
||||
/* part of locale.h */
|
||||
/* #undef setlocale */
|
||||
|
||||
#undef _
|
||||
#undef N_
|
||||
|
||||
/* Define gettext stubs that map back to the original strings */
|
||||
#define gettext(String) (String)
|
||||
#define dgettext(Domain, String) (String)
|
||||
#define dcgettext(Domain, String, Type) (String)
|
||||
|
||||
#define ngettext(Singular, Plural, Count) \
|
||||
((Count) == 1 ? (const char *) (Singular) : (const char *) (Plural))
|
||||
|
||||
#define dngettext(Domain, Singular, Plural, Count) \
|
||||
((Count) == 1 ? (const char *) (Singular) : (const char *) (Plural))
|
||||
|
||||
#define dcngettext(Domain, Singular, Plural, Count, Category) \
|
||||
((Count) == 1 ? (const char *) (Singular) : (const char *) (Plural))
|
||||
|
||||
#define _(String) (String)
|
||||
#define N_(String) String
|
||||
|
||||
#ifndef _LOCALE_H
|
||||
/* #define setlocale(Category, Locale) ((char *)NULL) */
|
||||
#endif
|
||||
|
||||
/* No-ops for textdomain operations */
|
||||
#define bindtextdomain(Domain, Directory) (Domain)
|
||||
#define bind_textdomain_codeset(Domain, Codeset) (Codeset)
|
||||
#define textdomain(String) (String) ?: "messages"
|
||||
|
||||
#endif /* _LIBINTL_H */
|
@ -1,21 +0,0 @@
|
||||
# codeset.m4 serial 4 (gettext-0.18)
|
||||
dnl Copyright (C) 2000-2002, 2006, 2008-2010 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
AC_DEFUN([AM_LANGINFO_CODESET],
|
||||
[
|
||||
AC_CACHE_CHECK([for nl_langinfo and CODESET], [am_cv_langinfo_codeset],
|
||||
[AC_TRY_LINK([#include <langinfo.h>],
|
||||
[char* cs = nl_langinfo(CODESET); return !cs;],
|
||||
[am_cv_langinfo_codeset=yes],
|
||||
[am_cv_langinfo_codeset=no])
|
||||
])
|
||||
if test $am_cv_langinfo_codeset = yes; then
|
||||
AC_DEFINE([HAVE_LANGINFO_CODESET], [1],
|
||||
[Define if you have <langinfo.h> and nl_langinfo(CODESET).])
|
||||
fi
|
||||
])
|
@ -1,383 +0,0 @@
|
||||
# gettext.m4 serial 63 (gettext-0.18)
|
||||
dnl Copyright (C) 1995-2010 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
dnl
|
||||
dnl This file can can be used in projects which are not available under
|
||||
dnl the GNU General Public License or the GNU Library General Public
|
||||
dnl License but which still want to provide support for the GNU gettext
|
||||
dnl functionality.
|
||||
dnl Please note that the actual code of the GNU gettext library is covered
|
||||
dnl by the GNU Library General Public License, and the rest of the GNU
|
||||
dnl gettext package package is covered by the GNU General Public License.
|
||||
dnl They are *not* in the public domain.
|
||||
|
||||
dnl Authors:
|
||||
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
|
||||
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006, 2008-2010.
|
||||
|
||||
dnl Macro to add for using GNU gettext.
|
||||
|
||||
dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
|
||||
dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
|
||||
dnl default (if it is not specified or empty) is 'no-libtool'.
|
||||
dnl INTLSYMBOL should be 'external' for packages with no intl directory,
|
||||
dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
|
||||
dnl If INTLSYMBOL is 'use-libtool', then a libtool library
|
||||
dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
|
||||
dnl depending on --{enable,disable}-{shared,static} and on the presence of
|
||||
dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
|
||||
dnl $(top_builddir)/intl/libintl.a will be created.
|
||||
dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
|
||||
dnl implementations (in libc or libintl) without the ngettext() function
|
||||
dnl will be ignored. If NEEDSYMBOL is specified and is
|
||||
dnl 'need-formatstring-macros', then GNU gettext implementations that don't
|
||||
dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
|
||||
dnl INTLDIR is used to find the intl libraries. If empty,
|
||||
dnl the value `$(top_builddir)/intl/' is used.
|
||||
dnl
|
||||
dnl The result of the configuration is one of three cases:
|
||||
dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
|
||||
dnl and used.
|
||||
dnl Catalog format: GNU --> install in $(datadir)
|
||||
dnl Catalog extension: .mo after installation, .gmo in source tree
|
||||
dnl 2) GNU gettext has been found in the system's C library.
|
||||
dnl Catalog format: GNU --> install in $(datadir)
|
||||
dnl Catalog extension: .mo after installation, .gmo in source tree
|
||||
dnl 3) No internationalization, always use English msgid.
|
||||
dnl Catalog format: none
|
||||
dnl Catalog extension: none
|
||||
dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
|
||||
dnl The use of .gmo is historical (it was needed to avoid overwriting the
|
||||
dnl GNU format catalogs when building on a platform with an X/Open gettext),
|
||||
dnl but we keep it in order not to force irrelevant filename changes on the
|
||||
dnl maintainers.
|
||||
dnl
|
||||
AC_DEFUN([AM_GNU_GETTEXT],
|
||||
[
|
||||
dnl Argument checking.
|
||||
ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
|
||||
[errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
|
||||
])])])])])
|
||||
ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old],
|
||||
[AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])])
|
||||
ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
|
||||
[errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
|
||||
])])])])
|
||||
define([gt_included_intl],
|
||||
ifelse([$1], [external],
|
||||
ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
|
||||
[yes]))
|
||||
define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
|
||||
gt_NEEDS_INIT
|
||||
AM_GNU_GETTEXT_NEED([$2])
|
||||
|
||||
AC_REQUIRE([AM_PO_SUBDIRS])dnl
|
||||
ifelse(gt_included_intl, yes, [
|
||||
AC_REQUIRE([AM_INTL_SUBDIR])dnl
|
||||
])
|
||||
|
||||
dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
|
||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||
AC_REQUIRE([AC_LIB_RPATH])
|
||||
|
||||
dnl Sometimes libintl requires libiconv, so first search for libiconv.
|
||||
dnl Ideally we would do this search only after the
|
||||
dnl if test "$USE_NLS" = "yes"; then
|
||||
dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
|
||||
dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
|
||||
dnl the configure script would need to contain the same shell code
|
||||
dnl again, outside any 'if'. There are two solutions:
|
||||
dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
|
||||
dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
|
||||
dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
|
||||
dnl documented, we avoid it.
|
||||
ifelse(gt_included_intl, yes, , [
|
||||
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
|
||||
])
|
||||
|
||||
dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
|
||||
gt_INTL_MACOSX
|
||||
|
||||
dnl Set USE_NLS.
|
||||
AC_REQUIRE([AM_NLS])
|
||||
|
||||
ifelse(gt_included_intl, yes, [
|
||||
BUILD_INCLUDED_LIBINTL=no
|
||||
USE_INCLUDED_LIBINTL=no
|
||||
])
|
||||
LIBINTL=
|
||||
LTLIBINTL=
|
||||
POSUB=
|
||||
|
||||
dnl Add a version number to the cache macros.
|
||||
case " $gt_needs " in
|
||||
*" need-formatstring-macros "*) gt_api_version=3 ;;
|
||||
*" need-ngettext "*) gt_api_version=2 ;;
|
||||
*) gt_api_version=1 ;;
|
||||
esac
|
||||
gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
|
||||
gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
|
||||
|
||||
dnl If we use NLS figure out what method
|
||||
if test "$USE_NLS" = "yes"; then
|
||||
gt_use_preinstalled_gnugettext=no
|
||||
ifelse(gt_included_intl, yes, [
|
||||
AC_MSG_CHECKING([whether included gettext is requested])
|
||||
AC_ARG_WITH([included-gettext],
|
||||
[ --with-included-gettext use the GNU gettext library included here],
|
||||
nls_cv_force_use_gnu_gettext=$withval,
|
||||
nls_cv_force_use_gnu_gettext=no)
|
||||
AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext])
|
||||
|
||||
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
|
||||
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
|
||||
])
|
||||
dnl User does not insist on using GNU NLS library. Figure out what
|
||||
dnl to use. If GNU gettext is available we use this. Else we have
|
||||
dnl to fall back to GNU NLS library.
|
||||
|
||||
if test $gt_api_version -ge 3; then
|
||||
gt_revision_test_code='
|
||||
#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
|
||||
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
|
||||
#endif
|
||||
changequote(,)dnl
|
||||
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
|
||||
changequote([,])dnl
|
||||
'
|
||||
else
|
||||
gt_revision_test_code=
|
||||
fi
|
||||
if test $gt_api_version -ge 2; then
|
||||
gt_expression_test_code=' + * ngettext ("", "", 0)'
|
||||
else
|
||||
gt_expression_test_code=
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
|
||||
[AC_TRY_LINK([#include <libintl.h>
|
||||
$gt_revision_test_code
|
||||
extern int _nl_msg_cat_cntr;
|
||||
extern int *_nl_domain_bindings;],
|
||||
[bindtextdomain ("", "");
|
||||
return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings],
|
||||
[eval "$gt_func_gnugettext_libc=yes"],
|
||||
[eval "$gt_func_gnugettext_libc=no"])])
|
||||
|
||||
if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
|
||||
dnl Sometimes libintl requires libiconv, so first search for libiconv.
|
||||
ifelse(gt_included_intl, yes, , [
|
||||
AM_ICONV_LINK
|
||||
])
|
||||
dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
|
||||
dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
|
||||
dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
|
||||
dnl even if libiconv doesn't exist.
|
||||
AC_LIB_LINKFLAGS_BODY([intl])
|
||||
AC_CACHE_CHECK([for GNU gettext in libintl],
|
||||
[$gt_func_gnugettext_libintl],
|
||||
[gt_save_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $INCINTL"
|
||||
gt_save_LIBS="$LIBS"
|
||||
LIBS="$LIBS $LIBINTL"
|
||||
dnl Now see whether libintl exists and does not depend on libiconv.
|
||||
AC_TRY_LINK([#include <libintl.h>
|
||||
$gt_revision_test_code
|
||||
extern int _nl_msg_cat_cntr;
|
||||
extern
|
||||
#ifdef __cplusplus
|
||||
"C"
|
||||
#endif
|
||||
const char *_nl_expand_alias (const char *);],
|
||||
[bindtextdomain ("", "");
|
||||
return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
|
||||
[eval "$gt_func_gnugettext_libintl=yes"],
|
||||
[eval "$gt_func_gnugettext_libintl=no"])
|
||||
dnl Now see whether libintl exists and depends on libiconv.
|
||||
if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
|
||||
LIBS="$LIBS $LIBICONV"
|
||||
AC_TRY_LINK([#include <libintl.h>
|
||||
$gt_revision_test_code
|
||||
extern int _nl_msg_cat_cntr;
|
||||
extern
|
||||
#ifdef __cplusplus
|
||||
"C"
|
||||
#endif
|
||||
const char *_nl_expand_alias (const char *);],
|
||||
[bindtextdomain ("", "");
|
||||
return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
|
||||
[LIBINTL="$LIBINTL $LIBICONV"
|
||||
LTLIBINTL="$LTLIBINTL $LTLIBICONV"
|
||||
eval "$gt_func_gnugettext_libintl=yes"
|
||||
])
|
||||
fi
|
||||
CPPFLAGS="$gt_save_CPPFLAGS"
|
||||
LIBS="$gt_save_LIBS"])
|
||||
fi
|
||||
|
||||
dnl If an already present or preinstalled GNU gettext() is found,
|
||||
dnl use it. But if this macro is used in GNU gettext, and GNU
|
||||
dnl gettext is already preinstalled in libintl, we update this
|
||||
dnl libintl. (Cf. the install rule in intl/Makefile.in.)
|
||||
if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
|
||||
|| { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
|
||||
&& test "$PACKAGE" != gettext-runtime \
|
||||
&& test "$PACKAGE" != gettext-tools; }; then
|
||||
gt_use_preinstalled_gnugettext=yes
|
||||
else
|
||||
dnl Reset the values set by searching for libintl.
|
||||
LIBINTL=
|
||||
LTLIBINTL=
|
||||
INCINTL=
|
||||
fi
|
||||
|
||||
ifelse(gt_included_intl, yes, [
|
||||
if test "$gt_use_preinstalled_gnugettext" != "yes"; then
|
||||
dnl GNU gettext is not found in the C library.
|
||||
dnl Fall back on included GNU gettext library.
|
||||
nls_cv_use_gnu_gettext=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$nls_cv_use_gnu_gettext" = "yes"; then
|
||||
dnl Mark actions used to generate GNU NLS library.
|
||||
BUILD_INCLUDED_LIBINTL=yes
|
||||
USE_INCLUDED_LIBINTL=yes
|
||||
LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
|
||||
LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
|
||||
LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
|
||||
fi
|
||||
|
||||
CATOBJEXT=
|
||||
if test "$gt_use_preinstalled_gnugettext" = "yes" \
|
||||
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
|
||||
dnl Mark actions to use GNU gettext tools.
|
||||
CATOBJEXT=.gmo
|
||||
fi
|
||||
])
|
||||
|
||||
if test -n "$INTL_MACOSX_LIBS"; then
|
||||
if test "$gt_use_preinstalled_gnugettext" = "yes" \
|
||||
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
|
||||
dnl Some extra flags are needed during linking.
|
||||
LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
|
||||
LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$gt_use_preinstalled_gnugettext" = "yes" \
|
||||
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
|
||||
AC_DEFINE([ENABLE_NLS], [1],
|
||||
[Define to 1 if translation of program messages to the user's native language
|
||||
is requested.])
|
||||
else
|
||||
USE_NLS=no
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([whether to use NLS])
|
||||
AC_MSG_RESULT([$USE_NLS])
|
||||
if test "$USE_NLS" = "yes"; then
|
||||
AC_MSG_CHECKING([where the gettext function comes from])
|
||||
if test "$gt_use_preinstalled_gnugettext" = "yes"; then
|
||||
if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
|
||||
gt_source="external libintl"
|
||||
else
|
||||
gt_source="libc"
|
||||
fi
|
||||
else
|
||||
gt_source="included intl directory"
|
||||
fi
|
||||
AC_MSG_RESULT([$gt_source])
|
||||
fi
|
||||
|
||||
if test "$USE_NLS" = "yes"; then
|
||||
|
||||
if test "$gt_use_preinstalled_gnugettext" = "yes"; then
|
||||
if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
|
||||
AC_MSG_CHECKING([how to link with libintl])
|
||||
AC_MSG_RESULT([$LIBINTL])
|
||||
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
|
||||
fi
|
||||
|
||||
dnl For backward compatibility. Some packages may be using this.
|
||||
AC_DEFINE([HAVE_GETTEXT], [1],
|
||||
[Define if the GNU gettext() function is already present or preinstalled.])
|
||||
AC_DEFINE([HAVE_DCGETTEXT], [1],
|
||||
[Define if the GNU dcgettext() function is already present or preinstalled.])
|
||||
fi
|
||||
|
||||
dnl We need to process the po/ directory.
|
||||
POSUB=po
|
||||
fi
|
||||
|
||||
ifelse(gt_included_intl, yes, [
|
||||
dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
|
||||
dnl to 'yes' because some of the testsuite requires it.
|
||||
if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
|
||||
BUILD_INCLUDED_LIBINTL=yes
|
||||
fi
|
||||
|
||||
dnl Make all variables we use known to autoconf.
|
||||
AC_SUBST([BUILD_INCLUDED_LIBINTL])
|
||||
AC_SUBST([USE_INCLUDED_LIBINTL])
|
||||
AC_SUBST([CATOBJEXT])
|
||||
|
||||
dnl For backward compatibility. Some configure.ins may be using this.
|
||||
nls_cv_header_intl=
|
||||
nls_cv_header_libgt=
|
||||
|
||||
dnl For backward compatibility. Some Makefiles may be using this.
|
||||
DATADIRNAME=share
|
||||
AC_SUBST([DATADIRNAME])
|
||||
|
||||
dnl For backward compatibility. Some Makefiles may be using this.
|
||||
INSTOBJEXT=.mo
|
||||
AC_SUBST([INSTOBJEXT])
|
||||
|
||||
dnl For backward compatibility. Some Makefiles may be using this.
|
||||
GENCAT=gencat
|
||||
AC_SUBST([GENCAT])
|
||||
|
||||
dnl For backward compatibility. Some Makefiles may be using this.
|
||||
INTLOBJS=
|
||||
if test "$USE_INCLUDED_LIBINTL" = yes; then
|
||||
INTLOBJS="\$(GETTOBJS)"
|
||||
fi
|
||||
AC_SUBST([INTLOBJS])
|
||||
|
||||
dnl Enable libtool support if the surrounding package wishes it.
|
||||
INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
|
||||
AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX])
|
||||
])
|
||||
|
||||
dnl For backward compatibility. Some Makefiles may be using this.
|
||||
INTLLIBS="$LIBINTL"
|
||||
AC_SUBST([INTLLIBS])
|
||||
|
||||
dnl Make all documented variables known to autoconf.
|
||||
AC_SUBST([LIBINTL])
|
||||
AC_SUBST([LTLIBINTL])
|
||||
AC_SUBST([POSUB])
|
||||
])
|
||||
|
||||
|
||||
dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
|
||||
m4_define([gt_NEEDS_INIT],
|
||||
[
|
||||
m4_divert_text([DEFAULTS], [gt_needs=])
|
||||
m4_define([gt_NEEDS_INIT], [])
|
||||
])
|
||||
|
||||
|
||||
dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
|
||||
AC_DEFUN([AM_GNU_GETTEXT_NEED],
|
||||
[
|
||||
m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
|
||||
])
|
||||
|
||||
|
||||
dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
|
||||
AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
|
@ -1,294 +0,0 @@
|
||||
# intl.m4 serial 17 (gettext-0.18)
|
||||
dnl Copyright (C) 1995-2009 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
dnl
|
||||
dnl This file can can be used in projects which are not available under
|
||||
dnl the GNU General Public License or the GNU Library General Public
|
||||
dnl License but which still want to provide support for the GNU gettext
|
||||
dnl functionality.
|
||||
dnl Please note that the actual code of the GNU gettext library is covered
|
||||
dnl by the GNU Library General Public License, and the rest of the GNU
|
||||
dnl gettext package package is covered by the GNU General Public License.
|
||||
dnl They are *not* in the public domain.
|
||||
|
||||
dnl Authors:
|
||||
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
|
||||
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2009.
|
||||
|
||||
AC_PREREQ([2.52])
|
||||
|
||||
dnl Checks for all prerequisites of the intl subdirectory,
|
||||
dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
|
||||
dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
|
||||
AC_DEFUN([AM_INTL_SUBDIR],
|
||||
[
|
||||
AC_REQUIRE([AC_PROG_INSTALL])dnl
|
||||
AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
AC_REQUIRE([gt_GLIBC2])dnl
|
||||
AC_REQUIRE([AC_PROG_RANLIB])dnl
|
||||
AC_REQUIRE([gl_VISIBILITY])dnl
|
||||
AC_REQUIRE([gt_INTL_SUBDIR_CORE])dnl
|
||||
AC_REQUIRE([AC_TYPE_LONG_LONG_INT])dnl
|
||||
AC_REQUIRE([gt_TYPE_WCHAR_T])dnl
|
||||
AC_REQUIRE([gt_TYPE_WINT_T])dnl
|
||||
AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
|
||||
AC_REQUIRE([gt_TYPE_INTMAX_T])
|
||||
AC_REQUIRE([gt_PRINTF_POSIX])
|
||||
AC_REQUIRE([gl_GLIBC21])dnl
|
||||
AC_REQUIRE([gl_XSIZE])dnl
|
||||
AC_REQUIRE([gl_FCNTL_O_FLAGS])dnl
|
||||
AC_REQUIRE([gt_INTL_MACOSX])dnl
|
||||
|
||||
dnl Support for automake's --enable-silent-rules.
|
||||
case "$enable_silent_rules" in
|
||||
yes) INTL_DEFAULT_VERBOSITY=0;;
|
||||
no) INTL_DEFAULT_VERBOSITY=1;;
|
||||
*) INTL_DEFAULT_VERBOSITY=1;;
|
||||
esac
|
||||
AC_SUBST([INTL_DEFAULT_VERBOSITY])
|
||||
|
||||
AC_CHECK_TYPE([ptrdiff_t], ,
|
||||
[AC_DEFINE([ptrdiff_t], [long],
|
||||
[Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
|
||||
])
|
||||
AC_CHECK_HEADERS([stddef.h stdlib.h string.h])
|
||||
AC_CHECK_FUNCS([asprintf fwprintf newlocale putenv setenv setlocale \
|
||||
snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb])
|
||||
|
||||
dnl Use the _snprintf function only if it is declared (because on NetBSD it
|
||||
dnl is defined as a weak alias of snprintf; we prefer to use the latter).
|
||||
gt_CHECK_DECL(_snprintf, [#include <stdio.h>])
|
||||
gt_CHECK_DECL(_snwprintf, [#include <stdio.h>])
|
||||
|
||||
dnl Use the *_unlocked functions only if they are declared.
|
||||
dnl (because some of them were defined without being declared in Solaris
|
||||
dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
|
||||
dnl on Solaris 2.5.1 to run on Solaris 2.6).
|
||||
dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
|
||||
gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>])
|
||||
|
||||
case $gt_cv_func_printf_posix in
|
||||
*yes) HAVE_POSIX_PRINTF=1 ;;
|
||||
*) HAVE_POSIX_PRINTF=0 ;;
|
||||
esac
|
||||
AC_SUBST([HAVE_POSIX_PRINTF])
|
||||
if test "$ac_cv_func_asprintf" = yes; then
|
||||
HAVE_ASPRINTF=1
|
||||
else
|
||||
HAVE_ASPRINTF=0
|
||||
fi
|
||||
AC_SUBST([HAVE_ASPRINTF])
|
||||
if test "$ac_cv_func_snprintf" = yes; then
|
||||
HAVE_SNPRINTF=1
|
||||
else
|
||||
HAVE_SNPRINTF=0
|
||||
fi
|
||||
AC_SUBST([HAVE_SNPRINTF])
|
||||
if test "$ac_cv_func_newlocale" = yes; then
|
||||
HAVE_NEWLOCALE=1
|
||||
else
|
||||
HAVE_NEWLOCALE=0
|
||||
fi
|
||||
AC_SUBST([HAVE_NEWLOCALE])
|
||||
if test "$ac_cv_func_wprintf" = yes; then
|
||||
HAVE_WPRINTF=1
|
||||
else
|
||||
HAVE_WPRINTF=0
|
||||
fi
|
||||
AC_SUBST([HAVE_WPRINTF])
|
||||
|
||||
AM_LANGINFO_CODESET
|
||||
gt_LC_MESSAGES
|
||||
|
||||
dnl Compilation on mingw and Cygwin needs special Makefile rules, because
|
||||
dnl 1. when we install a shared library, we must arrange to export
|
||||
dnl auxiliary pointer variables for every exported variable,
|
||||
dnl 2. when we install a shared library and a static library simultaneously,
|
||||
dnl the include file specifies __declspec(dllimport) and therefore we
|
||||
dnl must arrange to define the auxiliary pointer variables for the
|
||||
dnl exported variables _also_ in the static library.
|
||||
if test "$enable_shared" = yes; then
|
||||
case "$host_os" in
|
||||
mingw* | cygwin*) is_woe32dll=yes ;;
|
||||
*) is_woe32dll=no ;;
|
||||
esac
|
||||
else
|
||||
is_woe32dll=no
|
||||
fi
|
||||
WOE32DLL=$is_woe32dll
|
||||
AC_SUBST([WOE32DLL])
|
||||
|
||||
dnl On mingw and Cygwin, we can activate special Makefile rules which add
|
||||
dnl version information to the shared libraries and executables.
|
||||
case "$host_os" in
|
||||
mingw* | cygwin*) is_woe32=yes ;;
|
||||
*) is_woe32=no ;;
|
||||
esac
|
||||
WOE32=$is_woe32
|
||||
AC_SUBST([WOE32])
|
||||
if test $WOE32 = yes; then
|
||||
dnl Check for a program that compiles Windows resource files.
|
||||
AC_CHECK_TOOL([WINDRES], [windres])
|
||||
fi
|
||||
|
||||
dnl Determine whether when creating a library, "-lc" should be passed to
|
||||
dnl libtool or not. On many platforms, it is required for the libtool option
|
||||
dnl -no-undefined to work. On HP-UX, however, the -lc - stored by libtool
|
||||
dnl in the *.la files - makes it impossible to create multithreaded programs,
|
||||
dnl because libtool also reorders the -lc to come before the -pthread, and
|
||||
dnl this disables pthread_create() <http://docs.hp.com/en/1896/pthreads.html>.
|
||||
case "$host_os" in
|
||||
hpux*) LTLIBC="" ;;
|
||||
*) LTLIBC="-lc" ;;
|
||||
esac
|
||||
AC_SUBST([LTLIBC])
|
||||
|
||||
dnl Rename some macros and functions used for locking.
|
||||
AH_BOTTOM([
|
||||
#define __libc_lock_t gl_lock_t
|
||||
#define __libc_lock_define gl_lock_define
|
||||
#define __libc_lock_define_initialized gl_lock_define_initialized
|
||||
#define __libc_lock_init gl_lock_init
|
||||
#define __libc_lock_lock gl_lock_lock
|
||||
#define __libc_lock_unlock gl_lock_unlock
|
||||
#define __libc_lock_recursive_t gl_recursive_lock_t
|
||||
#define __libc_lock_define_recursive gl_recursive_lock_define
|
||||
#define __libc_lock_define_initialized_recursive gl_recursive_lock_define_initialized
|
||||
#define __libc_lock_init_recursive gl_recursive_lock_init
|
||||
#define __libc_lock_lock_recursive gl_recursive_lock_lock
|
||||
#define __libc_lock_unlock_recursive gl_recursive_lock_unlock
|
||||
#define glthread_in_use libintl_thread_in_use
|
||||
#define glthread_lock_init_func libintl_lock_init_func
|
||||
#define glthread_lock_lock_func libintl_lock_lock_func
|
||||
#define glthread_lock_unlock_func libintl_lock_unlock_func
|
||||
#define glthread_lock_destroy_func libintl_lock_destroy_func
|
||||
#define glthread_rwlock_init_multithreaded libintl_rwlock_init_multithreaded
|
||||
#define glthread_rwlock_init_func libintl_rwlock_init_func
|
||||
#define glthread_rwlock_rdlock_multithreaded libintl_rwlock_rdlock_multithreaded
|
||||
#define glthread_rwlock_rdlock_func libintl_rwlock_rdlock_func
|
||||
#define glthread_rwlock_wrlock_multithreaded libintl_rwlock_wrlock_multithreaded
|
||||
#define glthread_rwlock_wrlock_func libintl_rwlock_wrlock_func
|
||||
#define glthread_rwlock_unlock_multithreaded libintl_rwlock_unlock_multithreaded
|
||||
#define glthread_rwlock_unlock_func libintl_rwlock_unlock_func
|
||||
#define glthread_rwlock_destroy_multithreaded libintl_rwlock_destroy_multithreaded
|
||||
#define glthread_rwlock_destroy_func libintl_rwlock_destroy_func
|
||||
#define glthread_recursive_lock_init_multithreaded libintl_recursive_lock_init_multithreaded
|
||||
#define glthread_recursive_lock_init_func libintl_recursive_lock_init_func
|
||||
#define glthread_recursive_lock_lock_multithreaded libintl_recursive_lock_lock_multithreaded
|
||||
#define glthread_recursive_lock_lock_func libintl_recursive_lock_lock_func
|
||||
#define glthread_recursive_lock_unlock_multithreaded libintl_recursive_lock_unlock_multithreaded
|
||||
#define glthread_recursive_lock_unlock_func libintl_recursive_lock_unlock_func
|
||||
#define glthread_recursive_lock_destroy_multithreaded libintl_recursive_lock_destroy_multithreaded
|
||||
#define glthread_recursive_lock_destroy_func libintl_recursive_lock_destroy_func
|
||||
#define glthread_once_func libintl_once_func
|
||||
#define glthread_once_singlethreaded libintl_once_singlethreaded
|
||||
#define glthread_once_multithreaded libintl_once_multithreaded
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
dnl Checks for the core files of the intl subdirectory:
|
||||
dnl dcigettext.c
|
||||
dnl eval-plural.h
|
||||
dnl explodename.c
|
||||
dnl finddomain.c
|
||||
dnl gettextP.h
|
||||
dnl gmo.h
|
||||
dnl hash-string.h hash-string.c
|
||||
dnl l10nflist.c
|
||||
dnl libgnuintl.h.in (except the *printf stuff)
|
||||
dnl loadinfo.h
|
||||
dnl loadmsgcat.c
|
||||
dnl localealias.c
|
||||
dnl log.c
|
||||
dnl plural-exp.h plural-exp.c
|
||||
dnl plural.y
|
||||
dnl Used by libglocale.
|
||||
AC_DEFUN([gt_INTL_SUBDIR_CORE],
|
||||
[
|
||||
AC_REQUIRE([AC_C_INLINE])dnl
|
||||
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
|
||||
AC_REQUIRE([gl_AC_HEADER_STDINT_H])
|
||||
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
|
||||
AC_REQUIRE([AC_FUNC_MMAP])dnl
|
||||
AC_REQUIRE([gt_INTDIV0])dnl
|
||||
AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl
|
||||
AC_REQUIRE([gt_INTTYPES_PRI])dnl
|
||||
AC_REQUIRE([gl_LOCK])dnl
|
||||
|
||||
AC_TRY_LINK(
|
||||
[int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; }],
|
||||
[],
|
||||
[AC_DEFINE([HAVE_BUILTIN_EXPECT], [1],
|
||||
[Define to 1 if the compiler understands __builtin_expect.])])
|
||||
|
||||
AC_CHECK_HEADERS([argz.h inttypes.h limits.h unistd.h sys/param.h])
|
||||
AC_CHECK_FUNCS([getcwd getegid geteuid getgid getuid mempcpy munmap \
|
||||
stpcpy strcasecmp strdup strtoul tsearch uselocale argz_count \
|
||||
argz_stringify argz_next __fsetlocking])
|
||||
|
||||
dnl Use the *_unlocked functions only if they are declared.
|
||||
dnl (because some of them were defined without being declared in Solaris
|
||||
dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
|
||||
dnl on Solaris 2.5.1 to run on Solaris 2.6).
|
||||
dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
|
||||
gt_CHECK_DECL([feof_unlocked], [#include <stdio.h>])
|
||||
gt_CHECK_DECL([fgets_unlocked], [#include <stdio.h>])
|
||||
|
||||
AM_ICONV
|
||||
|
||||
dnl intl/plural.c is generated from intl/plural.y. It requires bison,
|
||||
dnl because plural.y uses bison specific features. It requires at least
|
||||
dnl bison-1.26 because earlier versions generate a plural.c that doesn't
|
||||
dnl compile.
|
||||
dnl bison is only needed for the maintainer (who touches plural.y). But in
|
||||
dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
|
||||
dnl the rule in general Makefile. Now, some people carelessly touch the
|
||||
dnl files or have a broken "make" program, hence the plural.c rule will
|
||||
dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
|
||||
dnl present or too old.
|
||||
AC_CHECK_PROGS([INTLBISON], [bison])
|
||||
if test -z "$INTLBISON"; then
|
||||
ac_verc_fail=yes
|
||||
else
|
||||
dnl Found it, now check the version.
|
||||
AC_MSG_CHECKING([version of bison])
|
||||
changequote(<<,>>)dnl
|
||||
ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
|
||||
case $ac_prog_version in
|
||||
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
|
||||
1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
|
||||
changequote([,])dnl
|
||||
ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
|
||||
*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
|
||||
esac
|
||||
AC_MSG_RESULT([$ac_prog_version])
|
||||
fi
|
||||
if test $ac_verc_fail = yes; then
|
||||
INTLBISON=:
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl gt_CHECK_DECL(FUNC, INCLUDES)
|
||||
dnl Check whether a function is declared.
|
||||
AC_DEFUN([gt_CHECK_DECL],
|
||||
[
|
||||
AC_CACHE_CHECK([whether $1 is declared], [ac_cv_have_decl_$1],
|
||||
[AC_TRY_COMPILE([$2], [
|
||||
#ifndef $1
|
||||
char *p = (char *) $1;
|
||||
#endif
|
||||
], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)])
|
||||
if test $ac_cv_have_decl_$1 = yes; then
|
||||
gt_value=1
|
||||
else
|
||||
gt_value=0
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value],
|
||||
[Define to 1 if you have the declaration of `$1', and to 0 if you don't.])
|
||||
])
|
@ -1,19 +0,0 @@
|
||||
# intldir.m4 serial 2 (gettext-0.18)
|
||||
dnl Copyright (C) 2006, 2009-2010 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
dnl
|
||||
dnl This file can can be used in projects which are not available under
|
||||
dnl the GNU General Public License or the GNU Library General Public
|
||||
dnl License but which still want to provide support for the GNU gettext
|
||||
dnl functionality.
|
||||
dnl Please note that the actual code of the GNU gettext library is covered
|
||||
dnl by the GNU Library General Public License, and the rest of the GNU
|
||||
dnl gettext package package is covered by the GNU General Public License.
|
||||
dnl They are *not* in the public domain.
|
||||
|
||||
AC_PREREQ([2.52])
|
||||
|
||||
dnl Tells the AM_GNU_GETTEXT macro to consider an intl/ directory.
|
||||
AC_DEFUN([AM_GNU_GETTEXT_INTL_SUBDIR], [])
|
@ -1,51 +0,0 @@
|
||||
# intlmacosx.m4 serial 3 (gettext-0.18)
|
||||
dnl Copyright (C) 2004-2010 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
dnl
|
||||
dnl This file can can be used in projects which are not available under
|
||||
dnl the GNU General Public License or the GNU Library General Public
|
||||
dnl License but which still want to provide support for the GNU gettext
|
||||
dnl functionality.
|
||||
dnl Please note that the actual code of the GNU gettext library is covered
|
||||
dnl by the GNU Library General Public License, and the rest of the GNU
|
||||
dnl gettext package package is covered by the GNU General Public License.
|
||||
dnl They are *not* in the public domain.
|
||||
|
||||
dnl Checks for special options needed on MacOS X.
|
||||
dnl Defines INTL_MACOSX_LIBS.
|
||||
AC_DEFUN([gt_INTL_MACOSX],
|
||||
[
|
||||
dnl Check for API introduced in MacOS X 10.2.
|
||||
AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
|
||||
[gt_cv_func_CFPreferencesCopyAppValue],
|
||||
[gt_save_LIBS="$LIBS"
|
||||
LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
|
||||
AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>],
|
||||
[CFPreferencesCopyAppValue(NULL, NULL)],
|
||||
[gt_cv_func_CFPreferencesCopyAppValue=yes],
|
||||
[gt_cv_func_CFPreferencesCopyAppValue=no])
|
||||
LIBS="$gt_save_LIBS"])
|
||||
if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
|
||||
AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
|
||||
[Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
|
||||
fi
|
||||
dnl Check for API introduced in MacOS X 10.3.
|
||||
AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
|
||||
[gt_save_LIBS="$LIBS"
|
||||
LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
|
||||
AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();],
|
||||
[gt_cv_func_CFLocaleCopyCurrent=yes],
|
||||
[gt_cv_func_CFLocaleCopyCurrent=no])
|
||||
LIBS="$gt_save_LIBS"])
|
||||
if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
|
||||
AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
|
||||
[Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
|
||||
fi
|
||||
INTL_MACOSX_LIBS=
|
||||
if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
|
||||
INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
|
||||
fi
|
||||
AC_SUBST([INTL_MACOSX_LIBS])
|
||||
])
|
@ -1,31 +0,0 @@
|
||||
# lcmessage.m4 serial 6 (gettext-0.18)
|
||||
dnl Copyright (C) 1995-2002, 2004-2005, 2008-2010 Free Software Foundation,
|
||||
dnl Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
dnl
|
||||
dnl This file can can be used in projects which are not available under
|
||||
dnl the GNU General Public License or the GNU Library General Public
|
||||
dnl License but which still want to provide support for the GNU gettext
|
||||
dnl functionality.
|
||||
dnl Please note that the actual code of the GNU gettext library is covered
|
||||
dnl by the GNU Library General Public License, and the rest of the GNU
|
||||
dnl gettext package package is covered by the GNU General Public License.
|
||||
dnl They are *not* in the public domain.
|
||||
|
||||
dnl Authors:
|
||||
dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
|
||||
|
||||
# Check whether LC_MESSAGES is available in <locale.h>.
|
||||
|
||||
AC_DEFUN([gt_LC_MESSAGES],
|
||||
[
|
||||
AC_CACHE_CHECK([for LC_MESSAGES], [gt_cv_val_LC_MESSAGES],
|
||||
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
|
||||
[gt_cv_val_LC_MESSAGES=yes], [gt_cv_val_LC_MESSAGES=no])])
|
||||
if test $gt_cv_val_LC_MESSAGES = yes; then
|
||||
AC_DEFINE([HAVE_LC_MESSAGES], [1],
|
||||
[Define if your <locale.h> file defines LC_MESSAGES.])
|
||||
fi
|
||||
])
|
@ -1,32 +0,0 @@
|
||||
# nls.m4 serial 5 (gettext-0.18)
|
||||
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
|
||||
dnl Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
dnl
|
||||
dnl This file can can be used in projects which are not available under
|
||||
dnl the GNU General Public License or the GNU Library General Public
|
||||
dnl License but which still want to provide support for the GNU gettext
|
||||
dnl functionality.
|
||||
dnl Please note that the actual code of the GNU gettext library is covered
|
||||
dnl by the GNU Library General Public License, and the rest of the GNU
|
||||
dnl gettext package package is covered by the GNU General Public License.
|
||||
dnl They are *not* in the public domain.
|
||||
|
||||
dnl Authors:
|
||||
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
|
||||
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
|
||||
|
||||
AC_PREREQ([2.50])
|
||||
|
||||
AC_DEFUN([AM_NLS],
|
||||
[
|
||||
AC_MSG_CHECKING([whether NLS is requested])
|
||||
dnl Default is enabled NLS
|
||||
AC_ARG_ENABLE([nls],
|
||||
[ --disable-nls do not use Native Language Support],
|
||||
USE_NLS=$enableval, USE_NLS=yes)
|
||||
AC_MSG_RESULT([$USE_NLS])
|
||||
AC_SUBST([USE_NLS])
|
||||
])
|
@ -1,449 +0,0 @@
|
||||
# po.m4 serial 17 (gettext-0.18)
|
||||
dnl Copyright (C) 1995-2010 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
dnl
|
||||
dnl This file can can be used in projects which are not available under
|
||||
dnl the GNU General Public License or the GNU Library General Public
|
||||
dnl License but which still want to provide support for the GNU gettext
|
||||
dnl functionality.
|
||||
dnl Please note that the actual code of the GNU gettext library is covered
|
||||
dnl by the GNU Library General Public License, and the rest of the GNU
|
||||
dnl gettext package package is covered by the GNU General Public License.
|
||||
dnl They are *not* in the public domain.
|
||||
|
||||
dnl Authors:
|
||||
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
|
||||
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
|
||||
|
||||
AC_PREREQ([2.50])
|
||||
|
||||
dnl Checks for all prerequisites of the po subdirectory.
|
||||
AC_DEFUN([AM_PO_SUBDIRS],
|
||||
[
|
||||
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
||||
AC_REQUIRE([AC_PROG_INSTALL])dnl
|
||||
AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
|
||||
AC_REQUIRE([AM_NLS])dnl
|
||||
|
||||
dnl Release version of the gettext macros. This is used to ensure that
|
||||
dnl the gettext macros and po/Makefile.in.in are in sync.
|
||||
AC_SUBST([GETTEXT_MACRO_VERSION], [0.18])
|
||||
|
||||
dnl Perform the following tests also if --disable-nls has been given,
|
||||
dnl because they are needed for "make dist" to work.
|
||||
|
||||
dnl Search for GNU msgfmt in the PATH.
|
||||
dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
|
||||
dnl The second test excludes FreeBSD msgfmt.
|
||||
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
||||
[$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
|
||||
(if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
|
||||
:)
|
||||
AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT])
|
||||
|
||||
dnl Test whether it is GNU msgfmt >= 0.15.
|
||||
changequote(,)dnl
|
||||
case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
|
||||
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
|
||||
*) MSGFMT_015=$MSGFMT ;;
|
||||
esac
|
||||
changequote([,])dnl
|
||||
AC_SUBST([MSGFMT_015])
|
||||
changequote(,)dnl
|
||||
case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
|
||||
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
|
||||
*) GMSGFMT_015=$GMSGFMT ;;
|
||||
esac
|
||||
changequote([,])dnl
|
||||
AC_SUBST([GMSGFMT_015])
|
||||
|
||||
dnl Search for GNU xgettext 0.12 or newer in the PATH.
|
||||
dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
|
||||
dnl The second test excludes FreeBSD xgettext.
|
||||
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
||||
[$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
|
||||
(if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
|
||||
:)
|
||||
dnl Remove leftover from FreeBSD xgettext call.
|
||||
rm -f messages.po
|
||||
|
||||
dnl Test whether it is GNU xgettext >= 0.15.
|
||||
changequote(,)dnl
|
||||
case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
|
||||
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
|
||||
*) XGETTEXT_015=$XGETTEXT ;;
|
||||
esac
|
||||
changequote([,])dnl
|
||||
AC_SUBST([XGETTEXT_015])
|
||||
|
||||
dnl Search for GNU msgmerge 0.11 or newer in the PATH.
|
||||
AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
|
||||
[$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
|
||||
|
||||
dnl Installation directories.
|
||||
dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
|
||||
dnl have to define it here, so that it can be used in po/Makefile.
|
||||
test -n "$localedir" || localedir='${datadir}/locale'
|
||||
AC_SUBST([localedir])
|
||||
|
||||
dnl Support for AM_XGETTEXT_OPTION.
|
||||
test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
|
||||
AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
|
||||
|
||||
AC_CONFIG_COMMANDS([po-directories], [[
|
||||
for ac_file in $CONFIG_FILES; do
|
||||
# Support "outfile[:infile[:infile...]]"
|
||||
case "$ac_file" in
|
||||
*:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
|
||||
esac
|
||||
# PO directories have a Makefile.in generated from Makefile.in.in.
|
||||
case "$ac_file" in */Makefile.in)
|
||||
# Adjust a relative srcdir.
|
||||
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
|
||||
ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
|
||||
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
|
||||
# In autoconf-2.13 it is called $ac_given_srcdir.
|
||||
# In autoconf-2.50 it is called $srcdir.
|
||||
test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
|
||||
case "$ac_given_srcdir" in
|
||||
.) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
|
||||
/*) top_srcdir="$ac_given_srcdir" ;;
|
||||
*) top_srcdir="$ac_dots$ac_given_srcdir" ;;
|
||||
esac
|
||||
# Treat a directory as a PO directory if and only if it has a
|
||||
# POTFILES.in file. This allows packages to have multiple PO
|
||||
# directories under different names or in different locations.
|
||||
if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
|
||||
rm -f "$ac_dir/POTFILES"
|
||||
test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
|
||||
cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
|
||||
POMAKEFILEDEPS="POTFILES.in"
|
||||
# ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
|
||||
# on $ac_dir but don't depend on user-specified configuration
|
||||
# parameters.
|
||||
if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
|
||||
# The LINGUAS file contains the set of available languages.
|
||||
if test -n "$OBSOLETE_ALL_LINGUAS"; then
|
||||
test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
|
||||
fi
|
||||
ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
|
||||
# Hide the ALL_LINGUAS assigment from automake < 1.5.
|
||||
eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
|
||||
POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
|
||||
else
|
||||
# The set of available languages was given in configure.in.
|
||||
# Hide the ALL_LINGUAS assigment from automake < 1.5.
|
||||
eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
|
||||
fi
|
||||
# Compute POFILES
|
||||
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
|
||||
# Compute UPDATEPOFILES
|
||||
# as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
|
||||
# Compute DUMMYPOFILES
|
||||
# as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
|
||||
# Compute GMOFILES
|
||||
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
|
||||
case "$ac_given_srcdir" in
|
||||
.) srcdirpre= ;;
|
||||
*) srcdirpre='$(srcdir)/' ;;
|
||||
esac
|
||||
POFILES=
|
||||
UPDATEPOFILES=
|
||||
DUMMYPOFILES=
|
||||
GMOFILES=
|
||||
for lang in $ALL_LINGUAS; do
|
||||
POFILES="$POFILES $srcdirpre$lang.po"
|
||||
UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
|
||||
DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
|
||||
GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
|
||||
done
|
||||
# CATALOGS depends on both $ac_dir and the user's LINGUAS
|
||||
# environment variable.
|
||||
INST_LINGUAS=
|
||||
if test -n "$ALL_LINGUAS"; then
|
||||
for presentlang in $ALL_LINGUAS; do
|
||||
useit=no
|
||||
if test "%UNSET%" != "$LINGUAS"; then
|
||||
desiredlanguages="$LINGUAS"
|
||||
else
|
||||
desiredlanguages="$ALL_LINGUAS"
|
||||
fi
|
||||
for desiredlang in $desiredlanguages; do
|
||||
# Use the presentlang catalog if desiredlang is
|
||||
# a. equal to presentlang, or
|
||||
# b. a variant of presentlang (because in this case,
|
||||
# presentlang can be used as a fallback for messages
|
||||
# which are not translated in the desiredlang catalog).
|
||||
case "$desiredlang" in
|
||||
"$presentlang"*) useit=yes;;
|
||||
esac
|
||||
done
|
||||
if test $useit = yes; then
|
||||
INST_LINGUAS="$INST_LINGUAS $presentlang"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
CATALOGS=
|
||||
if test -n "$INST_LINGUAS"; then
|
||||
for lang in $INST_LINGUAS; do
|
||||
CATALOGS="$CATALOGS $lang.gmo"
|
||||
done
|
||||
fi
|
||||
test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
|
||||
sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
|
||||
for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
|
||||
if test -f "$f"; then
|
||||
case "$f" in
|
||||
*.orig | *.bak | *~) ;;
|
||||
*) cat "$f" >> "$ac_dir/Makefile" ;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done]],
|
||||
[# Capture the value of obsolete ALL_LINGUAS because we need it to compute
|
||||
# POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
|
||||
# from automake < 1.5.
|
||||
eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
|
||||
# Capture the value of LINGUAS because we need it to compute CATALOGS.
|
||||
LINGUAS="${LINGUAS-%UNSET%}"
|
||||
])
|
||||
])
|
||||
|
||||
dnl Postprocesses a Makefile in a directory containing PO files.
|
||||
AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
|
||||
[
|
||||
# When this code is run, in config.status, two variables have already been
|
||||
# set:
|
||||
# - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
|
||||
# - LINGUAS is the value of the environment variable LINGUAS at configure
|
||||
# time.
|
||||
|
||||
changequote(,)dnl
|
||||
# Adjust a relative srcdir.
|
||||
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
|
||||
ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
|
||||
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
|
||||
# In autoconf-2.13 it is called $ac_given_srcdir.
|
||||
# In autoconf-2.50 it is called $srcdir.
|
||||
test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
|
||||
case "$ac_given_srcdir" in
|
||||
.) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
|
||||
/*) top_srcdir="$ac_given_srcdir" ;;
|
||||
*) top_srcdir="$ac_dots$ac_given_srcdir" ;;
|
||||
esac
|
||||
|
||||
# Find a way to echo strings without interpreting backslash.
|
||||
if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
|
||||
gt_echo='echo'
|
||||
else
|
||||
if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
|
||||
gt_echo='printf %s\n'
|
||||
else
|
||||
echo_func () {
|
||||
cat <<EOT
|
||||
$*
|
||||
EOT
|
||||
}
|
||||
gt_echo='echo_func'
|
||||
fi
|
||||
fi
|
||||
|
||||
# A sed script that extracts the value of VARIABLE from a Makefile.
|
||||
sed_x_variable='
|
||||
# Test if the hold space is empty.
|
||||
x
|
||||
s/P/P/
|
||||
x
|
||||
ta
|
||||
# Yes it was empty. Look if we have the expected variable definition.
|
||||
/^[ ]*VARIABLE[ ]*=/{
|
||||
# Seen the first line of the variable definition.
|
||||
s/^[ ]*VARIABLE[ ]*=//
|
||||
ba
|
||||
}
|
||||
bd
|
||||
:a
|
||||
# Here we are processing a line from the variable definition.
|
||||
# Remove comment, more precisely replace it with a space.
|
||||
s/#.*$/ /
|
||||
# See if the line ends in a backslash.
|
||||
tb
|
||||
:b
|
||||
s/\\$//
|
||||
# Print the line, without the trailing backslash.
|
||||
p
|
||||
tc
|
||||
# There was no trailing backslash. The end of the variable definition is
|
||||
# reached. Clear the hold space.
|
||||
s/^.*$//
|
||||
x
|
||||
bd
|
||||
:c
|
||||
# A trailing backslash means that the variable definition continues in the
|
||||
# next line. Put a nonempty string into the hold space to indicate this.
|
||||
s/^.*$/P/
|
||||
x
|
||||
:d
|
||||
'
|
||||
changequote([,])dnl
|
||||
|
||||
# Set POTFILES to the value of the Makefile variable POTFILES.
|
||||
sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
|
||||
POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
|
||||
# Compute POTFILES_DEPS as
|
||||
# $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
|
||||
POTFILES_DEPS=
|
||||
for file in $POTFILES; do
|
||||
POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
|
||||
done
|
||||
POMAKEFILEDEPS=""
|
||||
|
||||
if test -n "$OBSOLETE_ALL_LINGUAS"; then
|
||||
test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
|
||||
fi
|
||||
if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
|
||||
# The LINGUAS file contains the set of available languages.
|
||||
ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
|
||||
POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
|
||||
else
|
||||
# Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
|
||||
sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
|
||||
ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
|
||||
fi
|
||||
# Hide the ALL_LINGUAS assigment from automake < 1.5.
|
||||
eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
|
||||
# Compute POFILES
|
||||
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
|
||||
# Compute UPDATEPOFILES
|
||||
# as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
|
||||
# Compute DUMMYPOFILES
|
||||
# as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
|
||||
# Compute GMOFILES
|
||||
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
|
||||
# Compute PROPERTIESFILES
|
||||
# as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
|
||||
# Compute CLASSFILES
|
||||
# as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
|
||||
# Compute QMFILES
|
||||
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
|
||||
# Compute MSGFILES
|
||||
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
|
||||
# Compute RESOURCESDLLFILES
|
||||
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
|
||||
case "$ac_given_srcdir" in
|
||||
.) srcdirpre= ;;
|
||||
*) srcdirpre='$(srcdir)/' ;;
|
||||
esac
|
||||
POFILES=
|
||||
UPDATEPOFILES=
|
||||
DUMMYPOFILES=
|
||||
GMOFILES=
|
||||
PROPERTIESFILES=
|
||||
CLASSFILES=
|
||||
QMFILES=
|
||||
MSGFILES=
|
||||
RESOURCESDLLFILES=
|
||||
for lang in $ALL_LINGUAS; do
|
||||
POFILES="$POFILES $srcdirpre$lang.po"
|
||||
UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
|
||||
DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
|
||||
GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
|
||||
PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
|
||||
CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
|
||||
QMFILES="$QMFILES $srcdirpre$lang.qm"
|
||||
frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
|
||||
MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
|
||||
frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
|
||||
RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
|
||||
done
|
||||
# CATALOGS depends on both $ac_dir and the user's LINGUAS
|
||||
# environment variable.
|
||||
INST_LINGUAS=
|
||||
if test -n "$ALL_LINGUAS"; then
|
||||
for presentlang in $ALL_LINGUAS; do
|
||||
useit=no
|
||||
if test "%UNSET%" != "$LINGUAS"; then
|
||||
desiredlanguages="$LINGUAS"
|
||||
else
|
||||
desiredlanguages="$ALL_LINGUAS"
|
||||
fi
|
||||
for desiredlang in $desiredlanguages; do
|
||||
# Use the presentlang catalog if desiredlang is
|
||||
# a. equal to presentlang, or
|
||||
# b. a variant of presentlang (because in this case,
|
||||
# presentlang can be used as a fallback for messages
|
||||
# which are not translated in the desiredlang catalog).
|
||||
case "$desiredlang" in
|
||||
"$presentlang"*) useit=yes;;
|
||||
esac
|
||||
done
|
||||
if test $useit = yes; then
|
||||
INST_LINGUAS="$INST_LINGUAS $presentlang"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
CATALOGS=
|
||||
JAVACATALOGS=
|
||||
QTCATALOGS=
|
||||
TCLCATALOGS=
|
||||
CSHARPCATALOGS=
|
||||
if test -n "$INST_LINGUAS"; then
|
||||
for lang in $INST_LINGUAS; do
|
||||
CATALOGS="$CATALOGS $lang.gmo"
|
||||
JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
|
||||
QTCATALOGS="$QTCATALOGS $lang.qm"
|
||||
frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
|
||||
TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
|
||||
frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
|
||||
CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
|
||||
done
|
||||
fi
|
||||
|
||||
sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
|
||||
if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
|
||||
# Add dependencies that cannot be formulated as a simple suffix rule.
|
||||
for lang in $ALL_LINGUAS; do
|
||||
frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
|
||||
cat >> "$ac_file.tmp" <<EOF
|
||||
$frobbedlang.msg: $lang.po
|
||||
@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
|
||||
\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
|
||||
EOF
|
||||
done
|
||||
fi
|
||||
if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
|
||||
# Add dependencies that cannot be formulated as a simple suffix rule.
|
||||
for lang in $ALL_LINGUAS; do
|
||||
frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
|
||||
cat >> "$ac_file.tmp" <<EOF
|
||||
$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
|
||||
@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
|
||||
\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
|
||||
EOF
|
||||
done
|
||||
fi
|
||||
if test -n "$POMAKEFILEDEPS"; then
|
||||
cat >> "$ac_file.tmp" <<EOF
|
||||
Makefile: $POMAKEFILEDEPS
|
||||
EOF
|
||||
fi
|
||||
mv "$ac_file.tmp" "$ac_file"
|
||||
])
|
||||
|
||||
dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
|
||||
AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
|
||||
[
|
||||
XGETTEXT_EXTRA_OPTIONS=
|
||||
])
|
||||
|
||||
dnl Registers an option to be passed to xgettext in the po subdirectory.
|
||||
AC_DEFUN([AM_XGETTEXT_OPTION],
|
||||
[
|
||||
AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
|
||||
XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
|
||||
])
|
@ -8,14 +8,16 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=jansson
|
||||
PKG_VERSION:=2.13.1
|
||||
PKG_RELEASE:=2
|
||||
PKG_VERSION:=2.14
|
||||
PKG_RELEASE:=3
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/akheron/$(PKG_NAME)/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=c739578bf6b764aa0752db9a2fdadcfe921c78f1228c7ec0bb47fa804c55d17b
|
||||
|
||||
PKG_LICENSE:=MIT
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=http://www.digip.org/jansson/releases/
|
||||
PKG_HASH:=ee90a0f879d2b7b7159124ff22b937a2a9a8c36d3bb65d1da7dd3f04370a10bd
|
||||
PKG_CPE_ID:=cpe:/a:jansson_project:jansson
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
@ -44,7 +46,7 @@ TARGET_LDFLAGS += -flto
|
||||
|
||||
define Package/jansson/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libjansson*so* $(1)/usr/lib/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libjansson*so.* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,jansson))
|
||||
|
@ -1,18 +1,20 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libbsd
|
||||
PKG_VERSION:=0.10.0
|
||||
PKG_VERSION:=0.11.7
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://libbsd.freedesktop.org/releases
|
||||
PKG_HASH:=34b8adc726883d0e85b3118fa13605e179a62b31ba51f676136ecb2d0bc1a887
|
||||
PKG_HASH:=9baa186059ebbf25c06308e9f991fda31f7183c0f24931826d83aa6abd8a0261
|
||||
|
||||
PKG_LICENSE:=BSD-4-Clause
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
PKG_INSTALL:=1
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_BUILD_DEPENDS := libmd
|
||||
PKG_FIXUP:=autoreconf
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
@ -42,4 +44,3 @@ define Package/libbsd/install
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libbsd))
|
||||
|
||||
|
13
package/libs/libbsd/patches/001-fix-libpath.patch
Normal file
13
package/libs/libbsd/patches/001-fix-libpath.patch
Normal file
@ -0,0 +1,13 @@
|
||||
do not use host path to fix cross compiling
|
||||
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -160,7 +160,7 @@
|
||||
(echo '/* GNU ld script'; \
|
||||
echo ' * The MD5 functions are provided by the libmd library. */'; \
|
||||
cat format.ld; \
|
||||
- echo "GROUP($(runtimelibdir)/$$soname AS_NEEDED($(MD5_LIBS)))"; \
|
||||
+ echo "GROUP($$soname AS_NEEDED($(MD5_LIBS)))"; \
|
||||
)>$(DESTDIR)$(libdir)/libbsd.so
|
||||
else
|
||||
if [ "$(libdir)" != "$(runtimelibdir)" ]; then \
|
@ -6,16 +6,17 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libcap
|
||||
PKG_VERSION:=2.63
|
||||
PKG_VERSION:=2.66
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=@KERNEL/linux/libs/security/linux-privs/libcap2
|
||||
PKG_HASH:=0c637b8f44fc7d8627787e9cf57f15ac06c1ddccb53e41feec5496be3466f77f
|
||||
PKG_HASH:=15c40ededb3003d70a283fe587a36b7d19c8b3b554e33f86129c059a4bb466b2
|
||||
|
||||
PKG_MAINTAINER:=Paul Wassi <p.wassi@gmx.at>
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
PKG_LICENSE_FILES:=License
|
||||
PKG_CPE_ID:=cpe:/a:libcap_project:libcap
|
||||
|
||||
PKG_INSTALL:=1
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
@ -0,0 +1,8 @@
|
||||
--- a/progs/mkcapshdoc.sh
|
||||
+++ b/progs/mkcapshdoc.sh
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/bash
|
||||
+#!/usr/bin/env bash
|
||||
# This script generates some C code for inclusion in the capsh binary.
|
||||
# The Makefile generally only generates the .c code and compares it
|
||||
# with the checked in code in the progs directory.
|
@ -1,68 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2008-2016 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:=libdouble-conversion
|
||||
PKG_VERSION:=2.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=0d25506a2e7fb52928963313343e0237e890059e
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_MIRROR_HASH:=7466f634421f3136174cbc2b00635788509a3312894de28367f31d891fd401ad
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_URL:=https://github.com/google/double-conversion.git
|
||||
PKG_LICENSE_FILES:=COPYING LICENSE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
||||
define Package/libdouble-conversion
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=Efficient binary-decimal and decimal-binary conversion routines for IEEE doubles
|
||||
URL:=https://github.com/google/double-conversion
|
||||
DEPENDS:=+libstdcpp
|
||||
endef
|
||||
|
||||
define Package/libdouble-conversion/description
|
||||
double-conversion provides binary-decimal and decimal-binary routines for IEEE doubles.
|
||||
|
||||
The library consists of efficient conversion routines that have been extracted
|
||||
from the V8 JavaScript engine. The code has been refactored and improved so that
|
||||
it can be used more easily in other projects.
|
||||
endef
|
||||
|
||||
CMAKE_OPTIONS += \
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
-DBUILD_TESTING=OFF
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) \
|
||||
$(1)/usr/lib \
|
||||
$(1)/usr/include/double-conversion
|
||||
|
||||
$(CP) \
|
||||
$(PKG_INSTALL_DIR)/usr/include/* \
|
||||
$(1)/usr/include/
|
||||
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_INSTALL_DIR)/usr/lib/lib*.so* \
|
||||
$(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/libdouble-conversion/install
|
||||
$(INSTALL_DIR) \
|
||||
$(1)/usr/lib
|
||||
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_INSTALL_DIR)/usr/lib/lib*.so* \
|
||||
$(1)/usr/lib/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libdouble-conversion))
|
@ -8,13 +8,14 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libiconv-full
|
||||
PKG_VERSION:=1.16
|
||||
PKG_VERSION:=1.17
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=libiconv-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=@GNU/libiconv
|
||||
PKG_HASH:=e6a1b1b589654277ee790cce3734f07876ac4ccfaecbee8afa0b649cf529cc04
|
||||
PKG_HASH:=8f74213b56238c85a50a5329f77e06198771e70dd9a739779f4c02f65d971313
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/libiconv-$(PKG_VERSION)
|
||||
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/libiconv-$(PKG_VERSION)
|
||||
|
||||
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
|
||||
PKG_LICENSE:=LGPL-2.1-or-later
|
||||
@ -25,6 +26,7 @@ PKG_INSTALL:=1
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
|
||||
define Package/libiconv-full/Default
|
||||
URL:=https://www.gnu.org/software/libiconv/
|
||||
@ -61,6 +63,10 @@ CONFIGURE_ARGS += \
|
||||
--disable-rpath \
|
||||
--enable-relocatable
|
||||
|
||||
HOST_CONFIGURE_ARGS += \
|
||||
--disable-shared \
|
||||
--with-pic
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/lib/libiconv-full/include
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/iconv.h $(1)/usr/lib/libiconv-full/include/
|
||||
@ -88,3 +94,4 @@ endef
|
||||
$(eval $(call BuildPackage,libcharset))
|
||||
$(eval $(call BuildPackage,libiconv-full))
|
||||
$(eval $(call BuildPackage,iconv))
|
||||
$(eval $(call HostBuild))
|
||||
|
@ -1,504 +0,0 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library 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
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
|
||||
|
@ -1,20 +0,0 @@
|
||||
Copyright status on all included code:
|
||||
|
||||
All files which have no copyright comments are original works
|
||||
Copyright (C) 2005-2006 Rich Felker. 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/*) should be treated as Public Domain as they intentionally
|
||||
contain no content which can be covered by copyright. Some source
|
||||
modules may fall in this category as well. If you believe that a file
|
||||
is so trivial that it should be in the Public Domain, please contact
|
||||
me and, if I agree, I will explicitly release it from copyright.
|
||||
|
||||
Some code has been modified by the OpenWrt project, this includes
|
||||
the conversion from char map files to C arrays and the iconv.h header
|
||||
file in particular.
|
||||
|
||||
The library as a whole is licensed under the GNU LGPL version 2.1.
|
||||
See the file COPYING for the text of this license.
|
||||
|
||||
The original source can be accessed at svn://svn.mplayerhq.hu/libc/trunk
|
@ -1,79 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2010-2012 OpenWrt.org
|
||||
#
|
||||
# This Makefile and the code shipped in src/ is free software, licensed
|
||||
# under the GNU Lesser General Public License, version 2.1 and later.
|
||||
# See src/COPYING for more information.
|
||||
#
|
||||
# Refer to src/COPYRIGHT for copyright statements on the source files.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libiconv
|
||||
PKG_RELEASE:=8
|
||||
|
||||
PKG_LICENSE:=LGPL-2.1
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
|
||||
define Package/libiconv
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=Tiny drop-in replacement for the GNU Character set conversion library
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(TARGET_CC) $(TARGET_CFLAGS) -c $(PKG_BUILD_DIR)/iconv.c -o $(PKG_BUILD_DIR)/iconv.o -I$(PKG_BUILD_DIR)/include $(FPIC)
|
||||
$(TARGET_CROSS)ar rcs $(PKG_BUILD_DIR)/libiconv.a $(PKG_BUILD_DIR)/iconv.o
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/lib/libiconv-stub/lib
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libiconv.a $(1)/usr/lib/libiconv-stub/lib/
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/lib/libiconv-stub/include
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/include/iconv.h $(1)/usr/lib/libiconv-stub/include/
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/share/aclocal
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/m4/* $(1)/usr/share/aclocal/
|
||||
endef
|
||||
|
||||
define Package/libiconv/install
|
||||
$(INSTALL_DIR) $(1)/tmp
|
||||
touch $(1)/tmp/.libiconv-placeholder
|
||||
endef
|
||||
|
||||
define Host/Prepare
|
||||
mkdir -p $(HOST_BUILD_DIR)
|
||||
endef
|
||||
|
||||
define Host/Configure
|
||||
|
||||
endef
|
||||
|
||||
define Host/Compile
|
||||
$(HOSTCC) -c src/iconv.c -o $(HOST_BUILD_DIR)/iconv.o -Isrc/include -fPIC
|
||||
ar rcs $(HOST_BUILD_DIR)/libiconv.a $(HOST_BUILD_DIR)/iconv.o
|
||||
endef
|
||||
|
||||
define Host/Install
|
||||
$(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/lib
|
||||
$(INSTALL_DATA) $(HOST_BUILD_DIR)/libiconv.a $(STAGING_DIR_HOSTPKG)/lib/
|
||||
|
||||
$(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/include
|
||||
$(INSTALL_DATA) ./src/include/iconv.h $(STAGING_DIR_HOSTPKG)/include/
|
||||
|
||||
$(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/share/aclocal
|
||||
$(INSTALL_DATA) ./src/m4/* $(STAGING_DIR_HOSTPKG)/share/aclocal/
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
$(eval $(call BuildPackage,libiconv))
|
@ -1,6 +0,0 @@
|
||||
The source file iconv.m4 contains the following message
|
||||
|
||||
Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc.
|
||||
This file is free software; the Free Software Foundation
|
||||
gives unlimited permission to copy and/or distribute it,
|
||||
with or without modifications, as long as this notice is preserved.
|
@ -1,449 +0,0 @@
|
||||
#include <iconv.h>
|
||||
#include <errno.h>
|
||||
#include <wchar.h>
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
#include <stdlib.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include <dirent.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/* builtin charmaps */
|
||||
#include "charmaps.h"
|
||||
|
||||
/* only 0-7 are valid as dest charset */
|
||||
#define UTF_16BE 000
|
||||
#define UTF_16LE 001
|
||||
#define UTF_32BE 002
|
||||
#define UTF_32LE 003
|
||||
#define WCHAR_T 004
|
||||
#define UTF_8 005
|
||||
#define US_ASCII 006
|
||||
#define LATIN_1 007
|
||||
|
||||
/* additional charsets with algorithmic conversion */
|
||||
#define LATIN_9 010
|
||||
#define TIS_620 011
|
||||
#define JIS_0201 012
|
||||
|
||||
/* some programs like php need this */
|
||||
int _libiconv_version = _LIBICONV_VERSION;
|
||||
|
||||
/* these must match the constants above */
|
||||
static const unsigned char charsets[] =
|
||||
"\005" "UTF-8" "\0"
|
||||
"\004" "WCHAR_T" "\0"
|
||||
"\000" "UTF-16BE" "\0"
|
||||
"\001" "UTF-16LE" "\0"
|
||||
"\002" "UTF-32BE" "\0"
|
||||
"\003" "UTF-32LE" "\0"
|
||||
"\006" "ASCII" "\0"
|
||||
"\006" "US-ASCII" "\0"
|
||||
"\006" "ISO646-US" "\0"
|
||||
"\006" "ISO_646.IRV:1991" "\0"
|
||||
"\006" "ISO-IR-6" "\0"
|
||||
"\006" "ANSI_X3.4-1968" "\0"
|
||||
"\006" "ANSI_X3.4-1986" "\0"
|
||||
"\006" "CP367" "\0"
|
||||
"\006" "IBM367" "\0"
|
||||
"\006" "US" "\0"
|
||||
"\006" "CSASCII" "\0"
|
||||
"\007" "ISO-8859-1" "\0"
|
||||
"\007" "LATIN1" "\0"
|
||||
"\010" "ISO-8859-15""\0"
|
||||
"\010" "LATIN9" "\0"
|
||||
"\011" "ISO-8859-11""\0"
|
||||
"\011" "TIS-620" "\0"
|
||||
"\012" "JIS-0201" "\0"
|
||||
"\377";
|
||||
|
||||
/* separate identifiers for sbcs/dbcs/etc map type */
|
||||
#define UCS2_8BIT 000
|
||||
#define UCS3_8BIT 001
|
||||
#define EUC 002
|
||||
#define EUC_TW 003
|
||||
#define SHIFT_JIS 004
|
||||
#define BIG5 005
|
||||
#define GBK 006
|
||||
|
||||
/* FIXME: these are not implemented yet
|
||||
// EUC: A1-FE A1-FE
|
||||
// GBK: 81-FE 40-7E,80-FE
|
||||
// Big5: A1-FE 40-7E,A1-FE
|
||||
*/
|
||||
|
||||
static const unsigned short maplen[] = {
|
||||
[UCS2_8BIT] = 4+ 2* 128,
|
||||
[UCS3_8BIT] = 4+ 3* 128,
|
||||
[EUC] = 4+ 2* 94*94,
|
||||
[SHIFT_JIS] = 4+ 2* 94*94,
|
||||
[BIG5] = 4+ 2* 94*157,
|
||||
[GBK] = 4+ 2* 126*190,
|
||||
[EUC_TW] = 4+ 2* 2*94*94,
|
||||
};
|
||||
|
||||
static int find_charmap(const char *name)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < (sizeof(charmaps) / sizeof(charmaps[0])); i++)
|
||||
if (!strcasecmp(charmaps[i].name, name))
|
||||
return i;
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int find_charset(const char *name)
|
||||
{
|
||||
const unsigned char *s;
|
||||
for (s=charsets; *s<0xff && strcasecmp(s+1, name); s+=strlen(s)+1);
|
||||
return *s;
|
||||
}
|
||||
|
||||
iconv_t iconv_open(const char *to, const char *from)
|
||||
{
|
||||
unsigned f, t;
|
||||
int m;
|
||||
|
||||
if ((t = find_charset(to)) > 8)
|
||||
return -1;
|
||||
|
||||
if ((f = find_charset(from)) < 255)
|
||||
return 0 | (t<<1) | (f<<8);
|
||||
|
||||
if ((m = find_charmap(from)) > -1)
|
||||
return 1 | (t<<1) | (m<<8);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
int iconv_close(iconv_t cd)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline wchar_t get_16(const unsigned char *s, int endian)
|
||||
{
|
||||
endian &= 1;
|
||||
return s[endian]<<8 | s[endian^1];
|
||||
}
|
||||
|
||||
static inline void put_16(unsigned char *s, wchar_t c, int endian)
|
||||
{
|
||||
endian &= 1;
|
||||
s[endian] = c>>8;
|
||||
s[endian^1] = c;
|
||||
}
|
||||
|
||||
static inline int utf8enc_wchar(char *outb, wchar_t c)
|
||||
{
|
||||
if (c <= 0x7F) {
|
||||
*outb = c;
|
||||
return 1;
|
||||
}
|
||||
else if (c <= 0x7FF) {
|
||||
*outb++ = ((c >> 6) & 0x1F) | 0xC0;
|
||||
*outb++ = ( c & 0x3F) | 0x80;
|
||||
return 2;
|
||||
}
|
||||
else if (c <= 0xFFFF) {
|
||||
*outb++ = ((c >> 12) & 0x0F) | 0xE0;
|
||||
*outb++ = ((c >> 6) & 0x3F) | 0x80;
|
||||
*outb++ = ( c & 0x3F) | 0x80;
|
||||
return 3;
|
||||
}
|
||||
else if (c <= 0x10FFFF) {
|
||||
*outb++ = ((c >> 18) & 0x07) | 0xF0;
|
||||
*outb++ = ((c >> 12) & 0x3F) | 0x80;
|
||||
*outb++ = ((c >> 6) & 0x3F) | 0x80;
|
||||
*outb++ = ( c & 0x3F) | 0x80;
|
||||
return 4;
|
||||
}
|
||||
else {
|
||||
*outb++ = '?';
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
static inline int utf8seq_is_overlong(char *s, int n)
|
||||
{
|
||||
switch (n)
|
||||
{
|
||||
case 2:
|
||||
/* 1100000x (10xxxxxx) */
|
||||
return (((*s >> 1) == 0x60) &&
|
||||
((*(s+1) >> 6) == 0x02));
|
||||
|
||||
case 3:
|
||||
/* 11100000 100xxxxx (10xxxxxx) */
|
||||
return ((*s == 0xE0) &&
|
||||
((*(s+1) >> 5) == 0x04) &&
|
||||
((*(s+2) >> 6) == 0x02));
|
||||
|
||||
case 4:
|
||||
/* 11110000 1000xxxx (10xxxxxx 10xxxxxx) */
|
||||
return ((*s == 0xF0) &&
|
||||
((*(s+1) >> 4) == 0x08) &&
|
||||
((*(s+2) >> 6) == 0x02) &&
|
||||
((*(s+3) >> 6) == 0x02));
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int utf8seq_is_surrogate(char *s, int n)
|
||||
{
|
||||
return ((n == 3) && (*s == 0xED) && (*(s+1) >= 0xA0) && (*(s+1) <= 0xBF));
|
||||
}
|
||||
|
||||
static inline int utf8seq_is_illegal(char *s, int n)
|
||||
{
|
||||
return ((n == 3) && (*s == 0xEF) && (*(s+1) == 0xBF) &&
|
||||
(*(s+2) >= 0xBE) && (*(s+2) <= 0xBF));
|
||||
}
|
||||
|
||||
static inline int utf8dec_wchar(wchar_t *c, unsigned char *in, size_t inb)
|
||||
{
|
||||
int i;
|
||||
int n = -1;
|
||||
|
||||
/* trivial char */
|
||||
if (*in <= 0x7F) {
|
||||
*c = *in;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* find utf8 sequence length */
|
||||
if ((*in & 0xE0) == 0xC0) n = 2;
|
||||
else if ((*in & 0xF0) == 0xE0) n = 3;
|
||||
else if ((*in & 0xF8) == 0xF0) n = 4;
|
||||
else if ((*in & 0xFC) == 0xF8) n = 5;
|
||||
else if ((*in & 0xFE) == 0xFC) n = 6;
|
||||
|
||||
/* starved? */
|
||||
if (n > inb)
|
||||
return -2;
|
||||
|
||||
/* decode ... */
|
||||
if (n > 1 && n < 5) {
|
||||
/* reject invalid sequences */
|
||||
if (utf8seq_is_overlong(in, n) ||
|
||||
utf8seq_is_surrogate(in, n) ||
|
||||
utf8seq_is_illegal(in, n))
|
||||
return -1;
|
||||
|
||||
/* decode ... */
|
||||
*c = (char)(*in++ & (0x7F >> n));
|
||||
|
||||
for (i = 1; i < n; i++) {
|
||||
/* illegal continuation byte */
|
||||
if (*in < 0x80 || *in > 0xBF)
|
||||
return -1;
|
||||
|
||||
*c = (*c << 6) | (*in++ & 0x3F);
|
||||
}
|
||||
|
||||
return n;
|
||||
}
|
||||
|
||||
/* unmapped sequence (> 4) */
|
||||
return -1;
|
||||
}
|
||||
|
||||
static inline wchar_t latin9_translit(wchar_t c)
|
||||
{
|
||||
/* a number of trivial iso-8859-15 <> utf-8 transliterations */
|
||||
switch (c) {
|
||||
case 0x20AC: return 0xA4; /* Euro */
|
||||
case 0x0160: return 0xA6; /* S caron */
|
||||
case 0x0161: return 0xA8; /* s caron */
|
||||
case 0x017D: return 0xB4; /* Z caron */
|
||||
case 0x017E: return 0xB8; /* z caron */
|
||||
case 0x0152: return 0xBC; /* OE */
|
||||
case 0x0153: return 0xBD; /* oe */
|
||||
case 0x0178: return 0xBE; /* Y diaeresis */
|
||||
default: return 0xFFFD; /* cannot translate */
|
||||
}
|
||||
}
|
||||
|
||||
size_t iconv(iconv_t cd, char **in, size_t *inb, char **out, size_t *outb)
|
||||
{
|
||||
size_t x=0;
|
||||
unsigned char to = (cd>>1)&127;
|
||||
unsigned char from = 255;
|
||||
const unsigned char *map = 0;
|
||||
char tmp[MB_LEN_MAX];
|
||||
wchar_t c, d;
|
||||
size_t k, l;
|
||||
int err;
|
||||
|
||||
if (!in || !*in || !*inb) return 0;
|
||||
|
||||
if (cd & 1)
|
||||
map = charmaps[cd>>8].map;
|
||||
else
|
||||
from = cd>>8;
|
||||
|
||||
for (; *inb; *in+=l, *inb-=l) {
|
||||
c = *(unsigned char *)*in;
|
||||
l = 1;
|
||||
if (from >= UTF_8 && c < 0x80) goto charok;
|
||||
switch (from) {
|
||||
case WCHAR_T:
|
||||
l = sizeof(wchar_t);
|
||||
if (*inb < l) goto starved;
|
||||
c = *(wchar_t *)*in;
|
||||
break;
|
||||
case UTF_8:
|
||||
l = utf8dec_wchar(&c, *in, *inb);
|
||||
if (!l) l++;
|
||||
else if (l == (size_t)-1) goto ilseq;
|
||||
else if (l == (size_t)-2) goto starved;
|
||||
break;
|
||||
case US_ASCII:
|
||||
goto ilseq;
|
||||
case LATIN_9:
|
||||
if ((unsigned)c - 0xa4 <= 0xbe - 0xa4) {
|
||||
static const unsigned char map[] = {
|
||||
0, 0x60, 0, 0x61, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0x7d, 0, 0, 0, 0x7e, 0, 0, 0,
|
||||
0x52, 0x53, 0x78
|
||||
};
|
||||
if (c == 0xa4) c = 0x20ac;
|
||||
else if (map[c-0xa5]) c = 0x100 | map[c-0xa5];
|
||||
}
|
||||
case LATIN_1:
|
||||
goto charok;
|
||||
case TIS_620:
|
||||
if (c >= 0xa1) c += 0x0e01-0xa1;
|
||||
goto charok;
|
||||
case JIS_0201:
|
||||
if (c >= 0xa1) {
|
||||
if (c <= 0xdf) c += 0xff61-0xa1;
|
||||
else goto ilseq;
|
||||
}
|
||||
goto charok;
|
||||
case UTF_16BE:
|
||||
case UTF_16LE:
|
||||
l = 2;
|
||||
if (*inb < 2) goto starved;
|
||||
c = get_16(*in, from);
|
||||
if ((unsigned)(c-0xdc00) < 0x400) goto ilseq;
|
||||
if ((unsigned)(c-0xd800) < 0x400) {
|
||||
l = 4;
|
||||
if (*inb < 4) goto starved;
|
||||
d = get_16(*in + 2, from);
|
||||
if ((unsigned)(c-0xdc00) >= 0x400) goto ilseq;
|
||||
c = ((c-0xd800)<<10) | (d-0xdc00);
|
||||
}
|
||||
break;
|
||||
case UTF_32BE:
|
||||
case UTF_32LE:
|
||||
l = 4;
|
||||
if (*inb < 4) goto starved;
|
||||
// FIXME
|
||||
// c = get_32(*in, from);
|
||||
break;
|
||||
default:
|
||||
/* only support ascii supersets */
|
||||
if (c < 0x80) break;
|
||||
switch (map[0]) {
|
||||
case UCS2_8BIT:
|
||||
c -= 0x80;
|
||||
break;
|
||||
case EUC:
|
||||
if ((unsigned)c - 0xa1 >= 94) goto ilseq;
|
||||
if ((unsigned)in[0][1] - 0xa1 >= 94) goto ilseq;
|
||||
c = (c-0xa1)*94 + (in[0][1]-0xa1);
|
||||
l = 2;
|
||||
break;
|
||||
case SHIFT_JIS:
|
||||
if ((unsigned)c - 0xa1 <= 0xdf-0xa1) {
|
||||
c += 0xff61-0xa1;
|
||||
goto charok;
|
||||
}
|
||||
// FIXME...
|
||||
l = 2;
|
||||
break;
|
||||
default:
|
||||
goto badf;
|
||||
}
|
||||
c = get_16(map + 4 + 2*c, 0);
|
||||
if (c == 0xffff) goto ilseq;
|
||||
goto charok;
|
||||
}
|
||||
|
||||
if ((unsigned)c - 0xd800 < 0x800 || (unsigned)c >= 0x110000)
|
||||
goto ilseq;
|
||||
charok:
|
||||
switch (to) {
|
||||
case WCHAR_T:
|
||||
if (*outb < sizeof(wchar_t)) goto toobig;
|
||||
*(wchar_t *)*out = c;
|
||||
*out += sizeof(wchar_t);
|
||||
*outb -= sizeof(wchar_t);
|
||||
break;
|
||||
case UTF_8:
|
||||
if (*outb < 4) {
|
||||
k = utf8enc_wchar(tmp, c);
|
||||
if (*outb < k) goto toobig;
|
||||
memcpy(*out, tmp, k);
|
||||
} else k = utf8enc_wchar(*out, c);
|
||||
*out += k;
|
||||
*outb -= k;
|
||||
break;
|
||||
case US_ASCII:
|
||||
if (c > 0x7f) c = 0xfffd;
|
||||
/* fall thru and count replacement in latin1 case */
|
||||
case LATIN_9:
|
||||
if (c >= 0x100 && c != 0xfffd)
|
||||
c = latin9_translit(c);
|
||||
/* fall through */
|
||||
case LATIN_1:
|
||||
if (c > 0xff) goto ilseq;
|
||||
if (!*outb) goto toobig;
|
||||
**out = c;
|
||||
++*out;
|
||||
--*outb;
|
||||
break;
|
||||
case UTF_16BE:
|
||||
case UTF_16LE:
|
||||
if (c < 0x10000) {
|
||||
if (*outb < 2) goto toobig;
|
||||
put_16(*out, c, to);
|
||||
*out += 2;
|
||||
*outb -= 2;
|
||||
break;
|
||||
}
|
||||
if (*outb < 4) goto toobig;
|
||||
put_16(*out, (c>>10)|0xd800, to);
|
||||
put_16(*out + 2, (c&0x3ff)|0xdc00, to);
|
||||
*out += 4;
|
||||
*outb -= 4;
|
||||
break;
|
||||
default:
|
||||
goto badf;
|
||||
}
|
||||
}
|
||||
return x;
|
||||
ilseq:
|
||||
err = EILSEQ;
|
||||
x = -1;
|
||||
goto end;
|
||||
badf:
|
||||
err = EBADF;
|
||||
x = -1;
|
||||
goto end;
|
||||
toobig:
|
||||
err = E2BIG;
|
||||
x = -1;
|
||||
goto end;
|
||||
starved:
|
||||
err = EINVAL;
|
||||
end:
|
||||
errno = err;
|
||||
return x;
|
||||
}
|
@ -1,80 +0,0 @@
|
||||
#include "charmaps/iso-8859-2.h"
|
||||
#include "charmaps/iso-8859-10.h"
|
||||
#include "charmaps/windows-874.h"
|
||||
#include "charmaps/windows-1250.h"
|
||||
#include "charmaps/koi8-r.h"
|
||||
|
||||
#ifdef ALL_CHARSETS
|
||||
#include "charmaps/iso-8859-3.h"
|
||||
#include "charmaps/iso-8859-4.h"
|
||||
#include "charmaps/iso-8859-5.h"
|
||||
#include "charmaps/iso-8859-6.h"
|
||||
#include "charmaps/iso-8859-7.h"
|
||||
#include "charmaps/iso-8859-8.h"
|
||||
#include "charmaps/iso-8859-9.h"
|
||||
#include "charmaps/iso-8859-13.h"
|
||||
#include "charmaps/iso-8859-14.h"
|
||||
#include "charmaps/iso-8859-16.h"
|
||||
#include "charmaps/windows-1251.h"
|
||||
#include "charmaps/windows-1252.h"
|
||||
#include "charmaps/windows-1253.h"
|
||||
#include "charmaps/windows-1254.h"
|
||||
#include "charmaps/windows-1255.h"
|
||||
#include "charmaps/windows-1256.h"
|
||||
#include "charmaps/windows-1257.h"
|
||||
#include "charmaps/windows-1258.h"
|
||||
#endif
|
||||
|
||||
|
||||
struct charmap {
|
||||
const char name[13];
|
||||
const unsigned char *map;
|
||||
};
|
||||
|
||||
static struct charmap charmaps[] = {
|
||||
{ "ISO-8859-2", map_iso_8859_2 },
|
||||
{ "ISO-8859-10", map_iso_8859_10 },
|
||||
|
||||
#ifdef ALL_CHARSETS
|
||||
{ "ISO-8859-3", map_iso_8859_3 },
|
||||
{ "ISO-8859-4", map_iso_8859_4 },
|
||||
{ "ISO-8859-5", map_iso_8859_5 },
|
||||
{ "ISO-8859-6", map_iso_8859_6 },
|
||||
{ "ISO-8859-7", map_iso_8859_7 },
|
||||
{ "ISO-8859-8", map_iso_8859_8 },
|
||||
{ "ISO-8859-9", map_iso_8859_9 },
|
||||
{ "ISO-8859-13", map_iso_8859_13 },
|
||||
{ "ISO-8859-14", map_iso_8859_14 },
|
||||
{ "ISO-8859-16", map_iso_8859_16 },
|
||||
#endif
|
||||
|
||||
{ "WINDOWS-874", map_windows_874 },
|
||||
{ "WINDOWS-1250", map_windows_1250 },
|
||||
|
||||
#ifdef ALL_CHARSETS
|
||||
{ "WINDOWS-1251", map_windows_1251 },
|
||||
{ "WINDOWS-1252", map_windows_1252 },
|
||||
{ "WINDOWS-1253", map_windows_1253 },
|
||||
{ "WINDOWS-1254", map_windows_1254 },
|
||||
{ "WINDOWS-1255", map_windows_1255 },
|
||||
{ "WINDOWS-1256", map_windows_1256 },
|
||||
{ "WINDOWS-1257", map_windows_1257 },
|
||||
{ "WINDOWS-1258", map_windows_1258 },
|
||||
#endif
|
||||
|
||||
{ "KOI8-R", map_koi8_r },
|
||||
|
||||
/* Aliases */
|
||||
{ "LATIN2", map_iso_8859_2 },
|
||||
{ "LATIN6", map_iso_8859_10 },
|
||||
|
||||
#ifdef ALL_CHARSETS
|
||||
{ "ARABIC", map_iso_8859_6 },
|
||||
{ "CYRILLIC", map_iso_8859_5 },
|
||||
{ "GREEK", map_iso_8859_7 },
|
||||
{ "HEBREW", map_iso_8859_8 },
|
||||
{ "LATIN3", map_iso_8859_3 },
|
||||
{ "LATIN4", map_iso_8859_4 },
|
||||
{ "LATIN5", map_iso_8859_9 },
|
||||
#endif
|
||||
};
|
@ -1,24 +0,0 @@
|
||||
static const unsigned char map_iso_8859_10[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83,
|
||||
0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89,
|
||||
0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f,
|
||||
0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95,
|
||||
0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b,
|
||||
0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x01, 0x04,
|
||||
0x01, 0x12, 0x01, 0x22, 0x01, 0x2a, 0x01, 0x28, 0x01, 0x36, 0x00, 0xa7,
|
||||
0x01, 0x3b, 0x01, 0x10, 0x01, 0x60, 0x01, 0x66, 0x01, 0x7d, 0x00, 0xad,
|
||||
0x01, 0x6a, 0x01, 0x4a, 0x00, 0xb0, 0x01, 0x05, 0x01, 0x13, 0x01, 0x23,
|
||||
0x01, 0x2b, 0x01, 0x29, 0x01, 0x37, 0x00, 0xb7, 0x01, 0x3c, 0x01, 0x11,
|
||||
0x01, 0x61, 0x01, 0x67, 0x01, 0x7e, 0x20, 0x15, 0x01, 0x6b, 0x01, 0x4b,
|
||||
0x01, 0x00, 0x00, 0xc1, 0x00, 0xc2, 0x00, 0xc3, 0x00, 0xc4, 0x00, 0xc5,
|
||||
0x00, 0xc6, 0x01, 0x2e, 0x01, 0x0c, 0x00, 0xc9, 0x01, 0x18, 0x00, 0xcb,
|
||||
0x01, 0x16, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xcf, 0x00, 0xd0, 0x01, 0x45,
|
||||
0x01, 0x4c, 0x00, 0xd3, 0x00, 0xd4, 0x00, 0xd5, 0x00, 0xd6, 0x01, 0x68,
|
||||
0x00, 0xd8, 0x01, 0x72, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x00, 0xdd,
|
||||
0x00, 0xde, 0x00, 0xdf, 0x01, 0x01, 0x00, 0xe1, 0x00, 0xe2, 0x00, 0xe3,
|
||||
0x00, 0xe4, 0x00, 0xe5, 0x00, 0xe6, 0x01, 0x2f, 0x01, 0x0d, 0x00, 0xe9,
|
||||
0x01, 0x19, 0x00, 0xeb, 0x01, 0x17, 0x00, 0xed, 0x00, 0xee, 0x00, 0xef,
|
||||
0x00, 0xf0, 0x01, 0x46, 0x01, 0x4d, 0x00, 0xf3, 0x00, 0xf4, 0x00, 0xf5,
|
||||
0x00, 0xf6, 0x01, 0x69, 0x00, 0xf8, 0x01, 0x73, 0x00, 0xfa, 0x00, 0xfb,
|
||||
0x00, 0xfc, 0x00, 0xfd, 0x00, 0xfe, 0x01, 0x38
|
||||
};
|
@ -1,24 +0,0 @@
|
||||
static const unsigned char map_iso_8859_13[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83,
|
||||
0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89,
|
||||
0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f,
|
||||
0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95,
|
||||
0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b,
|
||||
0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x20, 0x1d,
|
||||
0x00, 0xa2, 0x00, 0xa3, 0x00, 0xa4, 0x20, 0x1e, 0x00, 0xa6, 0x00, 0xa7,
|
||||
0x00, 0xd8, 0x00, 0xa9, 0x01, 0x56, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad,
|
||||
0x00, 0xae, 0x00, 0xc6, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3,
|
||||
0x20, 0x1c, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xf8, 0x00, 0xb9,
|
||||
0x01, 0x57, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbd, 0x00, 0xbe, 0x00, 0xe6,
|
||||
0x01, 0x04, 0x01, 0x2e, 0x01, 0x00, 0x01, 0x06, 0x00, 0xc4, 0x00, 0xc5,
|
||||
0x01, 0x18, 0x01, 0x12, 0x01, 0x0c, 0x00, 0xc9, 0x01, 0x79, 0x01, 0x16,
|
||||
0x01, 0x22, 0x01, 0x36, 0x01, 0x2a, 0x01, 0x3b, 0x01, 0x60, 0x01, 0x43,
|
||||
0x01, 0x45, 0x00, 0xd3, 0x01, 0x4c, 0x00, 0xd5, 0x00, 0xd6, 0x00, 0xd7,
|
||||
0x01, 0x72, 0x01, 0x41, 0x01, 0x5a, 0x01, 0x6a, 0x00, 0xdc, 0x01, 0x7b,
|
||||
0x01, 0x7d, 0x00, 0xdf, 0x01, 0x05, 0x01, 0x2f, 0x01, 0x01, 0x01, 0x07,
|
||||
0x00, 0xe4, 0x00, 0xe5, 0x01, 0x19, 0x01, 0x13, 0x01, 0x0d, 0x00, 0xe9,
|
||||
0x01, 0x7a, 0x01, 0x17, 0x01, 0x23, 0x01, 0x37, 0x01, 0x2b, 0x01, 0x3c,
|
||||
0x01, 0x61, 0x01, 0x44, 0x01, 0x46, 0x00, 0xf3, 0x01, 0x4d, 0x00, 0xf5,
|
||||
0x00, 0xf6, 0x00, 0xf7, 0x01, 0x73, 0x01, 0x42, 0x01, 0x5b, 0x01, 0x6b,
|
||||
0x00, 0xfc, 0x01, 0x7c, 0x01, 0x7e, 0x20, 0x19
|
||||
};
|
@ -1,25 +0,0 @@
|
||||
static const unsigned char map_iso_8859_14[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83,
|
||||
0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89,
|
||||
0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f,
|
||||
0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95,
|
||||
0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b,
|
||||
0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x1e, 0x02,
|
||||
0x1e, 0x03, 0x00, 0xa3, 0x01, 0x0a, 0x01, 0x0b, 0x1e, 0x0a, 0x00, 0xa7,
|
||||
0x1e, 0x80, 0x00, 0xa9, 0x1e, 0x82, 0x1e, 0x0b, 0x1e, 0xf2, 0x00, 0xad,
|
||||
0x00, 0xae, 0x01, 0x78, 0x1e, 0x1e, 0x1e, 0x1f, 0x01, 0x20, 0x01, 0x21,
|
||||
0x1e, 0x40, 0x1e, 0x41, 0x00, 0xb6, 0x1e, 0x56, 0x1e, 0x81, 0x1e, 0x57,
|
||||
0x1e, 0x83, 0x1e, 0x60, 0x1e, 0xf3, 0x1e, 0x84, 0x1e, 0x85, 0x1e, 0x61,
|
||||
0x00, 0xc0, 0x00, 0xc1, 0x00, 0xc2, 0x00, 0xc3, 0x00, 0xc4, 0x00, 0xc5,
|
||||
0x00, 0xc6, 0x00, 0xc7, 0x00, 0xc8, 0x00, 0xc9, 0x00, 0xca, 0x00, 0xcb,
|
||||
0x00, 0xcc, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xcf, 0x01, 0x74, 0x00, 0xd1,
|
||||
0x00, 0xd2, 0x00, 0xd3, 0x00, 0xd4, 0x00, 0xd5, 0x00, 0xd6, 0x1e, 0x6a,
|
||||
0x00, 0xd8, 0x00, 0xd9, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x00, 0xdd,
|
||||
0x01, 0x76, 0x00, 0xdf, 0x00, 0xe0, 0x00, 0xe1, 0x00, 0xe2, 0x00, 0xe3,
|
||||
0x00, 0xe4, 0x00, 0xe5, 0x00, 0xe6, 0x00, 0xe7, 0x00, 0xe8, 0x00, 0xe9,
|
||||
0x00, 0xea, 0x00, 0xeb, 0x00, 0xec, 0x00, 0xed, 0x00, 0xee, 0x00, 0xef,
|
||||
0x01, 0x75, 0x00, 0xf1, 0x00, 0xf2, 0x00, 0xf3, 0x00, 0xf4, 0x00, 0xf5,
|
||||
0x00, 0xf6, 0x1e, 0x6b, 0x00, 0xf8, 0x00, 0xf9, 0x00, 0xfa, 0x00, 0xfb,
|
||||
0x00, 0xfc, 0x00, 0xfd, 0x01, 0x77, 0x00, 0xff
|
||||
};
|
||||
|
@ -1,24 +0,0 @@
|
||||
static const unsigned char map_iso_8859_16[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83,
|
||||
0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89,
|
||||
0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f,
|
||||
0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95,
|
||||
0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b,
|
||||
0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x01, 0x04,
|
||||
0x01, 0x05, 0x01, 0x41, 0x20, 0xac, 0x20, 0x1e, 0x01, 0x60, 0x00, 0xa7,
|
||||
0x01, 0x61, 0x00, 0xa9, 0x02, 0x18, 0x00, 0xab, 0x01, 0x79, 0x00, 0xad,
|
||||
0x01, 0x7a, 0x01, 0x7b, 0x00, 0xb0, 0x00, 0xb1, 0x01, 0x0c, 0x01, 0x42,
|
||||
0x01, 0x7d, 0x20, 0x1d, 0x00, 0xb6, 0x00, 0xb7, 0x01, 0x7e, 0x01, 0x0d,
|
||||
0x02, 0x19, 0x00, 0xbb, 0x01, 0x52, 0x01, 0x53, 0x01, 0x78, 0x01, 0x7c,
|
||||
0x00, 0xc0, 0x00, 0xc1, 0x00, 0xc2, 0x01, 0x02, 0x00, 0xc4, 0x01, 0x06,
|
||||
0x00, 0xc6, 0x00, 0xc7, 0x00, 0xc8, 0x00, 0xc9, 0x00, 0xca, 0x00, 0xcb,
|
||||
0x00, 0xcc, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xcf, 0x01, 0x10, 0x01, 0x43,
|
||||
0x00, 0xd2, 0x00, 0xd3, 0x00, 0xd4, 0x01, 0x50, 0x00, 0xd6, 0x01, 0x5a,
|
||||
0x01, 0x70, 0x00, 0xd9, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x01, 0x18,
|
||||
0x02, 0x1a, 0x00, 0xdf, 0x00, 0xe0, 0x00, 0xe1, 0x00, 0xe2, 0x01, 0x03,
|
||||
0x00, 0xe4, 0x01, 0x07, 0x00, 0xe6, 0x00, 0xe7, 0x00, 0xe8, 0x00, 0xe9,
|
||||
0x00, 0xea, 0x00, 0xeb, 0x00, 0xec, 0x00, 0xed, 0x00, 0xee, 0x00, 0xef,
|
||||
0x01, 0x11, 0x01, 0x44, 0x00, 0xf2, 0x00, 0xf3, 0x00, 0xf4, 0x01, 0x51,
|
||||
0x00, 0xf6, 0x01, 0x5b, 0x01, 0x71, 0x00, 0xf9, 0x00, 0xfa, 0x00, 0xfb,
|
||||
0x00, 0xfc, 0x01, 0x19, 0x02, 0x1b, 0x00, 0xff
|
||||
};
|
@ -1,24 +0,0 @@
|
||||
static const unsigned char map_iso_8859_2[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83,
|
||||
0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89,
|
||||
0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f,
|
||||
0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95,
|
||||
0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b,
|
||||
0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x01, 0x04,
|
||||
0x02, 0xd8, 0x01, 0x41, 0x00, 0xa4, 0x01, 0x3d, 0x01, 0x5a, 0x00, 0xa7,
|
||||
0x00, 0xa8, 0x01, 0x60, 0x01, 0x5e, 0x01, 0x64, 0x01, 0x79, 0x00, 0xad,
|
||||
0x01, 0x7d, 0x01, 0x7b, 0x00, 0xb0, 0x01, 0x05, 0x02, 0xdb, 0x01, 0x42,
|
||||
0x00, 0xb4, 0x01, 0x3e, 0x01, 0x5b, 0x02, 0xc7, 0x00, 0xb8, 0x01, 0x61,
|
||||
0x01, 0x5f, 0x01, 0x65, 0x01, 0x7a, 0x02, 0xdd, 0x01, 0x7e, 0x01, 0x7c,
|
||||
0x01, 0x54, 0x00, 0xc1, 0x00, 0xc2, 0x01, 0x02, 0x00, 0xc4, 0x01, 0x39,
|
||||
0x01, 0x06, 0x00, 0xc7, 0x01, 0x0c, 0x00, 0xc9, 0x01, 0x18, 0x00, 0xcb,
|
||||
0x01, 0x1a, 0x00, 0xcd, 0x00, 0xce, 0x01, 0x0e, 0x01, 0x10, 0x01, 0x43,
|
||||
0x01, 0x47, 0x00, 0xd3, 0x00, 0xd4, 0x01, 0x50, 0x00, 0xd6, 0x00, 0xd7,
|
||||
0x01, 0x58, 0x01, 0x6e, 0x00, 0xda, 0x01, 0x70, 0x00, 0xdc, 0x00, 0xdd,
|
||||
0x01, 0x62, 0x00, 0xdf, 0x01, 0x55, 0x00, 0xe1, 0x00, 0xe2, 0x01, 0x03,
|
||||
0x00, 0xe4, 0x01, 0x3a, 0x01, 0x07, 0x00, 0xe7, 0x01, 0x0d, 0x00, 0xe9,
|
||||
0x01, 0x19, 0x00, 0xeb, 0x01, 0x1b, 0x00, 0xed, 0x00, 0xee, 0x01, 0x0f,
|
||||
0x01, 0x11, 0x01, 0x44, 0x01, 0x48, 0x00, 0xf3, 0x00, 0xf4, 0x01, 0x51,
|
||||
0x00, 0xf6, 0x00, 0xf7, 0x01, 0x59, 0x01, 0x6f, 0x00, 0xfa, 0x01, 0x71,
|
||||
0x00, 0xfc, 0x00, 0xfd, 0x01, 0x63, 0x02, 0xd9
|
||||
};
|
@ -1,24 +0,0 @@
|
||||
static const unsigned char map_iso_8859_3[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83,
|
||||
0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89,
|
||||
0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f,
|
||||
0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95,
|
||||
0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b,
|
||||
0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x01, 0x26,
|
||||
0x02, 0xd8, 0x00, 0xa3, 0x00, 0xa4, 0xff, 0xff, 0x01, 0x24, 0x00, 0xa7,
|
||||
0x00, 0xa8, 0x01, 0x30, 0x01, 0x5e, 0x01, 0x1e, 0x01, 0x34, 0x00, 0xad,
|
||||
0xff, 0xff, 0x01, 0x7b, 0x00, 0xb0, 0x01, 0x27, 0x00, 0xb2, 0x00, 0xb3,
|
||||
0x00, 0xb4, 0x00, 0xb5, 0x01, 0x25, 0x00, 0xb7, 0x00, 0xb8, 0x01, 0x31,
|
||||
0x01, 0x5f, 0x01, 0x1f, 0x01, 0x35, 0x00, 0xbd, 0xff, 0xff, 0x01, 0x7c,
|
||||
0x00, 0xc0, 0x00, 0xc1, 0x00, 0xc2, 0xff, 0xff, 0x00, 0xc4, 0x01, 0x0a,
|
||||
0x01, 0x08, 0x00, 0xc7, 0x00, 0xc8, 0x00, 0xc9, 0x00, 0xca, 0x00, 0xcb,
|
||||
0x00, 0xcc, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xcf, 0xff, 0xff, 0x00, 0xd1,
|
||||
0x00, 0xd2, 0x00, 0xd3, 0x00, 0xd4, 0x01, 0x20, 0x00, 0xd6, 0x00, 0xd7,
|
||||
0x01, 0x1c, 0x00, 0xd9, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x01, 0x6c,
|
||||
0x01, 0x5c, 0x00, 0xdf, 0x00, 0xe0, 0x00, 0xe1, 0x00, 0xe2, 0xff, 0xff,
|
||||
0x00, 0xe4, 0x01, 0x0b, 0x01, 0x09, 0x00, 0xe7, 0x00, 0xe8, 0x00, 0xe9,
|
||||
0x00, 0xea, 0x00, 0xeb, 0x00, 0xec, 0x00, 0xed, 0x00, 0xee, 0x00, 0xef,
|
||||
0xff, 0xff, 0x00, 0xf1, 0x00, 0xf2, 0x00, 0xf3, 0x00, 0xf4, 0x01, 0x21,
|
||||
0x00, 0xf6, 0x00, 0xf7, 0x01, 0x1d, 0x00, 0xf9, 0x00, 0xfa, 0x00, 0xfb,
|
||||
0x00, 0xfc, 0x01, 0x6d, 0x01, 0x5d, 0x02, 0xd9
|
||||
};
|
@ -1,24 +0,0 @@
|
||||
static const unsigned char map_iso_8859_4[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83,
|
||||
0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89,
|
||||
0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f,
|
||||
0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95,
|
||||
0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b,
|
||||
0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x01, 0x04,
|
||||
0x01, 0x38, 0x01, 0x56, 0x00, 0xa4, 0x01, 0x28, 0x01, 0x3b, 0x00, 0xa7,
|
||||
0x00, 0xa8, 0x01, 0x60, 0x01, 0x12, 0x01, 0x22, 0x01, 0x66, 0x00, 0xad,
|
||||
0x01, 0x7d, 0x00, 0xaf, 0x00, 0xb0, 0x01, 0x05, 0x02, 0xdb, 0x01, 0x57,
|
||||
0x00, 0xb4, 0x01, 0x29, 0x01, 0x3c, 0x02, 0xc7, 0x00, 0xb8, 0x01, 0x61,
|
||||
0x01, 0x13, 0x01, 0x23, 0x01, 0x67, 0x01, 0x4a, 0x01, 0x7e, 0x01, 0x4b,
|
||||
0x01, 0x00, 0x00, 0xc1, 0x00, 0xc2, 0x00, 0xc3, 0x00, 0xc4, 0x00, 0xc5,
|
||||
0x00, 0xc6, 0x01, 0x2e, 0x01, 0x0c, 0x00, 0xc9, 0x01, 0x18, 0x00, 0xcb,
|
||||
0x01, 0x16, 0x00, 0xcd, 0x00, 0xce, 0x01, 0x2a, 0x01, 0x10, 0x01, 0x45,
|
||||
0x01, 0x4c, 0x01, 0x36, 0x00, 0xd4, 0x00, 0xd5, 0x00, 0xd6, 0x00, 0xd7,
|
||||
0x00, 0xd8, 0x01, 0x72, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x01, 0x68,
|
||||
0x01, 0x6a, 0x00, 0xdf, 0x01, 0x01, 0x00, 0xe1, 0x00, 0xe2, 0x00, 0xe3,
|
||||
0x00, 0xe4, 0x00, 0xe5, 0x00, 0xe6, 0x01, 0x2f, 0x01, 0x0d, 0x00, 0xe9,
|
||||
0x01, 0x19, 0x00, 0xeb, 0x01, 0x17, 0x00, 0xed, 0x00, 0xee, 0x01, 0x2b,
|
||||
0x01, 0x11, 0x01, 0x46, 0x01, 0x4d, 0x01, 0x37, 0x00, 0xf4, 0x00, 0xf5,
|
||||
0x00, 0xf6, 0x00, 0xf7, 0x00, 0xf8, 0x01, 0x73, 0x00, 0xfa, 0x00, 0xfb,
|
||||
0x00, 0xfc, 0x01, 0x69, 0x01, 0x6b, 0x02, 0xd9
|
||||
};
|
@ -1,24 +0,0 @@
|
||||
static const unsigned char map_iso_8859_5[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83,
|
||||
0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89,
|
||||
0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f,
|
||||
0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95,
|
||||
0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b,
|
||||
0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x04, 0x01,
|
||||
0x04, 0x02, 0x04, 0x03, 0x04, 0x04, 0x04, 0x05, 0x04, 0x06, 0x04, 0x07,
|
||||
0x04, 0x08, 0x04, 0x09, 0x04, 0x0a, 0x04, 0x0b, 0x04, 0x0c, 0x00, 0xad,
|
||||
0x04, 0x0e, 0x04, 0x0f, 0x04, 0x10, 0x04, 0x11, 0x04, 0x12, 0x04, 0x13,
|
||||
0x04, 0x14, 0x04, 0x15, 0x04, 0x16, 0x04, 0x17, 0x04, 0x18, 0x04, 0x19,
|
||||
0x04, 0x1a, 0x04, 0x1b, 0x04, 0x1c, 0x04, 0x1d, 0x04, 0x1e, 0x04, 0x1f,
|
||||
0x04, 0x20, 0x04, 0x21, 0x04, 0x22, 0x04, 0x23, 0x04, 0x24, 0x04, 0x25,
|
||||
0x04, 0x26, 0x04, 0x27, 0x04, 0x28, 0x04, 0x29, 0x04, 0x2a, 0x04, 0x2b,
|
||||
0x04, 0x2c, 0x04, 0x2d, 0x04, 0x2e, 0x04, 0x2f, 0x04, 0x30, 0x04, 0x31,
|
||||
0x04, 0x32, 0x04, 0x33, 0x04, 0x34, 0x04, 0x35, 0x04, 0x36, 0x04, 0x37,
|
||||
0x04, 0x38, 0x04, 0x39, 0x04, 0x3a, 0x04, 0x3b, 0x04, 0x3c, 0x04, 0x3d,
|
||||
0x04, 0x3e, 0x04, 0x3f, 0x04, 0x40, 0x04, 0x41, 0x04, 0x42, 0x04, 0x43,
|
||||
0x04, 0x44, 0x04, 0x45, 0x04, 0x46, 0x04, 0x47, 0x04, 0x48, 0x04, 0x49,
|
||||
0x04, 0x4a, 0x04, 0x4b, 0x04, 0x4c, 0x04, 0x4d, 0x04, 0x4e, 0x04, 0x4f,
|
||||
0x21, 0x16, 0x04, 0x51, 0x04, 0x52, 0x04, 0x53, 0x04, 0x54, 0x04, 0x55,
|
||||
0x04, 0x56, 0x04, 0x57, 0x04, 0x58, 0x04, 0x59, 0x04, 0x5a, 0x04, 0x5b,
|
||||
0x04, 0x5c, 0x00, 0xa7, 0x04, 0x5e, 0x04, 0x5f
|
||||
};
|
@ -1,24 +0,0 @@
|
||||
static const unsigned char map_iso_8859_6[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83,
|
||||
0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89,
|
||||
0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f,
|
||||
0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95,
|
||||
0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b,
|
||||
0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0x00, 0xa4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x06, 0x0c, 0x00, 0xad,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0x06, 0x1b, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x06, 0x1f,
|
||||
0xff, 0xff, 0x06, 0x21, 0x06, 0x22, 0x06, 0x23, 0x06, 0x24, 0x06, 0x25,
|
||||
0x06, 0x26, 0x06, 0x27, 0x06, 0x28, 0x06, 0x29, 0x06, 0x2a, 0x06, 0x2b,
|
||||
0x06, 0x2c, 0x06, 0x2d, 0x06, 0x2e, 0x06, 0x2f, 0x06, 0x30, 0x06, 0x31,
|
||||
0x06, 0x32, 0x06, 0x33, 0x06, 0x34, 0x06, 0x35, 0x06, 0x36, 0x06, 0x37,
|
||||
0x06, 0x38, 0x06, 0x39, 0x06, 0x3a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0x06, 0x40, 0x06, 0x41, 0x06, 0x42, 0x06, 0x43,
|
||||
0x06, 0x44, 0x06, 0x45, 0x06, 0x46, 0x06, 0x47, 0x06, 0x48, 0x06, 0x49,
|
||||
0x06, 0x4a, 0x06, 0x4b, 0x06, 0x4c, 0x06, 0x4d, 0x06, 0x4e, 0x06, 0x4f,
|
||||
0x06, 0x50, 0x06, 0x51, 0x06, 0x52, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
|
||||
};
|
@ -1,24 +0,0 @@
|
||||
static const unsigned char map_iso_8859_7[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83,
|
||||
0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89,
|
||||
0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f,
|
||||
0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95,
|
||||
0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b,
|
||||
0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x20, 0x18,
|
||||
0x20, 0x19, 0x00, 0xa3, 0x20, 0xac, 0x20, 0xaf, 0x00, 0xa6, 0x00, 0xa7,
|
||||
0x00, 0xa8, 0x00, 0xa9, 0x03, 0x7a, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad,
|
||||
0xff, 0xff, 0x20, 0x15, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3,
|
||||
0x03, 0x84, 0x03, 0x85, 0x03, 0x86, 0x00, 0xb7, 0x03, 0x88, 0x03, 0x89,
|
||||
0x03, 0x8a, 0x00, 0xbb, 0x03, 0x8c, 0x00, 0xbd, 0x03, 0x8e, 0x03, 0x8f,
|
||||
0x03, 0x90, 0x03, 0x91, 0x03, 0x92, 0x03, 0x93, 0x03, 0x94, 0x03, 0x95,
|
||||
0x03, 0x96, 0x03, 0x97, 0x03, 0x98, 0x03, 0x99, 0x03, 0x9a, 0x03, 0x9b,
|
||||
0x03, 0x9c, 0x03, 0x9d, 0x03, 0x9e, 0x03, 0x9f, 0x03, 0xa0, 0x03, 0xa1,
|
||||
0xff, 0xff, 0x03, 0xa3, 0x03, 0xa4, 0x03, 0xa5, 0x03, 0xa6, 0x03, 0xa7,
|
||||
0x03, 0xa8, 0x03, 0xa9, 0x03, 0xaa, 0x03, 0xab, 0x03, 0xac, 0x03, 0xad,
|
||||
0x03, 0xae, 0x03, 0xaf, 0x03, 0xb0, 0x03, 0xb1, 0x03, 0xb2, 0x03, 0xb3,
|
||||
0x03, 0xb4, 0x03, 0xb5, 0x03, 0xb6, 0x03, 0xb7, 0x03, 0xb8, 0x03, 0xb9,
|
||||
0x03, 0xba, 0x03, 0xbb, 0x03, 0xbc, 0x03, 0xbd, 0x03, 0xbe, 0x03, 0xbf,
|
||||
0x03, 0xc0, 0x03, 0xc1, 0x03, 0xc2, 0x03, 0xc3, 0x03, 0xc4, 0x03, 0xc5,
|
||||
0x03, 0xc6, 0x03, 0xc7, 0x03, 0xc8, 0x03, 0xc9, 0x03, 0xca, 0x03, 0xcb,
|
||||
0x03, 0xcc, 0x03, 0xcd, 0x03, 0xce, 0xff, 0xff
|
||||
};
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user