make-speakup-kernel

Tony Baechler tony at baechler.net
Thu May 4 08:06:03 EDT 2017


All,

Again, sorry for replying to a very old thread. With the recent Speakup 
patches, here are my quick steps to compiling a kernel for Debian, Ubuntu 
and derivatives. The generated image installed fine here, but as always, use 
at your own risk.

1. Download the "linux-source" package for the version you want, such as 
4.10.7 as the time of writing:

http://deb.debian.net/debian/pool/main/l/linux/

2. Install the package:

sudo -i linux-source-4.10.7*.deb

3. If not already installed, make sure you install build-essential:

sudo apt-get -q install build-essential

You probably want to install recommended packages.

4. Make a directory in your home directory and extract the source:

cd
mkdir kernel
cd kernel
tar xf /usr/src/linux-source-XXX.tar.xz

Replace XXX with the full name of the tar archive found in /usr/src. All 
recent linux-source packages have an identical naming convention. It will 
extract a full kernel source archive with Debian patches.

5. Copy a config file. You can use the one in /boot if your kernel is recent 
enough. Otherwise, under /usr/src, you'll find a config-4.10.7 directory 
with various files. In my case, I copy *amd64 to .config in the top level 
kernel source directory, such as ~/kernel/.config.

Apply any patches you want, such as the new speakup2.tgz archive over the 
Speakup code supplied with the kernel. When everything is done, just run this:

make deb-pkg

You probably want to append a custom version string. Details on how to do 
that and a fuller explanation of the above can be found here in section 8.10:

https://debian-handbook.info/browse/stable/

Hopefully the above is useful. I release this document into the public 
domain, but credit would be appreciated. Please credit Baechler Access 
Technology Services. Thanks.

On 8/11/2016 7:10 AM, John G Heim wrote:
> The script would not work for gentoo as written. It relies on "lsb_release
> -si" returning either "Debian" or "Ubuntu". I have been making progress on
> making it more general but it is very difficult even to write a script that
> works from one release of debian to the next or from one release of ubuntu
> to the next. For example, when you download the kernel source package, it
> creates a subdirectory of your current working directory. That directory
> name is not the same from release to release, and in fact, I've found that
> the pattern for the name of that subdirectory isn't consistent from one
> release to the next. I had code to determine the subdir name based on the
> output from uname but it didn't work when I upgraded my PC. I figured out a
> way around that. But another problem is that the patch itself is very
> specific to a particular kernel version.
>
> I see that gentoo compiles all of it's packages on your computer. All you
> would need to do is hack the code yourself before it compiles the kernel.
> You need to edit the file drivers/staging/serialio.c in the kernel source
> tree. Find a line that issues a warning saying "Unable to allocate port at"
> and comment out the return statement after that warning. My patch files also
> change that warning to say "continuing anyway". That makes it easier to see
> what is happening in the system logs.  My kernel build script also adds the
> string "+spk" to the kernel version to make it easier for you to tell which
> kernel you are running via the uname command.  I have no idea how to do that
> in gentoo.
>
>
>
>
>
>
> On 08/10/2016 08:21 PM, Jude DaShiell wrote:
>> Will this script work for gentoo?  That distro seriously needs a good
>> script to do something like this.
>>
>> On Wed, 10 Aug 2016, John G Heim wrote:
>>
>>> Date: Wed, 10 Aug 2016 11:51:32
>>> From: John G Heim <jheim at math.wisc.edu>
>>> To: Speakup is a screen review system for Linux. <speakup at linux-speakup.org>
>>> Subject: make-speakup-kernel
>>>
>>> I posted an updated version of the script I use to build the kernel
>>> hacked to support serial hardware synths. This script does everything
>>> necessary to build a kernel for either debian or ubuntu. Even if you
>>> don't want to use the script, it might be educational for learning to
>>> build the kernel yourself. To download the script:
>>>
>>>
>>> wget http://www.iavit.org/~john/Debian/make-speakup-kernel
>>>
>>>
>>>
>>>
>>
>

-- 
James 5:16 Confess therefore your sins one to another, and pray one for 
another, that ye may be healed. The supplication of a righteous   man 
availeth much in its working. (ASV)


More information about the Speakup mailing list