1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <?xml-stylesheet type="text/xsl" href="helma.xsl"?>
3 <xmlroot xmlns:hop="http://www.helma.org/docs/guide/features/database">
4 <hopobject id="1738" name="linux" prototype="Page" created="1321318779526" lastModified="1363454371836">
5 <hop:parent idref="0" prototyperef="Root"/>
6 <is_xhtml type="boolean">true</is_xhtml>
7 <http_remotehost>127.0.0.1</http_remotehost>
8 <oauth2-token></oauth2-token>
9 <http_language>en-US,en;q=0.8</http_language>
11 <http_browser>Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.160 Safari/537.22</http_browser>
12 <time type="date">16.03.2013 12:19:31 CDT</time>
13 <hopsession>127.0.0.198.47.16.t2i5yi63lnkp</hopsession>
14 <body> <h1>Linux and u-boot sources</h1>
\r
16 The Linux kernel sources for the BeagleBoard, BeagleBoard-xM and BeagleBone are maintained on
\r
17 <a href="http://github.com/beagleboard">Github.com/BeagleBoard</a>. The U-Boot bootloader sources
\r
18 maintained as part of the U-Boot mainline on <a href="http://git.denx.de/">git.denx.de</a>.
\r
20 <p>The production and validation of these kernels is done with the Angstrom Distribution and
\r
21 meta-beagleboard with the OpenEmbedded build system. The sources shared here are done for
\r
22 convenience for those familiar with the git version control system.</p>
\r
23 <h3>Example for installing toolchain</h3>
\r
25 ~$ wget http://www.angstrom-distribution.org/toolchains/angstrom-2011.03-x86_64-linux-armv7a-linux-gnueabi-toolchain-qte-4.6.3.tar.bz2
\r
26 ~$ sudo tar -C / -xjf angstrom-2011.03-x86_64-linux-armv7a-linux-gnueabi-toolchain-qte-4.6.3.tar.bz2
\r
27 ~$ export PATH=/usr/local/angstrom/arm/bin:$PATH
\r
29 <h3>Example build procedure for BeagleBone MLO and u-boot</h3>
\r
31 ~$ git clone git://git.denx.de/u-boot.git && cd u-boot
\r
32 ~/u-boot$ CROSS_COMPILE=arm-angstrom-linux-gnueabi- make am335x_evm
\r
34 <h3>Example build procedure for BeagleBone 3.8-rcX kernel</h3>
\r
36 ~$ git clone git://github.com/beagleboard/kernel.git && cd kernel
\r
37 ~/kernel$ git checkout 3.8
\r
38 ~/kernel$ ./patch.sh
\r
39 ~/kernel$ cp configs/beaglebone kernel/arch/arm/configs/beaglebone_defconfig
\r
40 ~/kernel$ wget http://arago-project.org/git/projects/?p=am33x-cm3.git\;a=blob_plain\;f=bin/am335x-pm-firmware.bin\;hb=HEAD -O kernel/firmware/am335x-pm-firmware.bin
\r
42 ~/kernel/kernel$ mkdir rootfs
\r
43 ~/kernel/kernel$ make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- beaglebone_defconfig
\r
44 ~/kernel/kernel$ make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- -j4 uImage dtbs
\r
45 ~/kernel/kernel$ make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- -j4 modules
\r
46 ~/kernel/kernel$ make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- INSTALL_MOD_PATH=$HOME/kernel/kernel/rootfs modules_install
\r
47 ~/kernel/kernel$ make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- uImage-dtb.am335x-bone
\r
48 ~/kernel/kernel$ make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- uImage-dtb.am335x-boneblack
\r
50 <h3>Building a kernel module</h3>
\r
51 <p>I applied <a href="https://github.com/jadonk/kernel/commit/d60d5f20e67a527aaa1813af2391894ffbfd4af4
\r
52 ">this patch</a> and that provided the following files:</p>
\r
53 <h4>~/kernel/kernel/hello/hello.c</h4>
\r
55 #include <linux/module.h> /* Needed by all modules */
\r
56 #include <linux/kernel.h> /* Needed for KERN_INFO */
\r
57 #include <linux/init.h> /* Needed for the macros */
\r
59 static int __init hello_start(void)
\r
61 printk(KERN_INFO "Loading hello module...\n");
\r
62 printk(KERN_INFO "Hello world\n");
\r
66 static void __exit hello_end(void)
\r
68 printk(KERN_INFO "Goodbye Mr.\n");
\r
71 module_init(hello_start);
\r
72 module_exit(hello_end);
\r
74 <h4>~/kernel/kernel/hello/Makefile</h4>
\r
82 make -C $(KDIR) SUBDIRS=$(PWD) modules
\r
85 ~/kernel/kernel$ cd hello
\r
86 ~/kernel/kernel/hello$ make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi-
\r
89 <pseudoparent idref="0" prototyperef="Root"/>
90 <http_referer>http://beagleboard.org/linux/edit</http_referer>
91 <http_host>beagleboard.org</http_host>
92 <user>blog.hangerhead.com</user>
94 <hop:child idref="2410" prototyperef="Page"/>
95 <hop:child idref="2420" prototyperef="Page"/>
96 <hop:child idref="2422" prototyperef="Page"/>