Beagleboard:BeagleBoneBlack Debian

From eLinux.org
Revision as of 12:37, 27 March 2017 by RobertCNelson (talk | contribs) (Debian Image Testing Snapshots: 2017-03-26)
Jump to: navigation, search

This page is about running the armhf port of Debian distribution at BeagleBoard. The latest release beagleboard.org image can be found at: http://beagleboard.org/latest-images

Contents

Checking The Debian Image Version

You should check the version of the image on the microSD/eMMC by opening the ID.txt file in the FAT partition.

root@beaglebone:~# cat /etc/dogtag
BeagleBoard.org BeagleBone Debian Image 2014-03-19

This file can also be accessed via a PC (Windows/Mac/Linux) via either mounting the FAT partition directly off the microSD card or via the usb interface (flash drive).

Installing

Oracle Java 8

Information:

http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Install:

sudo apt-get update
sudo apt-get install oracle-java8-installer

Verify:

debian@beaglebone:~$ java -version
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) Client VM (build 25.60-b23, mixed mode)

TI PRU Code Generation Tools

http://software-dl.ti.com/codegen/non-esd/downloads/download.htm#PRU

Install:

sudo apt-get update
sudo apt-get install ti-pru-cgt-installer

Older rootfs (when above package doesn't exist):

wget http://downloads.ti.com/codegen/esd/cgt_public_sw/PRU/2.1.1/ti_cgt_pru_2.1.1_armlinuxa8hf_busybox_installer.sh
chmod +x ti_cgt_pru_2.1.1_armlinuxa8hf_busybox_installer.sh
sudo ./ti_cgt_pru_2.1.1_armlinuxa8hf_busybox_installer.sh

FAQ

Expanding File System Partition On A microSD

By default the microSD image is only about 2GB in size, to fully expand the partition to the full size of your microSD card simple run.

cd /opt/scripts/tools/
git pull
sudo ./grow_partition.sh
sudo reboot

On the next reboot, [df -h] should show the full microSD card size.

Flashing eMMC

To set up the standalone microSD image to automatically flash the eMMC on powerup. *Note, img files with the words "eMMC-flasher" already had this enabled...*

In /boot/uEnv.txt:

##enable BBB: eMMC Flasher:
#cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh

Change to:

##enable BBB: eMMC Flasher:
cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh

Optional, update Flasher Scripts:

cd /opt/scripts/
git pull

and reboot the system, it'll flash the eMMC on the next bootup. (make sure to remove the microSD after flashing is complete)

Kernel Upgrade

We can't ship support for everything on release day, so we push out new kernels as fixes, support for new capes, etc are posted on the beagleboard.org mainline list.

cd /opt/scripts/tools/
git pull
sudo ./update_kernel.sh
sudo reboot

Installing kernel headers

If you want to build a kernel module natively, you'll need to install the correct kernel headers.

sudo apt-get install linux-headers-`uname -r`

In a Makefile, perform:

sudo apt-get install linux-headers-$(shell uname -r)

Loading custom capes

Due to limitations in debian wheezy's userspace, the use of an initramfs, and having firmware builtin to the kernel. It is currently not possible to load "custom" capes via: capemgr.enable_partno=xyz. Instead an init script has been set up to load the cape/capes as soon as possible.

Built-in Cape:

capemgr.enable_partno=BB-SPIDEV1

slot #7: Requesting part number/version based 'BB-SPIDEV1-00A0.dtbo
slot #7: Requesting firmware 'BB-SPIDEV1-00A0.dtbo' for board-name 'Override Board Name', version '00A0'
slot #7: dtbo 'BB-SPIDEV1-00A0.dtbo' loaded; converting to live tree

Custom External Cape:

capemgr.enable_partno=BB-SPI1-01

slot #7: Requesting part number/version based 'BB-SPI1-01-00A0.dtbo
slot #7: Requesting firmware 'BB-SPI1-01-00A0.dtbo' for board-name 'Override Board Name', version '00A0'
failed to load firmware 'BB-SPI1-01-00A0.dtbo'
loader: failed to load slot-7 BB-SPI1-01:00A0 (prio 0)

Workaround:

add "CAPE=BB-SPI1-01" to /etc/default/capemgr

Privileged echo

As a normal user, you can not "sudo echo 'something' >> /etc/privilegedfile"

echo 'something' | sudo tee /etc/privilegedfile

Timezone

By default this image is set up to display time in utc mode. If you would like to change this to your local region.

dpkg-reconfigure tzdata

or:

echo "Europe/Zurich" > /etc/timezone 
dpkg-reconfigure -f noninteractive tzdata

Jessie Timezone

List of available timezones:

timedatectl list-timezones

Set timezone:

sudo timedatectl set-timezone America/North_Dakota/Center

W: GPG error: http://debian.beagleboard.org wheezy-bbb

W: GPG error: http://debian.beagleboard.org wheezy-bbb Release:
The following signatures were invalid:
KEYEXPIRED 1418840246 KEYEXPIRED 1418840304 KEYEXPIRED 1418840246 KEYEXPIRED 1418840246 KEYEXPIRED 1418840304

Note this directions are version dependent, so double check your version:

debian@beaglebone:~$ cat /etc/dogtag 
BeagleBoard.org BeagleBone Debian Image 2014-05-14

2014-05-14 GPG error: Disable: http://debian.beagleboard.org repo:

sudo nano /etc/apt/sources.list

Change:

deb [arch=armhf] http://debian.beagleboard.org/packages wheezy-bbb main
#deb-src [arch=armhf] http://debian.beagleboard.org/packages wheezy-bbb main

To:

#deb [arch=armhf] http://debian.beagleboard.org/packages wheezy-bbb main
#deb-src [arch=armhf] http://debian.beagleboard.org/packages wheezy-bbb main
sudo apt-get update

2014-05-14 GPG error: Optional enable: http://repos.rcn-ee.com/

Download archive-keyring:

wget https://rcn-ee.com/repos/debian/pool/main/r/rcn-ee-archive-keyring/rcn-ee-archive-keyring_2016.04.24~bpo70+20160424+1_all.deb
sudo dpkg -i rcn-ee-archive-keyring_*_all.deb

Add repo to /etc/apt/sources.list

sudo sh -c "echo 'deb [arch=armhf] http://repos.rcn-ee.com/debian wheezy main' >> /etc/apt/sources.list"
sudo sh -c "echo '#deb-src [arch=armhf] http://repos.rcn-ee.com/debian wheezy main' >> /etc/apt/sources.list"

Update packages:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install npm c9-core-installer --reinstall

Adding bb.org-overlays to jessie console image

Currently by default, the console image doesn't include the *.dtbo overlays.

Install build requirements: (add's 145Mb to the console image)

sudo apt-get update
sudo apt-get install build-essential git-core device-tree-compiler

Clone bb.org-overlays repo:

git clone https://github.com/beagleboard/bb.org-overlays/
cd ./bb.org-overlays/
./install.sh

i take full responsibility for knowing my beagle is now insecure

as of 2017-02-19, BeagleBoard images now longer enable these insecure options by default, you are free to recreate them as you wish.

remove root password

root_password=$(cat /etc/shadow | grep root | awk -F ':' '{print $2}')
sed -i -e 's:'$root_password'::g' /etc/shadow

ssh root@beaglebone.local

sed -i -e 's:PermitEmptyPasswords no:PermitEmptyPasswords yes:g' /etc/ssh/sshd_config
sed -i -e 's:UsePAM yes:UsePAM no:g' /etc/ssh/sshd_config
sed -i -e 's:PermitRootLogin without-password:PermitRootLogin yes:g' /etc/ssh/sshd_config

sudo no password required

echo "debian  ALL=NOPASSWD: ALL" >>/etc/sudoers

U-Boot Overlays

Check via serial

U-Boot SPL 2017.03-rc3-00002-g16d7481d17 (Mar 09 2017 - 14:55:03)
Trying to boot from MMC2

U-Boot 2017.03-rc3-00002-g16d7481d17 (Mar 09 2017 - 14:55:03 -0600), Build: jenkins-github_Bootloader-Builder-529

Check via system

debian@test-bbb-1:~$ cd /opt/scripts/tools/
debian@test-bbb-1:/opt/scripts/tools$ git pull
debian@test-bbb-1:/opt/scripts/tools$ sudo ./version.sh | grep bootloader
bootloader:[/dev/mmcblk1]:[U-Boot 2017.03-rc3-00002-g16d748]

To upgrade your version of U-Boot:

debian@beaglebone:~$ cd /opt/scripts/tools/developers/
debian@beaglebone:/opt/scripts/tools/developers$ sudo ./update_bootloader.sh
debian@beaglebone:/opt/scripts/tools/developers$ sudo reboot

U-Boot /boot/uEnv.txt configuration

/boot/uEnv.txt:

enable_uboot_overlays=1

U-Boot Disable on-board devices

To Disable eMMC:

disable_uboot_overlay_emmc=1

To Disable HDMI VIDEO & AUDIO:

disable_uboot_overlay_video=1

To Disable HDMI AUDIO: (first added in: 2017.03-rc1-00003-gb401af09b2 Build 515)

disable_uboot_overlay_audio=1

To Disable WL1835:

disable_uboot_overlay_wireless=1

U-Boot Override external capes

Cape device tree overlays: https://github.com/beagleboard/bb.org-overlays/
uboot_overlay_addr0=/lib/firmware/<file0>.dtbo
uboot_overlay_addr1=/lib/firmware/<file1>.dtbo
uboot_overlay_addr2=/lib/firmware/<file2>.dtbo
uboot_overlay_addr3=/lib/firmware/<file3>.dtbo

Plus one custom cape:

dtb_overlay=/lib/firmware/<file4>.dtbo

U-Boot Cape Universal

Utilize https://github.com/cdsteinkuehler/beaglebone-universal-io config-pin.

To enable, in /boot/uEnv.txt add: (first added in: 2017.03-rc1-00003-g15396d3873 Build 516)

enable_uboot_cape_universal=1

Debian Build Instructions

You'll want a fairly beefy ARM system to run this script.

git clone git://github.com/beagleboard/image-builder.git
cd image-builder
./beagleboard.org_image.sh

Output of the autobuilder can be found at http://builds.beagleboard.org.

Debian Releases

http://beagleboard.org/latest-images

BeagleBoard-X15 weekly

Bug tracker: http://bugs.elinux.org/projects/beagleboard-x15

microSD/Standalone: (lxqt-4gb) (BeagleBoard-X15) Get prebuilt image:

wget https://rcn-ee.com/rootfs/bb.org/testing/2017-03-19/lxqt-4gb/bbx15-debian-8.7-lxqt-4gb-armhf-2017-03-19-4gb.img.xz

Verify Image with:

sha256sum bbx15-debian-8.7-lxqt-4gb-armhf-2017-03-19-4gb*
120e021769d9c0c29eb74a19b8d774aae8ebe411a8de46ad228d2eb8131d1f62  bbx15-debian-8.7-lxqt-4gb-armhf-2017-03-19-4gb.img.xz

Windows/Mac/Linux gui

http://etcher.io

Linux: (dd)

xzcat bbx15-debian-8.7-lxqt-4gb-armhf-2017-03-19-4gb.img.xz | sudo dd of=/dev/sdX

Debian Image Testing Snapshots

2017-03-26

BBW/BBB (All Revs) Machinekit

microSD/Standalone: (machinekit) Based on Debian Jessie

Get prebuilt image:

wget https://rcn-ee.com/rootfs/bb.org/testing/2017-02-12/machinekit/bone-debian-8.7-machinekit-armhf-2017-02-12-4gb.img.xz

Verify Image with:

sha256sum bone-debian-8.7-machinekit-armhf-2017-02-12-4gb*
18361e0426715974b5a0e7f014ff1bf26db2421cbf8d61622efd2856cd8c6214  bone-debian-8.7-machinekit-armhf-2017-02-12-4gb.img.xz

Windows/Mac/Linux gui

http://etcher.io

Linux: (dd)

xzcat bone-debian-8.7-machinekit-armhf-2017-02-12-4gb.img.xz | sudo dd of=/dev/sdX

Jessie Snapshot lxqt

2017-03-26 notes

* U-Boot: v2017.03
* Kernel: 4.4.55-ti-r94

Flasher: (lxqt-4gb) (All BeagleBone Variants with a 4GB eMMC)

Get prebuilt image:

wget https://rcn-ee.com/rootfs/bb.org/testing/2017-03-26/lxqt-4gb/BBB-blank-debian-8.7-lxqt-4gb-armhf-2017-03-26-4gb.img.xz

Verify Image with:

sha256sum BBB-blank-debian-8.7-lxqt-4gb-armhf-2017-03-26-4gb*
010da5e944abb88293e71055d6754670ec69cd281e0d167f71e1bbd71f67ec0f  BBB-blank-debian-8.7-lxqt-4gb-armhf-2017-03-26-4gb.img.xz

Windows/Mac/Linux gui

http://etcher.io

Linux: (dd)

xzcat BBB-blank-debian-8.7-lxqt-4gb-armhf-2017-03-26-4gb.img.xz | sudo dd of=/dev/sdX

microSD/Standalone: (lxqt-4gb) (All BeagleBone Variants)

Get prebuilt image:

wget https://rcn-ee.com/rootfs/bb.org/testing/2017-03-26/lxqt-4gb/bone-debian-8.7-lxqt-4gb-armhf-2017-03-26-4gb.img.xz

Verify Image with:

sha256sum bone-debian-8.7-lxqt-4gb-armhf-2017-03-26-4gb*
207b74988595d76d322cc8ec1c7544cd19dcca470e6f1c2c5526cbfad1c416cc  bone-debian-8.7-lxqt-4gb-armhf-2017-03-26-4gb.img.xz

Windows/Mac/Linux gui

http://etcher.io

Linux: (dd)

xzcat bone-debian-8.7-lxqt-4gb-armhf-2017-03-26-4gb.img.xz | sudo dd of=/dev/sdX

microSD/Standalone: (lxqt-4gb) (BeagleBoard-X15)

Get prebuilt image:

wget https://rcn-ee.com/rootfs/bb.org/testing/2017-03-26/lxqt-4gb/bbx15-debian-8.7-lxqt-4gb-armhf-2017-03-26-4gb.img.xz

Verify Image with:

sha256sum bbx15-debian-8.7-lxqt-4gb-armhf-2017-03-26-4gb*
c9809150ef0db6fb4888e7d04818c1bd9ea60154ccabec803f8f89dc144cb15a  bbx15-debian-8.7-lxqt-4gb-armhf-2017-03-26-4gb.img.xz

Windows/Mac/Linux gui

http://etcher.io

Linux: (dd)

xzcat bbx15-debian-8.7-lxqt-4gb-armhf-2017-03-26-4gb.img.xz | sudo dd of=/dev/sdX

microSD/Standalone: (lxqt-2gb) (All BeagleBone Variants)

Get prebuilt image:

wget https://rcn-ee.com/rootfs/bb.org/testing/2017-03-26/lxqt-2gb/bone-debian-8.7-lxqt-2gb-armhf-2017-03-26-2gb.img.xz

Verify Image with:

sha256sum bone-debian-8.7-lxqt-2gb-armhf-2017-03-26-2gb*
4bb9a93d2e7a9c4ff2fa58342d0dc1cf62f043987bec779dc9e6a4edb3999d13  bone-debian-8.7-lxqt-2gb-armhf-2017-03-26-2gb.img.xz

Windows/Mac/Linux gui

http://etcher.io

Linux: (dd)

xzcat bone-debian-8.7-lxqt-2gb-armhf-2017-03-26-2gb.img.xz | sudo dd of=/dev/sdX

microSD/Standalone: (lxqt-xm-4gb) (BeagleBoard xM)

Get prebuilt image:

wget https://rcn-ee.com/rootfs/bb.org/testing/2017-03-26/lxqt-xm-4gb/bbxm-debian-8.7-lxqt-xm-4gb-armhf-2017-03-26-4gb.img.xz

Verify Image with:

sha256sum bbxm-debian-8.7-lxqt-xm-4gb-armhf-2017-03-26-4gb*
8d441e0aa39254e28d4b740c8d99f5e61cd7d5676f78f2a66f95d914b1a1b2f0  bbxm-debian-8.7-lxqt-xm-4gb-armhf-2017-03-26-4gb.img.xz

Windows/Mac/Linux gui

http://etcher.io

Linux: (dd)

xzcat bbxm-debian-8.7-lxqt-xm-4gb-armhf-2017-03-26-4gb.img.xz | sudo dd of=/dev/sdX

Jessie Snapshot lxqt U-Boot Overlay

U-Boot Overlay Flasher: (lxqt-4gb) (All BeagleBone Variants with a 4GB eMMC)

Get prebuilt image:

wget https://rcn-ee.com/rootfs/bb.org/testing/2017-03-26/lxqt-4gb/BBB-blank-uboot-overlay-debian-8.7-lxqt-4gb-armhf-2017-03-26-4gb.img.xz

Verify Image with:

sha256sum BBB-blank-uboot-overlay-debian-8.7-lxqt-4gb-armhf-2017-03-26-4gb*
fd8f82d24084cd509e4015601fc7253acd3481e63f5ad5997e2484cac47a4494  BBB-blank-uboot-overlay-debian-8.7-lxqt-4gb-armhf-2017-03-26-4gb.img.xz

Windows/Mac/Linux gui

http://etcher.io

Linux: (dd)

xzcat BBB-blank-uboot-overlay-debian-8.7-lxqt-4gb-armhf-2017-03-26-4gb.img.xz | sudo dd of=/dev/sdX

Jessie Snapshot iot

Flasher: (iot) (All BeagleBone Variants)

Get prebuilt image:

wget https://rcn-ee.com/rootfs/bb.org/testing/2017-03-26/iot/BBB-blank-debian-8.7-iot-armhf-2017-03-26-4gb.img.xz

Verify Image with:

sha256sum BBB-blank-debian-8.7-iot-armhf-2017-03-26-4gb*
b4099958b1782f7ef4c86ba14ef53ca3893dc9e58203b1ae30191bd66f686fe6  BBB-blank-debian-8.7-iot-armhf-2017-03-26-4gb.img.xz

Windows/Mac/Linux gui

http://etcher.io

Linux: (dd)

xzcat BBB-blank-debian-8.7-iot-armhf-2017-03-26-4gb.img.xz | sudo dd of=/dev/sdX

microSD/Standalone: (iot) (All BeagleBone Variants)

Get prebuilt image:

wget https://rcn-ee.com/rootfs/bb.org/testing/2017-03-26/iot/bone-debian-8.7-iot-armhf-2017-03-26-4gb.img.xz

Verify Image with:

sha256sum bone-debian-8.7-iot-armhf-2017-03-26-4gb*
db7c2bed77dc3ddc742a02404cb73732a5b3be827d79d6a84f26aec04ff8e493  bone-debian-8.7-iot-armhf-2017-03-26-4gb.img.xz

Windows/Mac/Linux gui

http://etcher.io

Linux: (dd)

xzcat bone-debian-8.7-iot-armhf-2017-03-26-4gb.img.xz | sudo dd of=/dev/sdX

Jessie Snapshot console

microSD/Standalone: (console) (All BeagleBone Variants)

Get prebuilt image:

wget https://rcn-ee.com/rootfs/bb.org/testing/2017-03-26/console/bone-debian-8.7-console-armhf-2017-03-26-1gb.img.xz

Verify Image with:

sha256sum bone-debian-8.7-console-armhf-2017-03-26-1gb*
56e67b9d4d364ebcc4e1c5e37c7158cb8ac62737cb64ee5f53666591e1536bf6  bone-debian-8.7-console-armhf-2017-03-26-1gb.img.xz

Windows/Mac/Linux gui

http://etcher.io

Linux: (dd)

xzcat bone-debian-8.7-console-armhf-2017-03-26-1gb.img.xz | sudo dd of=/dev/sdX

microSD/Standalone: (console) (BeagleBoard-X15)

Get prebuilt image:

wget https://rcn-ee.com/rootfs/bb.org/testing/2017-03-26/console/bbx15-debian-8.7-console-armhf-2017-03-26-1gb.img.xz

Verify Image with:

sha256sum bbx15-debian-8.7-console-armhf-2017-03-26-1gb*
c90b650fced057a07494f2ffbda712804c71a78dc9e281b6d973c74eb07ea8cb  bbx15-debian-8.7-console-armhf-2017-03-26-1gb.img.xz

Windows/Mac/Linux gui

http://etcher.io

Linux: (dd)

xzcat bbx15-debian-8.7-console-armhf-2017-03-26-1gb.img.xz | sudo dd of=/dev/sdX

Stretch testing

https://wiki.debian.org/DebianStretch

2017-03-26 notes

* U-Boot: v2017.03
* Kernel: 4.9.13-ti-r25

microSD/Standalone: (testing) (All BeagleBone Variants)

Get prebuilt image:

wget https://rcn-ee.com/rootfs/bb.org/testing/2017-03-26/stretch-iot/bone-debian-stretch-iot-armhf-2017-03-26-4gb.img.xz

Verify Image with:

sha256sum bone-debian-stretch-iot-armhf-2017-03-26-4gb*
8bf053e2638d6cea74d33c2b713830971a2e93a0becb77120d00531afc8c1e1b  bone-debian-stretch-iot-armhf-2017-03-26-4gb.img.xz

Windows/Mac/Linux gui

http://etcher.io

Linux: (dd)

xzcat bone-debian-stretch-iot-armhf-2017-03-26-4gb.img.xz | sudo dd of=/dev/sdX

microSD/Standalone: (testing) (BeagleBoard-X15)

Get prebuilt image:

wget https://rcn-ee.com/rootfs/bb.org/testing/2017-03-26/stretch-iot/bbx15-debian-stretch-iot-armhf-2017-03-26-4gb.img.xz

Verify Image with:

sha256sum bbx15-debian-stretch-iot-armhf-2017-03-26-4gb*
e69eef61d7b1583f32288d05aa2244c0bd4acfeb5056b2c478994ae4e6099e68  bbx15-debian-stretch-iot-armhf-2017-03-26-4gb.img.xz

Windows/Mac/Linux gui

http://etcher.io

Linux: (dd)

xzcat bbx15-debian-stretch-iot-armhf-2017-03-26-4gb.img.xz | sudo dd of=/dev/sdX

Kernel Options

General apt syntax for searching and installing a specific kernel:

sudo apt-get update
sudo apt-cache search linux-image | grep <branch>
sudo apt-get install linux-image-<specific version>
sudo reboot

Latest kernel script

cd /opt/scripts/tools/
git pull
sudo ./update_kernel.sh <OPTIONS>

3.8.x

This is the first beagleboard.org long term kernel tree with capemanager support, it's been the default install for Debian Wheezy

beagleboard.org patchset: https://github.com/beagleboard/linux/tree/3.8
3.8.x BeagleBone/BeagleBone Black FULL Cape Support
--bone-channel --stable
3.8.x BeagleBone/BeagleBone Black FULL Cape Support + Xenomai
--bone-xenomai-channel --stable

4.4.x-ti

beagleboard.org patchset: https://github.com/beagleboard/linux/tree/4.4
Based on: http://git.ti.com/gitweb/?p=ti-linux-kernel/ti-linux-kernel.git;a=shortlog;h=refs/heads/ti-rt-linux-4.4.y
4.4.x-ti All BeagleBone Variants and BeagleBoard-X15
--ti-channel --lts-4_4
4.4.x-ti All BeagleBone Variants and BeagleBoard-X15 + RT
--ti-rt-channel --lts-4_4
4.4.x-ti All BeagleBone Variants and BeagleBoard-X15 + Xenomai
--ti-xenomai-channel --lts-4_4

4.9.x-ti

beagleboard.org patchset: https://github.com/beagleboard/linux/tree/4.9
4.9.x-ti All BeagleBone Variants and BeagleBoard-X15
--ti-channel --lts-4_9

Mainline (4.4.x lts)

4.4.x All BeagleBone Variants
--bone-kernel --lts-4_4
4.4.x All BeagleBone Variants + RT
--bone-rt-kernel --lts-4_4

Mainline (4.9.x lts)

4.9.x All BeagleBone Variants
--bone-kernel --lts-4_9

Debian 8: jessie

sudo apt-get install linux-image-armmp