reorganized Config file
[hdw-linux/hdw-linux.git] / doc / CROSSBUILD
1 # hdw - linux CROSS-BUILD howto
2
3 with the toolchain concept introduced in version 0.3 of hdw-linux,
4 crosscompiling a minimal linux system - which will be used to continue with
5 native builds on the foreign architecture hardware - or even building complete
6 distributions for slow/embedded hardware should be possible.
7
8 here are some guidelines for people developing for aliens.
9
10 1) 'straight forward' crossbuilds
11
12   - in Config file set:
13    o hdw_arch           to the alien target architecture
14    o hdw_arch_opt       and the supported cpu optimization
15    o hdw_crossbuild     to "1", so the scripts know about it
16
17   - hack ./scipts/Config file to fix/improve/support your alien architecture
18
19   - add conditional actions to the toolchain and early base packages
20
21   - for architecture specific patches:
22    o use -u option of diff
23    o create patches being applied in the package directory via p1
24    o put these patches to config directory with ending .patch.${hdw_arch}
25
26   - most important: submit your changes!
27
28 2) 'tricky' crossbuilds (WTF? - yes, i just dont know any better word ... )
29
30    what are tricky crossbuilds? as i am not able to explain that, i will
31    just give you 2 examples:
32
33    1)
34         host system: sparc64 running 64bit kernel with 32bit userland
35         target system: sparc64 (including 64bit userland)
36
37    2)
38         host system: ia32 i686
39         target system: ia32 i586
40
41    to get around some troubles here diffrent things were implemented:
42
43         o misc/crossbuild/fake_utsname/ - a kernel module to fake the
44           uname output
45         o hdw_real_build - a config parameter that will cause the
46           --build configure flag to the real host system compilers
47
48 as you see, crossbuilds are still devel. feel free to hack the scripts, ask
49 questions or even kill me for that braindead implementations.
50
51 interesting files:
52 Config
53 scripts/Config
54 scripts/optimize
55 packages/toolchain/*
56 misc/crossbuild/fake_utsname/*
57
58 have fun, hackbard.
59