Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => iMX233 => Topic started by: Fadil Berisha on September 26, 2013, 07:38:43 am

Title: Building a kernel 3.12-rc2 for the imx23-olinuxino
Post by: Fadil Berisha on September 26, 2013, 07:38:43 am
Repository https://github.com/koliqi/imx23-olinuxino is updated with new branch 3.12-rc2.
Instructions for how to clone branch and build kernel are at http://g-lab.ca/building-a-kernel-3-12-rc2-for-the-imx23-olinuxino/

This build brings patches to support i2c for imx23-olinuxino board's and also audio driver for i.MX23 SoC. You can use those patches also to build kernel 3.12-rc2 to boot with u-boot loader. In this case, instructions to build kernel are at http://g-lab.ca/u-boot-bootloader-for-imx23-olinuxino-board/

Fadil Berisha
Title: Re: Building a kernel 3.12-rc2 for the imx23-olinuxino
Post by: olimex on September 26, 2013, 04:40:40 pm
there is weird problem with the USB in Kernel 3.x
imx233-OLinuXino-MINI-WIFI with Kernel 3.xx when USB devices is plug on SOME boards the USB gives error -71 and stops working

same boards which do not work with 3.X kernel work fine when boot with Kernel 2.6.x

any idea what may be wrong?
Title: Re: Building a kernel 3.12-rc2 for the imx23-olinuxino
Post by: Fadil Berisha on September 26, 2013, 05:19:11 pm
Since that occurs only on imx233-OLinuXino-MINI-WIFI, I am willing to blame RTL81xx driver. We did lot of tests with imx233-OLinuXino-MINI-WIFI and kernel 3.7.1. and everything was OK.  After 3.7.1, wifi driver has been changed.
Please check any "nonworking" board with kernel 3.7.1 and compare result with 3.11.x / 3.12.x.
You can find 3.7.1 image at https://www.dropbox.com/s/rfnmzdbcu21pfgf/sd_mmc_bootstream.raw.   

Regards

Fadil Berisha
Title: Re: Building a kernel 3.12-rc2 for the imx23-olinuxino
Post by: olimex on September 26, 2013, 05:30:42 pm
here are the messages when USB device is plugged and dmesg http://pastie.org/8357431
Title: Re: Building a kernel 3.12-rc2 for the imx23-olinuxino
Post by: manchot50 on September 27, 2013, 09:47:43 pm
hello,

   I try 3.12.RC1 on imx nano, without you re patch, run fine

   Now i go recompil with you re patch and see

   Thank s for you re great job !!!!!!!!!!!!!!!!!!

Best regards
Title: Re: Building a kernel 3.12-rc2 for the imx23-olinuxino
Post by: manchot50 on September 28, 2013, 07:27:27 am
OK, work on imx233 nano, i use u-boot.

But why i have 49 m of free ram, i haven't a 64 m system ?  is for all kernel....  where is my RAM ?

A+
Title: Re: Building a kernel 3.12-rc2 for the imx23-olinuxino
Post by: Evgeny Boger on September 28, 2013, 03:13:17 pm
Hello, Fadil,

Did you try to use rtl8188cu patch with 3.12?
Title: Re: Building a kernel 3.12-rc2 for the imx23-olinuxino
Post by: Christian Jann on September 28, 2013, 03:36:05 pm
I have also the feeling that USB is broken in 3.12-rc2 but works in 3.12-rc1. At least none of my USB WiFi adapters works in 3.12-rc2 but they are working in 3.12-rc1.

Quote from: Evgeny Boger on September 28, 2013, 03:13:17 pm

Did you try to use rtl8188cu patch with 3.12?

Why not use the driver that comes with 3.12:

Device Drivers  --->
      [*] Network device support  --->
        [*]   Wireless LAN  --->
          <*>   Realtek rtlwifi family of devices (NEW)  --->
              --- Realtek rtlwifi family of devices
              <*>   Realtek RTL8192CU/RTL8188CU USB Wireless Network Adapter
              [ ]   Debugging output for rtlwifi driver family


And i2c seems to be broken too:

Device Drivers  --->
    <*> I2C support  --->
      --- I2C support
      <*>   I2C device interface
            I2C Hardware Bus support  --->
              *** I2C system bus drivers (mostly embedded / system-on-chip) ***
              <*> GPIO-based bitbanging I2C
              <*> Freescale i.MX28 I2C interface
      [*]   I2C Core debugging messages
      [*]   I2C Algorithm debugging messages
      [*]   I2C Bus debugging messages



