Kernel 2.6.38.8 support

200 views
Skip to first unread message

nicolas le falher

unread,
Jan 15, 2012, 9:17:37 AM1/15/12
to Bifferboard
Hi list,

Attached you will find files for the 2.6.38.8 kernel support.
I added the lastest patch RTAI.

I tested the flash, boot, and Ethernet, nothing else.

Have fun :).

Nicolas
kern_2.6.38.8.tar.gz

biff...@yahoo.co.uk

unread,
Jan 16, 2012, 4:41:31 AM1/16/12
to Bifferboard
Great! I will have a look tonight. Didn't you say at one time that
you have some patches for 3.0? Are they working at all? If you have
them we could also add those, and let the user switch the Makefile if
they want to try it.

thanks,
Biff.
>  kern_2.6.38.8.tar.gz
> 1341KViewDownload

nicolas le falher

unread,
Jan 16, 2012, 4:44:10 AM1/16/12
to biffe...@googlegroups.com
If you want I will take a look for kernel 3.0.
But there is no patch for RTAI at this moment :/.

Nicolas

biff...@yahoo.co.uk

unread,
Jan 16, 2012, 10:33:40 AM1/16/12
to Bifferboard

Ah, I didn't realise that. I can see why 2.6.38.8 now.

nicolas le falher

unread,
Jan 16, 2012, 10:41:43 AM1/16/12
to biffe...@googlegroups.com
2.6.38.8 because hka needed rtl8192ce support, I saw RTAI patch after porting the kernel.
But maybe some people need updates from 3.x without RTAI.

Anyway I take a look if I can run 3.x kernel on BB.

Nicolas

HKAipost

unread,
Jan 18, 2012, 1:52:09 PM1/18/12
to biffe...@googlegroups.com
Many thanks Nicolas, I'm giving it a try right now!

BTW: biff what is the proper way to change kernel max in the openwrt
builroot?

I've hard coded it to bb/openwrt/target/linux/rdc/image/Makefile for now.

Best
hka.

nicolas le falher

unread,
Jan 18, 2012, 1:54:47 PM1/18/12
to biffe...@googlegroups.com
In "make menuconfig" :

Target Images  --->
(0x10) Kernel Max setting (kmax) (in units)

Nicolas


2012/1/18 HKAipost <goo...@hk.airpost.net>


--
To unsubscribe send email to bifferboard+unsubscribe@googlegroups.com

biff...@yahoo.co.uk

unread,
Feb 12, 2012, 9:34:28 AM2/12/12
to Bifferboard
I tried a build with the rtai example. I got this:

