+++ /dev/null
-From 082a504cfcc046c3d8adaae1164268bc94e5108a Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 31 Jul 2021 10:51:41 -0700
-Subject: [PATCH] libntp: Do not use PTHREAD_STACK_MIN on glibc
-In glibc 2.34+ PTHREAD_STACK_MIN is not a compile-time constant which
-could mean different stack sizes at runtime on different architectures
-and it also causes compile failure. Default glibc thread stack size
-or 64Kb set by ntp should be good in glibc these days.
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- libntp/work_thread.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/libntp/work_thread.c b/libntp/work_thread.c
-index 03a5647..3ddd751 100644
---- a/libntp/work_thread.c
-+++ b/libntp/work_thread.c
-@@ -41,7 +41,7 @@
- #ifndef THREAD_MINSTACKSIZE
- # define THREAD_MINSTACKSIZE (64U * 1024)
- #endif
--#ifndef __sun
-+#if !defined(__sun) && !defined(__GLIBC__)
- #if defined(PTHREAD_STACK_MIN) && THREAD_MINSTACKSIZE < PTHREAD_STACK_MIN
- # undef THREAD_MINSTACKSIZE
- # define THREAD_MINSTACKSIZE PTHREAD_STACK_MIN
---
-2.32.0
-
+++ /dev/null
---- a/scripts/build/mkver.in
-+++ b/scripts/build/mkver.in
-@@ -15,12 +15,7 @@
- *) ConfStr="${ConfStr}-@VER_SUFFIX@" ;;
- esac
-
--if [ -n "$SOURCE_DATE_EPOCH" ]; then
-- ConfStr="$ConfStr `LC_TIME=C TZ=UTC date -d@$SOURCE_DATE_EPOCH 2>/dev/null`" ||
-- ConfStr="$ConfStr `LC_TIME=C TZ=UTC date -r $SOURCE_DATE_EPOCH`"
--else
-- ConfStr="$ConfStr `LC_TIME=C TZ=UTC date`"
--fi
-+ConfStr="$ConfStr"
-
- if [ ! -f .version ]; then
- echo 0 > .version
--- /dev/null
+--- a/scripts/build/mkver.in
++++ b/scripts/build/mkver.in
+@@ -15,12 +15,7 @@
+ *) ConfStr="${ConfStr}-@VER_SUFFIX@" ;;
+ esac
+
+-if [ -n "$SOURCE_DATE_EPOCH" ]; then
+- ConfStr="$ConfStr `LC_TIME=C TZ=UTC date -d@$SOURCE_DATE_EPOCH 2>/dev/null`" ||
+- ConfStr="$ConfStr `LC_TIME=C TZ=UTC date -r $SOURCE_DATE_EPOCH`"
+-else
+- ConfStr="$ConfStr `LC_TIME=C TZ=UTC date`"
+-fi
++ConfStr="$ConfStr"
+
+ if [ ! -f .version ]; then
+ echo 0 > .version
--- /dev/null
+Fixes issues with glibc header files, see
+http://bugs.gentoo.org/show_bug.cgi?id=270483
+
+Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
+
+Rebase to apply cleanly.
+
+Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com>
+
+
+diff -purN a/include/ntp_syscall.h b/include/ntp_syscall.h
+--- a/include/ntp_syscall.h 2015-02-11 08:42:37.794576469 -0500
++++ b/include/ntp_syscall.h 2015-02-11 08:43:03.216957279 -0500
+@@ -10,6 +10,14 @@
+ # include <sys/timex.h>
+ #endif
+
++#if defined(ADJ_NANO) && !defined(MOD_NANO)
++#define MOD_NANO ADJ_NANO
++#endif
++
++#if defined(ADJ_TAI) && !defined(MOD_TAI)
++#define MOD_TAI ADJ_TAI
++#endif
++
+ #ifndef NTP_SYSCALLS_LIBC
+ # ifdef NTP_SYSCALLS_STD
+ # define ntp_adjtime(t) syscall(SYS_ntp_adjtime, (t))
--- /dev/null
+inline ntp syscalls fallback
+
+Reference:
+ https://bugs.ntp.org/show_bug.cgi?id=769
+
+Signed-off-by: James Knight <james.knight@rockwellcollins.com>
+---
+ configure.ac | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+--- a/configure.ac
++++ b/configure.ac
+@@ -1475,11 +1475,11 @@ AC_CACHE_CHECK(
+ [ntp_cv_var_ntp_syscalls],
+ [
+ ntp_cv_var_ntp_syscalls=no
+- case "$ac_cv_func_ntp_adjtime$ac_cv_func_ntp_gettime$ac_cv_func___adjtimex" in
++ case "$ac_cv_func_ntp_adjtime$ac_cv_func_ntp_gettime$ac_cv_func___adjtimex$ac_cv_func_adjtimex" in
+ yesyes*)
+ ntp_cv_var_ntp_syscalls=libc
+ ;;
+- *yes)
++ *yesyes | *yesno | *noyes)
+ ntp_cv_var_ntp_syscalls=inline
+ ;;
+ *)
--- /dev/null
+sntp/libopts/m4/libopts.m4: allow override shell with POSIX_SHELL
+
+Pull in fix from upstream AutoGen [1] to accept POSIX_SHELL from the
+environment during the configure step.
+
+[1] http://git.savannah.gnu.org/cgit/autogen.git/commit/?id=db064b9a252f3ef3d8db25411ea0edb0ff8ea758
+
+Signed-off-by: James Byrne <james.byrne@origamienergy.com>
+
+diff --git a/sntp/libopts/m4/libopts.m4 b/sntp/libopts/m4/libopts.m4
+--- a/sntp/libopts/m4/libopts.m4
++++ b/sntp/libopts/m4/libopts.m4
+@@ -114,6 +114,7 @@
+ AC_PROG_SED
+ [while :
+ do
++ test -x "$POSIX_SHELL" && break
+ POSIX_SHELL=`which bash`
+ test -x "$POSIX_SHELL" && break
+ POSIX_SHELL=`which dash`
--- /dev/null
+From 082a504cfcc046c3d8adaae1164268bc94e5108a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 31 Jul 2021 10:51:41 -0700
+Subject: [PATCH] libntp: Do not use PTHREAD_STACK_MIN on glibc
+
+In glibc 2.34+ PTHREAD_STACK_MIN is not a compile-time constant which
+could mean different stack sizes at runtime on different architectures
+and it also causes compile failure. Default glibc thread stack size
+or 64Kb set by ntp should be good in glibc these days.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+[Copied from https://github.com/openembedded/meta-openembedded/blob/master/meta-networking/recipes-support/ntp/ntp/0001-libntp-Do-not-use-PTHREAD_STACK_MIN-on-glibc.patch]
+Signed-off-by: Alexey Brodkin <abrokdin@synopsys.com>
+---
+ libntp/work_thread.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libntp/work_thread.c b/libntp/work_thread.c
+index 03a5647..3ddd751 100644
+--- a/libntp/work_thread.c
++++ b/libntp/work_thread.c
+@@ -41,7 +41,7 @@
+ #ifndef THREAD_MINSTACKSIZE
+ # define THREAD_MINSTACKSIZE (64U * 1024)
+ #endif
+-#ifndef __sun
++#if !defined(__sun) && !defined(__GLIBC__)
+ #if defined(PTHREAD_STACK_MIN) && THREAD_MINSTACKSIZE < PTHREAD_STACK_MIN
+ # undef THREAD_MINSTACKSIZE
+ # define THREAD_MINSTACKSIZE PTHREAD_STACK_MIN
+--
+2.32.0
+
--- /dev/null
+--- a/scripts/build/mkver.in
++++ b/scripts/build/mkver.in
+@@ -15,12 +15,7 @@
+ *) ConfStr="${ConfStr}-@VER_SUFFIX@" ;;
+ esac
+
+-if [ -n "$SOURCE_DATE_EPOCH" ]; then
+- ConfStr="$ConfStr `LC_TIME=C TZ=UTC date -d@$SOURCE_DATE_EPOCH 2>/dev/null`" ||
+- ConfStr="$ConfStr `LC_TIME=C TZ=UTC date -r $SOURCE_DATE_EPOCH`"
+-else
+- ConfStr="$ConfStr `LC_TIME=C TZ=UTC date`"
+-fi
++ConfStr="$ConfStr"
+
+ if [ ! -f .version ]; then
+ echo 0 > .version
--- /dev/null
+diff -ruN ntp-4.2.8p15-orig/configure ntp-4.2.8p15/configure
+--- ntp-4.2.8p15-orig/configure 2020-06-23 11:19:47.000000000 +0200
++++ ntp-4.2.8p15/configure 2024-06-25 22:00:50.534037715 +0200
+@@ -22494,12 +22494,15 @@
+ #define NULL (void*)0
+ #endif
+
+-int
+-main ()
+-{
+-pthread_detach(NULL);
+- ;
+- return 0;
++void *thread_function(void *arg) {
++ return NULL;
++}
++
++int main() {
++ pthread_t thread;
++ pthread_create(&thread, NULL, thread_function, NULL);
++ pthread_detach(thread);
++ return 0;
+ }
+ _ACEOF
+ if ac_fn_c_try_link "$LINENO"; then :
+diff -ruN ntp-4.2.8p15-orig/sntp/configure ntp-4.2.8p15/sntp/configure
+--- ntp-4.2.8p15-orig/sntp/configure 2020-06-23 11:19:12.000000000 +0200
++++ ntp-4.2.8p15/sntp/configure 2024-06-25 22:00:59.294150731 +0200
+@@ -13168,12 +13168,16 @@
+ #define NULL (void*)0
+ #endif
+
+-int
+-main ()
+-{
+-pthread_detach(NULL);
+- ;
+- return 0;
++void *thread_function(void *arg) {
++
++ return NULL;
++}
++
++int main() {
++ pthread_t thread;
++ pthread_create(&thread, NULL, thread_function, NULL);
++ pthread_detach(thread);
++ return 0;
+ }
+ _ACEOF
+ if ac_fn_c_try_link "$LINENO"; then :
+diff -ruN ntp-4.2.8p15-orig/sntp/m4/openldap-thread-check.m4 ntp-4.2.8p15/sntp/m4/openldap-thread-check.m4
+--- ntp-4.2.8p15-orig/sntp/m4/openldap-thread-check.m4 2015-09-21 10:06:08.000000000 +0200
++++ ntp-4.2.8p15/sntp/m4/openldap-thread-check.m4 2024-06-25 23:01:19.916512627 +0200
+@@ -263,9 +263,17 @@
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #include <pthread.h>
+ #ifndef NULL
+-#define NULL (void*)0
++#define NULL ((void*)0)
+ #endif
+-]], [[pthread_detach(NULL);]])],[ol_cv_func_pthread_detach=yes],[ol_cv_func_pthread_detach=no])
++void *thread_function(void *arg) {
++ return NULL;
++}
++]], [[
++pthread_t thread;
++pthread_create(&thread, NULL, thread_function, NULL);
++pthread_join(thread, NULL);
++pthread_detach(thread);
++]])],[ol_cv_func_pthread_detach=yes],[ol_cv_func_pthread_detach=no])
+ ])
+
+ if test $ol_cv_func_pthread_detach = no ; then
+
--- /dev/null
+--- a/top.c
++++ b/top.c
+@@ -1072,7 +1072,9 @@ static void prochlp (proc_t *this)
+ HST_t tmp;
+ const HST_t *ptr;
+ tmp.pid = this->tid;
+- ptr = bsearch(&tmp, hist_sav, maxt_sav, sizeof tmp, sort_HST_t);
++// ptr = bsearch(&tmp, hist_sav, maxt_sav, sizeof tmp, sort_HST_t);
++ ptr = bsearch(&tmp, hist_sav, maxt_sav, sizeof tmp, (int (*)(const void *, const void *))sort_HST_t);
++
+ if(ptr) tics -= ptr->tics;
+ }
+ #endif
+++ /dev/null
-#
-# Automatically generated make config: don't edit
-# Version: 0.9.33.2
-# Mon Nov 19 16:35:07 2012
-#
-# TARGET_alpha is not set
-TARGET_arm=y
-# TARGET_avr32 is not set
-# TARGET_bfin is not set
-# TARGET_c6x is not set
-# TARGET_cris is not set
-# TARGET_e1 is not set
-# TARGET_frv is not set
-# TARGET_h8300 is not set
-# TARGET_hppa is not set
-# TARGET_i386 is not set
-# TARGET_i960 is not set
-# TARGET_ia64 is not set
-# TARGET_m68k is not set
-# TARGET_microblaze is not set
-# TARGET_mips is not set
-# TARGET_nios is not set
-# TARGET_nios2 is not set
-# TARGET_powerpc is not set
-# TARGET_sh is not set
-# TARGET_sh64 is not set
-# TARGET_sparc is not set
-# TARGET_v850 is not set
-# TARGET_vax is not set
-# TARGET_x86_64 is not set
-# TARGET_xtensa is not set
-
-#
-# Target Architecture Features and Options
-#
-TARGET_ARCH="arm"
-FORCE_OPTIONS_FOR_ARCH=y
-CONFIG_ARM_EABI=y
-# COMPILE_IN_THUMB_MODE is not set
-# USE_BX is not set
-TARGET_SUBARCH=""
-
-#
-# Using ELF file format
-#
-ARCH_ANY_ENDIAN=y
-ARCH_LITTLE_ENDIAN=y
-# ARCH_WANTS_BIG_ENDIAN is not set
-ARCH_WANTS_LITTLE_ENDIAN=y
-ARCH_HAS_MMU=y
-ARCH_USE_MMU=y
-UCLIBC_HAS_FLOATS=y
-UCLIBC_HAS_FPU=y
-# DO_C99_MATH is not set
-# DO_XSI_MATH is not set
-# UCLIBC_HAS_FENV is not set
-KERNEL_HEADERS="/opt/src/linux-2.6.34/include"
-HAVE_DOT_CONFIG=y
-
-#
-# General Library Settings
-#
-DOPIC=y
-HAVE_SHARED=y
-# FORCE_SHAREABLE_TEXT_SEGMENTS is not set
-LDSO_LDD_SUPPORT=y
-LDSO_CACHE_SUPPORT=y
-LDSO_PRELOAD_ENV_SUPPORT=y
-LDSO_PRELOAD_FILE_SUPPORT=y
-LDSO_BASE_FILENAME="ld.so"
-LDSO_STANDALONE_SUPPORT=y
-LDSO_PRELINK_SUPPORT=y
-UCLIBC_STATIC_LDCONFIG=y
-LDSO_RUNPATH=y
-LDSO_SEARCH_INTERP_PATH=y
-LDSO_LD_LIBRARY_PATH=y
-LDSO_NO_CLEANUP=y
-UCLIBC_CTOR_DTOR=y
-# LDSO_GNU_HASH_SUPPORT is not set
-# HAS_NO_THREADS is not set
-# LINUXTHREADS_OLD is not set
-# LINUXTHREADS_NEW is not set
-UCLIBC_HAS_THREADS_NATIVE=y
-UCLIBC_HAS_THREADS=y
-UCLIBC_HAS_TLS=y
-PTHREADS_DEBUG_SUPPORT=y
-UCLIBC_HAS_SYSLOG=y
-UCLIBC_HAS_LFS=y
-# MALLOC is not set
-# MALLOC_SIMPLE is not set
-MALLOC_STANDARD=y
-MALLOC_GLIBC_COMPAT=y
-UCLIBC_DYNAMIC_ATEXIT=y
-# COMPAT_ATEXIT is not set
-UCLIBC_SUSV3_LEGACY=y
-UCLIBC_SUSV3_LEGACY_MACROS=y
-UCLIBC_SUSV4_LEGACY=y
-# UCLIBC_STRICT_HEADERS is not set
-# UCLIBC_HAS_STUBS is not set
-UCLIBC_HAS_SHADOW=y
-# UCLIBC_HAS_PROGRAM_INVOCATION_NAME is not set
-UCLIBC_HAS_PTY=y
-ASSUME_DEVPTS=y
-UNIX98PTY_ONLY=y
-UCLIBC_HAS_GETPT=y
-UCLIBC_HAS_LIBUTIL=y
-UCLIBC_HAS_TM_EXTENSIONS=y
-UCLIBC_HAS_TZ_CACHING=y
-UCLIBC_HAS_TZ_FILE=y
-UCLIBC_HAS_TZ_FILE_READ_MANY=y
-UCLIBC_TZ_FILE_PATH="/etc/TZ"
-UCLIBC_FALLBACK_TO_ETC_LOCALTIME=y
-
-#
-# Advanced Library Settings
-#
-UCLIBC_PWD_BUFFER_SIZE=256
-UCLIBC_GRP_BUFFER_SIZE=256
-
-#
-# Support various families of functions
-#
-UCLIBC_LINUX_MODULE_26=y
-# UCLIBC_LINUX_MODULE_24 is not set
-UCLIBC_LINUX_SPECIFIC=y
-UCLIBC_HAS_GNU_ERROR=y
-UCLIBC_BSD_SPECIFIC=y
-UCLIBC_HAS_BSD_ERR=y
-# UCLIBC_HAS_OBSOLETE_BSD_SIGNAL is not set
-# UCLIBC_HAS_OBSOLETE_SYSV_SIGNAL is not set
-# UCLIBC_NTP_LEGACY is not set
-# UCLIBC_SV4_DEPRECATED is not set
-UCLIBC_HAS_REALTIME=y
-UCLIBC_HAS_ADVANCED_REALTIME=y
-UCLIBC_HAS_EPOLL=y
-UCLIBC_HAS_XATTR=y
-UCLIBC_HAS_PROFILING=y
-UCLIBC_HAS_CRYPT_IMPL=y
-# UCLIBC_HAS_SHA256_CRYPT_IMPL is not set
-# UCLIBC_HAS_SHA512_CRYPT_IMPL is not set
-UCLIBC_HAS_CRYPT=y
-UCLIBC_HAS_NETWORK_SUPPORT=y
-UCLIBC_HAS_SOCKET=y
-UCLIBC_HAS_IPV4=y
-UCLIBC_HAS_IPV6=y
-UCLIBC_HAS_RPC=y
-UCLIBC_HAS_FULL_RPC=y
-UCLIBC_HAS_REENTRANT_RPC=y
-# UCLIBC_USE_NETLINK is not set
-# UCLIBC_HAS_BSD_RES_CLOSE is not set
-UCLIBC_HAS_COMPAT_RES_STATE=y
-UCLIBC_HAS_EXTRA_COMPAT_RES_STATE=y
-UCLIBC_HAS_RESOLVER_SUPPORT=y
-UCLIBC_HAS_LIBRESOLV_STUB=y
-# UCLIBC_HAS_LIBNSL_STUB is not set
-
-#
-# String and Stdio Support
-#
-UCLIBC_HAS_STRING_GENERIC_OPT=y
-UCLIBC_HAS_STRING_ARCH_OPT=y
-UCLIBC_HAS_CTYPE_TABLES=y
-UCLIBC_HAS_CTYPE_SIGNED=y
-UCLIBC_HAS_CTYPE_UNSAFE=y
-# UCLIBC_HAS_CTYPE_CHECKED is not set
-# UCLIBC_HAS_CTYPE_ENFORCED is not set
-UCLIBC_HAS_WCHAR=y
-# UCLIBC_HAS_LOCALE is not set
-UCLIBC_HAS_HEXADECIMAL_FLOATS=y
-# UCLIBC_HAS_GLIBC_CUSTOM_PRINTF is not set
-UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS=9
-# UCLIBC_HAS_SCANF_GLIBC_A_FLAG is not set
-# UCLIBC_HAS_STDIO_BUFSIZ_NONE is not set
-# UCLIBC_HAS_STDIO_BUFSIZ_256 is not set
-# UCLIBC_HAS_STDIO_BUFSIZ_512 is not set
-# UCLIBC_HAS_STDIO_BUFSIZ_1024 is not set
-# UCLIBC_HAS_STDIO_BUFSIZ_2048 is not set
-UCLIBC_HAS_STDIO_BUFSIZ_4096=y
-# UCLIBC_HAS_STDIO_BUFSIZ_8192 is not set
-UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE=y
-# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4 is not set
-# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8 is not set
-# UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT is not set
-UCLIBC_HAS_STDIO_GETC_MACRO=y
-UCLIBC_HAS_STDIO_PUTC_MACRO=y
-UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION=y
-# UCLIBC_HAS_FOPEN_LARGEFILE_MODE is not set
-# UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE is not set
-UCLIBC_HAS_FOPEN_CLOSEEXEC_MODE=y
-# UCLIBC_HAS_GLIBC_CUSTOM_STREAMS is not set
-UCLIBC_HAS_PRINTF_M_SPEC=y
-UCLIBC_HAS_ERRNO_MESSAGES=y
-# UCLIBC_HAS_SYS_ERRLIST is not set
-UCLIBC_HAS_SIGNUM_MESSAGES=y
-# UCLIBC_HAS_SYS_SIGLIST is not set
-UCLIBC_HAS_GNU_GETOPT=y
-UCLIBC_HAS_STDIO_FUTEXES=y
-UCLIBC_HAS_GNU_GETSUBOPT=y
-
-#
-# Big and Tall
-#
-UCLIBC_HAS_REGEX=y
-UCLIBC_HAS_REGEX_OLD=y
-UCLIBC_HAS_FNMATCH=y
-UCLIBC_HAS_FNMATCH_OLD=y
-# UCLIBC_HAS_WORDEXP is not set
-# UCLIBC_HAS_NFTW is not set
-# UCLIBC_HAS_FTW is not set
-# UCLIBC_HAS_FTS is not set
-UCLIBC_HAS_GLOB=y
-# UCLIBC_HAS_GNU_GLOB is not set
-# UCLIBC_HAS_UTMPX is not set
-
-#
-# Library Installation Options
-#
-RUNTIME_PREFIX="/usr/$(TARGET_ARCH)-linux-uclibc/"
-DEVEL_PREFIX="/usr/$(TARGET_ARCH)-linux-uclibc/usr/"
-MULTILIB_DIR="lib"
-HARDWIRED_ABSPATH=y
-
-#
-# Security options
-#
-# UCLIBC_BUILD_PIE is not set
-# UCLIBC_HAS_ARC4RANDOM is not set
-# UCLIBC_HAS_SSP is not set
-UCLIBC_BUILD_RELRO=y
-# UCLIBC_BUILD_NOW is not set
-UCLIBC_BUILD_NOEXECSTACK=y
-
-#
-# Development/debugging options
-#
-CROSS_COMPILER_PREFIX=""
-UCLIBC_EXTRA_CFLAGS=""
-# DODEBUG is not set
-DOSTRIP=y
-# DOASSERTS is not set
-# SUPPORT_LD_DEBUG is not set
-# SUPPORT_LD_DEBUG_EARLY is not set
-# UCLIBC_MALLOC_DEBUGGING is not set
-# UCLIBC_HAS_BACKTRACE is not set
-WARNINGS="-Wall"
-# EXTRA_WARNINGS is not set
-# DOMULTI is not set
-# UCLIBC_MJN3_ONLY is not set
+++ /dev/null
-diff --git a/configure b/configure
---- a/configure
-+++ b/configure
-@@ -42,6 +42,9 @@ show_help(){
- echo " --with-libdlna-dir=DIR check for libdlna installed in DIR"
- echo ""
- echo "Advanced options (experts only):"
-+ echo " --disable-sysconf disable installation of init files"
-+ echo " --enable-developer enable developer options"
-+ echo " --disable-developer disable developer options"
- echo " --enable-debug enable debugging symbols"
- echo " --disable-debug disable debugging symbols"
- echo " --disable-strip disable stripping of executables at installation"
-@@ -164,6 +167,11 @@ add_clog_str(){
- echo "#define $1 \"$2\"" >> $CONFIG_H
- }
-
-+check_cmd_exists(){
-+ log check_cmd_exists "$@"
-+ which "$@" >>$logfile 2>&1
-+}
-+
- check_cmd(){
- log "$@"
- "$@" >>$logfile 2>&1
-@@ -300,13 +308,15 @@ make="make"
- strip="strip"
- cpu=`uname -m`
- optimize="yes"
-+sysconf="yes"
-+developer="no"
- debug="no"
- dostrip="yes"
- extralibs=""
- installstrip="-s"
- cross_compile="no"
- INSTALL="/usr/bin/install -c"
--VERSION="1.1a"
-+VERSION="1.2.0"
- system_name=`uname -s 2>&1`
-
- #################################################
-@@ -420,6 +430,12 @@ for opt do
- ;;
- --disable-dlna) dlna="no"
- ;;
-+ --disable-sysconf) sysconf="no"
-+ ;;
-+ --enable-developer) developer="yes"
-+ ;;
-+ --disable-developer) developer="no"
-+ ;;
- --enable-debug) debug="yes"
- ;;
- --disable-debug) debug="no"
-@@ -584,6 +600,25 @@ check_cflags -D_REENTRANT
- linux && add_cflags -D_GNU_SOURCE
-
- #################################################
-+# check for developer options
-+#################################################
-+if enabled developer; then
-+ add_cflags -Werror
-+ add_cflags -DHAVE_DEVELOPER
-+
-+ have_ctags='no'
-+ if check_cmd_exists 'ctags'; then
-+ have_ctags='yes'
-+ fi
-+
-+ have_etags='no'
-+ if check_cmd_exists 'etags'; then
-+ have_etags='yes'
-+ fi
-+
-+fi
-+
-+#################################################
- # check for debug symbols
- #################################################
- if enabled debug; then
-@@ -684,6 +719,8 @@ echolog " C compiler $cc"
- echolog " STRIP $strip"
- echolog " make $make"
- echolog " CPU $cpu ($tune)"
-+echolog " install sysconf $sysconf"
-+echolog " developer options $developer"
- echolog " debug symbols $debug"
- echolog " strip symbols $dostrip"
- echolog " optimize $optimize"
-@@ -724,6 +761,10 @@ append_config "OPTFLAGS=$CFLAGS"
- append_config "LDFLAGS=$LDFLAGS"
- append_config "INSTALL=$INSTALL"
-
-+append_config "INSTALL_SYSCONF=$sysconf"
-+append_config "DEVELOPER=$developer"
-+append_config "HAVE_CTAGS=$have_ctags"
-+append_config "HAVE_ETAGS=$have_etags"
- append_config "DEBUG=$debug"
-
-
-diff --git a/scripts/Makefile b/scripts/Makefile
---- a/scripts/Makefile
-+++ b/scripts/Makefile
-@@ -3,6 +3,11 @@ $(error "config.mak is not present, run configure !")
- endif
- include ../config.mak
-
-+INSTALL_RULES =
-+ifeq ($(INSTALL_SYSCONF),yes)
-+ INSTALL_RULES += install-sysconf
-+endif
-+
- CONF_FILE = "ushare.conf"
- INITD_FILE = "ushare"
-
-@@ -14,7 +19,9 @@ clean:
-
- distclean:
-
--install:
-+install: $(INSTALL_RULES)
-+
-+install-sysconf:
- $(INSTALL) -d $(sysconfdir)
- $(INSTALL) -m 644 $(CONF_FILE) $(sysconfdir)
- $(INSTALL) -d $(sysconfdir)/init.d
-diff --git a/scripts/ushare.conf b/scripts/ushare.conf
---- a/scripts/ushare.conf
-+++ b/scripts/ushare.conf
-@@ -2,11 +2,11 @@
- # Configuration file for uShare
-
- # uShare UPnP Friendly Name (default is 'uShare').
--USHARE_NAME=
-+USHARE_NAME=coolstream
-
- # Interface to listen to (default is eth0).
- # Ex : USHARE_IFACE=eth1
--USHARE_IFACE=
-+USHARE_IFACE=eth0
-
- # Port to listen to (default is random from IANA Dynamic Ports range)
- # Ex : USHARE_PORT=49200
-@@ -18,7 +18,7 @@ USHARE_TELNET_PORT=
-
- # Directories to be shared (space or CSV list).
- # Ex: USHARE_DIR=/dir1,/dir2
--USHARE_DIR=
-+USHARE_DIR=/media/sda1,media/sdb1
-
- # Use to override what happens when iconv fails to parse a file name.
- # The default uShare behaviour is to not add the entry in the media list
-@@ -28,7 +28,7 @@ USHARE_DIR=
- # as is. (Umlauts for all!)
- #
- # Options are TRUE/YES/1 for override and anything else for default behaviour
--USHARE_OVERRIDE_ICONV_ERR=
-+USHARE_OVERRIDE_ICONV_ERR=yes
-
- # Enable Web interface (yes/no)
- ENABLE_WEB=
-diff --git a/src/Makefile b/src/Makefile
---- a/src/Makefile
-+++ b/src/Makefile
-@@ -3,6 +3,15 @@ $(error "../config.mak is not present, run configure !")
- endif
- include ../config.mak
-
-+ifeq ($(DEVELOPER),yes)
-+ ifeq ($(HAVE_ETAGS),yes)
-+ BUILD_RULES += TAGS
-+ endif
-+ ifeq ($(HAVE_CTAGS),yes)
-+ BUILD_RULES += tags
-+ endif
-+endif
-+
- PROG = ushare
-
- EXTRADIST = ushare.1 \
-@@ -50,7 +59,7 @@ OBJS = $(SRCS:.c=.o)
-
- .SUFFIXES: .c .o
-
--all: depend $(PROG)
-+all: depend $(BUILD_RULES) $(PROG)
-
- .c.o:
- $(CC) -c $(CFLAGS) $(OPTFLAGS) -o $@ $<
-@@ -58,6 +67,14 @@ all: depend $(PROG)
- $(PROG): $(OBJS)
- $(CC) $(OBJS) $(LDFLAGS) $(EXTRALIBS) -o $@
-
-+TAGS:
-+ @rm -f $@; \
-+ ( find -name '*.[chS]' -print ) | xargs etags -a
-+
-+tags:
-+ @rm -f $@; \
-+ ( find -name '*.[chS]' -print ) | xargs ctags -a;
-+
- clean:
- -$(RM) -f *.o $(PROG)
- -$(RM) -f .depend
-diff --git a/src/cds.c b/src/cds.c
---- a/src/cds.c
-+++ b/src/cds.c
-@@ -19,7 +19,9 @@
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-+#include <stdio.h>
- #include <stdlib.h>
-+#include <string.h>
- #include <upnp/upnp.h>
- #include <upnp/upnptools.h>
-
-diff --git a/src/cms.c b/src/cms.c
---- a/src/cms.c
-+++ b/src/cms.c
-@@ -20,6 +20,7 @@
- */
-
- #include <stdlib.h>
-+#include <string.h>
- #include <upnp/upnp.h>
- #include <upnp/upnptools.h>
-
-diff --git a/src/ctrl_telnet.c b/src/ctrl_telnet.c
---- a/src/ctrl_telnet.c
-+++ b/src/ctrl_telnet.c
-@@ -202,6 +202,7 @@ ctrl_telnet_start (int port)
- void
- ctrl_telnet_stop (void)
- {
-+ ssize_t tmp;
- pthread_mutex_lock (&startstop_lock);
-
- if (!started)
-@@ -211,7 +212,7 @@ ctrl_telnet_stop (void)
- }
-
- /* yes is int, which is bigger then char, so this should be safe */
-- write (ttd.killer[1], &yes, sizeof (char));
-+ tmp = write (ttd.killer[1], &yes, sizeof (char));
-
- pthread_mutex_unlock (&startstop_lock);
- pthread_join (ttd.thread, NULL);
-diff --git a/src/http.c b/src/http.c
---- a/src/http.c
-+++ b/src/http.c
-@@ -25,6 +25,7 @@
- #include <errno.h>
- #include <stdio.h>
- #include <stdlib.h>
-+#include <string.h>
- #include <unistd.h>
- #include <errno.h>
-
-@@ -77,8 +78,7 @@ set_info_file (struct File_Info *info, const size_t length,
- info->content_type = ixmlCloneDOMString (content_type);
- }
-
--static int
--http_get_info (const char *filename, struct File_Info *info)
-+int http_get_info (const char *filename, struct File_Info *info)
- {
- extern struct ushare_t *ut;
- struct upnp_entry_t *entry = NULL;
-@@ -197,8 +197,7 @@ get_file_memory (const char *fullpath, const char *description,
- return ((UpnpWebFileHandle) file);
- }
-
--static UpnpWebFileHandle
--http_open (const char *filename, enum UpnpOpenFileMode mode)
-+UpnpWebFileHandle http_open (const char *filename, enum UpnpOpenFileMode mode)
- {
- extern struct ushare_t *ut;
- struct upnp_entry_t *entry = NULL;
-@@ -251,8 +250,7 @@ http_open (const char *filename, enum UpnpOpenFileMode mode)
- return ((UpnpWebFileHandle) file);
- }
-
--static int
--http_read (UpnpWebFileHandle fh, char *buf, size_t buflen)
-+int http_read (UpnpWebFileHandle fh, char *buf, size_t buflen)
- {
- struct web_file_t *file = (struct web_file_t *) fh;
- ssize_t len = -1;
-@@ -286,8 +284,7 @@ http_read (UpnpWebFileHandle fh, char *buf, size_t buflen)
- return len;
- }
-
--static int
--http_write (UpnpWebFileHandle fh __attribute__((unused)),
-+int http_write (UpnpWebFileHandle fh __attribute__((unused)),
- char *buf __attribute__((unused)),
- size_t buflen __attribute__((unused)))
- {
-@@ -296,8 +293,7 @@ http_write (UpnpWebFileHandle fh __attribute__((unused)),
- return 0;
- }
-
--static int
--http_seek (UpnpWebFileHandle fh, off_t offset, int origin)
-+int http_seek (UpnpWebFileHandle fh, off_t offset, int origin)
- {
- struct web_file_t *file = (struct web_file_t *) fh;
- off_t newpos = -1;
-@@ -371,8 +367,7 @@ http_seek (UpnpWebFileHandle fh, off_t offset, int origin)
- return 0;
- }
-
--static int
--http_close (UpnpWebFileHandle fh)
-+int http_close (UpnpWebFileHandle fh)
- {
- struct web_file_t *file = (struct web_file_t *) fh;
-
-@@ -402,13 +397,3 @@ http_close (UpnpWebFileHandle fh)
-
- return 0;
- }
--
--struct UpnpVirtualDirCallbacks virtual_dir_callbacks =
-- {
-- http_get_info,
-- http_open,
-- http_read,
-- http_write,
-- http_seek,
-- http_close
-- };
-diff --git a/src/http.h b/src/http.h
---- a/src/http.h
-+++ b/src/http.h
-@@ -25,6 +25,13 @@
- #include <upnp/upnp.h>
- #include <upnp/upnptools.h>
-
--struct UpnpVirtualDirCallbacks virtual_dir_callbacks;
-+int http_close (UpnpWebFileHandle fh);
-+int http_write (UpnpWebFileHandle fh __attribute__((unused)),
-+ char *buf __attribute__((unused)),
-+ size_t buflen __attribute__((unused)));
-+int http_seek (UpnpWebFileHandle fh, off_t offset, int origin);
-+UpnpWebFileHandle http_open (const char *filename, enum UpnpOpenFileMode mode);
-+int http_read (UpnpWebFileHandle fh, char *buf, size_t buflen);
-+int http_get_info (const char *filename, struct File_Info *info);
-
- #endif /* _HTTP_H_ */
-diff --git a/src/mime.c b/src/mime.c
---- a/src/mime.c
-+++ b/src/mime.c
-@@ -53,6 +53,7 @@ const struct mime_type_t MIME_Type_List[] = {
- { "mpeg2", UPNP_VIDEO, "http-get:*:video/mpeg2:"},
- { "m4v", UPNP_VIDEO, "http-get:*:video/mp4:"},
- { "m4p", UPNP_VIDEO, "http-get:*:video/mp4:"},
-+ { "mp4", UPNP_VIDEO, "http-get:*:video/mp4:"},
- { "mp4ps", UPNP_VIDEO, "http-get:*:video/x-nerodigital-ps:"},
- { "ts", UPNP_VIDEO, "http-get:*:video/mpeg2:"},
- { "ogm", UPNP_VIDEO, "http-get:*:video/mpeg:"},
-@@ -79,7 +80,6 @@ const struct mime_type_t MIME_Type_List[] = {
- { "mp1", UPNP_AUDIO, "http-get:*:audio/mp1:"},
- { "mp2", UPNP_AUDIO, "http-get:*:audio/mp2:"},
- { "mp3", UPNP_AUDIO, "http-get:*:audio/mpeg:"},
-- { "mp4", UPNP_AUDIO, "http-get:*:audio/mp4:"},
- { "m4a", UPNP_AUDIO, "http-get:*:audio/mp4:"},
- { "ogg", UPNP_AUDIO, "http-get:*:audio/x-ogg:"},
- { "wav", UPNP_AUDIO, "http-get:*:audio/wav:"},
-@@ -144,7 +144,8 @@ char *mime_get_protocol (struct mime_type_t *mime)
- if (!mime)
- return NULL;
-
-- sprintf (protocol, mime->mime_protocol);
-+ //sprintf (protocol, mime->mime_protocol);
-+ strcpy (protocol, mime->mime_protocol);
- strcat (protocol, "*");
- return strdup (protocol);
- }
-diff --git a/src/presentation.c b/src/presentation.c
---- a/src/presentation.c
-+++ b/src/presentation.c
-@@ -18,7 +18,9 @@
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-+#include <stdio.h>
- #include <stdlib.h>
-+#include <string.h>
-
- #if HAVE_LANGINFO_CODESET
- # include <langinfo.h>
-diff --git a/src/services.c b/src/services.c
---- a/src/services.c
-+++ b/src/services.c
-@@ -20,6 +20,7 @@
- */
-
- #include <stdlib.h>
-+#include <string.h>
- #include <upnp/upnp.h>
- #include <upnp/upnptools.h>
-
-diff --git a/src/trace.c b/src/trace.c
---- a/src/trace.c
-+++ b/src/trace.c
-@@ -57,7 +57,7 @@ print_log (log_level level, const char *format, ...)
- va_end (va);
- }
-
--inline void
-+void
- start_log (void)
- {
- openlog (PACKAGE_NAME, LOG_PID, LOG_DAEMON);
-diff --git a/src/trace.h b/src/trace.h
---- a/src/trace.h
-+++ b/src/trace.h
-@@ -29,7 +29,7 @@ typedef enum {
-
- void print_log (log_level level, const char *format, ...)
- __attribute__ ((format (printf, 2, 3)));
--inline void start_log (void);
-+void start_log (void);
-
- /* log_info
- * Normal print, to replace printf
-diff --git a/src/ushare.c b/src/ushare.c
---- a/src/ushare.c
-+++ b/src/ushare.c
-@@ -188,7 +188,7 @@ handle_action_request (struct Upnp_Action_Request *request)
- if (strcmp (request->DevUDN + 5, ut->udn))
- return;
-
-- ip = request->CtrlPtIPAddr.s_addr;
-+ ip = (*(struct sockaddr_in*)&request->CtrlPtIPAddr).sin_addr.s_addr;
- ip = ntohl (ip);
- sprintf (val, "%d.%d.%d.%d",
- (ip >> 24) & 0xFF, (ip >> 16) & 0xFF, (ip >> 8) & 0xFF, ip & 0xFF);
-@@ -348,7 +348,47 @@ init_upnp (struct ushare_t *ut)
-
- UpnpEnableWebserver (TRUE);
-
-- res = UpnpSetVirtualDirCallbacks (&virtual_dir_callbacks);
-+ res = UpnpVirtualDir_set_WriteCallback(http_write);
-+ if (res != UPNP_E_SUCCESS)
-+ {
-+ log_error (_("Cannot set virtual directory callbacks\n"));
-+ free (description);
-+ return -1;
-+ }
-+
-+ res = UpnpVirtualDir_set_GetInfoCallback(http_get_info);
-+ if (res != UPNP_E_SUCCESS)
-+ {
-+ log_error (_("Cannot set virtual directory callbacks\n"));
-+ free (description);
-+ return -1;
-+ }
-+
-+ res = UpnpVirtualDir_set_ReadCallback(http_read);
-+ if (res != UPNP_E_SUCCESS)
-+ {
-+ log_error (_("Cannot set virtual directory callbacks\n"));
-+ free (description);
-+ return -1;
-+ }
-+
-+ res = UpnpVirtualDir_set_OpenCallback(http_open);
-+ if (res != UPNP_E_SUCCESS)
-+ {
-+ log_error (_("Cannot set virtual directory callbacks\n"));
-+ free (description);
-+ return -1;
-+ }
-+
-+ res = UpnpVirtualDir_set_SeekCallback(http_seek);
-+ if (res != UPNP_E_SUCCESS)
-+ {
-+ log_error (_("Cannot set virtual directory callbacks\n"));
-+ free (description);
-+ return -1;
-+ }
-+
-+ res = UpnpVirtualDir_set_CloseCallback(http_close);
- if (res != UPNP_E_SUCCESS)
- {
- log_error (_("Cannot set virtual directory callbacks\n"));
-@@ -718,7 +758,7 @@ reload_config (int s __attribute__ ((unused)))
- }
- }
-
--inline void
-+void
- display_headers (void)
- {
- printf (_("%s (version %s), a lightweight UPnP A/V and DLNA Media Server.\n"),
-diff --git a/src/ushare.h b/src/ushare.h
---- a/src/ushare.h
-+++ b/src/ushare.h
-@@ -127,6 +127,6 @@ struct action_event_t {
- struct service_t *service;
- };
-
--inline void display_headers (void);
-+void display_headers (void);
-
- #endif /* _USHARE_H_ */
pushd $(BUILD_TMP)/procps-3.2.8 && \
$(PATCH)/procps-3.2.7-avoid-ICE-with-gcc-4.3.2-arm.diff && \
$(PATCH)/procps-3.2.8-fix-unknown-HZ.diff && \
+ $(PATCH)/procps-3.2.8-fix-mismatch-func-pointer.patch && \
$(MAKE) CC=$(TARGET)-gcc LDFLAGS="$(TARGET_LDFLAGS)" \
CPPFLAGS="-pipe -O2 -g -I$(TARGETPREFIX)/include -I$(TARGETPREFIX)/include/ncurses -D__GNU_LIBRARY__" proc/libproc-3.2.8.so && \
$(MAKE) CC=$(TARGET)-gcc LDFLAGS="$(TARGET_LDFLAGS) proc/libproc-3.2.8.so" \
$(REMOVE)/ntp-$(NTP_VER)
$(UNTAR)/ntp-$(NTP_VER).tar.gz
set -e; cd $(BUILD_TMP)/ntp-$(NTP_VER); \
- $(PATCH)/ntp-remove-buildtime.patch; \
- $(PATCH)/ntp-do-not-use-PTHREAD_STACK_MIN-on-glibc.patch; \
+ for i in $(PATCHES)/ntp/*.patch; do \
+ echo -e "==> $(TERM_RED)Applying Patch:$(TERM_NORMAL) $$i"; \
+ patch -p1 < $$i; \
+ done; \
+ export ACLOCAL=$(shell which aclocal); \
+ export AUTOMAKE=$(shell which automake); \
$(BUILDENV) ./configure \
--build=$(BUILD) \
--host=$(TARGET) \
$(START_BUILD)
$(UNTAR)/dvdreadfs.tar.bz2
pushd $(BUILD_TMP)/dvdreadfs && \
+ $(PATCH)/dvdreadfs/0001-fix-type-mismatch.patch && \
$(MAKE) install BINDIR=$(TARGETPREFIX)/bin CC="$(TARGET)-gcc -I$(TARGETPREFIX)/include -L$(TARGETPREFIX)/lib $(DVDREADFS_CONF_OPTS)"
$(TARGET)-strip $(TARGETPREFIX)/bin/dvdreadfs
$(REMOVE)/dvdreadfs
get-git-archive.sh https://github.com/diegonehab/luasocket.git $(LUASOCKET_GIT) $(notdir $@) $(ARCHIVE)
$(ARCHIVE)/JSON.lua:
- $(WGET) http://regex.info/code/JSON.lua
+ $(WGET) --no-check-certificate http://regex.info/code/JSON.lua
$(ARCHIVE)/slingshot-v6.tar.gz:
$(WGET) https://github.com/gvvaughan/slingshot/archive/v6.tar.gz -O $(@)
# makefile to build crosstool
ifeq ($(BOXSERIES), hd1) ## BOXFAMILY nevis
-CT_NG_CONFIG = $(PATCHES)/ct-ng/ct-ng-coolstream_hd1.config
+#CT_NG_CONFIG = $(PATCHES)/ct-ng/ct-ng-coolstream_hd1.config
+CT_NG_CONFIG = $(PATCHES)/ct-ng/ct-ng-git-a87bf7f-gcc14.1.0-hd1.config
+CT_NG_PREFIX = crosstool-ng-git
+CT_NG_SUFFIX = tar.gz
-crosstool: $(ARCHIVE)/crosstool-ng-$(CROSSTOOL_NG_VER).tar.bz2
+crosstool: $(ARCHIVE)/$(CT_NG_PREFIX)-$(CROSSTOOL_NG_VER).$(CT_NG_SUFFIX)
$(START_BUILD)
mkdir -p $(BUILD_TMP)
- $(UNTAR)/crosstool-ng-$(CROSSTOOL_NG_VER).tar.bz2; \
- set -e; unset CONFIG_SITE; cd $(BUILD_TMP)/crosstool-ng-$(CROSSTOOL_NG_VER); \
+ $(UNTAR)/$(CT_NG_PREFIX)-$(CROSSTOOL_NG_VER).$(CT_NG_SUFFIX); \
+ set -e; unset CONFIG_SITE; cd $(BUILD_TMP)/$(CT_NG_PREFIX)-$(CROSSTOOL_NG_VER); \
mkdir -p targets/src/; \
- cd $(BUILD_TMP)/crosstool-ng-$(CROSSTOOL_NG_VER); \
+ cd $(BUILD_TMP)/$(CT_NG_PREFIX)-$(CROSSTOOL_NG_VER); \
\
mkdir -p patches/gcc/custom; \
cp -a $(CT_NG_CONFIG) .config; \
\
ln -sf linux-$(CST_KERNEL_VERSION)-cnxt targets/src/linux-custom; \
touch targets/src/.linux-custom.extracted; \
- cd $(BUILD_TMP)/crosstool-ng-$(CROSSTOOL_NG_VER); \
+ cd $(BUILD_TMP)/$(CT_NG_PREFIX)-$(CROSSTOOL_NG_VER); \
NUM_CPUS=$$(expr `getconf _NPROCESSORS_ONLN` \* 2); \
MEM_512M=$$(awk '/MemTotal/ {M=int($$2/1024/512); print M==0?1:M}' /proc/meminfo); \
test $$NUM_CPUS -gt $$MEM_512M && NUM_CPUS=$$MEM_512M; \
chmod -R +w $(CROSS_BASE)
test -e $(CROSS_BASE)/$(TARGET)/lib || ln -sf sys-root/lib $(CROSS_BASE)/$(TARGET)/
rm -f $(CROSS_BASE)/$(TARGET)/sys-root/lib/libstdc++.so.6.0.*-gdb.py
- $(REMOVE)/crosstool-ng-$(CROSSTOOL_NG_VER)
+ $(REMOVE)/$(CT_NG_PREFIX)-$(CROSSTOOL_NG_VER)
@echo ""
@echo " ============================================================================== "
@echo -e " \033[32mmake crosstool done\033[0m"
## apollo / kronos crosstool ###############################################
CT_NG_CONFIG = $(PATCHES)/ct-ng/ct-ng-$(CROSSTOOL_NG_VER)-$(GCC_VER_HD2)-hd2.config
+CT_NG_PREFIX = crosstool-ng
+CT_NG_SUFFIX = tar.bz2
crosstool:
make MAKEFLAGS=--no-print-directory crosstool-ng
-crosstool-ng: prerequisites | $(ARCHIVE)/uClibc-ng-$(UCLIBC_VER).tar.xz $(ARCHIVE)/crosstool-ng-$(CROSSTOOL_NG_VER).tar.bz2
+crosstool-ng: prerequisites | $(ARCHIVE)/uClibc-ng-$(UCLIBC_VER).tar.xz $(ARCHIVE)/$(CT_NG_PREFIX)-$(CROSSTOOL_NG_VER).$(CT_NG_SUFFIX)
$(START_BUILD)
mkdir -p $(BUILD_TMP)
- $(UNTAR)/crosstool-ng-$(CROSSTOOL_NG_VER).tar.bz2
+ $(UNTAR)/$(CT_NG_PREFIX)-$(CROSSTOOL_NG_VER).$(CT_NG_SUFFIX)
$(UNTAR)/uClibc-ng-$(UCLIBC_VER).tar.xz
unset CONFIG_SITE; \
- set -e; cd $(BUILD_TMP)/crosstool-ng-$(CROSSTOOL_NG_VER); \
+ set -e; cd $(BUILD_TMP)/$(CT_NG_PREFIX)-$(CROSSTOOL_NG_VER); \
\
cp -a $(CT_NG_CONFIG) .config; \
\
test -e $(CROSS_BASE)/$(TARGET)/lib || ln -sf sys-root/lib $(CROSS_BASE)/$(TARGET)/
rm -f $(CROSS_BASE)/$(TARGET)/sys-root/lib/libstdc++.so.6.0.*-gdb.py
\
- $(REMOVE)/crosstool-ng-$(CROSSTOOL_NG_VER)
+ $(REMOVE)/$(CT_NG_PREFIX)-$(CROSSTOOL_NG_VER)
$(REMOVE)/uClibc-ng-$(UCLIBC_VER)
@echo ""
@echo " ============================================================================== "
$(UPGRADE_CONFIG) \
./ct-ng menuconfig
+crossmenuconfig-git: prerequisites $(ARCHIVE)/crosstool-ng-git-$(CROSSTOOL_NG_VER).tar.gz | $(TARGETPREFIX)
+ $(START_BUILD)
+ make $(BUILD_TMP)
+ $(REMOVE)/crosstool-ng-$(CROSSTOOL_NG_VER)
+ $(UNTAR)/crosstool-ng-git-$(CROSSTOOL_NG_VER).tar.gz
+ unset CONFIG_SITE; \
+ set -e; cd $(BUILD_TMP)/crosstool-ng-git-$(CROSSTOOL_NG_VER); \
+ cp -a $(CT_NG_CONFIG) .config; \
+ test -f ./configure || ./bootstrap && \
+ ./configure --enable-local; \
+ MAKELEVEL=0 make; \
+ chmod 0755 ct-ng; \
+ $(UPGRADE_CONFIG) \
+ ./ct-ng menuconfig
+
uclibcmenuconfig: $(ARCHIVE)/uClibc-ng-$(UCLIBC_VER).tar.xz
$(START_BUILD)
make $(BUILD_TMP)
ifeq ($(BOXSERIES), hd1)
CORTEX-STRINGS =
TARGET = arm-cx2450x-linux-gnueabi
- TARGET_O_CFLAGS = -Os
- TARGET_ARCH = arm
+ TARGET_O_CFLAGS = -Os -flto
+ TARGET_ARCH = arm
TARGET_CPU = armv6
TARGET_ABI = -march=$(TARGET_CPU) -mfloat-abi=soft -mlittle-endian
TARGET_ENDIAN = little
TARGET_EXTRA_CFLAGS = -fdata-sections -ffunction-sections
- TARGET_EXTRA_LDFLAGS = -Wl,--gc-sections
- CXX11_ABI =
+ TARGET_EXTRA_LDFLAGS = -flto -Wl,--gc-sections
+ CXX11_ABI = -D_GLIBCXX_USE_CXX11_ABI=0
else ifeq ($(BOXSERIES), hd2)
CORTEX-STRINGS = -lcortex-strings
TARGET = arm-cortex-linux-uclibcgnueabi
TARGET_O_CFLAGS = -O2
- TARGET_ARCH = arm
+ TARGET_ARCH = arm
TARGET_CPU = armv7-a
TARGET_ABI = -march=$(TARGET_CPU) -mtune=cortex-a9 -mfpu=vfpv3-d16 -mfloat-abi=hard -mlittle-endian
TARGET_ENDIAN = little
CORTEX-STRINGS =
TARGET = arm-cortex-linux-gnueabihf
TARGET_O_CFLAGS = -O2
- TARGET_ARCH = arm
+ TARGET_ARCH = arm
TARGET_CPU = armv7ve
TARGET_ABI = -march=$(TARGET_CPU) -mtune=cortex-a15 -mfpu=neon-vfpv4 -mfloat-abi=hard
TARGET_ENDIAN = little
--enable-demuxer=ogg \
--enable-demuxer=flac \
--enable-demuxer=srt \
- --enable-demuxer=hds \
--enable-demuxer=dash \
\
--disable-encoders \
--docdir=/.remove \
--target-os=linux \
--disable-debug \
- --disable-stripping \
+ --enable-lto \
+ --enable-stripping \
--disable-static \
--enable-shared \
--disable-extra-warnings \
--disable-postproc \
--logfile=$(BUILD_TMP)/Config-ffmpeg-$(FFMPEG_VER).log \
--pkg-config="$(PKG_CONFIG)" \
- --extra-cflags="-I$(TARGETPREFIX)/include" \
--extra-ldflags="-L$(TARGETPREFIX)/lib -lz" \
--arch=arm \
--bindir=/bin
--enable-demuxer=ogg \
--enable-demuxer=flac \
--enable-demuxer=srt \
- --enable-demuxer=hds \
--enable-demuxer=dash \
\
--disable-encoders \
ifeq ($(BOXSERIES), $(filter $(BOXSERIES), hd1))
FFMPEG_CONFIGURE += --disable-iconv
-FFMPEG_CONFIGURE += --cpu=armv6 --disable-vfp --extra-cflags="-I$(TARGETPREFIX)/include"
+FFMPEG_CONFIGURE += --cpu=armv6 --enable-armv6 --disable-vfp --extra-cflags="-I$(TARGETPREFIX)/include"
endif
ifeq ($(BOXTYPE), armbox)
--docdir=/.remove \
--target-os=linux \
--disable-debug \
- --disable-stripping \
+ --enable-lto \
+ --enable-stripping \
--disable-static \
--enable-shared \
--disable-extra-warnings \
CORTEX_STRINGS_VER = 48fd30c
# crosstool-ng versions
-CT_NG_VER_HD1 = 1.26.0
+#CT_NG_VER_HD1 = 1.26.0
+CT_NG_VER_HD1 = a87bf7f
CT_NG_VER_HD2 = 1.26.0
CT_NG_VER_ARM = 1.26.0
ETHTOOL_VER = 6.0
# Linaro GCC Versions / hd2 max gcc-8.5.0 for Kernel
-GCC_VER_HD1 = linaro-4.9-2017.01
+GCC_VER_HD1 = gcc-14.1.0
+#GCC_VER_HD1 = linaro-4.9-2017.01
GCC_VER_HD2 = gcc-13.2.0
GCC_VER_ARM = gcc-13.2.0