summaryrefslogtreecommitdiffstats
path: root/doc/bootstrap.txt
blob: 70040228e7781152c497acaf766510df011d4e93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
Inspiration and a lot of lines taken from:

 http://fedorapeople.org/cgit/djdelorie/public_git/bootstrap.git

Using my stage12.sh and stage2.sh :
===================================

Take any Slackware version as the cross-compiling host - a Slackware64 13.37
virtual machine is what I am using since I use Slackware64 13.37 servers as
distcc hosts. You will be compiling sources for the software releases which
you are also running on the ARM target.

As normal user (not root!) create a directory - any will do:

  $ mkdir crossdev

This is the directory where the stage1.sh script will create all its output.
The ./install directory will eventually contain the cross-compiler suite which
is meant to run on the host machine. You can copy that tree to a different
Iocation and use it with distcc.
The directory ./rootfs will be populated with binary code which has been
cross-compiled for your target ARM architecture. It is meant to be used on
the ARM target, either as a bootstrap boot or as a chroot environment on a
different ARM distro which is already installed on the target.

Be sure to have lots of space available in your work directory!

  $ cd crossdev

Next, create a symlink to the directory which has a Slackware source tree as
subdirectory. Ideally this is filled with ARM compatible SlackBuild scripts.
but initially we will have to start with a local stash of modified SlackBuild
scripts. The stage1.sh script must know where to find that directory with
modified sources, its location is defined in the variable "SLACKSOURCE_LOCAL".
The stage1.sh script will always look for sources first in this "local source"
directory and use the Slackware source tree only in case nothing was found in
the "local source" directory.
The name of the symlink which you are going to create must be identical to the
"DISTRO" variable in the stage1.sh script.

  $ ln -sf /mnt/nfs/sox/ftp/pub/Linux/Slackware/slackware64-14.0 slackware

Now, run the stage1.sh script, it can be on any random location. In my case,
this is a NFS-mounted directory:

  $ sh /mnt/nfs/sox/store/ARM/slackware/bootstrap/stage1.sh

This script will run for a long time, and compile your cross-compiler, target
rootfs and prepare the stage2 step. 
Sources will be copied from their original locations into ./sources , and
the compilation will take place in a subdirectory ./builds .
Sources which have been compile and installed into ./install (which is the
cross-compiler directory tree) are marked "done" by creating a file in the
subdirectory ./done . Repeated invocations of the stage1.sh script will skip
everything which has been marked "done" which allows for last-minute fixes to
the compilation commands.

The final step in the stage1.sh script is to invoke a "stage2" step which
populates a "stage2" directory tree into the rootfs. After you have copied
the rootfs to the target machine, you should run /stage2/stage2.sh in order
to compile the remaining binaries for the rootfs. When that is done, your
rootfs will be in good shape to build a complete ARM Slackware distro package
tree from scratch.


===============================================================================
Eric Hameleers <alien@slackware.com> 08-nov-2012