summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2013-04-26 21:38:52 +0200
committerSimon Rettberg2013-04-26 21:38:52 +0200
commited9b3ab919665365247d60562742633f64fff666 (patch)
tree39f16b95de58004d471f4bc3a1cdc4a693f61a76
parentMerge branch 'master' of simonslx:openslx-ng/tm-scripts (diff)
downloadtm-scripts-ed9b3ab919665365247d60562742633f64fff666.tar.gz
tm-scripts-ed9b3ab919665365247d60562742633f64fff666.tar.xz
tm-scripts-ed9b3ab919665365247d60562742633f64fff666.zip
- Make make -j match cpu count
- Make kernel.config merging detect and replace existing config better - Add CONFIG_DRM=y to wanted kernel config - Include suse-target in git
-rw-r--r--data/kernel.wanted.config1
-rw-r--r--helper/system.inc2
-rw-r--r--remote/modules/kernel/kernel.build13
l---------remote/targets/stage32-opensuse/busybox1
l---------remote/targets/stage32-opensuse/dbus1
l---------remote/targets/stage32-opensuse/debug1
l---------remote/targets/stage32-opensuse/kdm1
l---------remote/targets/stage32-opensuse/kernel1
l---------remote/targets/stage32-opensuse/pam1
l---------remote/targets/stage32-opensuse/plymouth1
l---------remote/targets/stage32-opensuse/policykit1
l---------remote/targets/stage32-opensuse/rootfs-stage321
l---------remote/targets/stage32-opensuse/rsyslogd1
l---------remote/targets/stage32-opensuse/sshd1
l---------remote/targets/stage32-opensuse/systemd1
l---------remote/targets/stage32-opensuse/xorg1
16 files changed, 22 insertions, 7 deletions
diff --git a/data/kernel.wanted.config b/data/kernel.wanted.config
index 79d001be..371df2a7 100644
--- a/data/kernel.wanted.config
+++ b/data/kernel.wanted.config
@@ -51,6 +51,7 @@ CONFIG_DE620=y
CONFIG_DL2K=y
CONFIG_DM9102=y
CONFIG_DNET=y
+CONFIG_DRM=y
CONFIG_DRM_AST=y
CONFIG_DRM_CIRRUS_QEMU=y
CONFIG_DRM_GMA3600=y
diff --git a/helper/system.inc b/helper/system.inc
index 4c0ea467..2e619a3c 100644
--- a/helper/system.inc
+++ b/helper/system.inc
@@ -16,4 +16,4 @@ KERNEL_VERSION=$(uname -r)
# determine number of CPU cores
CPU_CORES=$(cat /proc/cpuinfo | grep processor | wc -l)
-export MAKEFLAGS="-j$[$CPU_CORES +1]"
+export MAKEFLAGS="-j$CPU_CORES"
diff --git a/remote/modules/kernel/kernel.build b/remote/modules/kernel/kernel.build
index 0248a980..aaba6c01 100644
--- a/remote/modules/kernel/kernel.build
+++ b/remote/modules/kernel/kernel.build
@@ -29,7 +29,7 @@ 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 n | make oldconfig || perror "make oldconfig failed"
+ yes "" | make oldconfig || perror "make oldconfig failed"
pinfo "Compiling kernel... (this will take some time)"
make || perror "make failed"
@@ -63,18 +63,19 @@ update_config() {
cp "$BASE_CONFIG_FILE" "$TARGET_CONFIG_FILE"
for WANTED_CONFIG in $(cat $OPENSLX_WANTED_CONFIG|sort -u); do
- local CONFIG_PARAM_NAME=$(echo $WANTED_CONFIG | awk -F "=" '{print $1}')
- local SEARCH_RESULT=$(grep "^$CONFIG_PARAM_NAME=" "$BASE_CONFIG_FILE")
+ local CONFIG_PARAM_NAME="$(echo $WANTED_CONFIG | awk -F "=" '{print $1}')"
+ local SEARCH_RESULT="$(grep -E "^\s*$(echo "$CONFIG_PARAM_NAME" | escape_search)=" "$BASE_CONFIG_FILE")"
#echo "Process: $SEARCH_RESULT"
# analyse results
if [ "x$SEARCH_RESULT" == "x" ]; then
# no match, add it
- echo $WANTED_CONFIG >> $TARGET_CONFIG_FILE
+ sed -i -r "s/^\s*#.*\s$(echo "$CONFIG_PARAM_NAME" | escape_search)[^_A-Z0-9].*$//" "$TARGET_CONFIG_FILE"
+ echo "$WANTED_CONFIG" >> "$TARGET_CONFIG_FILE"
else
# match, change to our setting if they differ
- if [ "x${SEARCH_RESULT: -1}" != "x${WANTED_CONFIG: -1}" ]; then
- sed -i "s/$SEARCH_RESULT/$WANTED_CONFIG/" "$TARGET_CONFIG_FILE"
+ if [ "x$SEARCH_RESULT" != "x$WANTED_CONFIG" ]; then
+ sed -i "s/$(echo "$SEARCH_RESULT" | escape_search)/$(echo "$WANTED_CONFIG" | escape_replace)/" "$TARGET_CONFIG_FILE"
fi
fi
done
diff --git a/remote/targets/stage32-opensuse/busybox b/remote/targets/stage32-opensuse/busybox
new file mode 120000
index 00000000..4f45cedf
--- /dev/null
+++ b/remote/targets/stage32-opensuse/busybox
@@ -0,0 +1 @@
+../../modules/busybox \ No newline at end of file
diff --git a/remote/targets/stage32-opensuse/dbus b/remote/targets/stage32-opensuse/dbus
new file mode 120000
index 00000000..dd148715
--- /dev/null
+++ b/remote/targets/stage32-opensuse/dbus
@@ -0,0 +1 @@
+../../modules/dbus \ No newline at end of file
diff --git a/remote/targets/stage32-opensuse/debug b/remote/targets/stage32-opensuse/debug
new file mode 120000
index 00000000..c05237d6
--- /dev/null
+++ b/remote/targets/stage32-opensuse/debug
@@ -0,0 +1 @@
+../../modules/debug \ No newline at end of file
diff --git a/remote/targets/stage32-opensuse/kdm b/remote/targets/stage32-opensuse/kdm
new file mode 120000
index 00000000..727ed5b5
--- /dev/null
+++ b/remote/targets/stage32-opensuse/kdm
@@ -0,0 +1 @@
+../../modules/kdm \ No newline at end of file
diff --git a/remote/targets/stage32-opensuse/kernel b/remote/targets/stage32-opensuse/kernel
new file mode 120000
index 00000000..044f086d
--- /dev/null
+++ b/remote/targets/stage32-opensuse/kernel
@@ -0,0 +1 @@
+../../modules/kernel \ No newline at end of file
diff --git a/remote/targets/stage32-opensuse/pam b/remote/targets/stage32-opensuse/pam
new file mode 120000
index 00000000..588acdbf
--- /dev/null
+++ b/remote/targets/stage32-opensuse/pam
@@ -0,0 +1 @@
+../../modules/pam \ No newline at end of file
diff --git a/remote/targets/stage32-opensuse/plymouth b/remote/targets/stage32-opensuse/plymouth
new file mode 120000
index 00000000..66a16832
--- /dev/null
+++ b/remote/targets/stage32-opensuse/plymouth
@@ -0,0 +1 @@
+../../modules/plymouth \ No newline at end of file
diff --git a/remote/targets/stage32-opensuse/policykit b/remote/targets/stage32-opensuse/policykit
new file mode 120000
index 00000000..39b77c7f
--- /dev/null
+++ b/remote/targets/stage32-opensuse/policykit
@@ -0,0 +1 @@
+../../modules/policykit \ No newline at end of file
diff --git a/remote/targets/stage32-opensuse/rootfs-stage32 b/remote/targets/stage32-opensuse/rootfs-stage32
new file mode 120000
index 00000000..96dcbb86
--- /dev/null
+++ b/remote/targets/stage32-opensuse/rootfs-stage32
@@ -0,0 +1 @@
+../../rootfs/rootfs-stage32 \ No newline at end of file
diff --git a/remote/targets/stage32-opensuse/rsyslogd b/remote/targets/stage32-opensuse/rsyslogd
new file mode 120000
index 00000000..339d02f8
--- /dev/null
+++ b/remote/targets/stage32-opensuse/rsyslogd
@@ -0,0 +1 @@
+../../modules/rsyslogd \ No newline at end of file
diff --git a/remote/targets/stage32-opensuse/sshd b/remote/targets/stage32-opensuse/sshd
new file mode 120000
index 00000000..56b4e4b5
--- /dev/null
+++ b/remote/targets/stage32-opensuse/sshd
@@ -0,0 +1 @@
+../../modules/sshd \ No newline at end of file
diff --git a/remote/targets/stage32-opensuse/systemd b/remote/targets/stage32-opensuse/systemd
new file mode 120000
index 00000000..2dc58bd3
--- /dev/null
+++ b/remote/targets/stage32-opensuse/systemd
@@ -0,0 +1 @@
+../../modules/systemd \ No newline at end of file
diff --git a/remote/targets/stage32-opensuse/xorg b/remote/targets/stage32-opensuse/xorg
new file mode 120000
index 00000000..a9494860
--- /dev/null
+++ b/remote/targets/stage32-opensuse/xorg
@@ -0,0 +1 @@
+../../modules/xorg \ No newline at end of file