Difference between revisions of "Beagleboard:BeagleBone Debian Image Migration"

From eLinux.org
Jump to: navigation, search
(U-Boot Overlays)
Line 63: Line 63:
 
   echo uio_pruss_enable >/sys/devices/platform/bone_capemgr/slots
 
   echo uio_pruss_enable >/sys/devices/platform/bone_capemgr/slots
  
==U-Boot Overlays==
+
===U-Boot Overlays (experimental)===
  
 
U-Boot Overlays is currently under development, while the items below may work on "last weeks" version. Please report bugs to: https://github.com/beagleboard/bb.org-overlays/issues Always double check the version you are using for comparison.
 
U-Boot Overlays is currently under development, while the items below may work on "last weeks" version. Please report bugs to: https://github.com/beagleboard/bb.org-overlays/issues Always double check the version you are using for comparison.
  
::That means this info does NOT belong on this page!  This is quick reference for "wheezy vs jessie", not a testing ground for experimental patches. Please move this stuff elsewhere. [[User:Matthijs|Matthijs]] ([[User talk:Matthijs|talk]]) 11:52, 9 March 2017 (PST)
+
::That means this info does NOT belong on this page!  This is quick reference for "wheezy vs jessie", not a testing ground for experimental patches and definitely not a tutorial on upgrading u-boot. Please move this stuff elsewhere. [[User:Matthijs|Matthijs]] ([[User talk:Matthijs|talk]]) 11:52, 9 March 2017 (PST)
  
 
Check via serial
 
Check via serial

Revision as of 13:17, 9 March 2017

Kernel

What changes were made to sysfs?
3.8 kernel sysfs entry 4.x kernel sysfs entry
/sys/devices/bone_capemgr.* /sys/devices/platform/bone_capemgr
/sys/devices/ocp.* /sys/devices/platform/ocp/
/sys/devices/ocp.*/helper.*/AIN* /sys/bus/iio/devices/iio:device0

Device Tree

cape-universal

Help! My overlay won't load! There's just this weird cape in slot 4.

You've met cape-universal. It is meant to often make overlays unnecessary, but you can also just disable it by changing the following line in /boot/uEnv.txt:

  cmdline=coherent_pool=1M quiet cape_universal=enable

to

  cmdline=coherent_pool=1M quiet

cape-universal is also automatically disabled if bone_capemgr.enable_partno occurs in the kernel cmdline (even if its argument is blank) or any overlay is already applied via capemgr before cape-universal can be loaded.

Disabling eMMC or HDMI

HDMI and eMMC are now part of the main dtb instead of being virtual CAPEs, which means that to disable these you change the 'dtb' variable in /boot/uEnv.txt instead of using capemgr.disable_partno:

3.8 kernel

cape_disable=capemgr.disable_partno=

4.x kernel

dtb=

(blank) am335x-boneblack.dtb
BB-BONELT-HDMI ?
BB-BONELT-HDMI,BB-BONELT-HDMIN am335x-boneblack-emmc-overlay.dtb
BB-BONE-EMMC-2G am335x-boneblack-hdmi-overlay.dtb
BB-BONE-EMMC-2G,BB-BONELT-HDMI am335x-boneblack-nhdmi-overlay.dtb
BB-BONE-EMMC-2G,BB-BONELT-HDMI,BB-BONELT-HDMIN am335x-boneblack-overlay.dtb

See also this survey of BeagleBone DTBs.

Enabling the ADC

This requires configuring the ADC via device tree, e.g. by loading the /lib/firmware/BB-ADC-00A0.dtbo overlay (source code) using capemgr:

  echo BB-ADC >/sys/devices/platform/bone_capemgr/slots

The ADC will appear as an IIO device (see /sys/bus/iio/devices/)

Enabling PRUSS

Same story as the ADC except using uio_pruss_enable-00A0.dtbo:

  echo uio_pruss_enable >/sys/devices/platform/bone_capemgr/slots

U-Boot Overlays (experimental)

U-Boot Overlays is currently under development, while the items below may work on "last weeks" version. Please report bugs to: https://github.com/beagleboard/bb.org-overlays/issues Always double check the version you are using for comparison.

That means this info does NOT belong on this page! This is quick reference for "wheezy vs jessie", not a testing ground for experimental patches and definitely not a tutorial on upgrading u-boot. Please move this stuff elsewhere. Matthijs (talk) 11:52, 9 March 2017 (PST)

Check via serial

U-Boot SPL 2017.03-rc1-00003-ga09f2d69d3 (Feb 08 2017 - 16:09:51)
Trying to boot from MMC2

U-Boot 2017.03-rc1-00003-ga09f2d69d3 (Feb 08 2017 - 16:09:51 -0600), Build: jenkins-github_Bootloader-Builder-518

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/mmcblk0]:[U-Boot 2017.03-rc3-00002-g3b04d5]

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

Note, do not have a "/uEnv.txt" file, backwards compatibility for ancient U-Boot's is not currently supported, so make sure to "sudo rm /uEnv.txt"... At a minimum, "enable_uboot_overlays=1" must be in /boot/uEnv.txt for U-Boot to take over loading overlays.

/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