Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a kernel recipe for kernel 4.1 #18

Open
graugans opened this issue Sep 22, 2016 · 100 comments
Open

Add a kernel recipe for kernel 4.1 #18

graugans opened this issue Sep 22, 2016 · 100 comments
Assignees

Comments

@graugans
Copy link
Owner

Thanks to @fmntf there is a kernel 4.1 port available for udoo boards the branch is located in his kernel repo

@modjo756
Copy link
Contributor

Hi garugans, just to know if you have made some progress on this ? I saw on udoo github that they make some progress

@graugans
Copy link
Owner Author

Not startend so no progress ;) for quad there are even mainline patches available. But in this case etnaviv will be needed for opengl. I do not know if this works with QT5

@cyrilfr
Copy link

cyrilfr commented Jan 31, 2017

I moved forward to morty and I added the u-boot-fscl and the linux-imx (kernel v4.1.15) recipes from meta-freescale to my project. The kernel from @fmntf doesn't compile (the do_compile_kernelmodules() task fails). The linux-imx sources do compile for the UDOO NEO (I dropped the Quad) but I stay blocked at boot:

U-Boot SPL 2016.11+fslc+gc44711d (Jan 31 2017 - 09:26:33)
Setting 1024MB RAM calibration data
Trying to boot from MMC1
port 1

U-Boot 2016.11+fslc+gc44711d (Jan 31 2017 - 09:26:33 +0100)

