2 // vim: set syntax=asciidoc:
4 Using OpenADK during development
5 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 The normal operation of OpenADK is to download a tarball, extract it,
8 configure, compile and install the software component found inside this
9 tarball. The source code is extracted in
10 +build_<system>_<arch>_<libc>/w-<package>-<version>+, which is a
11 temporary directory: whenever +make clean+ or one of the other clean
12 targets are used, this directory is entirely removed, and recreated at
13 the next +make+ invocation.
15 This behavior is well-suited when OpenADK is used mainly as an
16 integration tool, to build and integrate all the components of an
17 embedded Linux system. However, if one uses OpenADK during the
18 development of certain components of the system, this behavior is not
19 very convenient: one would instead like to make a small change to the
20 source code of one package, and be able to quickly rebuild the system
23 Following workflow might help to integrate your own changes, while
24 developing a new package or board support.
26 Make changes directly in +build_<system>_<arch>_<libc>/w-<package>-<version>+
27 and recompile the package with:
30 $ make package=<package> package
33 When you are happy with the change, generate a patch:
35 $ make package=<package> update-patches
38 For the linux kernel just change the code in
39 +build_<system>_<arch>_<libc>/linux, remove the .config
43 $ rm build_<system>_<arch>_<libc>/linux/.config
47 There is no update-patches target for the kernel, you need
48 to extract the kernel source from your download dir, make
49 a copy of the source tree, add your changes and create a
53 $ tar xvf dl/linux-x.y.z.tar.xz
54 $ cp -a linux-x.y.z linux-x.y.z.orig
55 $ diff -Nur linux-x.y.z.orig linux-x.y.z > target/linux/patches/x.y.z/mykernel.patch
60 The same method can be used for toolchain components and _must_
61 be used for busybox, because it contains patches, which are not
62 generated via +make update-patches+.