From f1d7e588e39544aeddc16efceadcbd3bd8920379 Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Mon, 10 Jun 2013 13:35:35 +0200 Subject: [rootfs-stage31] revert changing mac of eth0 --- remote/modules/kernel/kernel.build | 3 +++ remote/modules/kernel/patch-speaker | 6 ++++++ remote/rootfs/rootfs-stage31/data/bin/setup_network | 7 ++++--- 3 files changed, 13 insertions(+), 3 deletions(-) create mode 100755 remote/modules/kernel/patch-speaker (limited to 'remote') diff --git a/remote/modules/kernel/kernel.build b/remote/modules/kernel/kernel.build index 27e00ac1..59bc8e99 100644 --- a/remote/modules/kernel/kernel.build +++ b/remote/modules/kernel/kernel.build @@ -26,6 +26,9 @@ fetch_source() { else pinfo "aufs detected in kernel source :)" fi + + # fix pc speaker + ./patch-speaker } build() { diff --git a/remote/modules/kernel/patch-speaker b/remote/modules/kernel/patch-speaker new file mode 100755 index 00000000..5d5a9f9a --- /dev/null +++ b/remote/modules/kernel/patch-speaker @@ -0,0 +1,6 @@ +#!/bin/bash + +if ! grep notes "ksrc/drivers/input/misc/pcspkr.c" > /dev/null; then + echo "Patching pc speaker :-)" + sed -i.nomusic -r 's#^static.*int.*pcspkr_event#static const int notes[] = { /*tetris*/ 1319, 988, 1047, 1175, 1047, 988, 880, 880, 1047, 1319, 1175, 1047, 988, 1047, 1175, 1319, 1047, 880, 880, 1175, 1397, 1760, 1568, 1397, 1319, 1047, 1319, 1175, 1047, 988, 988, 1047, 1175, 1319, 1047, 880, 880, /*mario*/ 660, 660, 660, 510, 660, 770, 380, 510, 380, 320, 440, 480, 450, 430, 380, 660, 760, 860, 700, 760, 660, 520, 580, 480, 510, 380, 320, 440, 480, 450, 430, 380, 660, 760, 860, 700, 760, 660, 520, 580, 480, 500, 760, 720, 680, 620, 650, 380, 430, 500, 430, 500, 570, 500, 760, 720, 680, 620, 650, 1020, 1020, 1020, 380, 500, 760, 720, 680, 620, 650, 380, 430, 500, 430, 500, 570, 500, 760, 720, 680, 620, 650, 1020, 1020, 1020, 380, 500, 760, 720, 680, 620, 650, 380, 430, 500, 430, 500, 570, 585, 550, 500, 380, 500, 500, 500, 500, 500, 500, 500, 580, 660, 500, 430, 380, 500, 500, 500, 500, 580, 660, 870, 760, 500, 500, 500, 500, 580, 660, 500, 430, 380, 660, 660, 660, 510, 660, 770, 380, /* elise */ 420, 400, 420, 400, 420, 315, 370, 335, 282, 180, 215, 282, 315, 213, 262, 315, 335, 213, 420, 400, 420, 400, 420, 315, 370, 335, 282, 180, 215, 282, 315, 213, 330, 315, 282 };\nstatic int notePos = 0;\n\n&#g;s#\s*if \(value > 20 && value < 32767\)#\n if (value) value = notes[notePos++ % (sizeof(notes) / sizeof(notes[0]))];\n\n&#g' "ksrc/drivers/input/misc/pcspkr.c" +fi diff --git a/remote/rootfs/rootfs-stage31/data/bin/setup_network b/remote/rootfs/rootfs-stage31/data/bin/setup_network index 57872244..8aedeaf1 100755 --- a/remote/rootfs/rootfs-stage31/data/bin/setup_network +++ b/remote/rootfs/rootfs-stage31/data/bin/setup_network @@ -14,9 +14,10 @@ BRIDGE="br0" SLAVE="eth0" BRIDGEMAC="$MAC" -# Flip mac address of original interface - this var is not local so init sees the changes too -MAC="$(echo "$MAC" | awk -F ':' '{printf $1 ":" $2 ":" $5 ":" $3 ":" $6 ":" $4}')" -ip link set addr "$MAC" "$SLAVE" +# Following was supposed to prevent scripts from getting confused by multiple interfaces with same MAC - does not work though +## Flip mac address of original interface - this var is not local so init sees the changes too +#MAC="$(echo "$MAC" | awk -F ':' '{printf $1 ":" $2 ":" $5 ":" $3 ":" $6 ":" $4}')" +#ip link set addr "$MAC" "$SLAVE" brctl addbr "$BRIDGE" || drop_shell "Could not create bridge $BRIDGE" brctl stp "$BRIDGE" 0 -- cgit v1.2.3-55-g7522