Преглед изворни кода

Merge branch 'master' of git+ssh://openadk.org/git/openadk

Waldemar Brodkorb пре 11 година
родитељ
комит
f3263184ca

+ 14 - 2
mk/build.mk

@@ -39,6 +39,8 @@ DEFCONFIG=		ADK_DEBUG=n \
 			ADK_PKG_XORG=n \
 			ADK_PKG_MPDBOX=n \
 			ADK_PKG_DEVELOPMENT=n \
+			ADK_PKG_CONSOLE=n \
+			ADK_PKG_TEST=n \
 			ADK_TOOLCHAIN_GCC_USE_SSP=n \
 			ADK_TOOLCHAIN_GCC_USE_LTO=n \
 			BUSYBOX_IFPLUGD=n \
@@ -484,7 +486,12 @@ endif # ! ifeq ($(strip $(ADK_HAVE_DOT_CONFIG)),y)
 
 # build all target architecture and libc combinations (toolchain only)
 bulktoolchain:
-	for libc in glibc uclibc musl;do \
+	if [ -z "$(LIBC)" ];then \
+		libc="glibc uclibc musl"; \
+	else \
+		libc="$(LIBC)"; \
+	fi; \
+	for libc in $$libc;do \
 		while read arch; do \
 			mkdir -p ${TOPDIR}/firmware; \
 		    ( \
@@ -504,7 +511,12 @@ bulktoolchain:
 	done
 
 test-framework:
-	for libc in uclibc glibc musl;do \
+	if [ -z "$(LIBC)" ];then \
+		libc="glibc uclibc musl"; \
+	else \
+		libc="$(LIBC)"; \
+	fi; \
+	for libc in $$libc;do \
 		mkdir -p $(TOPDIR)/firmware/$(SYSTEM)_$(ARCH)_$$libc; \
 		( \
 			for arch in arm microblaze microblazeel mips mipsel mips64 mips64el ppc ppc64 sh4 sh4eb sparc sparc64 i686 x86_64;do \

+ 28 - 0
package/adk-test-tools/Makefile

@@ -0,0 +1,28 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=		adk-test-tools
+PKG_VERSION:=		0.1
+PKG_RELEASE:=		1
+PKG_DESCR:=		helper tools and scripts for adk-test-framework
+PKG_SECTION:=		misc
+PKG_URL:=		http://openadk.org/
+
+NO_DISTFILES:=		1
+
+include $(TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,ADK_TEST_TOOLS,adk-test-tools,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+
+CONFIG_STYLE:=		manual
+BUILD_STYLE:=		manual
+INSTALL_STYLE:=		manual
+
+adk-test-tools-install:
+	$(INSTALL_DIR) $(IDIR_ADK_TEST_TOOLS)/usr/bin
+	$(INSTALL_BIN) $(WRKBUILD)/{qmp,quit} \
+		$(IDIR_ADK_TEST_TOOLS)/usr/bin
+
+include ${TOPDIR}/mk/pkg-bottom.mk

+ 11 - 0
package/adk-test-tools/files/test.init

@@ -0,0 +1,11 @@
+#!/bin/sh
+#PKG adk-test-tools
+#INIT 90
+[[ $1 = autostart ]] || exit 0
+echo "Starting test script ..."
+if [ -x /run.sh ];then
+	exec /run.sh
+else
+	echo "no run.sh found"
+fi
+quit

+ 4 - 0
package/adk-test-tools/src/qmp

@@ -0,0 +1,4 @@
+#!/bin/sh
+echo '{ "execute": "qmp_capabilities" }'
+sleep 1
+echo '{ "execute": "quit" }'

+ 2 - 0
package/adk-test-tools/src/quit

@@ -0,0 +1,2 @@
+#!/bin/sh
+socat exec:/usr/bin/qmp tcp:10.0.2.2:4444

+ 1 - 1
package/base-files/Makefile

@@ -6,7 +6,7 @@ include $(TOPDIR)/mk/rootfs.mk
 
 PKG_NAME:=		base-files
 PKG_VERSION:=		1.0
-PKG_RELEASE:=		68
+PKG_RELEASE:=		69
 PKG_SECTION:=		base
 PKG_DESCR:=		basic files and scripts
 PKG_BUILDDEP:=		pkgconf-host file-host

+ 0 - 5
package/base-files/src/etc/init.d/boot

@@ -4,11 +4,6 @@
 
 . /etc/functions.sh
 
-# disable kernel messages
-if [ -f /proc/sys/kernel/printk ];then
-	echo 0 > /proc/sys/kernel/printk
-fi
-
 # remount /dev with smaller size
 mount -o remount,nosuid,size=128k,mode=0755 -t tmpfs mdev /dev
 

+ 4 - 0
package/base-files/src/etc/init.d/rcS

@@ -1,4 +1,8 @@
 #!/bin/sh
+# disable kernel messages
+if [ -f /proc/sys/kernel/printk ];then
+	echo 0 > /proc/sys/kernel/printk
+fi
 echo "System initialization ..."
 export PATH=/bin:/sbin:/usr/bin:/usr/sbin
 ln -s /proc/self/fd/2 /dev/stderr

+ 1 - 1
package/busybox/Makefile

@@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=		busybox
 PKG_VERSION:=		1.21.1
-PKG_RELEASE:=		4
+PKG_RELEASE:=		5
 PKG_MD5SUM:=		795394f83903b5eec6567d51eebb417e
 PKG_DESCR:=		core utilities for embedded systems
 PKG_SECTION:=		base

+ 6 - 2
package/busybox/files/syslog.init

@@ -11,10 +11,14 @@ autostart)
 	;;
 start)
 	/sbin/syslogd $syslogd_flags
-	/sbin/klogd
+	if [ -f /proc/sys/kernel/printk ];then
+		/sbin/klogd
+	fi
 	;;
 stop)
