summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-03-19 08:12:55 (GMT)
committerWaldemar Brodkorb <wbx@openadk.org>2014-03-19 08:12:55 (GMT)
commit910966c0e7582620e1087549b10828f2ace1738f (patch)
tree7d9c972cf4c154ac7251af84b0657b83bb024087
parent95813e9c0009a0fff2e5e30a39e1ea45b061cbc0 (diff)
add ADK_RUNTIME_CONSOLE_SERIAL_DEVICE, minor cleanups while there
-rw-r--r--BUGS1
-rw-r--r--mk/vars.mk3
-rw-r--r--package/base-files/Makefile24
-rw-r--r--package/base-files/files/inittab.serial2
-rw-r--r--rules.mk54
-rw-r--r--target/config/Config.in.runtime11
-rw-r--r--target/config/Config.in.tools6
7 files changed, 42 insertions, 59 deletions
diff --git a/BUGS b/BUGS
index 70759ad..5bd4fc7 100644
--- a/BUGS
+++ b/BUGS
@@ -1,3 +1,4 @@
+- qemu-i386: uCLibc fails for non-debug builds
- qemu-sparc: startup kernel with gcc 4.8.2 broken
- qemu-sh4: usb keyboard is broken
- qemu-arm: thumb mode with glibc does not boot
diff --git a/mk/vars.mk b/mk/vars.mk
index 699f3ed..f22717c 100644
--- a/mk/vars.mk
+++ b/mk/vars.mk
@@ -100,8 +100,7 @@ TARGET_CFLAGS:= $(TARGET_CFLAGS_ARCH) -fwrapv -fno-ident -fhonour-copts
TARGET_CXXFLAGS:= $(TARGET_CFLAGS_ARCH) -fwrapv -fno-ident
TARGET_LDFLAGS:= -L$(STAGING_TARGET_DIR)/lib -L$(STAGING_TARGET_DIR)/usr/lib \
-Wl,-O1 -Wl,-rpath -Wl,/usr/lib \
- -Wl,-rpath-link -Wl,${STAGING_TARGET_DIR}/usr/lib \
- $(ADK_TARGET_ABI_LDFLAGS)
+ -Wl,-rpath-link -Wl,${STAGING_TARGET_DIR}/usr/lib
# security optimization, see http://www.akkadia.org/drepper/dsohowto.pdf
TARGET_LDFLAGS+= -Wl,-z,relro,-z,now
diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index 11fb4f5..25314b5 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:= 72
+PKG_RELEASE:= 73
PKG_SECTION:= base
PKG_DESCR:= basic files and scripts
PKG_BUILDDEP:= pkgconf-host file-host
@@ -63,27 +63,7 @@ endif
cat ./files/inittab.serial >> $(IDIR_BASE_FILES)/etc/inittab
test -z $(ADK_RUNTIME_CONSOLE_BOTH) || \
cat ./files/inittab.vga >> $(IDIR_BASE_FILES)/etc/inittab
-ifeq ($(ADK_TARGET_QEMU_ARM_MODEL_VERSATILEPB),y)
- $(SED) 's#ttyS#ttyAMA#g' $(IDIR_BASE_FILES)/etc/inittab
-endif
-ifeq ($(ADK_TARGET_QEMU_ARM_MODEL_VEXPRESS_A9),y)
- $(SED) 's#ttyS#ttyAMA#g' $(IDIR_BASE_FILES)/etc/inittab
-endif
-ifeq ($(ADK_TARGET_SYSTEM_ARANYM_M68K),y)
- $(SED) 's#ttyS#nfcon#g' $(IDIR_BASE_FILES)/etc/inittab
-endif
-ifeq ($(ADK_TARGET_SYSTEM_QEMU_PPC64),y)
- $(SED) 's#ttyS#hvc#g' $(IDIR_BASE_FILES)/etc/inittab
-endif
-ifeq ($(ADK_TARGET_SYSTEM_QEMU_SH4),y)
- $(SED) 's#ttyS0#ttySC1#g' $(IDIR_BASE_FILES)/etc/inittab
-endif
-ifeq ($(ADK_TARGET_SYSTEM_QEMU_SH4EB),y)
- $(SED) 's#ttyS0#ttySC1#g' $(IDIR_BASE_FILES)/etc/inittab
-endif
-ifeq ($(ADK_TARGET_QEMU_MICROBLAZE_MODEL_S3ADSP1800),y)
- $(SED) 's#ttyS#ttyUL#g' $(IDIR_BASE_FILES)/etc/inittab
-endif
+ $(SED) 's#@DEVICE@#$(ADK_RUNTIME_CONSOLE_SERIAL_DEVICE)#' $(IDIR_BASE_FILES)/etc/inittab
$(SED) 's#@SPEED@#$(ADK_RUNTIME_CONSOLE_SERIAL_SPEED)#' $(IDIR_BASE_FILES)/etc/inittab
test -z $(ADK_RUNTIME_HOSTNAME) || \
echo $(ADK_RUNTIME_HOSTNAME) > $(IDIR_BASE_FILES)/etc/hostname; \
diff --git a/package/base-files/files/inittab.serial b/package/base-files/files/inittab.serial
index 5de880f..dcb09e4 100644
--- a/package/base-files/files/inittab.serial
+++ b/package/base-files/files/inittab.serial
@@ -1 +1 @@
-ttyS0::respawn:/sbin/getty -i -L ttyS0 @SPEED@ vt100
+@DEVICE@::respawn:/sbin/getty -i -L @DEVICE@ @SPEED@ vt100
diff --git a/rules.mk b/rules.mk
index 2fe8aa7..81c613c 100644
--- a/rules.mk
+++ b/rules.mk
@@ -25,37 +25,35 @@ SET_DASHX:= :
endif
# Strip off the annoying quoting
-ADK_TARGET_KERNEL:= $(strip $(subst ",, $(ADK_TARGET_KERNEL)))
-ADK_TARGET_ARCH:= $(strip $(subst ",, $(ADK_TARGET_ARCH)))
-ADK_TARGET_SYSTEM:= $(strip $(subst ",, $(ADK_TARGET_SYSTEM)))
-ADK_TARGET_LIBC:= $(strip $(subst ",, $(ADK_TARGET_LIBC)))
-ADK_TARGET_LIBC_PATH:= $(strip $(subst ",, $(ADK_TARGET_LIBC_PATH)))
-ADK_TARGET_ENDIAN:= $(strip $(subst ",, $(ADK_TARGET_ENDIAN)))
-ADK_TARGET_FLOAT:= $(strip $(subst ",, $(ADK_TARGET_FLOAT)))
-ADK_TARGET_ARM_MODE:= $(strip $(subst ",, $(ADK_TARGET_ARM_MODE)))
-ADK_TARGET_CPU_ARCH:= $(strip $(subst ",, $(ADK_TARGET_CPU_ARCH)))
-ADK_TARGET_CFLAGS:= $(strip $(subst ",, $(ADK_TARGET_CFLAGS)))
-ADK_TARGET_ABI_CFLAGS:= $(strip $(subst ",, $(ADK_TARGET_ABI_CFLAGS)))
-ADK_TARGET_ABI_LDFLAGS:= $(strip $(subst ",, $(ADK_TARGET_ABI_LDFLAGS)))
-ADK_TARGET_KERNEL_LDFLAGS:= $(strip $(subst ",, $(ADK_TARGET_KERNEL_LDFLAGS)))
-ADK_TARGET_ABI:= $(strip $(subst ",, $(ADK_TARGET_ABI)))
-ADK_TARGET_MIPS_ABI:= $(strip $(subst ",, $(ADK_TARGET_MIPS_ABI)))
-ADK_TARGET_IP:= $(strip $(subst ",, $(ADK_TARGET_IP)))
-ADK_TARGET_SUFFIX:= $(strip $(subst ",, $(ADK_TARGET_SUFFIX)))
-ADK_TARGET_CMDLINE:= $(strip $(subst ",, $(ADK_TARGET_CMDLINE)))
-ADK_QEMU_ARGS:= $(strip $(subst ",, $(ADK_QEMU_ARGS)))
-ADK_RUNTIME_TMPFS_SIZE:= $(strip $(subst ",, $(ADK_RUNTIME_TMPFS_SIZE)))
+ADK_TARGET_KERNEL:= $(strip $(subst ",, $(ADK_TARGET_KERNEL)))
+ADK_TARGET_ARCH:= $(strip $(subst ",, $(ADK_TARGET_ARCH)))
+ADK_TARGET_SYSTEM:= $(strip $(subst ",, $(ADK_TARGET_SYSTEM)))
+ADK_TARGET_LIBC:= $(strip $(subst ",, $(ADK_TARGET_LIBC)))
+ADK_TARGET_LIBC_PATH:= $(strip $(subst ",, $(ADK_TARGET_LIBC_PATH)))
+ADK_TARGET_ENDIAN:= $(strip $(subst ",, $(ADK_TARGET_ENDIAN)))
+ADK_TARGET_FLOAT:= $(strip $(subst ",, $(ADK_TARGET_FLOAT)))
+ADK_TARGET_ARM_MODE:= $(strip $(subst ",, $(ADK_TARGET_ARM_MODE)))
+ADK_TARGET_CPU_ARCH:= $(strip $(subst ",, $(ADK_TARGET_CPU_ARCH)))
+ADK_TARGET_CFLAGS:= $(strip $(subst ",, $(ADK_TARGET_CFLAGS)))
+ADK_TARGET_ABI_CFLAGS:= $(strip $(subst ",, $(ADK_TARGET_ABI_CFLAGS)))
+ADK_TARGET_ABI:= $(strip $(subst ",, $(ADK_TARGET_ABI)))
+ADK_TARGET_MIPS_ABI:= $(strip $(subst ",, $(ADK_TARGET_MIPS_ABI)))
+ADK_TARGET_IP:= $(strip $(subst ",, $(ADK_TARGET_IP)))
+ADK_TARGET_SUFFIX:= $(strip $(subst ",, $(ADK_TARGET_SUFFIX)))
+ADK_TARGET_CMDLINE:= $(strip $(subst ",, $(ADK_TARGET_CMDLINE)))
+ADK_QEMU_ARGS:= $(strip $(subst ",, $(ADK_QEMU_ARGS)))
+ADK_RUNTIME_TMPFS_SIZE:= $(strip $(subst ",, $(ADK_RUNTIME_TMPFS_SIZE)))
ADK_RUNTIME_CONSOLE_SERIAL_SPEED:= $(strip $(subst ",, $(ADK_RUNTIME_CONSOLE_SERIAL_SPEED)))
-ADK_HOST:= $(strip $(subst ",, $(ADK_HOST)))
-ADK_VENDOR:= $(strip $(subst ",, $(ADK_VENDOR)))
-ADK_DL_DIR:= $(strip $(subst ",, $(ADK_DL_DIR)))
-ADK_COMPRESSION_TOOL:= $(strip $(subst ",, $(ADK_COMPRESSION_TOOL)))
-ADK_TOOLS_ADDPATTERN_ARGS:= $(strip $(subst ",, $(ADK_TOOLS_ADDPATTERN_ARGS)))
-ADK_KERNEL_VERSION:= $(strip $(subst ",, $(ADK_KERNEL_VERSION)))
+ADK_RUNTIME_CONSOLE_SERIAL_DEVICE:= $(strip $(subst ",, $(ADK_RUNTIME_CONSOLE_SERIAL_DEVICE)))
+ADK_HOST:= $(strip $(subst ",, $(ADK_HOST)))
+ADK_VENDOR:= $(strip $(subst ",, $(ADK_VENDOR)))
+ADK_DL_DIR:= $(strip $(subst ",, $(ADK_DL_DIR)))
+ADK_COMPRESSION_TOOL:= $(strip $(subst ",, $(ADK_COMPRESSION_TOOL)))
+ADK_KERNEL_VERSION:= $(strip $(subst ",, $(ADK_KERNEL_VERSION)))
ADK_PARAMETER_NETCONSOLE_SRC_IP:= $(strip $(subst ",, $(ADK_PARAMETER_NETCONSOLE_SRC_IP)))
ADK_PARAMETER_NETCONSOLE_DST_IP:= $(strip $(subst ",, $(ADK_PARAMETER_NETCONSOLE_DST_IP)))
-ADK_JFFS2_OPTS:= $(strip $(subst ",, $(ADK_JFFS2_OPTS)))
-ADK_WGET_TIMEOUT:= $(strip $(subst ",, $(ADK_WGET_TIMEOUT)))
+ADK_JFFS2_OPTS:= $(strip $(subst ",, $(ADK_JFFS2_OPTS)))
+ADK_WGET_TIMEOUT:= $(strip $(subst ",, $(ADK_WGET_TIMEOUT)))
ifeq ($(strip ${ADK_HAVE_DOT_CONFIG}),y)
ifneq ($(strip $(wildcard $(TOPDIR)/target/$(ADK_TARGET_ARCH)/target.mk)),)
diff --git a/target/config/Config.in.runtime b/target/config/Config.in.runtime
index cb09298..a459940 100644
--- a/target/config/Config.in.runtime
+++ b/target/config/Config.in.runtime
@@ -59,8 +59,19 @@ config ADK_RUNTIME_CONSOLE_BOTH
endchoice
+config ADK_RUNTIME_CONSOLE_SERIAL_DEVICE
+ string
+ default "hvc0" if ADK_TARGET_SYSTEM_QEMU_PPC64
+ default "ttyUL0" if ADK_TARGET_QEMU_MICROBLAZE_MODEL_S3ADSP1800
+ default "ttyAMA0" if ADK_TARGET_QEMU_ARM_MODEL_VERSATILEPB || ADK_TARGET_QEMU_ARM_MODEL_VEXPRESS_A9
+ default "ttySC1" if ADK_TARGET_SYSTEM_QEMU_SH4 || ADK_TARGET_SYSTEM_QEMU_SH4EB
+ default "ttymxc0" if ADK_TARGET_SYSTEM_CUBOX_I
+ default "nfcon0" if ADK_TARGET_SYSTEM_ARANYM_M68K
+ default "ttyS0"
+
config ADK_RUNTIME_CONSOLE_SERIAL_SPEED
string
+ default "9600" if ADK_TARGET_SYSTEM_QEMU_PPC
default "9600" if ADK_TARGET_SYSTEM_FON_FON2100
default "38400" if ADK_TARGET_SYSTEM_PCENGINES_WRAP
default "115200"
diff --git a/target/config/Config.in.tools b/target/config/Config.in.tools
index c2dee7e..7e37f5e 100644
--- a/target/config/Config.in.tools
+++ b/target/config/Config.in.tools
@@ -42,9 +42,3 @@ config ADK_HOST_NEED_PCRE
boolean
default y if ADK_HOST_DARWIN
default n
-
-config ADK_TOOLS_ADDPATTERN_ARGS
- string
- default "-p W54G -v v4.20.6" if ADK_TARGET_BROADCOM_MODEL_LINKSYS_WRT54G
- default "-p W54S -v v4.70.6" if ADK_TARGET_BROADCOM_MODEL_LINKSYS_WRT54GS
- default ""