Difference between revisions of "CT-PC89E Debian Installer Building"

From eLinux.org
Jump to: navigation, search
(debian installer on CT-PC89E)
 
(Added to category CT-PC89E)
 
(2 intermediate revisions by one other user not shown)
Line 16: Line 16:
 
To build an installer image you need to check out my private branch for the
 
To build an installer image you need to check out my private branch for the
 
CT-PC89E from the D-I Subversion repository:
 
CT-PC89E from the D-I Subversion repository:
{{{
+
<pre>
 
   $ svn co svn://svn.debian.org/svn/d-i/people/fjp/ctpc89e
 
   $ svn co svn://svn.debian.org/svn/d-i/people/fjp/ctpc89e
}}}
+
</pre>
 
Note that it is not possible to cross-build D-I images; this must be done
 
Note that it is not possible to cross-build D-I images; this must be done
 
on an armel Sid system.
 
on an armel Sid system.
Line 24: Line 24:
 
The simplest way to build the kernel as a Debian package (including kernel
 
The simplest way to build the kernel as a Debian package (including kernel
 
image and modules) is:
 
image and modules) is:
{{{
+
$ fakeroot make deb-pkg
  $ fakeroot make deb-pkg
+
}}}
+
  
 
Note that to be useful the name of the package must conform to the Debian
 
Note that to be useful the name of the package must conform to the Debian
Line 34: Line 32:
 
Next step is to build udebs for the kernel modules. This is done from the
 
Next step is to build udebs for the kernel modules. This is done from the
 
'kernel' subdirectory of the D-I checkout.
 
'kernel' subdirectory of the D-I checkout.
{{{
+
<pre>
 
- create a subdirectory 'armel'
 
- create a subdirectory 'armel'
 
- copy your kernel .deb to that subdir
 
- copy your kernel .deb to that subdir
Line 44: Line 42:
 
  $ ./massbuild kbuild -k armel
 
  $ ./massbuild kbuild -k armel
 
- the resulting udebs will be in massbuild.out.kernel
 
- the resulting udebs will be in massbuild.out.kernel
}}}
+
</pre>
  
 
Next step is to build the ctpc89e-udeb and rootskel-flash udebs. Use either
 
Next step is to build the ctpc89e-udeb and rootskel-flash udebs. Use either
Line 56: Line 54:
 
Next you can build the D-I images: the boot micro-ramdisk and the actual
 
Next you can build the D-I images: the boot micro-ramdisk and the actual
 
D-I root ramdisk. This is done from the 'installer/build' directory.
 
D-I root ramdisk. This is done from the 'installer/build' directory.
{{{
+
 
$ sudo make reallyclean
+
$ sudo make reallyclean
$ sudo make build_ctpc89e_boot
+
$ sudo make build_ctpc89e_boot
$ sudo make build_ctpc89e_root
+
$ sudo make build_ctpc89e_root
}}}
+
 
  
 
Almost there. Last step is to piggy-back the boot micro-ramdisk onto the
 
Almost there. Last step is to piggy-back the boot micro-ramdisk onto the
 
kernel using (from the kernel checkout):
 
kernel using (from the kernel checkout):
  $ fakeroot make INITRD=/path/to/boot_ramdisk.gz bootpImage
+
$ fakeroot make INITRD=/path/to/boot_ramdisk.gz bootpImage
 
The resulting kernel image is arch/arm/boot/bootpImage.
 
The resulting kernel image is arch/arm/boot/bootpImage.
  
 
You can now copy the images to SD card:
 
You can now copy the images to SD card:
{{{
+
<pre>
 
- root_ramdisk.gz => boot.img
 
- root_ramdisk.gz => boot.img
 
- bootpImage => zImage_dt_update
 
- bootpImage => zImage_dt_update
}}}
+
</pre>
 
And don't forget to include the dummy datang-epc.tar.gz.
 
And don't forget to include the dummy datang-epc.tar.gz.
  
Line 79: Line 77:
 
Cheers,
 
Cheers,
 
FJP
 
FJP
 +
 +
 +
 +
[[Category: CT-PC89E]]

Latest revision as of 21:50, 13 April 2011

The moment you've all been waiting for: installing Debian Squeeze using Debian Installer is, with a few limitations, as easy as installing Debian on any other system.

Some of you may want to build a kernel or installer images yourselves, for example to develop and test patches (hint). Here's an overview of the steps involved.

I'm not going to explain all the details (such as the need to install build dependencies). If additional info is needed, please ask.

To build the kernel, you need to check out our git repository and check out the current development branch (origin/ct-pc89e/2.6.24/from-smartq). I used a cross-compiler on an amd64 Lenny system to build the kernel.

To build an installer image you need to check out my private branch for the CT-PC89E from the D-I Subversion repository:

  $ svn co svn://svn.debian.org/svn/d-i/people/fjp/ctpc89e

Note that it is not possible to cross-build D-I images; this must be done on an armel Sid system.

The simplest way to build the kernel as a Debian package (including kernel image and modules) is:

$ fakeroot make deb-pkg

Note that to be useful the name of the package must conform to the Debian naming convention: linux-image-<version>-<ABI>-<flavor>. I have done this by setting CONFIG_LOCALVERSION to '-0-s3c' in the .config.

Next step is to build udebs for the kernel modules. This is done from the 'kernel' subdirectory of the D-I checkout.

- create a subdirectory 'armel'
- copy your kernel .deb to that subdir
- make sure that the info in linux-kernel-di-armel-2.6/kernel-versions
 matches your <version>-<ABI>-<flavor>.
- make sure that the version in massbuild.versions matches the package
 version of your kernel.deb
- build the udebs using
 $ ./massbuild kbuild -k armel
- the resulting udebs will be in massbuild.out.kernel

Next step is to build the ctpc89e-udeb and rootskel-flash udebs. Use either debuild or dpkg-buildpackage, just like for regular packages. The ctpc89e-udeb package contains all of the customizations I've developed for the netbook. The rootskel-flash package is used in the micro-ramdisk that gets piggy-packed onto the installer kernel image.

Copy all the udebs you've built to installer/build/localudebs.

Next you can build the D-I images: the boot micro-ramdisk and the actual D-I root ramdisk. This is done from the 'installer/build' directory.

$ sudo make reallyclean
$ sudo make build_ctpc89e_boot
$ sudo make build_ctpc89e_root


Almost there. Last step is to piggy-back the boot micro-ramdisk onto the kernel using (from the kernel checkout):

$ fakeroot make INITRD=/path/to/boot_ramdisk.gz bootpImage

The resulting kernel image is arch/arm/boot/bootpImage.

You can now copy the images to SD card:

- root_ramdisk.gz => boot.img
- bootpImage => zImage_dt_update

And don't forget to include the dummy datang-epc.tar.gz.

For background info in how Debian Installer works please see the following document: http://d-i.alioth.debian.org/doc/internals/

Cheers, FJP