Xenomai for A13 - A10

Started by crubille, February 04, 2013, 10:55:17 PM

Previous topic - Next topic

JohnS

jwischka's kernels are not for the micro

John


uMinded

Quote from: JohnS on February 24, 2013, 10:39:22 PM
jwischka's kernels are not for the micro

John

They do boot without issues, their is just a serious lack of memory left over and the mali reserved block is wrong.

I found the fex documentation, that wiki is horribly laid out and is missing quite a few links. If you google

site:http://linux-sunxi.org/ SEARCH_STRING

Thats the only way I find anything...

I am working on making a useful userspace without all the "reeds to be root" errors during boot currently.

JohnS

#92
Actually they do NOT boot without issues on a micro.

E.g. you may only get about 38% the CPU speed you would hope for.  And USB is wrong.  Etc.

I think it'll be a wrong version of U-boot, too.

John

Tele

Quote from: JohnS on February 24, 2013, 11:11:58 PM
Actually they do NOT boot without issues on a micro.

E.g. you may only get about 38% the CPU speed you would hope for.  And USB is wrong.  Etc.

I think it'll be a wrong version of U-boot, too.

John

Fine. And why dont they talk about this on the olimex github? Can you see any useful info in the README of that script.bin ?
"Script.bin - Kernel parameters which are loaded at boot time"
Wow. For what card ? What kind of configuration ?

It must be uMinded's fault anyway.
uMinded, its your fault!

JohnS

You lost me.  I posted about jwischka's kernels.  Why do you ask about github?  His kernels aren't there are they?

AFAIK he doesn't work for or represent Olimex.

BTW, there are other threads about the Micro's differences, and of course they are on the schematic, so I am puzzled why anyone would assume a non-Micro kernel (or uboot, for that matter) is OK on a Micro.

John

Tele

Quote from: JohnS on February 25, 2013, 12:39:53 AM
AFAIK he doesn't work for or represent Olimex.

Do you work for Olimex?
Will there be some better documented script.bin for all cards?? That was his problem.

You lost me too.
You do take notice of uMinded's fault, but you dont take notice of inadequate infos and softwares on Olimex's github. Although it wouldnt be long to fix them.


uMinded

Over the last few days and the severa wiki/github pages I have viewed the common thread is "horribly out of date" or "we speakie grood engrish"

I recommend we talk Olimex into starting a PROPER wiki for their products. Their current wiki for the micro is a single post for the first ever debian boot image! If it was a proper wiki app at wiki.olimex.com then we could group keep it up to date and solve these simple issues like a repository being renamed but nobody telling anybody else.

For example HERE are the proper FEX files for our boards. Now how in the heck as I suppose to fuss out the VGA logic? I knew it was being derived from the LCD but not the specific settings.

For the time being I am going to start a Google Code page as I need some place to write everything we learn down and forums are a HORRIBLE way to document things. I dislike google codes wiki system and hope we can get Olimex to implement something more akin to MediaWiki.

https://code.google.com/p/a13-olinuxino/

uMinded

Quote from: Tele on February 24, 2013, 11:47:36 AM
Differences in rootfs
I use buildroot to build kernel and a simple rootfs with busybox and qt. It works like charm. If you wanna make a try I can send the .config files.

Differences in toolchain and glibc/eglibc/uclibc
I use a selfmade crosstoolNG toolchain. Very stable and knows good switches, like:
-march=armv7-a -mtune=cortex-a8 -mthumb -mfpu=neon or vfp3  -mfloat-abi=hard or soft or softfp
I use glibc 2.13 with it, oldie but goldie.

This would be great information for me to dump in the wiki (or you can if you wish) as I agree that buildroot is the superior all in one build system. IF you wanted you can go down to as bare bones as a debootstrap but buildroot is very handy, once its set up that is.

I have the following toolchains:
arm-linux-gnueabihf-gcc (crosstool-NG linaro-1.13.1-4.7-2013.01-20130125 - Linaro GCC 2013.01) 4.7.3 20130102 (prerelease)
arm-linux-gnueabi-gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3

As you can see most of the toolchains are based off Linaro so adding an alternative option would be great.


ehj666

Quote from: uMinded on February 24, 2013, 06:11:20 AM


[    1.070000] registered taskstats version 1
[    1.080000] Unable to handle kernel NULL pointer dereference at virtual address 00000018


Have you guys seen this behaviour?

Sorry if this is already dated, but when you get that, if you try to boot to Android does it also lock up?

