This is a page about TI's BeagleBone.
- Availability:
- Basic Requirements:
- ARM Cross Compiler: GCC
- Bootloader: U-Boot
- Upgrade distro "device-tree-compiler" package
- Linux Kernel
- Root File System
- Debian 7
- Debian 8 (pre-release)
- Ubuntu 14.04.1
- Root File System (small flash)
- Debian 7 (small flash)
- Setup microSD/SD card
- Install Kernel and Root File System
- Copy Root File System
- Create /boot/uEnv.txt
- Debian /boot/uEnv.txt (enable systemd)
- Copy Kernel Files
- File Systems Table (/etc/fstab)
- Networking
- Networking: Using a shared SD card with Multiple BeagleBone
- Serial Login
- Comments
Availability:
BeagleBone at Digi-KeyBeagleBone DVI Cape at Digi-Key
BeagleBone 3inch LCD Cape at Digi-Key
BeagleBone 7inch LCD Cape at Digi-Key
BeagleBone BreadBoard Cape at Digi-Key
BeagleBone Breakout Cape at Digi-Key
Basic Requirements:
- ARM Cross Compiler
- Linaro: http://www.linaro.org/downloads/
- Bootloader
- Das U-Boot – the Universal Boot Loader http://www.denx.de/wiki/U-Boot
- Source – http://git.denx.de/?p=u-boot.git;a=summary
- Linux Kernel
- Linus's Mainline tree: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git
- ARM based rootfs
- Debian: https://www.debian.org/
- Ubuntu: http://www.ubuntu.com
ARM Cross Compiler: GCC
This is a pre-built (32bit) version of Linaro GCC that runs on generic linux, so 64bit users need to make sure they have installed the 32bit libraries for their distribution.
Debian based (deb) |
extra |
pkgs: (sudo apt-get update ; sudo apt-get install xyz) |
---|---|---|
Ubuntu 14.04 -> 14.10 |
libc6:i386 libstdc++6:i386 libncurses5:i386 zlib1g:i386 |
|
Debian 7 -> 8 (Jessie) |
sudo dpkg --add-architecture i386 |
libc6:i386 libstdc++6:i386 libncurses5:i386 zlib1g:i386 |
Red Hat based (rpm) |
extra |
pkgs: (yum install xyz) |
Red Hat/Centos/Fedora |
libstdc++.i686 ncurses-devel.i686 zlib.i686 |
Download/Extract:
wget -c https:
//releases.linaro.org/14.09/components/toolchain/binaries/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux.tar.xz
tar xf gcc-linaro-arm-linux-gnueabihf-
4.9
-
2014
.09_linux.tar.xz
export CC=`pwd`/gcc-linaro-arm-linux-gnueabihf-
4.9
-
2014
.09_linux/bin/arm-linux-gnueabihf-
|
Test:
If this test fails, verify that you have the 32bit libraries installed on your development system.
${CC}gcc --version
arm-linux-gnueabihf-gcc (crosstool-NG linaro-
1.13
.
1
-
4.9
-
2014.09
- Linaro GCC
4.9
-
2014.09
)
4.9
.
2
20140904
(prerelease)
Copyright (C)
2014
Free Software Foundation, Inc.
This is free software; see the source
for
copying conditions. There is NO
warranty; not even
for
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
Bootloader: U-Boot
Das U-Boot -- the Universal Boot Loader http://www.denx.de/wiki/U-Boot
Download:
git clone git:
//git.denx.de/u-boot.git
cd u-boot/
git checkout v2015.
01
-b tmp
|
Patches:
wget -c https:
//raw.githubusercontent.com/eewiki/u-boot-patches/master/v2015.01/0001-am335x_evm-uEnv.txt-bootz-n-fixes.patch
patch -p1 <
0001
-am335x_evm-uEnv.txt-bootz-n-fixes.patch
|
Configure and Build:
make ARCH=arm CROSS_COMPILE=${CC} distclean
make ARCH=arm CROSS_COMPILE=${CC} am335x_evm_defconfig
make ARCH=arm CROSS_COMPILE=${CC}
|
Upgrade distro "device-tree-compiler" package
wget -c https:
//raw.github.com/RobertCNelson/tools/master/pkgs/dtc.sh
chmod +x dtc.sh
./dtc.sh
|
Linux Kernel
This script will build the kernel and modules and copy them to the deploy directory.
Download:
git clone https:
//github.com/RobertCNelson/bb-kernel.git
cd bb-kernel/
|
Checkout v3.8.x branch:
git checkout origin/am33x-v3.
8
-b tmp
|
or v3.18.x branch (better usb/ethernet, some simple capes)
git checkout origin/am33x-v3.
18
-b tmp
|
Build:
./build_kernel.sh
|
Root File System
Debian 7
User |
Password |
---|---|
debian |
temppwd |
root |
root |
This image contains, systemd: https://wiki.debian.org/systemd to enable, add to uEnv.txt:
optargs=quiet init=/lib/systemd/systemd
|
Download:
wget -c https:
//rcn-ee.net/rootfs/eewiki/minfs/debian-7.8-minimal-armhf-2015-01-20.tar.xz
|
Verify:
md5sum debian-
7.8
-minimal-armhf-
2015
-
01
-
20
.tar.xz
7e9c4e023ba37c2851db1b388998e766 debian-
7.8
-minimal-armhf-
2015
-
01
-
20
.tar.xz
|
Extract:
tar xf debian-
7.8
-minimal-armhf-
2015
-
01
-
20
.tar.xz
|
Debian 8 (pre-release)
User |
Password |
---|---|
debian |
temppwd |
root |
root |
Download:
wget -c https:
//rcn-ee.net/rootfs/eewiki/minfs/debian-jessie-minimal-armhf-2015-01-20.tar.xz
|
Verify:
md5sum debian-jessie-minimal-armhf-
2015
-
01
-
20
.tar.xz
6e9b5aea58f900e70d831db99e06e075 debian-jessie-minimal-armhf-
2015
-
01
-
20
.tar.xz
|
Extract:
tar xf debian-jessie-minimal-armhf-
2015
-
01
-
20
.tar.xz
|
Ubuntu 14.04.1
User |
Password |
---|---|
ubuntu |
temppwd |
Download:
wget -c https:
//rcn-ee.net/rootfs/eewiki/minfs/ubuntu-14.04.1-minimal-armhf-2015-01-20.tar.xz
|
Verify:
md5sum ubuntu-
14.04
.
1
-minimal-armhf-
2015
-
01
-
20
.tar.xz
fc71da62babe15e45c7e51f8dba22639 ubuntu-
14.04
.
1
-minimal-armhf-
2015
-
01
-
20
.tar.xz
|
Extract:
tar xf ubuntu-
14.04
.
1
-minimal-armhf-
2015
-
01
-
20
.tar.xz
|
Root File System (small flash)
A Root File System around 64Mb in size, for flash applications.
Debian 7 (small flash)
User |
Password |
---|---|
debian |
temppwd |
root |
root |
Download:
wget -c https:
//rcn-ee.net/rootfs/eewiki/barefs/debian-7.8-bare-armhf-2015-01-20.tar.xz
|
Verify:
md5sum debian-
7.8
-bare-armhf-
2015
-
01
-
20
.tar.xz
cdc78a9caf9ad1e8fae803709d19af27 debian-
7.8
-bare-armhf-
2015
-
01
-
20
.tar.xz
|
Extract:
tar xf debian-
7.8
-bare-armhf-
2015
-
01
-
20
.tar.xz
|
Setup microSD/SD card
For these instruction, we are assuming: DISK=/dev/mmcblk0, "lsblk" is very useful for determining the device id.
export DISK=/dev/mmcblk0
|
Erase microSD/SD card:
sudo dd
if
=/dev/zero of=${DISK} bs=1M count=
10
|
Install Bootloader:
sudo dd
if
=./u-boot/MLO of=${DISK} count=
1
seek=
1
conv=notrunc bs=128k
sudo dd
if
=./u-boot/u-boot.img of=${DISK} count=
2
seek=
1
conv=notrunc bs=384k
|
Create Partition Layout:
sudo sfdisk --in-order --Linux --unit M ${DISK} <<-__EOF__
1
,,
0x83
,*
__EOF__
|
Format Partitions:
for
: DISK=/dev/mmcblk0
sudo mkfs.ext4 ${DISK}p1 -L rootfs
for
: DISK=/dev/sdX
sudo mkfs.ext4 ${DISK}
1
-L rootfs
|
Mount Partitions:
On some systems, these partitions may be auto-mounted...
sudo mkdir -p /media/rootfs/
for
: DISK=/dev/mmcblk0
sudo mount ${DISK}p1 /media/rootfs/
for
: DISK=/dev/sdX
sudo mount ${DISK}
1
/media/rootfs/
|
Install Kernel and Root File System
To help new users, since the kernel version can change on a daily basis. The kernel building scripts listed on this page will now give you a hint of what kernel version was built.
-----------------------------
Script Complete
eewiki.net: [user
@localhost
:~$ export kernel_version=
3
.X.Y-Z]
-----------------------------
|
Copy and paste that "export kernel_version=3.X.Y-Z" exactly as shown in your own build/desktop environment and hit enter to create an environment variable to be used later.
export kernel_version=
3
.X.Y-Z
|
Copy Root File System
sudo tar xfvp .
/*-*-*-armhf-*/
armhf-rootfs-*.tar -C /media/rootfs/
|
Create /boot/uEnv.txt
sudo sh -c
"echo 'uname_r=${kernel_version}' > /media/rootfs/boot/uEnv.txt"
|
Debian /boot/uEnv.txt (enable systemd)
sudo sh -c
"echo 'cmdline=quiet init=/lib/systemd/systemd' >> /media/rootfs/boot/uEnv.txt"
|
Copy Kernel Files
Kernel Image:
sudo cp -v ./bb-kernel/deploy/${kernel_version}.zImage /media/rootfs/boot/vmlinuz-${kernel_version}
|
Kernel Device Tree Binaries:
sudo mkdir -p /media/rootfs/boot/dtbs/${kernel_version}/
sudo tar xfv ./bb-kernel/deploy/${kernel_version}-dtbs.tar.gz -C /media/rootfs/boot/dtbs/${kernel_version}/
|
Kernel Modules:
sudo tar xfv ./bb-kernel/deploy/${kernel_version}-modules.tar.gz -C /media/rootfs/
|
File Systems Table (/etc/fstab)
sudo sh -c
"echo '/dev/mmcblk0p1 / auto errors=remount-ro 0 1' >> /media/rootfs/etc/fstab"
|
Networking
Edit: /etc/network/interfaces
sudo nano /media/rootfs/etc/network/interfaces
|
Add:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
|
Networking: Using a shared SD card with Multiple BeagleBone
To always enable the Ethernet interface as eth0.
Edit: /etc/udev/rules.d/70-persistent-net.rules
sudo nano /media/rootfs/etc/udev/rules.d/
70
-persistent-net.rules
|
Add:
# BeagleBone: net device ()
SUBSYSTEM==
"net"
, ACTION==
"add"
, DRIVERS==
"?*"
, ATTR{dev_id}==
"0x0"
, ATTR{type}==
"1"
, KERNEL==
"eth*"
, NAME=
"eth0"
|
Serial Login
Debian
sudo sh -c
"echo 'T0:23:respawn:/sbin/getty -L ttyO0 115200 vt102' >> /media/rootfs/etc/inittab"
|
Ubuntu
Create new file: /etc/init/serial.conf
sudo nano /media/rootfs/etc/init/serial.conf
|
With this content:
start on stopped rc RUNLEVEL=[
2345
]
stop on runlevel [!
2345
]
respawn
exec /sbin/getty
115200
ttyO0
|
Remove microSD/SD card:
sync
sudo umount /media/rootfs
|
Comments
Comments, feedback, and questions can be sent to [email protected].
Comments Page