[root@olinuxino ~]# ./i2c-tool -w 0 0x48 4 0x02 0xA0 0x40 0x03
SLAVE ADDRESS: 0x48
NUMBER OF BYTES TO WRITE: 4
MEMORY ALLOCATED AT ADDRESS: 0x718008
/dev/i2c-0 OPENDED!
Failed writing to the I2C-bus: Connection timed out
[root@olinuxino ~]# ./i2c-tool -w 0 0x48 4 0x02 0xA0 0x40 0x03
SLAVE ADDRESS: 0x48
NUMBER OF BYTES TO WRITE: 4
MEMORY ALLOCATED AT ADDR[ 3869.780000] mxs-i2c 80058000.i2c: Failed to get PIO reg. write descriptor.
ESS: 0x1813008
/dev/i2c-0 OPENDED!
Failed writing to the I2C-bus: Invalid argument
[root@olinuxino ~]# echo "test" > /dev/i2c-0
[ 1886.780000] mxs-i2c 80058000.i2c: Failed to get PIO reg. write descriptor.
-bash: echo: write error: Invalid argument
[root@olinuxino ~]# echo "test" > /dev/i2c-0
-bash: echo: write error: Connection timed out
[root@olinuxino ~]# echo "test" > /dev/i2c-0
[ 2124.730000] mxs-i2c 80058000.i2c: Failed to get PIO reg. write descriptor.
-bash: echo: write error: Invalid argument
[root@olinuxino ~]# echo "test" > /dev/i2c-0
-bash: echo: write error: Connection timed out
[root@olinuxino ~]# echo "test" > /dev/i2c-0
[ 2130.920000] mxs-i2c 80058000.i2c: Failed to get PIO reg. write descriptor.
-bash: echo: write error: Invalid argument
[root@olinuxino ~]# echo "test" > /dev/i2c-0
-bash: echo: write error: Connection timed out
[root@olinuxino ~]# i2cdetect 0
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-0.
I will probe address range 0x03-0x77.
Continue? [Y/n] y
    0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: [ 2255.550000] mxs-i2c 80058000.i2c: Failed to get PIO reg. write descriptor.
-- -- [ 2256.580000] mxs-i2c 80058000.i2c: Failed to get PIO reg. write descriptor.
-- -- [ 2257.580000] mxs-i2c 80058000.i2c: Failed to get PIO reg. write descriptor.
-- -- [ 2258.580000] mxs-i2c 80058000.i2c: Failed to get PIO reg. write descriptor.
-- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: [ 2259.610000] mxs-i2c 80058000.i2c: Failed to get PIO reg. write descriptor.
-- -- [ 2260.640000] mxs-i2c 80058000.i2c: Failed to get PIO reg. write descriptor.
-- -- [ 2261.640000] mxs-i2c 80058000.i2c: Failed to get PIO reg. write descriptor.
-- -- [ 2262.640000] mxs-i2c 80058000.i2c: Failed to get PIO reg. write descriptor.
-- -- [ 2263.640000] mxs-i2c 80058000.i2c: Failed to get PIO reg. write descriptor.
-- -- [ 2264.640000] mxs-i2c 80058000.i2c: Failed to get PIO reg. write descriptor.
-- -- [ 2265.640000] mxs-i2c 80058000.i2c: Failed to get PIO reg. write descriptor.
-- -- [ 2266.640000] mxs-i2c 80058000.i2c: Failed to get PIO reg. write descriptor.
-- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --                         
[root@olinuxino ~]#
Title: Re: Building a kernel 3.12-rc2 for the imx23-olinuxino
Post by: Evgeny Boger on September 28, 2013, 04:03:10 pm
Quote from: Christian Jann on September 28, 2013, 03:36:05 pm
Why not use the driver that comes with 3.12:


This one doesn't work well with rtl8188CUS chip, at least in kernel 3.11.
Title: Re: Building a kernel 3.12-rc2 for the imx23-olinuxino
Post by: Fadil Berisha on September 28, 2013, 06:38:40 pm
Quote from: Evgeny Boger on September 28, 2013, 03:13:17 pm
Did you try to use rtl8188cu patch with 3.12?

Evgeny,

I did patch for rtl8188cu for build 3.7.1 and worked well. That patch was directly from RTL web site and I did only work needed to be incorporated on new kernel. Later I read somewhere that build in driver work well and I didn't push further that variant.

Quote
I have also the feeling that USB is broken in 3.12-rc2 but works in 3.12-rc1.

Christian,
I see at https://www.kernel.org/diff/diffview.cgi?file=/pub/linux/kernel/v3.x/testing/patch-3.12-rc2.xz  some minor changes on mxs USB driver ( /drivers/usb/phy/phy-mxs-usb.c) but I don't consider those changes to be source of problem.

About i2c. My patch adding i2c support on imx23-olinuxino board and doesn't affect work of i2c driver. There are 3 new patches from Marek Vasut for i2c (distinguish imx23/28 and PIO rework). I didn't incorporate them here because they are still  on i2c mail list waiting for some rework. As soon they get on linux-next, I will incorporate them on build for 3.12-rc2.