-	kill $(pgrep -f /sbin/klogd)
+	if [ -f /proc/sys/kernel/printk ];then
+		kill $(pgrep -f /sbin/klogd)
+	fi
 	kill $(pgrep -f /sbin/syslogd)
 	;;
 restart)

+ 1 - 1
package/dropbear/Makefile

@@ -14,7 +14,7 @@ PKG_SITES:=		http://matt.ucc.asn.au/dropbear/releases/
 
 DISTFILES:=		${PKG_NAME}-${PKG_VERSION}.tar.bz2
 
-PKG_DFLT_DROPBEAR:=	y if !ADK_TOOLCHAIN_ONLY
+PKG_DFLT_DROPBEAR:=	y if !ADK_TOOLCHAIN_ONLY && !ADK_PKG_TEST
 PKG_SUBPKGS:=		DROPBEAR DBCONVERT
 PKGSD_DBCONVERT:=	Utility for converting SSH private keys
 

+ 18 - 5
package/strace/patches/patch-process_c

@@ -1,5 +1,5 @@
 --- strace-4.8.orig/process.c	2013-05-18 00:22:19.000000000 +0200
-+++ strace-4.8/process.c	2014-02-25 20:02:55.000000000 +0100
++++ strace-4.8/process.c	2014-03-07 11:15:51.318966166 +0100
 @@ -55,7 +55,7 @@
  # endif
  #endif
@@ -9,18 +9,31 @@
  # undef PTRACE_SYSCALL
  # ifdef HAVE_STRUCT_IA64_FPREG
  #  define ia64_fpreg XXX_ia64_fpreg
-@@ -104,6 +104,10 @@
+@@ -104,6 +104,14 @@
  # include <asm/rse.h>
  #endif
  
 +#ifdef __arm__
 +#include <asm/ptrace.h>
 +#endif
++
++#ifdef __microblaze__
++#include <asm/ptrace.h>
++#endif
 +
  #ifdef HAVE_PRCTL
  # include <sys/prctl.h>
  
-@@ -2857,7 +2861,7 @@ sys_sched_setscheduler(struct tcb *tcp)
+@@ -2472,7 +2480,7 @@ const struct xlat struct_user_offsets[]
+ #elif defined(TILE)
+ 	/* nothing */
+ #elif defined(MICROBLAZE)
+-	{ sizeof(struct user),	"sizeof(struct user)"			},
++	/* nothing */
+ #elif defined(AVR32)
+ 	{ uoff(u_tsize),	"offsetof(struct user, u_tsize)"	},
+ 	{ uoff(u_dsize),	"offsetof(struct user, u_dsize)"	},
+@@ -2857,7 +2865,7 @@ sys_sched_setscheduler(struct tcb *tcp)
  		if (umove(tcp, tcp->u_arg[2], &p) < 0)
  			tprintf(", %#lx", tcp->u_arg[2]);
  		else
