| This is klibc, what is intended to be a minimalistic libc subset for |
| use with initramfs. It is deliberately written for small size, |
| minimal entaglement and portability, not speed. It is definitely a |
| work in progress, and a lot of things are still missing. |
| |
| |
| The build procedure is not very polished yet, but it should work like |
| this: |
| |
| a) In the source root directory (the directory above the one in which |
| this file is found) create a symlink called "linux" pointing to a |
| reasonably recent Linux kernel tree (2.4 or 2.5 should be OK.) |
| This tree must have the include/asm symlink set up for the |
| architecture you're compiling for, and include/linux/autoconf.h |
| must exist. The easiest way to make sure of all of these is to do |
| a "make config" or any of its variants on the kernel tree is |
| question, followed by a "make dep". |
| |
| b) If you're cross-compiling, change ARCH in the main MCONFIG file to |
| the appropriate architecture, and set CROSS to your toolchain |
| prefix. |
| |
| IMPORTANT: if you're on a 64-bit machine with a 32-bit userland |
| (such as most sparc or mips machines), and you want to build the |
| 32-bit version (usually, but not always smaller); you need to set |
| ARCH to the 32-bit architecture as well as set up the |
| linux/include/asm symlink to point to the 32-bit architecture. |
| |
| If you are on ARM, and want to build a thumb version of the library |
| (this is supported), change OPTFLAGS in arch/arm/MCONFIG to build |
| thumb code. |
| |
| The following is the status of various architectures: |
| |
| Known to work: arm i386 sparc sparc64 |
| Need crt0.S updates: alpha ppc |
| Missing setjmp: s390 s390x ppc64 |
| May or may not work: x86_64 |
| Need porting work: cris ia64 m68k mips64 parisc sh |
| |
| Note that even the "known to work" ones likely have bugs. Please |
| report them if you run into them. |
| |
| c) Type "make" and pray... |
| |
| d) Try the test programs in the tests/ directory. They should run... |
| |
| Contact me at <hpa@zytor.com> for more info. |
| |
| -hpa |