4891
Comment: added some information to build the c++ compiler,nls
|
← Revision 19 as of 2009-03-16 22:31:55 ⇥
5743
|
Deletions are marked like this. | Additions are marked like this. |
Line 3: | Line 3: |
{{{uclibc-linux-<cpu> uclibc-<cpu> | {{{ uclibc-linux-<cpu> uclibc-<cpu> |
Line 6: | Line 7: |
{{{uclibc-linux linux-uclibc linux[^-]*-uclibc | {{{ uclibc-linux linux-uclibc linux[^-]*-uclibc |
Line 9: | Line 11: |
{{{uclibc linux-uclibc linux[^-]*(-uclibc.*)? | {{{ uclibc linux-uclibc linux[^-]*(-uclibc.*)? |
Line 12: | Line 15: |
{{{:~$dpkg-architecture -auclibc-i386 | {{{ :~$dpkg-architecture -auclibc-i386 |
Line 25: | Line 29: |
DEB_HOST_GNU_TYPE=i486-linux-uclibc}}} | DEB_HOST_GNU_TYPE=i486-linux-uclibc }}} |
Line 28: | Line 33: |
The directory name changed! this section needs updating | |
Line 33: | Line 39: |
Now you have to disable building kernel images. To do so edit debian/arch/<arch>/defines and in the [base] section comment all flavours and subarches. For i386 the resulting first lines should be something like this: | Now you have to disable building kernel images. To do so edit debian/config/<arch>/defines and in the [base] section comment all flavours and subarches. For i386 the resulting first lines should be something like this: |
Line 36: | Line 42: |
{{{[base] | {{{ [base] |
Line 54: | Line 61: |
{{{DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH) | {{{ DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH) |
Line 58: | Line 66: |
{{{This target is made to fail intentionally, to make sure | {{{ This target is made to fail intentionally, to make sure |
Line 61: | Line 70: |
been generated SUCCESSFULLY.}}} | been generated SUCCESSFULLY. }}} |
Line 64: | Line 74: |
{{{Architecture: alpha amd64 arm armel hppa i386 ia64 m68k mips mipsel powerpc s390 sparc | {{{ Architecture: alpha amd64 arm armel hppa i386 ia64 m68k mips mipsel powerpc s390 sparc |
Line 74: | Line 85: |
{{{dpkg-buildpackage -B -rfakeroot -auclibc-i386 | {{{ dpkg-buildpackage -B -rfakeroot -auclibc-i386 |
Line 78: | Line 90: |
{{{TARGET=uclibc-mipsel fakeroot debian/rules binary-cross | {{{ TARGET=uclibc-mipsel fakeroot debian/rules binary-cross |
Line 80: | Line 93: |
= libuclibc-bootstrap = since gcc-4.3 the libc headers are needed for gcc first pass. Get the source from uclibc.org and untar this inside: http://lists.debian.org/debian-embedded/2008/03/bz2P7ugnDbWlL.bz2 and build it with DEB_CROSS_BOOTSTRAP=yes dpkg-buildpackage -auclibc-i386 .... then install the package with dpkg-cross. |
|
Line 81: | Line 98: |
The patch in the emdebian mailinglist shopuld work. Just apply it and prepend DEB_CROSS_BOOTSTRAP=yes to the normal cross build. Dependencies are not fixed yet. just ignore them |
|
Line 90: | Line 110: |
now do a normal build and install libuclibc-dev and its dependencies with dpkg-cross = libexpat = gettext may want it |
|
Line 95: | Line 118: |
repeat the first pass. | |
Line 96: | Line 120: |
double check every step and fill in the missing parts. At the moment I'm using this page to not forget stuff. |
dpkg
First of all dpkg needs to be told about uclibc-<arch> architectures. Those instructions are for post-etch. Look below for instructions for etch. Add to /usr/share/dpkg/triplettable (literally, you may copy and paste):
uclibc-linux-<cpu> uclibc-<cpu>
And to /usr/share/dpkg/ostable add this:
uclibc-linux linux-uclibc linux[^-]*-uclibc
For etch just add this to ostable instead:
uclibc linux-uclibc linux[^-]*(-uclibc.*)?
Now dpkg-architecture -auclibc-<arch> should give you reasonable output:
:~$dpkg-architecture -auclibc-i386 dpkg-architecture: warning: Specified GNU system type i486-linux-uclibc does not match gcc system type i486-linux-gnu. DEB_BUILD_ARCH=i386 DEB_BUILD_ARCH_OS=linux DEB_BUILD_ARCH_CPU=i386 DEB_BUILD_GNU_CPU=i486 DEB_BUILD_GNU_SYSTEM=linux-gnu DEB_BUILD_GNU_TYPE=i486-linux-gnu DEB_HOST_ARCH=uclibc-i386 DEB_HOST_ARCH_OS=linux DEB_HOST_ARCH_CPU=i386 DEB_HOST_GNU_CPU=i486 DEB_HOST_GNU_SYSTEM=linux-uclibc DEB_HOST_GNU_TYPE=i486-linux-uclibc
linux-libc-dev:
The directory name changed! this section needs updating To be able to build the linux-libc-dev packages a few changes have to be made. It is not possible yet to build kernel packages so you'll have to disable that. Also the rules file uses DEB_HOST_ARCH when DEB_HOST_ARCH_CPU seems to be perfectly fine for most arches. Unfortunately DEB_HOST_ARCH and DEB_HOST_ARCH_CPU aren't the same for armel. But as far as I can tell this might still work. Finally the control file gets generated by a python script which doesn't add uclibc-<arch> to the Architecture fields.
Get the source apt-get source linux-libc-dev and change into the source directory. Now you have to disable building kernel images. To do so edit debian/config/<arch>/defines and in the [base] section comment all flavours and subarches. For i386 the resulting first lines should be something like this:
[base] flavours: # 486 # 686 # k7 # 686-bigmem # amd64 kernel-arch: i386 uclibc-i386 kernel-header-dirs: i386 x86_64 subarches: # vserver # xen # xen-vserver
Now change debian/rules. All entries that are foo-$(DEB_HOST_ARCH) need to be changed to foo-$(DEB_HOST_ARCH_CPU). source-$(DEB_HOST_ARCH_CPU), setup-$(DEB_HOST_ARCH_CPU), build-$(DEB_HOST_ARCH_CPU), binary-arch-$(DEB_HOST_ARCH_CPU) and setup-$(DEB_HOST_ARCH_CPU)-real.
leave this alone:
DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
Now run debian/rules clean You should be told that the control file was created:
This target is made to fail intentionally, to make sure that it is NEVER run during the automated build. Please ignore the following error, the debian/control file has been generated SUCCESSFULLY.
So it's time to change the control file. Open debian/control in an editor and search for your <arch>. So for i386 search for i386. If it is in an Architecture line add uclibc-<arch> (uclibc-i386). Repeat until your uclibc-<arch> is added to all Architecture lines. Here's an example:
Architecture: alpha amd64 arm armel hppa i386 ia64 m68k mips mipsel powerpc s390 sparc becomes: Architecture: alpha amd64 arm armel hppa i386 uclibc-i386 ia64 m68k mips mipsel powerpc s390 sparc and Architecture: i386 becomes: Architecture: i386 uclibc-i386
Now everything should be fine and the Package can be built as usual. Generating the html docs takes a lot of time. So you might want to use -B instead of -b for dpkg-buildpackage:
dpkg-buildpackage -B -rfakeroot -auclibc-i386
binutils
To build binutils look at the debian/README.cross file that comes with the source.
TARGET=uclibc-mipsel fakeroot debian/rules binary-cross
libuclibc-bootstrap
since gcc-4.3 the libc headers are needed for gcc first pass. Get the source from uclibc.org and untar this inside: http://lists.debian.org/debian-embedded/2008/03/bz2P7ugnDbWlL.bz2 and build it with DEB_CROSS_BOOTSTRAP=yes dpkg-buildpackage -auclibc-i386 .... then install the package with dpkg-cross.
gcc first pass
The patch in the emdebian mailinglist shopuld work. Just apply it and prepend DEB_CROSS_BOOTSTRAP=yes to the normal cross build. Dependencies are not fixed yet. just ignore them It'll take some time until I can make the patches work again. In the meantime you might want to try building gcc manually. The trick is use make all-gcc and make install-gcc instead of doing a full build. The Cross Linux From Scratch doumentation is a good reference.
- build without common libs and common pkgs if DEB_CROSS_BOOTSTRAP=yes (rules.default)
- change rules.defs to not build objc++, c++ and without ssp if DEB_CROSS_BOOTSTRAP=yes (rules.default)
- make all-gcc and install-gcc if DEB_CROSS_BOOTSTRAP=yes (rules2)
- disable threads and shared libraries (rules2)
- probably some more, also the dependencies are most likely broken. but I want to look at the results of this before doing anything additionally
Unfortunately for now you are on your own for the time being. But building the bootstrap compiler the way it is describe in the CLFS book should do the trick
uclibc first pass
now do a normal build and install libuclibc-dev and its dependencies with dpkg-cross
libexpat
gettext may want it
gettext
If you want native language support you will need libintl, which uclibc doesn't support. So instead build it from gettext.
gcc second pass
try WITHOUT_LANG=nls until there are gettext packages
final uclibc
repeat the first pass.
ToDo
double check every step and fill in the missing parts. At the moment I'm using this page to not forget stuff.