@@ -29,7 +42,7 @@
  	}
  	return 0;
  }
-@@ -2872,7 +2876,7 @@ sys_sched_getparam(struct tcb *tcp)
+@@ -2872,7 +2880,7 @@ sys_sched_getparam(struct tcb *tcp)
  		if (umove(tcp, tcp->u_arg[1], &p) < 0)
  			tprintf("%#lx", tcp->u_arg[1]);
  		else
@@ -38,7 +51,7 @@
  	}
  	return 0;
  }
-@@ -2885,7 +2889,7 @@ sys_sched_setparam(struct tcb *tcp)
+@@ -2885,7 +2893,7 @@ sys_sched_setparam(struct tcb *tcp)
  		if (umove(tcp, tcp->u_arg[1], &p) < 0)
  			tprintf("%d, %#lx", (int) tcp->u_arg[0], tcp->u_arg[1]);
  		else

+ 12 - 0
package/strace/patches/patch-util_c

@@ -0,0 +1,12 @@
+--- strace-4.8.orig/util.c	2013-05-06 20:23:01.000000000 +0200
++++ strace-4.8/util.c	2014-03-07 15:34:01.074036954 +0100
+@@ -55,7 +55,9 @@
+ # ifdef HAVE_STRUCT_PT_ALL_USER_REGS
+ #  define pt_all_user_regs XXX_pt_all_user_regs
+ # endif
++#if !defined(SH)
+ # include <linux/ptrace.h>
++#endif
+ # undef ia64_fpreg
+ # undef pt_all_user_regs
+ #endif

+ 1 - 0
target/linux/config/Config.in.debug

@@ -34,6 +34,7 @@ config ADK_KERNEL_PRINTK
 	boolean
 	select ADK_KERNEL_EARLY_PRINTK
 	default y
+	depends on !ADK_PKG_TEST
 	help
 	  Disable printk to save space and quieten bootup.
 

+ 1 - 0
target/packages/pkg-available/test

@@ -1,6 +1,7 @@
 config ADK_PKG_TEST
 	bool "Compile a ADK test framework system"
 	default n
+	select ADK_PACKAGE_ADK_TEST_TOOLS
 	select ADK_PACKAGE_STRACE
 	select ADK_PACKAGE_SOCAT
 	select ADK_PACKAGE_MAKE

+ 3 - 3
target/sparc/Makefile

@@ -18,7 +18,7 @@ ifeq ($(ADK_TARGET_SYSTEM_QEMU_SPARC),y)
 	@echo "Use following command to create a QEMU Image:"
 	@echo "./scripts/create.sh +g qemu-${CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
 	@echo "Start qemu with following command line:"
-	@echo 'qemu-system-sparc -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL) qemu-${CPU_ARCH}.img -append "root=/dev/sda1"'
+	@echo 'qemu-system-sparc -M SS-5 -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL) qemu-${CPU_ARCH}.img -append "root=/dev/sda1"'
 endif
 endif
 ifeq ($(ADK_TARGET_FS),initramfs)
@@ -28,7 +28,7 @@ imageinstall: $(FW_DIR)/$(INITRAMFS)
 	@echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
 ifeq ($(ADK_TARGET_SYSTEM_QEMU_SPARC),y)
 	@echo "Start qemu with following command line:"
-	@echo 'qemu-system-sparc -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
+	@echo 'qemu-system-sparc -M SS-5 -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
 endif
 endif
 ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
@@ -37,6 +37,6 @@ imageinstall: createinitramfs
 	@echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
 ifeq ($(ADK_TARGET_SYSTEM_QEMU_SPARC),y)
 	@echo "Start qemu with following command line:"
-	@echo 'qemu-system-sparc -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL)'
+	@echo 'qemu-system-sparc -M SS-5 -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL)'
 endif
 endif