Difference between revisions of "Building for BeagleBone"

From eLinux.org
Jump to: navigation, search
m (Kernel)
Line 28: Line 28:
  
 
'''Get:'''
 
'''Get:'''
 
+
<syntaxhighlight lang="bash">$ git clone git://git.denx.de/u-boot.git</syntaxhighlight>
$ git clone git://git.denx.de/u-boot.git
 
 
 
 
'''Clean:'''
 
'''Clean:'''
 +
<syntaxhighlight lang="bash">$ armmake distclean</syntaxhighlight>
 +
'''Configure for BeagleBone:'''
 +
<syntaxhighlight lang="bash">$ armmake am335x_evm_config</syntaxhighlight>
 +
'''Build:'''
 +
<syntaxhighlight lang="bash">$ armmake</syntaxhighlight>
  
$ armmake distclean
+
== Test your new U-Boot ==
  
'''Configure for BeagleBone:'''
+
You need a microSd card with 2Gb or more. In order to make U-Boot work you will need to create the first partion as FAT32 LBA, bootable, with something like 64 Megabytes.
 
+
This command wipes everything from your sdcard and creates that partition.
$ armmake am335x_evm_config
 
  
'''Build:'''
+
<syntaxhighlight lang="bash">$ echo -e "o\nn\np\n1\n\n+64M\na\n1\nt\nc\nw\n" | sudo fdisk /dev/MYDISK ; sudo fdisk /dev/MYDISK -l</syntaxhighlight>
  
$ armmake
+
This comand should print something like:
  
== Test your new U-Boot ==
+
<pre class="bash">
 +
Disk /dev/sdb: 7948 MB, 7948206080 bytes
 +
16 heads, 4 sectors/track, 242560 cylinders, total 15523840 sectors
 +
Units = sectors of 1 * 512 = 512 bytes
 +
Sector size (logical/physical): 512 bytes / 512 bytes
 +
I/O size (minimum/optimal): 512 bytes / 512 bytes
 +
Disk identifier: 0x1c524301
 +
    Device Boot     Start        End      Blocks  Id  System
 +
/dev/sdb1  *        2048      133119      65536    c  W95 FAT32 (LBA)
 +
</pre>
  
[[TODO]]
 
  
 
= Kernel =
 
= Kernel =

Revision as of 11:45, 25 June 2014

Arm Compiler

Setting up cross-compile environment is the first and necessary step.

Distro provided

The easier way is install the default compiler provided by your distribution.

Ubuntu : gcc-arm-linux-gnueabi

Arch Linux : arm-linux-gnueabi-gcc

Debian : ??

Fedora : ??

Linux Mint : ??

  • Tip: Do a alias in your environment: 'alias armmake='make -jN ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- ', where N is the number of processors cores plus one

crosstool-NG

TODO

U-Boot

Mainline U-boot

You can use the mainline u-boot for beaglebone.

Get:

$ git clone git://git.denx.de/u-boot.git

Clean:

$ armmake distclean

Configure for BeagleBone:

$ armmake am335x_evm_config

Build:

$ armmake

Test your new U-Boot

You need a microSd card with 2Gb or more. In order to make U-Boot work you will need to create the first partion as FAT32 LBA, bootable, with something like 64 Megabytes. This command wipes everything from your sdcard and creates that partition.

$ echo -e "o\nn\np\n1\n\n+64M\na\n1\nt\nc\nw\n" | sudo fdisk /dev/MYDISK ; sudo fdisk /dev/MYDISK -l

This comand should print something like:

Disk /dev/sdb: 7948 MB, 7948206080 bytes
16 heads, 4 sectors/track, 242560 cylinders, total 15523840 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x1c524301
    Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *        2048      133119       65536    c  W95 FAT32 (LBA)


Kernel

Mainline Kernel

TODO

Test your new Kernel

TODO