summaryrefslogtreecommitdiff
path: root/docs/using-openadk-development.txt
blob: d7d31fbad1fb542996901496fb2148eaa97c035c (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
// -*- mode:doc; -*-
// vim: set syntax=asciidoc:

Using OpenADK during development
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The normal operation of OpenADK is to download a tarball, extract it,
configure, compile and install the software component found inside this
tarball. The source code is extracted in
+build_<system>_<arch>_<libc>/w-<package>-<version>+, which is a
temporary directory: whenever +make clean+ or one of the other clean
targets are used, this directory is entirely removed, and recreated at
the next +make+ invocation.

This behavior is well-suited when OpenADK is used mainly as an
integration tool, to build and integrate all the components of an
embedded Linux system. However, if one uses OpenADK during the
development of certain components of the system, this behavior is not
very convenient: one would instead like to make a small change to the
source code of one package, and be able to quickly rebuild the system
with OpenADK.

Following workflow might help to integrate your own changes, while 
developing a new package or board support.

Make changes directly in +build_<system>_<arch>_<libc>/w-<package>-<version>+ 
and recompile the package with:

------------
 $ make package=<package> package
------------

When you are happy with the change, generate a patch:
------------
 $ make package=<package> update-patches
------------

For the linux kernel just change the code in 
+build_<system>_<arch>_<libc>/linux, remove the .config
and call make again:

------------
 $ rm build_<system>_<arch>_<libc>/linux/.config
 $ make
------------

There is no update-patches target for the kernel, you need
to extract the kernel source from your download dir, make 
a copy of the source tree, add your changes and create a 
patch manually:

------------
 $ tar xvf dl/linux-x.y.z.tar.xz
 $ cp -a linux-x.y.z linux-x.y.z.orig
 $ diff -Nur linux-x.y.z.orig linux-x.y.z > target/linux/patches/x.y.z/mykernel.patch
 $ make cleankernel 
 $ make
------------

The same method can be used for toolchain components and _must_
be used for busybox, because it contains patches, which are not
generated via +make update-patches+.