About rtl8188cu. My feeling is build in driver is source of problem. Because of that suggested to Olimex to "check any "nonworking" board with kernel 3.7.1 and compare result with 3.11.x / 3.12.x."
If that work on 3.7.1, I am willing to bring again driver from RTL's website  on new build 3.12-rc2

Fadil Berisha
 
Title: Re: Building a kernel 3.12-rc2 for the imx23-olinuxino
Post by: Christian Jann on September 28, 2013, 08:44:26 pm
Hi Fadil, do you mean http://www.spinics.net/lists/linux-i2c/msg12844.html:
[PATCH RESEND 1/3] i2c: mxs: distinguish i.MX23 and i.MX28 based I2C controller
[PATCH V2 2/3] i2c: mxs: Rework the PIO mode operation
[PATCH RESEND 3/3] i2c: mxs: Fix PIO mode on i.MX23

I was hoping that i2c would finally work out of the box. I can see that MXS_I2C_V1, MXS_I2C_V2 gets added there to distinguish between i.MX23 and i.MX28. This looks similar to a older patch from Nii https://www.olimex.com/forum/index.php?topic=283.msg2872#msg2872. Hopefully this solves all the i2c problems. I will try to add it line by line.

And sorry I've compiled 3.12-rc2 again and USB is working, can't reproduce my problem, I must have done a stupid mistake somewhere.

Title: Re: Building a kernel 3.12-rc2 for the imx23-olinuxino
Post by: Fadil Berisha on September 28, 2013, 09:49:01 pm
Hi Christian,

Yes, I had in mind those patches. Nii did great job at that time but looks hi didn't push on i2c list. Please come back with results if you get together those patches.

Regards

Fadil Berisha
Title: Re: Building a kernel 3.12-rc2 for the imx23-olinuxino
Post by: Evgeny Boger on September 29, 2013, 06:38:43 pm
Quote from: Fadil Berisha on September 28, 2013, 06:38:40 pm
I did patch for rtl8188cu for build 3.7.1 and worked well. That patch was directly from RTL web site and I did only work needed to be incorporated on new kernel. Later I read somewhere that build in driver work well and I didn't push further that variant.



Sorry for misinform you. I've just checked the rtlwifi driver, it actually works with 3.12-rc2.
It works only with antenna though, that's why I initially thought it doesn't.
rtl8188cu driver allow me to connect to the network even without antenna.

I've seen somewhere on the internet the statement that rtl8188cu performs better than rtlwifi in terms of signal power or so. I'm not sure whether it's true or not since working without antenna at all is somewhat unusual scenario.


Title: Re: Building a kernel 3.12-rc2 for the imx23-olinuxino
Post by: TrevorPage on September 29, 2013, 07:30:01 pm
Thanks for this work.

I just followed your excellent blog closely, and on trying to boot the SD card on my Olinuxino, I get the following sequence:


LLLLLLLFCLJ[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 3.12.0-rc2 (trevor@trevor-N56VZ) (gcc version 4.7.3 (Ub
untu/Linaro 4.7.3-1ubuntu1) ) #1 Sun Sep 29 16:57:03 BST 2013
[    0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine: Freescale MXS (Device Tree), model: i.MX23 Olinuxino Low Cos
t Board
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages:
16256
[    0.000000] Kernel command line: noinitrd console=ttyAMA0,115200 root=/dev/mmcblk
0p2 rw rootwait ssp1=mmc
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Memory: 52484K/65536K available (4610K kernel code, 286K rwdata, 1768
K rodata, 222K init, 5487K bss, 13052K reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xc4800000 - 0xff000000   ( 936 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0642eb8   (6380 kB)
[    0.000000]       .init : 0xc0643000 - 0xc067ab44   ( 223 kB)
[    0.000000]       .data : 0xc067c000 - 0xc06c3bd0   ( 287 kB)
[    0.000000]        .bss : 0xc06c3bd0 - 0xc0c1fa20   (5488 kB)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] of_irq_init: children remain, but no parents
[    0.000000] sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 42
94967286ms
[    0.000000] Console: colour dummy device 80x30
[    0.000000] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Mol
nar
[    0.000000] ... MAX_LOCKDEP_SUBCLASSES:  8
[    0.000000] ... MAX_LOCK_DEPTH:          48
[    0.000000] ... MAX_LOCKDEP_KEYS:        8191
[    0.000000] ... CLASSHASH_SIZE:          4096
[    0.000000] ... MAX_LOCKDEP_ENTRIES:     16384
[    0.000000] ... MAX_LOCKDEP_CHAINS:      32768
[    0.000000] ... CHAINHASH_SIZE:          16384
[    0.000000]  memory used by lock dependency info: 3695 kB
[    0.000000]  per task-struct memory footprint: 1152 bytes
[    0.060000] Calibrating delay loop... 227.32 BogoMIPS (lpj=1136640)
[    0.070000] pid_max: default: 32768 minimum: 301
[    0.070000] Mount-cache hash table entries: 512
[    0.080000] CPU: Testing write buffer coherency: ok
[    0.080000] Setting up static identity map for 0xc0461158 - 0xc04611b0
[    0.100000] devtmpfs: initialized
[    0.110000] pinctrl core: initialized pinctrl subsystem
[    0.110000] regulator-dummy: no parameters
[    0.120000] NET: Registered protocol family 16
[    0.120000] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.180000] Serial: AMBA PL011 UART driver
[    0.180000] 80070000.serial: ttyAMA0 at MMIO 0x80070000 (irq = 17, base_baud = 0)
is a PL011 rev2
[    0.370000] console [ttyAMA0] enabled
[    0.410000] bio: create slab <bio-0> at 0
[    0.420000] mxs-dma 80004000.dma-apbh: initialized
[    0.430000] mxs-dma 80024000.dma-apbx: initialized
[    0.440000] usb0_vbus: 5000 mV
[    0.440000] SCSI subsystem initialized
[    0.450000] usbcore: registered new interface driver usbfs
[    0.450000] usbcore: registered new interface driver hub
[    0.460000] usbcore: registered new device driver usb
[    0.470000] pps_core: LinuxPPS API ver. 1 registered
[    0.470000] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti
<giometti@linux.it>
[    0.480000] PTP clock support registered
[    0.480000] Advanced Linux Sound Architecture Driver Initialized.
[    0.490000] Switched to clocksource mxs_timer
[    0.790000] NET: Registered protocol family 2
[    0.800000] TCP established hash table entries: 512 (order: 0, 4096 bytes)
[    0.810000] TCP bind hash table entries: 512 (order: 2, 18432 bytes)
[    0.820000] TCP: Hash tables configured (established 512 bind 512)
[    0.830000] TCP: reno registered
[    0.830000] UDP hash table entries: 256 (order: 2, 20480 bytes)
[    0.840000] UDP-Lite hash table entries: 256 (order: 2, 20480 bytes)
[    0.850000] NET: Registered protocol family 1
[    0.850000] RPC: Registered named UNIX socket transport module.
[    0.860000] RPC: Registered udp transport module.
[    0.870000] RPC: Registered tcp transport module.
[    0.870000] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.880000] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.960000] NFS: Registering the id_resolver key type
[    0.970000] Key type id_resolver registered
[    0.970000] Key type id_legacy registered
[    0.980000] jffs2: version 2.2. (NAND) �© 2001-2006 Red Hat, Inc.
[    0.990000] msgmni has been set to 102
[    1.010000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    1.020000] io scheduler noop registered (default)
[    1.030000] of_dma_request_slave_channel: dma-names property of node '/apb@800000
00/apbx@80040000/serial@80070000' missing or empty
[    1.040000] uart-pl011 80070000.serial: no DMA platform data
[    1.050000] 8006c000.serial: ttyAPP0 at MMIO 0x8006c000 (irq = 145, base_baud = 1
500000) is a 8006c000.serial
[    1.060000] mxs-auart 8006c000.serial: Found APPUART 3.0.0
[    1.090000] usbcore: registered new interface driver asix
[    1.090000] usbcore: registered new interface driver ax88179_178a
[    1.100000] usbcore: registered new interface driver cdc_ether
[    1.100000] usbcore: registered new interface driver r815x
[    1.110000] usbcore: registered new interface driver smsc95xx
[    1.120000] usbcore: registered new interface driver net1080
[    1.120000] usbcore: registered new interface driver cdc_subset
[    1.130000] usbcore: registered new interface driver zaurus
[    1.140000] usbcore: registered new interface driver cdc_ncm
[    1.140000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.150000] usbcore: registered new interface driver usb-storage
[    1.160000] ci_hdrc ci_hdrc.0: doesn't support gadget
[    1.170000] ci_hdrc ci_hdrc.0: EHCI Host Controller
[    1.170000] ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 1
[    1.200000] ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00
[    1.210000] hub 1-0:1.0: USB hub found
[    1.220000] hub 1-0:1.0: 1 port detected
[    1.230000] mousedev: PS/2 mouse device common for all mice
[    1.240000] stmp3xxx-rtc 8005c000.rtc: rtc core: registered 8005c000.rtc as rtc0
[    1.250000] i2c /dev entries driver
[    1.270000] stmp3xxx_rtc_wdt stmp3xxx_rtc_wdt: initialized watchdog with heartbea
t 19s
[    1.320000] mxs-mmc 80010000.ssp: initialized
[    1.340000] usbcore: registered new interface driver usbhid
[    1.340000] usbhid: USB HID core driver
[    1.350000] mxs-lradc 80050000.lradc: Touchscreen not enabled.
[    1.390000] mxs-builtin-audio mxs-builtin-audio.6:  mxs-builtin-codec-dai <-> 800
48000.mxs-builtin-cpu-dai mapping ok
[    1.420000] TCP: cubic registered
[    1.430000] NET: Registered protocol family 17
[    1.440000] Key type dns_resolver registered
[    1.450000] registered taskstats version 1
[    1.460000] mmc0: host does not support reading read-only switch. assuming write-
enable.
[    1.470000] mmc0: new high speed SDHC card at address e624
[    1.480000] stmp3xxx-rtc 8005c000.rtc: setting system clock to 1970-01-01 00:07:0
3 UTC (423)
[    1.490000] mmcblk0: mmc0:e624 SU08G 7.40 GiB
[    1.520000]  mmcblk0: p1 p2 p3
[    1.540000] ALSA device list:
[    1.550000]   #0: mxs-builtin-audio
[    1.550000] usb 1-1: new high-speed USB device number 2 using ci_hdrc
�[    1.690000] kjournald starting.  Commit interval 5 seconds
[    1.700000] EXT3-fs (mmcblk0p2): using internal journal
[    1.710000] EXT3-fs (mmcblk0p2): recovery complete
[    1.710000] EXT3-fs (mmcblk0p2): mounted filesystem with ordered data mode
[    1.720000] VFS: Mounted root (ext3 filesystem) on device 179:2.
[    1.740000] hub 1-1:1.0: USB hub found
[    1.740000] hub 1-1:1.0: 3 ports detected
[    1.750000] devtmpfs: mounted
[    1.750000] Freeing unused kernel memory: 220K (c0643000 - c067a000)
[    2.040000] usb 1-1.1: new high-speed USB device number 3 using ci_hdrc
[    2.170000] smsc95xx v1.0.4
[    2.320000] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-ci_hdrc.0-1.1, sm
sc95xx USB 2.0 Ethernet, fa:f5:2c:a6:12:06
�[    2.360000] systemd[1]: Failed to enumerate cgroup controllers: No such file or
directory
[    2.370000] systemd[1]: systemd 207 running in system mode. (+PAM -LIBWRAP -AUDIT
-SELINUX -IMA -SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ)

