Posts Tagged ‘tutorial’

How to Update Firmware on Amlogic S905 TV Boxes

November 24th, 2015 3 comments

Videostrong has just sent me a new firmware for K1 Plus mini PC based on Amlogic S905 processor. The procedure is basically the same as for previous Amlogic devices, but I’ve still documented the step to follow an update. Please note that devices from decent brands should have OTA updates implemented, so it may not be needed, except for the cheapest devices, or in case of network issues.

The firmware update procedure below can be done in any computer, including the Android TV box itself. The firmware is specific to K1 Plus, so if you have another TV box, you’ll need to change the download link to the firmware for your device.

  1. Download the firmware file (e.g. K1 Plus 2015-11-23.rar)
  2. Extract the compressed file to the root of a micro SD card, or on any other external storage.
    You should have a few files as shown above, including a zip file (please don’t uncompress that one). The name and number of files will depend on the firmware. Note that the SD card does not need to be empty, also it might be better to check files from previous firmware updates are not located in the root of the device.
  3. If you’ve done so in another computer, connect the micro SD card or external storage (USB) to the TV box.
  4. Start the Update & Backup in the TV box
  5. If Online Update does not work, then click on Select in the app, and it will scan for .zip files on all your external drives.
    Amlogic_Firmware_ScanningSelect the zip file corresponding to the firmware you’ve just downloaded.
  6. If you want to keep your apps, settings and media files, make sure Wipe Data and Wipe Media are not checked, then click on Update.
  7. At this stage it will ask you to confirm you want to “Start the OTA update”.Amlogic_S905_Local_Firmware_Update
  8. Click Update, and your TV box will reboot, and start the update shortly showing the Android update animation
  9. Be patient, and after a while your system will reboot, update Android app, and load the Android Home Screen. You are ready to go.

If you need to update because the system does not boot properly and can’t access the Update&Backup app, you may have to press the firmware update/recovery button before powering up the device, so that it automatically detect the firmware in the micro SD card or USB drive. You can check Amlogic S802 firmware update instructions to find out more details about that specific procedure, which should remain the same for Amlogic S905/S912.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

How to Build Brillo Operating System from Source Code and Run Brillo Emulator

November 23rd, 2015 5 comments

Google formally launched Brillo operating system a few weeks ago. The new operating system is a stripped down version of Android that targets Internet of Things (IoT) applications, and more recently the company pushed the source code to their servers.

So I’ve given it a try by checking out the code, building Brillo emulator for Intel/AMD, and running it in Ubuntu 14.04 64-bit.


Various Brillo Build Options for ARM/x86 Emulators, Intel Edison, etc…

First you’ll need to retrieve the source code:

It took a few hours here with some errors the first time, so I tried again and I finally got the code a few hours later. Once this is done, set the build environment and configuration:

Lunch will bring a list of possible builds:

You could also run the “Brillo emulator” on ARM, and edison-eng must be the build for Intel Edison board.
Now you can start the build:

It has to complete 21491 different tasks, so depending on your computer performance it may take a few dozen of minutes to several hours.

The first time I used some different commands, and the build failed with:

and it failed again after switching to Java 1.7.x requesting OpenJDK, so I switched to OpenJDK 7.0 as shown in the error message:

After this configuration changes, running make clean && make -j8 did the trick and the build went much further, but still failed with:

So I switched to the x86 emulator instead:

It could build since the fingerprint string was shorter…:

You can now run the emulator:

Let’s check the file system structure:

Memory and storage usage:

So the rootfs is kept small at 95MB, and only 74MB RAM is used.

Now the output of dmesg:

