BBB

From DaqWiki
Jump to navigation Jump to search

Beagle Bone Black

Links

On-board hardware

  • AM3358BZCZ100 CPU
  • 512MB DDR3 memory
  • 4GB eMMC (MMC1, 8bit)
  • uSD slot (MMC0, 4 bit)
  • 100Mbit/s ethernet (MII1)
  • USB host (USB1)
  • USB slave (USB serial, USB network) (USB0)
  • 24LC32A 32Kb I2C EEPROM (8kibytes) (I2C0)
  • S1 Reset button
  • S2 Boot switch button
  • S3 Power button

Serial console

AM3359 UART0 is connected to header J1. Use "USB to TTL serial cable 3.3V". Pinout:

Header J1 (J1 = black wire):

1 - GND - (Black)
2 - nc - (Brown)
3 - nc - (Red)
4 - UART0 - RX (Orange)
5 - UART0 - TX (Yellow)
6 - nc - (Green)
The default serial port settings for the board are:

Baud: 115,200
Bits: 8
Parity: N
Stop Bits: 1
Flow control: None

Use this one: http://www.digikey.ca/product-detail/en/ftdi-future-technology-devices-international-ltd/TTL-232R-3V3/768-1015-ND/1836393

Figure 4.1 TTL-232R-5V and TTL-232R-3V3, 6 Way Header Pin Out https://www.digikey.ca/en/datasheets/ftdifuturetechnologydevicesinternationalltd/ftdi-future-technology-devices-international-ltddsttl232rcables

The 5-pin plug mates with the 5 pin header on the BBB. The "black" wire is the ground, connects to header pin 1.

To force a boot from the microSD card, press S2 (Boot Switch) and S3 (power button) at the same time.

Benchmarks

root@beaglebone:~# uname -a
Linux beaglebone 3.8.13-bone47 #1 SMP Fri Apr 11 01:36:09 UTC 2014 armv7l GNU/Linux
root@beaglebone:~# cat /proc/cpu
cat: /proc/cpu: Is a directory
root@beaglebone:~# cat /proc/cpu
cpu/     cpuinfo  
root@beaglebone:~# cat /proc/cpuinfo 
processor	: 0
model name	: ARMv7 Processor rev 2 (v7l)
BogoMIPS	: 298.24
Features	: swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x3
CPU part	: 0xc08
CPU revision	: 2

Hardware	: Generic AM33XX (Flattened Device Tree)
Revision	: 0000
Serial		: 0000000000000000
root@beaglebone:~# 
root@beaglebone:~# ./memcpy_arm 
memcpy       1 KiBytes:    417 MB/sec
memcpy       2 KiBytes:    960 MB/sec
memcpy       4 KiBytes:   1199 MB/sec
memcpy       8 KiBytes:   1338 MB/sec
memcpy      16 KiBytes:   1412 MB/sec
memcpy      32 KiBytes:   1453 MB/sec
memcpy      64 KiBytes:   1313 MB/sec
memcpy     128 KiBytes:   1394 MB/sec
memcpy     256 KiBytes:    516 MB/sec
memcpy     512 KiBytes:    261 MB/sec
memcpy    1024 KiBytes:    210 MB/sec
memcpy    2048 KiBytes:    203 MB/sec
memcpy    4096 KiBytes:    201 MB/sec
memcpy    8192 KiBytes:    205 MB/sec
memcpy   16384 KiBytes:    205 MB/sec
memcpy   32768 KiBytes:    189 MB/sec
memcpy   65536 KiBytes:    203 MB/sec
memcpy  131072 KiBytes:    202 MB/sec
root@beaglebone:~# 

2014 image

root@beaglebone:~# blkid
/dev/mmcblk1p2: LABEL="rootfs" UUID="e884e88d-ea6e-40f2-8521-0a68832c5978" TYPE="ext4" 
/dev/mmcblk1p1: SEC_TYPE="msdos" LABEL="boot" UUID="0BDD-F792" TYPE="vfat" 
/dev/mmcblk0p1: LABEL="BBB_LAUREN" UUID="82A6-7DA7" TYPE="vfat" 
root@beaglebone:~# 
root@beaglebone:~# fdisk -l

Disk /dev/mmcblk0: 15.7 GB, 15707668480 bytes
255 heads, 63 sectors/track, 1909 cylinders, total 30679040 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: 0x00000000

        Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1   *        8192    30679039    15335424    c  W95 FAT32 (LBA)

Disk /dev/mmcblk1: 3925 MB, 3925868544 bytes
4 heads, 16 sectors/track, 119808 cylinders, total 7667712 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: 0x00000000

        Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk1p1   *        2048      198655       98304    e  W95 FAT16 (LBA)
/dev/mmcblk1p2          198656     7667711     3734528   83  Linux

Disk /dev/mmcblk1boot1: 1 MB, 1048576 bytes
4 heads, 16 sectors/track, 32 cylinders, total 2048 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: 0x00000000

Disk /dev/mmcblk1boot1 doesn't contain a valid partition table

Disk /dev/mmcblk1boot0: 1 MB, 1048576 bytes
4 heads, 16 sectors/track, 32 cylinders, total 2048 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: 0x00000000

Disk /dev/mmcblk1boot0 doesn't contain a valid partition table
root@beaglebone:~# 
root@beaglebone:~# df -kl
Filesystem                                             1K-blocks    Used Available Use% Mounted on
rootfs                                                   3610232 1760200   1663308  52% /
udev                                                       10240       0     10240   0% /dev
tmpfs                                                     101804    2084     99720   3% /run
/dev/disk/by-uuid/e884e88d-ea6e-40f2-8521-0a68832c5978   3610232 1760200   1663308  52% /
tmpfs                                                     254508       0    254508   0% /dev/shm
tmpfs                                                     254508       0    254508   0% /sys/fs/cgroup
tmpfs                                                     102400       0    102400   0% /run/user
tmpfs                                                       5120       0      5120   0% /run/lock
/dev/mmcblk1p1                                             98094   73336     24758  75% /boot/uboot
/dev/mmcblk0p1                                          15319040 2045576  13273464  14% /media/BBB_LAUREN
root@beaglebone:~# 

Copy of all files here:

/daq/daqshare/olchansk/BBB/2014-image

2018-01-05 image

Images of working system built by Keith Ong from Pierre 2018-01-05. To move mirrors, run ~debian/Programming/mems.c.

All the blkid, fdisk partitions, etc is same as before. OS is "Debian GNU/Linux 7.8 (wheezy)".

root@beaglebone:~# uname -a
Linux beaglebone 3.8.13-bone70 #1 SMP Fri Jan 23 02:15:42 UTC 2015 armv7l GNU/Linux

Images in /daq/daqshare/olchansk/BBB/2018-01-05.


2018-10-07 image

The image was downloaded from https://debian.beagleboard.org/images/BBB-blank-debian-9.5-iot-armhf-2018-10-07-4gb.img.xz

(base) layla@layla-Aspire-E5-575T:~$ sudo minicom
[sudo] password for layla: 

                                                                                                                                                                                       
Welcome to minicom 2.7.1

OPTIONS: I18n 
Compiled on Aug 13 2017, 15:25:34.
Port /dev/ttyUSB0, 09:13:26

Press CTRL-A Z for help on special keys

CCCCCCCC
U-Boot SPL 2018.09-00002-g0b54a51eee (Sep 10 2018 - 19:41:39 -0500)
Trying to boot from MMC1
Loading Environment from EXT4... ** File not found /boot/uboot.env **

** Unable to read "/boot/uboot.env" from mmc0:1 **


U-Boot 2018.09-00002-g0b54a51eee (Sep 10 2018 - 19:41:39 -0500), Build: jenkins-github_Bootloader-Builder-65

CPU  : AM335X-GP rev 2.1
I2C:   ready
DRAM:  512 MiB
No match for driver 'omap_hsmmc'
No match for driver 'omap_hsmmc'
Some drivers were not found
Reset Source: Power-on reset has occurred.
RTC 32KCLK Source: External.
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from EXT4... ** File not found /boot/uboot.env **