Welcome to Arch Linux ARM!

[    2.440000] systemd[1]: Failed to insert module 'autofs4'
[    2.440000] systemd[1]: Failed to insert module 'ipv6'
[    2.450000] systemd[1]: Set hostname to <alarm>.
[    2.480000] systemd[1]: CONFIG_CGROUPS was not set when your kernel was compiled.
Systems without control groups are not supported. We will now sleep for 10s, and th
en continue boot-up. Expect breakage and please do not file bugs. Instead fix your k
ernel and enable CONFIG_CGROUPS. Consult http://0pointer.de/blog/projects/cgroups-vs
-cgroups.html for more information.
[   12.530000] systemd[1]: No control group support available, not creating root gro
up.
[   12.740000] systemd-gpt-auto-generator[41]: Failed to verify GPT partition /dev/b
lock/179:2: No such file or directory
[   12.770000] systemd[1]: /usr/lib/systemd/system-generators/systemd-gpt-auto-gener
ator exited with exit status 1.
[   13.270000] systemd[1]: Cannot add dependency job for unit display-manager.servic
e, ignoring: Unit display-manager.service failed to load: No such file or directory.
See system logs and 'systemctl status display-manager.service' for details.
[   13.300000] systemd[1]: Starting Forward Password Requests to Wall Directory Watc
h.
[   13.310000] systemd[1]: Started Forward Password Requests to Wall Directory Watch
.
[   13.320000] systemd[1]: Expecting device dev-ttyAMA0.device...
�         Expecting device dev-ttyAMA0.device...
[   13.350000] systemd[1]: Starting Remote File Systems.
�[  OK  ] Reached target Remote File Systems.
[   13.380000] systemd[1]: Reached target Remote File Systems.
[   13.380000] systemd[1]: Expecting device sys-subsystem-net-devices-eth0.device...
�         Expecting device sys-subsystem-net-devices-eth0.device...
[   13.420000] systemd[1]: Starting LVM2 metadata daemon socket.
�[  OK  ] Listening on LVM2 metadata daemon socket.
[   13.450000] systemd[1]: Listening on LVM2 metadata daemon socket.
[   13.450000] systemd[1]: Starting Delayed Shutdown Socket.
�[  OK  ] Listening on Delayed Shutdown Socket.
[   13.480000] systemd[1]: Listening on Delayed Shutdown Socket.
[   13.480000] systemd[1]: Starting Device-mapper event daemon FIFOs.
�[  OK  ] Listening on Device-mapper event daemon FIFOs.
[   13.520000] systemd[1]: Listening on Device-mapper event daemon FIFOs.
[   13.520000] systemd[1]: Starting /dev/initctl Compatibility Named Pipe.
�[  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
[   13.560000] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
[   13.560000] systemd[1]: Starting udev Kernel Socket.
�[  OK  ] Listening on udev Kernel Socket.
[   13.600000] systemd[1]: Listening on udev Kernel Socket.
[   13.600000] systemd[1]: Starting udev Control Socket.
�[  OK  ] Listening on udev Control Socket.
[   13.630000] systemd[1]: Listening on udev Control Socket.
[   13.630000] systemd[1]: Starting Dispatch Password Requests to Console Directory
Watch.
[   13.640000] systemd[1]: Started Dispatch Password Requests to Console Directory W
atch.
[   13.650000] systemd[1]: Starting Paths.
�[  OK  ] Reached target Paths.
[   13.680000] systemd[1]: Reached target Paths.
[   13.680000] systemd[1]: Starting Journal Socket.
�[  OK  ] Listening on Journal Socket.
[   13.710000] systemd[1]: Listening on Journal Socket.
[   13.710000] systemd[1]: Starting udev Coldplug all Devices...
�         Starting udev Coldplug all Devices...
[   13.890000] systemd[1]: Caught <SEGV>, dumped core as pid 45.
[   13.900000] systemd[1]: Freezing execution.



Any ideas please?
Title: Re: Building a kernel 3.12-rc2 for the imx23-olinuxino
Post by: TrevorPage on September 29, 2013, 10:42:53 pm
Okay, actually I now just got it to boot successfully by checking over the config and enabling Control Group support.

I'm extremely grateful once again, because I now seem to have an audio driver that behaves far better than in the kernel I tried that's discussed here: https://www.olimex.com/forum/index.php?topic=704.0 (https://www.olimex.com/forum/index.php?topic=704.0).
Title: Re: Building a kernel 3.12-rc2 for the imx23-olinuxino
Post by: Christian Jann on October 04, 2013, 11:54:18 am

OK, now I've found the time to try these i2c patches:

- [PATCH 1/3 V2] i2c: mxs: distinguish i.MX23 and i.MX28 based I2C controller http://www.spinics.net/lists/linux-i2c/msg13406.html, http://marc.info/?l=linux-i2c&m=138049705921935&q=raw
- [PATCH 2/3 V4] i2c: mxs: Rework the PIO mode operation http://www.spinics.net/lists/linux-i2c/msg13481.html, http://marc.info/?l=linux-arm-kernel&m=138106100311582&w=2

The kernel (sd_mmc_bootstream.raw etc.) and all patches are avaible here: http://sourceforge.net/projects/janncc/files/olinuxino/kernel/3.12-rc3/


curl -L http://sourceforge.net/projects/janncc/files/olinuxino/kernel/3.12-rc3/0001-ARM-imx23-olinuxino-Add-i2c-support.patch/download -o 0001-ARM-imx23-olinuxino-Add-i2c-support.patch
curl -L http://sourceforge.net/projects/janncc/files/olinuxino/kernel/3.12-rc3/0002-i2c-mxs-distinguish-i.MX23-and-i.MX28-based-I2C-controller.patch/download -o 0002-i2c-mxs-distinguish-i.MX23-and-i.MX28-based-I2C-controller.patch
curl -L http://sourceforge.net/projects/janncc/files/olinuxino/kernel/3.12-rc3/0003-i2c-mxs-Rework-the-PIO-mode-operation.patch/download -o 0003-i2c-mxs-Rework-the-PIO-mode-operation.patch
curl -L http://sourceforge.net/projects/janncc/files/olinuxino/kernel/3.12-rc3/0004-ARM-imx23-olinuxino-Set-compatibily-for-i2c0-to-imx2.patch/download -o 0004-ARM-imx23-olinuxino-Set-compatibily-for-i2c0-to-imx2.patch
patch -p1 < 0001-ARM-imx23-olinuxino-Add-i2c-support.patch
patch -p1 < 0002-i2c-mxs-distinguish-i.MX23-and-i.MX28-based-I2C-controller.patch
patch -p1 < 0003-i2c-mxs-Rework-the-PIO-mode-operation.patch
patch -p1 < 0004-ARM-imx23-olinuxino-Set-compatibily-for-i2c0-to-imx2.patch
curl -L http://sourceforge.net/projects/janncc/files/olinuxino/kernel/3.12-rc3/dotconfig/download -o .config


Now I get the following errors:


[root@olinuxino ~]# i2cdetect 0
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-0.
I will probe address range 0x03-0x77.
Continue? [Y/n] y
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- [  154.710000] mxs-i2c 80058000.i2c: Failed to get PIO reg. write descriptor.
-- -- [  155.710000] mxs-i2c 80058000.i2c: Failed to get PIO reg. write descriptor.
-- -- [  156.710000] mxs-i2c 80058000.i2c: Failed to get PIO reg. write descriptor.
-- -- [  157.710000] mxs-i2c 80058000.i2c: Failed to get PIO reg. write descriptor.
-- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- [  158.760000] mxs-i2c 80058000.i2c: Failed to get PIO reg. write descriptor.
-- -- [  159.760000] mxs-i2c 80058000.i2c: Failed to get PIO reg. write descriptor.
-- -- [  160.760000] mxs-i2c 80058000.i2c: Failed to get PIO reg. write descriptor.
-- -- [  161.760000] mxs-i2c 80058000.i2c: Failed to get PIO reg. write descriptor.
-- -- [  162.760000] mxs-i2c 80058000.i2c: Failed to get PIO reg. write descriptor.
-- -- [  163.760000] mxs-i2c 80058000.i2c: Failed to get PIO reg. write descriptor.
-- -- [  164.760000] mxs-i2c 80058000.i2c: Failed to get PIO reg. write descriptor.
-- -- [  165.760000] mxs-i2c 80058000.i2c: Failed to get PIO reg. write descriptor.
--
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --                         
[root@olinuxino ~]#


The error messages are coming from the new code. But I can switch off and on the relays on the MOD-IO2:


[root@olinuxino ~]# ./i2c-tool -w 0 0x48 4 0x02 0xA0 0x40 0x03 #REL 1&2 on
SLAVE ADDRESS: 0x48
NUMBER OF BYTES TO WRITE: 4
MEMORY ALLOCATED AT ADDRESS: 0x8DC008
/dev/i2c-0 OPENDED!
WRITE:SUCCESS
[root@olinuxino ~]# ./i2c-tool -w 0 0x48 4 0x02 0xA0 0x40 0x00 #REL 1&2 off
SLAVE ADDRESS: 0x48
NUMBER OF BYTES TO WRITE: 4
MEMORY ALLOCATED AT ADDRESS: 0x18AF008
/dev/i2c-0 OPENDED!
WRITE:SUCCESS
[root@olinuxino ~]# ./i2c-tool -w 0 0x48 4 0x02 0xA0 0x40 0x01 #REL 1 on
SLAVE ADDRESS: 0x48
NUMBER OF BYTES TO WRITE: 4
MEMORY ALLOCATED AT ADDRESS: 0x1D09008
/dev/i2c-0 OPENDED!
WRITE:SUCCESS
[root@olinuxino ~]# ./i2c-tool -w 0 0x48 4 0x02 0xA0 0x40 0x02 #REL 2 on
SLAVE ADDRESS: 0x48
NUMBER OF BYTES TO WRITE: 4
MEMORY ALLOCATED AT ADDRESS: 0x46F008
/dev/i2c-0 OPENDED!
WRITE:SUCCESS
[root@olinuxino ~]#


Pictures of the wiring are available here: http://www.jann.cc/2013/05/04/imx233_olinuxino_current_state.html#i2c

Title: Re: Building a kernel 3.12-rc2 for the imx23-olinuxino
Post by: atlaware on October 22, 2013, 10:59:25 am
Quote from: TrevorPage on September 29, 2013, 10:42:53 pm
I'm extremely grateful once again, because I now seem to have an audio driver that behaves far better than in the kernel I tried that's discussed here: https://www.olimex.com/forum/index.php?topic=704.0 (https://www.olimex.com/forum/index.php?topic=704.0).


Hi! Can I ask you to upload the raw kernel 3.x with audio driver? to somehow (wetransfer o gdrive).
Good to compile, but also good to dd a raw file :)

