A nova versão 1.6 (daisy) do Yocto Project foi lançada recentemente e uma das novidades interessantes é que a Beaglebone Black agora é 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 BBB) você terá de recorrer a meta-ti.
Desde a versão 3.12 mainline do Kernel Linux a Beaglebone Black é suportada e nesta nova 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 BBB 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 BBB 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 + 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 daisy git://git.yoctoproject.org/poky poky-daisy
Agora vamos configurar o ambiente para gerarmos os artefatos de software:
cd ~/yocto source poky-daisy/oe-init-build-env build-daisy
Modifique e adicione as seguintes variáveis no arquivo ~/yocto/build-daisy/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 a interface gráfica (core-image-mininal) com o comando:
source poky-daisy/oe-init-build-env build-daisy bitbake core-image-minimal
Esta é a configuração de build que utilizada:
Build Configuration: BB_VERSION = "1.22.0" BUILD_SYS = "x86_64-linux" NATIVELSBSTRING = "Ubuntu-12.10" TARGET_SYS = "arm-poky-linux-gnueabi" MACHINE = "beaglebone" DISTRO = "poky" DISTRO_VERSION = "1.6" TUNE_FEATURES = "armv7a vfp neon callconvention-hard cortexa8" TARGET_FPU = "vfp-neon" meta meta-yocto meta-yocto-bsp = "daisy:5306aaab07a7a9b3b0c7e8008dabbd2e89daec28"
Vamos construir também uma imagem com suporte a interface gráfica (core-image-sato):
bitbake core-image-sato
Gravando as imagens
Este procedimento é praticamente o mesmo utilizado no tutorial 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-daisy/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 sudo bash -c 'echo "musb_am335x" > /media/rootfs/etc/modules'
Este último comando é importante, pois sem ele os dispositivos conectados a USB não serão reconhecidos pelo kernel.
Se você já possui algum outro sistema operacional instalado no eMMC da BBB, como por exemplo o Angstrom, execute os seguintes comandos:
cd ~/yocto/build-daisy/tmp/deploy/images/beaglebone cp zImage /media/boot mkdir /media/boot/dtbs cp zImage-am335x-boneblack.dtb /media/boot/dtbs/am335x-boneblack.dtb cd ~/yocto/bbb-sdcard-prepare/scripts cp uEnv.txt /media/boot
Dessa maneira garantimos que o bootloader irá carregar os arquivos corretos do microSD card.
Testando as imagens
Remova o microSD do computador e insira-o na BBB, 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.
A imagem core-image-minimal (sem interface gráfica) possui o seguinte log de boot:
U-Boot SPL 2013.07 (Apr 27 2014 - 08:41:55)
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 (Apr 27 2014 - 08:41:55)
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 **
4986048 bytes read in 862 ms (5.5 MiB/s)
29192 bytes read in 43 ms (662.1 KiB/s)
Booting from mmc ...
## Booting kernel from Legacy Image at 82000000 ...
Image Name: Linux-3.14.0-yocto-standard
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4985984 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.0-yocto-standard (dsueiro@dsueiro-N46VM) (gcc version 4.8.2 (GCC) ) #1 PREEMPT Sun Apr 27 08:19:51 BRT 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: 489436K/523264K available (7491K kernel code, 520K rwdata, 2468K rodata, 488K init, 757K bss, 33828K 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 - 0xc09c2044 (9961 kB)
.init : 0xc09c3000 - 0xc0a3d034 ( 489 kB)
.data : 0xc0a3e000 - 0xc0ac00d4 ( 521 kB)
.bss : 0xc0ac00d4 - 0xc0b7d678 ( 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
CPU: Testing write buffer coherency: ok
ftrace: allocating 25107 entries in 74 pages
Setting up static identity map for 0x806c4000 - 0x806c4058
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.800 MB/sec
32regs : 658.800 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 89 MB/s
raid6: int32x2 107 MB/s
raid6: int32x4 90 MB/s
raid6: int32x8 92 MB/s
raid6: using algorithm int32x2 (107 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 /pinmux@44e10800/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
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
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
Supports vblank timestamp caching Rev 2 (21.10.2013).
No driver support for vblank timestamp query. tilcdc 4830e000.lcdc: No connectors reported connected with modes
Cannot find any crtc or sizes – going 1024×768 Console: switching to colour frame buffer device 128×48 tilcdc 4830e000.lcdc: fb0: frame buffer device tilcdc 4830e000.lcdc: registered panic notifier
Initialized tilcdc 1.0.0 20121205 on minor 0 console [netcon0] enabled netconsole: network logging started davinci_mdio 4a101000.mdio: davinci mdio revision 1.6 davinci_mdio 4a101000.mdio: detected phy mask fffffffe libphy: 4a101000.mdio: probed davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver SMSC LAN8710/LAN8720 Detected MACID = c8:a0:30:c4:61:4c omap_rtc 44e3e000.rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800) 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 (c09c3000 – c0a3d000) 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 mmcblk1boot1: mmc1:0001 MMC02G partition 2 1.00 MiB mmcblk1: p1 p2 p3 p4 mmcblk1boot1: unknown partition table mmcblk1boot0: unknown partition table INIT: version 2.88 booting Starting udev udevd[78]: starting version 182 random: nonblocking pool is initialized EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered Starting Bootlog daemon: bootlogd. Populating dev cache Sun Apr 27 12:24:00 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, failing Starting syslogd/klogd: done Stopping Bootlog daemon: bootlogd. Poky (Yocto Project Reference Distro) 1.6 beaglebone /dev/ttyO0 beaglebone login:
Para a imagem core-image-sato (com interface gráfica) temos o sequinte log de boot:
U-Boot SPL 2013.07 (Apr 27 2014 - 08:41:55)
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 (Apr 27 2014 - 08:41:55)
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 **
4986048 bytes read in 877 ms (5.4 MiB/s)
29192 bytes read in 59 ms (482.4 KiB/s)
Booting from mmc ...
## Booting kernel from Legacy Image at 82000000 ...
Image Name: Linux-3.14.0-yocto-standard
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4985984 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.0-yocto-standard (dsueiro@dsueiro-N46VM) (gcc version 4.8.2 (GCC) ) #1 PREEMPT Tue Apr 29 17:00:14 BRT 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: 489436K/523264K available (7491K kernel code, 520K rwdata, 2468K rodata, 488K init, 757K bss, 33828K 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 - 0xc09c2044 (9961 kB)
.init : 0xc09c3000 - 0xc0a3d034 ( 489 kB)
.data : 0xc0a3e000 - 0xc0ac00d4 ( 521 kB)
.bss : 0xc0ac00d4 - 0xc0b7d678 ( 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
CPU: Testing write buffer coherency: ok
ftrace: allocating 25107 entries in 74 pages
Setting up static identity map for 0x806c4000 - 0x806c4058
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.800 MB/sec
32regs : 658.800 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 89 MB/s
raid6: int32x2 107 MB/s
raid6: int32x4 90 MB/s
raid6: int32x8 92 MB/s
raid6: using algorithm int32x2 (107 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 /pinmux@44e10800/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
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
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
Supports vblank timestamp caching Rev 2 (21.10.2013).
No driver support for vblank timestamp query. tilcdc 4830e000.lcdc: No connectors reported connected with modes
Cannot find any crtc or sizes – going 1024×768 Console: switching to colour frame buffer device 128×48 tilcdc 4830e000.lcdc: fb0: frame buffer device tilcdc 4830e000.lcdc: registered panic notifier
Initialized tilcdc 1.0.0 20121205 on minor 0 console [netcon0] enabled netconsole: network logging started davinci_mdio 4a101000.mdio: davinci mdio revision 1.6 davinci_mdio 4a101000.mdio: detected phy mask fffffffe libphy: 4a101000.mdio: probed davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver SMSC LAN8710/LAN8720 Detected MACID = c8:a0:30:c4:61:4c omap_rtc 44e3e000.rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800) 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 (c09c3000 – c0a3d000) 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 mmcblk1boot1: mmc1:0001 MMC02G partition 2 1.00 MiB mmcblk1: p1 p2 p3 p4 mmcblk1boot1: unknown partition table mmcblk1boot0: unknown partition table 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 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 Starting Bootlog daemon: bootlogd. Populating dev cache ALSA: Restoring mixer settings… /usr/sbin/alsactl: load_state:1729: No soundcards found… Wed Apr 30 12:24:00 UTC 2014 update-rc.d: /etc/init.d/run-postinsts exists during rc.d purge (continuing) Removing any system startup links for run-postinsts … /etc/rcS.d/S99run-postinsts 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, failing 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.0 Release Date: 2013-12-27 X Protocol Version 11, Revision 0 Build Operating System: Linux 3.5.0-27-generic x86_64 Current Operating System: Linux beaglebone 3.14.0-yocto-standard #1 PREEMPT Tue Apr 29 17:00:14 BRT 2014 armv7l Kernel command line: console=ttyO0,115200n8 root=/dev/mmcblk0p2 ro rootfstype=ext4 rootwait Build Date: 30 April 2014 09:03:01AM Current version of pixman: 0.32.4 Before reporting problems, check https://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: Wed Apr 30 12:24:11 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 D-BUS per-session daemon address is: unix:abstract=/tmp/dbus-7TpuW8mcOx,guid=e7a48ac5bfafd136fe3db4ae5360eb6c 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
Forking. run with -n to prevent fork ** (matchbox-panel:785): WARNING **: Failed to load applet “battery” (/usr/lib/matchbox-panel/libbattery.so: cannot open shared object file: No s. Public key portion is: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC/Hyej7shNPsm2KMET/n1LkwKbe+sfPG7saBuuWJPIXeo06FpOdv/FMYyYNHZSRVGFRJ5uFZqPOWbS3IDPv4u5UtXIRxxAutI/oMU54srDCe Fingerprint: md5 49:dc:c4:08:d7:58:fe:3f:7b:fa:c0:b5:d3:88:47:f0 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 Stopping Bootlog daemon: bootlogd. Poky (Yocto Project Reference Distro) 1.6 beaglebone /dev/ttyO0 beaglebone login:
E as seguintes imagens saindo pelo HDMI:
Para aprender mais
Beaglebone Black + Yocto Daisy (Versão 1.6)
Lançada Nova Versão 1.7 (dizzy) do Yocto Project
Pronto! Agora você já tem um ponto de partida para construir e customizar as suas distribuições Linux embarcado com o Yocto Project.










Só para compartilhar: este tutorial também funcionou perfeitamente usando-se o CentOS Linux 7 (Core), embora tenha apresentado alguns ‘warnings’. Fica, então, a sugestão para atualizar a lista no tópico: “Preparando o Host”.
Wendell,
Obrigado pelo feedback.
A lista do post seguem as versões oficialmente suportadas pelo projeto.
O centOS 7 ainda não consta na lista, mas boa notícia que tenha funcionado.
Abraços
O Yocto me gerou arquivos com nomes diferentes, ao invés de gerar o zImage e o zImage-am335x-boneblack.dtb, ele gerou o uImage e o
uImage-am335x-boneblack.dtb. Fiz a cópia mesmo assim para o sdcard, porém quando ligo a beaglebone, ela fica com os leds d2,d3,d4,d5 acessos e não faz mais nada. Abri o arquivo uEnv e mudei o nome do kernel_file=zImage para kernel_file=uImage, porém o problema persiste. Diego, você saberia me dizer o que pode estar dando errado?
Muito bons os materiais do Embarcados, parabéns!
Olá Adriano,
Vou verificar o motivo da mudança de zImage para uImage.
Se você energizar a placa segurando o botão que fica próximo ao slot do uSD a placa também não “boota”?
Você tem um cabo para ser conectado a interface serial de debug da BBB? Assim fica mais fácil de sabermos o que está acontecendo.
E obrigado pelo apoio.
Abraços.
Seguindo sua dica de ligar a placa com o botão pressionado deu certo! Obrigado pela ajuda.
Diego, obtive o mesmo resuiltado que o Adriano Casimiro