** Unable to read "/boot/uboot.env" from mmc0:1 **
Board: BeagleBone Black
<ethaddr> not set. Validating first E-fuse MAC
BeagleBone Black:
BeagleBone: cape eeprom: i2c_probe: 0x54:
BeagleBone: cape eeprom: i2c_probe: 0x55:
BeagleBone: cape eeprom: i2c_probe: 0x56:
BeagleBone: cape eeprom: i2c_probe: 0x57:
Net:   eth0: MII MODE
cpsw, usb_ether
Press SPACE to abort autoboot in 2 seconds
board_name=[A335BNLT] ...
board_rev=[00C0] ...
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
gpio: pin 56 (gpio 56) value is 0
gpio: pin 55 (gpio 55) value is 0
gpio: pin 54 (gpio 54) value is 0
gpio: pin 53 (gpio 53) value is 1
switch to partitions #0, OK
mmc0 is current device
gpio: pin 54 (gpio 54) value is 1
Checking for: /uEnv.txt ...
Checking for: /boot.scr ...
Checking for: /boot/boot.scr ...
Checking for: /boot/uEnv.txt ...
gpio: pin 55 (gpio 55) value is 1
2098 bytes read in 35 ms (57.6 KiB/s)
Loaded environment from /boot/uEnv.txt
Checking if uname_r is set in /boot/uEnv.txt...
gpio: pin 56 (gpio 56) value is 1
Running uname_boot ...
loading /boot/vmlinuz-4.14.71-ti-r80 ...
10416640 bytes read in 936 ms (10.6 MiB/s)
debug: [enable_uboot_overlays=1] ...
debug: [enable_uboot_cape_universal=1] ...
debug: [uboot_base_dtb_univ=am335x-boneblack-uboot-univ.dtb] ...
uboot_overlays: [uboot_base_dtb=am335x-boneblack-uboot-univ.dtb] ...
uboot_overlays: Switching too: dtb=am335x-boneblack-uboot-univ.dtb ...
loading /boot/dtbs/4.14.71-ti-r80/am335x-boneblack-uboot-univ.dtb ...
161723 bytes read in 92 ms (1.7 MiB/s)
uboot_overlays: [fdt_buffer=0x60000] ...
uboot_overlays: loading /lib/firmware/BB-BONE-eMMC1-01-00A0.dtbo ...
1440 bytes read in 253 ms (4.9 KiB/s)
uboot_overlays: loading /lib/firmware/BB-HDMI-TDA998x-00A0.dtbo ...
5127 bytes read in 332 ms (14.6 KiB/s)
uboot_overlays: loading /lib/firmware/BB-ADC-00A0.dtbo ...
711 bytes read in 148 ms (3.9 KiB/s)
uboot_overlays: loading /lib/firmware/AM335X-PRU-RPROC-4-14-TI-00A0.dtbo ...
3513 bytes read in 204 ms (16.6 KiB/s)
loading /boot/initrd.img-4.14.71-ti-r80 ...
4530240 bytes read in 424 ms (10.2 MiB/s)
debug: [console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh] ...
debug: [bootz 0x82000000 0x88080000:452040 88000000] ...
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
   Loading Ramdisk to 8fbad000, end 8ffff040 ... OK
   reserving fdt memory region: addr=88000000 size=89000
   Loading Device Tree to 8fb21000, end 8fbacfff ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.71-ti-r80 (root@b2-am57xx-beagle-x15-2gb) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)) #1 SMP PREEMPT Fri Oct 5 23:50:11 UTC 2018