[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 3.18.0+ (jaufranc@FX8350) (gcc version 4.9 20140827 (prerelease) (GCC) ) #1 SMP Mon Nov 23 17:48:36 ICT 2015
[ 0.000000] e820: BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
[ 0.000000] BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved
[ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000003ffdffff] usable
[ 0.000000] BIOS-e820: [mem 0x000000003ffe0000-0x000000003fffffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved
[ 0.000000] Notice: NX (Execute Disable) protection missing in CPU!
[ 0.000000] SMBIOS 2.8 present.
[ 0.000000] DMI: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 04/01/2014
[ 0.000000] e820: update [mem 0x00000000-0x00000fff] usable ==> reserved
[ 0.000000] e820: remove [mem 0x000a0000-0x000fffff] usable
[ 0.000000] e820: last_pfn = 0x3ffe0 max_arch_pfn = 0x1000000
[ 0.000000] found SMP MP-table at [mem 0x000f0e90-0x000f0e9f] mapped at [c00f0e90]
[ 0.000000] Scanning 1 areas for low memory corruption
[ 0.000000] initial memory mapped: [mem 0x00000000-0x01ffffff]
[ 0.000000] Base memory trampoline at [c009b000] 9b000 size 16384
[ 0.000000] init_memory_mapping: [mem 0x00000000-0x000fffff]
[ 0.000000] [mem 0x00000000-0x000fffff] page 4k
[ 0.000000] init_memory_mapping: [mem 0x37400000-0x375fffff]
[ 0.000000] [mem 0x37400000-0x375fffff] page 2M
[ 0.000000] init_memory_mapping: [mem 0x34000000-0x373fffff]
[ 0.000000] [mem 0x34000000-0x373fffff] page 2M
[ 0.000000] init_memory_mapping: [mem 0x00100000-0x33ffffff]
[ 0.000000] [mem 0x00100000-0x001fffff] page 4k
[ 0.000000] [mem 0x00200000-0x33ffffff] page 2M
[ 0.000000] init_memory_mapping: [mem 0x37600000-0x377fdfff]
[ 0.000000] [mem 0x37600000-0x377fdfff] page 4k
[ 0.000000] BRK [0x01bd0000, 0x01bd0fff] PGTABLE
[ 0.000000] BRK [0x01bd1000, 0x01bd1fff] PGTABLE
[ 0.000000] ACPI: Early table checksum verification disabled
[ 0.000000] ACPI: RSDP 0x000F0C90 000014 (v00 BOCHS )
[ 0.000000] ACPI: RSDT 0x3FFE1A4A 000034 (v01 BOCHS BXPCRSDT 00000001 BXPC 00000001)
[ 0.000000] ACPI: FACP 0x3FFE1033 000074 (v01 BOCHS BXPCFACP 00000001 BXPC 00000001)
[ 0.000000] ACPI: DSDT 0x3FFE0040 000FF3 (v01 BOCHS BXPCDSDT 00000001 BXPC 00000001)
[ 0.000000] ACPI: FACS 0x3FFE0000 000040
[ 0.000000] ACPI: SSDT 0x3FFE10A7 0008F3 (v01 BOCHS BXPCSSDT 00000001 BXPC 00000001)
[ 0.000000] ACPI: APIC 0x3FFE199A 000078 (v01 BOCHS BXPCAPIC 00000001 BXPC 00000001)
[ 0.000000] ACPI: HPET 0x3FFE1A12 000038 (v01 BOCHS BXPCHPET 00000001 BXPC 00000001)
[ 0.000000] ACPI: Local APIC address 0xfee00000
[ 0.000000] 135MB HIGHMEM available.
[ 0.000000] 887MB LOWMEM available.
[ 0.000000] mapped low ram: 0 – 377fe000
[ 0.000000] low ram: 0 – 377fe000
[ 0.000000] BRK [0x01bd2000, 0x01bd2fff] PGTABLE
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x00001000-0x00ffffff]
[ 0.000000] Normal [mem 0x01000000-0x377fdfff]
[ 0.000000] HighMem [mem 0x377fe000-0x3ffdffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x00001000-0x0009efff]
[ 0.000000] node 0: [mem 0x00100000-0x3ffdffff]
[ 0.000000] Initmem setup node 0 [mem 0x00001000-0x3ffdffff]
[ 0.000000] On node 0 totalpages: 262014
[ 0.000000] free_area_init_node: node 0, pgdat c1a79d40, node_mem_map f6ffe020
[ 0.000000] DMA zone: 32 pages used for memmap
[ 0.000000] DMA zone: 0 pages reserved
[ 0.000000] DMA zone: 3998 pages, LIFO batch:0
[ 0.000000] Normal zone: 1744 pages used for memmap
[ 0.000000] Normal zone: 223230 pages, LIFO batch:31
[ 0.000000] HighMem zone: 272 pages used for memmap
[ 0.000000] HighMem zone: 34786 pages, LIFO batch:7
[ 0.000000] Using APIC driver default
[ 0.000000] ACPI: PM-Timer IO Port: 0x608
[ 0.000000] ACPI: Local APIC address 0xfee00000
[ 0.000000] ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0xff] dfl dfl lint[0x1])
[ 0.000000] ACPI: IOAPIC (id[0x00] address[0xfec00000] gsi_base[0])
[ 0.000000] IOAPIC[0]: apic_id 0, version 17, address 0xfec00000, GSI 0-23
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 5 global_irq 5 high level)
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 10 global_irq 10 high level)
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 11 global_irq 11 high level)
[ 0.000000] ACPI: IRQ0 used by override.
[ 0.000000] ACPI: IRQ5 used by override.
[ 0.000000] ACPI: IRQ9 used by override.
[ 0.000000] ACPI: IRQ10 used by override.
[ 0.000000] ACPI: IRQ11 used by override.
[ 0.000000] Using ACPI (MADT) for SMP configuration information
[ 0.000000] ACPI: HPET id: 0x8086a201 base: 0xfed00000
[ 0.000000] smpboot: Allowing 1 CPUs, 0 hotplug CPUs
[ 0.000000] e820: [mem 0x40000000-0xfffbffff] available for PCI devices
[ 0.000000] setup_percpu: NR_CPUS:8 nr_cpumask_bits:8 nr_cpu_ids:1 nr_node_ids:1
[ 0.000000] PERCPU: Embedded 14 pages/cpu @f6fe9000 s32832 r0 d24512 u57344
[ 0.000000] pcpu-alloc: s32832 r0 d24512 u57344 alloc=14*4096
[ 0.000000] pcpu-alloc: [0] 0
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 260238
[ 0.000000] Kernel command line: console=ttyS0 root=/dev/vda androidboot.hardware=qemu qemu=1 rootwait noinitrd init=/init androidboot.selinux=enforcing
[ 0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.000000] Initializing CPU#0
[ 0.000000] Initializing HighMem for node 0 (000377fe:0003ffe0)
[ 0.000000] Initializing Movable for node 0 (00000000:00000000)
[ 0.000000] Memory: 1026804K/1048056K available (7876K kernel code, 550K rwdata, 2376K rodata, 600K init, 580K bss, 21252K reserved, 139144K highmem)
[ 0.000000] virtual kernel memory layout:
[ 0.000000] fixmap : 0xfff16000 – 0xfffff000 ( 932 kB)
[ 0.000000] pkmap : 0xff800000 – 0xffa00000 (2048 kB)
[ 0.000000] vmalloc : 0xf7ffe000 – 0xff7fe000 ( 120 MB)
[ 0.000000] lowmem : 0xc0000000 – 0xf77fe000 ( 887 MB)
[ 0.000000] .init : 0xc1a90000 – 0xc1b26000 ( 600 kB)
[ 0.000000] .data : 0xc17b15ad – 0xc1a8eb80 (2933 kB)
[ 0.000000] .text : 0xc1000000 – 0xc17b15ad (7877 kB)
[ 0.000000] Checking if this processor honours the WP bit even in supervisor mode…Ok.
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[ 0.000000] NR_IRQS:2304 nr_irqs:256 0
[ 0.000000] CPU 0 irqstacks, hard=f6808000 soft=f680a000
[ 0.000000] Console: colour *CGA 80×25
[ 0.000000] console [ttyS0] enabled
[ 0.000000] hpet clockevent registered
[ 0.000000] tsc: Fast TSC calibration using PIT
[ 0.000000] tsc: Detected 4026.913 MHz processor
[ 0.005418] Calibrating delay loop (skipped), value calculated using timer frequency.. 8053.82 BogoMIPS (lpj=4026913)
[ 0.006453] pid_max: default: 32768 minimum: 301
[ 0.007059] ACPI: Core revision 20140926
[ 0.034542] ACPI: All ACPI Tables successfully acquired
[ 0.038869] Security Framework initialized
[ 0.040279] SELinux: Initializing.
[ 0.041568] SELinux: Starting in permissive mode
[ 0.042128] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.042547] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.053656] Initializing cgroup subsys freezer
[ 0.056312] Last level iTLB entries: 4KB 0, 2MB 0, 4MB 0
[ 0.056312] Last level dTLB entries: 4KB 0, 2MB 0, 4MB 0, 1GB 0
[ 0.175834] Freeing SMP alternatives memory: 32K (c1b26000 – c1b2e000)
[ 0.188319] Enabling APIC mode: Flat. Using 1 I/O APICs
[ 0.193435] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
[ 0.204267] smpboot: CPU0: Intel QEMU Virtual CPU version 2.2.0 (fam: 06, model: 06, stepping: 03)
[ 0.205000] Performance Events: Broken PMU hardware detected, using software events only.
[ 0.206054] Failed to access perfctr msr (MSR c1 is 0)
[ 0.217459] x86: Booted up 1 node, 1 CPUs
[ 0.217782] smpboot: Total of 1 processors activated (8053.82 BogoMIPS)
[ 0.229611] devtmpfs: initialized
[ 0.244079] RTC time: 10:50:02, date: 11/23/15
[ 0.253859] kworker/u2:0 (15) used greatest stack depth: 7196 bytes left
[ 0.255302] NET: Registered protocol family 16
[ 0.263307] cpuidle: using governor ladder
[ 0.263655] cpuidle: using governor menu
[ 0.265240] ACPI: bus type PCI registered
[ 0.268645] PCI: PCI BIOS revision 2.10 entry at 0xfd456, last bus=0
[ 0.269093] PCI: Using configuration type 1 for base access
[ 0.325660] kworker/u2:0 (50) used greatest stack depth: 7188 bytes left
[ 0.329175] ACPI: Added _OSI(Module Device)
[ 0.329423] ACPI: Added _OSI(Processor Device)
[ 0.329644] ACPI: Added _OSI(3.0 _SCP Extensions)
[ 0.329876] ACPI: Added _OSI(Processor Aggregator Device)
[ 0.362799] ACPI: Interpreter enabled
[ 0.363221] ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [\_S1_] (20140926/hwxface-580)
[ 0.364505] ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [\_S2_] (20140926/hwxface-580)
[ 0.365631] ACPI: (supports S0 S3 S5)
[ 0.366056] ACPI: Using IOAPIC for interrupt routing
[ 0.367488] PCI: Using host bridge windows from ACPI; if necessary, use “pci=nocrs” and report a bug
[ 0.428846] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
[ 0.429403] acpi PNP0A03:00: _OSC: OS supports [ASPM ClockPM Segments MSI]
[ 0.430646] acpi PNP0A03:00: _OSC failed (AE_NOT_FOUND); disabling ASPM
[ 0.434071] acpi PNP0A03:00: fail to add MMCONFIG information, can’t access extended PCI configuration space under this bridge.
[ 0.435869] PCI host bridge to bus 0000:00
[ 0.436299] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 0.436849] pci_bus 0000:00: root bus resource [io 0x0000-0x0cf7]
[ 0.437381] pci_bus 0000:00: root bus resource [io 0x0d00-0xadff]
[ 0.437710] pci_bus 0000:00: root bus resource [io 0xae0f-0xaeff]
[ 0.438020] pci_bus 0000:00: root bus resource [io 0xaf20-0xafdf]
[ 0.438338] pci_bus 0000:00: root bus resource [io 0xafe4-0xffff]
[ 0.438678] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff]
[ 0.439396] pci_bus 0000:00: root bus resource [mem 0x40000000-0xfebfffff]
[ 0.441115] pci 0000:00:00.0: [8086:1237] type 00 class 0x060000
[ 0.445759] pci 0000:00:01.0: [8086:7000] type 00 class 0x060100
[ 0.447396] pci 0000:00:01.1: [8086:7010] type 00 class 0x010180
[ 0.453049] pci 0000:00:01.1: reg 0x20: [io 0xc0a0-0xc0af]
[ 0.455536] pci 0000:00:01.1: legacy IDE quirk: reg 0x10: [io 0x01f0-0x01f7]
[ 0.456064] pci 0000:00:01.1: legacy IDE quirk: reg 0x14: [io 0x03f6]
[ 0.456439] pci 0000:00:01.1: legacy IDE quirk: reg 0x18: [io 0x0170-0x0177]
[ 0.457036] pci 0000:00:01.1: legacy IDE quirk: reg 0x1c: [io 0x0376]
[ 0.459095] pci 0000:00:01.3: [8086:7113] type 00 class 0x068000
[ 0.459510] pci 0000:00:01.3: quirk: [io 0x0600-0x063f] claimed by PIIX4 ACPI
[ 0.459976] pci 0000:00:01.3: quirk: [io 0x0700-0x070f] claimed by PIIX4 SMB
[ 0.462178] pci 0000:00:02.0: [1af4:1001] type 00 class 0x010000
[ 0.464049] pci 0000:00:02.0: reg 0x10: [io 0xc000-0xc03f]
[ 0.466036] pci 0000:00:02.0: reg 0x14: [mem 0xfebc0000-0xfebc0fff]
[ 0.477345] kworker/u2:0 (118) used greatest stack depth: 7140 bytes left
[ 0.480000] pci 0000:00:03.0: [1af4:1001] type 00 class 0x010000
[ 0.482037] pci 0000:00:03.0: reg 0x10: [io 0xc040-0xc07f]
[ 0.484029] pci 0000:00:03.0: reg 0x14: [mem 0xfebc1000-0xfebc1fff]
[ 0.496407] pci 0000:00:04.0: [1af4:1000] type 00 class 0x020000
[ 0.498049] pci 0000:00:04.0: reg 0x10: [io 0xc080-0xc09f]
[ 0.500096] pci 0000:00:04.0: reg 0x14: [mem 0xfebc2000-0xfebc2fff]
[ 0.510057] pci 0000:00:04.0: reg 0x30: [mem 0xfeb80000-0xfebbffff pref]
[ 0.513912] pci_bus 0000:00: on NUMA node 0
[ 0.518203] ACPI: PCI Interrupt Link [LNKA] (IRQs 5 *10 11)
[ 0.519457] ACPI: PCI Interrupt Link [LNKB] (IRQs 5 *10 11)
[ 0.520605] ACPI: PCI Interrupt Link [LNKC] (IRQs 5 10 *11)
[ 0.521527] ACPI: PCI Interrupt Link [LNKD] (IRQs 5 10 *11)
[ 0.522607] ACPI: PCI Interrupt Link [LNKS] (IRQs *9)
[ 0.528000] ACPI: Enabled 16 GPEs in block 00 to 0F
[ 0.533195] vgaarb: loaded
[ 0.535669] SCSI subsystem initialized
[ 0.537168] libata version 3.00 loaded.
[ 0.538252] ACPI: bus type USB registered
[ 0.539386] usbcore: registered new interface driver usbfs
[ 0.540037] usbcore: registered new interface driver hub
[ 0.540565] usbcore: registered new device driver usb
[ 0.541840] pps_core: LinuxPPS API ver. 1 registered
[ 0.542063] pps_core: Software ver. 5.3.6 – Copyright 2005-2007 Rodolfo Giometti <[email protected]>
[ 0.542695] PTP clock support registered
[ 0.545377] Advanced Linux Sound Architecture Driver Initialized.
[ 0.545843] PCI: Using ACPI for IRQ routing
[ 0.546211] PCI: pci_cache_line_size set to 32 bytes
[ 0.546757] e820: reserve RAM buffer [mem 0x0009fc00-0x0009ffff]
[ 0.546949] e820: reserve RAM buffer [mem 0x3ffe0000-0x3fffffff]
[ 0.559418] NetLabel: Initializing
[ 0.559651] NetLabel: domain hash size = 128
[ 0.559919] NetLabel: protocols = UNLABELED CIPSOv4
[ 0.561049] NetLabel: unlabeled traffic allowed by default
[ 0.561832] cfg80211: Calling CRDA to update world regulatory domain
[ 0.564280] HPET: 3 timers in total, 0 timers will be used for per-cpu timer
[ 0.564908] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0
[ 0.565196] hpet0: 3 comparators, 64-bit 100.000000 MHz counter
[ 0.570506] Switched to clocksource hpet
[ 0.660379] kworker/u2:0 (211) used greatest stack depth: 7020 bytes left
[ 0.728357] pnp: PnP ACPI init
[ 0.731334] pnp 00:00: Plug and Play ACPI device, IDs PNP0b00 (active)
[ 0.732336] pnp 00:01: Plug and Play ACPI device, IDs PNP0303 (active)
[ 0.732779] pnp 00:02: Plug and Play ACPI device, IDs PNP0f13 (active)
[ 0.733458] pnp 00:03: [dma 2]
[ 0.733732] pnp 00:03: Plug and Play ACPI device, IDs PNP0700 (active)
[ 0.734668] pnp 00:04: Plug and Play ACPI device, IDs PNP0400 (active)
[ 0.735401] pnp 00:05: Plug and Play ACPI device, IDs PNP0501 (active)
[ 0.737731] pnp: PnP ACPI: found 6 devices
[ 0.804489] pci_bus 0000:00: resource 4 [io 0x0000-0x0cf7]
[ 0.804525] pci_bus 0000:00: resource 5 [io 0x0d00-0xadff]
[ 0.804541] pci_bus 0000:00: resource 6 [io 0xae0f-0xaeff]
[ 0.804556] pci_bus 0000:00: resource 7 [io 0xaf20-0xafdf]
[ 0.804572] pci_bus 0000:00: resource 8 [io 0xafe4-0xffff]
[ 0.804587] pci_bus 0000:00: resource 9 [mem 0x000a0000-0x000bffff]
[ 0.804603] pci_bus 0000:00: resource 10 [mem 0x40000000-0xfebfffff]
[ 0.805098] NET: Registered protocol family 2
[ 0.810624] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.811671] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[ 0.812318] TCP: Hash tables configured (established 8192 bind 8192)
[ 0.812943] TCP: reno registered
[ 0.813306] UDP hash table entries: 512 (order: 2, 16384 bytes)
[ 0.813750] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[ 0.816909] NET: Registered protocol family 1
[ 0.820002] RPC: Registered named UNIX socket transport module.
[ 0.820534] RPC: Registered udp transport module.
[ 0.820817] RPC: Registered tcp transport module.
[ 0.821176] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.822119] pci 0000:00:00.0: Limiting direct PCI/PCI transfers
[ 0.822608] pci 0000:00:01.0: PIIX3: Enabling Passive Release
[ 0.823194] pci 0000:00:01.0: Activating ISA DMA hang workarounds
[ 0.823597] PCI: CLS 0 bytes, default 32
[ 0.838067] microcode: CPU0 sig=0x663, pf=0x1, revision=0x0
[ 0.839734] microcode: Microcode Update Driver: v2.00 <[email protected]>, Peter Oruba
[ 0.842525] Scanning for low memory corruption every 60 seconds
[ 0.848986] futex hash table entries: 256 (order: 2, 16384 bytes)
[ 0.850044] audit: initializing netlink subsys (disabled)
[ 0.851307] audit: type=2000 audit(1448275802.850:1): initialized
[ 0.856442] HugeTLB registered 2 MB page size, pre-allocated 0 pages
[ 0.889569] VFS: Disk quotas dquot_6.5.2
[ 0.890470] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[ 0.902369] NFS: Registering the id_resolver key type
[ 0.903546] Key type id_resolver registered
[ 0.903810] Key type id_legacy registered
[ 0.905558] msgmni has been set to 1733
[ 0.907349] SELinux: Registering netfilter hooks
[ 0.913599] bounce: pool size: 64 pages
[ 0.914549] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[ 0.915162] io scheduler noop registered
[ 0.915455] io scheduler deadline registered
[ 0.916333] io scheduler cfq registered (default)
[ 0.917877] pci_hotplug: PCI Hot Plug PCI Core version: 0.5
[ 0.921833] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input0
[ 0.922899] ACPI: Power Button [PWRF]
[ 1.301371] ACPI: PCI Interrupt Link [LNKB] enabled at IRQ 10
[ 1.677267] ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 11
[ 1.981884] ACPI: PCI Interrupt Link [LNKD] enabled at IRQ 11
[ 1.984959] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 2.010482] serial 00:05: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[ 2.019988] Non-volatile memory driver v1.3
[ 2.020747] Linux agpgart interface v0.103
[ 2.023687] [drm] Initialized drm 1.1.0 20060810
[ 2.038309] loop: module loaded
[ 2.040861] virtio-pci 0000:00:02.0: irq 24 for MSI/MSI-X
[ 2.040928] virtio-pci 0000:00:02.0: irq 25 for MSI/MSI-X
[ 2.062221] vda: unknown partition table
[ 2.067705] virtio-pci 0000:00:03.0: irq 26 for MSI/MSI-X
[ 2.067744] virtio-pci 0000:00:03.0: irq 27 for MSI/MSI-X
[ 2.075634] vdb: unknown partition table
[ 2.079262] ata_piix 0000:00:01.1: version 2.13
[ 2.091046] scsi host0: ata_piix
[ 2.093511] scsi host1: ata_piix
[ 2.094658] ata1: PATA max MWDMA2 cmd 0x1f0 ctl 0x3f6 bmdma 0xc0a0 irq 14
[ 2.095072] ata2: PATA max MWDMA2 cmd 0x170 ctl 0x376 bmdma 0xc0a8 irq 15
[ 2.100894] e100: Intel(R) PRO/100 Network Driver, 3.5.24-k2-NAPI
[ 2.101400] e100: Copyright(c) 1999-2006 Intel Corporation
[ 2.102625] e1000: Intel(R) PRO/1000 Network Driver – version 7.3.21-k8-NAPI
[ 2.103018] e1000: Copyright (c) 1999-2006 Intel Corporation.
[ 2.103630] e1000e: Intel(R) PRO/1000 Network Driver – 2.3.2-k
[ 2.103920] e1000e: Copyright(c) 1999 – 2014 Intel Corporation.
[ 2.104790] sky2: driver version 1.30
[ 2.107568] ehci_hcd: USB 2.0 ‘Enhanced’ Host Controller (EHCI) Driver
[ 2.107977] ehci-pci: EHCI PCI platform driver
[ 2.108937] ohci_hcd: USB 1.1 ‘Open’ Host Controller (OHCI) Driver
[ 2.109708] ohci-pci: OHCI PCI platform driver
[ 2.110846] uhci_hcd: USB Universal Host Controller Interface driver
[ 2.112358] usbcore: registered new interface driver usblp
[ 2.112878] usbcore: registered new interface driver usb-storage
[ 2.114562] i8042: PNP: PS/2 Controller [PNP0303:KBD,PNP0f13:MOU] at 0x60,0x64 irq 1,12
[ 2.118596] serio: i8042 KBD port at 0x60,0x64 irq 1
[ 2.119178] serio: i8042 AUX port at 0x60,0x64 irq 12
[ 2.121894] mousedev: PS/2 mouse device common for all mice
[ 2.126816] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input1
[ 2.129980] rtc_cmos 00:00: RTC can wake from S4
[ 2.135665] rtc_cmos 00:00: rtc core: registered rtc_cmos as rtc0
[ 2.137045] rtc_cmos 00:00: alarms up to one day, 114 bytes nvram, hpet irqs
[ 2.141927] device-mapper: ioctl: 4.28.0-ioctl (2014-09-17) initialised: [email protected]
[ 2.143526] hidraw: raw HID events driver (C) Jiri Kosina
[ 2.147749] usbcore: registered new interface driver usbhid
[ 2.148068] usbhid: USB HID core driver
[ 2.150259] ashmem: initialized
[ 2.162457] Netfilter messages via NETLINK v0.30.
[ 2.163070] nf_conntrack version 0.5.0 (16044 buckets, 64176 max)
[ 2.166829] ctnetlink v0.93: registering with nfnetlink.
[ 2.172251] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 2.175570] TCP: cubic registered
[ 2.175786] Initializing XFRM netlink socket
[ 2.179260] NET: Registered protocol family 10
[ 2.190932] ip6_tables: (C) 2000-2006 Netfilter Core Team
[ 2.193695] sit: IPv6 over IPv4 tunneling driver
[ 2.198711] NET: Registered protocol family 17
[ 2.200733] 9pnet: Installing 9P2000 support
[ 2.201702] Key type dns_resolver registered
[ 2.202013] mce: Unable to init device /dev/mcelog (rc: -5)
[ 2.203489] Using IPI No-Shortcut mode
[ 2.206294] registered taskstats version 1
[ 2.211717] Magic number: 7:606:831
[ 2.212589] console [netcon0] enabled
[ 2.212820] netconsole: network logging started
[ 2.215460] ALSA device list:
[ 2.215666] No soundcards found.
[ 2.255738] ata2.01: NODEV after polling detection
[ 2.257994] ata2.00: ATAPI: QEMU DVD-ROM, 2.2.0, max UDMA/100
[ 2.260900] ata2.00: configured for MWDMA2
[ 2.272379] scsi 1:0:0:0: CD-ROM QEMU QEMU DVD-ROM 2.2. PQ: 0 ANSI: 5
[ 2.291021] sr 1:0:0:0: [sr0] scsi3-mmc drive: 4x/4x cd/rw xa/form2 tray
[ 2.291731] cdrom: Uniform CD-ROM driver Revision: 3.20
[ 2.294976] sr 1:0:0:0: Attached scsi CD-ROM sr0
[ 2.298811] sr 1:0:0:0: Attached scsi generic sg0 type 5
[ 2.742960] input: ImExPS/2 Generic Explorer Mouse as /devices/platform/i8042/serio1/input/input3
[ 2.747584] md: Waiting for all devices to be available before autodetect
[ 2.747972] md: If you don’t use raid, use raid=noautodetect
[ 2.751416] md: Autodetecting RAID arrays.
[ 2.751687] md: Scanned 0 and added 0 devices.
[ 2.751930] md: autorun …
[ 2.752217] md: … autorun DONE.
[ 2.757233] EXT4-fs (vda): couldn’t mount as ext3 due to feature incompatibilities
[ 2.759757] EXT4-fs (vda): couldn’t mount as ext2 due to feature incompatibilities
[ 2.778756] EXT4-fs (vda): mounted filesystem with ordered data mode. Opts: (null)
[ 2.779925] VFS: Mounted root (ext4 filesystem) readonly on device 253:0.
[ 2.782752] devtmpfs: mounted
[ 2.830385] Freeing unused kernel memory: 600K (c1a90000 – c1b26000)
[ 2.831602] Write protecting the kernel text: 7880k
[ 2.831986] Write protecting the kernel read-only data: 2380k
[ 2.838582] tsc: Refined TSC clocksource calibration: 4026.947 MHz
[ 2.960886] init: init first stage started!
[ 2.996875] SELinux: 2048 avtab hash slots, 5772 rules.
[ 3.003446] SELinux: 2048 avtab hash slots, 5772 rules.
[ 3.003878] SELinux: 1 users, 2 roles, 598 types, 0 bools, 1 sens, 1024 cats
[ 3.003934] SELinux: 56 classes, 5772 rules
[ 3.010274] SELinux: Completing initialization.
[ 3.010293] SELinux: Setting up existing superblocks.
[ 3.010802] SELinux: initialized (dev rootfs, type rootfs), uses genfs_contexts
[ 3.011062] SELinux: initialized (dev bdev, type bdev), not configured for labeling
[ 3.011353] SELinux: initialized (dev proc, type proc), uses genfs_contexts
[ 3.011820] SELinux: initialized (dev tmpfs, type tmpfs), uses transition SIDs
[ 3.012614] SELinux: initialized (dev devtmpfs, type devtmpfs), uses transition SIDs
[ 3.013539] SELinux: initialized (dev sockfs, type sockfs), uses task SIDs
[ 3.013580] SELinux: initialized (dev debugfs, type debugfs), uses genfs_contexts
[ 3.049335] SELinux: initialized (dev pipefs, type pipefs), uses task SIDs
[ 3.049371] SELinux: initialized (dev anon_inodefs, type anon_inodefs), not configured for labeling
[ 3.049392] SELinux: initialized (dev aio, type aio), not configured for labeling
[ 3.049416] SELinux: initialized (dev devpts, type devpts), uses transition SIDs
[ 3.049461] SELinux: initialized (dev hugetlbfs, type hugetlbfs), not configured for labeling
[ 3.049485] SELinux: initialized (dev mqueue, type mqueue), uses transition SIDs
[ 3.049522] SELinux: initialized (dev selinuxfs, type selinuxfs), uses genfs_contexts
[ 3.049714] SELinux: initialized (dev vda, type ext4), uses xattr
[ 3.050708] SELinux: initialized (dev tmpfs, type tmpfs), uses transition SIDs
[ 3.050798] SELinux: initialized (dev sysfs, type sysfs), uses genfs_contexts
[ 3.065426] audit: type=1403 audit(1448275805.065:2): policy loaded auid=4294967295 ses=4294967295
[ 3.079294] audit: type=1404 audit(1448275805.079:3): enforcing=1 old_enforcing=0 auid=4294967295 ses=4294967295
[ 3.084369] init: (Initializing SELinux enforcing took 0.11s.)
[ 3.129708] init: init second stage started!
[ 3.159084] init: Running restorecon…
[ 3.218593] init: waitpid failed: No child processes
[ 3.221464] init: (Loading properties from /default.prop took 0.00s.)
[ 3.234797] init: property ‘ro.zygote’ doesn’t exist while expanding ‘/init.${ro.zygote}.rc’
[ 3.235713] init: /init.rc: 11: error while expanding import
[ 3.252415] init: /init.environ.rc: 10: export requires 2 arguments
[ 3.252848] init: /init.environ.rc: 11: export requires 2 arguments
[ 3.253969] init: (Parsing /init.environ.rc took 0.00s.)
[ 3.259032] init: (Parsing /init.usb.rc took 0.00s.)
[ 3.261443] init: (Parsing /init.qemu.rc took 0.00s.)
[ 3.262308] init: could not import file ‘/init.usb.configfs.rc’ from ‘/init.rc’: No such file or directory
[ 3.263186] init: (Parsing /init.rc took 0.03s.)
[ 3.276502] init: Starting service ‘ueventd’…
[ 3.291840] init: Waiting for /dev/.coldboot_done…
[ 3.300494] ueventd: ueventd started!
[ 3.841027] Switched to clocksource tsc
[ 3.861834] ueventd: Coldboot took 0.50s.
[ 3.867557] init: Waiting for /dev/.coldboot_done took 0.58s.
[ 3.869596] init: /dev/hw_random not found
[ 3.882262] SELinux: initialized (dev cgroup, type cgroup), uses genfs_contexts
[ 3.886386] SELinux: initialized (dev tmpfs, type tmpfs), uses transition SIDs
[ 3.893500] SELinux: initialized (dev tmpfs, type tmpfs), uses transition SIDs
[ 3.905288] init: write_file: Unable to open ‘/proc/sys/kernel/hung_task_timeout_secs’: No such file or directory
[ 3.905900] init: write_file: Unable to open ‘/proc/cpu/alignment’: No such file or directory
[ 3.906582] init: write_file: Unable to open ‘/proc/sys/kernel/sched_tunable_scaling’: No such file or directory
[ 3.907762] init: write_file: Unable to open ‘/proc/sys/kernel/sched_latency_ns’: No such file or directory
[ 3.908498] init: write_file: Unable to open ‘/proc/sys/kernel/sched_wakeup_granularity_ns’: No such file or directory
[ 3.909116] init: write_file: Unable to open ‘/proc/sys/kernel/sched_compat_yield’: No such file or directory
[ 3.919055] SELinux: initialized (dev cgroup, type cgroup), uses genfs_contexts
[ 3.920571] init: write_file: Unable to write to ‘/dev/cpuctl/cpu.shares’: Invalid argument
[ 3.921452] init: write_file: Unable to open ‘/dev/cpuctl/cpu.rt_runtime_us’: Permission denied
[ 3.922310] init: write_file: Unable to open ‘/dev/cpuctl/cpu.rt_period_us’: Permission denied
[ 3.925596] init: write_file: Unable to open ‘/dev/cpuctl/bg_non_interactive/cpu.rt_runtime_us’: Permission denied
[ 3.926485] init: write_file: Unable to open ‘/dev/cpuctl/bg_non_interactive/cpu.rt_period_us’: Permission denied
[ 3.941955] SELinux: initialized (dev cgroup, type cgroup), uses genfs_contexts
[ 3.946861] ————[ cut here ]————
[ 3.947817] WARNING: CPU: 0 PID: 1 at /media/hdd/edev/android/brillo-master/hardware/bsp/kernel/common/android-3.18/kernel/cpuset.c:884 cpuset_write_resmask+0x46e/0x5c0()
[ 3.948878] CPU: 0 PID: 1 Comm: init Not tainted 3.18.0+ #1
[ 3.949261] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 04/01/2014
[ 3.950329] 00000000 fa31800f 00000000 f685dec8 c17a7b7d 00000000 f685dee4 c1045792
[ 3.951427] 00000374 c10ad9ce f616ff00 f6193a80 f616f300 f685def4 c104588f 00000009
[ 3.951946] 00000000 f685df14 c10ad9ce 00000001 f616fcc0 00000001 c1a29080 c10ad560
[ 3.952683] Call Trace:
[ 3.953159] [] dump_stack+0x41/0x52
[ 3.953580] [] warn_slowpath_common+0x62/0x80
[ 3.953924] [] ? cpuset_write_resmask+0x46e/0x5c0
[ 3.954381] [] warn_slowpath_null+0xf/0x20
[ 3.954696] [] cpuset_write_resmask+0x46e/0x5c0
[ 3.955035] [] ? cpuset_css_offline+0x70/0x70
[ 3.955521] [] cgroup_file_write+0x3c/0xe0
[ 3.955853] [] ? __kmalloc+0xa5/0x140
[ 3.956286] [] ? cgroup_init_cftypes+0xc0/0xc0
[ 3.956620] [] kernfs_fop_write+0xc5/0x150
[ 3.956966] [] ? kernfs_vma_page_mkwrite+0x70/0x70
[ 3.957477] [] vfs_write+0x95/0x1d0
[ 3.957802] [] SyS_write+0x4a/0xb0
[ 3.958078] [] syscall_call+0x7/0x7
[ 3.958705] —[ end trace 34a6ebb916821bfe ]—
[ 3.960845] ————[ cut here ]————
[ 3.961269] WARNING: CPU: 0 PID: 1 at /media/hdd/edev/android/brillo-master/hardware/bsp/kernel/common/android-3.18/kernel/cpuset.c:1140 cpuset_write_resmask+0x1b7/0x5c0()
[ 3.962454] CPU: 0 PID: 1 Comm: init Tainted: G W 3.18.0+ #1
[ 3.962855] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 04/01/2014
[ 3.963708] 00000000 fa31800f 00000000 f685dec8 c17a7b7d 00000000 f685dee4 c1045792
[ 3.964489] 00000474 c10ad717 f616ff00 f6193a80 f616f300 f685def4 c104588f 00000009
[ 3.965002] 00000000 f685df14 c10ad717 00000000 f616f480 00000001 c1a29104 c10ad560
[ 3.967218] Call Trace:
[ 3.967403] [] dump_stack+0x41/0x52
[ 3.967680] [] warn_slowpath_common+0x62/0x80
[ 3.968074] [] ? cpuset_write_resmask+0x1b7/0x5c0
[ 3.968738] [] warn_slowpath_null+0xf/0x20
[ 3.969185] [] cpuset_write_resmask+0x1b7/0x5c0
[ 3.969513] [] ? cpuset_css_offline+0x70/0x70
[ 3.969845] [] cgroup_file_write+0x3c/0xe0
[ 3.970253] [] ? __kmalloc+0xa5/0x140
[ 3.970534] [] ? cgroup_init_cftypes+0xc0/0xc0
[ 3.970855] [] kernfs_fop_write+0xc5/0x150
[ 3.971252] [] ? kernfs_vma_page_mkwrite+0x70/0x70
[ 3.971591] [] vfs_write+0x95/0x1d0
[ 3.971858] [] SyS_write+0x4a/0xb0
[ 3.972227] [] syscall_call+0x7/0x7
[ 3.972492] —[ end trace 34a6ebb916821bff ]—
[ 3.976601] init: write_file: Unable to open ‘/proc/sys/abi/swp’: No such file or directory
[ 3.977757] init: /dev/hw_random not found
[ 3.988367] EXT4-fs (vdb): Ignoring removed nomblk_io_submit option
[ 3.995811] EXT4-fs (vdb): mounted filesystem with ordered data mode. Opts: errors=remount-ro,nomblk_io_submit
[ 3.996688] SELinux: initialized (dev vdb, type ext4), uses xattr
[ 3.997276] fs_mgr: check_fs(): mount(/dev/block/vdb,/data,ext4)=0: Success
[ 4.044239] fs_mgr: check_fs(): unmount(/data) succeeded
[ 4.046378] fs_mgr: Not running /system/bin/e2fsck on /dev/block/vdb (executable not in system image)
[ 4.048475] EXT4-fs (vdb): Ignoring removed nomblk_io_submit option
[ 4.056938] EXT4-fs (vdb): mounted filesystem with ordered data mode. Opts: nomblk_io_submit,errors=panic
[ 4.058544] SELinux: initialized (dev vdb, type ext4), uses xattr
[ 4.059041] fs_mgr: __mount(source=/dev/block/vdb,target=/data,type=ext4)=0
[ 4.065376] init (1168) used greatest stack depth: 6376 bytes left
[ 4.074890] init: (Parsing /system/etc/init/avahi-daemon.rc took 0.00s.)
[ 4.078605] init: (Parsing /system/etc/init/brillo.rc took 0.00s.)
[ 4.080801] init: (Parsing /system/etc/init/crash_reporter.rc took 0.00s.)
[ 4.082297] init: (Parsing /system/etc/init/firewalld.rc took 0.00s.)
[ 4.083550] init: (Parsing /system/etc/init/keystore.rc took 0.00s.)
[ 4.085184] init: (Parsing /system/etc/init/logcatd.rc took 0.00s.)
[ 4.087003] init: (Parsing /system/etc/init/logd.rc took 0.00s.)
[ 4.088444] init: (Parsing /system/etc/init/mediaserver.rc took 0.00s.)
[ 4.089697] init: (Parsing /system/etc/init/metrics_collector.rc took 0.00s.)
[ 4.090875] init: (Parsing /system/etc/init/metricsd.rc took 0.00s.)
[ 4.092361] init: (Parsing /system/etc/init/nativepowerman.rc took 0.00s.)
[ 4.093459] init: (Parsing /system/etc/init/perfprofd.rc took 0.00s.)
[ 4.094425] init: (Parsing /system/etc/init/sensorservice.rc took 0.00s.)
[ 4.095787] init: (Parsing /system/etc/init/servicemanager.rc took 0.00s.)
[ 4.097297] init: (Parsing /system/etc/init/shill.rc took 0.00s.)
[ 4.098771] init: (Parsing /system/etc/init/tlsdated.rc took 0.00s.)
[ 4.100223] init: (Parsing /system/etc/init/update_engine-dbus.rc took 0.00s.)
[ 4.101608] init: (Parsing /system/etc/init/weaved.rc took 0.00s.)
[ 4.102934] init: (Parsing /system/etc/init/webservd.rc took 0.00s.)
[ 4.114555] init: Starting service ‘logd’…
[ 4.118875] EXT4-fs (vda): re-mounted. Opts: (null)
[ 4.140076] init: (Loading properties from /system/build.prop took 0.00s.)
[ 4.144709] init: (Loading properties from /vendor/build.prop took 0.00s.)
[ 4.145353] init: (Loading properties from /factory/factory.prop took 0.00s.)
[ 4.147557] fs_mgr: Cannot open file /fstab.qemu
[ 4.147994] init: unable to read fstab /fstab.qemu: No such file or directory
[ 4.161572] init: do_start: Service vold not found
[ 4.190684] init: Not bootcharting.
[ 4.252415] random: logd urandom read with 11 bits of entropy available
[ 4.417431] init: cannot find ‘/system/bin/tzdatacheck’ (No such file or directory), disabling ‘exec 1 (/system/bin/tzdatacheck)’
[ 4.441966] init: (Loading properties from /data/local.prop took 0.00s.)
[ 4.443490] init: Starting service ‘logd-reinit’…
[ 4.484825] init: cannot find ‘/sbin/healthd’ (No such file or directory), disabling ‘healthd’
[ 4.489712] init: Starting service ‘wifi-setup’…
[ 4.495951] init: Starting service ‘dbus’…
[ 4.509599] init: Starting service ‘servicemanager’…
[ 4.524524] init: Starting service ‘initnetwork’…
[ 4.547731] init: Starting service ‘firewall-setup’…
[ 4.600328] init: Starting service ‘console’…
[ 4.625652] init: Starting service ‘adbd’…
[ 4.652013] init: cannot find ‘/system/bin/’ (No such file or directory), disabling ‘flash_recovery’
[ 4.653863] init: Starting service ‘avahi-daemon’…
[ 4.691713] init: Starting service ‘keystore’…
[ 4.744386] init: Starting service ‘media’…
[ 4.799800] init: Starting service ‘nativepowerman’…
[ 4.842000] init: Starting service ‘sensorservice’…
[ 4.901436] init: Starting service ‘wpa_supplicant’…
[ 4.944805] init: Starting service ‘crash_reporter’…
[ 4.989070] init: Starting service ‘crash_sender’…
[ 5.064776] init: Starting service ‘metricscollector’…
[ 5.118916] init: Starting service ‘metricsd’…
[ 5.208750] init: Starting service ‘perfprofd’…
[ 5.268018] init: Starting service ‘shill’…
[ 5.334890] init: Starting service ‘tlsdated’…
[ 5.444558] init: Starting service ‘update_engine’…
[ 5.524858] init: Starting service ‘weaved’…
[ 5.595089] init: Starting service ‘webservd’…
[ 5.848418] init: write_file: Unable to open ‘/sys/class/android_usb/android0/enable’: No such file or directory
[ 5.871453] init: write_file: Unable to open ‘/sys/class/android_usb/android0/idVendor’: No such file or directory
[ 5.892852] init: write_file: Unable to open ‘/sys/class/android_usb/android0/idProduct’: No such file or directory
[ 5.913237] init: write_file: Unable to open ‘/sys/class/android_usb/android0/functions’: No such file or directory
[ 5.913928] init: write_file: Unable to open ‘/sys/class/android_usb/android0/enable’: No such file or directory
[ 6.035576] init: Service ‘logd-reinit’ (pid 1177) exited with status 145
[ 6.081871] init: write_file: Unable to open ‘/sys/class/android_usb/android0/enable’: No such file or directory
[ 6.115634] init: write_file: Unable to open ‘/sys/class/android_usb/android0/idVendor’: No such file or directory
[ 6.136657] init: write_file: Unable to open ‘/sys/class/android_usb/android0/idProduct’: No such file or directory
[ 6.167701] init: write_file: Unable to open ‘/sys/class/android_usb/android0/functions’: No such file or directory
[ 6.203480] init: write_file: Unable to open ‘/sys/class/android_usb/android0/enable’: No such file or directory
[ 8.691342] crash_reporter (1191) used greatest stack depth: 6316 bytes left
[ 8.693299] init: Service ‘crash_reporter’ (pid 1191) exited with status 0
[ 8.696058] audit: type=1400 audit(1448275810.693:4): avc: denied { sys_module } for pid=1202 comm=”ifconfig” capability=16 scontext=u:r:brillo_setup:s0 tcontext=u:r:brillo_setup:s0 tclass=capability permissive=0
[ 10.727869] init: Service ‘wifi-setup’ (pid 1178) exited with status 0
[ 14.844780] capability: warning: `wpa_supplicant’ uses 32-bit capabilities (legacy support in use)
[ 15.517398] logd.auditd: start
[ 15.883205] logd.klogd: 15517854148
[ 15.989289] tlsdate-helper (1222) used greatest stack depth: 6132 bytes left
[ 16.066262] route (1208) used greatest stack depth: 5920 bytes left
[ 17.096653] init: Service ‘initnetwork’ (pid 1181) exited with status 126
[ 22.925006] init: Starting service ‘firewalld’…
[ 22.959332] init: Service ‘firewall-setup’ (pid 1182) exited with status 0
[ 24.005450] type=1400 audit(1448275817.466:5): avc: denied { dac_override } for pid=1181 comm=”” capability=1 scontext=u:r:brillo_setup:s0 tcontext=u:r:brillo_setup:s0 tclass=capability permissive=0

And finally the list of processes:

Some web servers, Weave daemon, a firewall, sensor monitor, adb daemon, etc.. but no ART runtime as found in the full Android. It actually looks more like a light weight Linux distribution, than something based on Android, as the root file system still remains Android like with system, vendor, data… directories.

Thanks to Nanik for the tip!

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

Amlogic S905 Source Code Published – Linux, U-Boot, Mali-450 GPU and Other Drivers

November 19th, 2015 16 comments

Amlogic has an open linux website where they regurlarly release GPL source code, and with Amlogic S905 devices coming to market, they’ve released a few tarballs at the beginning of the month including Linux 3.14 source code, U-boot source code, and Mali-450MP GPU kernel source code (obviously not userspace), as well as some other drivers for WiFi, NAND flash, PMU, TVIN, etc…
Amlogic_S905_Linux_MenuconfigLet’s get to the download links:

I quickly tried to build the Linux source. If you’ve never build a 64-bit ARM kernel or app before, you’ll fist need to install the toolchain. I installed the one provided with Ubuntu 14.04:

Now extract the tarball and enter the source directory:

At first I had a build failure due to a missing directory, so I created it, and use the default config for Amlogic S905/S912 (in arch/arm64/configs), before building the Linux kernel.

and it ended well:

So that’s a good starting for anybody wanting to work on the Android or Linux kernel…

Unrelated to Amlogic S905/Meson64, but I’ve also noticed some OpenWRT packages and rootfs  on Amlogic website that was released a little earlier this year. So either some people are using Amlogic Sxxx processors with OpenWRT, or Amlogic is working on a router chip that I missed. Probably the former.

Thanks to Olin.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

Converting H.264 Videos to VP9 In Linux / Ubuntu

November 16th, 2015 3 comments

1080p videos are all good, but my Internet connection’s upload speed is limited to 512 Kbps, so for example uploading a 20 minutes H.264 video shot at 1080p30 may easily take 10 hours, even after some processing with Handbrake. So this week-end I investigated how I could reduce the upload size, and going with H.265 codec appeared to be a good idea at first. So I tried again H.265 encoding in Handbrake in Ubuntu 14.04, and discovered that adjusting CRF (constant quality factor) to 25 with H.265 was roughly equivalent to 20 with H.264, and both the compression ratio and encoding speed were greatly improved compared to default settings with a minor degradation in quality. If you happen to have a second generation Nvidia Maxwell graphics card you may want to check Nvidia Video Encoding SDK for speedier encoding.

All was good until I decided to upload a test video, and I soon discovered that neither YouTube nor Vimeo would support H.265 with the former ending the upload with “The video has failed to process. Please make sure you are uploading a supported file type.”. Back to the drawing board, and I decided to give VP9 a try using ffmpeg/avconv using instructions here and there.

My computer is running Ubuntu 14.04 LTS, but I also have a virtual machine with the latest Ubuntu version, in this case Ubuntu 15.10, and I tried in both.

First install avconv with

and check whether VP9 is enabled in

  • Ubuntu 15.10

  • Ubuntu 14.04 LTS

Ubuntu 15.10 has a more recent version of avconv with VP9, but Ubuntu 14.04, so I looked for a PPA for avconv, but did not find any, instead installed ffmpeg. avconv and ffmpeg are very similar, because although both are developed by separate teams, the former is a fork of the latter, and in the instructions below you can replace avconv by ffmpeg and vice-versa.

So here’s about to install a more recent version of ffmpeg in Ubuntu 14.04:

Once this is done, Ubuntu 14.04 also supports VP9 decoding and encoding.

I tested various VP9 (lipvpx) parameters, and encoding time varies greatly depending on the options.

The video sample, taken straight from my camera, is a 16-second MOV/H.264/1080p30 video recorded at about 45 Mbps and 97.5MB in size. I filmed a TV screen with some text as I though it might be easier to detect differences. When I used H.265 wit CRF 25 it took about 25 seconds in Handbrake with the resulting file being 7.6MB large.

After various trail and errors, I encoded the sample with two command lines, including one using -cpu-used 5 for faster encoding (over twice as fast), but lower quality:

The first one took 2 minutes 56 seconds (Video size: 4.1 MB), while the second was significantly faster, as it completed the task in 1 minute and 17 seconds (Video size: 4.3MB). I uploaded all three files to YouTube to let you guys compare the quality after upload. The videos need to be watched on a 16:9 screen (1920×1080 or greater) and at 1080p for proper comparison.

  • Original H.264 Camera Sample 1 (97.5 MB, ~ 44 Mbps video,  ~30 minutes upload)
  • Sample 1 encoded with VP9 at 2000 kbps (4.1 MB, ~2 minutes upload)
  • Sample 1 video encoded with VP9 at 2000 kbps wit cpu-used 5 option (4.3 MB, ~2 minutes upload)

I repeated the same test by with another video shot outdoors, and encoding to VP9 with cpu-used 5

  • Original H.264 Camera Sample 2 (26.2 MB, ~45 Mbps video, ~8 minutes upload):
  • Sample 2 video encoded with VP9 at 2000 kbps and cpu-used 5 option (1.6MB, ~25 seconds encoding, ~1 minute upload)

For some reasons, the camera samples from the camera were not as good as I would have expected, and even after YouTube processing the original camera samples look very similar to the original.

If you are not a big fan of the command line, you can also install Selene to encode VP9 video using a graphical user interface:

VP9 Encoding with Selene in Ubuntu 15.10 (Click to Enlarge)

VP9 Encoding with Selene in Ubuntu 15.10 (Click to Enlarge)

Once you start the program, click Add Files, select preset “WebM Video (webm), and click on the bottom right icon to adjust the preset settings such as codec (VP8/VP9), bitrate, and so on.  VP9 encoding in Ubuntu 14.04 did not work, even after install ffmpeg, as the program appears to only use avconv, but I did work in Ubuntu 15.10.

I selected VP9, variable bitrate, 2000 kbps and “best” speed at first, but I should have read the tooltips, as the encoding was done at about 0.3 fps in my machine (AMD FX8350 with 16GB RAM), and speed settings are described as below (with actual command show below):

  • Best: best quality, slower
  • Good: good quality, faster
  • Realtime:  good quality fastest

So the speed option in Selene is actually to modify deadline in avconv/ffmpeg, and the slider in the GUI is to adjust cpu-used from 0 to 5.

Any tips to improve encoding speed vs quality are more than welcome.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

TBS5520 Multi-Standard Tuner Box and Linux Drivers

November 14th, 2015 15 comments

TBS Technologies is a company that specializes in digital TV tuner cards for PC, and recently they’ve also worked on ARM based boards or devices such as the Matrix 2. The company has sent me one of their TBS5520 USB tuner board and box supporting DVB-T2, DVB-S2, DVB-C and ISDB-T for evaluation, as well as some Linux drivers. Today, I’ll provide some specifications, take some pictures, and show how I compiled and installed the drivers in my Ubuntu 14.04 computer.

TBS 5520 Tuner Box specifications

TBS5520 is a multi-standard USB tuner with the following features:

  • USB – USB 2.0 device port
  • Antenna connectors – 1x LNB IN, 1x RF IN
  • Standards
    • DVB-S2/S
      • Symbol rate: 1~45Msps;
      • FEC
        •  DVB-S2: 8PSK: 3/5, 2/3, 3/4, 4/5, 5/6, 8/9, 9/10;
        • DVB-S:  QPSK: 1/2, 2/3, 3/4, 5/6, 7/8
    • DVB-T2/T 
      • Receiving channel: VHF band, UHF band;
      • Bandwidth: 1.7,5, 6, 7, 8 MHz;
      • FEC: QPSK, 16QAM, 64QAM, 256QAM
      • FFT mode: 1K, 2K, 4K, 8K, 16K, 32K
      • Code rate: 1/2, 3/5, 2/3, 3/4, 4/5, 5/6, 7/8
      • RF-Input impedance: 75Ω (IEC-DIN female)
    • DVB-C & ITU J83 A/B/C
      • Frequency range: 47~862 MHz
      • Signal level: -65~-10dBm
      • Symbol rate: 0.87 to 9Mbaud
      • QAM modes: 16QAM, 32QAM, 64QAM, 128QAM, 256QAM
    • ISDB-T
      • Supported modes: 1, 2, 3
      • Bandwidth: 6 MHz, 7MHz, 8MHz
      • QAM modes: DQPSK, QPSK, 16QAM, 64QAM
      • Code rate: 1/2, 2/3, 3/4, 5/6, 7/8
  • Misc – IR receiver, power LED
  • Dimensions – ~ 8 x 6 cm

TBS5520 Board and Box Pictures

The first time I received the board with a cable with Y USB cable.


Click to Enlarge

Click to Enlarge


TBS 5520 Tuner Antenna’s Connectors

Click to Enlarge

Click to Enlarge

The shield is soldered, so I could not check the details of the tuner from the hardware, but as we”l see below with drivers to hardware includes RafaelMicro R848 multi-standard tuner and AVL6882 demodulator.

After your truly spent many hours struggling with the Linux drivers, the company informed me there was likely an issue with the hardware, so they sent me the full kit.

Click to Enlarge

Click to Enlarge

The kit has the same tuner board in a case, as well as the Y USB cable, a remote control, an indoor antenna, a coaxial to F-cable adapter, and a DVD with some documentation and software.

Building TBS5520 Drivers in Linux 3.x

I’m running Ubuntu 14.04.3 with kernel 3.18.xx on my computer, and if you connect the tuner, the USB is recognized:

But you don’t get anything in /dev/dvb, so you’ll need some drivers. So TBS provided me with a patch for Linux 3.x (Linux 4.x is currently WIP), and told me to “build it the usual way”. So I decided to do so on my computer instead of an ARM board, as I thought it might be easier…

I basically followed the instructions I wrote in “How to build a single kernel driver in Ubuntu“. I had already installed Linux 3.18.0 for this, but I first upgraded to a more recent Linux 3.18.23 version:

After installation, I rebooted my machine to make use of the update kernel, and downloaded Ubuntu Linux source code in order to patch it and build the drivers.

At this stage, the source is set to the latest working version

So you’ll want to switch to the tag/branch of the kernel installed on your computer to avoid “invalid format” error when inserting the modules.

Let’s make sure we’ve indeed switched to 3.18.23.

Now I’ll download and apply Ubuntu specific patchsets:

Before applying TBS5520 patch to the source tree:

Patching failed, but it was only a small issue, so you can manually edit drivers/media/tuners/Makefile to add the line in bold:

Let start the actually build procedure with make olconfig, which should ask about Turbosight TBS5520 support.:

 Build TBS5520 drivers as modules by entering “m”, and carry on with the procedure:

At this stage, I ran make menuconfig to double check support for TBS5520 was enabled.
All good. Then I tried to build the modules one by one, as with the serial drivers I used in the previous instructions, but it did not work…

Eventually, I did not find a solution, and TBS was not very helpful, except they told me the media tree drivers were a pain to build, and  eventually mentioned I’d also need a firmware file (dvb-usb-tbsqbox-id5520.fw) and copy it to /lib/firmware… .
So I decided to just build the complete kernel and install all modules and firmware:

All modules where built into /lib/modules/3.18.23+/ directory, and i first tried to load the modules manually

Hmm… wrong file name for the firmware… let’s fix that:

I had a few more issues, and I’ve told to delete the media directory in my Ubuntu kernel drivers directory, and replace that with the one I’ve just built. So instead, I backed it up, before replacing it with the new drivers:

Then I rebooted the machine, all drivers were automatically loaded successfully, and I got a dvb adapter:

InitiallyHowever the output of dmesg appears suspicious:

There are some i2c errors, the MAC address is set to 00:00:00:00:00:00, and some systemd errors are popping up too. And soon after, I noticed /dev/dvb/adapter0 would just appear and disappear in loop.

The next step will be to find a solution to this issue, and get a DVB-T2 video stream likely with TvHeadEnd.

The tuner can be purchased for $79.99 on, and you can to check out TBS5520 tuner page for some more details.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

Intel Quark D1000 Customer Reference Board and Intel System Studio for Microcontrollers

November 10th, 2015 3 comments

Intel unveiled Intel Quark D1000, D2000 and SE micro-controllers last week, with Intel Quark D1000 available now for $2.5 to $4 depending in quantities, and to my knowledge the first Intel MCU that can be considered ultra low power. I could not see a development board at the time, but Intel does have an Intel Quark D1000 Customer Reference Board with a familiar Arduino form factor.

Click to Enlarge

Click to Enlarge

Intel Quark D1000 board specifications:

  • MCU – Intel Quark D1000 32-bit CISC micro-controller @ 32 MHz
  • Storage – 4MB SPI flash (Microchip )
  • Connectivity – Bluetooth LE radio, Wi-Fi (Inventek Systems Serial to Wifi module)
  • Sensor – 3-axis accelerometer
  • Expansion – Arduino compatible headers with GPIOs, I2C, SPI, UART, analog inputs, and 5V, 3.3V and GND.
  • Debugging – mini USB port for programming and debugging; JTAG pins
  • Power – 5V via mini USB port, or LiPo / Li-ion battery
  • Dimensions – N/A
Intel D1000 CRB Block Diagram (Click to Enlarge)

Intel Quark D1000 CRB Pinout (Click to Enlarge)

Information about the board is limited to the user guide, and I could find it on any distributors, so it’s probably reserved to Intel’s business for customers. There’s also some information about Intel IDE for Quark D1000 and Intel System Studio for Microcontrollers on Quark D1000 “project” page. I figured out it would just take a couple of minutes to try out the tools, but I was wrong and I spent a couple of hours instead as there are so many steps…

First download Intel IDE v1.0 ( and uncompress it. You’ll find a few installers for Linux and Windows operating systems:

  • ubuntu_installer.tar.gz – For Ubuntu 12.04 and 14.04 LTS (64-bit only)
  • IntelIDEforQuarkD1000_installer.exe – For Windows 7, 8.x (and maybe Windows 10?)
  • fedora_installer.tar.gz – For Fedora 19

My computer is running Ubuntu 14.04.3 LTS so I went ahead with the Ubuntu package:

<pre>tar xzvf ubuntu_installer.tar.gz
cd ubuntu_installer</pre>

Here’s you’ll find a README with the next instructions:

  1. Run the installation script:
  2. Download “Intel(R) System Studio for Microcontrollers” (choose Linux or Windows) by registering and following the instructions. So for some reason you need to register, and get the download link from your email to download the binary package and more instructions….


  3. Once I got the file (l_cembd_iqd_p_1.0.2.018.tgz), I extracted it, and copied the contents of tools directory as instructed:


  4. You’re then asked to reboot (not sure why at this stage), and finally Intel IDE for Intel Microcontroller D1000 and its root version can be found in Ubuntu Dash


Too bad nothing happened with either the user or root version, and no messages were shown. So I launched it from the terminal:

OK… I think I’ve seen that before with Android Studio IDE, and it must be a problem with my Java version.

One of the installation guides (you need to look in a few place to find out the whole instructions) asks for Java JRE 1.7, and Eclipse IDE Luna version. So I’ve installed both, and configured Java to use JRE 1.7.

I’ve confirmed the Java version before trying Intel IDE:

All good, and I finally succeeded in launch the Intel IDE!

Click to Enlarge

Click to Enlarge

It’s quite possible Intel is still working on their development tools, and that’s why they are not really announce the board to the masses, and possibly not streamlined the tools installation procedure.

I don’t have a board, so I could just quickly check the IDE features, and it looks pretty similar to the Arduino IDE.

Click to Enlarge

Click to Enlarge

There are classic and expert code samples for the board such as WiFi AP, Blink, I2C, GPIO, etc.. basically for all interfaces and I/Os of the boards. Programming is done in C, and the firmware is flashed over a usual serial connection. Seven Intel Quark D1000 boards are listed in the IDE, all apparently variations of the Customer Reference Board.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

How to Use Nextion Serial Touchscreen Displays – Part 1: Standalone Mode

November 3rd, 2015 1 comment

Itead Studio launched an Indiegogo campaign earlier this year for their Nextion TFT displays that can be connected to external board such as Arduino or Raspberry Pi via the serial interface, or even a standard computer provided you have a USB to TTL debug board. The campaign was successful with over 1,700 backers, and the company recently sent me two samples for review: a 2.4″ display and a 5″ display. In this post, I’ll look at the boards, and make a small standalone demo with Nextion Editor in Windows.

Nextion NX3224T024 2.4″ Display

Click to Enlarge

Click to Enlarge

The first item is a 2.4″ TFT display called NX3224T024_011N (non-touch) or NX3224T024_011R (Resistive touch) with 65536 color, 320×240 pixel resolution, LED backlight and up to 200nit brightness. It ships with a cable for the serial connection (5V, Tx, Rx, and GND).

Click to Enlarge

Click to Enlarge

The back of the display features the serial connector, a micro SD used to load the HMI files, and J2 unpopulated connector with 3.3V and GND, and some “test points” the company asked me to ignore. STMicro STM32F03C8T6 ARM Cortex M0 micro-controller, which be called “GPU” on the Wiki, but it is likely mostly used to handle the serial connection, and send data to the display controller since it does not have a display controller itself, as well as interface with the micro SD card. U5 (XPT2046) is the touch sensor, and it will be removed for the non-touch version, which is only available for customized orders in larger quantities.

Nextion NX8048T050 5.0″ Display

Click to Enlarge

Click to Enlarge

The second display I received was NX8048T050_011 5″ display available in no-touch (011N) and resistive touch (011R) version. The display has 800×480 pixel resolution with up to 65K colors, up to 250 nit brightness, and an LED backlight.

Click to Enlarge

Click to Enlarge

The display’s board has a the same serial connector, micro SD slot and STM32 MCU as the smaller display, but at two extra chip can be seen with Winbond W9864C6KH-6 SDRAM (8MB) used as an “RGB buffer”, and Altera MAX II EPM570T144CSN CPLD used as the RGB driver. Texas Instruments TSC2046I (U5) is the touch sensor, and it will be there if you simply order online, as the company will only provide the non-touch option for large orders.


I also received a bunch of components including diodes, inductances, and capacitor, so I was a little confused. Itead Studio explained me it was part of their “Grab Bag” activity which adds some present to randomly selected orders, so those did not need to be used with the displays…

Hello World Tutorial for Nextion TFT Serial Displays

In this first post, I’ll mainly play around with Nextion Editor, and run the display in standalone mode without connection to any other board.

Itead Studio initially said they would focus on the Windows version of their WYSIWYG editor, with Linux and Mac OS planned for later. So far there’s no Linux version, and since the Windows version is being developed around DotNet framework it’s not really promising for multiple OS support.

So I fired up a Virtual machine with Windows 7, downloaded Nextion Editor, and installed the program (Nextion Editor 0.3) without issues.

Click to Enlarge

Click to Enlarge

The editor has 6 zones

  • Picture – To import pictures from your computer
  • Fonts – The list of fixed size fonts generated for your display
  • Compiler Output – Show results of creation of HMI files when clicking on “Compile”
  • Event Zone – Set behaviors of buttons or other components before or after taps.
  • Component Parameter – Will show detailed options for components such as text, button, sliders, and so on.
  • Page – To create, modify or delete pages for your user interface
  • Display – Main editing window

Before starting a new project, you’ll want to know the resolution of the display you’ve purchased.
Netxion_TFT_Display_ModelI’m using NX8048T050_011R with 800×480. To get started click on File->New, and you’ll be prompted for the screen resolution and orientation.
You’ll need to select the one for your display. That means if you have displays with different resolution, you’ll have to design one user interface per resolution. Ideally, this should be done at compile time automatically, but it’s not one feature supported by the system.

I was a bit lazy to read Nextion Editor Quick Start Guide at first, but I recommend you do read it, as the software is not always intuitive, and still work in progress. For example, the software does not support drag and drop for pictures, and you need to insert your pictures first, before inserting them with the top menu. Dynamic fonts (TTF) are not supported, so you need to define your font sizes in advance. I have not found a way to move components to lower and higher layer, so for example, you’ll need to create the background image first, as if you create it after other components it will cover them all without options to move it under. There’s no contextual menu when you right-click on components. If the image is larger than the screen, you need to resize it first, or added a “crop” components, instead of “picture” components. Components are created with an inconvenient and small default size, instead of being automatically resize based on your parameters, and I could go on and on.

Adding pictures is pretty straightforward. Go to the picture zone, click Add, select and your pictures. Once you have imported the picture, you can click on Add Component->Picture, which will create a p0 component that you can resize and place where you want on your display. Remember to use “Crop” component if your image is larger than the display.

There aren’t any fonts by default, so you’ll have to create your own by clicking on Tools->Font Creator.

Define a size, select the ISO code and check Bold if needed, then select a font from your computer as well as a range, input a font name and click on Generate font. I’ve done that for two fonts with 112 pixel and 64 pixel fonts.

Once external resources where ready, I created the first page (Hello World – page 0) with a background image, “Hello World!!!” text (Add Component->Text), and “Clock” button (Add Component->Button), and a second one (Clock – page 1) with a “clock”, actually just a Text component, and a back button.


Hello World Page (Click to Enlarge)

Clock Page (Click to Enlarge)

Clock Page (Click to Enlarge)

I’ve selected the buttons in both pages in the screenshot above to show I defined Touch Press Event “page 0” for “Back to Hello” button, and “page 1” for the “Clock” button to be able to switch between the two pages. You can see the complete list of components below including slider, timer, progress bar, and upcoming support for Radio boxes and Check boxes.


Once you are happy with the result, you can click on “Compile” to generate the HMI file with .tft extension. Before uploading the interface to Nextion display, you may want to run the simulator to double check it’s working as expected by clicking on “Debug”

Click to Enlarge

Click to Enlarge

You can click on buttons to switch between the two pages, and monitor the data processed. You could also simulate MCU input in the bottom left part of the simulator, but I have not tried that part.

Now you can load the .tft file to the board, with one of two methods:

  1. micro SD card method – Go to File->Open build folder, and copy the file (e.g. netxion_cnx.tft) to a micro SD card formatted with FAT32 (32GB mac), and insert it into the board to complete installation. You’ll also need to provide 5V power to the power
  2. Serial upload – Connect a 5V USB to TTL debug board to the display’s board and your computer, and click on Upload, and Go
    Nextion_UART_UpdateProgress will show both in Nextion Editor, and on the display with “UART Update” and progress status. If the Windows program says connection failed please double check your debug board connections.

Once the transfer is complete, the user interface will start automatically.


The first time I connected my USB debug board through a USB 2.0 hub, and the display started flickering a lot with nothing displayed. The Wiki states that this is probably a power supply issue (not enough power), and you should disconnect the power immediately to avoid damaging the board.

I explain the steps I followed, and show a quick demo in the video below.

Itead Studio wrote a lot of documentation for their Nextion module, but it looks all over the place to me. You can find more on two documents they provided for reviews with a list of useful links and a list of videos providing tutorials and video demos for Arduino and Raspberry Pi.

The next step for me will be to try using the display(s) with Arduino, Raspberry Pi or ESP8266 boards.

Nextion displays can be purchased on Itead e-Store. Nexteon NX8048T050 5″ display used in this review is going for $64.90, including a micro USB to 2-pin header board that was not in my package, while the 2.4″ display is selling for just $13.90 plus shipping, which would amount to $4.26 for registered airmail to my location.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

Getting Started with NodeMCU Board Powered by ESP8266 WiSoC

October 29th, 2015 17 comments

Since ESP8266 is now so popular, I’ve recently bought a NodeMCU board to try it. I selected this board because the latest version of the board is breadboard-friendly, integrates a USB to serial chip, and it can be powered by a simple USB to micro USB cable. I also noticed a ESP8266 tutorial with NodeMCU firmware by SwitchDoc Labs the other day (using ESP-12 and Adafruit Huzzah), which I applied to my NodeMCU board, but since I encountered a few issues, I decided to report my findings, and write my own little getting started guide to switch on/off LED and GPIOs using a web interface.

NodeMCU v0.9 and NodeMCU v1.0

If you are going to purchase a NodeMCU board it’s important to know there are two official versions:

  • NodeMCU v0.9 with ESP-12 module
  • NodeMCU v1.0 with ESP-12E module

NodeMCU v0.9 vs NodeMCU v1.0 (Click to Enlarge)

The main complain about NodeMCU v0.9 is that while it fits on the breadboard, you can’t use as it takes the full width of the board, while NodeMCU v1.0 is really breadboard-friendly as you can see on the right part of the picture above.

I’ve bought mine for just above $6 on eBay advertised as “NEW Version NodeMcu Lua ESP8266 WIFI Internet Development Board Latest Firmware”. The image was still v0.9, but since there are only two version, I was sort of expecting to receive NodeMCU v1.0. I was wrong…

Other differences are that NodeMCU v1.0 has some extra GPIOs. Please find the pinout for both versions below. We’ll use these a little later in this tutorial.

NodeMCU v1.0 Pinout (Click to Enlarge)

NodeMCU v1.0 Pinout

NodeMCU v0.9 Pinout (Click to Enlarge)

NodeMCU v0.9 Pinout (Click to Enlarge)

Using NodeMCU v0.9 with a Breadboard

If you are lucky (or smart) enough to have purchase a NodeMCU v1.0 board, you can skip this section, but if you are stuck with NodeMCU v0.9 this may be useful.

The first way is to connect the board to the breadboard using female to male Dupont cables.

Female to Male Dupont Cables

Female to Male Dupont Cables

This works, but it’s not quite a neat as the solution provided on lucstechblog, that is making an adapter board with four female headers allowing to insert NodeMCU v0.9 board, and connecting male Dupont cables to the breadboard.

NodeMCU_v0.9_breadboardLuc uses a stripboard, which makes it quite easier to solder than the perfboard I used, and it took me a little while to get rid of some shortcuts I did during soldering. So I should get myself some stripboards too, as they may be useful in the future.

NodeMCU Adapter Board with Stripboard and Perfboard

NodeMCU Adapter Board with Stripboard and Perfboard

Installing Firmware and Accessing the Console on NodeMCU

Now that we have taken care of the hardware part, let’s check how to actually use the board. I was expecting some easy to follow documentation, but the documentation on is not really that useful to get started, and after searching further I eventually ended up on NodeMCU Firmware Wiki on github which provides more details.

However, after connecting the board to my computer via a micro USB to USB cable, while I could see new open ESSID “AI-THINKER_F52E3F” to which I could connect, I had no access to any webserver or the console. So I used minicom in Ubuntu to access the serial program (Putty can be used instead Windows), but again I had nothing. My default settings is 115200 8N1, so I tried 19200 and 38400, and 56700 without any luck.

The I decided to flash the latest NodeMCU firmware with  esptool as explained on that guide. I did so in a terminal in an Ubuntu computer, with the board connected via USB.

  1. Download the latest firmware @ There are both float and integer versions, but since I just wanted to toggle GPIOs, I downloaded the integer version:
  2. Install esptool from Github
  3. Flash the firmware

    and once it is successful:

So I tried again to connect to the serial console via minicom, and no luck. I could still see the AI-THINKER_XXXXXX ESSID though, so it’s likely the board already came with the right firmware. Finally, I found that the serial console may be connected at 9600 baud on Electrodragon Wiki, so I changed the serial in minicom to 9600 8N1, and I had success with the Hello World test:

Controlling ModeMCU’s GPIOs via a Web Interface

Now that we know the board it working, we can run a small web server to control some GPIOs and LEDs. To do so, I created init.lua file with the code I found in SwitchDoc Labs’ tutorial:

You’ll just need to change the second line replacing ROUTER_ESSID and WIFI_PASSWORD by your own credentials to have NodeMCU connect to your WiFi router. The code is set to modify the status for GPIO 0 and GPIO 2 (D3 and D4 pind on NodeMCU board as show in the pinout diagram), so you may also want to modify the code to control the GPIOs required by your project. If you want to clearly understand LUA language, you may want to check out that PDF file provinding details about Lua Language 5.1.

We’ll also need another Python script (luatool) to push the file to the board:

The first time I tried it the connection failed:

So I tried again an it went through:

So for some reasons, the connection between the baord and my computer is not very stable, and I had another aborted connection when I tried again later. The important point is that you need to check the command went through without errors.

We can check the IP address in LUA console:

Now open a web browser (I used Firefox) and point it to the IP address ( in my case).

NodeMCU_Web_ServerNow you can click on the On / Off button to change the GPIO levels, and with GPIO 2 it will also turn on and off the blue LED on ESP-12 module with OFF (low) = LED on and ON (high) = LED off. The URL will also change accordingly, for example GPIO 2 OFF will show the URL

Finally, after some small challenges, NodeMCU is not that difficult to setup after all. Hopefully, this will help a few people getting started faster.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter