aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2019-02-01 16:00:20 +0000
committerBen Hutchings <ben@decadent.org.uk>2019-02-02 00:09:23 +0100
commit72fea69b91bdc8981d958984bc78401a08f8aff5 (patch)
treec96192bd80bb0783974ff38082a61d8667c6dec2
parentd105e7f87b5d6e8be35cc90976061a30c0c05545 (diff)
downloadklibc-72fea69b91bdc8981d958984bc78401a08f8aff5.tar.gz
[klibc] README.klibc: Replace list with sections and headings
The current text talks about a build process, but then lists many things that are either optional or not related to the build process. Turn the list items (and the rest of the text) into multiple sections with headings. Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r--usr/klibc/README.klibc67
1 files changed, 41 insertions, 26 deletions
diff --git a/usr/klibc/README.klibc b/usr/klibc/README.klibc
index 19f4010a43b8a..59ffd351fffc1 100644
--- a/usr/klibc/README.klibc
+++ b/usr/klibc/README.klibc
@@ -1,39 +1,49 @@
+Introduction
+============
+
This is klibc, what is intended to be a minimalistic libc subset for
use with initramfs. It is deliberately written for small size,
minimal entanglement, and portability, not speed. It is definitely a
work in progress, and a lot of things are still missing.
+Building
+========
The build procedure is not very polished yet, but it should work like
this:
-a) Extract a recent Linux kernel into a directory and run
- "make headers_install".
- Now enter the klibc dir and point KLIBCKERNELSRC to the
- usr subdirectory of the configured linux tree
- "make KLIBCKERNELSRC=`pwd`/../linux/usr/".
+Extract a recent Linux kernel into a directory and run
+"make headers_install".
+Now enter the klibc dir and point KLIBCKERNELSRC to the
+usr subdirectory of the configured linux tree
+"make KLIBCKERNELSRC=`pwd`/../linux/usr/".
+
+It is also possible to install the kernel headers elsewhere and
+point to them there.
- It is also possible to install the kernel headers elsewhere and
- point to them there.
+Cross-compiling
+---------------
+If you're cross-compiling, you need to set KLIBCARCH to the
+appropriate architecture, and set CROSS_COMPILE to your toolchain
+prefix.
-b) If you're cross-compiling, you need to set KLIBCARCH to the
- appropriate architecture, and set CROSS_COMPILE to your toolchain
- prefix.
+IMPORTANT: if you're on a 64-bit machine with a 32-bit userland
+(ia64, mips64, ppc64 sparc64, s390x or x86_64), and you want to
+build the 32-bit version: you need to set KLIBCARCH to the 32-bit
+architecture as well as set up the linux/include/asm symlink to
+point to the 32-bit architecture. Building the 32-bit architecture
+usually (but not always) produces smaller binaries, and is likely
+to be better tested.
- IMPORTANT: if you're on a 64-bit machine with a 32-bit userland
- (ia64, mips64, ppc64 sparc64, s390x or x86_64), and you want to
- build the 32-bit version: you need to set KLIBCARCH to the 32-bit
- architecture as well as set up the linux/include/asm symlink to
- point to the 32-bit architecture. Building the 32-bit architecture
- usually (but not always) produces smaller binaries, and is likely
- to be better tested.
+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.
- 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.
+Architecture support
+====================
- The following is the last known status of various architectures:
+The following is the last known status of various architectures:
alpha: Working
arm-thumb: Untested
@@ -62,13 +72,18 @@ b) If you're cross-compiling, you need to set KLIBCARCH to the
x86-64: Working
xtensa: Not yet ported
- Shared library support requires recent binutils on many
- architectures.
+Shared library support requires recent binutils on many architectures.
+
+Note that even the "working" ones likely have bugs. Please report
+them if you run into them.
+
+Testing
+=======
- Note that even the "working" ones likely have bugs. Please report
- them if you run into them.
+Try the test programs in the tests/ directory. They should run...
-c) Try the test programs in the tests/ directory. They should run...
+Contact
+=======
Contact the klibc mailing list: