Web edits
[beagleboard.org.git] / db / 1738.xml
blobee3749b61adecc8facb8023b5d82d25a6639a4e7
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>
10     <uri>linux</uri>
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> &lt;h1&gt;Linux and u-boot sources&lt;/h1&gt;\r
15  &lt;p&gt;\r
16   The Linux kernel sources for the BeagleBoard, BeagleBoard-xM and BeagleBone are maintained on\r
17   &lt;a href=&quot;http://github.com/beagleboard&quot;&gt;Github.com/BeagleBoard&lt;/a&gt;. The U-Boot bootloader sources\r
18   maintained as part of the U-Boot mainline on &lt;a href=&quot;http://git.denx.de/&quot;&gt;git.denx.de&lt;/a&gt;.\r
19  &lt;/p&gt;\r
20  &lt;p&gt;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.&lt;/p&gt;\r
23  &lt;h3&gt;Example for installing toolchain&lt;/h3&gt;\r
24  &lt;pre&gt;\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
28  &lt;/pre&gt;\r
29  &lt;h3&gt;Example build procedure for BeagleBone MLO and u-boot&lt;/h3&gt;\r
30  &lt;pre&gt;\r
31 ~$ git clone git://git.denx.de/u-boot.git &amp;&amp; cd u-boot\r
32 ~/u-boot$ CROSS_COMPILE=arm-angstrom-linux-gnueabi- make am335x_evm\r
33  &lt;/pre&gt;\r
34  &lt;h3&gt;Example build procedure for BeagleBone 3.8-rcX kernel&lt;/h3&gt;\r
35  &lt;pre&gt;\r
36 ~$ git clone git://github.com/beagleboard/kernel.git &amp;&amp; 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
41 ~/kernel$ cd kernel\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
49  &lt;/pre&gt;\r
50  &lt;h3&gt;Building a kernel module&lt;/h3&gt;\r
51  &lt;p&gt;I applied &lt;a href=&quot;https://github.com/jadonk/kernel/commit/d60d5f20e67a527aaa1813af2391894ffbfd4af4\r
52 &quot;&gt;this patch&lt;/a&gt; and that provided the following files:&lt;/p&gt;\r
53  &lt;h4&gt;~/kernel/kernel/hello/hello.c&lt;/h4&gt;\r
54  &lt;pre&gt;\r
55 #include &lt;linux/module.h&gt;       /* Needed by all modules */\r
56 #include &lt;linux/kernel.h&gt;       /* Needed for KERN_INFO */\r
57 #include &lt;linux/init.h&gt;         /* Needed for the macros */\r
59 static int __init hello_start(void)\r
60 {\r
61     printk(KERN_INFO &quot;Loading hello module...\n&quot;);\r
62     printk(KERN_INFO &quot;Hello world\n&quot;);\r
63     return 0;\r
64 }\r
66 static void __exit hello_end(void)\r
67 {\r
68     printk(KERN_INFO &quot;Goodbye Mr.\n&quot;);\r
69 }\r
71 module_init(hello_start);\r
72 module_exit(hello_end);\r
73  &lt;/pre&gt;\r
74  &lt;h4&gt;~/kernel/kernel/hello/Makefile&lt;/h4&gt;\r
75  &lt;pre&gt;\r
76 obj-m := hello.o\r
78 PWD   := $(shell pwd)\r
79 KDIR  := ${PWD}/..\r
81 default:\r
82     make -C $(KDIR) SUBDIRS=$(PWD) modules\r
83  &lt;/pre&gt;\r
84  &lt;pre&gt;\r
85 ~/kernel/kernel$ cd hello\r
86 ~/kernel/kernel/hello$ make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- \r
87  &lt;/pre&gt;\r
88 </body>
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>
93     <lang>en-us</lang>
94     <hop:child idref="2410" prototyperef="Page"/>
95     <hop:child idref="2420" prototyperef="Page"/>
96     <hop:child idref="2422" prototyperef="Page"/>
97   </hopobject>
98 </xmlroot>