CPU:   Freescale i.MX6SX rev1.2 at 792 MHz
Reset cause: POR
Board: UDOO Neo Full
I2C:   ready
DRAM:  1 GiB
PMIC:  PFUZE3000 DEV_ID=0x30 REV_ID=0x11
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   using phy at 0
FEC0 [PRIME]
Hit any key to stop autoboot:  0 
switch to partitions #0, OK
mmc0 is current device
701 bytes read in 411 ms (1000 Bytes/s)
Running bootscript from mmc ...
M4: disabled via environment variables.
Device Tree: /boot/imx6sx-udoo-neo-full-lvds7.dtb
4325088 bytes read in 906 ms (4.6 MiB/s)
Booting from mmc ...
46795 bytes read in 624 ms (72.3 KiB/s)
## Flattened Device Tree blob at 83000000
   Booting using the fdt blob at 0x83000000
   Using Device Tree in place at 83000000, end 8300e6ca

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.1.15-2.0.0+gb63f3f5 (gcc version 6.2.0 (GCC) ) #1 SMP PREEMPT Tue Jan 31 10:57:24 CET 2017
[    0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=50c53c7d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine model: UDOO Neo Full
[    0.000000] Reserved memory: created CMA memory pool at 0xac000000, size 320 MiB
[    0.000000] Reserved memory: initialized node linux,cma, compatible id shared-dma-pool
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] PERCPU: Embedded 11 pages/cpu @ab728000 s16332 r8192 d20532 u45056
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 260096
[    0.000000] Kernel command line: console=ttymxc0,115200 root=/dev/mmcblk0p1 rootwait rw rootfstype=ext4 uart_from_osc clk_ignore_unused cpuidle.off=1 consoleblank=0
[    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] Memory: 704024K/1048576K available (4063K kernel code, 260K rwdata, 2044K rodata, 204K init, 389K bss, 16872K reserved, 327680K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc0800000 - 0xff000000   (1000 MB)
[    0.000000]     lowmem  : 0x80000000 - 0xc0000000   (1024 MB)
[    0.000000]     pkmap   : 0x7fe00000 - 0x80000000   (   2 MB)
[    0.000000]     modules : 0x7f800000 - 0x7fe00000   (   6 MB)
[    0.000000]       .text : 0x80008000 - 0x805fef20   (6108 kB)
[    0.000000]       .init : 0x805ff000 - 0x80632000   ( 204 kB)
[    0.000000]       .data : 0x80632000 - 0x806732a0   ( 261 kB)
[    0.000000]        .bss : 0x80676000 - 0x806d76dc   ( 390 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] 	Additional per-CPU info printed with stalls.
[    0.000000] 	RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] L2C-310 erratum 769419 enabled
[    0.000000] L2C-310 enabling early BRESP for Cortex-A9
[    0.000000] L2C-310 full line of zeros enabled for Cortex-A9
[    0.000000] L2C-310 ID prefetch enabled, offset 16 lines
[    0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled
[    0.000000] L2C-310 cache controller enabled, 16 ways, 256 kB
[    0.000000] L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x76430001
[    0.000000] mxc_clocksource_init 3000000
[    0.000000] Switching to timer-based delay loop, resolution 333ns
[    0.000006] sched_clock: 32 bits at 3000kHz, resolution 333ns, wraps every 715827882841ns
[    0.000025] clocksource mxc_timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 637086815595 ns
[    0.001553] Console: colour dummy device 80x30
[    0.001569] Calibrating delay loop (skipped), value calculated using timer frequency.. 6.00 BogoMIPS (lpj=30000)
[    0.001584] pid_max: default: 32768 minimum: 301
[    0.001689] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.001701] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.002257] Initializing cgroup subsys devices
[    0.002277] Initializing cgroup subsys freezer
[    0.002305] CPU: Testing write buffer coherency: ok
[    0.002516] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.002572] Setting up static identity map for 0x80008240 - 0x8000828c
[    0.040447] Brought up 1 CPUs
[    0.040461] SMP: Total of 1 processors activated (6.00 BogoMIPS).
[    0.040470] CPU: All CPU(s) started in SVC mode.
[    0.040903] devtmpfs: initialized
[    0.050461] device-tree: Duplicate name in lcdif@02224000, renamed to "display#1"
[    0.054046] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[    0.054415] clocksource jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.070169] pinctrl core: initialized pinctrl subsystem
[    0.071373] NET: Registered protocol family 16
[    0.080271] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.107251] imx6sx-pinctrl 20e0000.iomuxc: initialized IMX pinctrl driver
[    0.109209] MU is ready for cross core communication!
[    0.117374] mxs-dma 1804000.dma-apbh: initialized
[    0.121496] SCSI subsystem initialized
[    0.122057] 2000000.aips-bus:usbphy_nop1 supply vcc not found, using dummy regulator
[    0.123254] i2c i2c-0: IMX I2C adapter registered
[    0.123273] i2c i2c-0: can't use DMA
[    0.124084] i2c i2c-1: IMX I2C adapter registered
[    0.124101] i2c i2c-1: can't use DMA
[    0.124807] i2c i2c-3: IMX I2C adapter registered
[    0.124825] i2c i2c-3: can't use DMA
[    0.124974] Linux video capture interface: v2.00
[    0.125033] pps_core: LinuxPPS API ver. 1 registered
[    0.125043] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.125077] PTP clock support registered
[    0.126538] Advanced Linux Sound Architecture Driver Initialized.
[    0.128226] Switched to clocksource mxc_timer1
[    0.139393] NET: Registered protocol family 2
[    0.140075] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    0.140160] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    0.140284] TCP: Hash tables configured (established 8192 bind 8192)
[    0.140361] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    0.140398] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    0.140594] NET: Registered protocol family 1
[    0.141198] imx rpmsg driver is registered.
[    0.142672] Bus freq driver module loaded
[    0.143673] futex hash table entries: 256 (order: 2, 16384 bytes)
[    0.150791] VFS: Disk quotas dquot_6.6.0
[    0.151002] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.156816] io scheduler noop registered
[    0.156837] io scheduler deadline registered
[    0.157046] io scheduler cfq registered (default)
[    0.157561] imx-weim 21b8000.weim: Driver registered.
[    0.158912] MIPI DSI driver module loaded
[    0.159137] MIPI DSI driver module loaded
[    0.161777] 2224000.lcdif supply lcd not found, using dummy regulator
[    0.266281] mxsfb 2224000.lcdif: registered mxc display driver ldb
[    0.270941] Console: switching to colour frame buffer device 100x30
[    0.284120] mxsfb 2224000.lcdif: initialized
[    0.287256] imx-sdma 20ec000.sdma: no iram assigned, using external mem
[    0.289124] imx-sdma 20ec000.sdma: no event needs to be remapped
[    0.290099] imx-sdma 20ec000.sdma: loaded firmware 3.3
[    0.293236] imx-sdma 20ec000.sdma: initialized
[    0.294952] pfuze100-regulator 0-0008: Full layer: 1, Metal layer: 1
[    0.295526] pfuze100-regulator 0-0008: FAB: 0, FIN: 0
[    0.295539] pfuze100-regulator 0-0008: pfuze3000 found.
[    0.308747] 2020000.serial: ttymxc0 at MMIO 0x2020000 (irq = 22, base_baud = 1500000) is a IMX
[    0.958243] console [ttymxc0] enabled
[    0.962850] 21ec000.serial: ttymxc2 at MMIO 0x21ec000 (irq = 285, base_baud = 1500000) is a IMX
[    0.974204] imx sema4 driver is registered.
[    0.978520] [drm] Initialized drm 1.1.0 20060810
[    0.983651] [drm] Initialized vivante 1.0.0 20120216 on minor 0
[    0.995362] loop: module loaded
[    0.999801] input: fxos8700 as /devices/soc0/soc/2100000.aips-bus/21f8000.i2c/i2c-3/3-001e/input/input0
[    1.011369] fxos8700 device driver probe successfully
[    1.017347] input: fxas2100x as /devices/soc0/soc/2100000.aips-bus/21f8000.i2c/i2c-3/3-0020/input/input1
[    1.027508] fxas2100x 3-0020: fxas2100x device driver probe successfully
[    1.038376] 2188000.ethernet supply phy not found, using dummy regulator
[    1.058704] pps pps0: new PPS source ptp0
[    1.070645] libphy: fec_enet_mii_bus: probed
[    1.075730] fec 2188000.ethernet eth0: registered PHC device 0
[    1.082224] mousedev: PS/2 mouse device common for all mice
[    1.088933] input: 20cc000.snvs:snvs-powerkey as /devices/soc0/soc/2000000.aips-bus/20cc000.snvs/20cc000.snvs:snvs-powerkey/input/input2
[    1.102577] input: st1232-touchscreen as /devices/soc0/soc/2100000.aips-bus/21a0000.i2c/i2c-0/0-0055/input/input3
[    1.113789] read mpl3115 chip id 0xfffffffb
[    1.117992] mpl3115 1-0060: read chip ID 0x1 is not equal to 0xc4!
[    1.124219] mpl3115: probe of 1-0060 failed with error -22
[    1.130795] snvs_rtc 20cc000.snvs:snvs-rtc-lp: rtc core: registered 20cc000.snvs:snvs-r as rtc0
[    1.139724] i2c /dev entries driver
[    1.144890] pxp-v4l2 pxp_v4l2_out: initialized
[    1.151208] imx2-wdt 20bc000.wdog: timeout 60 sec (nowayout=0)
[    1.157612] sdhci: Secure Digital Host Controller Interface driver
[    1.163849] sdhci: Copyright(c) Pierre Ossman
[    1.168245] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.175161] /soc/aips-bus@02100000/usdhc@02194000: voltage-ranges unspecified
[    1.182378] sdhci-esdhc-imx 2194000.usdhc: Got CD GPIO
[    1.188727] sdhci-esdhc-imx 2194000.usdhc: No vqmmc regulator found
[    1.239445] mmc0: SDHCI controller on 2194000.usdhc [2194000.usdhc] using ADMA
[    1.254322] /soc/aips-bus@02100000/usdhc@02198000: voltage-ranges unspecified
[    1.264570] sdhci-esdhc-imx 2198000.usdhc: could not get ultra high speed state, work on normal mode
[    1.281372] sdhci-esdhc-imx 2198000.usdhc: No vqmmc regulator found
[    1.408251] mmc2: SDHCI controller on 2198000.usdhc [2198000.usdhc] using ADMA
[    1.422345] mmc0: error -110 whilst initialising SD card
[    1.431342] caam 2100000.caam: Entropy delay = 3200
[    1.557778] caam 2100000.caam: Entropy delay = 3600
[    1.701500] caam 2100000.caam: Entropy delay = 4000
[    1.763960] sdhci-esdhc-imx 2198000.usdhc: card claims to support voltages below defined range
[    1.784371] caam 2100000.caam: Instantiated RNG4 SH0
[    1.810543] mmc2: queuing unknown CIS tuple 0x91 (3 bytes)
[    1.829407] mmc2: new high speed SDIO card at address 0001
[    1.860289] caam 2100000.caam: Instantiated RNG4 SH1
[    1.865272] caam 2100000.caam: device ID = 0x0a16010000000200 (Era -524)
[    1.872004] caam 2100000.caam: job rings = 2, qi = 0
[    1.944474] caam algorithms registered in /proc/crypto
[    1.953768] caam_jr 2101000.jr0: registering rng-caam
[    1.959186] snvs-secvio 20cc000.caam-snvs: can't identify tamper alarm configuration
[    1.966954] snvs-secvio: probe of 20cc000.caam-snvs failed with error -22
[    1.977433] fsl-asrc 2034000.asrc: driver registered
[    1.985422] nf_conntrack version 0.5.0 (16120 buckets, 64480 max)
[    1.992289] NET: Registered protocol family 17
[    1.996801] Key type dns_resolver registered
[    2.002020] cpu cpu0: dev_pm_opp_get_opp_count: device OPP not found (-19)
[    2.028250] failed to register cpuidle driver
[    2.032627] ThumbEE CPU extension supported.
[    2.039750] snvs_rtc 20cc000.snvs:snvs-rtc-lp: setting system clock to 1970-01-01 00:00:00 UTC (0)
[    2.059864] VLDO2: disabling
[    2.063224] wlan-en-regulator: disabling
[    2.067155] vref-3v3: disabling
[    2.070333] PSU-5V0: disabling
[    2.073393] usb_otg2_vbus: disabling
[    2.076971] usb_otg1_vbus: disabling
[    2.080787] vddpcie-phy: disabling
[    2.084250] clk: Not disabling unused clocks
[    2.088747] ALSA device list:
[    2.091726]   No soundcards found.
[    2.095374] Waiting for root device /dev/mmcblk0p1...

I use the DTS and the defconfig file from the repository of @fmntf.

U-Boot printenv:

=> printenv
baudrate=115200
boot_fdt=try
bootcmd=mmc dev ${mmcdev}; if mmc rescan; then if run loadbootscript; then run bootscript; fi; udooinit; if run loadimage; then run mmcboot; else run netboot; fi; else run netboot; fi
bootcmd_mfg=run mfgtool_args;bootz ${loadaddr} ${initrd_addr} ${fdt_addr};
bootdelay=3
bootscript=echo Running bootscript from mmc ...; env import -t ${loadaddr} ${filesize};
console=ttymxc0
ethact=FEC0
ethaddr=00:c0:08:8c:89:7c
ethprime=FEC0
fdt_addr=0x83000000
fdt_file=autodetect
fdt_high=0xffffffff
image=/boot/zImage
initrd_addr=0x83800000
initrd_high=0xffffffff
ip_dyn=yes
loadaddr=0x82000000
loadbootscript=ext2load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};
loadfdt=ext2load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}
loadimage=ext2load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}
m4mmcargs=uart_from_osc clk_ignore_unused cpuidle.off=1
mfgtool_args=setenv bootargs console=${console},${baudrate} rdinit=/linuxrc g_mass_storage.stall=0 g_mass_storage.removable=1 g_mass_storage.idVendor=0x066F g_mass_storage.idProduct=0x37FF g_mass_storage.iSerialNumber="" 
mmcargs=setenv bootargs console=${console},${baudrate} root=${mmcroot} rootfstype=${mmcrootfstype} ${m4mmcargs} consoleblank=0
mmcautodetect=no
mmcboot=echo Booting from mmc ...; run mmcargs; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then bootz ${loadaddr} - ${fdt_addr}; else if test ${boot_fdt} = try; then bootz; else echo WARN: Cannot load the DT; fi; fi; else bootz; fi;
mmcdev=0
mmcpart=1
mmcroot=/dev/mmcblk0p1 rootwait rw
mmcrootfstype=ext4
netargs=setenv bootargs console=${console},${baudrate} root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp
netboot=echo Booting from net ...; run netargs; if test ${ip_dyn} = yes; then setenv get_cmd dhcp; else setenv get_cmd tftp; fi; ${get_cmd} ${image}; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if ${get_cmd} ${fdt_addr} ${fdt_file}; then bootz ${loadaddr} - ${fdt_addr}; else if test ${boot_fdt} = try; then bootz; else echo WARN: Cannot load the DT; fi; fi; else bootz; fi;
script=/boot/uEnv.txt
stderr=serial
stdin=serial
stdout=serial

Any idea? Seems like the MMC sdcard isn't recognised :/

I directly wrote the image to my scdard using:

bzcat tmp/deploy/images/udooneo/udoo-image-qt5-udooneo.wic.bz2 | sudo dd of=/dev/sde bs=16M

I didn't have to use the wic tool (???).

@fmntf
Copy link

fmntf commented Jan 31, 2017

That issue if fixed on my kernel: fmntf/linux_kernel@0dffbfa

@cyrilfr
Copy link

cyrilfr commented Jan 31, 2017

Thanks @fmntf but I already use your DTS and defonconfig files. Freescale kernel doesn't have a proper support for the UDOO NEO.

Maybe you could fix the issue with kernel modules in your kernel source ? UDOOboard/linux_kernel#23 (comment)

Here is my layer : https://github.com/cyrilfr/meta-udoo
Files used to compile : https://github.com/cyrilfr/meta-udoo/tree/morty/recipes-kernel/linux/linux-imx/udooneo

@graugans
Copy link
Owner Author

graugans commented Jan 31, 2017

@cyrilfr For the morty branch the manual call to the wic tool is not needed anymore. It looks like an issue with the initialization of the mmc. From your kernel log the mmc seems not be proper initialized:

[    1.408251] mmc2: SDHCI controller on 2198000.usdhc [2198000.usdhc] using ADMA
[    1.422345] mmc0: error -110 whilst initialising SD card

The Mapping is done imx6sx-udoo-neo.dtsi#L19

U-Boot sets the root path to

mmcroot=/dev/mmcblk0p1 rootwait rw

@cyrilfr
Copy link

cyrilfr commented Jan 31, 2017

@graugans Yes you're right and as you can see U-Boot loads the right DTB file so it should theoretically map the mmc0 as it includes the mentioned DTSI file. I've never been able to compile the sources from the fork https://github.com/fmntf/linux_kernel/tree/4.1.15_1.x-udoo . I wonder if this one is able to boot. If yes, with which version of U-Boot?

@fmntf
Copy link

fmntf commented Jan 31, 2017

Tomorrow I will try to rebuild it. I also have a newever kernel (4.1.15_2.0.0) on another computer, but I have forgotten to push it to GitHub.
Probably newer compilers broke something. On Ubuntu 16.04 with the default cross-compiler it worked fine.

I used U-boot 2015 and 2016. They both worked fine.

@cyrilfr
Copy link

cyrilfr commented Jan 31, 2017

I tried with u-boot-fslc from this recipe of meta-freescale. I also compiled the kernel with linux-imx also from meta-freescale layer. There is u-boot-imx and u-boot-fslc, linux-imx and linux-fslc recipes actually. I'll have a look on what are the differences. This is probably more clever to use u-boot-imx with linux-imx or your fork if it comes from linux-imx.