[    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: TI AM335x BeagleBone Black
[    0.000000] Memory policy: Data cache writeback
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] cma: Reserved 48 MiB at 0x9c800000
[    0.000000] CPU: All CPU(s) started in SVC mode.
[    0.000000] AM335X ES2.1 (sgx neon)
[    0.000000] random: get_random_bytes called from start_kernel+0xac/0x458 with crng_init=0
[    0.000000] percpu: Embedded 18 pages/cpu @df8e7000 s41548 r8192 d23988 u73728
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 129412
[    0.000000] Kernel command line: console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait init=/opt/scripts/tools/eMMC/init-eMMC-flasher-h
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 440272K/522240K available (13312K kernel code, 1169K rwdata, 4364K rodata, 1024K init, 361K bss, 32816K reserved, 49152K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xe0000000 - 0xff800000   ( 504 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xdfe00000   ( 510 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0e00000   (14304 kB)
[    0.000000]       .init : 0xc1400000 - 0xc1500000   (1024 kB)
[    0.000000]       .data : 0xc1500000 - 0xc1624498   (1170 kB)
[    0.000000]        .bss : 0xc162eb2c - 0xc1689000   ( 362 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] ftrace: allocating 42734 entries in 126 pages
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]  RCU restricting CPUs from NR_CPUS=2 to nr_cpu_ids=1.
[    0.000000]  Tasks RCU enabled.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
[    0.000000] OMAP clockevent source: timer2 at 24000000 Hz
[    0.000024] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000054] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000067] OMAP clocksource: timer1 at 24000000 Hz
[    0.002127] timer_probe: no matching timers found
[    0.002472] Console: colour dummy device 80x30
[    0.002509] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
[    0.002518] This ensures that you still see kernel messages. Please
[    0.002525] update your kernel commandline.
[    0.002555] Calibrating delay loop... 995.32 BogoMIPS (lpj=1990656)
[    0.021101] pid_max: default: 32768 minimum: 301
[    0.021374] Security Framework initialized
[    0.021394] Yama: becoming mindful.
[    0.021437] AppArmor: AppArmor disabled by boot time parameter
[    0.021517] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.021533] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.022560] CPU: Testing write buffer coherency: ok
[    0.023084] CPU0: thread -1, cpu 0, socket -1, mpidr 0
[    0.037185] Setting up static identity map for 0x80100000 - 0x80100060
[    0.045099] Hierarchical SRCU implementation.
[    0.056226] EFI services will not be available.
[    0.061107] smp: Bringing up secondary CPUs ...
[    0.061128] smp: Brought up 1 node, 1 CPU
[    0.061141] SMP: Total of 1 processors activated (995.32 BogoMIPS).
[    0.061152] CPU: All CPU(s) started in SVC mode.
[    0.062737] devtmpfs: initialized
[    0.101369] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[    0.101860] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.101892] futex hash table entries: 256 (order: 2, 16384 bytes)
[    0.105842] xor: measuring software checksum speed
[    0.145112]    arm4regs  :  1200.000 MB/sec
[    0.185073]    8regs     :  1075.000 MB/sec
[    0.225072]    32regs    :   988.000 MB/sec
[    0.265071]    neon      :  1620.000 MB/sec
[    0.265082] xor: using function: neon (1620.000 MB/sec)
[    0.265104] pinctrl core: initialized pinctrl subsystem
[    0.266340] NET: Registered protocol family 16
[    0.269357] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.360371] omap_hwmod: debugss: _wait_target_disable failed
[    0.401183] cpuidle: using governor menu
[    0.407566] OMAP GPIO hardware version 0.1
[    0.433022] No ATAGs?
[    0.433042] hw-breakpoint: debug architecture 0x4 unsupported.
[    0.434669] omap4_sram_init:Unable to allocate sram needed to handle errata I688
[    0.434695] omap4_sram_init:Unable to get sram pool needed to handle errata I688
[    0.529131] raid6: neonx2   gen()  1883 MB/s
[    0.597099] raid6: neonx2   xor()  1497 MB/s
[    0.597111] raid6: using algorithm neonx2 gen() 1883 MB/s
[    0.597121] raid6: .... xor() 1497 MB/s, rmw enabled
[    0.597131] raid6: using neon recovery algorithm
[    0.604930] edma 49000000.edma: TI EDMA DMA engine driver
[    0.611808] SCSI subsystem initialized
[    0.613575] usbcore: registered new interface driver usbfs
[    0.613653] usbcore: registered new interface driver hub
[    0.613774] usbcore: registered new device driver usb
[    0.614688] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring probe
[    0.615679] omap_i2c 4802a000.i2c: bus 1 rev0.11 at 100 kHz
[    0.616974] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 100 kHz
[    0.617504] media: Linux media interface: v0.10
[    0.617565] Linux video capture interface: v2.00
[    0.617754] pps_core: LinuxPPS API ver. 1 registered
[    0.617768] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.617797] PTP clock support registered
[    0.618447] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
[    0.621463] Advanced Linux Sound Architecture Driver Initialized.
[    0.622190] NetLabel: Initializing
[    0.622206] NetLabel:  domain hash size = 128
[    0.622216] NetLabel:  protocols = UNLABELED CIPSOv4 CALIPSO
[    0.622304] NetLabel:  unlabeled traffic allowed by default
[    0.625524] clocksource: Switched to clocksource timer1
[    0.789482] VFS: Disk quotas dquot_6.6.0
[    0.789730] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.802384] NET: Registered protocol family 2
[    0.803343] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.803396] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
[    0.803457] TCP: Hash tables configured (established 4096 bind 4096)
[    0.803579] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.803606] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.803819] NET: Registered protocol family 1
[    0.812792] RPC: Registered named UNIX socket transport module.
[    0.812812] RPC: Registered udp transport module.
[    0.812821] RPC: Registered tcp transport module.
[    0.812829] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.813866] Unpacking initramfs...
[    1.017589] random: fast init done
[    1.061783] Freeing initrd memory: 4428K
[    1.062357] hw perfevents: no interrupt-affinity property for /pmu, guessing.
[    1.062583] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
[    1.064660] audit: initializing netlink subsys (disabled)
[    1.066140] audit: type=2000 audit(1.064:1): state=initialized audit_enabled=0 res=1
[    1.066293] workingset: timestamp_bits=14 max_order=17 bucket_order=3
[    1.072241] zbud: loaded
[    1.079927] NFS: Registering the id_resolver key type
[    1.079978] Key type id_resolver registered
[    1.079988] Key type id_legacy registered
[    1.080009] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    1.080392] fuse init (API version 7.26)
[    1.081001] SGI XFS with ACLs, security attributes, realtime, no debug enabled
[    1.100227] Key type asymmetric registered
[    1.100256] Asymmetric key parser 'x509' registered
[    1.100386] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245)
[    1.104733] io scheduler noop registered
[    1.104753] io scheduler deadline registered
[    1.105155] io scheduler cfq registered (default)
[    1.105169] io scheduler mq-deadline registered
[    1.107666] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
[    1.119675] gpio-of-helper ocp:cape-universal: ready
[    1.130645] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle
[    1.132879] Serial: 8250/16550 driver, 6 ports, IRQ sharing disabled
[    1.136609] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 30, base_baud = 3000000) is a 8250
[    1.988280] console [ttyS0] enabled
[    1.992995] 48022000.serial: ttyS1 at MMIO 0x48022000 (irq = 31, base_baud = 3000000) is a 8250
[    2.002886] 48024000.serial: ttyS2 at MMIO 0x48024000 (irq = 32, base_baud = 3000000) is a 8250
[    2.012757] 481a6000.serial: ttyS3 at MMIO 0x481a6000 (irq = 33, base_baud = 3000000) is a 8250
[    2.022621] 481a8000.serial: ttyS4 at MMIO 0x481a8000 (irq = 34, base_baud = 3000000) is a 8250
[    2.032458] 481aa000.serial: ttyS5 at MMIO 0x481aa000 (irq = 35, base_baud = 3000000) is a 8250
[    2.044635] omap_rng 48310000.rng: Random Number Generator ver. 20
[    2.052277] [drm] Initialized vgem 1.0.0 20120112 for virtual device on minor 0
[    2.059908] usbcore: registered new interface driver udl
[    2.072907] at24 2-0054: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
[    2.080232] at24 2-0055: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
[    2.087435] at24 2-0056: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
[    2.094612] at24 2-0057: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
[    2.102099] eqep 48300180.eqep: ver. 1.0
[    2.106291] eqep 48300180.eqep: count_mode:0
[    2.110631] eqep 48300180.eqep: invert_qa:1
[    2.114861] eqep 48300180.eqep: invert_qb:1
[    2.119088] eqep 48300180.eqep: invert_qi:0
[    2.123314] eqep 48300180.eqep: invert_qs:0
[    2.127541] eqep 48300180.eqep: swap_inputs:0
[    2.131940] eqep 48300180.eqep: QDECCTL:0x0180
[    2.136426] eqep 48300180.eqep: QPOSINIT:0x00000000
[    2.141347] eqep 48300180.eqep: QPOSMAX:0xffffffff
[    2.146183] eqep 48300180.eqep: QPOSCNT:0x00000000
[    2.151020] eqep 48300180.eqep: omit_interrupt:0
[    2.155680] eqep 48300180.eqep: QEINT:0x0800
[    2.160000] eqep 48300180.eqep: QUPRD:0x05f5e100
[    2.164662] eqep 48300180.eqep: QEPCTL:0x009e write
[    2.169585] eqep 48300180.eqep: QEPCTL:0x009e read
[    2.174439] eqep 48300180.eqep: irq:135, clk_rate:100000000
[    2.180294] eqep 48302180.eqep: ver. 1.0
[    2.184417] eqep 48302180.eqep: count_mode:0
[    2.188748] eqep 48302180.eqep: invert_qa:1
[    2.192976] eqep 48302180.eqep: invert_qb:1
[    2.197202] eqep 48302180.eqep: invert_qi:0
[    2.201428] eqep 48302180.eqep: invert_qs:0
[    2.205654] eqep 48302180.eqep: swap_inputs:0
[    2.210054] eqep 48302180.eqep: QDECCTL:0x0180
[    2.214540] eqep 48302180.eqep: QPOSINIT:0x00000000
[    2.219462] eqep 48302180.eqep: QPOSMAX:0xffffffff
[    2.224296] eqep 48302180.eqep: QPOSCNT:0x00000000
[    2.229132] eqep 48302180.eqep: omit_interrupt:0
[    2.233792] eqep 48302180.eqep: QEINT:0x0800
[    2.238103] eqep 48302180.eqep: QUPRD:0x05f5e100
[    2.242763] eqep 48302180.eqep: QEPCTL:0x009e write
[    2.247685] eqep 48302180.eqep: QEPCTL:0x009e read
[    2.252534] eqep 48302180.eqep: irq:137, clk_rate:100000000
[    2.258347] eqep 48304180.eqep: ver. 1.0
[    2.262436] eqep 48304180.eqep: count_mode:0
[    2.266765] eqep 48304180.eqep: invert_qa:1
[    2.270994] eqep 48304180.eqep: invert_qb:1
[    2.275221] eqep 48304180.eqep: invert_qi:0
[    2.279447] eqep 48304180.eqep: invert_qs:0
[    2.283672] eqep 48304180.eqep: swap_inputs:0
[    2.288070] eqep 48304180.eqep: QDECCTL:0x0180
[    2.292557] eqep 48304180.eqep: QPOSINIT:0x00000000
[    2.297479] eqep 48304180.eqep: QPOSMAX:0xffffffff
[    2.302313] eqep 48304180.eqep: QPOSCNT:0x00000000
[    2.307150] eqep 48304180.eqep: omit_interrupt:0
[    2.311810] eqep 48304180.eqep: QEINT:0x0800
[    2.316121] eqep 48304180.eqep: QUPRD:0x05f5e100
[    2.320781] eqep 48304180.eqep: QEPCTL:0x009e write
[    2.325703] eqep 48304180.eqep: QEPCTL:0x009e read
[    2.330550] eqep 48304180.eqep: irq:139, clk_rate:100000000
[    2.365211] libphy: Fixed MDIO Bus: probed
[    2.370392] CAN device driver interface
[    2.375591] c_can_platform 481cc000.can: c_can_platform device registered (regs=fa1cc000, irq=42)
[    2.385623] c_can_platform 481d0000.can: c_can_platform device registered (regs=fa1d0000, irq=43)
[    2.449649] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6, bus freq 1000000
[    2.457403] davinci_mdio 4a101000.mdio: detected phy mask fffffffe
[    2.464652] MDIO: davinci_mdio: dt: updated phy_id[0] from phy_mask[fffffffe]
[    2.486558] libphy: 4a101000.mdio: probed
[    2.490892] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver SMSC LAN8710/LAN8720
[    2.501398] cpsw 4a100000.ethernet: Detected MACID = d0:5f:b8:a3:17:9b
[    2.508257] cpsw 4a100000.ethernet: initialized cpsw ale version 1.4
[    2.514732] cpsw 4a100000.ethernet: ALE Table size 1024
[    2.520071] cpsw 4a100000.ethernet: cpts: overflow check period 1250 (jiffies)
[    2.530933] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    2.537621] ehci-platform: EHCI generic platform driver
[    2.543287] ehci-omap: OMAP-EHCI Host Controller driver
[    2.549575] usbcore: registered new interface driver usb-storage
[    2.558958] am335x-phy-driver 47401300.usb-phy: 47401300.usb-phy supply vcc not found, using dummy regulator
[    2.572402] am335x-phy-driver 47401b00.usb-phy: 47401b00.usb-phy supply vcc not found, using dummy regulator
[    2.586953] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
[    2.592393] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 1
[    2.600181] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    2.607052] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.614336] usb usb1: Product: MUSB HDRC host driver
[    2.619347] usb usb1: Manufacturer: Linux 4.14.71-ti-r80 musb-hcd
[    2.625492] usb usb1: SerialNumber: musb-hdrc.1
[    2.631017] hub 1-0:1.0: USB hub found
[    2.634994] hub 1-0:1.0: 1 port detected
[    2.651230] omap_rtc 44e3e000.rtc: registered as rtc0
[    2.657957] i2c /dev entries driver
[    2.662705] Driver for 1-wire Dallas network protocol.
[    2.671345] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
[    2.678960] softdog: initialized. soft_noboot=0 soft_margin=60 sec soft_panic=0 (nowayout=0)
[    2.689034] cpuidle: enable-method property 'ti,am3352' found operations
[    2.696750] sdhci: Secure Digital Host Controller Interface driver
[    2.703040] sdhci: Copyright(c) Pierre Ossman
[    2.708312] omap_hsmmc 48060000.mmc: Got CD GPIO
[    2.791237] mmc0: host does not support reading read-only switch, assuming write-enable
[    2.800019] sdhci-pltfm: SDHCI platform and OF driver helper
[    2.802202] ledtrig-cpu: registered to indicate activity on CPUs
[    2.802722] omap-aes 53500000.aes: OMAP AES hw accel rev: 3.2
[    2.808836] omap-aes 53500000.aes: will run requests pump with realtime priority
[    2.817827] omap-sham 53100000.sham: hw accel on OMAP rev 4.3
[    2.834961] hidraw: raw HID events driver (C) Jiri Kosina
[    2.835638] usbcore: registered new interface driver usbhid
[    2.835642] usbhid: USB HID core driver
[    2.836047] remoteproc remoteproc0: wkup_m3 is available
[    2.867149] mmc0: new SDHC card at address 0001
[    2.872857] mmcblk0: mmc0:0001 0000 7.36 GiB 
[    2.879580]  mmcblk0: p1
[    2.892598] wireguard: WireGuard 0.0.20180925 loaded. See www.wireguard.com for information.
[    2.901329] wireguard: Copyright (C) 2015-2018 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
[    2.912038] NET: Registered protocol family 10
[    2.922491] Segment Routing with IPv6
[    2.926424] mip6: Mobile IPv6
[    2.929422] NET: Registered protocol family 17
[    2.933946] can: controller area network core (rev 20170425 abi 9)
[    2.940272] NET: Registered protocol family 29
[    2.944898] Key type dns_resolver registered
[    2.949271] mpls_gso: MPLS GSO support
[    2.953335] omap_voltage_late_init: Voltage driver support not added
[    2.960240] PM: Cannot get wkup_m3_ipc handle
[    2.964891] ThumbEE CPU extension supported.
[    2.969252] Registering SWP/SWPB emulation handler
[    2.975302] registered taskstats version 1
[    2.979685] zswap: loaded using pool lzo/zbud
[    2.986887] Btrfs loaded, crc32c=crc32c-generic
[    2.991619] ima: No TPM chip found, activating TPM-bypass! (rc=-19)
[    2.998182] ima: Allocated hash algorithm: sha256
[    3.008008] mmc1: new high speed MMC card at address 0001
[    3.018826] mmcblk1: mmc1:0001 MMC04G 3.60 GiB 
[    3.026479] mmcblk1boot0: mmc1:0001 MMC04G partition 1 2.00 MiB
[    3.033036] mmcblk1boot1: mmc1:0001 MMC04G partition 2 2.00 MiB
[    3.040219] mmcblk1rpmb: mmc1:0001 MMC04G partition 3 128 KiB
[    3.047568]  mmcblk1: p1
[    3.184478] tda998x 0-0070: found TDA19988
[    3.190338] tilcdc 4830e000.lcdc: bound 0-0070 (ops tda998x_ops)
[    3.196478] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
================================================================================
Starting eMMC Flasher from microSD media
Version: [1.20180412: all ssh regneration override...]
================================================================================

