graugans / meta-udoo

:heartpulse: openembedded meta layer for the UDOO boards
MIT License
31 stars 19 forks source link

Add a kernel recipe for kernel 4.1 #18

Open graugans opened 8 years ago

graugans commented 8 years ago

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

cyrilfr commented 7 years ago

@graugans I was stucked to boot the kernel but once I'll get it work, probably next week, I'll detail every single step and push all the recipes.

modjo756 commented 7 years ago

@graugans see here for my kernel 4.1 (first commit), i will update it this week. It will be great if you can push a dev branch on morty kernel 4.1 !

graugans commented 7 years ago

I just pushed a preliminary recipe for kernel 4.1 based on the work from @modjo756

modjo756 commented 7 years ago

This evening, trying to boot kernel 4.1 on secoA62 but some problem due to Unrecognized filesystem type at boot stage ... tried also to load image from tftp with no success ! We need to resolve the problem with /boot

graugans commented 7 years ago

I guess this is again related to the on board emmc and the different ordering of sdcard on A62

modjo756 commented 7 years ago

Yes i suppose, i have tried with different options (env u-boot, /dev/mmcblk0p1 ...) but no success !

modjo756 commented 7 years ago

For information seco as provided a bsp for it's board with kernel 4.1.15 here and here the bsp. i will try and let you know how it works !

graugans commented 7 years ago

Thanks for the hint.

modjo756 commented 7 years ago

@graugans @drewmoseley , with my qdl i use kernel 4.1 that works fine but not for wifi. At first boot i have it i can connect to it, but at second boot i did'nt have wlan0, see the error at boot : Configuring network interfaces... [ 4.291123] usb 1-1.3: New USB device found, idVendor=148f, idProduct=5370 [ 4.298107] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 4.298116] usb 1-1.3: Product: 802.11 n WLAN [ 4.298122] usb 1-1.3: Manufacturer: Ralink [ 4.298127] usb 1-1.3: SerialNumber: 1.0 [ 4.393115] usb 1-1.4: new full-speed USB device number 5 using ci_hdrc [ 4.530610] usb 1-1.4: New USB device found, idVendor=0403, idProduct=6001 [ 4.537558] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 4.544923] usb 1-1.4: Product: EnOcean USB 300 DB [ 4.549723] usb 1-1.4: Manufacturer: EnOcean GmbH [ 4.554454] usb 1-1.4: SerialNumber: FTXH4VLL Successfully initialized wpa_supplicant [ 4.579402] usbcore: registered new interface driver usbserial [ 4.585668] usbcore: registered new interface driver usbserial_generic [ 4.592293] usbserial: USB Serial support registered for generic [ 4.603106] usb 1-1.3: reset high-speed USB device number 4 using ci_hdrc [ 4.608281] usbcore: registered new interface driver ftdi_sio [ 4.609022] usbserial: USB Serial support registered for FTDI USB Serial Device [ 4.609575] ftdi_sio 1-1.4:1.0: FTDI USB Serial Device converter detected [ 4.609730] usb 1-1.4: Detected FT232RL [ 4.610444] usb 1-1.4: FTDI USB Serial Device converter now attached to ttyUSB0 rfkill: Cannot open RFKILL control device Could not read interface wlan0 flags: No such device nl80211: Driver does not support authentication/association or connect commands nl80211: deinit ifname=wlan0 disabled_11b_rates=0 Could not read interface wlan0 flags: No such device wlan0: Failed to initialize driver interface wlan0: ERROR while getting interface flags: No such device SIOCSIFADDR: No such device wlan0: ERROR while getting interface flags: No such device SIOCSIFNETMASK: No such device SIOCADDRT: No such device [ 4.764223] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 5390, rev 0502 detected [ 4.802226] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 5370 detected [ 4.884176] fec 2188000.ethernet eth0: Freescale FEC PHY driver [Generic PHY] (mii_bus:phy_addr=2188000.ethernet:06, irq=-1) [ 4.899278] usbcore: registered new interface driver rt2800usb Starting system message bus: dbus. Starting OpenBSD Secure Shell server: sshd [ 5.277762] NET: Registered protocol family 10 [ 5.283776] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

Do you have an idea ?

drewmoseley commented 7 years ago

No clue, sorry. I only have tried it with wired Ethernet.

