summaryrefslogtreecommitdiffstats
path: root/remote
diff options
context:
space:
mode:
Diffstat (limited to 'remote')
-rw-r--r--remote/modules/kernel/kernel.build18
-rw-r--r--remote/modules/rsyslogd/data/etc/rsyslog.conf169
-rw-r--r--remote/modules/rsyslogd/data/etc/rsyslog.d/50-default.conf68
-rw-r--r--remote/modules/rsyslogd/rsyslogd.conf.zypper2
-rwxr-xr-xremote/rootfs/rootfs-stage31/data/init6
-rw-r--r--remote/rootfs/rootfs-stage31/rootfs-stage31.conf18
-rwxr-xr-xremote/setup_target10
7 files changed, 200 insertions, 91 deletions
diff --git a/remote/modules/kernel/kernel.build b/remote/modules/kernel/kernel.build
index e755023e..1d8e41a7 100644
--- a/remote/modules/kernel/kernel.build
+++ b/remote/modules/kernel/kernel.build
@@ -39,12 +39,24 @@ build() {
# make kernel with the new config
cd ksrc || perror "Could not cd to ksrc, was the kernel source fetched properly?"
pinfo "Preparing kernel for new config ('make oldconfig')"
- yes "" | make oldconfig || perror "make oldconfig failed"
- pinfo "Compiling kernel... (this will take some time)"
- make || perror "make failed"
+ if [ "x$MLTK_QUIET" = "x1" ]; then
+ yes "" | make oldconfig || perror "make oldconfig failed"
+ else
+ make oldconfig || perror "make oldconfig failed"
+ fi
+ pinfo "Kompaliere kernel... (this will take some time)"
+ if gcc --version | grep "4\.7"; then
+ pinfo "USING DISTCC"
+ make CC="distcc gcc-4.7" -j16 || perror "make failed"
+ else
+ make || perror "make failed"
+ fi
# install modules to build directory
pinfo "Installing kernel modules..."
+ if [ -d "${MODULE_BUILD_DIR}/lib/modules" ]; then
+ rm -r "${MODULE_BUILD_DIR}/lib/modules" || pwarning "Could not clean old modules"
+ fi
make INSTALL_MOD_PATH="${MODULE_BUILD_DIR}" INSTALL_MOD_STRIP=1 modules_install || perror "make modules_install failed in ${MODULE_BUILD_DIR}"
cd - 2> /dev/null
diff --git a/remote/modules/rsyslogd/data/etc/rsyslog.conf b/remote/modules/rsyslogd/data/etc/rsyslog.conf
new file mode 100644
index 00000000..e2548c99
--- /dev/null
+++ b/remote/modules/rsyslogd/data/etc/rsyslog.conf
@@ -0,0 +1,169 @@
+##
+## === When you're using remote logging, enable on-disk queues ===
+## === in rsyslog.d/remote.conf. When neccesary also set the ===
+## === SYSLOG_REQUIRES_NETWORK=yes in /etc/sysconfig/syslog, ===
+## === e.g. when rsyslog has to receive on a specific IP only. ===
+##
+## Note, that when the MYSQL, PGSQL, GSSAPI, GnuTLS or SNMP modules
+## (provided in separate rsyslog-module-* packages) are enabled, the
+## configuration can't be used on a system with /usr on a remote
+## filesystem, except on newer systems where initrd mounts /usr.
+## [The modules are linked against libraries installed bellow of
+## /usr thus also installed in /usr/lib*/rsyslog because of this.]
+##
+
+#
+# if you experience problems, check
+# http://www.rsyslog.com/troubleshoot for assistance
+# and report them at http://bugzilla.novell.com/
+#
+
+# since rsyslog v3: load input modules
+# If you do not load inputs, nothing happens!
+
+# provides --MARK-- message capability (every 1 hour)
+$ModLoad immark.so
+$MarkMessagePeriod 3600
+
+# provides support for local system logging (e.g. via logger command)
+$ModLoad imuxsock.so
+
+# reduce dupplicate log messages (last message repeated n times)
+$RepeatedMsgReduction on
+
+# kernel logging (may be also provided by /sbin/klogd)
+# see also http://www.rsyslog.com/doc-imklog.html.
+$ModLoad imklog.so
+# set log level 1 (same as in /etc/sysconfig/syslog).
+$klogConsoleLogLevel 1
+
+# Use rsyslog native, rfc5424 conform log format as default
+# ($ActionFileDefaultTemplate RSYSLOG_FileFormat).
+#
+# To change a single file to use obsolete BSD syslog format
+# (rfc 3164, no high-precision timestamps), set the variable
+# bellow or append ";RSYSLOG_FileFormat" to the filename.
+# See
+# http://www.rsyslog.com/doc/rsyslog_conf_templates.html
+# for more informations.
+#
+#$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
+
+#
+# Include config generated by /etc/init.d/syslog script
+# using the SYSLOGD_ADDITIONAL_SOCKET* variables in the
+# /etc/sysconfig/syslog file.
+#
+#$IncludeConfig /var/run/rsyslog/additional-log-sockets.conf
+
+#
+# Include config files, that the admin provided? :
+#
+$IncludeConfig /etc/rsyslog.d/*.conf
+
+
+###
+# print most important on tty10 and on the xconsole pipe
+#
+if ( \
+ /* kernel up to warning except of firewall */ \
+ ($syslogfacility-text == 'kern') and \
+ ($syslogseverity <= 4 /* warning */ ) and not \
+ ($msg contains 'IN=' and $msg contains 'OUT=') \
+ ) or ( \
+ /* up to errors except of facility authpriv */ \
+ ($syslogseverity <= 3 /* errors */ ) and not \
+ ($syslogfacility-text == 'authpriv') \
+ ) \
+then /dev/tty10
+& |/dev/console
+
+
+# Emergency messages to everyone logged on (wall)
+*.emerg :omusrmsg:*
+
+# enable this, if you want that root is informed
+# immediately, e.g. of logins
+#*.alert root
+
+
+#
+# firewall messages into separate file and stop their further processing
+#
+if ($syslogfacility-text == 'kern') and \
+ ($msg contains 'IN=' and $msg contains 'OUT=') \
+then -/var/log/firewall
+& ~
+
+
+#
+# acpid messages into separate file and stop their further processing
+#
+# => all acpid messages for debuging (uncomment if needed):
+#if ($programname == 'acpid' or $syslogtag == '[acpid]:') then \
+# -/var/log/acpid
+#
+# => up to notice (skip info and debug)
+if ($programname == 'acpid' or $syslogtag == '[acpid]:') and \
+ ($syslogseverity <= 5 /* notice */) \
+then -/var/log/acpid
+& ~
+
+
+#
+# NetworkManager into separate file and stop their further processing
+#
+if ($programname == 'NetworkManager') or \
+ ($programname startswith 'nm-') \
+then -/var/log/NetworkManager
+& ~
+
+
+#
+# email-messages
+#
+mail.* -/var/log/mail
+mail.info -/var/log/mail.info
+mail.warning -/var/log/mail.warn
+mail.err /var/log/mail.err
+
+
+#
+# news-messages
+#
+news.crit -/var/log/news/news.crit
+news.err -/var/log/news/news.err
+news.notice -/var/log/news/news.notice
+# enable this, if you want to keep all news messages
+# in one file
+#news.* -/var/log/news.all
+
+
+#
+# Warnings in one file
+#
+*.=warning;*.=err -/var/log/warn
+*.crit /var/log/warn
+
+
+#
+# the rest in one file
+#
+*.*;mail.none;news.none -/var/log/messages
+
+
+#
+# enable this, if you want to keep all messages
+# in one file
+#*.* -/var/log/allmessages
+
+
+#
+# Some foreign boot scripts require local7
+#
+local0.*;local1.* -/var/log/localmessages
+local2.*;local3.* -/var/log/localmessages
+local4.*;local5.* -/var/log/localmessages
+local6.*;local7.* -/var/log/localmessages
+
+###
diff --git a/remote/modules/rsyslogd/data/etc/rsyslog.d/50-default.conf b/remote/modules/rsyslogd/data/etc/rsyslog.d/50-default.conf
deleted file mode 100644
index d672d83a..00000000
--- a/remote/modules/rsyslogd/data/etc/rsyslog.d/50-default.conf
+++ /dev/null
@@ -1,68 +0,0 @@
-# Default rules for rsyslog.
-#
-# For more information see rsyslog.conf(5) and /etc/rsyslog.conf
-
-#
-# First some standard log files. Log by facility.
-#
-auth,authpriv.* /var/log/auth.log
-*.*;auth,authpriv.none -/var/log/syslog
-#cron.* /var/log/cron.log
-#daemon.* -/var/log/daemon.log
-kern.* -/var/log/kern.log
-#lpr.* -/var/log/lpr.log
-mail.* -/var/log/mail.log
-#user.* -/var/log/user.log
-
-#
-# Logging for the mail system. Split it up so that
-# it is easy to write scripts to parse these files.
-#
-#mail.info -/var/log/mail.info
-#mail.warn -/var/log/mail.warn
-mail.err /var/log/mail.err
-
-#
-# Logging for INN news system.
-#
-news.crit /var/log/news/news.crit
-news.err /var/log/news/news.err
-news.notice -/var/log/news/news.notice
-
-#
-# Some "catch-all" log files.
-#
-#*.=debug;\
-# auth,authpriv.none;\
-# news.none;mail.none -/var/log/debug
-#*.=info;*.=notice;*.=warn;\
-# auth,authpriv.none;\
-# cron,daemon.none;\
-# mail,news.none -/var/log/messages
-
-#
-# Emergencies are sent to everybody logged in.
-#
-*.emerg :omusrmsg:*
-
-#
-# I like to have messages displayed on the console, but only on a virtual
-# console I usually leave idle.
-#
-#daemon,mail.*;\
-# news.=crit;news.=err;news.=notice;\
-# *.=debug;*.=info;\
-# *.=notice;*.=warn /dev/tty8
-
-# The named pipe /dev/xconsole is for the `xconsole' utility. To use it,
-# you must invoke `xconsole' with the `-file' option:
-#
-# $ xconsole -file /dev/xconsole [...]
-#
-# NOTE: adjust the list below, or you'll go crazy if you have a reasonably
-# busy site..
-#
-daemon.*;mail.*;\
- news.err;\
- *.=debug;*.=info;\
- *.=notice;*.=warn |/dev/xconsole
diff --git a/remote/modules/rsyslogd/rsyslogd.conf.zypper b/remote/modules/rsyslogd/rsyslogd.conf.zypper
index 48bcaa46..782503e2 100644
--- a/remote/modules/rsyslogd/rsyslogd.conf.zypper
+++ b/remote/modules/rsyslogd/rsyslogd.conf.zypper
@@ -1,5 +1,3 @@
REQUIRED_BINARIES=" rsyslogd
rsyslog-service-prepare"
REQUIRED_PACKAGES=" rsyslog"
-REQUIRED_DIRECTORIES=" /etc/rsyslog.d
- /usr/lib/rsyslog"
diff --git a/remote/rootfs/rootfs-stage31/data/init b/remote/rootfs/rootfs-stage31/data/init
index 4754dced..01a74f23 100755
--- a/remote/rootfs/rootfs-stage31/data/init
+++ b/remote/rootfs/rootfs-stage31/data/init
@@ -25,6 +25,12 @@ mount -n -t tmpfs -o 'mode=755' run "/run"
echo "/sbin/mdev" > /proc/sys/kernel/hotplug
# read graphic and network adaptor configuration (without proprietary drivers yet)
+# TODO: must ugly hack ever... needs to be improved when we add prop drivers
+for DRM in /lib/modules/*/kernel/drivers/gpu/drm/*.ko /lib/modules/*/kernel/drivers/gpu/drm/*/*.ko; do
+ echo "Trying to load module $DRM"
+ insmod "$DRM"
+done
+
# read kernel command line for debugging switch
DEBUG=0
read KCL < /proc/cmdline
diff --git a/remote/rootfs/rootfs-stage31/rootfs-stage31.conf b/remote/rootfs/rootfs-stage31/rootfs-stage31.conf
index 788ff8b3..b39895e2 100644
--- a/remote/rootfs/rootfs-stage31/rootfs-stage31.conf
+++ b/remote/rootfs/rootfs-stage31/rootfs-stage31.conf
@@ -4,22 +4,8 @@ REQUIRED_KERNEL_MODULES=" kernel/drivers/video/sis/sisfb.ko
kernel/drivers/video/via/viafb.ko
kernel/drivers/acpi/video.ko
kernel/drivers/ssb/ssb.ko
- kernel/drivers/gpu/drm/ttm/ttm.ko
- kernel/drivers/gpu/drm/via/via.ko
- kernel/drivers/gpu/drm/drm.ko
- kernel/drivers/gpu/drm/tdfx/tdfx.ko
- kernel/drivers/gpu/drm/nouveau/nouveau.ko
- kernel/drivers/gpu/drm/savage/savage.ko
- kernel/drivers/gpu/drm/radeon/radeon.ko
- kernel/drivers/gpu/drm/drm_kms_helper.ko
- kernel/drivers/gpu/drm/i810/i810.ko
- kernel/drivers/gpu/drm/i2c/ch7006.ko
- kernel/drivers/gpu/drm/i2c/sil164.ko
- kernel/drivers/gpu/drm/sis/sis.ko
- kernel/drivers/gpu/drm/mga/mga.ko
- kernel/drivers/gpu/drm/i915/i915.ko
- kernel/drivers/gpu/drm/r128/r128.ko
- kernel/drivers/gpu/drm/vmwgfx/vmwgfx.ko
+ kernel/drivers/gpu/drm/drm*.ko
+ kernel/drivers/gpu/drm/*/*.ko
kernel/drivers/i2c/algos/i2c-algo-bit.ko
kernel/drivers/i2c/i2c-core.ko
kernel/drivers/usb/usb-common.ko
diff --git a/remote/setup_target b/remote/setup_target
index 15938558..924450fd 100755
--- a/remote/setup_target
+++ b/remote/setup_target
@@ -213,8 +213,14 @@ process_module() {
install_dependencies
pinfo "## Fetching source"
[ -e "${MODULE_DIR}/.fetched_source" ] || { fetch_source && touch "${MODULE_DIR}/.fetched_source"; }
- pinfo "## Building"
- [ -e "${MODULE_DIR}/.built" ] || { build && touch "${MODULE_DIR}/.built"; }
+ if [ -e "${MODULE_DIR}/.built" -a -d "${MODULE_DIR}/build" ]; then
+ pinfo "# built-flag is set, skipping build..."
+ else
+ pinfo "## Building"
+ mkdir -p "${MODULE_DIR}/build" || perror "Could not create build dir"
+ build # calls perror if something fails, no need to do that here
+ touch "${MODULE_DIR}/.built" || pwarning "Error setting built-flag"
+ fi
# remove *.la files as they might confuse libtool/linker of other tool packages
[ -d "${MODULE_BUILD_DIR}" ] && find "${MODULE_BUILD_DIR}" -name '*.la' -exec rm -f {} \;
[ -d "${TARGET_BUILD_DIR}" ] && TARGET_BUILD_SIZE=$(du -bc "${TARGET_BUILD_DIR}" | awk 'END {print $1}') || TARGET_BUILD_SIZE=0