make[3]: Entering directory `/home/biff/rtai/bb/openwrt/package/feeds/
bifferos/rtai'
CFLAGS="-Os -pipe -march=i486 -mtune=i486 -funit-at-a-time -fhonour-
copts -I/home/biff/rtai/bb/openwrt/staging_dir/target-
i386_uClibc-0.9.32/usr/include -I/home/biff/rtai/bb/openwrt/
staging_dir/target-i386_uClibc-0.9.32/include -I/home/biff/rtai/bb/
openwrt/staging_dir/toolchain-i386_gcc-4.5-linaro_uClibc-0.9.32/usr/
include -I/home/biff/rtai/bb/openwrt/staging_dir/toolchain-
i386_gcc-4.5-linaro_uClibc-0.9.32/include " CXXFLAGS="-Os -pipe -
march=i486 -mtune=i486 -funit-at-a-time -fhonour-copts -I/home/biff/
rtai/bb/openwrt/staging_dir/target-i386_uClibc-0.9.32/usr/include -I/
home/biff/rtai/bb/openwrt/staging_dir/target-i386_uClibc-0.9.32/
include -I/home/biff/rtai/bb/openwrt/staging_dir/toolchain-
i386_gcc-4.5-linaro_uClibc-0.9.32/usr/include -I/home/biff/rtai/bb/
openwrt/staging_dir/toolchain-i386_gcc-4.5-linaro_uClibc-0.9.32/
include " LDFLAGS="-L/home/biff/rtai/bb/openwrt/staging_dir/target-
i386_uClibc-0.9.32/usr/lib -L/home/biff/rtai/bb/openwrt/staging_dir/
target-i386_uClibc-0.9.32/lib -L/home/biff/rtai/bb/openwrt/staging_dir/
toolchain-i386_gcc-4.5-linaro_uClibc-0.9.32/usr/lib -L/home/biff/rtai/
bb/openwrt/staging_dir/toolchain-i386_gcc-4.5-linaro_uClibc-0.9.32/lib
" make -j1 -C /home/biff/rtai/bb/openwrt/build_dir/target-
i386_uClibc-0.9.32/rtai_cvs_20110827/. AR=i486-openwrt-linux-uclibc-ar
AS="i486-openwrt-linux-uclibc-gcc -c -Os -pipe -march=i486 -mtune=i486
-funit-at-a-time -fhonour-copts" LD=i486-openwrt-linux-uclibc-ld
NM=i486-openwrt-linux-uclibc-nm CC="i486-openwrt-linux-uclibc-gcc"
GCC="i486-openwrt-linux-uclibc-gcc" CXX="i486-openwrt-linux-uclibc-g+
+" RANLIB=i486-openwrt-linux-uclibc-ranlib STRIP=i486-openwrt-linux-
uclibc-strip OBJCOPY=i486-openwrt-linux-uclibc-objcopy OBJDUMP=i486-
openwrt-linux-uclibc-objdump SIZE=i486-openwrt-linux-uclibc-size
CROSS="i486-openwrt-linux-uclibc-" ARCH="i386" ;
make[4]: Entering directory `/home/biff/rtai/bb/openwrt/build_dir/
target-i386_uClibc-0.9.32/rtai_cvs_20110827'
make all-recursive
make[5]: Entering directory `/home/biff/rtai/bb/openwrt/build_dir/
target-i386_uClibc-0.9.32/rtai_cvs_20110827'
*****************************************
* The Linux configuration has changed *
* forcing 'make reconfig' ... *
*****************************************
make[6]: Entering directory `/home/biff/rtai/bb/openwrt/build_dir/
target-i386_uClibc-0.9.32/rtai_cvs_20110827'
make[7]: Entering directory `/home/biff/rtai/bb/openwrt/build_dir/
target-i386_uClibc-0.9.32/rtai_cvs_20110827'
/bin/sh: line 2: CONFIG_RTAI_MAINTAINER_TRUE: command not found
configure: loading site script /home/biff/rtai/bb/openwrt/include/site/
i486-openwrt-linux-uclibc
checking build system type... x86_64-unknown-linux-gnu
checking host system type... i386-pc-none
checking for a BSD-compatible install... /usr/bin/ginstall -c
checking for CROSS_COMPILE... i486-openwrt-linux-uclibc-
checking for i386-pc-none-gcc... i486-openwrt-linux-uclibc-i486-
openwrt-linux-uclibc-gcc
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
See `config.log' for more details.
make[7]: *** [config.status] Error 1
make[7]: Leaving directory `/home/biff/rtai/bb/openwrt/build_dir/
target-i386_uClibc-0.9.32/rtai_cvs_20110827'
make[6]: *** [reconfig] Error 2
make[6]: Leaving directory `/home/biff/rtai/bb/openwrt/build_dir/
target-i386_uClibc-0.9.32/rtai_cvs_20110827'
make[5]: *** [base/GNUmakefile] Error 2
make[5]: Leaving directory `/home/biff/rtai/bb/openwrt/build_dir/
target-i386_uClibc-0.9.32/rtai_cvs_20110827'
make[4]: *** [all] Error 2
make[4]: Leaving directory `/home/biff/rtai/bb/openwrt/build_dir/
target-i386_uClibc-0.9.32/rtai_cvs_20110827'
make[3]: *** [/home/biff/rtai/bb/openwrt/build_dir/target-
i386_uClibc-0.9.32/rtai_cvs_20110827/.built] Error 2
make[3]: Leaving directory `/home/biff/rtai/bb/openwrt/package/feeds/
bifferos/rtai'
make[2]: *** [package/feeds/bifferos/rtai/compile] Error 2
make[2]: Leaving directory `/home/biff/rtai/bb/openwrt'
make[1]: *** [/home/biff/rtai/bb/openwrt/staging_dir/target-
i386_uClibc-0.9.32/stamp/.package_compile] Error 2
make[1]: Leaving directory `/home/biff/rtai/bb/openwrt'
make: *** [world] Error 2
biff@fonzi:~/rtai/bb/openwrt$

Did anyone else get this to compile?

I checked out the latest git, and only changed target/linux/rdc/
Makefile to make linux version 2.6.38.8.

cheers,
Biff.


nicolas le falher

unread,
Feb 12, 2012, 11:52:51 AM2/12/12
to biffe...@googlegroups.com
Hi Biff,

Rtai seems to need updated (https://mail.rtai.org/pipermail/rtai/2012-February/024865.html).
I try to make it work, I've some compilation problems at this moment with latest rtai revision.

Nicolas

nicolas le falher

unread,
Feb 12, 2012, 12:24:34 PM2/12/12
to biffe...@googlegroups.com
I think rtai 3.9 have a problem, here the error :
rtai-3.9-test2/base/arch/i386/hal/hal.immed:630:2: error: 'struct
irq_chip' has no member named 'irq_end'

But irq kernel no longer has an "end" member in 2.6.38.8
(http://lxr.free-electrons.com/source/include/linux/irq.h?v=2.6.38) :
@end: deprecated, will go away with __do_IRQ()

Maybe i make a mistake :/.

Nicolas

nicolas le falher

unread,
Feb 12, 2012, 12:50:14 PM2/12/12
to biffe...@googlegroups.com
Biff,

rtai-led-demo running with a little change, how to :

Retrieve latest RTAI revision : https://www.rtai.org/RTAI/rtai-3.9-test2.tar.bz2
Edit file "base/arch/i386/hal/hal.immed" and change :
      - rtai_irq_endis_fun(end, irq);
      + rtai_irq_endis_fun(eoi, irq);
Update your Openwrt Makefile.

Dunno if RTAI change is good, but it works for your binary.
RTAI ticket : https://mail.rtai.org/pipermail/rtai/2012-February/024874.html

Nicolas

biff...@yahoo.co.uk

unread,
Feb 12, 2012, 3:17:44 PM2/12/12
to Bifferboard
On Feb 12, 5:50 pm, nicolas le falher <n.lefal...@gmail.com> wrote:
> Update your Openwrt Makefile.

You mean like this?

--- a/openwrt/package/feeds/bifferos/rtai/Makefile
+++ b/openwrt/package/feeds/bifferos/rtai/Makefile
@@ -7,16 +7,16 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk

PKG_NAME:=rtai
-PKG_VERSION:=cvs_20110827
-PKG_RELEASE:=1
+PKG_VERSION:=3.9
+PKG_RELEASE:=test2

-PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=@SF/bifferboard/
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE).tar.bz2
+PKG_SOURCE_URL:=https://www.rtai.org/RTAI/

PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1

-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION)
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)

include $(INCLUDE_DIR)/package.mk

diff --git a/openwrt/target/linux/rdc/Makefile b/openwrt/target/linux/
rdc/Makefile
index b488a48..dc64ab2 100644
--- a/openwrt/target/linux/rdc/Makefile
+++ b/openwrt/target/linux/rdc/Makefile
@@ -12,7 +12,7 @@ BOARDNAME:=RDC 321x
FEATURES:=squashfs jffs2 pci usb pcmcia
CFLAGS:=-Os -pipe -march=i486 -mtune=i486 -funit-at-a-time

-LINUX_VERSION:=2.6.37.6
+LINUX_VERSION:=2.6.38.8
DEVICE_TYPE=

include $(INCLUDE_DIR)/target.mk

I did that, waited for the compile error, which looks like this:

CC [M] /home/biff/rtai/bb/openwrt/build_dir/target-
i386_uClibc-0.9.32/rtai-3.9-test2/base/arch/i386/hal/hal.o
In file included from /home/biff/rtai/bb/openwrt/build_dir/target-
i386_uClibc-0.9.32/rtai-3.9-test2/base/arch/i386/hal/hal.c:258:0:
/home/biff/rtai/bb/openwrt/build_dir/target-i386_uClibc-0.9.32/
rtai-3.9-test2/base/arch/i386/hal/hal.immed: In function 'rt_eoi_irq':
/home/biff/rtai/bb/openwrt/build_dir/target-i386_uClibc-0.9.32/
rtai-3.9-test2/base/arch/i386/hal/hal.immed:630:2: error: 'struct
irq_chip' has no member named 'irq_end'
/home/biff/rtai/bb/openwrt/build_dir/target-i386_uClibc-0.9.32/
rtai-3.9-test2/base/arch/i386/hal/hal.immed:630:2: error: 'struct
irq_chip' has no member named 'irq_end'
In file included from /home/biff/rtai/bb/openwrt/build_dir/target-
i386_uClibc-0.9.32/rtai-3.9-test2/base/arch/i386/hal/hal.c:258:0:
/home/biff/rtai/bb/openwrt/build_dir/target-i386_uClibc-0.9.32/
rtai-3.9-test2/base/arch/i386/hal/hal.immed: In function
'__rtai_hal_init':
/home/biff/rtai/bb/openwrt/build_dir/target-i386_uClibc-0.9.32/
rtai-3.9-test2/base/arch/i386/hal/hal.immed:2166:3: warning: format
'%d' expects type 'int', but argument 2 has type 'long unsigned int'

Then I made the change to build_dir/target-i386_uClibc-0.9.32/rtai-3.9-
test2/base/arch/i386/hal/hal.immed (it much be changed in two places)

Now I get:

make[4]: Entering directory `/home/biff/rtai/bb/openwrt/build_dir/
target-i386_uClibc-0.9.32/rtai-3.9-test2'
make all-recursive
make[5]: Entering directory `/home/biff/rtai/bb/openwrt/build_dir/
target-i386_uClibc-0.9.32/rtai-3.9-test2'
*****************************************
* The Linux configuration has changed *
* forcing 'make reconfig' ... *
*****************************************
make[6]: Entering directory `/home/biff/rtai/bb/openwrt/build_dir/
target-i386_uClibc-0.9.32/rtai-3.9-test2'
make[7]: Entering directory `/home/biff/rtai/bb/openwrt/build_dir/
target-i386_uClibc-0.9.32/rtai-3.9-test2'
/bin/sh: line 2: CONFIG_RTAI_MAINTAINER_PGM_FALSE: command not found
configure: loading site script /home/biff/rtai/bb/openwrt/include/site/
i486-openwrt-linux-uclibc
checking build system type... x86_64-unknown-linux-gnu
checking host system type... i386-pc-none
checking for a BSD-compatible install... /usr/bin/ginstall -c
checking for CROSS_COMPILE... i486-openwrt-linux-uclibc-
checking for i386-pc-none-gcc... i486-openwrt-linux-uclibc-i486-
openwrt-linux-uclibc-gcc
checking whether the C compiler works... no
configure: error: in `/home/biff/rtai/bb/openwrt/build_dir/target-
i386_uClibc-0.9.32/rtai-3.9-test2':
configure: error: C compiler cannot create executables

Or are you doing this some other way?

thanks,
Biff.


nicolas le falher

unread,
Feb 12, 2012, 4:43:24 PM2/12/12
to biffe...@googlegroups.com
"checking whether the C compiler works... no"
It seems to be an error on gcc, no on the package rtai.

My build system : checking build system type... i686-pc-linux-gnu

Have you change something in this menu ? :
Advanced configuration options (for developers)  --->
Use external toolchain  --->

You will find attached the Makefile and a patche for previous compilation error.

Nicolas
rtai.tar.gz
Reply all
Reply to author
Forward
0 new messages