@graugans
Copy link
Owner Author

graugans commented Feb 1, 2017

@cyrilfr It should not really depend on the U-Boot. The kernel is orchestrated by the device-tree, the only influence U-Boot does have in this case is the bootargs the difference between linux-imx and linux-fslc is the c what stands for community. The linux-fslc is maintained by the community and hosted at github. The linux-imx is the official kernel source hosted at Freescale/NXP. I would go with the linux-fslc sources. Because there maybe the chance we can integrate the Neo stuff.

@cyrilfr
Copy link

cyrilfr commented Feb 1, 2017

Yes so I edited my recipe to use linux-fslc instead. The kernel compiles but I have an error while compiling the kernel-module-imx-gpu-viv_5.0.11 module.

kernel-module-imx-gpu-viv/5.0.11.p8.6+fslc+gitAUTOINC+1be63fb14e-r0/git/kernel-module-imx-gpu-viv-src/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.c:81:31: fatal error: linux/busfreq-imx.h: No such file or directory
|  #include <linux/busfreq-imx.h>
|                                ^
| compilation terminated.

@fmntf
Copy link

fmntf commented Feb 1, 2017

Please try to build this branch: https://github.com/fmntf/linux_kernel/tree/4.1.15_2.x-udoo
It contains fixes for GCC 6

make mrproper
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make udoo_neo_defconfig
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make imx6sx-udoo-neo-{basic,basicks,extended,full}{-hdmi,-lvds7,-lvds15,}{-m4,}.dtb zImage modules firmware -j8

@cyrilfr
Copy link

cyrilfr commented Feb 1, 2017

It doesn't compile that way as the default udoo_neo_defconfig file enable ttyMCC which is not supported anymore. Otherwise, it compiles. There is probably an issue with the recipe or the OpenEmbedded environment. I'll have a look on this.

@fmntf
Copy link

fmntf commented Feb 1, 2017

Sorry, in the directory where I have built 4.1.15-2.0.0 I had some uncommitted changes (an initial draft of ttyMCC on 4.1). Btw, if you disable ttyMCC from defconfig you should be able to build a fully working kernel. SD card should work too.

@cyrilfr
Copy link

cyrilfr commented Feb 1, 2017

Well, it does compile directly with make, compiling with BitBake (in OpenEmbedded) still doesn't work for me. Here is the most important part of the logs :

cat: drivers/net/wireless/ti/wlcore/release_version.h: No such file or directory
| /poky/build-neo-morty/tmp/work-shared/udooneo/kernel-source/drivers/net/wireless/ti/wlcore/Makefile:38: recipe for target 'drivers/net/wireless/ti/wlcore/version.h' failed
| make[7]: *** [drivers/net/wireless/ti/wlcore/version.h] Error 1
| /poky/build-neo-morty/tmp/work-shared/udooneo/kernel-source/scripts/Makefile.build:403: recipe for target 'drivers/net/wireless/ti/wlcore' failed
| make[6]: *** [drivers/net/wireless/ti/wlcore] Error 2
| make[6]: *** Waiting for unfinished jobs....

But surprisingly (or not), the file drivers/net/wireless/ti/wlcore/release_version.h DOES exist. I'll have to figure out why the cat command in the Makefile doesn't find it :/

@graugans
Copy link
Owner Author

graugans commented Feb 1, 2017

@cyrilfr This maybe caused by an issue with out of source builds. You can try to set B=${S} in your bbappend file. This may break the building of the vivante driver afterwards.

I mostly debug stuff like this with

bitbake virtual/kernel -cdevshell

@cyrilfr
Copy link

cyrilfr commented Feb 1, 2017

@graugans That was the issue! Unfortunately, it still doesn't boot correctly. The symptom is still a wait on root device /dev/mmcblk0p1. Maybe an error in the WIC script?

@graugans
Copy link
Owner Author

graugans commented Feb 1, 2017

No, wic is just for creating the image. I guess the issue is kernel related. I'll check on Friday or Saturday.

@JochenLoeser
Copy link

I have the same problem.
I don't have a real solution but after verifing, that the sd card has power I looked through the kernel source code.
Apparently the sd card driver does not work with my sd card.
I've got a https://www.google.com/search?q=sandisk+ultra+32gb+sdhc+micro+sd (at least the picture is the same)
I took the identical image with a 'normal' non SDHC card and it worked!

I tracked the -110 error to the function "mmc_sd_get_cid".
Sidenote: The card works with 4.10 mainline and the 3.14 from udoo.

I hope this helps the smarter more experienced people to find a solution.
If I can provide any further help or anything feel free to contact me.

@modjo756
Copy link
Contributor

modjo756 commented Apr 1, 2017

Hi all, this week i had a formation on yocto and linux embedded with phytec in France. During the training we use there mira3 board (imx6 quad like udoo quad and seco sbc a62). Phytec are on linux mainline for linux-kernel (very interesting for maintaining and update !). Perhaps we could have a look on their repository to check if we can adapt something to our card ...) . Otherwise they use barebox for boot loader. Actually i'm trying to make a meta for the openZwave library, i let you know on udoo forum ...

@JochenLoeser
Copy link