modjo756 commented 7 years ago

Tried with kernel 3.14 but same issue ... perhap's a problem with samba, apache , ftp ... Find where is the problem --> i have an enocean usb key (that use ftdi serial) on my card, when i remove it wifi work fine ... apparently they have a confuse with this 2 periph on usb ...

Could not read interface wlan0 fl[ 4.817140] usb 1-1.4: FTDI USB Serial Device converter now attached to ttyUSB0 ags: No such device

cyrilfr commented 7 years ago

@graugans @modjo756 I tried to compile an image with your kernel 4.1 branch. It seems to work fine except that the LVDS 7'' touchscreen events aren't triggered. I tried event0, event1 and event2 as input in the qt-env.sh file.

There is also regular errors:

[  157.800014] (stk) : request_firmware failed(errno -11) for ti-connectivity/TIInit_11.8.32.bts
[  157.808413] (stk) :download firmware failed(stk) :ldisc_install = 0uim:poll broke due to event 10(PR
I:2/ERR:8)

uim:read 0 from ins[  157.820302] (stc): st_tty_close tall 

uim:@ st_uart_config
uim:Un-Installed N_TI_WL Line displine
(stk) :ldisc_install = 1uim:begin polling...
uim:poll broke due to event 10(PRI:2/ERR:8)

uim:read 1 from install 

uim:@ st_uart_config
uim: signal received, opening /dev/ttymxc2
uim:@ set_baud_rate
uim:set_baud_rate() done
uim:Setting speed to 921600
uim:@ read_command_complete
uim: Command complete started
uim:@ read_hci_event
uim: read_hci_event
uim:Command complete done

uim:Speed changing to 921600, 1[  157.990080] (stc): st_tty_open 
uim:@ set_custom_baud_rate
(stk) :line discipline installeduim:Installed N_TI_WL Line displi
ne
uim:begin polling...
[  158.005261] (stk) :ti-connectivity/TIInit_11.8.32.bts[  158.014811] kim kim: Direct firmware load for ti-connectivity/TIInit_11.8.32.bts failed with error -2
[  158.024997] kim kim: Falling back to user helper
graugans commented 7 years ago

@modjo756 related to your wifi issue maybe @fmntf have an idea? For Wifif we may have to also to check the drivers and firmware for updates.

@cyrilfr I am very sorry but I do not have one of those LVDS touch screens. So I can not debug this.

modjo756 commented 7 years ago

@graugans , i will take a look on driver when i have more time ! @cyrilfr did you check in defconfig if st1232 touchscreen is enabled on 4.1 ?

cyrilfr commented 7 years ago

I was confused because I didn't run the "do_configure" task. Everything works fine now :)

drewmoseley commented 7 years ago

@graugans Did you realize that my pyro branch had the kernel 4.1 recipe in it? I had intended to remove that due to the earlier comments about needing the 3.14 kernel for the Arduino stuff.

graugans commented 7 years ago

@drewmoseley due to the fact @modjo756 is the only Arduino user so far :) and he requested kernel 4.1 this was okay for the moment. Hopefully I can get some time to fix some issues with UDOO this week.

cyrilfr commented 7 years ago

I found a warning in dmesg about spidev in the DT file:

