Neste artigo iremos conhecer a placa que iremos utilizar para embarcar a central telefônica VoIP com Asterisk, e toda estrutura para gerar a Distribuição Linux utilizando Yocto Project.
Preparando o ambiente no Host
O Yocto Project suporta oficialmente as seguintes distribuições GNU/Linux como ambiente de construção:
- Ubuntu
- Fedora
- OpenSUSE
- CentOS
- Debian
Para o correto funcionamento do ecossistema Yocto Project algumas ferramentas devem ser instaladas, mais detalhes acesse Required Packages for the Host Development System.
Ubuntu and Debian
$ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential \ chrpath socat libsdl1.2-dev xterm
Fedora
$ sudo dnf 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 perl-bignum socat \ findutils which SDL-devel xterm
OpenSUSE
$ sudo zypper install python gcc gcc-c++ git chrpath make wget python-xml \ diffstat makeinfo python-curses patch socat 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 socat \ perl-Data-Dumper perl-Text-ParseWords perl-Thread-Queue SDL-devel xterm
Neste momento todas as dependências estão instaladas no Host para construir a Distribuição Linux para central telefônica VoIP com Yocto Project.
A versão do Yocto Project utilizada é a 2.1 referente ao branch krogoth, a mesma para as demais camadas e utilizada no manifesto.
O Hardware
A placa utilizada para embarcar a central telefônica VoIP é a combinação de um módulo SoM Colibri i.MX6 da Toradex com uma Placa Base IRIS, algumas características vide a seguir e a placa na Figura 1:
- SoC: Freescale i.MX6 Solo (Single Core) ou DualLite (Dual Core);
- CPU: ARM Cortex-A9 @ 800MHz ~ 1GHz;
- GPU: Vivante 2D/3D GPUs;
- Memória (SDRAM): 256 MB ou 512 MB;
- Armazenamento: eMMC 4G flash ou microSD;
- Interface de rede: 10/100 Ethernet;
- Periféricos de comunicação: GPIO, SPI, I²C, I²S, UART.
O módulo SoM pode ser substituído por uma Colibri i.MX7 ou Colibri VF61 e a Placa Base também poderia ser uma Viola, porém, com poucas alterações é possível portar a Distribuição Linux da central telefônica VoIP para Raspberry Pi, Beaglebone Black e a maioria das placas com BSP de suporte no Yocto Project, visto que o principal requisito de periférico é uma interface ethernet.
Baixando o manifesto do projeto
Para facilitar a descrição das dependências e requisitos da customização da Distribuição Linux, foi criado um arquivo de manifesto descrevendo cada camada e repositório que iremos precisar para gerar o projeto. Foi utilizada a ferramenta repo do Google para gerenciar os repositórios e branchs do projeto.
Instalando a ferramenta repo:
$ mkdir ~/bin $ PATH=~/bin:$PATH $ curl https://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo $ chmod a+x ~/bin/repo
Utilizando o repo para baixar e sincronizar os repositórios e branchs, primeiro deve-se criar o diretório ippbx-yocto que irá conter a estrutura do projeto Yocto e todo processo para a construção da distribuição. Em seguida, utilizando a ferramenta repo, será clonado o repositório e realizada a sincronização.
$ mkdir ippbx-yocto $ cd ippbx-yocto $ repo init -u git://github.com/cleitonbueno/ippbx-yocto-manifest.git -b krogoth $ repo sync
Esta etapa pode demorar conforme a velocidade de sua internet.
Abaixo os links para o manifesto e a camada onde estão as personalizações:
Construindo a imagem
Neste momento, no diretório ippbx-yocto teremos outro diretório chamado poky-krogoth onde dentro do mesmo haverá as camadas que foram baixadas pelo repo. O próximo passo é criar o projeto.
Esta etapa foi automatizada informando ao repo para usar configurações do projeto copiando o local.conf e bblayers.conf da camada meta-b2open isso através do script setup-environment. Nesta camada também existem algumas adições de receitas que precisaram de correções ou adaptações para funcionar em nosso projeto, também é utilizado para suporte a Toradex Colibri i.MX6, a meta-fsl-arm e meta-fsl-arm-extra, e para o Asterisk e ferramentas VoIP será utilizada a meta-telephony.
Executando o comando como a seguir, será criado o projeto com o nome de build-ippbx. Com as camadas já configuradas, e o local.conf corretamente configurado, neste momento pode-se construir a imagem, usando a receita ‘ippbx-image‘.
$ source setup-environment $ bitbake ippbx-image
Será feito o download de todas dependências de pacotes, ferramentas, bibliotecas, utilitários, e o processo de build de cada item. Esta etapa pode levar vários minutos e até horas, além do kernel, bootloader e no final a imagem será criada em build-ippbx/tmp/deploy/images/colibri-imx6.
Gravando a image e realizando boot
Nesta etapa deverá ter em mãos um cartão microSD. Insira o mesmo e olhe nos logs do ‘dmesg‘ para confirmar o nome do device, algo como /dev/mmcblkX ou /dev/sdX. Em seguida, acesse build-ippbx/tmp/deploy/images/colibri-imx6/ippbx-image-colibri-imx6.sdcard.gz. Agora será feita a descompressão da imagem e na sequência a gravação para o microSD:
$ cd build-ippbx/tmp/deploy/images/colibri-imx6 $ sudo gunzip -c ippbx-image-colibri-imx6.sdcard.gz | sudo dd of=/dev/mmcblk0 bs=1M
Ao término da gravação, insira o cartão na placa base IRIS. Antes de alimentar será necessário conectar um cabo serial na Placa Base IRIS, alimentar a placa, interromper o bootloader e dizer que o boot será através do microSD. Este procedimento está descrito em detalhes no artigo Toradex Colibri iMX6 e Yocto Project Fido (1.8) na sessão Primeiro boot.
Abaixo a demonstração da interrupção do bootloader e executando a partir do microSD com `run sdboot`[linha 20] e o boot completo.
U-Boot 2016.11-2.7.2+g60021a4 (Apr 10 2017 - 03:00:00 +0200) CPU: Freescale i.MX6DL rev1.2 at 792 MHz Reset cause: WDOG I2C: ready DRAM: 512 MiB PMIC: device id: 0x10, revision id: 0x11, programmed MMC: FSL_SDHC: 0, FSL_SDHC: 1 auto-detected panel vga-rgb Display: vga-rgb (640x480) In: serial Out: serial Err: serial Model: Toradex Colibri iMX6 DualLite 512MB V1.0A, Serial# 04869728 Net: using PHY at 0 FEC [PRIME] Hit any key to stop autoboot: 0 Colibri iMX6 # printenv bootcmd bootcmd=run sdboot ; run emmcboot ; echo ; echo emmcboot failed ; run distro_bootcmd ; usb start ;setenv stdout serial,vga ; setenv stdin serial,usbkbd Colibri iMX6 # run sdboot; Booting from SD card reading imx6dl-colibri-eval-v3.dtb 43853 bytes read in 19 ms (2.2 MiB/s) reading uImage 4965656 bytes read in 248 ms (19.1 MiB/s) ## Booting kernel from Legacy Image at 11000000 ... Image Name: Linux-3.14.52-v2.6b2.1+g9f2723e Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 4965592 Bytes = 4.7 MiB Load Address: 10008000 Entry Point: 10008000 Verifying Checksum ... OK ## Flattened Device Tree blob at 12000000 Booting using the fdt blob at 0x12000000 Loading Kernel Image ... OK Using Device Tree in place at 12000000, end 1200db4c Starting kernel ... [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Initializing cgroup subsys cpu [ 0.000000] Initializing cgroup subsys cpuacct [ 0.000000] Linux version 3.14.52-v2.6b2.1+g9f2723e (cbueno@nb2) (gcc version 5.3.0 (GCC) ) #1 SMP Sun Jul 16 00:09:15 BRT 2017 [ 0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c5387d [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache [ 0.000000] Machine model: Toradex Colibri iMX6DL/S on Colibri Evaluation Board V3 [ 0.000000] cma: CMA: reserved 256 MiB at 20000000 [ 0.000000] Memory policy: Data cache writealloc [ 0.000000] PERCPU: Embedded 7 pages/cpu @8fb46000 s7936 r8192 d12544 u32768 [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048 [ 0.000000] Kernel command line: enable_wait_mode=off galcore.cont consoleblank=0 vt.global_cursor_default=0 ip=off root=/dev/mmcblk1p2 rw,noatime rootfstype=ext4 rootwait fec_mac=00:14:2d:4a:4e:60 consoleblank=0 no_console_suspend=1 console=ttymxc0,115200n8 logo.nologo video=mxcfb0:dev=lcd,EDT-WVGA,if=RGB666 video=mxcfb1:off fbmem=8M [ 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: 247340K/524288K available (6391K kernel code, 271K rwdata, 2116K rodata, 327K init, 416K bss, 276948K reserved, 0K highmem) [ 0.000000] Virtual kernel memory layout: [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB) [ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB) [ 0.000000] vmalloc : 0xa0800000 - 0xff000000 (1512 MB) [ 0.000000] lowmem : 0x80000000 - 0xa0000000 ( 512 MB) [ 0.000000] pkmap : 0x7fe00000 - 0x80000000 ( 2 MB) [ 0.000000] modules : 0x7f000000 - 0x7fe00000 ( 14 MB) [ 0.000000] .text : 0x80008000 - 0x8085704c (8509 kB) [ 0.000000] .init : 0x80858000 - 0x808a9f00 ( 328 kB) [ 0.000000] .data : 0x808aa000 - 0x808edd00 ( 272 kB) [ 0.000000] .bss : 0x808edd08 - 0x80955d98 ( 417 kB) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1 [ 0.000000] Hierarchical RCU implementation. [ 0.000000] RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2. [ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2 [ 0.000000] NR_IRQS:16 nr_irqs:16 16 [ 0.000000] L310 cache controller enabled [ 0.000000] l2x0: 16 ways, CACHE_ID 0x410000c8, AUX_CTRL 0x32450000, Cache size: 512 kB [ 0.000000] failed to set parent of clk gpu2d_core_sel to pll2_pfd1_594m: -22 [ 0.000000] Switching to timer-based delay loop [ 0.000007] sched_clock: 32 bits at 3000kHz, resolution 333ns, wraps every 1431655765682ns [ 0.000877] Console: colour dummy device 80x30 [ 0.000899] Calibrating delay loop (skipped), value calculated using timer frequency.. 6.00 BogoMIPS (lpj=30000) [ 0.000912] pid_max: default: 32768 minimum: 301 [ 0.001077] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes) [ 0.001090] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes) [ 0.007970] Initializing cgroup subsys debug [ 0.007989] Initializing cgroup subsys freezer [ 0.008026] CPU: Testing write buffer coherency: ok [ 0.008341] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000 [ 0.008407] Setting up static identity map for 0x10643f20 - 0x10643f78 [ 0.009990] CPU1: Booted secondary processor [ 0.010021] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001 [ 0.010135] Brought up 2 CPUs [ 0.010157] SMP: Total of 2 processors activated (12.00 BogoMIPS). [ 0.010166] CPU: All CPU(s) started in SVC mode. [ 0.010788] devtmpfs: initialized [ 0.014507] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4 [ 0.014835] pinctrl core: initialized pinctrl subsystem [ 0.015163] regulator-dummy: no parameters [ 0.036336] NET: Registered protocol family 16 [ 0.043903] DMA: preallocated 256 KiB pool for atomic coherent allocations [ 0.044584] cpuidle: using governor ladder [ 0.044595] cpuidle: using governor menu [ 0.044832] CPU identified as i.MX6DL, silicon rev 1.2 [ 0.044938] Use WDOG1 as reset source [ 0.054177] syscon 20c8000.anatop: regmap [mem 0x020c8000-0x020c8fff] registered [ 0.054498] vdd1p1: 800 <--> 1375 mV at 1100 mV [ 0.054889] vdd3p0: 2625 <--> 3400 mV at 3000 mV [ 0.055239] vdd2p5: 2000 <--> 2750 mV at 2400 mV [ 0.055596] vddarm: 725 <--> 1450 mV at 1150 mV [ 0.060549] vddpu: 725 <--> 1450 mV at 1150 mV [ 0.060947] vddsoc: 725 <--> 1450 mV at 1175 mV [ 0.063115] syscon 20e0000.iomuxc-gpr: regmap [mem 0x020e0000-0x020e0037] registered [ 0.065886] syscon 21bc000.ocotp-ctrl: regmap [mem 0x021bc000-0x021bffff] registered [ 0.070071] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers. [ 0.070084] hw-breakpoint: maximum watchpoint size is 4 bytes. [ 0.072305] imx6dl-pinctrl 20e0000.iomuxc: initialized IMX pinctrl driver [ 0.080201] bio: create slab <bio-0> at 0 [ 0.081019] 1P8V: 1800 mV [ 0.081238] 2P5V: 2500 mV [ 0.081463] 3P3V: 3300 mV [ 0.081765] usb_host_vbus: 5000 mV [ 0.082102] vgaarb: loaded [ 0.082796] SCSI subsystem initialized [ 0.083274] usbcore: registered new interface driver usbfs [ 0.083343] usbcore: registered new interface driver hub [ 0.083443] usbcore: registered new device driver usb [ 0.084431] i2c-gpio i2c.16: using pins 109 (SDA) and 108 (SCL) [ 0.086763] stmpe-i2c 1-0041: stmpe811 detected, chip id: 0x811 [ 0.088753] i2c i2c-1: IMX I2C adapter registered [ 0.089492] i2c i2c-2: IMX I2C adapter registered [ 0.089630] Linux video capture interface: v2.00 [ 0.089677] pps_core: LinuxPPS API ver. 1 registered [ 0.089685] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it> [ 0.089707] PTP clock support registered [ 0.100590] imx-ipuv3 2400000.ipu: IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7) [ 0.101749] MIPI CSI2 driver module loaded [ 0.101965] Advanced Linux Sound Architecture Driver Initialized. [ 0.103554] Switched to clocksource mxc_timer1 [ 0.113675] NET: Registered protocol family 2 [ 0.114561] TCP established hash table entries: 4096 (order: 2, 16384 bytes) [ 0.114610] TCP bind hash table entries: 4096 (order: 3, 32768 bytes) [ 0.114677] TCP: Hash tables configured (established 4096 bind 4096) [ 0.114721] TCP: reno registered [ 0.114735] UDP hash table entries: 256 (order: 1, 8192 bytes) [ 0.114758] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes) [ 0.114988] NET: Registered protocol family 1 [ 0.115276] RPC: Registered named UNIX socket transport module. [ 0.115287] RPC: Registered udp transport module. [ 0.115294] RPC: Registered tcp transport module. [ 0.115301] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 0.115921] hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters available [ 0.116913] imx rpmsg driver is registered. [ 0.117685] Bus freq driver module loaded [ 0.118457] futex hash table entries: 512 (order: 3, 32768 bytes) [ 0.124850] VFS: Disk quotas dquot_6.5.2 [ 0.125114] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes) [ 0.126716] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 0.127439] NFS: Registering the id_resolver key type [ 0.127476] Key type id_resolver registered [ 0.127484] Key type id_legacy registered [ 0.128130] fuse init (API version 7.22) [ 0.128670] msgmni has been set to 995 [ 0.131661] io scheduler noop registered [ 0.131673] io scheduler deadline registered [ 0.131854] io scheduler cfq registered (default) [ 0.133752] imx-weim 21b8000.weim: Driver registered. [ 0.135935] backlight.15 supply power not found, using dummy regulator [ 0.137924] MIPI DSI driver module loaded [ 0.139475] mxc_sdc_fb fb.18: registered mxc display driver lcd [ 0.141879] mxc_sdc_fb fb.18: 800x480 h_sync,r,l: 128,40,88 v_sync,l,u: 2,10,33 pixclock=33260000 Hz [ 0.186807] mxc_sdc_fb fb.18: 800x480 h_sync,r,l: 128,40,88 v_sync,l,u: 2,10,33 pixclock=33260000 Hz [ 0.207176] Console: switching to colour frame buffer device 100x30 [ 0.242649] mxc_sdc_fb fb.19: mxcfb1 is turned off! [ 0.253242] imx_epdc_fb 20f4000.epdc: can't get/select pinctrl [ 0.255407] imx-sdma 20ec000.sdma: no iram assigned, using external mem [ 0.255653] imx-sdma 20ec000.sdma: no event needs to be remapped [ 0.255842] imx-sdma 20ec000.sdma: loaded firmware 3.2 [ 0.258643] imx-sdma 20ec000.sdma: initialized [ 0.260318] pfuze100-regulator 1-0008: Full layer: 1, Metal layer: 1 [ 0.260931] pfuze100-regulator 1-0008: FAB: 0, FIN: 0 [ 0.260947] pfuze100-regulator 1-0008: pfuze100 found. [ 0.262423] SW1AB: 300 <--> 1875 mV at 1375 mV [ 0.263864] SW1C: 300 <--> 1875 mV at 1375 mV [ 0.264631] SW2: at 1000 mV [ 0.265413] SW3A: 400 <--> 1975 mV at 1500 mV [ 0.266163] SW3B: at 1500 mV [ 0.266908] SW4: at 1000 mV [ 0.267661] SWBST: 5000 <--> 5150 mV at 5000 mV [ 0.268445] VSNVS: 1000 <--> 3000 mV at 3000 mV [ 0.268597] VREFDDR: 750 mV [ 0.269330] VGEN1: at 1500 mV [ 0.270102] VGEN2: 800 <--> 1550 mV at 1500 mV [ 0.270865] VGEN3: at 3000 mV [ 0.271632] VGEN4: 1800 <--> 3300 mV at 1800 mV [ 0.272410] VGEN5: 1800 <--> 3300 mV at 2500 mV [ 0.273174] VGEN6: 1800 <--> 3300 mV at 2800 mV [ 0.273468] Serial: IMX driver [ 0.273949] 2020000.serial: ttymxc0 at MMIO 0x2020000 (irq = 58, base_baud = 5000000) is a IMX [ 1.139496] console [ttymxc0] enabled [ 1.144165] 21e8000.serial: ttymxc1 at MMIO 0x21e8000 (irq = 59, base_baud = 5000000) is a IMX [ 1.153339] 21ec000.serial: ttymxc2 at MMIO 0x21ec000 (irq = 60, base_baud = 5000000) is a IMX [ 1.162349] serial: Freescale lpuart driver [ 1.167054] imx sema4 driver is registered. [ 1.171315] [drm] Initialized drm 1.1.0 20060810 [ 1.176348] [drm] Initialized vivante 1.0.0 20120216 on minor 0 [ 1.189642] brd: module loaded [ 1.196747] loop: module loaded [ 1.203171] spi_imx 2014000.ecspi: probed [ 1.208110] vcan: Virtual CAN interface driver [ 1.212569] CAN device driver interface [ 1.216614] spi3.0 supply vdd not found, using dummy regulator [ 1.222513] spi3.0 supply xceiver not found, using dummy regulator [ 1.733875] random: nonblocking pool is initialized [ 2.233582] mcp251x spi3.0: MCP251x didn't enter in conf mode after reset [ 2.241800] 2188000.ethernet supply phy not found, using dummy regulator [ 2.249018] pps pps0: new PPS source ptp0 [ 2.257113] libphy: fec_enet_mii_bus: probed [ 2.261904] fec 2188000.ethernet eth0: registered PHC device 0 [ 2.268118] usbcore: registered new interface driver asix [ 2.273609] usbcore: registered new interface driver ax88179_178a [ 2.279756] usbcore: registered new interface driver cdc_ether [ 2.285655] usbcore: registered new interface driver net1080 [ 2.291365] usbcore: registered new interface driver cdc_subset [ 2.297357] usbcore: registered new interface driver zaurus [ 2.303011] usbcore: registered new interface driver cdc_ncm [ 2.308696] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 2.315245] ehci-pci: EHCI PCI platform driver [ 2.319814] usbcore: registered new interface driver usb-storage [ 2.325953] usbcore: registered new interface driver usbserial [ 2.331833] usbcore: registered new interface driver usbserial_generic [ 2.338425] usbserial: USB Serial support registered for generic [ 2.344492] usbcore: registered new interface driver ftdi_sio [ 2.350277] usbserial: USB Serial support registered for FTDI USB Serial Device [ 2.357652] usbcore: registered new interface driver pl2303 [ 2.363265] usbserial: USB Serial support registered for pl2303 [ 2.370276] 2184800.usbmisc supply vbus-wakeup not found, using dummy regulator [ 2.378539] imx_usb 2184000.usb: Can't register ci_hdrc platform device, err=-517 [ 2.386077] platform 2184000.usb: Driver imx_usb requests probe deferral [ 2.396225] ci_hdrc ci_hdrc.0: doesn't support gadget [ 2.401305] ci_hdrc ci_hdrc.0: EHCI Host Controller [ 2.406236] ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 1 [ 2.423593] ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00 [ 2.429810] hub 1-0:1.0: USB hub found [ 2.433667] hub 1-0:1.0: 1 port detected [ 2.438463] mousedev: PS/2 mouse device common for all mice [ 2.453223] input: stmpe-ts as /devices/soc0/soc.0/2100000.aips-bus/21a4000.i2c/i2c-1/1-0041/stmpe-ts/input/input0 [ 2.467182] rtc-ds1307 2-0068: rtc core: registered m41t00 as rtc0 [ 2.473639] snvs_rtc 20cc034.snvs-rtc-lp: can't get snvs-rtc clock [ 2.479999] check_alarm_past: alarm in the past [ 2.484779] snvs_rtc 20cc034.snvs-rtc-lp: rtc core: registered 20cc034.snvs-rtc-lp as rtc1 [ 2.493180] i2c /dev entries driver [ 2.497879] mxc_v4l2_output v4l2_out.27: V4L2 device registered as video16 [ 2.504955] mxc_v4l2_output v4l2_out.27: V4L2 device registered as video17 [ 2.512120] i2c-core: driver [mag3110] using legacy suspend method [ 2.518333] i2c-core: driver [mag3110] using legacy resume method [ 2.524904] imx2-wdt 20bc000.wdog: IMX2+ Watchdog Timer enabled. timeout=60s (nowayout=0) [ 2.533404] sdhci: Secure Digital Host Controller Interface driver [ 2.539614] sdhci: Copyright(c) Pierre Ossman [ 2.543996] sdhci-pltfm: SDHCI platform and OF driver helper [ 2.550928] mmc1: no vqmmc regulator found [ 2.593587] mmc1: SDHCI controller on 2190000.usdhc [2190000.usdhc] using ADMA [ 2.605752] mmc0: no vqmmc regulator found [ 2.651226] mmc1: host does not support reading read-only switch. assuming write-enable. [ 2.653586] mmc0: SDHCI controller on 2198000.usdhc [2198000.usdhc] using ADMA [ 2.654224] mxc_vdoa 21e4000.vdoa: i.MX Video Data Order Adapter(VDOA) driver probed [ 2.674663] mxc_vpu 2040000.vpu: VPU initialized [ 2.683486] mmc1: new high speed SDHC card at address 0007 [ 2.689471] mmcblk1: mmc1:0007 SS08G 7.21 GiB [ 2.695267] mmcblk1: p1 p2 [ 2.787987] mmc0: BKOPS_EN bit is not set [ 2.806817] mmc0: new high speed DDR MMC card at address 0001 [ 2.823615] mmcblk0: mmc0:0001 004GE0 3.68 GiB [ 2.828393] mmcblk0boot0: mmc0:0001 004GE0 partition 1 2.00 MiB [ 2.834590] mmcblk0boot1: mmc0:0001 004GE0 partition 2 2.00 MiB [ 2.841645] mmcblk0: p1 p2 [ 2.846993] mmcblk0boot1: unknown partition table [ 2.853927] mmcblk0boot0: unknown partition table [ 2.931858] caam 2100000.caam: Instantiated RNG4 SH0 [ 3.181772] caam 2100000.caam: Instantiated RNG4 SH1 [ 3.186771] caam 2100000.caam: device ID = 0x0a160100 (Era 4) [ 3.192529] caam 2100000.caam: job rings = 2, qi = 0 [ 3.256788] caam algorithms registered in /proc/crypto [ 3.265705] caam_jr 2101000.jr0: registering rng-caam [ 3.271651] platform caam_sm: blkkey_ex: 4 keystore units available [ 3.278200] platform caam_sm: 64-bit clear key: [ 3.282749] platform caam_sm: [0000] 00 01 02 03 04 0f 06 07 [ 3.288447] platform caam_sm: 64-bit black key: [ 3.292993] platform caam_sm: [0000] 83 1c ab ef 17 95 6d 6a [ 3.298681] platform caam_sm: [0008] ca 1f 98 ac c2 62 6f c7 [ 3.304398] platform caam_sm: 128-bit clear key: [ 3.309033] platform caam_sm: [0000] 00 01 02 03 04 0f 06 07 [ 3.314753] platform caam_sm: [0008] 08 09 0a 0b 0c 0d 0e 0f [ 3.320425] platform caam_sm: 128-bit black key: [ 3.325095] platform caam_sm: [0000] 78 e5 de b1 33 81 65 6e [ 3.330771] platform caam_sm: [0008] 00 cd 08 d7 96 33 88 94 [ 3.336473] platform caam_sm: 192-bit clear key: [ 3.341104] platform caam_sm: [0000] 00 01 02 03 04 0f 06 07 [ 3.346812] platform caam_sm: [0008] 08 09 0a 0b 0c 0d 0e 0f [ 3.352486] platform caam_sm: [0016] 10 11 12 13 14 15 16 17 [ 3.358189] platform caam_sm: 192-bit black key: [ 3.362824] platform caam_sm: [0000] f5 90 c2 ca 9d b5 73 a9 [ 3.368529] platform caam_sm: [0008] a0 03 10 92 7b 41 88 86 [ 3.374252] platform caam_sm: [0016] 72 31 d2 b4 5c 00 01 98 [ 3.379928] platform caam_sm: [0024] 83 a1 7a 0a 5f 00 c1 e8 [ 3.385620] platform caam_sm: 256-bit clear key: [ 3.390252] platform caam_sm: [0000] 00 01 02 03 04 0f 06 07 [ 3.395939] platform caam_sm: [0008] 08 09 0a 0b 0c 0d 0e 0f [ 3.401613] platform caam_sm: [0016] 10 11 12 13 14 15 16 17 [ 3.407297] platform caam_sm: [0024] 18 19 1a 1b 1c 1d 1e 1f [ 3.412966] platform caam_sm: 256-bit black key: [ 3.417608] platform caam_sm: [0000] aa 28 6b 72 31 20 0c bc [ 3.423281] platform caam_sm: [0008] 6c 6b c6 38 2f 6f 35 c9 [ 3.428964] platform caam_sm: [0016] 0b 02 2b 19 32 e7 d4 d6 [ 3.434649] platform caam_sm: [0024] 8a 49 d9 ef 29 32 ec 0c [ 3.440319] platform caam_sm: 64-bit unwritten blob: [ 3.445311] platform caam_sm: [0000] 00 00 00 00 00 00 00 00 [ 3.450983] platform caam_sm: [0008] 00 00 00 00 00 00 00 00 [ 3.456670] platform caam_sm: [0016] 00 00 00 00 00 00 00 00 [ 3.462341] platform caam_sm: [0024] 00 00 00 00 00 00 00 00 [ 3.468025] platform caam_sm: [0032] 00 00 00 00 00 00 00 00 [ 3.473718] platform caam_sm: [0040] 00 00 00 00 00 00 00 00 [ 3.479392] platform caam_sm: [0048] 00 00 00 00 00 00 00 00 [ 3.485080] platform caam_sm: [0056] 00 00 00 00 00 00 00 00 [ 3.490752] platform caam_sm: [0064] 00 00 00 00 00 00 00 00 [ 3.496439] platform caam_sm: [0072] 00 00 00 00 00 00 00 00 [ 3.502110] platform caam_sm: [0080] 00 00 00 00 00 00 00 00 [ 3.507795] platform caam_sm: [0088] 00 00 00 00 00 00 00 00 [ 3.513463] platform caam_sm: 128-bit unwritten blob: [ 3.518542] platform caam_sm: [0000] 00 00 00 00 00 00 00 00 [ 3.524229] platform caam_sm: [0008] 00 00 00 00 00 00 00 00 [ 3.529900] platform caam_sm: [0016] 00 00 00 00 00 00 00 00 [ 3.535584] platform caam_sm: [0024] 00 00 00 00 00 00 00 00 [ 3.541255] platform caam_sm: [0032] 00 00 00 00 00 00 00 00 [ 3.546938] platform caam_sm: [0040] 00 00 00 00 00 00 00 00 [ 3.552609] platform caam_sm: [0048] 00 00 00 00 00 00 00 00 [ 3.558294] platform caam_sm: [0056] 00 00 00 00 00 00 00 00 [ 3.563979] platform caam_sm: [0064] 00 00 00 00 00 00 00 00 [ 3.569651] platform caam_sm: [0072] 00 00 00 00 00 00 00 00 [ 3.575337] platform caam_sm: [0080] 00 00 00 00 00 00 00 00 [ 3.581010] platform caam_sm: [0088] 00 00 00 00 00 00 00 00 [ 3.586690] platform caam_sm: 196-bit unwritten blob: [ 3.591754] platform caam_sm: [0000] 00 00 00 00 00 00 00 00 [ 3.597437] platform caam_sm: [0008] 00 00 00 00 00 00 00 00 [ 3.603109] platform caam_sm: [0016] 00 00 00 00 00 00 00 00 [ 3.608794] platform caam_sm: [0024] 00 00 00 00 00 00 00 00 [ 3.614479] platform caam_sm: [0032] 00 00 00 00 00 00 00 00 [ 3.620150] platform caam_sm: [0040] 00 00 00 00 00 00 00 00 [ 3.625835] platform caam_sm: [0048] 00 00 00 00 00 00 00 00 [ 3.631507] platform caam_sm: [0056] 00 00 00 00 00 00 00 00 [ 3.637192] platform caam_sm: [0064] 00 00 00 00 00 00 00 00 [ 3.642863] platform caam_sm: [0072] 00 00 00 00 00 00 00 00 [ 3.648547] platform caam_sm: [0080] 00 00 00 00 00 00 00 00 [ 3.654231] platform caam_sm: [0088] 00 00 00 00 00 00 00 00 [ 3.659899] platform caam_sm: 256-bit unwritten blob: [ 3.664975] platform caam_sm: [0000] 00 00 00 00 00 00 00 00 [ 3.670646] platform caam_sm: [0008] 00 00 00 00 00 00 00 00 [ 3.676335] platform caam_sm: [0016] 00 00 00 00 00 00 00 00 [ 3.682009] platform caam_sm: [0024] 00 00 00 00 00 00 00 00 [ 3.687693] platform caam_sm: [0032] 00 00 00 00 00 00 00 00 [ 3.693366] platform caam_sm: [0040] 00 00 00 00 00 00 00 00 [ 3.699050] platform caam_sm: [0048] 00 00 00 00 00 00 00 00 [ 3.704736] platform caam_sm: [0056] 00 00 00 00 00 00 00 00 [ 3.710408] platform caam_sm: [0064] 00 00 00 00 00 00 00 00 [ 3.716092] platform caam_sm: [0072] 00 00 00 00 00 00 00 00 [ 3.721763] platform caam_sm: [0080] 00 00 00 00 00 00 00 00 [ 3.727446] platform caam_sm: [0088] 00 00 00 00 00 00 00 00 [ 3.733369] platform caam_sm: 64-bit black key in blob: [ 3.738647] platform caam_sm: [0000] 06 05 99 bd a8 e6 bd 2f [ 3.744340] platform caam_sm: [0008] ec 2d cb 3e 19 38 37 73 [ 3.750014] platform caam_sm: [0016] 5b 34 75 94 be 91 20 29 [ 3.755700] platform caam_sm: [0024] f0 99 61 3d 90 cf 57 76 [ 3.761375] platform caam_sm: [0032] 26 a2 c7 bb ed bc 7c 5d [ 3.767059] platform caam_sm: [0040] e9 07 11 8c 2d 7b 49 1f [ 3.772730] platform caam_sm: [0048] 56 f9 7d 90 a7 40 3e 0b [ 3.778424] platform caam_sm: [0056] 00 00 00 00 00 00 00 00 [ 3.784111] platform caam_sm: [0064] 00 00 00 00 00 00 00 00 [ 3.789784] platform caam_sm: [0072] 00 00 00 00 00 00 00 00 [ 3.795468] platform caam_sm: [0080] 00 00 00 00 00 00 00 00 [ 3.801139] platform caam_sm: [0088] 00 00 00 00 00 00 00 00 [ 3.806821] platform caam_sm: 128-bit black key in blob: [ 3.812149] platform caam_sm: [0000] de 8c a0 74 d5 66 07 00 [ 3.817835] platform caam_sm: [0008] f8 3e b5 a3 a4 04 b1 66 [ 3.823507] platform caam_sm: [0016] f2 44 24 19 9a bf a7 06 [ 3.829191] platform caam_sm: [0024] c3 4c db 90 4e 97 d9 fb [ 3.834876] platform caam_sm: [0032] b4 15 fc e5 34 2b e0 24 [ 3.840548] platform caam_sm: [0040] e9 02 e6 2b 0d 2e 72 4f [ 3.846232] platform caam_sm: [0048] 96 35 52 77 8b 71 6a d1 [ 3.851904] platform caam_sm: [0056] 9d f2 e6 e3 d4 b1 65 07 [ 3.857588] platform caam_sm: [0064] 00 00 00 00 00 00 00 00 [ 3.863259] platform caam_sm: [0072] 00 00 00 00 00 00 00 00 [ 3.868943] platform caam_sm: [0080] 00 00 00 00 00 00 00 00 [ 3.874634] platform caam_sm: [0088] 00 00 00 00 00 00 00 00 [ 3.880306] platform caam_sm: 192-bit black key in blob: [ 3.885646] platform caam_sm: [0000] a4 bf 8a dd 03 06 d0 ca [ 3.891318] platform caam_sm: [0008] 1a 86 ca 16 bb ee 04 e0 [ 3.897002] platform caam_sm: [0016] 0f e4 03 b8 ee aa 00 c2 [ 3.902676] platform caam_sm: [0024] 96 1c db 6d 5a c3 75 97 [ 3.908361] platform caam_sm: [0032] d4 37 c5 23 de 3a 90 cf [ 3.914047] platform caam_sm: [0040] 67 94 2f 05 f1 a8 31 fe [ 3.919718] platform caam_sm: [0048] f0 bb 62 77 b5 3f 56 c1 [ 3.925403] platform caam_sm: [0056] 07 69 b4 4e b0 43 81 a5 [ 3.931076] platform caam_sm: [0064] 9f 0d 81 42 4b 72 f0 a6 [ 3.936759] platform caam_sm: [0072] 00 00 00 00 00 00 00 00 [ 3.942430] platform caam_sm: [0080] 00 00 00 00 00 00 00 00 [ 3.948117] platform caam_sm: [0088] 00 00 00 00 00 00 00 00 [ 3.953799] platform caam_sm: 256-bit black key in blob: [ 3.959125] platform caam_sm: [0000] 9e db 44 c1 93 b5 d0 2d [ 3.964809] platform caam_sm: [0008] 8d ee 99 37 e5 85 84 7c [ 3.970482] platform caam_sm: [0016] 96 1f 4b fa ab bf c7 80 [ 3.976167] platform caam_sm: [0024] b2 97 c5 5a 3a e8 03 64 [ 3.981840] platform caam_sm: [0032] 3f 61 47 de 5f 1f 06 7f [ 3.987525] platform caam_sm: [0040] c3 91 b1 b5 8c 8a f2 9c [ 3.993197] platform caam_sm: [0048] 3f a1 41 d1 c1 be f6 62 [ 3.998881] platform caam_sm: [0056] 60 07 87 d6 58 a0 dc b5 [ 4.004568] platform caam_sm: [0064] 24 2f c2 74 c2 ee b4 ed [ 4.010240] platform caam_sm: [0072] 21 f2 30 43 41 71 94 6c [ 4.015923] platform caam_sm: [0080] 00 00 00 00 00 00 00 00 [ 4.021596] platform caam_sm: [0088] 00 00 00 00 00 00 00 00 [ 4.027507] platform caam_sm: restored 64-bit black key: [ 4.032838] platform caam_sm: [0000] 60 bb b5 b1 22 b1 2d 5e [ 4.038548] platform caam_sm: [0008] 5c df e2 33 14 bd 04 6c [ 4.044244] platform caam_sm: restored 128-bit black key: [ 4.049657] platform caam_sm: [0000] 78 e5 de b1 33 81 65 6e [ 4.055349] platform caam_sm: [0008] 00 cd 08 d7 96 33 88 94 [ 4.061018] platform caam_sm: restored 192-bit black key: [ 4.066447] platform caam_sm: [0000] f5 90 c2 ca 9d b5 73 a9 [ 4.072121] platform caam_sm: [0008] a0 03 10 92 7b 41 88 86 [ 4.077814] platform caam_sm: [0016] 18 ed b3 35 a6 4f c1 ad [ 4.083487] platform caam_sm: [0024] 5d e8 93 75 ef 4e c2 56 [ 4.089169] platform caam_sm: restored 256-bit black key: [ 4.094594] platform caam_sm: [0000] aa 28 6b 72 31 20 0c bc [ 4.100265] platform caam_sm: [0008] 6c 6b c6 38 2f 6f 35 c9 [ 4.105949] platform caam_sm: [0016] 0b 02 2b 19 32 e7 d4 d6 [ 4.111621] platform caam_sm: [0024] 8a 49 d9 ef 29 32 ec 0c [ 4.117618] snvs-secvio 20cc000.caam-snvs: can't get snvs clock [ 4.123608] snvs-secvio 20cc000.caam-snvs: violation handlers armed - non-secure state [ 4.131757] hidraw: raw HID events driver (C) Jiri Kosina [ 4.137336] usbcore: registered new interface driver usbhid [ 4.142919] usbhid: USB HID core driver [ 4.152496] stmpe-adc stmpe-adc: Initialized [ 4.159621] sgtl5000 1-000a: sgtl5000 revision 0x11 [ 4.192110] fsl-hdmi-dai hdmi_audio.3: failed to probe. Load HDMI-video first. [ 4.199385] fsl-hdmi-dai: probe of hdmi_audio.3 failed with error -12 [ 4.206722] 1-000a: 1200 mV normal [ 4.210285] sgtl5000 1-000a: Using internal LDO instead of VDDD [ 4.227872] imx-sgtl5000 sound.25: sgtl5000 <-> 2028000.ssi mapping ok [ 4.236718] imx-audio-hdmi sound-hdmi.26: initialize HDMI-audio failed. load HDMI-video first! [ 4.245700] TCP: cubic registered [ 4.249575] NET: Registered protocol family 10 [ 4.255039] sit: IPv6 over IPv4 tunneling driver [ 4.260272] NET: Registered protocol family 17 [ 4.264781] can: controller area network core (rev 20120528 abi 9) [ 4.271039] NET: Registered protocol family 29 [ 4.275515] can: raw protocol (rev 20120528) [ 4.279798] can: broadcast manager protocol (rev 20120528 t) [ 4.285490] can: netlink gateway (rev 20130117) max_hops=1 [ 4.291362] Key type dns_resolver registered [ 4.296304] failed to disable 1.2 GHz OPP [ 4.301126] Registering SWP/SWPB emulation handler [ 4.306956] SW4: disabling [ 4.309679] SW3B: disabling [ 4.312482] SW2: disabling [ 4.315667] regulator-dummy: disabling [ 4.319630] imx mcc test is registered. [ 4.324051] 2184000.usb supply vbus not found, using dummy regulator [ 4.333954] ci_hdrc ci_hdrc.1: EHCI Host Controller [ 4.338858] ci_hdrc ci_hdrc.1: new USB bus registered, assigned bus number 2 [ 4.363602] ci_hdrc ci_hdrc.1: USB 2.0 started, EHCI 1.00 [ 4.369694] hub 2-0:1.0: USB hub found [ 4.373484] hub 2-0:1.0: 1 port detected [ 4.378576] input: gpio-keys.29 as /devices/soc0/gpio-keys.29/input/input1 [ 4.387093] rtc-ds1307 2-0068: setting system clock to 2017-07-16 04:02:04 UTC (1500177724) [ 4.403370] ALSA device list: [ 4.406437] #0: imx6-colibri-sgtl5000 [ 4.421048] EXT4-fs (mmcblk1p2): INFO: recovery required on readonly filesystem [ 4.428413] EXT4-fs (mmcblk1p2): write access will be enabled during recovery [ 4.506762] EXT4-fs (mmcblk1p2): recovery complete [ 4.518132] EXT4-fs (mmcblk1p2): mounted filesystem with ordered data mode. Opts: (null) [ 4.526369] VFS: Mounted root (ext4 filesystem) readonly on device 179:2. [ 4.539544] devtmpfs: mounted [ 4.543126] Freeing unused kernel memory: 324K (80858000 - 808a9000) INIT: version 2.88 booting Starting udev [ 5.082160] udevd[171]: starting version 3.1.5 [ 5.296401] EXT4-fs (mmcblk1p2): re-mounted. Opts: (null) bootlogd: cannot allocate pseudo tty: No such file or directory ALSA: Restoring mixer settings... INIT: Entering runlevel: 5 Configuring network interfaces... [ 5.973762] fec 2188000.ethernet eth0: Freescale FEC PHY driver [Micrel KSZ8041] (mii_bus:phy_addr=2188000.ethernet:00, irq=-1) [ 5.985502] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready done. Starting system message bus: dbus. Starting Dropbear SSH server: dropbear. Starting rpcbind daemon...done. Starting syslogd/klogd: done * Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon ...done. Starting Telephony daemon Poky (Yocto Project Reference Distro) 2.1.3 trdx-voip /dev/ttymxc0 trdx-voip login:
Navegando pelo sistema e verificando o uso atual com o serviço Asterisk.
root@trdx-voip:~# df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 336.7M 76.9M 238.0M 24% /
devtmpfs 120.8M 0 120.8M 0% /dev
tmpfs 248.9M 148.0K 248.8M 0% /run
tmpfs 248.9M 92.0K 248.8M 0% /var/volatile
root@trdx-voip:~#
root@trdx-voip:~# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:14:2D:4A:4E:60
inet addr:10.10.10.254 Bcast:10.10.10.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
root@trdx-voip:~# free -m
total used free shared buff/cache available
Mem: 497 14 453 0 30 468
Swap: 0 0 0
root@trdx-voip:~# pgrep asterisk
317
root@trdx-voip:~# top -p 317
Tasks: 1 total, 0 running, 1 sleeping, 0 stopped, 0 zombie
%Cpu(s): 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 509808 total, 463404 free, 14556 used, 31848 buff/cache
KiB Swap: 0 total, 0 free, 0 used. 479764 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
317 root 21 1 47976 12492 6476 S 2.0 2.5 0:03.77 asterisk
O sistema pode ser acessado via SSH, o IP da Central Telefônica para o artigo é 10.10.10.254 e o usuário root e senha em branco.
Até a próxima!









Excelente material. Teria como você demonstrar como seria a instalação em um VPS Debian?
Abraço e parabéns!
Olá Maciel, neste artigo foi mais trabalhoso pois foi com foco em uma placa com ARM, muito comum em sistemas embarcados, para VPS que normalmente são processador x86_64 e utilizando Debian fica mais trivial, acredito que deva ter excelentes passo-a-passo em sites como pplware e até uma rapida busca no google.
Um abraço.
Passo a passo bem detalhado muito bom! Sem dúvida a redução é grande usando a telefonia voip. Um provedor que gostei foi https://www.voipdobrasil.com.br/ , mas vale a pena conferir bem antes.