I think I found a(the?) solution: no-1-8-v; is missing. See: https://github.com/UDOOboard/linux_kernel/blob/3.14-1.0.x-udoo/arch/arm/boot/dts/imx6sx-udoo-neo.dtsi#L529
As far as I understand the Device Tree (and please correct me if I'm wrong - I want to learn something): The sdcard interface (usdhc2) is supplied by regulator vcc_sd2. This is a fixed regulator (the min/max values states this too). This means the kernel will never be able to apply 1.8V.

On the other hand shouldn't the kernel be able to figure this out?

@graugans
Copy link
Owner Author

graugans commented Apr 5, 2017

@JochenLoeser Have you checked the schematics how the 1.8v is generated? I have so much i.mx6 boards floating arround not sure how this is done in UDOO at the moment. The frequency and voltages is still a mysterium in device tree for me as-well. I guess the handling of regulator have changed in 4.x kernels.

@JochenLoeser
Copy link

My first thought (before I even found this issue) was that the inversion of the chip-detect pin ( fmntf/linux_kernel@0dffbfa#diff-c63642f2e8268f6942b422d66eeda0e0L356 ) was a mistake. So I measured the supply voltage at the sdcard connector: 3.3V

I have to double check with the real board but according to the schematics the sdcard VDD is the same net as the Arduino power supply on the pinheaders. This should be fixed at 3.3V. It would be weird, if the sdcard can say at which voltage the Arduino is running.

But as I said I will double check tomorrow.

@fmntf
Copy link

fmntf commented Apr 6, 2017

Hi guys. no-1-8-v; was removed by mistake. I will bring it back, thank you for noticing! (Pull requests are welcome)
The SD card runs at 3.3V only. You can verify it on the Neo revD schematics on page 8. NVCC_3V0 and VCC_SW are fixed and cannot be changed.

The card detect pin logic was probably not checked on Linux 3.14, where it was wrongly declared as GPIO_ACTIVE_HIGH instead of GPIO_ACTIVE_LOW and everything worked. On 4.1, instead, the SD was not detected until that fix. That fix should be fixed on 3.14 too, but since everything works there...

@modjo756
Copy link
Contributor

modjo756 commented Apr 6, 2017

Hi all, i saw they have some progress on kernel 4.1 ... good news ! Graugans, do you plan to integrate this kernel on morty branch ?

@fmntf
Copy link

fmntf commented Apr 6, 2017

Remember there is no M4 communication support on this kernel. I don't even know if M4 can boot at all, I did not verify the shared memory pools.

@drewmoseley
Copy link
Contributor

All, FWIW, I managed to get the onboard wifi working. In my pyro branch I have a few extra commits from #18 as well as some defconfig mods to enable it.: https://github.com/drewmoseley/meta-udoo/tree/pyro

@modjo756
Copy link
Contributor

All, i will test (i think if i have the time ...) the build in pyro with kernel 4.1 (and rpmsg) next week ... i let you known

@modjo756
Copy link
Contributor

Tonight i'm trying to build an image for seco A62 with kernel 4.1 from seco git and the recipe but i have this error during the fetch step :

WARNING: linux-seco-4.1.15-r0 do_fetch: Failed to fetch URL git://secogit.seco.com/imx6_release/linux-4-1-15-secoboards-imx6-rel.git;user=betauser:betauser;protocol=https, attempting MIRRORS if available
ERROR: linux-seco-4.1.15-r0 do_fetch: Fetcher failure: Fetch command export DBUS_SESSION_BUS_ADDRESS="unix:abstract=/tmp/dbus-vuYjBC8shH,guid=f700538d45f7e83698b3944d59a83b3c"; export SSH_AGENT_PID="1806"; export SSH_AUTH_SOCK="/tmp/ssh-2O04vjKHs7U9/agent.1759"; export PATH="/media/modjo/data1TO2/yocto/pyro/sbca62Build/tmp/sysroots-uninative/x86_64-linux/usr/bin:/media/modjo/data1TO2/yocto/pyro/sources/poky/scripts:/media/modjo/data1TO2/yocto/pyro/sbca62Build/tmp/work/secosbca62-poky-linux-gnueabi/linux-seco/4.1.15-r0/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi:/media/modjo/data1TO2/yocto/pyro/sbca62Build/tmp/work/secosbca62-poky-linux-gnueabi/linux-seco/4.1.15-r0/recipe-sysroot/usr/bin/crossscripts:/media/modjo/data1TO2/yocto/pyro/sbca62Build/tmp/work/secosbca62-poky-linux-gnueabi/linux-seco/4.1.15-r0/recipe-sysroot-native/usr/sbin:/media/modjo/data1TO2/yocto/pyro/sbca62Build/tmp/work/secosbca62-poky-linux-gnueabi/linux-seco/4.1.15-r0/recipe-sysroot-native/usr/bin:/media/modjo/data1TO2/yocto/pyro/sbca62Build/tmp/work/secosbca62-poky-linux-gnueabi/linux-seco/4.1.15-r0/recipe-sysroot-native/sbin:/media/modjo/data1TO2/yocto/pyro/sbca62Build/tmp/work/secosbca62-poky-linux-gnueabi/linux-seco/4.1.15-r0/recipe-sysroot-native/bin:/media/modjo/data1TO2/yocto/pyro/sources/poky/bitbake/bin:/media/modjo/data1TO2/yocto/pyro/sbca62Build/tmp/hosttools"; export HOME="/home/modjo"; LANG=C git -c core.fsyncobjectfiles=0 clone --bare --mirror https://betauser:betauser@secogit.seco.com/imx6_release/linux-4-1-15-secoboards-imx6-rel.git /media/modjo/data1TO2/yocto/pyro/downloads//git2/secogit.seco.com.imx6_release.linux-4-1-15-secoboards-imx6-rel.git --progress failed with exit code 128, output:
Cloning into bare repository '/media/modjo/data1TO2/yocto/pyro/downloads//git2/secogit.seco.com.imx6_release.linux-4-1-15-secoboards-imx6-rel.git'...
remote: Counting objects: 53067, done.
remote: Compressing objects: 100% (48427/48427), done.
fatal: The remote end hung up unexpectedly.71 MiB | 346.00 KiB/s
fatal: early EOF
fatal: index-pack failed

ERROR: linux-seco-4.1.15-r0 do_fetch: Fetcher failure for URL: 'git://secogit.seco.com/imx6_release/linux-4-1-15-secoboards-imx6-rel.git;user=betauser:betauser;protocol=https'. Unable to fetch URL from any source.
ERROR: linux-seco-4.1.15-r0 do_fetch: Function failed: base_do_fetch
ERROR: Logfile of failure stored in: /media/modjo/data1TO2/yocto/pyro/sbca62Build/tmp/work/secosbca62-poky-linux-gnueabi/linux-seco/4.1.15-r0/temp/log.do_fetch.19463
ERROR: Task (/media/modjo/data1TO2/yocto/pyro/sources/meta-tyboest/recipes-kernel/linux/linux-seco_4.1.15.bb:do_fetch) failed with exit code '1'

If you have an idea where is the error (perhaps the login and password) ...

@graugans
Copy link
Owner Author

graugans commented Sep 2, 2017

You can create a local mirror and use this or ask them if it is okay to have a public one.

@modjo756
Copy link
Contributor

modjo756 commented Sep 4, 2017

Yes this is what i did here. I have make a fusion with seco kernel and @fmntf repo . For the moment i have some errors during build but when i have something that work i let you known. Otherwise i don't know for uboot if it's better to use fsl u-boot branch or seco ...

@modjo756
Copy link
Contributor

modjo756 commented Sep 5, 2017

@fmntf , i'm trying to build kernel 4.1.15 for secoA62 but i have this error during build that i can't resolve :

|   LD      init/built-in.o
| arch/arm/mach-imx/built-in.o: In function `imx6ul_cpuidle_init':
| platform-imx-dma.c:(.init.text+0x4b20): undefined reference to `mx6ull_lpm_wfi_end'
| platform-imx-dma.c:(.init.text+0x4b24): undefined reference to `mx6ull_lpm_wfi_start'
| platform-imx-dma.c:(.init.text+0x4b28): undefined reference to `mx6ull_lpm_wfi_end'
| platform-imx-dma.c:(.init.text+0x4b2c): undefined reference to `mx6ull_lpm_wfi_start'
| platform-imx-dma.c:(.init.text+0x4b30): undefined reference to `imx6ull_low_power_idle'
| platform-imx-dma.c:(.init.text+0x4b38): undefined reference to `imx6ull_low_power_idle'
| arch/arm/mach-imx/built-in.o: In function `imx6q_init_machine':
| platform-imx-dma.c:(.init.text+0xb280): undefined reference to `apx_wdog_trigger_early_init'
| platform-imx-dma.c:(.init.text+0xb614): undefined reference to `apx_wdog_trigger_work_init'
| arch/arm/mach-imx/built-in.o: In function `imx6q_init_early':
| platform-imx-dma.c:(.init.text+0xb9bc): undefined reference to `of_property_write_string'
| platform-imx-dma.c:(.init.text+0xba20): undefined reference to `of_concat_property'
| platform-imx-dma.c:(.init.text+0xbcec): undefined reference to `of_property_write_string'
| platform-imx-dma.c:(.init.text+0xbd50): undefined reference to `of_concat_property'
| platform-imx-dma.c:(.init.text+0xc044): undefined reference to `of_property_write_string'
| platform-imx-dma.c:(.init.text+0xc0a8): undefined reference to `of_concat_property'
| Makefile:933: recipe for target 'vmlinux' failed
| make: *** [vmlinux] Error 1

Do you have an idea where is the issue ?

@graugans
Copy link
Owner Author

graugans commented Sep 6, 2017

@modjo756 could you please be so kind and attach your defconfig for this build? It looks like you are using the wrong i.mx6 type. mx6ull The error messages:

| platform-imx-dma.c:(.init.text+0xb9bc): undefined reference to `of_property_write_string'
| platform-imx-dma.c:(.init.text+0xba20): undefined reference to `of_concat_property'
| platform-imx-dma.c:(.init.text+0xbcec): undefined reference to `of_property_write_string'
| platform-imx-dma.c:(.init.text+0xbd50): undefined reference to `of_concat_property'
| platform-imx-dma.c:(.init.text+0xc044): undefined reference to `of_property_write_string'
| platform-imx-dma.c:(.init.text+0xc0a8): undefined reference to `of_concat_property'

Indicate that device tree is not enabled or there was a renaming between kernel versions.

| platform-imx-dma.c:(.init.text+0xb280): undefined reference to `apx_wdog_trigger_early_init'
| platform-imx-dma.c:(.init.text+0xb614): undefined reference to `apx_wdog_trigger_work_init'

Is the external watchdog used on the A62. I guess this is missing in defconfig as-well grep for imx6q_init_machine and check if there is a #ifndef needed or even better check if you need to add the apx module. If this watchdog is not triggered your board will reboot in a short :-) @fmntf a hint next time some jumper for the external watchdog would be very cool : -)

@modjo756 regarding your u-boot question I would prefer the vanilla or the fsl u-boot. Because vendor u-boot versions tend to be outdated. And there are some really nice features like generic $bootcmd

@modjo756
Copy link
Contributor

modjo756 commented Sep 6, 2017

@graugans , no problems ! i use the defconfig of seco here. I also updated my git with the modification that i already did.

edit :
@graugans you are right in seco defconfig they enable imx6ul proc . Tonight i also check for watchdog.
Otherwise i have forked the original seco kernel seco-4.1.15-ori the branch 4.1.15_2.x-udoo is a fusion between the seco and udoo branch that i did.

@modjo756
Copy link
Contributor

modjo756 commented Sep 6, 2017

I have disabled imx6UL,SX ... just keep quad but same error (with quad) :

| arch/arm/mach-imx/built-in.o: In function `imx6q_init_machine':
| platform-imx-dma.c:(.init.text+0xa834): undefined reference to `apx_wdog_trigger_early_init'
| platform-imx-dma.c:(.init.text+0xabc8): undefined reference to `apx_wdog_trigger_work_init'
| arch/arm/mach-imx/built-in.o: In function `imx6q_init_early':
| platform-imx-dma.c:(.init.text+0xaf70): undefined reference to `of_property_write_string'
| platform-imx-dma.c:(.init.text+0xafd4): undefined reference to `of_concat_property'
| platform-imx-dma.c:(.init.text+0xb2a0): undefined reference to `of_property_write_string'
| platform-imx-dma.c:(.init.text+0xb304): undefined reference to `of_concat_property'
| platform-imx-dma.c:(.init.text+0xb5f8): undefined reference to `of_property_write_string'
| platform-imx-dma.c:(.init.text+0xb65c): undefined reference to `of_concat_property'
| drivers/built-in.o: In function `cpld_probe':
| vf610_adc.c:(.text+0x26f6f4): undefined reference to `of_property_write_string'
| Makefile:933: recipe for target 'vmlinux' failed
| make: *** [vmlinux] Error 1

@graugans , you are right about the external watchdog, i find in apx_wdog-trigger.h (arch/arm/mach-imx) a #ifndef __WDOG_TRIGGER_PLATFORM_H__ do declare or not the function. In file mach-imx6q.c seco add this to static void __init imx6q_init_machine(void) :

if ( of_machine_is_compatible("fsl,imx6q-SBC_A62") ||
			of_machine_is_compatible("fsl,imx6dl-SBC_A62") ) {

		apx_wdog_trigger_work_init(1);

		/*  set clock CKO2 to use the USBH1 with external clock  */
		np = of_find_node_by_path("/external_clocks");
		if ( !np ) {
			pr_warn ("%s: failed to get %s structure\n", __func__, "/external_clocks");
			goto put_node;
		}
		   p_clk = of_clk_get (np, 0);
		if ( IS_ERR(p_clk) ) {
			pr_warn("%s: failed to get clock\n", __func__);
			goto put_node;
		}
		ret = clk_prepare_enable (p_clk);
		if (ret) {
			pr_err ("can't enable clock\n");
		} else {
			pr_info ("clock enabled\n");
		}
	}

But i didn't know how to declare it in defconfig, i have tried :
CONFIG_WDOG_TRIGGER_PLATFORM=y but not working. Also tried with menuconfig without success ...
menuconfig

seco add :

menuconfig1

@graugans
Copy link
Owner Author

graugans commented Sep 7, 2017

@modjo756 you'll need a KConf entry beside the defconfig

@modjo756
Copy link
Contributor

modjo756 commented Sep 7, 2017

Sorry for my low knowledge, but can you explain more the utility of this file please ?

@modjo756
Copy link
Contributor

modjo756 commented Sep 7, 2017

@patrykk perhaps you can help on this ...

@modjo756
Copy link
Contributor

modjo756 commented Oct 5, 2017

@drewmoseley , i tested your last version of pyro branch with udooneo , good work ! But i have some issues.
@fmntf , i used the last revision of your kernel SRCREV = "a68513ba9d3203adb5d65de724dbb6b923085096" but i need to patch it (see the zip file):

udooneo-patch.zip

with that the kernel build fine with rpmsg driver. When i boot the card (with m4 core activated) this driver didn't load automatically, i need to modprobe imx-rpmsg-tty but this driver don't create a /dev/ttyRPMSG entry ... I have follow this tutorial but can't have a tty working ! Otherwise it seems that i can upload scketch from arduino to the M4. A question, the arduino ide need to be update with this new driver ? Another point, when the m4 core is running can0 and can1 didn't work (we can up it but didn't send or receive anything !), already post a message on udoo forum here ...
@drewmoseley, i use your u-boot-script to boot from sdcard, but by this way, it seems that uEnv.txt is not take in consideration during the boot. Did you have an idea how to resolve this ? To have the m4 running i need to use this patch :
0007-default-fdt.patch.zip

The log of the card boot

@fmntf
Copy link

fmntf commented Oct 5, 2017

Thank you! I have added you as collaborator, you can commit your patch on the 4.1.15_2.x-udoo branch.

@modjo756
Copy link
Contributor

modjo756 commented Oct 5, 2017

@fmntf sorry but i can't push to your git :
modjo@KDE-Z400:/media/modjo/data/udoo/linux_kernel$ git push origin 4.1.15_2.x-udoo Username for 'https://github.com': modjo756 Password for 'https://modjo756@github.com': remote: Permission to fmntf/linux_kernel.git denied to modjo756. fatal: unable to access 'https://github.com/fmntf/linux_kernel.git/': The requested URL returned error: 403

@fmntf
Copy link

fmntf commented Oct 5, 2017

Sorry. Try now.

@modjo756
Copy link
Contributor

modjo756 commented Oct 5, 2017

Done !

@drewmoseley
Copy link
Contributor

@modjo756 do you know that the uEnv.txt stuff worked prior to my change? I loaded up a morty build and it doesn't seem to work on the Neo. I see the settings for it in EXTRA_ENV_SETTINGS in udoo_quad_dual.h but not udoo_neo.h.

@modjo756
Copy link
Contributor

modjo756 commented Oct 6, 2017

@drewmoseley For me it works fine on krogoth branch (in neo/quad/sa62) but since Morty it didn't !

@drewmoseley
Copy link
Contributor

OK. That's a bit odd. It looks like 0001-UDOO-Quad-Dual-support.patch is adding that to the default environment, even in morty whereas 0002-Added-UDOO-Neo-support.patch is not. My understanding is that upstream U-Boot has changed a bit as regards default boot commands and related environment settings, trying to standardize a bit better across platforms, so it's possible the missing uEnv.txt processing is due to that.

@modjo756
Copy link
Contributor

modjo756 commented Oct 7, 2017

Ok. Do you think that we just need to update the udooneo patch like quad to resolve this ?

@drewmoseley
Copy link
Contributor

@modjo756 perhaps so. Can you verify whether the current quad support for uEnv.txt is functioning?

@modjo756
Copy link
Contributor

@drewmoseley , in pyro branch for quad the uEnv file is not loaded correctly also

@cyrilfr
Copy link

cyrilfr commented Nov 13, 2017

Do you also have a very long boot time, especially to load the WiLink drivers?

@drewmoseley
Copy link
Contributor

I've never noticed anything in particular. But I don't use it that much so don't have much for comparison.

@cyrilfr
Copy link

cyrilfr commented Nov 13, 2017

At boot it stays for minutes at this steps:

...
[    1.260870] pxp-v4l2 pxp_v4l2_out: initialized
[    1.267132] imx2-wdt 20bc000.wdog: timeout 60 sec (nowayout=0)
[    1.273376] sdhci: Secure Digital Host Controller Interface driver
[    1.279619] sdhci: Copyright(c) Pierre Ossman
[    1.283994] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.290910] /soc/aips-bus@02100000/usdhc@02194000: voltage-ranges unspecified
[    1.298133] sdhci-esdhc-imx 2194000.usdhc: Got CD GPIO
[    1.304407] sdhci-esdhc-imx 2194000.usdhc: No vqmmc regulator found
[    1.356171] mmc0: SDHCI controller on 2194000.usdhc [2194000.usdhc] using ADMA
[    1.371067] /soc/aips-bus@02100000/usdhc@02198000: voltage-ranges unspecified
[    1.381336] sdhci-esdhc-imx 2198000.usdhc: could not get ultra high speed state, work on normal mode
[    1.398184] sdhci-esdhc-imx 2198000.usdhc: No vqmmc regulator found
[    1.432630] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.446730] mmc0: new high speed SDHC card at address 59b4
[    1.452619] mmcblk0: mmc0:59b4 USDU1 7.51 GiB 
[    1.458383]  mmcblk0: p1
[    1.524970] mmc2: SDHCI controller on 2198000.usdhc [2198000.usdhc] using ADMA
[    1.548825] sdhci-esdhc-imx 2198000.usdhc: card claims to support voltages below defined range
[    1.560487] fsl-asrc 2034000.asrc: driver registered
[    1.568349] nf_conntrack version 0.5.0 (16100 buckets, 64400 max)
[    1.575255] NET: Registered protocol family 17
[    1.579835] NET: Registered protocol family 36
[    1.584386] Key type dns_resolver registered
[    1.589614] cpu cpu0: dev_pm_opp_get_opp_count: device OPP not found (-19)
[    1.610644] mmc2: queuing unknown CIS tuple 0x91 (3 bytes)
[    1.616199] failed to register cpuidle driver
[    1.620579] ThumbEE CPU extension supported.
[    1.626155] mmc2: new high speed SDIO card at address 0001
[    1.636748] snvs_rtc 20cc000.snvs:snvs-rtc-lp: setting system clock to 2017-11-13 13:19:48 UTC (1510579188)
[    1.656751] VLDO2: disabling
[    1.660138] wlan-en-regulator: disabling
[    1.664071] PSU-5V0: disabling
[    1.667167] usb_otg2_vbus: disabling
[    1.670747] usb_otg1_vbus: disabling
[    1.674332] vddpcie-phy: disabling
[    1.677838] clk: Not disabling unused clocks
[    1.682125] ALSA device list:
[    1.685118]   No soundcards found.
[    1.703978] EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null)
[    1.712210] VFS: Mounted root (ext4 filesystem) on device 179:1.
[    1.718897] devtmpfs: mounted
[    1.722085] Freeing unused kernel memory: 272K (80736000 - 8077a000)
INIT: version 2.88 booting
Starting udev
udev: Not using udev cache because of changes detected in the following files:
udev:     /proc/version /proc/cmdline /proc/devices
udev:     lib/udev/rules.d/* etc/udev/rules.d/*
udev: The udev cache will be regenerated. To identify the detected changes,
udev: compare the cached sysconf at   /etc/udev/cache.data
udev: against the current sysconf at  /dev/shm/udev.cache
[    2.505498] udevd[106]: starting version 3.2
[    2.528701] random: udevd urandom read with 16 bits of entropy available
[    2.574539] udevd[107]: starting eudev-3.2
[    2.764816] (stk) :sysfs entries created
[    2.809159] galcore: clk_get 2d core clock failed, disable 2d/vg!
[    2.838022] Galcore version 5.0.11.41671
[    2.882534] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    2.926498] 2184800.usbmisc supply vbus-wakeup not found, using dummy regulator
[    2.985150] ci_hdrc ci_hdrc.1: EHCI Host Controller
[    2.990067] ci_hdrc ci_hdrc.1: new USB bus registered, assigned bus number 1
[    3.003955] Loading modules backported from Linux version R8.7_SP2-0-g5c94cc5
[    3.032076] Backport generated by backports.git R8.7_SP2-0-gd4777ef
[    3.065235] ci_hdrc ci_hdrc.1: USB 2.0 started, EHCI 1.00
[    3.077477] hub 1-0:1.0: USB hub found
[    3.095083] hub 1-0:1.0: 1 port detected
[    3.213061] input: FreescaleGyroscope as /devices/virtual/input/input2
[    3.259064] fxas2100x device driver probe successfully
[    3.279256] CSI: Registered sensor subdevice: fsl_vadc
[    3.289279] input: FreescaleAccelerometer as /devices/virtual/input/input3
[    3.322319] input: FreescaleMagnetometer as /devices/virtual/input/input4
[    3.335013] wait vadc auto detect video mode....
[    3.366920] fxos8700_probe succ
[    3.755005] video mode PAL
[    3.765204] vadc driver loaded
[    3.780216] wl18xx_driver wl18xx.0.auto: Direct firmware load for ti-connectivity/wl1271-nvs.bin failed with error -2
[    3.811825] cfg80211: World regulatory domain updated:
[    3.817060] cfg80211:  DFS Master region: unset
[    3.821423] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[    3.831282] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[    3.839355] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz, 92000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[    3.848783] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[    3.856844] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[    3.866353] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[    3.875850] cfg80211:   (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[    3.883945] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[    3.891971] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
[    3.996134] g_serial gadget: Gadget Serial v2.4
[    4.000677] g_serial gadget: g_serial ready
[    4.067521] EXT4-fs (mmcblk0p1): re-mounted. Opts: (null)
Populating dev cache
[    4.205548] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)
[    4.238659] wlcore: loaded
[    4.241410] wlcore: driver version: R8.7_SP2
INIT: Entering runlevel: 5
Configuring network interfaces... 

According to this thread : https://e2e.ti.com/support/wireless_connectivity/wilink_wifi_bluetooth/f/307/t/369363 it seems that the wl1271-nvs.bin file is missing in /lib/firmware/ti-connectivity/.

@cyrilfr
Copy link

cyrilfr commented Nov 14, 2017

Actually the long boot time has nothing to do with the wl18xx driver. It is related to the random generator causing a delay to start wpa_supplicant. The dmesg logs show how long it takes to initialize the random numbers generator (see random: nonblocking pool is initialized):

...
[    3.801541] cfg80211: World regulatory domain updated:
[    3.806808] cfg80211:  DFS Master region: unset
[    3.811170] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[    3.821006] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[    3.829075] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz, 92000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[    3.838492] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[    3.846557] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[    3.856060] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[    3.865565] cfg80211:   (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[    3.873658] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[    3.881678] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
[    4.184998] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)
[    4.207574] wlcore: loaded
[    4.210332] wlcore: driver version: R8.7_SP2
[    4.301269] g_serial gadget: Gadget Serial v2.4
[    4.307197] g_serial gadget: g_serial ready
[    4.372967] EXT4-fs (mmcblk0p1): re-mounted. Opts: (null)
[   15.675998] fec 2188000.ethernet eth0: Freescale FEC PHY driver [Generic PHY] (mii_bus:phy_addr=2188000.ethernet:00, irq=-1)
[   18.676652] fec 2188000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[  108.180815] random: nonblocking pool is initialized
[  108.817348] wlcore: PHY firmware version: Rev 8.2.0.0.240
[  108.878161] wlcore: firmware booted (Rev 8.9.0.0.75)
[  118.609725] Bluetooth: Core ver 2.20
[  118.618402] NET: Registered protocol family 31
[  118.622858] Bluetooth: HCI device and connection manager initialized
[  118.629363] Bluetooth: HCI socket layer initialized
[  118.634253] Bluetooth: L2CAP socket layer initialized
[  118.639414] Bluetooth: SCO socket layer initialized
[  118.647839] hdev a852d000
[  118.650484] HCI device registered (hdev a852d000)
[  118.657880] hci0 a852d000
...

Edit :
This is due to a lack of entropy. If I connect a keyboard and type random keys, it boot in few seconds. wpa_supplicant needs a working random numbers generator, that's why it waits so long.

@cyrilfr
Copy link

cyrilfr commented Nov 20, 2017

I found a solution by adding the rng-tools package and set the default entropy source to /dev/urandom with a rng_tools_%.bbappend file.

@modjo756
Copy link
Contributor

modjo756 commented Dec 8, 2017

@cyrilfr , could you add a link to your recipe for rng-tools please ?

@drewmoseley
Copy link
Contributor

FWIW, I recently managed to get the Udooneo build running in Yocto sumo and master. Additionally I was able to switch to kernel linux-fslc version 4.17.4. I have it working on rocko, sumo and master in my fork here https://github.com/drewmoseley/meta-udoo

The GPU driver does not build but I have tested a basic boot, including wifi and remote login.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants