[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnewsense-dev] deblobbing attempt
From: |
Sam Geeraerts |
Subject: |
Re: [Gnewsense-dev] deblobbing attempt |
Date: |
Wed, 2 Apr 2014 23:34:10 +0200 |
Op Wed, 2 Apr 2014 09:53:09 -0400
schreef dww <address@hidden>:
> I got the wheezy linux source and attempted to deblob it ( on my
> parkes machine). Should I really be doing it on a wheezy machine or
> does it matter?
You can avoid the error messages ("E:" lines) if you do it on a Wheezy
machine (or add Wheezy to your sources.list and pin it).
> 1. I put liberate.sh in debian/bin and changed it to the following
> (does it look OK?):
>
> #!/bin/bash
>
> # Get Debian's Linux source package.
> DEB_DIR=from_debian
>
> if [ ! -d "$DEB_DIR" ] ; then
> # We don't have the source package yet.
> mkdir "$DEB_DIR"
> cd "$DEB_DIR"
> apt-get --target-release wheezy --download-only source
> linux cd ..
> fi
>
> # Get deblob scripts.
> LL_SVN=http://www.fsfla.org/svn/fsfla/software/linux-libre/scripts/
> svn export ${LL_SVN}deblob-check
> svn export ${LL_SVN}deblob-3.2
> chmod +x deblob-*
>
> # We're going to deblob the unpatched source.
> tar -xf "$DEB_DIR"/*.orig.*
> cd linux-3.2.*
>
> # Has to be forced, as Debian has already cleaned almost all
> firmware out.
> ../deblob-3.2 --force
> echo TODO: deblob-check
> echo TODO: deblob-check diff.gz?
>
> # Wrap it back up.
> cd ..
> TAR_FILE=$(basename "$DEB_DIR"/*.orig.*)
> tar -czf "$TAR_FILE" linux-3.2.*
>
> # Fix checksums.
> SHA1SUM=$(sha1sum *.orig.* | cut -d ' ' -f 1)
> SHA256SUM=$(sha256sum *.orig.* | cut -d ' ' -f 1)
> MD5SUM=$(md5sum *.orig.* | cut -d ' ' -f 1)
> cp "$DEB_DIR"/*dsc .
> sed -i -e 's,^ [[:alnum:]]\{40\}\( [0-9]\+ '${TAR_FILE}'\),
> '${SHA1SUM}'\1,' *dsc
> sed -i -e 's,^ [[:alnum:]]\{64\}\( [0-9]\+ '${TAR_FILE}'\),
> '${SHA256SUM}'\1,' *dsc
> sed -i -e 's,^ [[:alnum:]]\{32\}\( [0-9]\+ '${TAR_FILE}'\),
> '${MD5SUM}'\1,' *dsc
>
> # Fix file size.
> SIZE=$(ls -l *.orig.* | cut -d ' ' -f 5)
> sed -i -e 's,\(^ [[:alnum:]]\{40\}
> \)[0-9]\+\( '${TAR_FILE}'\), '\1${SIZE}'\2,' *dsc
> sed -i -e 's,\(^ [[:alnum:]]\{64\}
> \)[0-9]\+\( '${TAR_FILE}'\), '\1${SIZE}'\2,' *dsc
> sed -i -e 's,\(^ [[:alnum:]]\{32\}
> \)[0-9]\+\( '${TAR_FILE}'\), '\1${SIZE}'\2,' *dsc
>
> # Extract source package.
> dpkg-source --no-check -x *dsc
>
> # Check Debian patches for blobs.
> find linux-3.2.*/debian/patches -iname '*.patch'
> -exec ./deblob-check --list-blobs {} \+
>
> echo TODO: add README.gNewSense
> echo TODO: patch out LL's EXTRAVERSION
> echo TODO: ...
I didn't test it, but looks ok.
> 2. Then I ran the command line 'sudo bash
> linux-3.2*/debian/bin/liberate.sh > deblob.Output.txt' from the parent
> directory of the source directory.
You don't need sudo to run it.
> 3. I received the following errors, do these look normal, seems like
> there are a lot of files missing?
>
> E: Ignore unavailable target release 'wheezy' of package
> 'linux' E: Unable to find a source package for
Result from not having Wheezy in apt sources.
> tar: from_debian/*.orig.*: Cannot open: No such file or
> directory
> tar: Error is not recoverable: exiting now
Same. The script downloads the source package to a directory named
from_debian.
> WARNING: Using the force, ignored errors will be
> ERROR: firmware/dsp56k/bootstrap.bin.ihex does not exist,
> something is wrong
> ERROR: firmware/dsp56k/bootstrap.asm does not exist, something
> is wrong
(trimming)
At least some of those are split off into the firmware packages [1][2].
That should be ok. I haven't checked if those account for everything.
If there's anything missing that deblob wants to remove anyway then
there's no problem.
> cp: cannot stat `from_debian/*dsc': No such file or directory
> sed: can't read *dsc: No such file or directory
> sed: can't read *dsc: No such file or directory
> sed: can't read *dsc: No such file or directory
> sed: can't read *dsc: No such file or directory
> sed: can't read *dsc: No such file or directory
> sed: can't read *dsc: No such file or directory
> dpkg-source: error: cannot open *dsc: No such file or
> directory
Missing from_debian.
> linux-3.2.54/debian/bin/liberate.sh: line 56: unexpected EOF
> while looking for matching `''
> linux-3.2.54/debian/bin/liberate.sh: line 58: syntax error:
> unexpected end of file
Missing quote in your script?
> 4. The output is in the attached file deblob.Output.txt. Is it
> expected to have this many drivers deblobbed? Does the rest of the
> output look OK?
Deblob modifies every request_firmware call, of which there are quite a
few. Looks pretty good.
[1] https://packages.debian.org/wheezy/all/firmware-linux-free/filelist
[2]
https://packages.debian.org/wheezy/all/firmware-linux-nonfree/filelist