diff options
-rw-r--r-- | mk/build.mk | 4 | ||||
-rw-r--r-- | mk/image.mk | 5 | ||||
-rw-r--r-- | package/base-files/Makefile | 2 | ||||
-rw-r--r-- | package/base-files/src/etc/init.d/boot | 2 | ||||
-rw-r--r-- | package/base-files/src/etc/inittab | 2 | ||||
-rw-r--r-- | package/hdparm/Makefile | 2 | ||||
-rw-r--r-- | package/mpd/Makefile | 2 | ||||
-rw-r--r-- | package/mpd/patches/patch-src_db_SimpleDatabasePlugin_cxx | 91 | ||||
-rw-r--r-- | package/mpd/patches/patch-src_thread_Id_hxx | 11 | ||||
-rw-r--r-- | target/config/Config.in | 1 | ||||
-rw-r--r-- | target/packages/pkg-available/mpdbox | 6 | ||||
-rw-r--r-- | target/tarch.lst | 2 | ||||
-rw-r--r-- | target/x86_64/sys-available/toolchain-x86_64_32 | 12 | ||||
-rw-r--r-- | target/x86_64/sys-available/toolchain-x86_64_x32 | 12 | ||||
-rw-r--r-- | toolchain/binutils/Makefile | 2 | ||||
-rw-r--r-- | toolchain/gcc/Makefile | 4 | ||||
-rw-r--r-- | toolchain/gcc/patches/4.8.2/abi32.patch | 54 | ||||
-rw-r--r-- | toolchain/glibc/Makefile.inc | 2 |
18 files changed, 100 insertions, 116 deletions
diff --git a/mk/build.mk b/mk/build.mk index c63770150..7e640b295 100644 --- a/mk/build.mk +++ b/mk/build.mk @@ -476,8 +476,8 @@ bulktoolchain: mkdir -p ${TOPDIR}/firmware; \ ( \ echo === building $$arch $$libc toolchain-$$arch on $$(date); \ - tarch=$$(echo $$arch|sed -e "s#el##" -e "s#eb##" -e "s#mips64.*#mips#" -e "s#hf##"); \ - carch=$$(echo $$arch|sed -e "s#sh#sh4#" -e "s#hf##" -e "s#mips64n.*#mips64#" -e "s#mips64el.*#mips64el#" ); \ + tarch=$$(echo $$arch|sed -e "s#el##" -e "s#eb##" -e "s#mips64.*#mips#" -e "s#hf##" -e "s#x86_64.*#x86_64#" ); \ + carch=$$(echo $$arch|sed -e "s#sh#sh4#" -e "s#hf##" -e "s#mips64n.*#mips64#" -e "s#mips64el.*#mips64el#" -e "s#x86_64.*#x86_64#" ); \ $(GMAKE) prereq && \ $(GMAKE) ARCH=$$tarch SYSTEM=toolchain-$$arch LIBC=$$libc defconfig; \ tabi=$$(grep ^ADK_TARGET_ABI= .config|cut -d \" -f 2);\ diff --git a/mk/image.mk b/mk/image.mk index 1e7a802a5..6a4d7863d 100644 --- a/mk/image.mk +++ b/mk/image.mk @@ -34,6 +34,9 @@ imageprepare: image-prepare-post extra-install # if an extra directory exist in TOPDIR, copy all content over the # root directory, do the same if make extra=/dir/to/extra is used extra-install: + @-if [ -h ${TARGET_DIR}/etc/resolv.conf -a -f $(TOPDIR)/extra/etc/resolv.conf ];then \ + rm ${TARGET_DIR}/etc/resolv.conf;\ + fi @if [ -d $(TOPDIR)/extra ];then $(CP) $(TOPDIR)/extra/* ${TARGET_DIR};fi @if [ ! -z $(extra) ];then $(CP) $(extra)/* ${TARGET_DIR};fi @@ -51,6 +54,7 @@ image-prepare-post: -rm -f ${TARGET_DIR}/bin/sh ln -sf ${BINSH} ${TARGET_DIR}/bin/sh ifeq ($(ADK_LINUX_X86_64),y) +ifeq ($(ADK_TARGET_ABI_32),) # fixup lib dirs mv ${TARGET_DIR}/lib/* ${TARGET_DIR}/${ADK_TARGET_LIBC_PATH} rm -rf ${TARGET_DIR}/lib/ @@ -60,6 +64,7 @@ ifeq ($(ADK_LINUX_X86_64),y) rm -rf ${TARGET_DIR}/usr/lib/ (cd ${TARGET_DIR}/usr ; ln -sf ${ADK_TARGET_LIBC_PATH} lib) endif +endif ifeq ($(ADK_LINUX_PPC64),y) # fixup lib dirs mv ${TARGET_DIR}/lib/* ${TARGET_DIR}/${ADK_TARGET_LIBC_PATH} diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 0db6ad87f..45e7f1cc4 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/mk/rootfs.mk PKG_NAME:= base-files PKG_VERSION:= 1.0 -PKG_RELEASE:= 78 +PKG_RELEASE:= 79 PKG_SECTION:= base PKG_DESCR:= basic files and scripts PKG_BUILDDEP:= pkgconf-host file-host diff --git a/package/base-files/src/etc/init.d/boot b/package/base-files/src/etc/init.d/boot index 1af4acdf3..291bf6ab4 100644 --- a/package/base-files/src/etc/init.d/boot +++ b/package/base-files/src/etc/init.d/boot @@ -27,9 +27,9 @@ cat /etc/.rnd >/dev/urandom 2>&1 # create some useful directories in tmpfs mkdir -p /var/log mkdir -p /var/run +mkdir -p /var/tmp touch /var/log/lastlog touch /var/log/wtmp -ln -s /tmp /var/tmp HOSTNAME= [[ -s /etc/hostname ]] && HOSTNAME=$(cat /etc/hostname) diff --git a/package/base-files/src/etc/inittab b/package/base-files/src/etc/inittab index f6183798e..e2ad18156 100644 --- a/package/base-files/src/etc/inittab +++ b/package/base-files/src/etc/inittab @@ -6,5 +6,5 @@ null::sysinit:/bin/mount -a -t devpts null::sysinit:/bin/mount -a -t tmpfs ::sysinit:/etc/init.d/rcS ::shutdown:/etc/init.d/rcK -null::shutdown:/bin/umount -a -r +null::shutdown:/bin/umount -a -t ext4 null::shutdown:/sbin/swapoff -a diff --git a/package/hdparm/Makefile b/package/hdparm/Makefile index 61925e59c..91d0d0c03 100644 --- a/package/hdparm/Makefile +++ b/package/hdparm/Makefile @@ -7,7 +7,7 @@ PKG_NAME:= hdparm PKG_VERSION:= 9.43 PKG_RELEASE:= 1 PKG_MD5SUM:= f73233be118d86c779a8463d8b6a3cdb -PKG_DESCR:= get/set ATA drive parameters +PKG_DESCR:= get/set ATA/SATA drive parameters PKG_SECTION:= fs PKG_URL:= http://sourceforge.net/projects/hdparm PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=hdparm/} diff --git a/package/mpd/Makefile b/package/mpd/Makefile index 4c8ab359a..fae44277e 100644 --- a/package/mpd/Makefile +++ b/package/mpd/Makefile @@ -5,7 +5,7 @@ include ${TOPDIR}/rules.mk PKG_NAME:= mpd PKG_VERSION:= 0.18.9 -PKG_RELEASE:= 1 +PKG_RELEASE:= 2 PKG_MD5SUM:= 0e5156a831d4302d2032998bcfd5c36f PKG_DESCR:= A music player daemon PKG_SECTION:= multimedia diff --git a/package/mpd/patches/patch-src_db_SimpleDatabasePlugin_cxx b/package/mpd/patches/patch-src_db_SimpleDatabasePlugin_cxx deleted file mode 100644 index 0f28de720..000000000 --- a/package/mpd/patches/patch-src_db_SimpleDatabasePlugin_cxx +++ /dev/null @@ -1,91 +0,0 @@ ---- mpd-0.18.5.orig/src/db/SimpleDatabasePlugin.cxx 2013-11-22 00:33:30.000000000 +0100 -+++ mpd-0.18.5/src/db/SimpleDatabasePlugin.cxx 2013-11-30 19:17:55.000000000 +0100 -@@ -35,6 +35,9 @@ - - #include <sys/types.h> - #include <errno.h> -+#include <sys/mount.h> -+#include <mntent.h> -+#include <string.h> - - static constexpr Domain simple_db_domain("simple_db"); - -@@ -95,8 +98,8 @@ SimpleDatabase::Check(Error &error) cons - return false; - } - -- /* Check if we can write to the directory */ -- if (!CheckAccess(dirPath, X_OK | W_OK)) { -+ /* Check if we can change into the directory */ -+ if (!CheckAccess(dirPath, X_OK)) { - const int e = errno; - const std::string dirPath_utf8 = dirPath.ToUTF8(); - error.FormatErrno(e, "Can't create db file in \"%s\"", -@@ -122,9 +125,9 @@ SimpleDatabase::Check(Error &error) cons - return false; - } - -- /* And check that we can write to it */ -- if (!CheckAccess(path, R_OK | W_OK)) { -- error.FormatErrno("Can't open db file \"%s\" for reading/writing", -+ /* And check that we can read it */ -+ if (!CheckAccess(path, R_OK)) { -+ error.FormatErrno("Can't open db file \"%s\" for reading", - path_utf8.c_str()); - return false; - } -@@ -281,6 +284,10 @@ SimpleDatabase::GetStats(const DatabaseS - bool - SimpleDatabase::Save(Error &error) - { -+ struct mntent *mnt; -+ int remount; -+ FILE *f; -+ - db_lock(); - - LogDebug(simple_db_domain, "removing empty directories from DB"); -@@ -293,6 +300,26 @@ SimpleDatabase::Save(Error &error) - - LogDebug(simple_db_domain, "writing DB"); - -+ remount = 0; -+ /* check if /data is mounted read-only */ -+ if ((f = setmntent("/proc/mounts", "r")) == NULL) -+ error.Format(simple_db_domain, "Checking /proc/mounts failed"); -+ -+ while ((mnt = getmntent(f)) != NULL) { -+ if (strcmp(mnt->mnt_dir, "/data") == 0 && -+ hasmntopt(mnt, MNTOPT_RO) != NULL) { -+ remount = 1; -+ } -+ } -+ endmntent(f); -+ -+ if (remount) { -+ if (mount("","/data",0,MS_REMOUNT,0)<0) { -+ error.Format(simple_db_domain, "Remounting /data rw failed"); -+ } -+ LogDebug(simple_db_domain, "Mounted /data successfully in read-write mode"); -+ } -+ - FILE *fp = FOpen(path, FOpenMode::WriteText); - if (!fp) { - error.FormatErrno("unable to write to db file \"%s\"", -@@ -310,6 +337,16 @@ SimpleDatabase::Save(Error &error) - - fclose(fp); - -+ if (remount) { -+ sync(); -+ if (mount("","/data",0,MS_REMOUNT|MS_RDONLY,0)<0) { -+ error.Format(simple_db_domain, "Remounting /data ro failed"); -+ } -+ LogDebug(simple_db_domain, "Mounted /data successfully in read-only mode"); -+ } -+ -+ LogDebug(simple_db_domain, "Successfully written database"); -+ - struct stat st; - if (StatFile(path, st)) - mtime = st.st_mtime; diff --git a/package/mpd/patches/patch-src_thread_Id_hxx b/package/mpd/patches/patch-src_thread_Id_hxx deleted file mode 100644 index dabee4007..000000000 --- a/package/mpd/patches/patch-src_thread_Id_hxx +++ /dev/null @@ -1,11 +0,0 @@ ---- mpd-0.18.5.orig/src/thread/Id.hxx 2013-11-18 23:50:46.000000000 +0100 -+++ mpd-0.18.5/src/thread/Id.hxx 2013-11-29 20:50:36.000000000 +0100 -@@ -84,7 +84,7 @@ public: - #ifdef WIN32 - return id == other.id; - #else -- return ::pthread_equal(id, other.id); -+ return pthread_equal(id, other.id); - #endif - } - diff --git a/target/config/Config.in b/target/config/Config.in index 84f19adec..4586de17b 100644 --- a/target/config/Config.in +++ b/target/config/Config.in @@ -175,6 +175,7 @@ endchoice config ADK_TARGET_LIBC_PATH string + default "lib" if ADK_32 default "lib32" if ADK_n32 default "libx32" if ADK_x32 default "lib64" if ADK_n64 \ diff --git a/target/packages/pkg-available/mpdbox b/target/packages/pkg-available/mpdbox index b1edc40e1..eab49bc8a 100644 --- a/target/packages/pkg-available/mpdbox +++ b/target/packages/pkg-available/mpdbox @@ -3,8 +3,9 @@ config ADK_PKG_MPDBOX default n select ADK_PACKAGE_MPDBOX select ADK_PACKAGE_CIFS_UTILS - select ADK_PACKAGE_NFS_UTILS if ADK_TARGET_LIB_GLIBC - select ADK_PACKAGE_NFS_UTILS_CLIENT if ADK_TARGET_LIB_GLIBC + select ADK_PACKAGE_NFS_UTILS + select ADK_PACKAGE_NFS_UTILS_CLIENT + select ADK_PACKAGE_NTFS_3G select ADK_PACKAGE_LIBMPDCLIENT select ADK_PACKAGE_MPC select ADK_PACKAGE_MPD @@ -22,7 +23,6 @@ config ADK_PKG_MPDBOX select ADK_PACKAGE_MPD_WITH_CURL select ADK_PACKAGE_MPD_WITH_SAMPLERATE select ADK_PACKAGE_MPD_WITH_HTTPD - select ADK_PACKAGE_CPUFREQUTILS select ADK_PACKAGE_FILE select ADK_PACKAGE_HTOP select ADK_PACKAGE_DROPBEAR diff --git a/target/tarch.lst b/target/tarch.lst index 13c578c04..7e9014a37 100644 --- a/target/tarch.lst +++ b/target/tarch.lst @@ -18,3 +18,5 @@ sparc sparc64 x86 x86_64 ++x86_64_32 ++x86_64_x32 diff --git a/target/x86_64/sys-available/toolchain-x86_64_32 b/target/x86_64/sys-available/toolchain-x86_64_32 new file mode 100644 index 000000000..501c31050 --- /dev/null +++ b/target/x86_64/sys-available/toolchain-x86_64_32 @@ -0,0 +1,12 @@ +config ADK_TARGET_SYSTEM_TOOLCHAIN_X86_64_32 + bool "Toolchain only (32 ABI)" + select ADK_x86_64 + select ADK_32 + select ADK_toolchain_x86_64 + select ADK_CPU_X86_64 + select ADK_LINUX_64 + select ADK_TOOLCHAIN + select ADK_TARGET_PACKAGE_TGZ + help + Build a x86_64 toolchain. + diff --git a/target/x86_64/sys-available/toolchain-x86_64_x32 b/target/x86_64/sys-available/toolchain-x86_64_x32 new file mode 100644 index 000000000..090d474b6 --- /dev/null +++ b/target/x86_64/sys-available/toolchain-x86_64_x32 @@ -0,0 +1,12 @@ +config ADK_TARGET_SYSTEM_TOOLCHAIN_X86_64_X32 + bool "Toolchain only (x32 ABI)" + select ADK_x86_64 + select ADK_x32 + select ADK_toolchain_x86_64 + select ADK_CPU_X86_64 + select ADK_LINUX_64 + select ADK_TOOLCHAIN + select ADK_TARGET_PACKAGE_TGZ + help + Build a x86_64 toolchain. + diff --git a/toolchain/binutils/Makefile b/toolchain/binutils/Makefile index 6490c19aa..4d34e3566 100644 --- a/toolchain/binutils/Makefile +++ b/toolchain/binutils/Makefile @@ -16,7 +16,7 @@ ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI),y) CONFOPTS+= --with-arch=armv6 endif -ifneq ($(strip $(ADK_LINUX_64)$(ADK_TARGET_KERNEL64)),) +ifneq ($(ADK_LINUX_64),) CONFOPTS+= --enable-64-bit-bfd endif diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile index 5595f82dd..611de97bf 100644 --- a/toolchain/gcc/Makefile +++ b/toolchain/gcc/Makefile @@ -45,10 +45,10 @@ endif ifeq ($(ADK_LINUX_X86_64),y) ifeq ($(ADK_x32),y) -GCC_FINAL_CONFOPTS+= --enable-multilib --with-multilib-list=mx32 +GCC_FINAL_CONFOPTS+= --with-abi=x32 endif ifeq ($(ADK_32),y) -GCC_FINAL_CONFOPTS+= --enable-multilib --with-multilib-list=m32 +GCC_FINAL_CONFOPTS+= --with-abi=32 endif ifeq ($(ADK_64),y) GCC_FINAL_CONFOPTS+= --disable-biarch --disable-multilib diff --git a/toolchain/gcc/patches/4.8.2/abi32.patch b/toolchain/gcc/patches/4.8.2/abi32.patch new file mode 100644 index 000000000..856d608bd --- /dev/null +++ b/toolchain/gcc/patches/4.8.2/abi32.patch @@ -0,0 +1,54 @@ +diff -Nur gcc-4.8.2.orig/gcc/config/i386/biarch32.h gcc-4.8.2/gcc/config/i386/biarch32.h +--- gcc-4.8.2.orig/gcc/config/i386/biarch32.h 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-4.8.2/gcc/config/i386/biarch32.h 2014-03-23 20:33:52.000000000 +0100 +@@ -0,0 +1,27 @@ ++/* Make configure files to produce biarch compiler defaulting to 32bit mode. ++ This file must be included very first, while the OS specific file later ++ to overwrite otherwise wrong defaults. ++ Copyright (C) 2001-2014 Free Software Foundation, Inc. ++ ++This file is part of GCC. ++ ++GCC is free software; you can redistribute it and/or modify ++it under the terms of the GNU General Public License as published by ++the Free Software Foundation; either version 3, or (at your option) ++any later version. ++ ++GCC is distributed in the hope that it will be useful, ++but WITHOUT ANY WARRANTY; without even the implied warranty of ++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++GNU General Public License for more details. ++ ++Under Section 7 of GPL version 3, you are granted additional ++permissions described in the GCC Runtime Library Exception, version ++3.1, as published by the Free Software Foundation. ++ ++You should have received a copy of the GNU General Public License and ++a copy of the GCC Runtime Library Exception along with this program; ++see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ++<http://www.gnu.org/licenses/>. */ ++ ++#define TARGET_64BIT_DEFAULT 0 +diff -Nur gcc-4.8.2.orig/gcc/config.gcc gcc-4.8.2/gcc/config.gcc +--- gcc-4.8.2.orig/gcc/config.gcc 2013-10-03 02:47:24.000000000 +0200 ++++ gcc-4.8.2/gcc/config.gcc 2014-03-22 13:15:18.000000000 +0100 +@@ -522,6 +522,9 @@ + 64 | m64) + tm_file="i386/biarch64.h ${tm_file}" + ;; ++ 32 | m32) ++ tm_file="i386/biarch32.h ${tm_file}" ++ ;; + x32 | mx32) + tm_file="i386/biarchx32.h ${tm_file}" + ;; +@@ -1343,6 +1346,9 @@ + x32 | mx32) + x86_multilibs="mx32" + ;; ++ 32 | m32) ++ x86_multilibs="m32" ++ ;; + *) + x86_multilibs="m64,m32" + ;; diff --git a/toolchain/glibc/Makefile.inc b/toolchain/glibc/Makefile.inc index 6671f1e2d..3a9f24e33 100644 --- a/toolchain/glibc/Makefile.inc +++ b/toolchain/glibc/Makefile.inc @@ -6,7 +6,7 @@ PKG_VERSION:= 2.19 PKG_RELEASE:= 1 PKG_MD5SUM:= 5374d29864b583622b62bfc6b8429418 PKG_SITES:= ${MASTER_SITE_GNU:=glibc/} -ifeq ($(ADK_TARGET_ABI_32),y) +ifeq ($(ADK_32),y) GLIBC_TARGET_NAME:= i686-openadk-linux-gnu else GLIBC_TARGET_NAME:= $(GNU_TARGET_NAME) |