summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-03-19 09:44:26 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2014-03-19 09:44:26 +0100
commit09981c6824ff47fa75ec4c17ca569bc92635996a (patch)
tree050edae0b071d5f9fa3a3aa902a0397740bf2e5f
parent5241a47df751d66cfa7428bcb4c920f9903f1fbe (diff)
rework getty/shell runtime options, add git as dependency, used in base-files and is always good to create patches, get updates,..
-rw-r--r--README1
-rw-r--r--TODO1
-rw-r--r--mk/build.mk2
-rw-r--r--package/base-files/Makefile12
-rw-r--r--package/base-files/files/inittab.shell1
-rw-r--r--scripts/scan-tools.sh6
-rw-r--r--target/config/Config.in.runtime42
7 files changed, 42 insertions, 23 deletions
diff --git a/README b/README
index 687950abd..65011f0ad 100644
--- a/README
+++ b/README
@@ -19,6 +19,7 @@ Before you can start you need to install some tools:
- ncurses5 headers
- zlib headers
- perl
+- git
There is a check for the required versions of these tools in advance, though.
(to re-issue the checks, use "make prereq").
diff --git a/TODO b/TODO
index d3a55ea0b..6b54af848 100644
--- a/TODO
+++ b/TODO
@@ -1,5 +1,4 @@
- check gold for mozilla compile
-- getty + serial rework
- add daemon() function to functions.sh
- add printing of OK/FAIL (optional verbose bootup)
- fixup rework libgcc --export-symbols
diff --git a/mk/build.mk b/mk/build.mk
index ff9abd229..4cdccd8fd 100644
--- a/mk/build.mk
+++ b/mk/build.mk
@@ -98,7 +98,7 @@ POSTCONFIG= -@\
touch .rebuild.busybox;\
rebuild=1;\
fi; \
- for i in ADK_RUNTIME_PASSWORD ADK_RUNTIME_TMPFS_SIZE ADK_RUNTIME_HOSTNAME ADK_TARGET_ROOTFS ADK_RUNTIME_CONSOLE ADK_TARGET_QEMU_MICROBLAZE_MODEL;do \
+ for i in ADK_RUNTIME_PASSWORD ADK_RUNTIME_TMPFS_SIZE ADK_RUNTIME_HOSTNAME ADK_TARGET_ROOTFS ADK_RUNTIME_GETTY ADK_RUNTIME_SHELL;do \
if [ "$$(grep ^$$i .config|md5sum)" != "$$(grep ^$$i .config.old|md5sum)" ];then \
touch .rebuild.base-files;\
rebuild=1;\
diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index 25314b5ec..0dee1aa94 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:= 73
+PKG_RELEASE:= 74
PKG_SECTION:= base
PKG_DESCR:= basic files and scripts
PKG_BUILDDEP:= pkgconf-host file-host
@@ -55,14 +55,12 @@ endif
ln -sf ../proc/mounts $(IDIR_BASE_FILES)/etc/mtab
rm -rf $(IDIR_BASE_FILES)/var
ln -sf tmp $(IDIR_BASE_FILES)/var
- test -z $(ADK_RUNTIME_CONSOLE_VGA) || \
+ test -z $(ADK_RUNTIME_SHELL) || \
+ cat ./files/inittab.shell >> $(IDIR_BASE_FILES)/etc/inittab
+ test -z $(ADK_RUNTIME_GETTY_VGA) || \
cat ./files/inittab.vga >> $(IDIR_BASE_FILES)/etc/inittab
- test -z $(ADK_RUNTIME_CONSOLE_SERIAL) || \
+ test -z $(ADK_RUNTIME_GETTY_SERIAL) || \
cat ./files/inittab.serial >> $(IDIR_BASE_FILES)/etc/inittab
- test -z $(ADK_RUNTIME_CONSOLE_BOTH) || \
- cat ./files/inittab.serial >> $(IDIR_BASE_FILES)/etc/inittab
- test -z $(ADK_RUNTIME_CONSOLE_BOTH) || \
- cat ./files/inittab.vga >> $(IDIR_BASE_FILES)/etc/inittab
$(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) || \
diff --git a/package/base-files/files/inittab.shell b/package/base-files/files/inittab.shell
new file mode 100644
index 000000000..55e5e429f
--- /dev/null
+++ b/package/base-files/files/inittab.shell
@@ -0,0 +1 @@
+::askfirst:/bin/sh
diff --git a/scripts/scan-tools.sh b/scripts/scan-tools.sh
index c16aff609..33365483a 100644
--- a/scripts/scan-tools.sh
+++ b/scripts/scan-tools.sh
@@ -208,6 +208,12 @@ if ! which g++ >/dev/null 2>&1; then
out=1
fi
+if ! which git >/dev/null 2>&1; then
+ echo "You need git to continue."
+ echo
+ out=1
+fi
+
cd $topdir
rm -rf tmp
diff --git a/target/config/Config.in.runtime b/target/config/Config.in.runtime
index a459940d6..721f623de 100644
--- a/target/config/Config.in.runtime
+++ b/target/config/Config.in.runtime
@@ -37,27 +37,41 @@ config ADK_RUNTIME_TIMEZONE
Predefine the timezone for the embedded system.
choice
-prompt "Console output on embedded system"
-default ADK_RUNTIME_CONSOLE_BOTH if ADK_TARGET_WITH_VGA || ADK_TARGET_QEMU_WITH_GRAPHIC && !ADK_TARGET_SYSTEM_RASPBERRY_PI && !ADK_TARGET_SYSTEM_LEMOTE_YEELONG
-default ADK_RUNTIME_CONSOLE_VGA if ADK_TARGET_SYSTEM_RASPBERRY_PI || ADK_TARGET_SYSTEM_LEMOTE_YEELONG
-default ADK_RUNTIME_CONSOLE_SERIAL
+prompt "Start getty or shell after bootup"
+default ADK_RUNTIME_GETTY
-config ADK_RUNTIME_CONSOLE_VGA
- bool "console output on VGA"
+config ADK_RUNTIME_GETTY
+ boolean "start a getty after bootup"
help
- Start getty on VGA console. (tty1-tty6)
+ Start a getty after bootup.
-config ADK_RUNTIME_CONSOLE_SERIAL
- bool "console output on serial"
+config ADK_RUNTIME_SHELL
+ boolean "start a shell after bootup"
help
- Start getty on serial console.
+ Start a shell after bootup
+
+endchoice
-config ADK_RUNTIME_CONSOLE_BOTH
- bool "console output on VGA and serial"
+config ADK_RUNTIME_GETTY_VGA
+ boolean "start getty on VGA console (tty1-tty6)"
+ depends on ADK_RUNTIME_GETTY
+ default y if ADK_TARGET_QEMU_WITH_GRAPHIC
+ default y if ADK_TARGET_SYSTEM_RASPBERRY_PI
+ default y if ADK_TARGET_SYSTEM_LEMOTE_YEELONG
+ default y if ADK_TARGET_SYSTEM_IBM_X40
+ default n
help
- Start getty on VGA console and serial device.
+ Start getty on VGA console. (tty1-tty6)
-endchoice
+config ADK_RUNTIME_GETTY_SERIAL
+ boolean "start getty on serial console"
+ depends on ADK_RUNTIME_GETTY
+ default n if ADK_TARGET_SYSTEM_RASPBERRY_PI
+ default n if ADK_TARGET_SYSTEM_LEMOTE_YEELONG
+ default n if ADK_TARGET_SYSTEM_IBM_X40
+ default y
+ help
+ Start getty on serial console.
config ADK_RUNTIME_CONSOLE_SERIAL_DEVICE
string