Thank you!
Title: Re: Building a kernel 3.12-rc2 for the imx23-olinuxino
Post by: Grawp on November 08, 2013, 02:30:34 pm
Please note that https://github.com/koliqi/imx23-olinuxino contains an old audio driver containing rather serious DMA interrupts bug.
There is a newer driver at https://github.com/ITserve/imx23-audio. Btw. there are certainly still some bugs (e.g. it may not work properly when not compiled as module).
Title: Re: Building a kernel 3.12-rc2 for the imx23-olinuxino
Post by: Fadil Berisha on November 08, 2013, 04:33:09 pm
Hi Grawp,

Quote from: Grawp on November 08, 2013, 02:30:34 pm
Please note that https://github.com/koliqi/imx23-olinuxino contains an old audio driver containing rather serious DMA interrupts bug.
There is a newer driver at https://github.com/ITserve/imx23-audio. Btw. there are certainly still some bugs (e.g. it may not work properly when not compiled as module).


Thank you for pointing out problem with audio driver. I will fix that in https://github.com/koliqi/imx23-olinuxino.

If you are author of driver, would be nice if you find time to submit patches to mainline kernel. There is much wider audience and more people will help to fix problems on audio driver. Anyway, I will write this suggestion also to author on his email address supplied on patch.

Thanks again,

Fadil Berisha
Title: Re: Building a kernel 3.12-rc2 for the imx23-olinuxino
Post by: Mr.D on November 16, 2013, 10:32:01 am
And what about SPI is it working "out of box" with 3.12 ,or also need a Patch ?

Best Regards
Title: Re: Building a kernel 3.12-rc2 for the imx23-olinuxino
Post by: Fadil Berisha on November 16, 2013, 05:19:17 pm
Hi Mr.D,

Quote from: Mr.D on November 16, 2013, 10:32:01 am
And what about SPI is it working "out of box" with 3.12 ,or also need a Patch ?


SPI is working out of box. My patch for SPI is incorporated on mainline and you need only to add node for your device.
How to add node? Please check samples at my web page http://g-lab.ca/spi-serial-periferial-interface/ and http://g-lab.ca/spi-gpio-expander-with-mcp23s08/

Fadil Berisha
Title: Re: Building a kernel 3.12-rc2 for the imx23-olinuxino
Post by: Mr.D on November 16, 2013, 06:38:05 pm
Hallo Fadil ,
Thanks for help!
Best Regards


Quote from: Fadil Berisha on November 16, 2013, 05:19:17 pm
Hi Mr.D,

Quote from: Mr.D on November 16, 2013, 10:32:01 am
And what about SPI is it working "out of box" with 3.12 ,or also need a Patch ?


