895
Comment:
|
3404
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
= dpkg = First of all dpkg needs to be told about uclibc-<arch> architectures. Add to /usr/share/dpkg/triplettable: {{{uclibc-linux-<cpu> uclibc-<cpu> }}} And to /usr/share/dpkg/ostable add this: {{{uclibc-linux 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}}} |
|
Line 2: | Line 25: |
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. Finally the cntrol file gets generated by a python script which doesn't add uclibc-<arch> to the Architecture fields. | 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. |
Line 7: | Line 30: |
Now you have to disable building kernel images. To do so edit debian/arch/<arch>/defines and in the [base] section comment all flavors and subarches. For i386 the resulting first lines should be like this: | Now you have to disable building kernel images. To do so edit debian/arch/<arch>/defines and in the [base] section comment all flavors and subarches. For i386 the resulting first lines should be something like this: |
Line 25: | Line 48: |
---- | 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. 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 }}} ---- |
dpkg
First of all dpkg needs to be told about uclibc-<arch> architectures. Add to /usr/share/dpkg/triplettable: {{{uclibc-linux-<cpu> uclibc-<cpu> }}} And to /usr/share/dpkg/ostable add this: {{{uclibc-linux 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:
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/arch/<arch>/defines and in the [base] section comment all flavors 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.
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 }}}