================================================================================
Prepare environment for flashing
Starting at Sat Jan  1 00:00:26 UTC 2000
----------------------------------------
==> Giving system time to stablize...
5 4 3 2 1 
==> Preparing /tmp
==> Preparing sysctl
==> sysctl: vm.min_free_kbytes=[2654]
==> sysctl: setting: [sysctl -w vm.min_free_kbytes=16384]
vm.min_free_kbytes = 16384
----------------------------------------
==> Determining root drive
==> console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh
----------------------------------------
==> root_drive=[/dev/mmcblk0p1]
====> Root drive identified at [/dev/mmcblk0p1]
==> Boot Drive [/dev/mmcblk0p1]
==> Figuring out Source and Destination devices
====> Source identified: [/dev/mmcblk0]
====> Destination identified: [/dev/mmcblk1]
==> Figuring out machine
====> Machine is TI_AM335x_BeagleBone_Black
====> Machine is compatible with BeagleBone Black
================================================================================
5 4 3 2 1 

========================================
Checking for Valid bbb-eeprom header
==> Valid bbb-eeprom header found [335]
========================================

================================================================================
Checking running system
==> Copying: [/dev/mmcblk0] -> [/dev/mmcblk1]
==> lsblk:
----------------------------------------
NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
mmcblk0      179:0    0  7.4G  0 disk 
`-mmcblk0p1  179:1    0  3.3G  0 part /
mmcblk1      179:8    0  3.6G  0 disk 
`-mmcblk1p1  179:9    0  3.6G  0 part 
mmcblk1boot0 179:16   0    2M  1 disk 
mmcblk1boot1 179:24   0    2M  1 disk 
mmcblk1rpmb  179:32   0  128K  0 disk 
----------------------------------------
==> df -h | grep rootfs:
----------------------------------------
==> Giving you time to check...
10 9 8 7 6 5 4 3 2 1 
================================================================================

================================================================================
Preparing drives

----------------------------------------
==> Erasing: /dev/mmcblk1
----------------------------------------
[   55.833629] random: crng init done
[   55.837078] random: 7 urandom warning(s) missed due to ratelimiting
108+0 records in
108+0 records out
113246208 bytes (113 MB, 108 MiB) copied, 11.1455 s, 10.2 MB/s
----------------------------------------
108+0 records in
108+0 records out
113246208 bytes (113 MB, 108 MiB) copied, 2.78876 s, 40.6 MB/s
----------------------------------------
==> Erasing: /dev/mmcblk1 complete
----------------------------------------

----------------------------------------
==> Loading /boot/SOC.sh
************************************************************
#!/bin/sh
format=1.0

board=am335x_evm

bootloader_location=dd_spl_uboot_boot
bootrom_gpt=

dd_spl_uboot_count=1
dd_spl_uboot_seek=1
dd_spl_uboot_conf=notrunc
dd_spl_uboot_bs=128k
dd_spl_uboot_backup=/opt/backup/uboot/MLO

dd_uboot_count=2
dd_uboot_seek=1
dd_uboot_conf=notrunc
dd_uboot_bs=384k
dd_uboot_backup=/opt/backup/uboot/u-boot.img

boot_fstype=ext4
conf_boot_startmb=4
conf_boot_endmb=
sfdisk_fstype=L

boot_label=BOOT
rootfs_label=rootfs

#Kernel
dtb=
serial_tty=ttyO0
usbnet_mem=

#Advanced options
#disable_ssh_regeneration=true

************************************************************
==> Loaded

----------------------------------------

================================================================================
Writing bootloader to [/dev/mmcblk1]
----------------------------------------
==> Figuring out options for SPL U-Boot copy ...
===> Will use : count=1 seek=1 conv=notrunc bs=128k
==> Figuring out options for U-Boot copy ...
===> Will use : count=2 seek=1 conv=notrunc bs=384k
==> Copying SPL U-Boot with dd if=/opt/backup/uboot/MLO of=/dev/mmcblk1 count=1 seek=1 conv=notrunc bs=128k
------------------------------------------------------------
0+1 records in
0+1 records out
90932 bytes (91 kB, 89 KiB) copied, 0.0234705 s, 3.9 MB/s
------------------------------------------------------------
==> Copying U-Boot with dd if=/opt/backup/uboot/u-boot.img of=/dev/mmcblk1 count=2 seek=1 conv=notrunc bs=384k
------------------------------------------------------------
1+1 records in
1+1 records out
447372 bytes (447 kB, 437 KiB) copied, 0.091553 s, 4.9 MB/s
------------------------------------------------------------
Writing bootloader completed
================================================================================

================================================================================
Partitionning /dev/mmcblk1
----------------------------------------
sfdisk: [2.26.x or greater]
==> sfdisk parameters:
sfdisk: [sfdisk from util-linux 2.29.2]
sfdisk: [sfdisk --force /dev/mmcblk1]
sfdisk: [4M,,L,*]
==> Partitionning
------------------------------------------------------------
Checking that no-one is using this disk right now ... OK

Disk /dev/mmcblk1: 3.6 GiB, 3867148288 bytes, 7553024 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

>>> Created a new DOS disklabel with disk identifier 0x212618f7.
/dev/mmcblk1p1: Created a new partition 1 of type 'Linux' and of size 3.6 GiB.
/dev/mmcblk1p2: Done.

New situation:

Device         Boot St[   65.437784]  mmcblk1: p1
art     End Sectors  Size Id Type
/dev/mmcblk1p1 *     8192 7553023 7544832  3.6G 83 Linux

The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
------------------------------------------------------------

==> Partitionning Completed
==> Generated Partitions:
------------------------------------------------------------
Disk /dev/mmcblk1: 3.6 GiB, 3867148288 bytes, 7553024 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
Disklabel type: dos
Disk identifier: 0x212618f7

Device         Boot Start     End Sectors  Size Id Type
/dev/mmcblk1p1 *     8192 7553023 7544832  3.6G 83 Linux
------------------------------------------------------------
================================================================================

================================================================================
Preparing future rootfs to receive files
----------------------------------------

==> Formatting rootfs with mkfs.ext4  -O ^metadata_csum,^64bit /dev/mmcblk1p1 -L rootfs
--------------------------------------------------------------------------------

mke2fs 1.43.4 (31-Jan-2017)
Discarding device blocks: done                            
Creating filesystem with 943104 4k blocks and 236176 inodes
Filesystem UUID: 39853086-685a-41b2-b7ad-40820b35b10d
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912, 819200, 884736

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done 

--------------------------------------------------------------------------------
==> Formatting rootfs: /dev/mmcblk1p1 complete
==> Creating temporary rootfs directory (/tmp/rootfs)
==> Mounting /dev/mmcblk1p1 to /tmp/rootfs
[   79.107448] EXT4-fs (mmcblk1p1): mounted filesystem with ordered data mode. Opts: (null)

================================================================================

================================================================================
Copying: Current rootfs to /dev/mmcblk1p1
----------------------------------------
==> rsync: / -> /tmp/rootfs
----------------------------------------
----------------------------------------
==> Copying: Kernel modules
===> Creating directory for modules
===> rsync: /lib/modules/4.14.71-ti-r80/ -> /tmp/rootfs/lib/modules/4.14.71-ti-r80/
----------------------------------------
----------------------------------------
Copying: Current rootfs to /dev/mmcblk1p1 complete
================================================================================

================================================================================
Final System Tweaks:
----------------------------------------
==> Applying SSH Key Regeneration trick

==> Found pre-existing uEnv file at /tmp/rootfs/boot/uEnv.txt. Using it.
********************************************************************************
#Docs: http://elinux.org/Beagleboard:U-boot_partitioning_layout_2.0

uname_r=4.14.71-ti-r80
#uuid=
#dtb=

###U-Boot Overlays###
###Documentation: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Overlays
###Master Enable
enable_uboot_overlays=1
###
###Overide capes with eeprom
#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
###
###Additional custom capes
#uboot_overlay_addr4=/lib/firmware/<file4>.dtbo
#uboot_overlay_addr5=/lib/firmware/<file5>.dtbo
#uboot_overlay_addr6=/lib/firmware/<file6>.dtbo
#uboot_overlay_addr7=/lib/firmware/<file7>.dtbo
###
###Custom Cape
#dtb_overlay=/lib/firmware/<file8>.dtbo
###
###Disable auto loading of virtual capes (emmc/video/wireless/adc)
#disable_uboot_overlay_emmc=1
#disable_uboot_overlay_video=1
#disable_uboot_overlay_audio=1
#disable_uboot_overlay_wireless=1
#disable_uboot_overlay_adc=1
###
###PRUSS OPTIONS
###pru_rproc (4.4.x-ti kernel)
#uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-4-TI-00A0.dtbo
###pru_rproc (4.14.x-ti kernel)
uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-14-TI-00A0.dtbo
###pru_uio (4.4.x-ti, 4.14.x-ti & mainline/bone kernel)
#uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo
###
###Cape Universal Enable
enable_uboot_cape_universal=1
###
###Debug: disable uboot autoload of Cape
#disable_uboot_overlay_addr0=1
#disable_uboot_overlay_addr1=1
#disable_uboot_overlay_addr2=1
#disable_uboot_overlay_addr3=1
###
###U-Boot fdt tweaks... (60000 = 384KB)
#uboot_fdt_buffer=0x60000
###U-Boot Overlays###

cmdline=coherent_pool=1M net.ifnames=0 quiet

#In the event of edid real failures, uncomment this next line:
#cmdline=coherent_pool=1M net.ifnames=0 quiet video=HDMI-A-1:1024x768@60e

#Use an overlayfs on top of a read-only root filesystem:
#cmdline=coherent_pool=1M net.ifnames=0 quiet overlayroot=tmpfs

##enable Generic eMMC Flasher:
##make sure, these tools are installed: dosfstools rsync
cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh

********************************************************************************


==> Generating: /etc/fstab
===> /etc/fstab generated
****************************************
# /etc/fstab: static file system information.
#
/dev/mmcblk1p1  /  ext4  noatime,errors=remount-ro  0  1
debugfs  /sys/kernel/debug  debugfs  defaults  0  0
****************************************

==> /boot/uEnv.txt: disabling eMMC flasher script
****************************************
#Docs: http://elinux.org/Beagleboard:U-boot_partitioning_layout_2.0

uname_r=4.14.71-ti-r80
#uuid=
#dtb=

###U-Boot Overlays###
###Documentation: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Overlays
###Master Enable
enable_uboot_overlays=1
###
###Overide capes with eeprom
#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
###
###Additional custom capes
#uboot_overlay_addr4=/lib/firmware/<file4>.dtbo
#uboot_overlay_addr5=/lib/firmware/<file5>.dtbo
#uboot_overlay_addr6=/lib/firmware/<file6>.dtbo
#uboot_overlay_addr7=/lib/firmware/<file7>.dtbo
###
###Custom Cape
#dtb_overlay=/lib/firmware/<file8>.dtbo
###
###Disable auto loading of virtual capes (emmc/video/wireless/adc)
#disable_uboot_overlay_emmc=1
#disable_uboot_overlay_video=1
#disable_uboot_overlay_audio=1
#disable_uboot_overlay_wireless=1
#disable_uboot_overlay_adc=1
###
###PRUSS OPTIONS
###pru_rproc (4.4.x-ti kernel)
#uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-4-TI-00A0.dtbo
###pru_rproc (4.14.x-ti kernel)
uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-14-TI-00A0.dtbo
###pru_uio (4.4.x-ti, 4.14.x-ti & mainline/bone kernel)
#uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo
###
###Cape Universal Enable
enable_uboot_cape_universal=1
###
###Debug: disable uboot autoload of Cape
#disable_uboot_overlay_addr0=1
#disable_uboot_overlay_addr1=1
#disable_uboot_overlay_addr2=1
#disable_uboot_overlay_addr3=1
###
###U-Boot fdt tweaks... (60000 = 384KB)
#uboot_fdt_buffer=0x60000
###U-Boot Overlays###

cmdline=coherent_pool=1M net.ifnames=0 quiet

#In the event of edid real failures, uncomment this next line:
#cmdline=coherent_pool=1M net.ifnames=0 quiet video=HDMI-A-1:1024x768@60e

#Use an overlayfs on top of a read-only root filesystem:
#cmdline=coherent_pool=1M net.ifnames=0 quiet overlayroot=tmpfs

##enable Generic eMMC Flasher:
##make sure, these tools are installed: dosfstools rsync
#cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh

****************************************

================================================================================
Tearing down future rootfs
----------------------------------------

==> Unmounting /tmp/rootfs
================================================================================
================================================================================
Tearing Down script environment
==> Unmounting /tmp
==> Stopping Cylon LEDs ...
==> Setting LEDs to 
==> Force writeback of eMMC buffers by Syncing: /dev/mmcblk1
/opt/scripts/tools/eMMC/functions.sh: line 256:   959 Terminated              cylon_leds
----------------------------------------
100000+0 records in
100000+0 records out
51200000 bytes (51 MB, 49 MiB) copied, 1.40591 s, 36.4 MB/s
----------------------------------------
===> Syncing: /dev/mmcblk1 complete
==> This script took 447 seconds to run
================================================================================

==> Setting LEDs to 
==> Displaying mount points
--------------------------------------------------------------------------------
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=220136k,nr_inodes=55034,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=49488k,mode=755)
/dev/mmcblk0p1 on / type ext4 (ro,relatime,data=ordered)
--------------------------------------------------------------------------------

================================================================================
eMMC has been flashed: please wait for device to power down.
================================================================================
We are init
[  476.869023] systemd[1]: System time before build time, advancing clock.
[  476.923221] ip_tables: (C) 2000-2006 Netfilter Core Team
[  476.955254] systemd[1]: systemd 232 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTI)
[  476.974522] systemd[1]: Detected architecture arm.

Welcome to Debian GNU/Linux 9 (stretch)!

[  477.004247] systemd[1]: Set hostname to <beaglebone>.
[  477.714663] systemd[1]: Reached target Remote File Systems.
[  OK  ] Reached target Remote File Systems.
[  477.734640] systemd[1]: Listening on udev Control Socket.
[  OK  ] Listening on udev Control Socket.
[  477.750670] systemd[1]: Listening on Journal Socket (/dev/log).
[  OK  ] Listening on Journal Socket (/dev/log).
[  477.766739] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[  OK  ] Started Forward Password Requests to Wall Directory Watch.
[  477.790753] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[  OK  ] Started Dispatch Password Requests to Console Directory Watch.
[  477.814227] systemd[1]: Reached target Encrypted Volumes.
[  OK  ] Reached target Encrypted Volumes.
[  477.830225] systemd[1]: Reached target Paths.
[  OK  ] Reached target Paths.
[  OK  ] Listening on fsck to fsckd communication Socket.
[  OK  ] Listening on udev Kernel Socket.
[  OK  ] Listening on Journal Socket.
[  OK  ] Listening on Syslog Socket.
[  OK  ] Created slice User and Session Slice.
[  OK  ] Set up automount Arbitrary Executab��…rmats File System Automount Point.
[  OK  ] Created slice System Slice.
         Starting Set the console keyboard layout...
         Starting File System Check on Root Device...
         Starting Load Kernel Modules...
         Mounting POSIX Message Queue File System...
         Starting Create list of required st��…ce nodes for the current kernel...
[  OK  ] Reached target Swap.
[  OK  ] Created slice system-getty.slice.
[  OK  ] Created slice system-serial\x2dgetty.slice.
[  OK  ] Reached target Slices.
[  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
         Mounting /sys/kernel/debug...
[  OK  ] Listening on Journal Audit Socket.
         Starting Journal Service...
[  OK  ] Mounted POSIX Message Queue File System.
[  OK  ] Mounted /sys/kernel/debug.
[  OK  ] Started File System Check on Root Device.
[  OK  ] Started Load Kernel Modules.
[  OK  ] Started Create list of required sta��…vice nodes for the current kernel.
[  OK  ] Started File System Check Daemon to report status.
         Starting Create Static Device Nodes in /dev...
         Mounting FUSE Control File System...
         Starting Apply Kernel Variables...
         Mounting Configuration File System...
         Starting Remount Root and Kernel File Systems...
[  OK  ] Mounted FUSE Control File System.
[  OK  ] Mounted Configuration File System.
[  OK  ] Started Create Static Device Nodes in /dev.
[  OK  ] Started Apply Kernel Variables.
         Starting udev Kernel Device Manager...
[  479.303084] EXT4-fs (mmcblk0p1): re-mounted. Opts: errors=remount-ro
[  OK  ] Started Remount Root and Kernel File Systems.
         Starting udev Coldplug all Devices...
         Starting Load/Save Random Seed...
[  OK  ] Started Journal Service.
         Starting Flush Journal to Persistent Storage...
[  OK  ] Started Load/Save Random Seed.
[  OK  ] Started udev Kernel Device Manager.
[  479.794437] systemd-journald[4792]: Received request to flush runtime journal from PID 1
[  OK  ] Started Flush Journal to Persistent Storage.
[  OK  ] Started Set the console keyboard layout.
[  OK  ] Reached target Local File Systems (Pre).
[  OK  ] Reached target Local File Systems.
         Starting Set console font and keymap...
         Starting Raise network interfaces...
         Starting Create Volatile Files and Directories...
[  OK  ] Started Set console font and keymap.
[  OK  ] Started Create Volatile Files and Directories.
[  OK  ] Started Entropy daemon using the HAVEGE algorithm.
         Starting Network Time Synchronization...
         Starting Update UTMP about System Boot/Shutdown...
[  OK  ] Started Update UTMP about System Boot/Shutdown.
[  OK  ] Started Network Time Synchronization.
[  OK  ] Reached target System Time Synchronized.
[  OK  ] Started Raise network interfaces.
[  OK  ] Started udev Coldplug all Devices.
[  OK  ] Reached target System Initialization.
[  OK  ] Listening on node-red.socket.
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Listening on bonescript.socket.
[  OK  ] Started Daily apt download activities.
[  OK  ] Started Daily apt upgrade and clean activities.
[  OK  ] Reached target Timers.
[  OK  ] Listening on cloud9.socket.
[  OK  ] Reached target Sockets.
[  OK  ] Reached target Basic System.
         Starting BB WL18xx wlan0 Service...
         Starting Avahi mDNS/DNS-SD Stack...
[  OK  ] Started Bonescript autorun.
         Starting Generic Board Startup...
         Starting robotcontrol...
         Starting LSB: Start busybox udhcpd at boot time...
         Starting Restore /etc/resolv.conf i��…fore the ppp link was shut down...
         Starting System Logging Service...
[  OK  ] Started Regular background program processing daemon.
         Starting Save/Restore Sound Card State...
[  OK  ] Started D-Bus System Message Bus.
[  OK  ] Started Avahi mDNS/DNS-SD Stack.
         Starting Connection service...
         Starting LSB: Start daemon at boot time...
[  OK  ] Started Deferred execution scheduler.
         Starting LSB: Load kernel modules needed to enable cpufreq scaling...
         Starting Login Service...
         Starting rc_battery_monitor...
[  OK  ] Started System Logging Service.
[  OK  ] Started BB WL18xx wlan0 Service.
[  OK  ] Started robotcontrol.
[  OK  ] Started Restore /etc/resolv.conf if��…before the ppp link was shut down.
[  OK  ] Started Save/Restore Sound Card State.
[  OK  ] Started rc_battery_monitor.
[  OK  ] Started LSB: Start busybox udhcpd at boot time.
[  OK  ] Started LSB: Start daemon at boot time.
[  OK  ] Started Connection service.
[  OK  ] Started Login Service.
[  486.608935] nf_conntrack version 0.5.0 (8192 buckets, 32768 max)
[  OK  ] Reached target Network.
[  OK  ] Reached target Network is Online.
         Starting LSB: Advanced IEEE 802.11 management daemon...
         Starting Permit User Sessions...
         Starting OpenBSD Secure Shell server...
         Starting The Apache HTTP Server...
[  OK  ] Started LSB: Advanced IEEE 802.11 management daemon.
[  OK  ] Started Permit User Sessions.
[  OK  ] Stopped target Timers.
[  OK  ] Stopped Daily apt upgrade and clean activities.
         Stopping Save/Restore Sound Card State...
[  OK  ] Reached target Unmount All Filesystems.
[  OK  ] Stopped Daily Cleanup of Temporary Directories.
[  OK  ] Stopped Daily apt download activities.
         Stopping Bonescript autorun...
         Stopping LSB: Start busybox udhcpd at boot time...
         Stopping System Logging Service...
         Stopping LSB: Advanced IEEE 802.11 management daemon...
         Stopping Login Service...
         Stopping Regular background program processing daemon...
[  488.195632] net eth0: initializing cpsw version 1.12 (0)
         Stopping LSB: Start daemon at boot time...
[  OK  ] Stopped target System Time Synchronized.
         Stopping Avahi mDNS/DNS-SD Stack...
[  488.362948] SMSC LAN8710/LAN8720 4a101000.mdio:00: attached PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=4a101000.mdio:00, irq=POLL)
[  OK  ] Removed slice system-getty.slice.
[  OK  ] Removed slice system-serial\x2dgetty.slice.
         Stopping Deferred execution scheduler...
[  488.517751] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
         Stopping Permit User Sessions...
[  OK  ] Stopped Avahi mDNS/DNS-SD Stack.
[  OK  ] Stopped Bonescript autorun.
[  OK  ] Stopped Generic Board Startup.
[  OK  ] Stopped System Logging Service.
[  OK  ] Stopped Regular background program processing daemon.
[  OK  ] Stopped Deferred execution scheduler.
[  OK  ] Stopped LSB: Load kernel modules needed to enable cpufreq scaling.
[  OK  ] Stopped Login Service.
[  OK  ] Stopped OpenBSD Secure Shell server.
[  OK  ] Stopped The Apache HTTP Server.
[  OK  ] Stopped Save/Restore Sound Card State.
[  OK  ] Stopped LSB: Advanced IEEE 802.11 management daemon.
[  OK  ] Stopped Permit User Sessions.
[  OK  ] Found device /dev/ttyS0.
[  OK  ] Stopped LSB: Start daemon at boot time.
[  OK  ] Stopped LSB: Start busybox udhcpd at boot time.
[  OK  ] Stopped target Network is Online.
[  OK  ] Stopped target Network.
         Stopping Connection service...
         Stopping Raise network interfaces...
[  OK  ] Stopped target Remote File Systems.
[  OK  ] Stopped Connection service.
         Stopping D-Bus System Message Bus...
[  OK  ] Stopped D-Bus System Message Bus.
[  OK  ] Stopped target Basic System.
[  OK  ] Stopped target Slices.
[  OK  ] Removed slice User and Session Slice.
[  OK  ] Stopped target Sockets.
[  OK  ] Closed cloud9.socket.
[  OK  ] Closed Syslog Socket.
[  OK  ] Closed Avahi mDNS/DNS-SD Stack Activation Socket.
[  OK  ] Closed bonescript.socket.
[  OK  ] Closed node-red.socket.
[  OK  ] Stopped target Paths.
[  OK  ] Closed D-Bus System Message Bus Socket.
[  OK  ] Stopped target System Initialization.
[  OK  ] Stopped target Encrypted Volumes.
[  OK  ] Stopped Forward Password Requests to Wall Directory Watch.
[  OK  ] Stopped Dispatch Password Requests to Console Directory Watch.
         Stopping Load/Save Random Seed...
         Stopping Network Time Synchronization...
[  OK  ] Stopped target Swap.
         Stopping Update UTMP about System Boot/Shutdown...
[  OK  ] Stopped Network Time Synchronization.
[  OK  ] Stopped Load/Save Random Seed.
[  OK  ] Stopped Raise network interfaces.
[  OK  ] Stopped Update UTMP about System Boot/Shutdown.
[  OK  ] Stopped Create Volatile Files and Directories.
[  OK  ] Stopped Apply Kernel Variables.
[  OK  ] Stopped Load Kernel Modules.
[  OK  ] Stopped target Local File Systems.
[  OK  ] Stopped target Local File Systems (Pre).
[  OK  ] Stopped Create Static Device Nodes in /dev.
[  OK  ] Stopped Remount Root and Kernel File Systems.
[  OK  ] Reached target Shutdown.
[  OK  ] Reached target Final Step.
         Starting Power-Off...
