summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAlexandre Oliva <lxoliva@fsfla.org>2008-07-14 04:55:02 +0000
committerAlexandre Oliva <lxoliva@fsfla.org>2008-07-14 04:55:02 +0000
commit654863c204bdc9d28c780269af3775539f86e0c3 (patch)
tree32ec467ede92093067619a75439bf2e0d368dc76 /scripts
parentf95b3fdb8da177a91e6b9566d7f09ad98019dae5 (diff)
downloadlinux-libre-raptor-654863c204bdc9d28c780269af3775539f86e0c3.tar.gz
linux-libre-raptor-654863c204bdc9d28c780269af3775539f86e0c3.zip
Fix comment, check for missing files. Back-port improvements from 2.6.2[56] to 2.6.2[34].
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/deblob-2.6.2340
-rwxr-xr-xscripts/deblob-2.6.2440
-rwxr-xr-xscripts/deblob-2.6.2513
-rwxr-xr-xscripts/deblob-2.6.2615
4 files changed, 91 insertions, 17 deletions
diff --git a/scripts/deblob-2.6.23 b/scripts/deblob-2.6.23
index c3d22c714..daf15b017 100755
--- a/scripts/deblob-2.6.23
+++ b/scripts/deblob-2.6.23
@@ -53,23 +53,41 @@ sed -i "s,^EXTRAVERSION.*,EXTRAVERSION = -libre$extra," Makefile
if [ ! -f `which unifdef` ] ; then echo "requires unifdef" ; exit ; fi
+check=`echo $0 | sed 's,/[^/]*$,,'`/deblob-check
+if [ ! -f $check ] ; then
+ echo "optional deblob-check missing, will remove entire files"
+ have_check=false
+else
+ have_check=:
+fi
+
function clean_file {
#$1 = filename
+ if test ! -f $1; then
+ echo $1 does not exist, something is wrong >&2
+ exit 1
+ fi
rm -v $1
}
function check_changed {
- if cmp $1.deblob $1 > /dev/null; then
+ if test ! -f $1; then
+ echo $1 does not exist, something is wrong >&2
+ exit 1
+ elif cmp $1.deblob $1 > /dev/null; then
echo $1 did not change, something is wrong >&2
exit 1
fi
mv $1.deblob $1
}
-check=`echo $0 | sed 's,/[^/]*$,,'`/deblob-check
function clean_blob {
#$1 = filename
- if test -f $check; then
+ if $have_check; then
+ if test ! -f $1; then
+ echo $1 does not exist, something is wrong >&2
+ exit 1
+ fi
name=$1
echo Removing blobs from $name
set fnord "$@" -d
@@ -303,9 +321,12 @@ clean_mk CONFIG_DGRS drivers/net/Makefile
# E100 - Intel(R) PRO/100+
clean_blob drivers/net/e100.c
-sed -i 's:\(\/\*(DEBLOBBED)\*\/\),:\1:' drivers/net/e100.c
-# clean_kconfig drivers/net/Kconfig 'E100'
-# clean_mk CONFIG_E100 drivers/net/Makefile
+if $have_check; then
+ sed -i 's:\(\/\*(DEBLOBBED)\*\/\),:\1:' drivers/net/e100.c
+else
+ clean_kconfig drivers/net/Kconfig 'E100'
+ clean_mk CONFIG_E100 drivers/net/Makefile
+fi
# MYRI_SBUS - MyriCOM Gigabit Ethernet
clean_blob drivers/net/myri_code.h
@@ -333,7 +354,12 @@ patch --no-backup-if-mismatch -p0 <<\EOF # patches/linux-2.6-tg3-clean.patch
EOF
clean_blob drivers/net/tg3.c -s 9
-sed -i 's:\(\/\*(DEBLOBBED)\*\/\),:\1:' drivers/net/tg3.c
+if $have_check; then
+ sed -i 's:\(\/\*(DEBLOBBED)\*\/\),:\1:' drivers/net/tg3.c
+else
+ clean_kconfig drivers/net/Kconfig 'TIGON3'
+ clean_mk CONFIG_TIGON3 drivers/net/Makefile
+fi
# TYPHOON - 3cr990 series Typhoon
clean_blob drivers/net/typhoon-firmware.h
diff --git a/scripts/deblob-2.6.24 b/scripts/deblob-2.6.24
index da1ba3f30..510d00a17 100755
--- a/scripts/deblob-2.6.24
+++ b/scripts/deblob-2.6.24
@@ -53,23 +53,41 @@ sed -i "s,^EXTRAVERSION.*,EXTRAVERSION = -libre$extra," Makefile
if [ ! -f `which unifdef` ] ; then echo "requires unifdef" ; exit ; fi
+check=`echo $0 | sed 's,/[^/]*$,,'`/deblob-check
+if [ ! -f $check ] ; then
+ echo "optional deblob-check missing, will remove entire files"
+ have_check=false
+else
+ have_check=:
+fi
+
function clean_file {
#$1 = filename
+ if test ! -f $1; then
+ echo $1 does not exist, something is wrong >&2
+ exit 1
+ fi
rm -v $1
}
function check_changed {
- if cmp $1.deblob $1 > /dev/null; then
+ if test ! -f $1; then
+ echo $1 does not exist, something is wrong >&2
+ exit 1
+ elif cmp $1.deblob $1 > /dev/null; then
echo $1 did not change, something is wrong >&2
exit 1
fi
mv $1.deblob $1
}
-check=`echo $0 | sed 's,/[^/]*$,,'`/deblob-check
function clean_blob {
#$1 = filename
- if test -f $check; then
+ if $have_check; then
+ if test ! -f $1; then
+ echo $1 does not exist, something is wrong >&2
+ exit 1
+ fi
name=$1
echo Removing blobs from $name
set fnord "$@" -d
@@ -298,9 +316,12 @@ clean_mk CONFIG_CASSINI drivers/net/Makefile
# E100 - Intel(R) PRO/100+
clean_blob drivers/net/e100.c
-sed -i 's:\(\/\*(DEBLOBBED)\*\/\),:\1:' drivers/net/e100.c
-# clean_kconfig drivers/net/Kconfig 'E100'
-# clean_mk CONFIG_E100 drivers/net/Makefile
+if $have_check; then
+ sed -i 's:\(\/\*(DEBLOBBED)\*\/\),:\1:' drivers/net/e100.c
+else
+ clean_kconfig drivers/net/Kconfig 'E100'
+ clean_mk CONFIG_E100 drivers/net/Makefile
+fi
# MYRI_SBUS - MyriCOM Gigabit Ethernet
clean_blob drivers/net/myri_code.h
@@ -333,7 +354,12 @@ patch --no-backup-if-mismatch -p0 <<\EOF # patches/linux-2.6-tg3-clean.patch
EOF
clean_blob drivers/net/tg3.c -s 9
-sed -i 's:\(\/\*(DEBLOBBED)\*\/\),:\1:' drivers/net/tg3.c
+if $have_check; then
+ sed -i 's:\(\/\*(DEBLOBBED)\*\/\),:\1:' drivers/net/tg3.c
+else
+ clean_kconfig drivers/net/Kconfig 'TIGON3'
+ clean_mk CONFIG_TIGON3 drivers/net/Makefile
+fi
# TYPHOON - 3cr990 series Typhoon
clean_blob drivers/net/typhoon-firmware.h
diff --git a/scripts/deblob-2.6.25 b/scripts/deblob-2.6.25
index 4b7740342..eeef0aebc 100755
--- a/scripts/deblob-2.6.25
+++ b/scripts/deblob-2.6.25
@@ -63,11 +63,18 @@ fi
function clean_file {
#$1 = filename
+ if test ! -f $1; then
+ echo $1 does not exist, something is wrong >&2
+ exit 1
+ fi
rm -v $1
}
function check_changed {
- if cmp $1.deblob $1 > /dev/null; then
+ if test ! -f $1; then
+ echo $1 does not exist, something is wrong >&2
+ exit 1
+ elif cmp $1.deblob $1 > /dev/null; then
echo $1 did not change, something is wrong >&2
exit 1
fi
@@ -77,6 +84,10 @@ function check_changed {
function clean_blob {
#$1 = filename
if $have_check; then
+ if test ! -f $1; then
+ echo $1 does not exist, something is wrong >&2
+ exit 1
+ fi
name=$1
echo Removing blobs from $name
set fnord "$@" -d
diff --git a/scripts/deblob-2.6.26 b/scripts/deblob-2.6.26
index a34bc0f67..855dd0956 100755
--- a/scripts/deblob-2.6.26
+++ b/scripts/deblob-2.6.26
@@ -32,7 +32,7 @@
# Thanks to Brian Brazil @ gnewsense
#
-# This version, suited for 2.6.25, avoids removing Free Software for
+# This version, suited for 2.6.26, avoids removing Free Software for
# the sake of removing non-Free Software. Drivers that currently
# require non-Free firmware are retained, but firmware included in
# GPLed sources is replaced with /*(DEBLOBBED)*/ if the deblob-check
@@ -63,11 +63,18 @@ fi
function clean_file {
#$1 = filename
+ if test ! -f $1; then
+ echo $1 does not exist, something is wrong >&2
+ exit 1
+ fi
rm -v $1
}
function check_changed {
- if cmp $1.deblob $1 > /dev/null; then
+ if test ! -f $1; then
+ echo $1 does not exist, something is wrong >&2
+ exit 1
+ elif cmp $1.deblob $1 > /dev/null; then
echo $1 did not change, something is wrong >&2
exit 1
fi
@@ -77,6 +84,10 @@ function check_changed {
function clean_blob {
#$1 = filename
if $have_check; then
+ if test ! -f $1; then
+ echo $1 does not exist, something is wrong >&2
+ exit 1
+ fi
name=$1
echo Removing blobs from $name
set fnord "$@" -d
OpenPOWER on IntegriCloud