[    1.016706] spidev spi1.0: buggy DT: spidev listed directly in DT
[    1.022816] ------------[ cut here ]------------
[    1.027547] WARNING: CPU: 0 PID: 1 at drivers/spi/spidev.c:731 spidev_probe+0x1d0/0x1e0()
[    1.035760] Modules linked in:
[    1.038845] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.1.15_2.0.x-udoo+g7773e46 #1
[    1.046536] Hardware name: Freescale i.MX6 SoloX (Device Tree)
[    1.052403] [<80015adc>] (unwind_backtrace) from [<80012600>] (show_stack+0x10/0x14)
[    1.060189] [<80012600>] (show_stack) from [<80515818>] (dump_stack+0x74/0xb4)
[    1.067449] [<80515818>] (dump_stack) from [<8002fd1c>] (warn_slowpath_common+0x80/0xb0)
[    1.075574] [<8002fd1c>] (warn_slowpath_common) from [<8002fde8>] (warn_slowpath_null+0x1c/0x24)
[    1.084371] [<8002fde8>] (warn_slowpath_null) from [<803353c0>] (spidev_probe+0x1d0/0x1e0)
[    1.092672] [<803353c0>] (spidev_probe) from [<8033310c>] (spi_drv_probe+0x5c/0x78)
[    1.100366] [<8033310c>] (spi_drv_probe) from [<802bd1b4>] (driver_probe_device+0x174/0x2a8)
[    1.108835] [<802bd1b4>] (driver_probe_device) from [<802bb908>] (bus_for_each_drv+0x60/0x94)
[    1.117388] [<802bb908>] (bus_for_each_drv) from [<802bd00c>] (device_attach+0x80/0x94)
[    1.125421] [<802bd00c>] (device_attach) from [<802bc6d8>] (bus_probe_device+0x84/0xa8)
[    1.133435] [<802bc6d8>] (bus_probe_device) from [<802baa48>] (device_add+0x36c/0x568)
[    1.141381] [<802baa48>] (device_add) from [<803338b8>] (spi_add_device+0x98/0x154)
[    1.149067] [<803338b8>] (spi_add_device) from [<803342c4>] (spi_register_master+0x62c/0x754)
[    1.157620] [<803342c4>] (spi_register_master) from [<803365e0>] (spi_bitbang_start+0x9c/0x108)
[    1.166349] [<803365e0>] (spi_bitbang_start) from [<8033783c>] (spi_imx_probe+0x3f0/0x678)
[    1.174628] [<8033783c>] (spi_imx_probe) from [<802be910>] (platform_drv_probe+0x48/0xa4)
[    1.182836] [<802be910>] (platform_drv_probe) from [<802bd1b4>] (driver_probe_device+0x174/0x2a8)
[    1.191740] [<802bd1b4>] (driver_probe_device) from [<802bd3b8>] (__driver_attach+0x8c/0x90)
[    1.200209] [<802bd3b8>] (__driver_attach) from [<802bb860>] (bus_for_each_dev+0x68/0x9c)
[    1.208414] [<802bb860>] (bus_for_each_dev) from [<802bc8f4>] (bus_add_driver+0xf4/0x1e8)
[    1.216620] [<802bc8f4>] (bus_add_driver) from [<802bd9cc>] (driver_register+0x78/0xf4)
[    1.224637] [<802bd9cc>] (driver_register) from [<80009698>] (do_one_initcall+0x8c/0x1d0)
[    1.232845] [<80009698>] (do_one_initcall) from [<80739d50>] (kernel_init_freeable+0x140/0x1d4)
[    1.241581] [<80739d50>] (kernel_init_freeable) from [<80513f50>] (kernel_init+0x8/0xe8)
[    1.249709] [<80513f50>] (kernel_init) from [<8000f3e8>] (ret_from_fork+0x14/0x2c)
[    1.257351] ---[ end trace 0659f266603176c5 ]---

An idea how to disable the bluetooth on the NEO? And NFS?

fmntf commented 7 years ago

Just FYI, there is Arduino/M4 support for Neo here, using rpmsg instead of mcc. That is not officially merged btw.

modjo756 commented 7 years ago

@fmntf good news ! I hope this also resolve the issue with CAN bus, for the moment impossible to use the M4 (activated) and CAN in the same time ! I will test and let you known ...

drewmoseley commented 7 years ago

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

modjo756 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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

modjo756 commented 7 years ago

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 commented 7 years ago

@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 commented 7 years ago

@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 commented 7 years ago

@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 commented 7 years ago

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 commented 7 years ago

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

modjo756 commented 7 years ago

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

modjo756 commented 7 years ago

@patrykk perhaps you can help on this ...

modjo756 commented 7 years ago

@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 commented 7 years ago

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

modjo756 commented 7 years ago

@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 commented 7 years ago

Sorry. Try now.

modjo756 commented 7 years ago

Done !

drewmoseley commented 7 years ago

@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 commented 7 years ago

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

drewmoseley commented 7 years ago

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 commented 7 years ago

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

drewmoseley commented 7 years ago

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

modjo756 commented 7 years ago

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

cyrilfr commented 7 years ago

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

drewmoseley commented 7 years ago

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

cyrilfr commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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 commented 6 years ago

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

drewmoseley commented 6 years ago

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.