Beaglebone Black + Yocto Dizzy (Versão 1.7)

yocto

A nova versão 1.7 (dizzy) do Yocto Project foi lançada recentemente e desde a versão 1.6 (daisy) a Beaglebone Black é oficialmente suportada pelo projeto.

 

Sendo assim, não precisamos utilizar a camada de BSP da Texas Instruments (meta-ti) para adicionarmos suporte a Beaglebone Black no Yocto. Porém se você deseja usar a aceleração 3D por hardware do processador AM3359 (presente na Beaglebone Black) você terá de recorrer a meta-ti.

 

Desde a versão 3.12 mainline do Kernel Linux a Beaglebone Black é suportada e nesta versão do Yocto o Kernel Linux construído é o 3.14, ou seja, uma versão bem recente. Mas existe uma limitação para a Beaglebone Black no mainline Linux Kernel: o suporte às capes não foi integrado ainda. Se você deseja usar as capes em seu projeto terá que usar o BSP da placa disponibilizado pela meta-beagleboard e a versão do Kernel Linux utilizada é a 3.8. 

 

Se você é novo no mundo do Yocto sugiro que dê uma lida na seção "O que é o Yocto" no artigo "Beaglebone Black + Yocto" escrito pelo Henrique Rossi.

 

 

Preparando o Host

 

O Yocto Project suporta oficialmente as seguintes distribuições GNU/Linux como ambiente de construção:

  • Ubuntu 12.04, 13.10 e 14.04;
  • Fedora 19 e 20;
  • CentOS 6.4 e 6.5;
  • Debian 7.0, 7.1, 7.2, 7.3 e 7.4;
  • openSUSE 12.2, 12.3 e 13.1.

 

Para que ele execute no Host alguns pacotes necessitam ser instalados.

 

Ubuntu e Debian:

sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \
     build-essential chrpath libsdl1.2-dev xterm

 

Fedora:

sudo yum install gawk make wget tar bzip2 gzip python unzip perl patch \
     diffutils diffstat git cpp gcc gcc-c++ glibc-devel texinfo chrpath \
     ccache perl-Data-Dumper perl-Text-ParseWords perl-Thread-Queue SDL-devel xterm

 

openSUSE:

sudo zypper install python gcc gcc-c++ git chrpath make wget python-xml \
     diffstat texinfo python-curses patch libSDL-devel xterm

 

CentOS:

sudo yum install gawk make wget tar bzip2 gzip python unzip perl patch \
     diffutils diffstat git cpp gcc gcc-c++ glibc-devel texinfo chrpath SDL-devel xterm

 

 

Montando o ambiente de construção

 

Após instalar os pacotes para o Host, vamos criar os diretórios e baixar os fontes necessários:

mkdir -p ~/yocto/dl
cd ~/yocto
git clone -b dizzy git://git.yoctoproject.org/poky poky-dizzy

 

Agora vamos configurar o ambiente para gerarmos os artefatos de software:

cd ~/yocto
source poky-dizzy/oe-init-build-env build-dizzy

 

Modifique e adicione as seguintes variáveis no arquivo ~/yocto/build-dizzy/conf/local.conf:

MACHINE ?= "beaglebone"
DL_DIR ?= "${TOPDIR}/../dl"
IMAGE_INSTALL_append = " kernel-modules kernel-devicetree"

 

Note que configuramos nossa machine como sendo a beaglebone (serve tanto para a white como a black), mudamos o diretório de download para podermos reutilizar os fontes baixados em outros projetos e adicionamos os módulos e dtb nas imagens que iremos gerar.

 

 

Construindo as imagens

 

Vamos gerar uma imagem mínima sem suporte à interface gráfica (core-image-mininal) com o comando:

source poky-dizzy/oe-init-build-env build-dizzy
bitbake core-image-minimal

 

Esta é a configuração de build utilizada:

Build Configuration:
BB_VERSION        = "1.24.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Ubuntu-14.04"
TARGET_SYS        = "arm-poky-linux-gnueabi"
MACHINE           = "beaglebone"
DISTRO            = "poky"
DISTRO_VERSION    = "1.7.1"
TUNE_FEATURES     = "arm armv7a vfp neon callconvention-hard cortexa8"
TARGET_FPU        = "vfp-neon"
meta              
meta-yocto        
meta-yocto-bsp    = "dizzy:9fc095a439c36014c73b3a8f240afba09fe0e4d7"

 

Vamos construir também uma imagem com suporte à interface gráfica (core-image-sato):

bitbake core-image-sato

 

 

Gravando as imagens

 

Este procedimento é praticamente o mesmo utilizado no tutorial [5] do Henrique mencionado no começo deste post. 

 

Para a gravação das imagens no microSD card, o mesmo deve ser particionado e formatado de acordo o padrão aceito pelo placa. Para isso foi criado um script, que pode ser obtido com os seguintes comandos:

cd ~/yocto/
git clone https://github.com/henriqueprossi/beaglebone-black.git bbb-sdcard-prepare

 

Insira um microSD card no computador PC ou notebook (sistema host) e descubra qual o device node criado pelo sistema operacional. Tente um dos seguintes comandos:

dmesg
sudo fdisk -l

 

Caso, por exemplo, o device node criado seja /dev/sdb, use o seguinte comando:

cd ~/yocto/bbb-sdcard-prepare/scripts
chmod +x format_sd_card.sh
sudo ./format_sd_card.sh /dev/sdb

 

Assim que o processo de particionamento e formatação terminar, duas partições no microSD card são criadas:

  • boot (FAT32);
  • rootfs (ext4).

 

Execute a “montagem” dessas duas partições no sistema de arquivos do sistema host. Caso esse faça uso da distribuição Ubuntu, basta remover e inserir novamente o dispositivo no seu conector. Dado que, por exemplo, os pontos de montagem criados sejam /media/boot e /media/rootfs, a imagem gerada anteriormente é copiada da seguinte forma para o microSD :

cd ~/yocto/build-dizzy/tmp/deploy/images/beaglebone
cp MLO /media/boot
cp u-boot.img /media/boot
# Para a imagem core-image-minimal
sudo tar xjf core-image-minimal-beaglebone.tar.bz2 -C /media/rootfs ; sync
# ou para a imagem core-image-sato
sudo tar xjf core-image-sato-beaglebone.tar.bz2 -C /media/rootfs ; sync 

Este último comando é importante, pois sem ele os dispositivos conectados a USB não serão reconhecidos pelo kernel.

 

 

Testando as imagens

 

Remova o microSD do computador e insira-o na Beaglebone Black, conecte-a a uma TV por um cabo HDMI, e a um mouse através do conector USB. Se quiser monitorar o processo de boot, você também pode conectar um cabo serial [7].

 

NOTA:

Se você tiver instalado algum outro sistema operacional no eMMC da BBB energize a placa pressionando a switch que fica próxima ao slot do microSD. Isso fará com que o processador busque o MLO e u-boot que estão contidos no microSD ao invés do eMMC.

 

A imagem core-image-minimal (sem interface gráfica) possui o seguinte log de boot:

U-Boot SPL 2013.07 (Nov 02 2014 - 08:12:48)
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0 
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Peripheral mode controller at 47401000 using PIO, IRQ 0
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0 
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Host mode controller at 47401800 using PIO, IRQ 0
OMAP SD/MMC: 0
reading args
spl: error reading image args, err - -1
reading u-boot.img
reading u-boot.img


U-Boot 2013.07 (Nov 02 2014 - 08:12:48)

I2C:   ready
DRAM:  512 MiB
WARNING: Caches not enabled
NAND:  0 MiB
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
*** Warning - readenv() failed, using default environment

musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0 
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Peripheral mode controller at 47401000 using PIO, IRQ 0
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0 
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Host mode controller at 47401800 using PIO, IRQ 0
Net:   <ethaddr> not set. Validating first E-fuse MAC
cpsw, usb_ether
Hit any key to stop autoboot:  0 
mmc0 is current device
SD/MMC found on device 0
reading uEnv.txt
** Unable to read file uEnv.txt **
5068072 bytes read in 896 ms (5.4 MiB/s)
29192 bytes read in 47 ms (606.4 KiB/s)
Booting from mmc ...
## Booting kernel from Legacy Image at 82000000 ...
   Image Name:   Linux-3.14.19-yocto-standard
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5068008 Bytes = 4.8 MiB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
   Loading Kernel Image ... OK
   Loading Device Tree to 8fff5000, end 8ffff207 ... OK

Starting kernel ...

Booting Linux on physical CPU 0x0
Initializing cgroup subsys cpuset
Initializing cgroup subsys cpu
Initializing cgroup subsys cpuacct
Linux version 3.14.19-yocto-standard ([email protected]) (gcc version 4.9.1 (GCC) ) #1 PREEMPT Sun Nov 2 08:10:58 BRST 2014
CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine model: TI AM335x BeagleBone
cma: CMA: reserved 16 MiB at 9e800000
Memory policy: Data cache writeback
CPU: All CPU(s) started in SVC mode.
AM335X ES2.0 (sgx neon )
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 129792
Kernel command line: console=ttyO0,115200n8 root=/dev/mmcblk0p2 ro rootfstype=ext4 rootwait
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
allocated 1048576 bytes of page_cgroup
please try 'cgroup_disable=memory' option if you don't want memory cgroups
Memory: 489264K/523264K available (7631K kernel code, 522K rwdata, 2500K rodata, 491K init, 757K bss, 34000K reserved, 0K highmem)
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc : 0xe0800000 - 0xff000000   ( 488 MB)
    lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
    pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    modules : 0xbf000000 - 0xbfe00000   (  14 MB)
      .text : 0xc0008000 - 0xc09ecfd0   (10132 kB)
      .init : 0xc09ed000 - 0xc0a67d64   ( 492 kB)
      .data : 0xc0a68000 - 0xc0aea954   ( 523 kB)
       .bss : 0xc0aea954 - 0xc0ba80c8   ( 758 kB)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Preemptible hierarchical RCU implementation.