[  491.454180] systemd-shutdow: 40 output lines suppressed due to ratelimiting
[  491.818316] systemd-shutdown[1]: Sending SIGTERM to remaining processes...
[  491.860310] systemd-journald[4792]: Received SIGTERM from PID 1 (systemd-shutdow).
[  491.892372] systemd-udevd[4938]: Process '/bin/sh -c '/bin/chmod -R ug+rw /sys/devices/platform/ocp/*.gpio'' terminated by signal TERM.
[  491.916684] systemd-udevd[4901]: Process '/bin/sh -c '/bin/chmod -R ug+rw /sys/devices/platform/ocp/*.gpio'' terminated by signal TERM.
[  491.926653] systemd-udevd[4805]: worker [5049] did not accept message -111 (Connection refused), kill it
[  491.926755] systemd-udevd[4805]: worker [4922] did not accept message -111 (Connection refused), kill it
[  491.926813] systemd-udevd[4805]: worker [5046] did not accept message -111 (Connection refused), kill it
[  491.926864] systemd-udevd[4805]: worker [4905] did not accept message -111 (Connection refused), kill it
[  491.926914] systemd-udevd[4805]: worker [4942] did not accept message -111 (Connection refused), kill it
[  492.195052] systemd-shutdown[1]: Sending SIGKILL to remaining processes...
[  492.215843] systemd-shutdown[1]: Unmounting file systems.
[  492.222664] systemd-shutdown[1]: Remounting '/' read-only with options 'errors=remount-ro,data=ordered'.
[  492.272466] EXT4-fs (mmcblk0p1): re-mounted. Opts: errors=remount-ro,data=ordered
[  492.384154] systemd-shutdown[1]: Remounting '/' read-only with options 'errors=remount-ro,data=ordered'.
[  492.394817] EXT4-fs (mmcblk0p1): re-mounted. Opts: errors=remount-ro,data=ordered
[  492.402509] systemd-shutdown[1]: All filesystems unmounted.
[  492.408217] systemd-shutdown[1]: Deactivating swaps.
[  492.413701] systemd-shutdown[1]: All swaps deactivated.
[  492.419075] systemd-shutdown[1]: Detaching loop devices.
[  492.430860] systemd-shutdown[1]: All loop devices detached.
[  492.483086] reboot: Power down
[  492.486388] System will go to power_off state in approx. 1 second

BeagleBone Black Board Setup Steps

The first five steps without the "cape". A "cape" in the BeagleBone is similar to the "shield" in the Raspberry Pi. For more information about the BeagleBone capes see https://beagleboard.org/capes

1) Change password/host-name

After flashing the image from the microSD Card and rebooting the BBB, change the password and hostname.

U-Boot SPL 2018.09-00002-g0b54a51eee (Sep 10 2018 - 19:41:39 -0500)
Trying to boot from MMC2
Loading Environment from EXT4... Card did not respond to voltage select!


U-Boot 2018.09-00002-g0b54a51eee (Sep 10 2018 - 19:41:39 -0500), Build: jenkins-github_Bootloader-Builder-65

CPU  : AM335X-GP rev 2.1
I2C:   ready
DRAM:  512 MiB
No match for driver 'omap_hsmmc'
No match for driver 'omap_hsmmc'
Some drivers were not found
Reset Source: Power-on reset has occurred.
RTC 32KCLK Source: External.
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from EXT4... Card did not respond to voltage select!
Board: BeagleBone Black
<ethaddr> not set. Validating first E-fuse MAC
BeagleBone Black:
BeagleBone: cape eeprom: i2c_probe: 0x54:
BeagleBone: cape eeprom: i2c_probe: 0x55:
BeagleBone: cape eeprom: i2c_probe: 0x56:
BeagleBone: cape eeprom: i2c_probe: 0x57:
Net:   eth0: MII MODE
cpsw, usb_ether
Press SPACE to abort autoboot in 2 seconds
board_name=[A335BNLT] ...
board_rev=[00C0] ...
Card did not respond to voltage select!
Card did not respond to voltage select!
Card did not respond to voltage select!
gpio: pin 56 (gpio 56) value is 0
gpio: pin 55 (gpio 55) value is 0
gpio: pin 54 (gpio 54) value is 0
gpio: pin 53 (gpio 53) value is 1
Card did not respond to voltage select!
Card did not respond to voltage select!
switch to partitions #0, OK
mmc1(part 0) is current device
Scanning mmc 1:1...
gpio: pin 56 (gpio 56) value is 0
gpio: pin 55 (gpio 55) value is 0
gpio: pin 54 (gpio 54) value is 0
gpio: pin 53 (gpio 53) value is 1
switch to partitions #0, OK
mmc1(part 0) is current device
gpio: pin 54 (gpio 54) value is 1
Checking for: /uEnv.txt ...
Checking for: /boot.scr ...
Checking for: /boot/boot.scr ...
Checking for: /boot/uEnv.txt ...
gpio: pin 55 (gpio 55) value is 1
2099 bytes read in 8 ms (255.9 KiB/s)
Loaded environment from /boot/uEnv.txt
Checking if uname_r is set in /boot/uEnv.txt...
gpio: pin 56 (gpio 56) value is 1
Running uname_boot ...
loading /boot/vmlinuz-4.14.71-ti-r80 ...
10416640 bytes read in 666 ms (14.9 MiB/s)
debug: [enable_uboot_overlays=1] ...
debug: [enable_uboot_cape_universal=1] ...
debug: [uboot_base_dtb_univ=am335x-boneblack-uboot-univ.dtb] ...
uboot_overlays: [uboot_base_dtb=am335x-boneblack-uboot-univ.dtb] ...
uboot_overlays: Switching too: dtb=am335x-boneblack-uboot-univ.dtb ...
loading /boot/dtbs/4.14.71-ti-r80/am335x-boneblack-uboot-univ.dtb ...
161723 bytes read in 26 ms (5.9 MiB/s)
uboot_overlays: [fdt_buffer=0x60000] ...
uboot_overlays: loading /lib/firmware/BB-BONE-eMMC1-01-00A0.dtbo ...
1440 bytes read in 157 ms (8.8 KiB/s)
uboot_overlays: loading /lib/firmware/BB-HDMI-TDA998x-00A0.dtbo ...
5127 bytes read in 70 ms (71.3 KiB/s)
uboot_overlays: loading /lib/firmware/BB-ADC-00A0.dtbo ...
711 bytes read in 152 ms (3.9 KiB/s)
uboot_overlays: loading /lib/firmware/AM335X-PRU-RPROC-4-14-TI-00A0.dtbo ...
  GNU nano 2.7.4                 File: /etc/hostname                            

alphabbb00


debian@beaglebone:~$ 
debian@beaglebone:~$ passwd
Changing password for debian.
(current) UNIX password: 
Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully

2) Reboot and connect to the internet

debian@beaglebone:~$ reboot
(base) layla@layla-Aspire-E5-575T:~$ ssh debian@alphabbb00
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@       WARNING: POSSIBLE DNS SPOOFING DETECTED!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
The ECDSA host key for alphabbb00 has changed,
and the key for the corresponding IP address 142.90.118.145
has a different value. This could either mean that
DNS SPOOFING is happening or the IP address for the host
and its host key have changed at the same time.
Offending key for IP in /home/layla/.ssh/known_hosts:1
  remove with:
  ssh-keygen -f "/home/layla/.ssh/known_hosts" -R "142.90.118.145"
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
SHA256:ou0/ISNUXYq3VsKn3A53bbqHwKRS8/Noy5miU+tybd4.
Please contact your system administrator.
Add correct host key in /home/layla/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/layla/.ssh/known_hosts:2
  remove with:
  ssh-keygen -f "/home/layla/.ssh/known_hosts" -R "alphabbb00"
ECDSA host key for alphabbb00 has changed and you have requested strict checking.
Host key verification failed.
(base) layla@layla-Aspire-E5-575T:~$ ssh-keygen -f "/home/layla/.ssh/known_hosts" -R "alphabbb00"
# Host alphabbb00 found: line 2
/home/layla/.ssh/known_hosts updated.
Original contents retained as /home/layla/.ssh/known_hosts.old
(base) layla@layla-Aspire-E5-575T:~$ ssh debian@alphabbb00
The authenticity of host 'alphabbb00 (142.90.118.145)' can't be established.
ECDSA key fingerprint is SHA256:ou0/ISNUXYq3VsKn3A53bbqHwKRS8/Noy5miU+tybd4.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'alphabbb00' (ECDSA) to the list of known hosts.
Warning: the ECDSA host key for 'alphabbb00' differs from the key for the IP address '142.90.118.145'
Offending key for IP in /home/layla/.ssh/known_hosts:1
Are you sure you want to continue connecting (yes/no)? yes
debian@alphabbb00's password: 
                                                                                                                                                                                                
The programs included with the Debian GNU/Linux system are free software;                                                                                                                       
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Thu Sep 19 16:37:36 2019
debian@alphabbb00:~$ 

3) Install emacs

debian@alphabbb00:~$ sudo apt update
debian@alphabbb00:~$ sudo apt install emacs

4) Clone to the Shabaz library

debian@alphabbb00:~$ git clone https://github.com/shabaz123/iobb.git
Cloning into 'iobb'...
remote: Enumerating objects: 124, done.
remote: Counting objects: 100% (124/124), done.
remote: Compressing objects: 100% (101/101), done.
remote: Total 124 (delta 25), reused 114 (delta 17), pack-reused 0
Receiving objects: 100% (124/124), 40.41 MiB | 2.76 MiB/s, done.
Resolving deltas: 100% (25/25), done.
debian@alphabbb00:~$ ls
bin  iobb
debian@alphabbb00:~$ cd iobb
debian@alphabbb00:~/iobb$ ls
ADC_VOICE  BBBio_lib  blog-apps  Demo  Lab  LICENSE  Makefile  overlay  README.md  test-io  Toolkit
debian@alphabbb00:~/iobb$ make
gcc -c ./BBBio_lib/BBBiolib_PWMSS.c -o ./BBBio_lib/BBBiolib_PWMSS.o -W 
gcc -c ./BBBio_lib/BBBiolib_McSPI.c -o ./BBBio_lib/BBBiolib_McSPI.o -W
gcc -c ./BBBio_lib/BBBiolib_ADCTSC.c -o ./BBBio_lib/BBBiolib_ADCTSC.o -W
gcc -c ./BBBio_lib/i2cfunc.c -o ./BBBio_lib/i2cfunc.o
gcc -c ./BBBio_lib/BBBiolib.c -o ./BBBio_lib/BBBiolib.o
ar -rs ./BBBio_lib/libiobb.a ./BBBio_lib/BBBiolib.o ./BBBio_lib/BBBiolib_PWMSS.o ./BBBio_lib/BBBiolib_McSPI.o ./BBBio_lib/BBBiolib_ADCTSC.o ./BBBio_lib/i2cfunc.o
ar: creating ./BBBio_lib/libiobb.a
cp ./BBBio_lib/libiobb.a ./
cp ./BBBio_lib/BBBiolib.h ./iobb.h
cp ./BBBio_lib/BBBiolib_ADCTSC.h ./
cp ./BBBio_lib/BBBiolib_McSPI.h ./
cp ./BBBio_lib/BBBiolib_PWMSS.h ./
cp ./BBBio_lib/i2cfunc.h ./
gcc -o LED ./Demo/Demo_LED/LED.c -L ./BBBio_lib/ -liobb
gcc -o ADT7301 ./Demo/Demo_ADT7301/ADT7301.c -L ./BBBio_lib/ -liobb
gcc -o SevenScan ./Demo/Demo_SevenScan/SevenScan.c  -L ./BBBio_lib/ -liobb
gcc -o SMOTOR ./Demo/Demo_ServoMotor/ServoMotor.c -L ./BBBio_lib/ -liobb
gcc -o LED_GPIO ./Demo/Demo_LED_GPIO/LED_GPIO.c -L ./BBBio_lib/ -liobb -pthread
gcc -o Debouncing ./Demo/Demo_Debouncing/Debouncing.c -L ./BBBio_lib/ -liobb
gcc -o 4x4keypad ./Demo/Demo_4x4keypad/4x4keypad.c -L ./BBBio_lib/ -liobb
gcc -o ADC ./Demo/Demo_ADC/ADC.c -L ./BBBio_lib/ -liobb -lm
gcc -o ADC_VOICE ./Demo/Demo_ADC/ADC_voice.c -L ./BBBio_lib/ -liobb -lm -pthread -O3
gcc -o GPIO_CLK_status ./Toolkit/Toolkit_GPIO_CLK_Status/GPIO_status.c  -L ./BBBio_lib/ -liobb
gcc -o EP_status ./Toolkit/Toolkit_EP_Status/EP_status.c -L ./BBBio_lib/ -liobb
gcc -o ADC_CALC ./Toolkit/Toolkit_ADC_CALC/ADC_CALC.c
gcc -o lcd3-test ./Demo/Demo_I2C/lcd3-test.c -I. -L ./BBBio_lib/ -liobb
gcc -o test-outputs test-io/test-outputs.c -I. -L. -liobb
gcc -o pb-test-outputs test-io/pb-test-outputs.c -I. -L. -liobb
gcc -o test-inputs test-io/test-inputs.c -I. -L. -liobb
gcc -o pb-test-inputs test-io/pb-test-inputs.c -I. -L. -liobb

debian@alphabbb00:~/iobb$ ls
4x4keypad  ADC_VOICE  BBBiolib_ADCTSC.h  blog-apps   EP_status        iobb.h     LED        LICENSE   pb-test-inputs   SevenScan    test-io
ADC        ADT7301    BBBiolib_McSPI.h   Debouncing  GPIO_CLK_status  Lab        LED_GPIO   Makefile  pb-test-outputs  SMOTOR       test-outputs
ADC_CALC   BBBio_lib  BBBiolib_PWMSS.h   Demo        i2cfunc.h        lcd3-test  libiobb.a  overlay   README.md        test-inputs  Toolkit

5) Edit spi_test.c

debian@alphabbb00:~$ cd iobb
debian@alphabbb00:~/iobb$ ls blog-apps
hello.c  Makefile   speedtest.c   spi_test.c
debian@alphabbb00:~/iobb$ emacs spi_test.c

In line 51, change from pin_direction=SPI_OUTIN to pin_direction=SPI_INOUT

  if (POCKETBEAGLE)
    pin_direction=SPI_INOUT;
  else // Beaglebone has MISO and MOSI choice unallocated. This matches the demo code:
    pin_direction=SPI_INOUT;

In line 61, edit SPI_RX to SPI_RXTX

    spi_ctrl(SPI_BUS, SPI_CH0, SPI_MASTER, SPI_RXTX, /* use SPI_TX or  depending on needs */
             SPI_DIV32, SPI_CLOCKMODE3, /* 48 MHz divided by 32, SPI mode 3 */
             		SPI_CE_ACT_LOW, pin_direction, 16); //16-bit transactions 