SPI is working out of box. My patch for SPI is incorporated on mainline and you need only to add node for your device.
How to add node? Please check samples at my web page http://g-lab.ca/spi-serial-periferial-interface/ and http://g-lab.ca/spi-gpio-expander-with-mcp23s08/

Fadil Berisha
Title: Re: Building a kernel 3.12-rc2 for the imx23-olinuxino
Post by: igg on November 18, 2013, 09:18:15 am
Quote from: Fadil Berisha on September 28, 2013, 06:38:40 pm
About rtl8188cu. My feeling is build in driver is source of problem. Because of that suggested to Olimex to "check any "nonworking" board with kernel 3.7.1 and compare result with 3.11.x / 3.12.x."
If that work on 3.7.1, I am willing to bring again driver from RTL's website  on new build 3.12-rc2

Fadil Berisha


I tried that already, and couldn't make it work.  The rtlwifi is considerably restructured in 3.10 onwards, and I'm no kernel hacker.  The furthest I got was a bunch of unresolved wireless_send_event symbols during linking, despite the fact that this function was being called from other modules apparently without issues.  The patched module (https://github.com/dz0ny/rt8192cu) I was using is based on Realtec's v4.0.2_9000, and advertised to work with 3.10 onwards, but not in my hands - at least not as a non-DKMS build.  It worked great in 3.7 once debugging and power-saving were turned off.  Without turning that off, the log was being spammed > 20 lines/second causing the whole system to be in a constant wait state, and the console unusable.

There is an open kernel bug (https://bugzilla.kernel.org/show_bug.cgi?id=60713) for the rtl8192cu driver, and more recently, a patch (https://bugzilla.kernel.org/attachment.cgi?id=113191) against 3.11, which works with 3.10.  My WiFi is an EdiMax EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS].

I'm targeting 3.10 because its supposed to have long-term support, and this is what archlinux is currently using (though not on their official olinuxino image).

To try to make life easier for people, I rolled Christian's and your I2C/SPI patches (for 3.12rc3 (http://sourceforge.net/projects/janncc/files/olinuxino/kernel/3.12-rc3/)) together with the rtl8192cu patch from the kernel wireless team, and applied them all to 3.10.19.  The patches took only some minor fiddling, so they are largely what was provided by others.

I put everything up on my under-utilized GoogleDrive (https://googledrive.com/host/0B-x3kTkP-RShc2I5ZHJITWhNMEk/), including a bootstream image (https://googledrive.com/host/0B-x3kTkP-RShc2I5ZHJITWhNMEk/kernel-images/linux-3.10.19-sd_mmc_bootstream.raw), full mmc rootfs image (https://googledrive.com/host/0B-x3kTkP-RShc2I5ZHJITWhNMEk/ArchLinuxARM-2013-11-16-olinuxino-k3.10.19-mmc.img.gz) (updated to 2013-11-16), and various kernel building inputs (https://googledrive.com/host/0B-x3kTkP-RShc2I5ZHJITWhNMEk/kernel-build) and products (https://googledrive.com/host/0B-x3kTkP-RShc2I5ZHJITWhNMEk/kernel-images).

I've subscribed to the kernel bug, and will try to keep these updated with latest developments.  Also the I2C/SPI patches.

Thanks for all of your and Christian's excellent work, BTW.

N.B.:  I don't actually have any I2C or SPI hardware to test.  It would be nice if someone tried it out and reported back.

-igg