NR_IRQS:16 nr_irqs:16 16
IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
Total of 128 interrupts on 1 active controller
OMAP clockevent source: timer2 at 24000000 Hz
sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956969942ns
OMAP clocksource: timer1 at 24000000 Hz
Console: colour dummy device 80x30
Calibrating delay loop... 548.86 BogoMIPS (lpj=2744320)
pid_max: default: 32768 minimum: 301
Security Framework initialized
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
Initializing cgroup subsys debug
Initializing cgroup subsys memory
Initializing cgroup subsys devices
Initializing cgroup subsys freezer
Initializing cgroup subsys net_cls
Initializing cgroup subsys blkio
Initializing cgroup subsys vm
CPU: Testing write buffer coherency: ok
ftrace: allocating 25677 entries in 76 pages
Setting up static identity map for 0x806e43d0 - 0x806e4428
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
omap_hwmod: tptc0 using broken dt data from edma
omap_hwmod: tptc1 using broken dt data from edma
omap_hwmod: tptc2 using broken dt data from edma
omap_hwmod: debugss: _wait_target_disable failed
xor: measuring software checksum speed
   arm4regs  :   685.200 MB/sec
   8regs     :   504.400 MB/sec
   32regs    :   658.400 MB/sec
xor: using function: arm4regs (685.200 MB/sec)
pinctrl core: initialized pinctrl subsystem
regulator-dummy: no parameters
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor ladder
cpuidle: using governor menu
platform 49000000.edma: alias fck already exists
platform 49000000.edma: alias fck already exists
platform 49000000.edma: alias fck already exists
OMAP GPIO hardware version 0.1
hw-breakpoint: debug architecture 0x4 unsupported.
bio: create slab <bio-0> at 0
raid6: int32x1     82 MB/s
raid6: int32x2    116 MB/s
raid6: int32x4    100 MB/s
raid6: int32x8     89 MB/s
raid6: using algorithm int32x2 (116 MB/s)
raid6: using intx1 recovery algorithm
edma-dma-engine edma-dma-engine.0: TI EDMA DMA engine driver
vmmcsd_fixed: 3300 mV 
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
omap_i2c 44e0b000.i2c: could not find pctldev for node /[email protected]/pinmux_i2c0_pins, deferring probe
platform 44e0b000.i2c: Driver omap_i2c requests probe deferral
cfg80211: Calling CRDA to update world regulatory domain
Switched to clocksource timer1
NET: Registered protocol family 2
TCP established hash table entries: 4096 (order: 2, 16384 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP: reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
hw perfevents: enabled with ARMv7 Cortex-A8 PMU driver, 5 counters available
futex hash table entries: 256 (order: -1, 3072 bytes)
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
aufs 3.x-rcN-20140113
msgmni has been set to 987
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
omap_uart 44e09000.serial: no wakeirq for uart0
44e09000.serial: ttyO0 at MMIO 0x44e09000 (irq = 88, base_baud = 3000000) is a OMAP UART0
console [ttyO0] enabled
[drm] Initialized drm 1.1.0 20060810
brd: module loaded
mtdoops: mtd device (mtddev=name/number) must be supplied
usbcore: registered new interface driver kaweth
pegasus: v0.9.3 (2013/04/25), Pegasus/Pegasus II USB Ethernet driver
usbcore: registered new interface driver pegasus
usbcore: registered new interface driver rtl8150
usbcore: registered new interface driver asix
usbcore: registered new interface driver ax88179_178a
usbcore: registered new interface driver cdc_ether
usbcore: registered new interface driver dm9601
usbcore: registered new interface driver smsc75xx
usbcore: registered new interface driver smsc95xx
usbcore: registered new interface driver net1080
usbcore: registered new interface driver cdc_subset
usbcore: registered new interface driver zaurus
usbcore: registered new interface driver MOSCHIP usb-ethernet driver
usbcore: registered new interface driver int51x1
usbcore: registered new interface driver cdc_ncm
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-omap: OMAP-EHCI Host Controller driver
usbcore: registered new interface driver usb-storage
mousedev: PS/2 mouse device common for all mice
omap_rtc 44e3e000.rtc: rtc core: registered 44e3e000.rtc as rtc0
i2c /dev entries driver
omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
48060000.mmc supply vmmc_aux not found, using dummy regulator
481d8000.mmc supply vmmc_aux not found, using dummy regulator
mmc0: host does not support reading read-only switch. assuming write-enable.
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
oprofile: using arm/armv7
mmc0: new high speed SDHC card at address b368
u32 classifier
    Actions configured
TCP: cubic registered
NET: Registered protocol family 10
mmcblk0: mmc0:b368 SD8GB 7.48 GiB 
 mmcblk0: p1 p2
sit: IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
Key type dns_resolver registered
ThumbEE CPU extension supported.
bio: create slab <bio-1> at 1
Btrfs loaded
regulator-dummy: disabling
slave hdmi.6: could not get i2c
platform hdmi.6: Driver slave requests probe deferral
platform 4830e000.lcdc: Driver tilcdc requests probe deferral
DCDC1: at 1500 mV 
vdd_mpu: 925 <--> 1325 mV at 1100 mV 
vdd_core: 925 <--> 1150 mV at 1100 mV 
LDO1: at 1800 mV 
LDO2: at 3300 mV 
LDO3: 1800 mV 
LDO4: at 3300 mV 
tps65217 0-0024: TPS65217 ID 0xe version 1.2
omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
tilcdc 4830e000.lcdc: found TDA19988
[drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[drm] No driver support for vblank timestamp query.
Console: switching to colour frame buffer device 240x67
tilcdc 4830e000.lcdc: fb0:  frame buffer device
tilcdc 4830e000.lcdc: registered panic notifier
[drm] Initialized tilcdc 1.0.0 20121205 on minor 0
console [netcon0] enabled
netconsole: network logging started
mmc1: BKOPS_EN bit is not set
mmc1: new high speed MMC card at address 0001
mmcblk1: mmc1:0001 MMC02G 1.78 GiB 
mmcblk1boot0: mmc1:0001 MMC02G partition 1 1.00 MiB
davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
davinci_mdio 4a101000.mdio: detected phy mask fffffffe
mmcblk1boot1: mmc1:0001 MMC02G partition 2 1.00 MiB
libphy: 4a101000.mdio: probed
 mmcblk1: p1 p2 p3 p4
davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver SMSC LAN8710/LAN8720
 mmcblk1boot1: unknown partition table
Detected MACID = c8:a0:30:b3:d5:d7
omap_rtc 44e3e000.rtc: setting system clock to 2000-01-01 00:00:01 UTC (946684801)
 mmcblk1boot0: unknown partition table
EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
devtmpfs: mounted
Freeing unused kernel memory: 488K (c09ed000 - c0a67000)
INIT: version 2.88 booting
Starting udev
udevd[78]: starting version 182
47401300.usb-phy supply vcc not found, using dummy regulator
47401b00.usb-phy supply vcc not found, using dummy regulator
omap_rng 48310000.rng: OMAP Random Number Generator ver. 20
random: nonblocking pool is initialized
musb-hdrc musb-hdrc.0.auto: MUSB HDRC host driver
musb-hdrc musb-hdrc.0.auto: new USB bus registered, assigned bus number 1
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 2
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered
Populating dev cache
Sun Nov  2 10:41:07 UTC 2014
INIT: Entering runlevel: 5
Configuring network interfaces... net eth0: initializing cpsw version 1.12 (0)
net eth0: phy found : id is : 0x7c0f1
libphy: PHY 4a101000.mdio:01 not found
net eth0: phy 4a101000.mdio:01 not found on slave 1
IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
udhcpc (v1.22.1) started
Sending discover...
Sending discover...
Sending discover...
No lease, forking to background
done.
Starting syslogd/klogd: done

Poky (Yocto Project Reference Distro) 1.7 beaglebone /dev/ttyO0

beaglebone login: 

 

Para a imagem core-image-sato (com interface gráfica), temos o seguinte log de boot: 

U-Boot SPL 2013.07 (Nov 02 2014 - 08:12:48)
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0 
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Peripheral mode controller at 47401000 using PIO, IRQ 0
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0 
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Host mode controller at 47401800 using PIO, IRQ 0
OMAP SD/MMC: 0
reading args
spl: error reading image args, err - -1
reading u-boot.img
reading u-boot.img


U-Boot 2013.07 (Nov 02 2014 - 08:12:48)

I2C:   ready
DRAM:  512 MiB
WARNING: Caches not enabled
NAND:  0 MiB
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
*** Warning - readenv() failed, using default environment

musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0 
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Peripheral mode controller at 47401000 using PIO, IRQ 0
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0 
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Host mode controller at 47401800 using PIO, IRQ 0
Net:   <ethaddr> not set. Validating first E-fuse MAC
cpsw, usb_ether
Hit any key to stop autoboot:  0 
mmc0 is current device
SD/MMC found on device 0
reading uEnv.txt
** Unable to read file uEnv.txt **
5068072 bytes read in 912 ms (5.3 MiB/s)
29192 bytes read in 56 ms (508.8 KiB/s)
Booting from mmc ...
## Booting kernel from Legacy Image at 82000000 ...
   Image Name:   Linux-3.14.19-yocto-standard
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5068008 Bytes = 4.8 MiB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
   Loading Kernel Image ... OK
   Loading Device Tree to 8fff5000, end 8ffff207 ... OK

Starting kernel ...

Booting Linux on physical CPU 0x0
Initializing cgroup subsys cpuset
Initializing cgroup subsys cpu
Initializing cgroup subsys cpuacct
Linux version 3.14.19-yocto-standard ([email protected]) (gcc version 4.9.1 (GCC) ) #1 PREEMPT Sun Nov 2 08:10:58 BRST 2014
CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine model: TI AM335x BeagleBone
cma: CMA: reserved 16 MiB at 9e800000
Memory policy: Data cache writeback
CPU: All CPU(s) started in SVC mode.
AM335X ES2.0 (sgx neon )
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 129792
Kernel command line: console=ttyO0,115200n8 root=/dev/mmcblk0p2 ro rootfstype=ext4 rootwait
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
allocated 1048576 bytes of page_cgroup
please try 'cgroup_disable=memory' option if you don't want memory cgroups
Memory: 489264K/523264K available (7631K kernel code, 522K rwdata, 2500K rodata, 491K init, 757K bss, 34000K reserved, 0K highmem)
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc : 0xe0800000 - 0xff000000   ( 488 MB)
    lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
    pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    modules : 0xbf000000 - 0xbfe00000   (  14 MB)
      .text : 0xc0008000 - 0xc09ecfd0   (10132 kB)
      .init : 0xc09ed000 - 0xc0a67d64   ( 492 kB)
      .data : 0xc0a68000 - 0xc0aea954   ( 523 kB)
       .bss : 0xc0aea954 - 0xc0ba80c8   ( 758 kB)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Preemptible hierarchical RCU implementation.
NR_IRQS:16 nr_irqs:16 16
IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
Total of 128 interrupts on 1 active controller
OMAP clockevent source: timer2 at 24000000 Hz
sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956969942ns
OMAP clocksource: timer1 at 24000000 Hz
Console: colour dummy device 80x30
Calibrating delay loop... 548.86 BogoMIPS (lpj=2744320)
pid_max: default: 32768 minimum: 301
Security Framework initialized
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
Initializing cgroup subsys debug
Initializing cgroup subsys memory
Initializing cgroup subsys devices
Initializing cgroup subsys freezer
Initializing cgroup subsys net_cls
Initializing cgroup subsys blkio
Initializing cgroup subsys vm
CPU: Testing write buffer coherency: ok
ftrace: allocating 25677 entries in 76 pages
Setting up static identity map for 0x806e43d0 - 0x806e4428
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
omap_hwmod: tptc0 using broken dt data from edma
omap_hwmod: tptc1 using broken dt data from edma
omap_hwmod: tptc2 using broken dt data from edma
omap_hwmod: debugss: _wait_target_disable failed
xor: measuring software checksum speed
   arm4regs  :   685.200 MB/sec
   8regs     :   504.400 MB/sec
   32regs    :   658.400 MB/sec
xor: using function: arm4regs (685.200 MB/sec)
pinctrl core: initialized pinctrl subsystem
regulator-dummy: no parameters
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor ladder
cpuidle: using governor menu
platform 49000000.edma: alias fck already exists
platform 49000000.edma: alias fck already exists
platform 49000000.edma: alias fck already exists
OMAP GPIO hardware version 0.1
hw-breakpoint: debug architecture 0x4 unsupported.
bio: create slab <bio-0> at 0
raid6: int32x1     82 MB/s
raid6: int32x2    116 MB/s
raid6: int32x4    100 MB/s
raid6: int32x8     89 MB/s
raid6: using algorithm int32x2 (116 MB/s)
raid6: using intx1 recovery algorithm
edma-dma-engine edma-dma-engine.0: TI EDMA DMA engine driver
vmmcsd_fixed: 3300 mV 
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
omap_i2c 44e0b000.i2c: could not find pctldev for node /[email protected]/pinmux_i2c0_pins, deferring probe
platform 44e0b000.i2c: Driver omap_i2c requests probe deferral
cfg80211: Calling CRDA to update world regulatory domain
Switched to clocksource timer1
NET: Registered protocol family 2
TCP established hash table entries: 4096 (order: 2, 16384 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP: reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
hw perfevents: enabled with ARMv7 Cortex-A8 PMU driver, 5 counters available
futex hash table entries: 256 (order: -1, 3072 bytes)
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
aufs 3.x-rcN-20140113
msgmni has been set to 987
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
omap_uart 44e09000.serial: no wakeirq for uart0
44e09000.serial: ttyO0 at MMIO 0x44e09000 (irq = 88, base_baud = 3000000) is a OMAP UART0
console [ttyO0] enabled
[drm] Initialized drm 1.1.0 20060810
brd: module loaded
mtdoops: mtd device (mtddev=name/number) must be supplied
usbcore: registered new interface driver kaweth
pegasus: v0.9.3 (2013/04/25), Pegasus/Pegasus II USB Ethernet driver
usbcore: registered new interface driver pegasus
usbcore: registered new interface driver rtl8150
usbcore: registered new interface driver asix
usbcore: registered new interface driver ax88179_178a
usbcore: registered new interface driver cdc_ether
usbcore: registered new interface driver dm9601
usbcore: registered new interface driver smsc75xx
usbcore: registered new interface driver smsc95xx
usbcore: registered new interface driver net1080
usbcore: registered new interface driver cdc_subset
usbcore: registered new interface driver zaurus
usbcore: registered new interface driver MOSCHIP usb-ethernet driver
usbcore: registered new interface driver int51x1
usbcore: registered new interface driver cdc_ncm
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-omap: OMAP-EHCI Host Controller driver
usbcore: registered new interface driver usb-storage
mousedev: PS/2 mouse device common for all mice
omap_rtc 44e3e000.rtc: rtc core: registered 44e3e000.rtc as rtc0
i2c /dev entries driver
omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
48060000.mmc supply vmmc_aux not found, using dummy regulator
481d8000.mmc supply vmmc_aux not found, using dummy regulator
mmc0: host does not support reading read-only switch. assuming write-enable.
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
oprofile: using arm/armv7
mmc0: new high speed SDHC card at address b368
u32 classifier
    Actions configured
TCP: cubic registered
NET: Registered protocol family 10
mmcblk0: mmc0:b368 SD8GB 7.48 GiB 
 mmcblk0: p1 p2
sit: IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
Key type dns_resolver registered
ThumbEE CPU extension supported.
bio: create slab <bio-1> at 1
Btrfs loaded
regulator-dummy: disabling
slave hdmi.6: could not get i2c
platform hdmi.6: Driver slave requests probe deferral
platform 4830e000.lcdc: Driver tilcdc requests probe deferral
DCDC1: at 1500 mV 
vdd_mpu: 925 <--> 1325 mV at 1100 mV 
vdd_core: 925 <--> 1150 mV at 1100 mV 
LDO1: at 1800 mV 
LDO2: at 3300 mV 
LDO3: 1800 mV 
LDO4: at 3300 mV 
tps65217 0-0024: TPS65217 ID 0xe version 1.2
omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
tilcdc 4830e000.lcdc: found TDA19988
[drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[drm] No driver support for vblank timestamp query.
Console: switching to colour frame buffer device 240x67
tilcdc 4830e000.lcdc: fb0:  frame buffer device
tilcdc 4830e000.lcdc: registered panic notifier
[drm] Initialized tilcdc 1.0.0 20121205 on minor 0
console [netcon0] enabled
netconsole: network logging started
mmc1: BKOPS_EN bit is not set
mmc1: new high speed MMC card at address 0001
mmcblk1: mmc1:0001 MMC02G 1.78 GiB 
mmcblk1boot0: mmc1:0001 MMC02G partition 1 1.00 MiB
davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
davinci_mdio 4a101000.mdio: detected phy mask fffffffe
mmcblk1boot1: mmc1:0001 MMC02G partition 2 1.00 MiB
libphy: 4a101000.mdio: probed
 mmcblk1: p1 p2 p3 p4
davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver SMSC LAN8710/LAN8720
 mmcblk1boot1: unknown partition table
Detected MACID = c8:a0:30:b3:d5:d7
omap_rtc 44e3e000.rtc: setting system clock to 2000-01-01 00:00:01 UTC (946684801)
 mmcblk1boot0: unknown partition table
EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
devtmpfs: mounted
Freeing unused kernel memory: 488K (c09ed000 - c0a67000)
INIT: version 2.88 booting
Starting udev
udevd[81]: starting version 182
47401300.usb-phy supply vcc not found, using dummy regulator
47401b00.usb-phy supply vcc not found, using dummy regulator
omap_rng 48310000.rng: OMAP Random Number Generator ver. 20
random: nonblocking pool is initialized
EXT4-fs (mmcblk1p4): recovery complete
FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
EXT4-fs (mmcblk1p4): mounted filesystem with ordered data mode. Opts: (null)
musb-hdrc musb-hdrc.0.auto: MUSB HDRC host driver
musb-hdrc musb-hdrc.0.auto: new USB bus registered, assigned bus number 1
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 2
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
EXT4-fs (mmcblk1p3): recovery complete
EXT4-fs (mmcblk1p3): mounted filesystem with ordered data mode. Opts: (null)
usb 2-1: new low-speed USB device number 2 using musb-hdrc
input: Areson USB Device as /devices/ocp.3/47400000.usb/47401c00.usb/musb-hdrc.1.auto/usb2/2-1/2-1:1.0/0003:04B4:0060.0001/input/input0
hid-generic 0003:04B4:0060.0001: input: USB HID v1.00 Mouse [Areson USB Device] on usb-musb-hdrc.1.auto-1/input0
hid-generic 0003:04B4:0060.0002: device has no listeners, quitting
EXT4-fs (mmcblk1p2): recovery complete
EXT4-fs (mmcblk1p2): mounted filesystem with ordered data mode. Opts: (null)
EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered
Populating dev cache
ALSA: Restoring mixer settings...
/usr/sbin/alsactl: load_state:1729: No soundcards found...
Sun Nov  2 11:26:54 UTC 2014
INIT: Entering runlevel: 5
Configuring network interfaces... net eth0: initializing cpsw version 1.12 (0)
net eth0: phy found : id is : 0x7c0f1
libphy: PHY 4a101000.mdio:01 not found
net eth0: phy 4a101000.mdio:01 not found on slave 1
IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
done.
Starting system message bus: dbus.
Starting Connection Manager
Starting Xserver
Starting Dropbear SSH server: 
Generating key, this may take a while...

X.Org X Server 1.15.1
Release Date: 2014-04-13
X Protocol Version 11, Revision 0
Build Operating System: Linux 3.13.0-29-generic x86_64 
Current Operating System: Linux beaglebone 3.14.19-yocto-standard #1 PREEMPT Sun Nov 2 08:10:58 BRST 2014 armv7l
Kernel command line: console=ttyO0,115200n8 root=/dev/mmcblk0p2 ro rootfstype=ext4 rootwait
Build Date: 02 November 2014  09:07:29AM
 
Current version of pixman: 0.32.6
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Sun Nov  2 11:26:55 2014
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
Initializing built-in extension Generic Event Extension
Initializing built-in extension SHAPE
Initializing built-in extension MIT-SHM
Initializing built-in extension XInputExtension
Initializing built-in extension XTEST
Initializing built-in extension BIG-REQUESTS
Initializing built-in extension SYNC
Initializing built-in extension XKEYBOARD
Initializing built-in extension XC-MISC
Initializing built-in extension XFIXES
Initializing built-in extension RENDER
Initializing built-in extension RANDR
Initializing built-in extension COMPOSITE
Initializing built-in extension DAMAGE
Initializing built-in extension MIT-SCREEN-SAVER
Initializing built-in extension DOUBLE-BUFFER
Initializing built-in extension DPMS
Initializing built-in extension Present
Initializing built-in extension X-Resource
Initializing built-in extension XVideo
Initializing built-in extension XVideo-MotionCompensation
Initializing built-in extension XFree86-VidModeExtension
Initializing built-in extension XFree86-DGA
Initializing built-in extension XFree86-DRI
Initializing built-in extension DRI2
tilcdc 4830e000.lcdc: timeout waiting for framedone
D-BUS per-session daemon address is: unix:abstract=/tmp/dbus-o4klvcTnFA,guid=264da5d515f2d0ff5810b95f54561501
matchbox: Cant find a keycode for keysym 269025056
matchbox: ignoring key shortcut XF86Calendar=!$contacts

matchbox: Cant find a keycode for keysym 2809
matchbox: ignoring key shortcut telephone=!$dates

matchbox: Cant find a keycode for keysym 269025050
matchbox: ignoring key shortcut XF86Start=!matchbox-remote -desktop

[settings daemon] Forking. run with -n to prevent fork

** (matchbox-panel:832): WARNING **: Failed to load applet "battery" (/usr/lib/matchbox-panel/libbattery.so: cannot open shared object file: No .
Public key portion is:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCiUfu/dtU5S1006LGmsyQq2ipfKJ5UZ2OwyFMtI7g7+xyhyFtGONG+slzuHDqcdwTkQ5Kqjxzs+2I0FJq9wkKkrbjxC/6RvRWIq8HzDHase
Fingerprint: md5 e3:f9:c0:21:8e:68:e7:0b:02:27:99:1a:1a:16:8b:46
dropbear.
Starting rpcbind daemon...done.
Starting syslogd/klogd: done
 * Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon
   ...done.
Starting Telephony daemon
Starting Linux NFC daemon

Poky (Yocto Project Reference Distro) 1.7 beaglebone /dev/ttyO0

beaglebone login: 

 

E as seguintes imagens saindo pelo HDMI temos as seguintes telas (imagens):

 

bbb-daisy-boot

Figura 1

 

bbb-daisy-desktop

Figura 2

 

 

Para aprender mais

 

Embedded Linux Build Systems

Cozinhando com o Yocto Project

Desvendando Yocto Project – Primeiros passos

 

Pronto! Agora você já tem um ponto de partida para construir  e customizar as suas distribuições Linux embarcado com o Yocto Project.

 

Referências

 

https://www.embarcados.com.br/lancada-nova-versao-1-7-dizzy-yocto-project 

https://www.embarcados.com.br/beaglebone-black-yocto-daisy/

http://elinux.org/Beagleboard:BeagleBone_Capes

https://github.com/beagleboard/meta-beagleboard

https://www.embarcados.com.br/beaglebone-black-yocto/

https://www.embarcados.com.br/author/henriqueprossi/

http://elinux.org/Beagleboard:BeagleBone_Black_Serial

 

NEWSLETTER

Receba os melhores conteúdos sobre sistemas eletrônicos embarcados, dicas, tutoriais e promoções.

Obrigado! Sua inscrição foi um sucesso.

Ops, algo deu errado. Por favor tente novamente.

Licença Creative Commons Esta obra está licenciada com uma Licença Creative Commons Atribuição-CompartilhaIgual 4.0 Internacional.

Diego Sueiro
Formado em Engenharia de Controle e Automação pela UNIFEI e CEO do Embarcados, atualmente trabalho na Inglaterra com Desenvolvimento de Sistemas Linux Embarcado Real Time. Sou consultor e desenvolvedor de software para Sistemas Embarcados com vasta experiência em projetos com processadores de 8bits a 32bits, sistemas bare metal, RTOS, Linux Embarcado e Android Embarcado. Um apaixonado por Pink Floyd e Empreendedorismo.

5
Deixe um comentário

avatar
 
2 Comment threads
3 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
2 Comment authors
Diego SueiroChristian SchultzYocto Project - Introdução - Cleiton Bueno Recent comment authors
  Notificações  
recentes antigos mais votados
Notificar
trackback
Christian Schultz
Visitante
Xultz

Olá! Muito obrigado pelo texto! Eu segui o processo para gerar a imagem core-image-minimal, e a compilação ocorreu sem problemas. Porém, como resultado ele gerou imagens do tipo uImage ao invés de zImage, eu errei em algum ponto da configuração? Por este motivo eu copiei somente o MLO e u-boot.img para a partição boot. Ao dar boot na placa, ele carrega o kernel, porém o mesmo fica travado, conforme mostra a seguir: SD/MMC found on device 0 reading uEnv.txt ** Unable to read file uEnv.txt ** gpio: pin 55 (gpio 55) value is 1 5067360 bytes read in 875 ms… Leia mais »

Diego Sueiro
Visitante
Diego Sueiro

Xultz, Acabei de atualizar minha cópia local do poky (no branch dizzy) e gerei o sistema de novo e não tive nenhum problema. As mensagens de boot são: U-Boot SPL 2013.07 (Jan 21 2015 - 14:58:33) musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn) musb-hdrc: MHDRC RTL version 2.0 musb-hdrc: setup fifo_mode 4 musb-hdrc: 28/31 max ep, 16384/16384 memory USB Peripheral mode controller at 47401000 using PIO, IRQ 0 musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn) musb-hdrc: MHDRC RTL version 2.0 musb-hdrc: setup fifo_mode 4 musb-hdrc: 28/31 max ep, 16384/16384 memory USB Host mode controller… Leia mais »

Christian Schultz
Visitante
Xultz

Obrigado pela resposta, Diego.
Eu vou tentar o processo novamente, anotando com cuidado todos os passos tomados, e se tiver dificuldade novamente, eu coloco as informações que você solicitou. Mas isto só deve acontecer depois de amanhã, meu pobre computador demora quase 12 horas prá gerar a imagem 🙂

Christian Schultz
Visitante
Xultz

Olá, consegui fazer a imagem minimal rodar, eu liguei a BBB e não pressionei o botão user, assim pelo jeito o bootloader ficou confuso 🙂
Eu optei por apagar a mmc com os comandos
mmc dev 1
mmc erase 0 512

e desta forma ela está bootando sem precisar pressionar o botão.
Obrigado pela ajuda!
No momento estou procurando instruções de como instalo a imagem da SD Card para a mmc da BBB, mas não estou encontrando as informações, se tiver alguma dica a respeito, seria bem interessante!