In line 73, change the transmitted data from 0 to any hexadecimal number. In this example, we change it to "0x1234"

  for (i=1; i<20; i++) 
  {
    spi_transact(SPI_BUS, SPI_CH0, 0x1234 /*or integer to transmit data*/, &rxval);
    printf("Received: 0x%04x \n", rxval&0xffff);
    iolib_delay_ms(500);
  }

At this point the four spi devices: spidev1.0, spidev1.1. spidev2.0 and spidev2.1 should exit in the BBB.

debian@alphabbb00:~$ ls /dev/spi*
Spidev 1.0  spidev1.1   spidev2.0   spidev2.1 


6) Attach the BBB to the cape. The spi devices don't exist when the cape is connected to the BBB, to make the spi devices available follow step 7.

7) Edit uEnv.txt

debian@alphabbb00:~$ cd /boot
debian@alphabbb00:/boot$ sudo emacs uEnv.txt

In line 18 through 22, uncomment and add "BB-SPIDEV0-00A0.dtbo" to make spidev1.0 and spidev1.1 available. Also, uncomment and add BB-SPIDEV1-00A0.dtbo for spidev2.0 and spidev2.1. Since we only need spidev1.0, we will only add "BB-SPIDEV0-00A0.dtbo"

###Additional custom capes
uboot_overlay_addr4=/lib/firmware/BB-SPIDEV0-00A0.dtbo
#uboot_overlay_addr5=/lib/firmware/BB-SPIDEV1-00A0.dtbo
#uboot_overlay_addr6=/lib/firmware/<file6>.dtbo
#uboot_overlay_addr7=/lib/firmware/<file7>.dtbo

8) Reboot the BBB than check if the spi devices are available

debian@alphabbb00:/$ reboot
debian@alphabbb00:/$ ls /dev/spi*
spidev1.0  spidev1.1  

9) Run the spi test

Since the spi devices are now found when the cape is connected to the BBB, we can comment out line 37 in spi_test.c

debian@alphabbb00:~/iobb/blog-apps$ emacs spi_test.c
#configure_spi_pins(17, 18, 21, 22); // CS, D1, D0, CLK

We also edit the Makefile to include the path to the library and the header file

debian@alphabbb00:~/iobb/blog-apps$ emacs Makefile
debian@alphabbb00:~/iobb/blog-apps$ make
gcc -I../ -o hello hello.c -L../ -liobb
gcc -I../ -o speedtest speedtest.c -L../ -liobb
gcc -I../ -o spi_test spi_test.c -L../ -liobb

Now we are ready to the run the spi test!

debian@alphabbb00:~/iobb/blog-apps$ sudo ./spi_test
[sudo] password for debian: 
BeagleBone
Received: 0x1234 
Received: 0x1234 
Received: 0x1234 
...