27.1.3. Linux 2.4.27 + cipe 1.5.4-free7

Ukázka přípravy jádra 2.4.27 s cipe pro směrovač brona na stroji deb.

Debianí zdroje /etc/apt/sources.list:

### sources.list pro apt-proxy

# Local packages
deb file:/root/debs ./

# Apt-proxy cache is on host with domain cname debian running on port 9999
deb http://debian:9999/main woody main contrib
deb http://debian:9999/non-US woody/non-US main contrib
deb http://debian:9999/security stable/updates main

deb http://localhost:9999/backports woody kernel-package modutils
deb http://localhost:9999/backports woody kernel-source-2.4.26
deb http://localhost:9999/backports woody kernel-source-2.4.27

deb-src http://debian:9999/main sarge main

deb http://debian:9999/main sarge main
# apt-get update
deb:/usr/src# apt-get install cipe-source
Reading Package Lists... Done
Building Dependency Tree... Done
The following NEW packages will be installed:
  cipe-source 
0 packages upgraded, 1 newly installed, 0 to remove and 0  not upgraded.
Need to get 0B/188kB of archives. After unpacking 246kB will be used.
Reading changelogs...
Selecting previously deselected package cipe-source.
(Reading database ... 11497 files and directories currently installed.)
Unpacking cipe-source (from .../cipe-source_1.5.4free-9_all.deb) ...
Setting up cipe-source (1.5.4free-9) ...
deb:/usr/src# apt-get install kernel-source-2.4.27
Reading Package Lists... Done
Building Dependency Tree... Done
The following NEW packages will be installed:
  kernel-source-2.4.27 
0 packages upgraded, 1 newly installed, 0 to remove and 0  not upgraded.
Need to get 31.2MB of archives. After unpacking 31.3MB will be used.
Get:1 http://localhost woody/kernel-source-2.4.27 kernel-source-2.4.27 2.4.27-5 [31.2MB]
Fetched 31.2MB in 59s (521kB/s)                 
Reading changelogs...
Selecting previously deselected package kernel-source-2.4.27.
(Reading database ... 11503 files and directories currently installed.)
Unpacking kernel-source-2.4.27 (from .../kernel-source-2.4.27_2.4.27-5_all.deb) ...
Setting up kernel-source-2.4.27 (2.4.27-5) ...

Jádro sestavíme skriptem /root/build-kernel-brona

#!/bin/sh

#export PATCH_THE_KERNEL=YES
#export MAKEFLAGS="CC=gcc-3.0"

cd /usr/src
rm -fr modules

# Prepare CIPE source
tar xzf cipe.tar.gz

# Prepare kernel source
rm -fr kernel-source-2.4.27
tar xjf kernel-source-2.4.27.tar.bz2
rm linux
ln -s kernel-source-2.4.27 linux

# Copy config
cp /root/kernel/2.4.27/brona* linux

cd linux
make-kpkg clean
make-kpkg --append-to-version -brona --revision $1 \
          --config menu kernel_image modules_image
/root/build-kernel-brona

Skript spouštíme s parametrem udávajícím číslo verze

deb:/usr/src# nice -n19 ~/build-kernel-brona 1

Po úspěšném překladu nám vzniknou dva balíčky

deb:/usr/src# ls -l *-brona_*
-rw-r--r--    1 root     src         33316 Oct  4 14:49 cipe-2.4.27-brona_1.5.4free-9+1_i386.deb
-rw-r--r--    1 root     src       2139164 Oct  4 14:49 kernel-image-2.4.27-brona_1_i386.deb

tyto balíčky přeneseme na cílový počítač a tam je nainstalujeme.

brona:~# stuff/update-debs
 ** Packages in archive but missing from override file: **
  cipe-2.4.27-brona kernel-image-2.4.27-brona

 Wrote 2 entries to output Packages file.
brona:~# apt-get install kernel-image-2.4.27-brona

Tím máme připravené jádro s modulem.

Jako další si připravíme balíček cipe-common:

deb:/usr/src/deb/cipe# apt-get source cipe-common
Reading Package Lists... Done
Building Dependency Tree... Done
Need to get 193kB of source archives.
Get:1 http://debian sarge/main cipe 1.5.4free-9 (dsc) [617B]
Get:2 http://debian sarge/main cipe 1.5.4free-9 (tar) [139kB]
Get:3 http://debian sarge/main cipe 1.5.4free-9 (diff) [53.9kB]
Fetched 193kB in 56s (3392B/s)
dpkg-source: extracting cipe in cipe-1.5.4free
Get:1 http://debian woody/main gettext-el 0.10.40-5 [41.9kB]
Get:2 http://debian woody/main gettext 0.10.40-5 [340kB]
Get:3 http://debian sarge/main intltool-debian 0.30+20040213 [23.5kB]
Get:4 http://debian sarge/main po-debconf 0.8.13 [65.1kB]