Welcome, Guest

Author Topic: iMX233 - kernel 3.7.1 stable [unofficial]  (Read 10184 times)

micign

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
iMX233 - kernel 3.7.1 stable [unofficial]
« on: January 16, 2013, 01:33:55 PM »
Hi all,

I have Olinuxino-micro board. Some time ago I noticed that some people would like to use 3.x kernel with their boards. Following great tutorials wrote by koliqi and Christian Jann I created tarball containing kernel 3.7.1 + patches from koliqi (SPI,I2C,rtl8192cu) available here:
Some notes about it:
  • After applying patch enabling rtl8192cu I modified Makefile for this piece of code to disable wifi power management
  • I use it with Archlinux and systemd - kernel commandline includes init=/usr/lib/systemd/systemd
  • It has framebuffer disabled
  • Here is its config: http://public.eegg.pl/iMX233-kernel-3.7.1-config

I hope this might be worth to share my work, though this kernel is pretty customized.

To compile this kernel I use my regular Arch PC witch cross compiler installed and simple script to automate build process.
I'll do my best to provide some instructions for anyone interested in making his own bundle (but probably not until weekend).

If anyone is interested i could also share up-to-date Archlinux image for Micro which includes this kernel, systemd and some effort to put all of it together ;)

Warm greetings from snowy Gdansk to the Olimex team - keep on doing this great job!

Referenced tutorials:

Dragomir

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
Re: iMX233 - kernel 3.7.1 stable [unofficial]
« Reply #1 on: January 16, 2013, 01:46:23 PM »
Hello micign,
How can I try this kernel with, the latest SD image released from archlinuxarm.org for OLinuxino MAXI?
I am in a desperate need for PPP* kernel modules.

micign

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: iMX233 - kernel 3.7.1 stable [unofficial]
« Reply #2 on: January 16, 2013, 02:12:58 PM »
Hi Dragomir,

As far as I know this image includes systemd and kernel config is not tight attached to the board variant (micro/maxi)

Extract the tarball to the root (/) directory of your sd card. It contains 2 directories - /boot/ and /usr/lib/modules/3.7.1

In usr there are modules and in boot there is kernel file itself, named sd_mmc_bootstream.raw. You should manually write this file into 1st partition of your sd card, using command like: (assuming extracted kernel is in /boot and mmcblk0 is your sd card):

Code: [Select]
dd if=/boot/sd_mmc_bootstream.raw of=/dev/mmcblk0p1

Unfortunately, my build doesn't contain PPP kernel modules (am I guessing right you want to use 3G USB modem?)

As I wrote before, I'll post instructions how I create such bundle, so you could customize the kernel (enable PPP end desired drivers).

Good luck,
micign

Dragomir

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
Re: iMX233 - kernel 3.7.1 stable [unofficial]
« Reply #3 on: January 16, 2013, 02:43:51 PM »
It is not USB, but one connected to UEXT serial port. It doesn't matter though.
I am waiting for your instructions. In the meantime I will try, to install your kernel to this SD image, and will post here the results. Are the kernel parameters the same as original kernel?

Thank you very much, and best regards,
Dragomir

micign

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: iMX233 - kernel 3.7.1 stable [unofficial]
« Reply #4 on: January 16, 2013, 02:49:26 PM »
kernel parameters in cmdline are the same except of appended init=/usr/lib/systemd/systemd

EDIT: You can see exact commandline in config from the first post in this topic
« Last Edit: January 16, 2013, 02:54:20 PM by micign »

Fadil Berisha

  • Full Member
  • ***
  • Posts: 124
  • Karma: +7/-0
Re: iMX233 - kernel 3.7.1 stable [unofficial]
« Reply #5 on: January 16, 2013, 04:11:22 PM »
After applying patch enabling rtl8192cu I modified Makefile for this piece of code to disable wifi power management
Well done. Can you share your Makefile patch. I will incorporate on rtl8192cu driver at  https://github.com/koliqi/imx23-olinuxino.

Fadil Berisha

micign

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: iMX233 - kernel 3.7.1 stable [unofficial]
« Reply #6 on: January 16, 2013, 07:47:58 PM »
Thanks for a good word :)

I modifed patch available under git repo https://github.com/koliqi/imx23-olinuxino. This "patched patch" is availabe at http://public.eegg.pl/0001-rtl8192cu-no-powersave.patch.xz

The difference between two patches (original from koliqi and the one from me) lies in change of only one line, that is line 429:
from
Code: [Select]
CONFIG_POWER_SAVING = yto
Code: [Select]
CONFIG_POWER_SAVING = n
so it's not a big deal.

In fact, I've combined all three patches (for i2c,spi and mine version for rtl8192cu) into one big patch which, so when building kernel I need to apply only one to stock kernel source from kernel.org. Here it is for reference: http://public.eegg.pl/i2c_spi_rtl8192cu-nopowersave-combined.patch.xz

BTW: How could I request permission to attach files to posts? Or am I just too newbie/untrusted to do so?

Dragomir

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
Re: iMX233 - kernel 3.7.1 stable [unofficial]
« Reply #7 on: January 17, 2013, 03:38:08 PM »
Hi Dragomir,

As far as I know this image includes systemd and kernel config is not tight attached to the board variant (micro/maxi)

Extract the tarball to the root (/) directory of your sd card. It contains 2 directories - /boot/ and /usr/lib/modules/3.7.1