I would get that after a hard crash. It would then not boot to either the SD or Android. However if you let it sit for a while, it then will boot properly, at least to Android.

The difference is, I do not recall getting to a reboot loop when it happened.

uMinded

Quote from: ehj666 on February 25, 2013, 06:51:39 PM
The difference is, I do not recall getting to a reboot loop when it happened.

The problem was the defined memory difference between the uboot enviroment and the linux kernel so when it handed all of the system memory over to the kernel to manage it freaked out.

See the fex's here for proper configs.

crubille

#100
Hello, if there is anybody to test a running xenomai on A13 get

http://www.crubille.lautre.net/xenomai_sun5i/ipipe-linuxsun5i-3.4.24.beta.patch

and apply the standart xenomai procedure.

PLEASE, let me know if you get it running or if it fail.

latency -t 2 -p 100
== Sampling period: 100 us
== Test mode: in-kernel timer handler
== All results in microseconds
RTT|  00:00:01  (in-kernel timer handler, 100 us period, priority 99)
RTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat worst
RTD|      5.583|      6.265|     11.167|       0|     0|      5.583|     11.167
RTD|      6.125|      6.258|     10.917|       0|     0|      5.583|     11.167
RTD|      5.500|      6.270|     12.000|       0|     0|      5.500|     12.000


"lat worst" is mostly under 20 us but can go up for 30 ns.

latency  -p 100
== Sampling period: 100 us
== Test mode: periodic user-mode task
== All results in microseconds
warming up...
RTT|  00:00:01  (periodic user-mode task, 100 us period, priority 99)
RTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat worst
RTD|     11.999|     12.708|     21.333|       0|     0|     11.999|     21.333
RTD|     12.624|     12.791|     21.541|       0|     0|     11.999|     21.541
RTD|     12.458|     12.791|     26.458|       0|     0|     11.999|     26.458

"lat worst" is mostly under 40 us but can go up for 80 ns.


(To get these value, i tune the Olinuxino A13 setting the dram cas to 5).

Tele

Quote from: crubille on February 25, 2013, 10:48:46 PM
Hello, if there is anybody to test a running xenomai on A13 get ...

Hi Crubille,
I will do and then I will report.

ehj666

Quote from: crubille on February 25, 2013, 10:48:46 PM
Hello, if there is anybody to test a running xenomai on A13 get

http://www.crubille.lautre.net/xenomai_sun5i/ipipe-linuxsun5i-3.4.24.beta.patch

and apply the standart xenomai procedure.


Apparently I need some more clarification. I thought I successfully applied the patch and compiled the kernel. It booted properly, but there were no xenomai references in the boot log. Here is what I did:


cd kernel
git clone git://github.com/linux-sunxi/linux-sunxi.git -b sunxi-3.4
wget http://download.gna.org/xenomai/stable/LATEST_IS-v2.6.2.1.tar.bz2
# Extract above file here
wget http://www.crubille.lautre.net/xenomai_sun5i/ipipe-linuxsun5i-3.4.24.beta.patch
xenomai-2.6.2.1/scripts/prepare-kernel.sh --arch=arm \
--adeos=ipipe-linuxsun51-3.4.24.beta.patch --linux=linux-sunxi/
cd linux-sunxi
make ARCH=arm a13_defconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- uImage
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- INSTALL_MOD_PATH=out modules
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- INSTALL_MOD_PATH=out modules_install

Then copy arch/arm/boot/uImage to SD and boot.

Note: Base folder is kernel, xenomai is in xenomai-2.6.2.1 and the kernel source is in linux-sunxi.

crubille

#103
Hello ehj666

The default config do not include the xenomai option and i am not sure it is well set for the olinuxino board.

In your linux main directory, recopy the default config:

boot on the standard olimex kernel for A13

get the .config file from here

zcat /proc/config.gz > .config
make ARCH=arm menuconfig

check xenomai is on in the real time part,
check anything like cpu-freq-scalling or agressive power management are disabled

ehj666

Quote from: crubille on February 26, 2013, 09:58:46 AM
Hello ehj666

The default config do not include the xenomai option and i am not sure it is well set for the olinuxino board.

In your linux main directory, recopy the default config:

boot on the standard olimex kernel for A13

get the .config file from here

zcat /proc/config.gz > .config
make ARCH=arm menuconfig

check xenomai is on in the real time part,
check anything like cpu-freq-scalling or agressive power management are disabled

Sorry, I do not entirely follow. I copied a standard olimex .config, then ran menuconfig. I do not see a section for real time or xenomai, but with a stock .config I would not expect to. What am I missing?