In usr there are modules and in boot there is kernel file itself, named sd_mmc_bootstream.raw. You should manually write this file into 1st partition of your sd card, using command like: (assuming extracted kernel is in /boot and mmcblk0 is your sd card):

Code: [Select]
dd if=/boot/sd_mmc_bootstream.raw of=/dev/mmcblk0p1

Unfortunately, my build doesn't contain PPP kernel modules (am I guessing right you want to use 3G USB modem?)

As I wrote before, I'll post instructions how I create such bundle, so you could customize the kernel (enable PPP end desired drivers).

Good luck,
micign

I did it as described, but the board didn't boot. The attached serial debug console repeats just every 30 secs:
0x80502008
          0x8020a01d


LubOlimex

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1984
  • Karma: +50/-3
Re: iMX233 - kernel 3.7.1 stable [unofficial]
« Reply #8 on: February 18, 2013, 01:29:24 PM »
Hey Dragomir,

Quote
I did it as described, but the board didn't boot. The attached serial debug console repeats just every 30 secs:
0x80502008
          0x8020a01d

This is a general SD card error. It is a message that shows when there is no SD card at all. However, the error might indicate a problem with the connections between the controller and the SD card connector; the SD card connector itself; or the memory. Now, since we test the boards before shipping I tend to think it is an SD card fault but anything is possible (cold solder joints – for example).

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex

r3flow

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
Re: iMX233 - kernel 3.7.1 stable [unofficial]
« Reply #9 on: February 25, 2013, 09:02:38 PM »
Any chance the framebuffer support with kernel 3.x in the near future?

picmaster

  • Newbie
  • *
  • Posts: 16
  • Karma: +1/-0
Re: iMX233 - kernel 3.7.1 stable [unofficial]
« Reply #10 on: February 25, 2013, 09:55:41 PM »
Any chance the framebuffer support with kernel 3.x in the near future?
Do you mean framebuffer support for console or framebuffer for X11?

picmaster

  • Newbie
  • *
  • Posts: 16
  • Karma: +1/-0
Re: iMX233 - kernel 3.7.1 stable [unofficial]
« Reply #11 on: February 25, 2013, 10:02:26 PM »
Gents,

I would like to share that I was able to build upstream kernel 3.7.9 without any patches for i.MX233 (in my case - Olinuxino Maxi). Here's an example of the boot log:

HTLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLFC
PowerPrep start initialize power...
Battery Voltage = 0.59V
No battery or bad battery                                       detected!!!.Disabling battery                                   voltage measurements./r/nLLCFeb 23 201316:07:49
EMI_CTRL 0x1C084040
FRAC 0x92926192
init_ddr_mt46v32m16_133Mhz
power 0x00820710
Frac 0x92926192
start change cpu freq
hbus 0x00000003
cpu 0x00010001
LLLLLLLFCLJUncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0
[    0.000000] Linux version 3.7.9 (picmaster@arm-build) (gcc version 4.7.2 (GCC) ) #2 Sat Feb 23 09:58:51 EET 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 i.MX23 (Device Tree), model: i.MX23 Olinuxino Low Cost 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/mmcblk0p2 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: 64MB = 64MB total
[    0.000000] Memory: 55248k/55248k available, 10288k reserved, 0K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xc4800000 - 0xff000000   ( 936 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
[    0.000000]       .text : 0xc0008000 - 0xc03c9a34   (3847 kB)
[    0.000000]       .init : 0xc03ca000 - 0xc03eb08c   ( 133 kB)
[    0.000000]       .data : 0xc03ec000 - 0xc041f010   ( 205 kB)
[    0.000000]        .bss : 0xc041f034 - 0xc096cfc4   (5432 kB)
...


I was not able to test all peripherals, mostly the things I was interested in - ethernet is working stable now (without the usual oops), second UART (AUART) works also fine up to 230400kbit/s, haven't tested higher speeds.

I hope this will motivate more people to experiment and build their own kernels.

Regards.

P.S.: If you feel that this post doesn't belong to the topic, I can move it around.

Fadil Berisha

  • Full Member
  • ***
  • Posts: 124
  • Karma: +7/-0
Re: iMX233 - kernel 3.7.1 stable [unofficial]
« Reply #12 on: February 25, 2013, 10:03:57 PM »
Kernel 3.x has support for iMX23 framebuffer but need to be completed imx23-olinuxino board file. Framebuffer driver need data from file mxs-mach.c, so this file need also to be completed for imx23-olinuxino board. You can adapt those files based on examples for other imx23 and imx28 boards.   

Fadil Berisha


guanx

  • Newbie
  • *
  • Posts: 35
  • Karma: +0/-0
Re: iMX233 - kernel 3.7.1 stable [unofficial]
« Reply #13 on: February 26, 2013, 06:39:06 PM »
I am interested in some things that are still unsupported currently by the official Linux 3.x kernel: watchdog, battery, and sound.

Looks like some of the drivers are already there.

Fabio Estevam

  • Newbie
  • *
  • Posts: 31
  • Karma: +0/-0
Re: iMX233 - kernel 3.7.1 stable [unofficial]
« Reply #14 on: March 01, 2013, 02:52:37 PM »
Watchdog is already supported. You just need to enable its defconfig option.

Please check this patch I just sent:
http://marc.info/?l=linux-arm-kernel&m=136214180630539&w=2

Battery and sound support drivers are still missing. We are looking for volunteers ;-)