Skip to contentSkip to conversation

Compiling I-pipe patched kernel on beaglebone from Angstrom branch

Xenomai WONG Sheng Chao 2 participants 18 messages Nov 23, 2012 – Nov 29, 2012

lore
Share & tools
lore
#0 lore raw

Hi

I am trying to get Xenomai working on the beaglebone (AM3359) and I had been following the instructions from this mailing list

http://www.xenomai.org/pipermail/xenomai/2012-September/026190.html

The steps that I went through was such

1) I configured the Angstorm distribution with linux kernel 3.2.21 for beaglebone using bitbake

2) Copied the kernel source from it and saved it as {original_angstrom_kernel}

3) I then ran the patch script from xenomai-2.6.1

$./prepare-kernel.sh --linux={original_angstrom_kernel} --arch=arm --adeos=/xenomai-2.6.1/ksrc/arch/arm/patches/ipipe-core-3.2.21-arm-1.patch

4) There were four conflicting files, namely

arch/arm/common/gic.c
arch/arm/mach-omap2/irq.c
arch/arm/plat-mxc/gic.c
arch/arm/plat-omap/include/plat/irqs.h

5) I compared these four files to the vanilla linux-kernel-3.2.21 and patch these 4 files individually from {original_angstrom_kernel} with {vanilla-kernel-3.2.21}. Now i save the newly patched kernel source as {pre_patched_original_angstrom_kernel}

6) I ran the prepare-kernel script again with the --linux directed to the {pre_patched_original_angstrom_kernel} and the patch went through fine. So now i have a copy of i-pipe patched source {ipipe_patched_original_angstrom_kernel}

7) I proceed with copying the .config function from arch/arm/configs/omap2plus_defconfig and run the make menuconfig with

$make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- menuconfig

and save the kernel configuration

8) i then proceed to compile the kernel with the following command

$make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- uImage

9) The compilation fails and it gives the following error

arch/arm/mach-omap2/devices.c:1096:12: error: 'AM33XX_IRQ_ICSS0_0'
undeclared here (not in a function)

| arch/arm/mach-omap2/devices.c:1101:12: error: 'AM33XX_IRQ_ICSS0_1' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1106:12: error: 'AM33XX_IRQ_ICSS0_2' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1111:12: error: 'AM33XX_IRQ_ICSS0_3' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1116:12: error: 'AM33XX_IRQ_ICSS0_4' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1121:12: error: 'AM33XX_IRQ_ICSS0_5' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1126:12: error: 'AM33XX_IRQ_ICSS0_6' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1131:12: error: 'AM33XX_IRQ_ICSS0_7' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1260:12: error: 'AM33XX_IRQ_CPSW_C0_RX' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1260:3: error: initializer element is not constant
| arch/arm/mach-omap2/devices.c:1260:3: error: (near initialization for 'am33xx_cpsw_resources[2].start')
| arch/arm/mach-omap2/devices.c:1261:3: error: initializer element is not constant
| arch/arm/mach-omap2/devices.c:1261:3: error: (near initialization for 'am33xx_cpsw_resources[2].end')
| arch/arm/mach-omap2/devices.c:1265:12: error: 'AM33XX_IRQ_DMTIMER5' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1265:3: error: initializer element is not constant
| arch/arm/mach-omap2/devices.c:1265:3: error: (near initialization for 'am33xx_cpsw_resources[3].start')
| arch/arm/mach-omap2/devices.c:1266:3: error: initializer element is not constant
| arch/arm/mach-omap2/devices.c:1266:3: error: (near initialization for 'am33xx_cpsw_resources[3].end')
| arch/arm/mach-omap2/devices.c:1270:12: error: 'AM33XX_IRQ_DMTIMER6' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1270:3: error: initializer element is not constant
| arch/arm/mach-omap2/devices.c:1270:3: error: (near initialization for 'am33xx_cpsw_resources[4].start')
| arch/arm/mach-omap2/devices.c:1271:3: error: initializer element is not constant
| arch/arm/mach-omap2/devices.c:1271:3: error: (near initialization for 'am33xx_cpsw_resources[4].end')
| arch/arm/mach-omap2/devices.c:1275:12: error: 'AM33XX_IRQ_CPSW_C0' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1275:3: error: initializer element is not constant
| arch/arm/mach-omap2/devices.c:1275:3: error: (near initialization for 'am33xx_cpsw_resources[5].start')
| arch/arm/mach-omap2/devices.c:1276:3: error: initializer element is not constant
| arch/arm/mach-omap2/devices.c:1276:3: error: (near initialization for 'am33xx_cpsw_resources[5].end')

I read from this link http://www.xenomai.org/pipermail/xenomai/2012-July/000476.html that for the kernel to boot properly on the AM3359 two changes needs to be made. I had yet to made these changes as i want to see if the kernel source would compiled and to verify my steps.

Is my approach correct? Any advice on how to solve this problem?

Thanks in advance!!

Best regards
WONG Sheng Chao

#1 lore raw
Quoted 107 lines · WONG Sheng Chao

Hi

I am trying to get Xenomai working on the beaglebone (AM3359) and I had been following the instructions from this mailing list

http://www.xenomai.org/pipermail/xenomai/2012-September/026190.html

The steps that I went through was such

1) I configured the Angstorm distribution with linux kernel 3.2.21 for beaglebone using bitbake

2) Copied the kernel source from it and saved it as {original_angstrom_kernel}

3) I then ran the patch script from xenomai-2.6.1

$./prepare-kernel.sh --linux={original_angstrom_kernel} --arch=arm --adeos=/xenomai-2.6.1/ksrc/arch/arm/patches/ipipe-core-3.2.21-arm-1.patch

4) There were four conflicting files, namely

arch/arm/common/gic.c
arch/arm/mach-omap2/irq.c
arch/arm/plat-mxc/gic.c
arch/arm/plat-omap/include/plat/irqs.h

5) I compared these four files to the vanilla linux-kernel-3.2.21 and patch these 4 files individually from {original_angstrom_kernel} with {vanilla-kernel-3.2.21}. Now i save the newly patched kernel source as {pre_patched_original_angstrom_kernel}

6) I ran the prepare-kernel script again with the --linux directed to the {pre_patched_original_angstrom_kernel} and the patch went through fine. So now i have a copy of i-pipe patched source {ipipe_patched_original_angstrom_kernel}

7) I proceed with copying the .config function from arch/arm/configs/omap2plus_defconfig and run the make menuconfig with

$make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- menuconfig

and save the kernel configuration

8) i then proceed to compile the kernel with the following command

$make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- uImage

9) The compilation fails and it gives the following error

arch/arm/mach-omap2/devices.c:1096:12: error: 'AM33XX_IRQ_ICSS0_0'
undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1101:12: error: 'AM33XX_IRQ_ICSS0_1' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1106:12: error: 'AM33XX_IRQ_ICSS0_2' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1111:12: error: 'AM33XX_IRQ_ICSS0_3' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1116:12: error: 'AM33XX_IRQ_ICSS0_4' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1121:12: error: 'AM33XX_IRQ_ICSS0_5' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1126:12: error: 'AM33XX_IRQ_ICSS0_6' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1131:12: error: 'AM33XX_IRQ_ICSS0_7' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1260:12: error: 'AM33XX_IRQ_CPSW_C0_RX' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1260:3: error: initializer element is not constant
| arch/arm/mach-omap2/devices.c:1260:3: error: (near initialization for 'am33xx_cpsw_resources[2].start')
| arch/arm/mach-omap2/devices.c:1261:3: error: initializer element is not constant
| arch/arm/mach-omap2/devices.c:1261:3: error: (near initialization for 'am33xx_cpsw_resources[2].end')
| arch/arm/mach-omap2/devices.c:1265:12: error: 'AM33XX_IRQ_DMTIMER5' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1265:3: error: initializer element is not constant
| arch/arm/mach-omap2/devices.c:1265:3: error: (near initialization for 'am33xx_cpsw_resources[3].start')
| arch/arm/mach-omap2/devices.c:1266:3: error: initializer element is not constant
| arch/arm/mach-omap2/devices.c:1266:3: error: (near initialization for 'am33xx_cpsw_resources[3].end')
| arch/arm/mach-omap2/devices.c:1270:12: error: 'AM33XX_IRQ_DMTIMER6' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1270:3: error: initializer element is not constant
| arch/arm/mach-omap2/devices.c:1270:3: error: (near initialization for 'am33xx_cpsw_resources[4].start')
| arch/arm/mach-omap2/devices.c:1271:3: error: initializer element is not constant
| arch/arm/mach-omap2/devices.c:1271:3: error: (near initialization for 'am33xx_cpsw_resources[4].end')
| arch/arm/mach-omap2/devices.c:1275:12: error: 'AM33XX_IRQ_CPSW_C0' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1275:3: error: initializer element is not constant
| arch/arm/mach-omap2/devices.c:1275:3: error: (near initialization for 'am33xx_cpsw_resources[5].start')
| arch/arm/mach-omap2/devices.c:1276:3: error: initializer element is not constant
| arch/arm/mach-omap2/devices.c:1276:3: error: (near initialization for 'am33xx_cpsw_resources[5].end')

Quoted 7 lines

I read from this link
http://www.xenomai.org/pipermail/xenomai/2012-July/000476.html that for the kernel to boot properly on the AM3359 two changes needs to be made. I had yet to made these changes as i want to see if the kernel source would compiled and to verify my steps.

Is my approach correct? Any advice on how to solve this problem?

There is no correct approach, there is more than one way to do it. Does the un-patched kernel compile with the .config you use? If yes, does the patched kernel compile with CONFIG_IPIPE and CONFIG_XENOMAI disabled?

Signature · 1 line
					    Gilles.
#2 lore raw
Quoted 115 lines · Gilles Chanteperdrix
Quoted 114 lines · WONG Sheng Chao

Hi

I am trying to get Xenomai working on the beaglebone (AM3359) and I had been following the instructions from this mailing list

http://www.xenomai.org/pipermail/xenomai/2012-September/026190.html

The steps that I went through was such

1) I configured the Angstorm distribution with linux kernel 3.2.21 for beaglebone using bitbake

2) Copied the kernel source from it and saved it as {original_angstrom_kernel}

3) I then ran the patch script from xenomai-2.6.1

$./prepare-kernel.sh --linux={original_angstrom_kernel} --arch=arm

--adeos=/xenomai-2.6.1/ksrc/arch/arm/patches/ipipe-core-3.2.21-arm-1.patch

4) There were four conflicting files, namely

arch/arm/common/gic.c
arch/arm/mach-omap2/irq.c
arch/arm/plat-mxc/gic.c
arch/arm/plat-omap/include/plat/irqs.h

5) I compared these four files to the vanilla linux-kernel-3.2.21 and patch these 4 files individually from {original_angstrom_kernel} with {vanilla-kernel-3.2.21}. Now i save the newly patched kernel source as {pre_patched_original_angstrom_kernel}

6) I ran the prepare-kernel script again with the --linux directed to the {pre_patched_original_angstrom_kernel} and the patch went through fine. So now i have a copy of i-pipe patched source {ipipe_patched_original_angstrom_kernel}

7) I proceed with copying the .config function from arch/arm/configs/omap2plus_defconfig and run the make menuconfig with

$make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- menuconfig

and save the kernel configuration

8) i then proceed to compile the kernel with the following command

$make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- uImage

9) The compilation fails and it gives the following error

arch/arm/mach-omap2/devices.c:1096:12: error: 'AM33XX_IRQ_ICSS0_0'
undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1101:12: error: 'AM33XX_IRQ_ICSS0_1' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1106:12: error: 'AM33XX_IRQ_ICSS0_2' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1111:12: error: 'AM33XX_IRQ_ICSS0_3' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1116:12: error: 'AM33XX_IRQ_ICSS0_4' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1121:12: error: 'AM33XX_IRQ_ICSS0_5' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1126:12: error: 'AM33XX_IRQ_ICSS0_6' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1131:12: error: 'AM33XX_IRQ_ICSS0_7' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1260:12: error: 'AM33XX_IRQ_CPSW_C0_RX' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1260:3: error: initializer element is not constant
| arch/arm/mach-omap2/devices.c:1260:3: error: (near initialization for 'am33xx_cpsw_resources[2].start')
| arch/arm/mach-omap2/devices.c:1261:3: error: initializer element is not constant
| arch/arm/mach-omap2/devices.c:1261:3: error: (near initialization for 'am33xx_cpsw_resources[2].end')
| arch/arm/mach-omap2/devices.c:1265:12: error: 'AM33XX_IRQ_DMTIMER5' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1265:3: error: initializer element is not constant
| arch/arm/mach-omap2/devices.c:1265:3: error: (near initialization for 'am33xx_cpsw_resources[3].start')
| arch/arm/mach-omap2/devices.c:1266:3: error: initializer element is not constant
| arch/arm/mach-omap2/devices.c:1266:3: error: (near initialization for 'am33xx_cpsw_resources[3].end')
| arch/arm/mach-omap2/devices.c:1270:12: error: 'AM33XX_IRQ_DMTIMER6' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1270:3: error: initializer element is not constant
| arch/arm/mach-omap2/devices.c:1270:3: error: (near initialization for 'am33xx_cpsw_resources[4].start')
| arch/arm/mach-omap2/devices.c:1271:3: error: initializer element is not constant
| arch/arm/mach-omap2/devices.c:1271:3: error: (near initialization for 'am33xx_cpsw_resources[4].end')
| arch/arm/mach-omap2/devices.c:1275:12: error: 'AM33XX_IRQ_CPSW_C0' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1275:3: error: initializer element is not constant
| arch/arm/mach-omap2/devices.c:1275:3: error: (near initialization for 'am33xx_cpsw_resources[5].start')
| arch/arm/mach-omap2/devices.c:1276:3: error: initializer element is not constant
| arch/arm/mach-omap2/devices.c:1276:3: error: (near initialization for 'am33xx_cpsw_resources[5].end')

I read from this link
http://www.xenomai.org/pipermail/xenomai/2012-July/000476.html that for the kernel to boot properly on the AM3359 two changes needs to be made. I had yet to made these changes as i want to see if the kernel source would compiled and to verify my steps.

Quoted 5 lines
Quoted 1 line

Is my approach correct? Any advice on how to solve this problem?

There is no correct approach, there is more than one way to do it. Does the un-patched kernel compile with the .config you use? If yes, does the patched kernel compile with CONFIG_IPIPE and CONFIG_XENOMAI disabled?

Sorry about the private reply Gilles, I clicked the reply button instead of reply all.

The un-patched kernel compile fine with the original .config.

The ipipe patched kernel with CONFIG_IPIPE and CONFIG_XENOMAI disable shows the same compilation error as before.

Following the information from here and looking at the error code

http://www.xenomai.org/index.php/I-pipe-core:ArmPorting#The_general_case

I had a look at arch/arm/mach-omap2/Kconfig and i found this snippet, but I am not sure how to proceed from here.

config SOC_OMAPAM33XX
bool "AM33XX support"
depends on ARCH_OMAP3
default y

I will attach my .config for reference
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: config
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20121123/bd50cea1/attachment.ksh>

#3 lore raw
Quoted 155 lines · WONG Sheng Chao
Quoted 145 lines · Gilles Chanteperdrix
Quoted 144 lines · WONG Sheng Chao

Hi

I am trying to get Xenomai working on the beaglebone (AM3359) and I had
been following the instructions from this mailing list

http://www.xenomai.org/pipermail/xenomai/2012-September/026190.html

The steps that I went through was such

1) I configured the Angstorm distribution with linux kernel 3.2.21 for
beaglebone using bitbake

2) Copied the kernel source from it and saved it as {original_angstrom_kernel}

3) I then ran the patch script from xenomai-2.6.1

$./prepare-kernel.sh --linux={original_angstrom_kernel} --arch=arm

--adeos=/xenomai-2.6.1/ksrc/arch/arm/patches/ipipe-core-3.2.21-arm-1.patch

4) There were four conflicting files, namely

arch/arm/common/gic.c
arch/arm/mach-omap2/irq.c
arch/arm/plat-mxc/gic.c
arch/arm/plat-omap/include/plat/irqs.h

5) I compared these four files to the vanilla linux-kernel-3.2.21 and
patch these 4 files individually from {original_angstrom_kernel} with
{vanilla-kernel-3.2.21}. Now i save the newly patched kernel source as
{pre_patched_original_angstrom_kernel}

6) I ran the prepare-kernel script again with the --linux directed to
the {pre_patched_original_angstrom_kernel} and the patch went through
fine. So now i have a copy of i-pipe patched source {ipipe_patched_original_angstrom_kernel}

7) I proceed with copying the .config function from arch/arm/configs/omap2plus_defconfig and run the make menuconfig with

$make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- menuconfig

and save the kernel configuration

8) i then proceed to compile the kernel with the following command

$make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- uImage

9) The compilation fails and it gives the following error

arch/arm/mach-omap2/devices.c:1096:12: error: 'AM33XX_IRQ_ICSS0_0'
undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1101:12: error: 'AM33XX_IRQ_ICSS0_1' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1106:12: error: 'AM33XX_IRQ_ICSS0_2' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1111:12: error: 'AM33XX_IRQ_ICSS0_3' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1116:12: error: 'AM33XX_IRQ_ICSS0_4' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1121:12: error: 'AM33XX_IRQ_ICSS0_5' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1126:12: error: 'AM33XX_IRQ_ICSS0_6' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1131:12: error: 'AM33XX_IRQ_ICSS0_7' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1260:12: error:
'AM33XX_IRQ_CPSW_C0_RX'
undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1260:3: error: initializer element is
not constant
| arch/arm/mach-omap2/devices.c:1260:3: error: (near initialization for
'am33xx_cpsw_resources[2].start')
| arch/arm/mach-omap2/devices.c:1261:3: error: initializer element is
not constant
| arch/arm/mach-omap2/devices.c:1261:3: error: (near initialization for
'am33xx_cpsw_resources[2].end')
| arch/arm/mach-omap2/devices.c:1265:12: error:
'AM33XX_IRQ_DMTIMER5'
undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1265:3: error: initializer element is
not constant
| arch/arm/mach-omap2/devices.c:1265:3: error: (near initialization for
'am33xx_cpsw_resources[3].start')
| arch/arm/mach-omap2/devices.c:1266:3: error: initializer element is
not constant
| arch/arm/mach-omap2/devices.c:1266:3: error: (near initialization for
'am33xx_cpsw_resources[3].end')
| arch/arm/mach-omap2/devices.c:1270:12: error:
'AM33XX_IRQ_DMTIMER6'
undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1270:3: error: initializer element is
not constant
| arch/arm/mach-omap2/devices.c:1270:3: error: (near initialization for
'am33xx_cpsw_resources[4].start')
| arch/arm/mach-omap2/devices.c:1271:3: error: initializer element is
not constant
| arch/arm/mach-omap2/devices.c:1271:3: error: (near initialization for
'am33xx_cpsw_resources[4].end')
| arch/arm/mach-omap2/devices.c:1275:12: error: 'AM33XX_IRQ_CPSW_C0' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1275:3: error: initializer element is
not constant
| arch/arm/mach-omap2/devices.c:1275:3: error: (near initialization for
'am33xx_cpsw_resources[5].start')
| arch/arm/mach-omap2/devices.c:1276:3: error: initializer element is
not constant
| arch/arm/mach-omap2/devices.c:1276:3: error: (near initialization for
'am33xx_cpsw_resources[5].end')

I read from this link
http://www.xenomai.org/pipermail/xenomai/2012-July/000476.html that for
the kernel to boot properly on the AM3359 two changes needs to be made.
I had yet to made these changes as i want to see if the kernel source
would compiled and to verify my steps.

Quoted 7 lines
Quoted 1 line

Is my approach correct? Any advice on how to solve this problem?

There is no correct approach, there is more than one way to do it. Does
the un-patched kernel compile with the .config you use? If yes, does the
patched kernel compile with CONFIG_IPIPE and CONFIG_XENOMAI disabled?

Quoted 8 lines

Sorry about the private reply Gilles, I clicked the reply button instead of reply all.

The un-patched kernel compile fine with the original .config.

The ipipe patched kernel with CONFIG_IPIPE and CONFIG_XENOMAI disable shows the same compilation error as before.

This looks like an error due to some changes made by the I-pipe patch to the include files. In order to debug this, you have to simply pre-process the file, and try and understand what happens. If at the top of the build tree, you run "make arch/arm/mach-omap2/devices.i" with the proper make variables set, the kernel makefile should generate the pre-processed file.

Signature · 1 line
					    Gilles.
#4 lore raw
Quoted 168 lines · Gilles Chanteperdrix
Quoted 158 lines · WONG Sheng Chao
Quoted 148 lines · Gilles Chanteperdrix
Quoted 147 lines · WONG Sheng Chao

Hi

I am trying to get Xenomai working on the beaglebone (AM3359) and I had
been following the instructions from this mailing list

http://www.xenomai.org/pipermail/xenomai/2012-September/026190.html

The steps that I went through was such

1) I configured the Angstorm distribution with linux kernel 3.2.21 for
beaglebone using bitbake

2) Copied the kernel source from it and saved it as {original_angstrom_kernel}

3) I then ran the patch script from xenomai-2.6.1

$./prepare-kernel.sh --linux={original_angstrom_kernel} --arch=arm

--adeos=/xenomai-2.6.1/ksrc/arch/arm/patches/ipipe-core-3.2.21-arm-1.patch

4) There were four conflicting files, namely

arch/arm/common/gic.c
arch/arm/mach-omap2/irq.c
arch/arm/plat-mxc/gic.c
arch/arm/plat-omap/include/plat/irqs.h

5) I compared these four files to the vanilla linux-kernel-3.2.21 and
patch these 4 files individually from {original_angstrom_kernel} with
{vanilla-kernel-3.2.21}. Now i save the newly patched kernel source as
{pre_patched_original_angstrom_kernel}

6) I ran the prepare-kernel script again with the --linux directed to
the {pre_patched_original_angstrom_kernel} and the patch went through
fine. So now i have a copy of i-pipe patched source {ipipe_patched_original_angstrom_kernel}

7) I proceed with copying the .config function from arch/arm/configs/omap2plus_defconfig and run the make menuconfig with

$make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- menuconfig

and save the kernel configuration

8) i then proceed to compile the kernel with the following command

$make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- uImage

9) The compilation fails and it gives the following error

arch/arm/mach-omap2/devices.c:1096:12: error:
'AM33XX_IRQ_ICSS0_0'
undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1101:12: error: 'AM33XX_IRQ_ICSS0_1' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1106:12: error: 'AM33XX_IRQ_ICSS0_2' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1111:12: error: 'AM33XX_IRQ_ICSS0_3' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1116:12: error: 'AM33XX_IRQ_ICSS0_4' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1121:12: error: 'AM33XX_IRQ_ICSS0_5' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1126:12: error: 'AM33XX_IRQ_ICSS0_6' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1131:12: error: 'AM33XX_IRQ_ICSS0_7' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1260:12: error:
'AM33XX_IRQ_CPSW_C0_RX'
undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1260:3: error: initializer element is
not constant
| arch/arm/mach-omap2/devices.c:1260:3: error: (near initialization for
'am33xx_cpsw_resources[2].start')
| arch/arm/mach-omap2/devices.c:1261:3: error: initializer element is
not constant
| arch/arm/mach-omap2/devices.c:1261:3: error: (near initialization for
'am33xx_cpsw_resources[2].end')
| arch/arm/mach-omap2/devices.c:1265:12: error:
'AM33XX_IRQ_DMTIMER5'
undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1265:3: error: initializer element is
not constant
| arch/arm/mach-omap2/devices.c:1265:3: error: (near initialization for
'am33xx_cpsw_resources[3].start')
| arch/arm/mach-omap2/devices.c:1266:3: error: initializer element is
not constant
| arch/arm/mach-omap2/devices.c:1266:3: error: (near initialization for
'am33xx_cpsw_resources[3].end')
| arch/arm/mach-omap2/devices.c:1270:12: error:
'AM33XX_IRQ_DMTIMER6'
undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1270:3: error: initializer element is
not constant
| arch/arm/mach-omap2/devices.c:1270:3: error: (near initialization for
'am33xx_cpsw_resources[4].start')
| arch/arm/mach-omap2/devices.c:1271:3: error: initializer element is
not constant
| arch/arm/mach-omap2/devices.c:1271:3: error: (near initialization for
'am33xx_cpsw_resources[4].end')
| arch/arm/mach-omap2/devices.c:1275:12: error: 'AM33XX_IRQ_CPSW_C0' undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1275:3: error: initializer element is
not constant
| arch/arm/mach-omap2/devices.c:1275:3: error: (near initialization for
'am33xx_cpsw_resources[5].start')
| arch/arm/mach-omap2/devices.c:1276:3: error: initializer element is
not constant
| arch/arm/mach-omap2/devices.c:1276:3: error: (near initialization for
'am33xx_cpsw_resources[5].end')

I read from this link
http://www.xenomai.org/pipermail/xenomai/2012-July/000476.html that for
the kernel to boot properly on the AM3359 two changes needs to be made.
I had yet to made these changes as i want to see if the kernel source
would compiled and to verify my steps.

Quoted 7 lines
Quoted 1 line

Is my approach correct? Any advice on how to solve this problem?

There is no correct approach, there is more than one way to do it. Does
the un-patched kernel compile with the .config you use? If yes, does the
patched kernel compile with CONFIG_IPIPE and CONFIG_XENOMAI disabled?

Quoted 8 lines

Sorry about the private reply Gilles, I clicked the reply button instead of reply all.

The un-patched kernel compile fine with the original .config.

The ipipe patched kernel with CONFIG_IPIPE and CONFIG_XENOMAI disable shows the same compilation error as before.

Quoted 6 lines

This looks like an error due to some changes made by the I-pipe patch to the include files. In order to debug this, you have to simply pre-process the file, and try and understand what happens. If at the top of the build tree, you run "make arch/arm/mach-omap2/devices.i" with the proper make variables set, the kernel makefile should generate the pre-processed file.

I compared the devices.i and noticed that in the function where the compile error occurs the constant variables are not well defined. But how do I know which includes files are modified?

static struct resource am33xx_cpsw_resources[] = {
{
.start = 0x4A100000,
.end = 0x4A100000 + 0x00000800 - 1, .flags = 0x00000200,
},
{
.start = 0x4A101200,
.end = 0x4A101200 + 0x00000100 - 1, .flags = 0x00000200,
},
{
.start = AM33XX_IRQ_CPSW_C0_RX,
.end = AM33XX_IRQ_CPSW_C0_RX,
.flags = 0x00000400,
},
{
.start = AM33XX_IRQ_DMTIMER5,
.end = AM33XX_IRQ_DMTIMER5,
.flags = 0x00000400,
},
{
.start = AM33XX_IRQ_DMTIMER6,
.end = AM33XX_IRQ_DMTIMER6,
.flags = 0x00000400,
},
{
.start = AM33XX_IRQ_CPSW_C0,
.end = AM33XX_IRQ_CPSW_C0,
.flags = 0x00000400,
},
};

#5 lore raw
Quoted 202 lines · WONG Sheng Chao
Quoted 191 lines · Gilles Chanteperdrix
Quoted 184 lines · WONG Sheng Chao
Quoted 170 lines · Gilles Chanteperdrix
Quoted 167 lines · WONG Sheng Chao

Hi

I am trying to get Xenomai working on the beaglebone (AM3359) and I
had
been following the instructions from this mailing list

http://www.xenomai.org/pipermail/xenomai/2012-September/026190.html

The steps that I went through was such

1) I configured the Angstorm distribution with linux kernel 3.2.21 for
beaglebone using bitbake

2) Copied the kernel source from it and saved it as {original_angstrom_kernel}

3) I then ran the patch script from xenomai-2.6.1

$./prepare-kernel.sh --linux={original_angstrom_kernel} --arch=arm

--adeos=/xenomai-2.6.1/ksrc/arch/arm/patches/ipipe-core-3.2.21-arm-1.patch

4) There were four conflicting files, namely

arch/arm/common/gic.c
arch/arm/mach-omap2/irq.c
arch/arm/plat-mxc/gic.c
arch/arm/plat-omap/include/plat/irqs.h

5) I compared these four files to the vanilla linux-kernel-3.2.21 and
patch these 4 files individually from {original_angstrom_kernel} with
{vanilla-kernel-3.2.21}. Now i save the newly patched kernel source
as
{pre_patched_original_angstrom_kernel}

6) I ran the prepare-kernel script again with the --linux directed to
the {pre_patched_original_angstrom_kernel} and the patch went through
fine. So now i have a copy of i-pipe patched source {ipipe_patched_original_angstrom_kernel}

7) I proceed with copying the .config function from arch/arm/configs/omap2plus_defconfig and run the make menuconfig with

$make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- menuconfig

and save the kernel configuration

8) i then proceed to compile the kernel with the following command

$make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- uImage

9) The compilation fails and it gives the following error

arch/arm/mach-omap2/devices.c:1096:12: error:
'AM33XX_IRQ_ICSS0_0'
undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1101:12: error:
'AM33XX_IRQ_ICSS0_1'
undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1106:12: error:
'AM33XX_IRQ_ICSS0_2'
undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1111:12: error:
'AM33XX_IRQ_ICSS0_3'
undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1116:12: error:
'AM33XX_IRQ_ICSS0_4'
undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1121:12: error:
'AM33XX_IRQ_ICSS0_5'
undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1126:12: error:
'AM33XX_IRQ_ICSS0_6'
undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1131:12: error:
'AM33XX_IRQ_ICSS0_7'
undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1260:12: error:
'AM33XX_IRQ_CPSW_C0_RX'
undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1260:3: error: initializer element is
not constant
| arch/arm/mach-omap2/devices.c:1260:3: error: (near initialization
for
'am33xx_cpsw_resources[2].start')
| arch/arm/mach-omap2/devices.c:1261:3: error: initializer element is
not constant
| arch/arm/mach-omap2/devices.c:1261:3: error: (near initialization
for
'am33xx_cpsw_resources[2].end')
| arch/arm/mach-omap2/devices.c:1265:12: error:
'AM33XX_IRQ_DMTIMER5'
undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1265:3: error: initializer element is
not constant
| arch/arm/mach-omap2/devices.c:1265:3: error: (near initialization
for
'am33xx_cpsw_resources[3].start')
| arch/arm/mach-omap2/devices.c:1266:3: error: initializer element is
not constant
| arch/arm/mach-omap2/devices.c:1266:3: error: (near initialization
for
'am33xx_cpsw_resources[3].end')
| arch/arm/mach-omap2/devices.c:1270:12: error:
'AM33XX_IRQ_DMTIMER6'
undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1270:3: error: initializer element is
not constant
| arch/arm/mach-omap2/devices.c:1270:3: error: (near initialization
for
'am33xx_cpsw_resources[4].start')
| arch/arm/mach-omap2/devices.c:1271:3: error: initializer element is
not constant
| arch/arm/mach-omap2/devices.c:1271:3: error: (near initialization
for
'am33xx_cpsw_resources[4].end')
| arch/arm/mach-omap2/devices.c:1275:12: error:
'AM33XX_IRQ_CPSW_C0'
undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1275:3: error: initializer element is
not constant
| arch/arm/mach-omap2/devices.c:1275:3: error: (near initialization
for
'am33xx_cpsw_resources[5].start')
| arch/arm/mach-omap2/devices.c:1276:3: error: initializer element is
not constant
| arch/arm/mach-omap2/devices.c:1276:3: error: (near initialization
for
'am33xx_cpsw_resources[5].end')

I read from this link
http://www.xenomai.org/pipermail/xenomai/2012-July/000476.html
that
for
the kernel to boot properly on the AM3359 two changes needs to be made.
I had yet to made these changes as i want to see if the kernel source
would compiled and to verify my steps.

Quoted 1 line

Is my approach correct? Any advice on how to solve this problem?

Quoted 7 lines

There is no correct approach, there is more than one way to do it. Does
the un-patched kernel compile with the .config you use? If yes, does
the
patched kernel compile with CONFIG_IPIPE and CONFIG_XENOMAI disabled?

Sorry about the private reply Gilles, I clicked the reply button instead of reply all.

Quoted 5 lines

The un-patched kernel compile fine with the original .config.

The ipipe patched kernel with CONFIG_IPIPE and CONFIG_XENOMAI disable
shows the same compilation error as before.

Quoted 9 lines

This looks like an error due to some changes made by the I-pipe patch to
the include files. In order to debug this, you have to simply pre-process the file, and try and understand what happens. If at the top
of the build tree, you run "make arch/arm/mach-omap2/devices.i" with the
proper make variables set, the kernel makefile should generate the pre-processed file.

Quoted 3 lines

I compared the devices.i and noticed that in the function where the compile error occurs the constant variables are not well defined. But how do I know which includes files are modified?

You have to check which header defines the constant, and how it gets included in the correct devices.i, then look at the incorrect one, and check what prevents the include file from being included.

Signature · 1 line
					    Gilles.
#6 lore raw
Quoted 206 lines · Gilles Chanteperdrix
Quoted 205 lines · WONG Sheng Chao
Quoted 203 lines · Gilles Chanteperdrix
Quoted 187 lines · WONG Sheng Chao
Quoted 173 lines · Gilles Chanteperdrix
Quoted 170 lines · WONG Sheng Chao

Hi

I am trying to get Xenomai working on the beaglebone (AM3359) and I
had
been following the instructions from this mailing list

http://www.xenomai.org/pipermail/xenomai/2012-September/026190.html

The steps that I went through was such

1) I configured the Angstorm distribution with linux kernel 3.2.21 for
beaglebone using bitbake

2) Copied the kernel source from it and saved it as {original_angstrom_kernel}

3) I then ran the patch script from xenomai-2.6.1

$./prepare-kernel.sh --linux={original_angstrom_kernel} --arch=arm

--adeos=/xenomai-2.6.1/ksrc/arch/arm/patches/ipipe-core-3.2.21-arm-1.patch

4) There were four conflicting files, namely

arch/arm/common/gic.c
arch/arm/mach-omap2/irq.c
arch/arm/plat-mxc/gic.c
arch/arm/plat-omap/include/plat/irqs.h

5) I compared these four files to the vanilla linux-kernel-3.2.21 and
patch these 4 files individually from {original_angstrom_kernel} with
{vanilla-kernel-3.2.21}. Now i save the newly patched kernel source
as
{pre_patched_original_angstrom_kernel}

6) I ran the prepare-kernel script again with the --linux directed to
the {pre_patched_original_angstrom_kernel} and the patch went through
fine. So now i have a copy of i-pipe patched source {ipipe_patched_original_angstrom_kernel}

7) I proceed with copying the .config function from arch/arm/configs/omap2plus_defconfig and run the make menuconfig with

$make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- menuconfig

and save the kernel configuration

8) i then proceed to compile the kernel with the following command

$make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- uImage

9) The compilation fails and it gives the following error

arch/arm/mach-omap2/devices.c:1096:12: error:
'AM33XX_IRQ_ICSS0_0'
undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1101:12: error:
'AM33XX_IRQ_ICSS0_1'
undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1106:12: error:
'AM33XX_IRQ_ICSS0_2'
undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1111:12: error:
'AM33XX_IRQ_ICSS0_3'
undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1116:12: error:
'AM33XX_IRQ_ICSS0_4'
undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1121:12: error:
'AM33XX_IRQ_ICSS0_5'
undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1126:12: error:
'AM33XX_IRQ_ICSS0_6'
undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1131:12: error:
'AM33XX_IRQ_ICSS0_7'
undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1260:12: error:
'AM33XX_IRQ_CPSW_C0_RX'
undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1260:3: error: initializer element is
not constant
| arch/arm/mach-omap2/devices.c:1260:3: error: (near initialization
for
'am33xx_cpsw_resources[2].start')
| arch/arm/mach-omap2/devices.c:1261:3: error: initializer element is
not constant
| arch/arm/mach-omap2/devices.c:1261:3: error: (near initialization
for
'am33xx_cpsw_resources[2].end')
| arch/arm/mach-omap2/devices.c:1265:12: error:
'AM33XX_IRQ_DMTIMER5'
undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1265:3: error: initializer element is
not constant
| arch/arm/mach-omap2/devices.c:1265:3: error: (near initialization
for
'am33xx_cpsw_resources[3].start')
| arch/arm/mach-omap2/devices.c:1266:3: error: initializer element is
not constant
| arch/arm/mach-omap2/devices.c:1266:3: error: (near initialization
for
'am33xx_cpsw_resources[3].end')
| arch/arm/mach-omap2/devices.c:1270:12: error:
'AM33XX_IRQ_DMTIMER6'
undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1270:3: error: initializer element is
not constant
| arch/arm/mach-omap2/devices.c:1270:3: error: (near initialization
for
'am33xx_cpsw_resources[4].start')
| arch/arm/mach-omap2/devices.c:1271:3: error: initializer element is
not constant
| arch/arm/mach-omap2/devices.c:1271:3: error: (near initialization
for
'am33xx_cpsw_resources[4].end')
| arch/arm/mach-omap2/devices.c:1275:12: error:
'AM33XX_IRQ_CPSW_C0'
undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1275:3: error: initializer element is
not constant
| arch/arm/mach-omap2/devices.c:1275:3: error: (near initialization
for
'am33xx_cpsw_resources[5].start')
| arch/arm/mach-omap2/devices.c:1276:3: error: initializer element is
not constant
| arch/arm/mach-omap2/devices.c:1276:3: error: (near initialization
for
'am33xx_cpsw_resources[5].end')

I read from this link
http://www.xenomai.org/pipermail/xenomai/2012-July/000476.html
that
for
the kernel to boot properly on the AM3359 two changes needs to be made.
I had yet to made these changes as i want to see if the kernel source
would compiled and to verify my steps.

Quoted 1 line

Is my approach correct? Any advice on how to solve this problem?

Quoted 7 lines

There is no correct approach, there is more than one way to do it. Does
the un-patched kernel compile with the .config you use? If yes, does
the
patched kernel compile with CONFIG_IPIPE and CONFIG_XENOMAI disabled?

Sorry about the private reply Gilles, I clicked the reply button instead of reply all.

Quoted 5 lines

The un-patched kernel compile fine with the original .config.

The ipipe patched kernel with CONFIG_IPIPE and CONFIG_XENOMAI disable
shows the same compilation error as before.

This looks like an error due to some changes made by the I-pipe patch to
the include files. In order to debug this, you have to simply pre-process the file, and try and understand what happens. If at the top
of the build tree, you run "make arch/arm/mach-omap2/devices.i" with the
proper make variables set, the kernel makefile should generate the pre-processed file.

Quoted 7 lines
Quoted 3 lines

I compared the devices.i and noticed that in the function where the compile error occurs the constant variables are not well defined. But how do I know which includes files are modified?

You have to check which header defines the constant, and how it gets included in the correct devices.i, then look at the incorrect one, and check what prevents the include file from being included.

Hi Gilles

Following your advice i tracked down the include files which need to be included to remove the error. The kernel now compiles without errors. I followed the instructions in

http://www.xenomai.org/pipermail/xenomai/2012-July/000481.html

to change the timer.c and also changing the .handle_irq with ipipe_handle_multi_irq

From the serial terminal i noticed that with CONFIG_IPIPE = ON the timer is used correctly as in the above post but it hangs at

[    0.958295] at24 1-0051: 32768 byte 24c256 EEPROM, writable, 64 bytes/write

I followed the troubleshooting guide at

http://www.xenomai.org/index.php/I-pipe-core:ArmPorting#Troubleshooting

With both CONFIG_XENOMAI and CONFIG_IPIPE off, the kernel was able to boot normally

Uncompressing Linux... done, booting the kernel.

[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 3.2.21-ipipe (chao@chao-laptop) (gcc version 4.5.4 20120305 (prerelease) (GCC) ) #1 Tue Nov 27 17:19:52 CET 2012
[    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine: am335xevm
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] AM335X ES1.0 (sgx neon )
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 65024
[    0.000000] Kernel command line: console=ttyO0,115200n8 root=/dev/mmcblk0p2 ro rootfstype=ext4 rootwait ip=none
[    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Memory: 256MB = 256MB total
[    0.000000] Memory: 252968k/252968k available, 9176k 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 : 0xd0800000 - 0xff000000   ( 744 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc05bdd54   (5848 kB)
[    0.000000]       .init : 0xc05be000 - 0xc0600000   ( 264 kB)
[    0.000000]       .data : 0xc0600000 - 0xc064eea8   ( 316 kB)
[    0.000000]        .bss : 0xc064eecc - 0xc06b9214   ( 425 kB)
[    0.000000] NR_IRQS:410 nr_irqs:410 410
[    0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
[    0.000000] Total of 128 interrupts on 1 active controller
[    0.000000] OMAP clockevent source: GPTIMER2 at 24000000 Hz
[    0.000000] OMAP clocksource: GPTIMER1 at 24000000 Hz
[    0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
[    0.000000] Console: colour dummy device 80x30
[    0.000244] Calibrating delay loop... 498.89 BogoMIPS (lpj=2494464)
[    0.118703] pid_max: default: 32768 minimum: 301
[    0.118865] Security Framework initialized
[    0.118942] Mount-cache hash table entries: 512
[    0.119410] Initializing cgroup subsys cpuacct
[    0.119462] Initializing cgroup subsys devices
[    0.119478] Initializing cgroup subsys freezer
[    0.119558] CPU: Testing write buffer coherency: ok
[    0.120847] devtmpfs: initialized
[    0.141418] omap_hwmod: gfx: failed to hardreset
[    0.158137] omap_hwmod: pruss: failed to hardreset
[    0.158801] print_constraints: dummy:
[    0.159070] NET: Registered protocol family 16
[    0.160363] OMAP GPIO hardware version 0.1
[    0.161676] omap_mux_init: Add partition: #1: core, flags: 0
[    0.163248]  omap_i2c.1: alias fck already exists
[    0.163661] hw-breakpoint: debug architecture 0x4 unsupported.
[    0.163848]  omap2_mcspi.1: alias fck already exists
[    0.163985]  omap2_mcspi.2: alias fck already exists
[    0.164171]  edma.0: alias fck already exists
[    0.164198]  edma.0: alias fck already exists
[    0.164222]  edma.0: alias fck already exists
[    0.164320] cape: pcm register
[    0.174334] bio: create slab <bio-0> at 0
[    0.175680] SCSI subsystem initialized
[    0.176720] usbcore: registered new interface driver usbfs
[    0.176869] usbcore: registered new interface driver hub
[    0.177082] usbcore: registered new device driver usb
[    0.177245] musb-ti81xx musb-ti81xx: musb0, board_mode=0x13, plat_mode=0x3
[    0.177408] musb-ti81xx musb-ti81xx: musb1, board_mode=0x13, plat_mode=0x1
[    0.177955] omap_i2c omap_i2c.1: bus 1 rev2.4.0 at 100 kHz
[    0.179282] Advanced Linux Sound Architecture Driver Version 1.0.24.
[    0.179941] Switching to clocksource gp timer
[    0.207177] musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
[    0.207397] musb-hdrc musb-hdrc.0: dma type: pio
[    0.207605] MUSB0 controller's USBSS revision = 4ea20800
[    0.208120] musb-hdrc musb-hdrc.0: USB OTG mode controller at d081c000 using PIO, IRQ 18
[    0.208468] musb-hdrc musb-hdrc.1: dma type: pio
[    0.208658] MUSB1 controller's USBSS revision = 4ea20800
[    0.208803] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
[    0.208912] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 1
[    0.209083] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    0.209106] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.209124] usb usb1: Product: MUSB HDRC host driver
[    0.209140] usb usb1: Manufacturer: Linux 3.2.21-ipipe musb-hcd
[    0.209155] usb usb1: SerialNumber: musb-hdrc.1
[    0.209949] hub 1-0:1.0: USB hub found
[    0.210075] hub 1-0:1.0: 1 port detected
[    0.210643] musb-hdrc musb-hdrc.1: USB Host mode controller at d081e800 using PIO, IRQ 19
[    0.211105] NET: Registered protocol family 2
[    0.211358] IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.211866] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
[    0.212090] TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
[    0.212226] TCP: Hash tables configured (established 8192 bind 8192)
[    0.212242] TCP reno registered
[    0.212260] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.212292] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.212623] NET: Registered protocol family 1
[    0.213057] RPC: Registered named UNIX socket transport module.
[    0.213077] RPC: Registered udp transport module.
[    0.213090] RPC: Registered tcp transport module.
[    0.213103] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.213649] cpuidle-am33xx cpuidle-am33xx.0: failed to register driver
[    0.215173] audit: initializing netlink socket (disabled)
[    0.215242] type=2000 audit(0.210:1): initialized
[    0.226622] VFS: Disk quotas dquot_6.5.2
[    0.226705] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.228060] msgmni has been set to 494
[    0.229491] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    0.229517] io scheduler noop registered
[    0.229531] io scheduler deadline registered
[    0.229594] io scheduler cfq registered (default)
[    0.230798] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[    0.232402] omap_uart.0: ttyO0 at MMIO 0x44e09000 (irq = 72) is a OMAP UART0
[    0.834573] console [ttyO0] enabled
[    0.838986] omap_uart.1: ttyO1 at MMIO 0x48022000 (irq = 73) is a OMAP UART1
[    0.846942] omap_uart.2: ttyO2 at MMIO 0x48024000 (irq = 74) is a OMAP UART2
[    0.854853] omap_uart.3: ttyO3 at MMIO 0x481a6000 (irq = 44) is a OMAP UART3
[    0.862748] omap_uart.4: ttyO4 at MMIO 0x481a8000 (irq = 45) is a OMAP UART4
[    0.870645] omap_uart.5: ttyO5 at MMIO 0x481aa000 (irq = 46) is a OMAP UART5
[    0.879787] brd: module loaded
[    0.887606] loop: module loaded
[    0.891067] at24 1-0051: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
[    0.949996] No daughter card found
[    0.953630] at24 1-0050: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
[    0.968911] Board name: A335BONE
[    0.972328] Board version: 00A6
[    0.975629] The board is a AM335x Beaglebone.
[    0.980934] tps65217 1-0024: TPS65217 ID 0xf version 1.1
[    0.988396] print_constraints: DCDC1: 900 <--> 1800 mV at 1800 mV
[    0.996824] print_constraints: DCDC2: 900 <--> 3300 mV at 1275 mV
[    1.005246] print_constraints: DCDC3: 900 <--> 1500 mV at 1100 mV
[    1.013632] print_constraints: LDO1: 1000 <--> 3300 mV at 1800 mV
[    1.022025] print_constraints: LDO2: 900 <--> 3300 mV at 3300 mV
[    1.030303] print_constraints: LDO3: 1800 <--> 3300 mV at 3300 mV
[    1.038701] print_constraints: LDO4: 1800 <--> 3300 mV at 3300 mV
[    1.045724] Maximum current provided by the USB port is 500mA which is not sufficient when operating @OPP120 and OPPTURBO. The current requirement for some use-cases using OPP100 might also exceed the maximum current that the USB port can provide. Unless you are fully confident that the current requirements for OPP100 use-case don't exceed the USB limits, switching to AC power is recommended.
[    1.082552]  omap_i2c.3: alias fck already exists
[    1.087824] omap_i2c omap_i2c.3: bus 3 rev2.4.0 at 100 kHz
[    1.098210] at24 3-0054: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
[    1.159999] BeagleBone cape EEPROM: could not read eeprom at address 0x54

Here's the log with CONFIG_XENOMAI = OFF and CONFIG_IPIPE = ON

Uncompressing Linux... done, booting the kernel.

[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 3.2.21-ipipe (chao@chao-laptop) (gcc version 4.5.4 20120305 (prerelease) (GCC) ) #1 PREEMPT Tue Nov 27 17:36:26 CET 2012
[    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine: am335xevm
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] AM335X ES1.0 (sgx neon )
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 65024
[    0.000000] Kernel command line: console=ttyO0,115200n8 root=/dev/mmcblk0p2 ro rootfstype=ext4 rootwait ip=none
[    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Memory: 256MB = 256MB total
[    0.000000] Memory: 252464k/252464k available, 9680k 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 : 0xd0800000 - 0xff000000   ( 744 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc061123c   (6181 kB)
[    0.000000]       .init : 0xc0612000 - 0xc0655000   ( 268 kB)
[    0.000000]       .data : 0xc0656000 - 0xc06a6868   ( 323 kB)
[    0.000000]        .bss : 0xc06a688c - 0xc0737d54   ( 582 kB)
[    0.000000] NR_IRQS:410 nr_irqs:410 410
[    0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
[    0.000000] Total of 128 interrupts on 1 active controller
[    0.000000] OMAP clockevent source: GPTIMER2 at 24000000 Hz
[    0.000000] OMAP clocksource: GPTIMER3 at 24000000 Hz
[    0.000000] I-pipe, 24.000 MHz clocksource
[    0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
[    0.000000] Interrupt pipeline (release #1)
[    0.000000] Console: colour dummy device 80x30
[    0.000735] Calibrating delay loop... 498.89 BogoMIPS (lpj=2494464)
[    0.118663] pid_max: default: 32768 minimum: 301
[    0.118881] Security Framework initialized
[    0.118984] Mount-cache hash table entries: 512
[    0.119570] Initializing cgroup subsys cpuacct
[    0.119627] Initializing cgroup subsys devices
[    0.119645] Initializing cgroup subsys freezer
[    0.119746] CPU: Testing write buffer coherency: ok
[    0.121323] devtmpfs: initialized
[    0.142538] omap_hwmod: gfx: failed to hardreset
[    0.159288] omap_hwmod: pruss: failed to hardreset
[    0.160005] print_constraints: dummy:
[    0.160342] NET: Registered protocol family 16
[    0.161800] OMAP GPIO hardware version 0.1
[    0.163363] omap_mux_init: Add partition: #1: core, flags: 0
[    0.165179]  omap_i2c.1: alias fck already exists
[    0.165644] hw-breakpoint: debug architecture 0x4 unsupported.
[    0.165856]  omap2_mcspi.1: alias fck already exists
[    0.166011]  omap2_mcspi.2: alias fck already exists
[    0.166215]  edma.0: alias fck already exists
[    0.166245]  edma.0: alias fck already exists
[    0.166271]  edma.0: alias fck already exists
[    0.166381] cape: pcm register
[    0.177948] bio: create slab <bio-0> at 0
[    0.179694] SCSI subsystem initialized
[    0.180900] usbcore: registered new interface driver usbfs
[    0.181072] usbcore: registered new interface driver hub
[    0.181333] usbcore: registered new device driver usb
[    0.181530] musb-ti81xx musb-ti81xx: musb0, board_mode=0x13, plat_mode=0x3
[    0.181709] musb-ti81xx musb-ti81xx: musb1, board_mode=0x13, plat_mode=0x1
[    0.182363] omap_i2c omap_i2c.1: bus 1 rev2.4.0 at 100 kHz
[    0.183779] Advanced Linux Sound Architecture Driver Version 1.0.24.
[    0.184506] Switching to clocksource ipipe_tsc
[    0.220287] musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
[    0.220545] musb-hdrc musb-hdrc.0: dma type: pio
[    0.220788] MUSB0 controller's USBSS revision = 4ea20800
[    0.221366] musb-hdrc musb-hdrc.0: USB OTG mode controller at d081c000 using PIO, IRQ 18
[    0.221763] musb-hdrc musb-hdrc.1: dma type: pio
[    0.221979] MUSB1 controller's USBSS revision = 4ea20800
[    0.222143] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
[    0.222276] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 1
[    0.222485] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    0.222510] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.222532] usb usb1: Product: MUSB HDRC host driver
[    0.222549] usb usb1: Manufacturer: Linux 3.2.21-ipipe musb-hcd
[    0.222566] usb usb1: SerialNumber: musb-hdrc.1
[    0.223435] hub 1-0:1.0: USB hub found
[    0.223478] hub 1-0:1.0: 1 port detected
[    0.224106] musb-hdrc musb-hdrc.1: USB Host mode controller at d081e800 using PIO, IRQ 19
[    0.224699] NET: Registered protocol family 2
[    0.224989] IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.225617] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
[    0.225845] TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
[    0.225982] TCP: Hash tables configured (established 8192 bind 8192)
[    0.226001] TCP reno registered
[    0.226021] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.226056] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.226446] NET: Registered protocol family 1
[    0.227121] RPC: Registered named UNIX socket transport module.
[    0.227146] RPC: Registered udp transport module.
[    0.227162] RPC: Registered tcp transport module.
[    0.227176] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.227832] cpuidle-am33xx cpuidle-am33xx.0: failed to register driver
[    0.229751] audit: initializing netlink socket (disabled)
[    0.229835] type=2000 audit(0.180:1): initialized
[    0.241446] VFS: Disk quotas dquot_6.5.2
[    0.241550] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.243359] msgmni has been set to 493
[    0.245251] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    0.245282] io scheduler noop registered
[    0.245297] io scheduler deadline registered
[    0.245392] io scheduler cfq registered (default)
[    0.246642] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[    0.248598] omap_uart.0: ttyO0 at MMIO 0x44e09000 (irq = 72) is a OMAP UART0
[    0.860338] console [ttyO0] enabled
[    0.864664] omap_uart.1: ttyO1 at MMIO 0x48022000 (irq = 73) is a OMAP UART1
[    0.872618] omap_uart.2: ttyO2 at MMIO 0x48024000 (irq = 74) is a OMAP UART2
[    0.880574] omap_uart.3: ttyO3 at MMIO 0x481a6000 (irq = 44) is a OMAP UART3
[    0.888525] omap_uart.4: ttyO4 at MMIO 0x481a8000 (irq = 45) is a OMAP UART4
[    0.896491] omap_uart.5: ttyO5 at MMIO 0x481aa000 (irq = 46) is a OMAP UART5
[    0.905879] brd: module loaded
[    0.914179] loop: module loaded
[    0.917564] at24 1-0051: 32768 byte 24c256 EEPROM, writable, 64 bytes/write

Any advice on how to proceed to debug this problem? I attach the config files of two cases for your reference.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: config_with_xenomai_off_ipipe_off
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20121127/cd61c917/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: config_with_xenomai_off_ipipe_on
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20121127/cd61c917/attachment-0001.ksh>

#7 lore raw
Quoted 561 lines · WONG Sheng Chao
Quoted 206 lines · Gilles Chanteperdrix
Quoted 205 lines · WONG Sheng Chao
Quoted 203 lines · Gilles Chanteperdrix
Quoted 187 lines · WONG Sheng Chao
Quoted 173 lines · Gilles Chanteperdrix
Quoted 170 lines · WONG Sheng Chao

Hi

I am trying to get Xenomai working on the beaglebone (AM3359) and I
had
been following the instructions from this mailing list

http://www.xenomai.org/pipermail/xenomai/2012-September/026190.html

The steps that I went through was such

1) I configured the Angstorm distribution with linux kernel 3.2.21 for
beaglebone using bitbake

2) Copied the kernel source from it and saved it as {original_angstrom_kernel}

3) I then ran the patch script from xenomai-2.6.1

$./prepare-kernel.sh --linux={original_angstrom_kernel} --arch=arm

--adeos=/xenomai-2.6.1/ksrc/arch/arm/patches/ipipe-core-3.2.21-arm-1.patch

4) There were four conflicting files, namely

arch/arm/common/gic.c
arch/arm/mach-omap2/irq.c
arch/arm/plat-mxc/gic.c
arch/arm/plat-omap/include/plat/irqs.h

5) I compared these four files to the vanilla linux-kernel-3.2.21 and
patch these 4 files individually from {original_angstrom_kernel} with
{vanilla-kernel-3.2.21}. Now i save the newly patched kernel source
as
{pre_patched_original_angstrom_kernel}

6) I ran the prepare-kernel script again with the --linux directed to
the {pre_patched_original_angstrom_kernel} and the patch went through
fine. So now i have a copy of i-pipe patched source {ipipe_patched_original_angstrom_kernel}

7) I proceed with copying the .config function from arch/arm/configs/omap2plus_defconfig and run the make menuconfig with

$make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- menuconfig

and save the kernel configuration

8) i then proceed to compile the kernel with the following command

$make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- uImage

9) The compilation fails and it gives the following error

arch/arm/mach-omap2/devices.c:1096:12: error:
'AM33XX_IRQ_ICSS0_0'
undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1101:12: error:
'AM33XX_IRQ_ICSS0_1'
undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1106:12: error:
'AM33XX_IRQ_ICSS0_2'
undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1111:12: error:
'AM33XX_IRQ_ICSS0_3'
undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1116:12: error:
'AM33XX_IRQ_ICSS0_4'
undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1121:12: error:
'AM33XX_IRQ_ICSS0_5'
undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1126:12: error:
'AM33XX_IRQ_ICSS0_6'
undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1131:12: error:
'AM33XX_IRQ_ICSS0_7'
undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1260:12: error:
'AM33XX_IRQ_CPSW_C0_RX'
undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1260:3: error: initializer element is
not constant
| arch/arm/mach-omap2/devices.c:1260:3: error: (near initialization
for
'am33xx_cpsw_resources[2].start')
| arch/arm/mach-omap2/devices.c:1261:3: error: initializer element is
not constant
| arch/arm/mach-omap2/devices.c:1261:3: error: (near initialization
for
'am33xx_cpsw_resources[2].end')
| arch/arm/mach-omap2/devices.c:1265:12: error:
'AM33XX_IRQ_DMTIMER5'
undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1265:3: error: initializer element is
not constant
| arch/arm/mach-omap2/devices.c:1265:3: error: (near initialization
for
'am33xx_cpsw_resources[3].start')
| arch/arm/mach-omap2/devices.c:1266:3: error: initializer element is
not constant
| arch/arm/mach-omap2/devices.c:1266:3: error: (near initialization
for
'am33xx_cpsw_resources[3].end')
| arch/arm/mach-omap2/devices.c:1270:12: error:
'AM33XX_IRQ_DMTIMER6'
undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1270:3: error: initializer element is
not constant
| arch/arm/mach-omap2/devices.c:1270:3: error: (near initialization
for
'am33xx_cpsw_resources[4].start')
| arch/arm/mach-omap2/devices.c:1271:3: error: initializer element is
not constant
| arch/arm/mach-omap2/devices.c:1271:3: error: (near initialization
for
'am33xx_cpsw_resources[4].end')
| arch/arm/mach-omap2/devices.c:1275:12: error:
'AM33XX_IRQ_CPSW_C0'
undeclared here (not in a function)
| arch/arm/mach-omap2/devices.c:1275:3: error: initializer element is
not constant
| arch/arm/mach-omap2/devices.c:1275:3: error: (near initialization
for
'am33xx_cpsw_resources[5].start')
| arch/arm/mach-omap2/devices.c:1276:3: error: initializer element is
not constant
| arch/arm/mach-omap2/devices.c:1276:3: error: (near initialization
for
'am33xx_cpsw_resources[5].end')

I read from this link
http://www.xenomai.org/pipermail/xenomai/2012-July/000476.html
that
for
the kernel to boot properly on the AM3359 two changes needs to be made.
I had yet to made these changes as i want to see if the kernel source
would compiled and to verify my steps.

Quoted 1 line

Is my approach correct? Any advice on how to solve this problem?

Quoted 7 lines

There is no correct approach, there is more than one way to do it. Does
the un-patched kernel compile with the .config you use? If yes, does
the
patched kernel compile with CONFIG_IPIPE and CONFIG_XENOMAI disabled?

Sorry about the private reply Gilles, I clicked the reply button instead of reply all.

Quoted 5 lines

The un-patched kernel compile fine with the original .config.

The ipipe patched kernel with CONFIG_IPIPE and CONFIG_XENOMAI disable
shows the same compilation error as before.

This looks like an error due to some changes made by the I-pipe patch to
the include files. In order to debug this, you have to simply pre-process the file, and try and understand what happens. If at the top
of the build tree, you run "make arch/arm/mach-omap2/devices.i" with the
proper make variables set, the kernel makefile should generate the pre-processed file.

Quoted 7 lines
Quoted 3 lines

I compared the devices.i and noticed that in the function where the compile error occurs the constant variables are not well defined. But how do I know which includes files are modified?

You have to check which header defines the constant, and how it gets included in the correct devices.i, then look at the incorrect one, and check what prevents the include file from being included.

Hi Gilles

Following your advice i tracked down the include files which need to be included to remove the error. The kernel now compiles without errors. I followed the instructions in

http://www.xenomai.org/pipermail/xenomai/2012-July/000481.html

to change the timer.c and also changing the .handle_irq with ipipe_handle_multi_irq

From the serial terminal i noticed that with CONFIG_IPIPE = ON the timer is used correctly as in the above post but it hangs at

[    0.958295] at24 1-0051: 32768 byte 24c256 EEPROM, writable, 64

bytes/write

I followed the troubleshooting guide at

http://www.xenomai.org/index.php/I-pipe-core:ArmPorting#Troubleshooting

With both CONFIG_XENOMAI and CONFIG_IPIPE off, the kernel was able to boot normally

Uncompressing Linux... done, booting the kernel.

[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 3.2.21-ipipe (chao@chao-laptop) (gcc
version 4.5.4 20120305 (prerelease) (GCC) ) #1 Tue Nov 27 17:19:52 CET
2012
[    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7),
cr=10c53c7d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing
instruction cache
[    0.000000] Machine: am335xevm
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] AM335X ES1.0 (sgx neon )
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.
Total pages: 65024
[    0.000000] Kernel command line: console=ttyO0,115200n8
root=/dev/mmcblk0p2 ro rootfstype=ext4 rootwait ip=none
[    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000000] Dentry cache hash table entries: 32768 (order: 5,
131072 bytes)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Memory: 256MB = 256MB total
[    0.000000] Memory: 252968k/252968k available, 9176k 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 : 0xd0800000 - 0xff000000   ( 744 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc05bdd54   (5848 kB)
[    0.000000]       .init : 0xc05be000 - 0xc0600000   ( 264 kB)
[    0.000000]       .data : 0xc0600000 - 0xc064eea8   ( 316 kB)
[    0.000000]        .bss : 0xc064eecc - 0xc06b9214   ( 425 kB)
[    0.000000] NR_IRQS:410 nr_irqs:410 410
[    0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with
128 interrupts
[    0.000000] Total of 128 interrupts on 1 active controller
[    0.000000] OMAP clockevent source: GPTIMER2 at 24000000 Hz
[    0.000000] OMAP clocksource: GPTIMER1 at 24000000 Hz
[    0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps
every 178956ms
[    0.000000] Console: colour dummy device 80x30
[    0.000244] Calibrating delay loop... 498.89 BogoMIPS (lpj=2494464)
[    0.118703] pid_max: default: 32768 minimum: 301
[    0.118865] Security Framework initialized
[    0.118942] Mount-cache hash table entries: 512
[    0.119410] Initializing cgroup subsys cpuacct
[    0.119462] Initializing cgroup subsys devices
[    0.119478] Initializing cgroup subsys freezer
[    0.119558] CPU: Testing write buffer coherency: ok
[    0.120847] devtmpfs: initialized
[    0.141418] omap_hwmod: gfx: failed to hardreset
[    0.158137] omap_hwmod: pruss: failed to hardreset
[    0.158801] print_constraints: dummy:
[    0.159070] NET: Registered protocol family 16
[    0.160363] OMAP GPIO hardware version 0.1
[    0.161676] omap_mux_init: Add partition: #1: core, flags: 0
[    0.163248]  omap_i2c.1: alias fck already exists
[    0.163661] hw-breakpoint: debug architecture 0x4 unsupported.
[    0.163848]  omap2_mcspi.1: alias fck already exists
[    0.163985]  omap2_mcspi.2: alias fck already exists
[    0.164171]  edma.0: alias fck already exists
[    0.164198]  edma.0: alias fck already exists
[    0.164222]  edma.0: alias fck already exists
[    0.164320] cape: pcm register
[    0.174334] bio: create slab <bio-0> at 0
[    0.175680] SCSI subsystem initialized
[    0.176720] usbcore: registered new interface driver usbfs
[    0.176869] usbcore: registered new interface driver hub
[    0.177082] usbcore: registered new device driver usb
[    0.177245] musb-ti81xx musb-ti81xx: musb0, board_mode=0x13, plat_mode=0x3
[    0.177408] musb-ti81xx musb-ti81xx: musb1, board_mode=0x13, plat_mode=0x1
[    0.177955] omap_i2c omap_i2c.1: bus 1 rev2.4.0 at 100 kHz
[    0.179282] Advanced Linux Sound Architecture Driver Version 1.0.24.
[    0.179941] Switching to clocksource gp timer
[    0.207177] musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
[    0.207397] musb-hdrc musb-hdrc.0: dma type: pio
[    0.207605] MUSB0 controller's USBSS revision = 4ea20800
[    0.208120] musb-hdrc musb-hdrc.0: USB OTG mode controller at
d081c000 using PIO, IRQ 18
[    0.208468] musb-hdrc musb-hdrc.1: dma type: pio
[    0.208658] MUSB1 controller's USBSS revision = 4ea20800
[    0.208803] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
[    0.208912] musb-hdrc musb-hdrc.1: new USB bus registered,
assigned bus number 1
[    0.209083] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    0.209106] usb usb1: New USB device strings: Mfr=3, Product=2,
SerialNumber=1
[    0.209124] usb usb1: Product: MUSB HDRC host driver
[    0.209140] usb usb1: Manufacturer: Linux 3.2.21-ipipe musb-hcd
[    0.209155] usb usb1: SerialNumber: musb-hdrc.1
[    0.209949] hub 1-0:1.0: USB hub found
[    0.210075] hub 1-0:1.0: 1 port detected
[    0.210643] musb-hdrc musb-hdrc.1: USB Host mode controller at
d081e800 using PIO, IRQ 19
[    0.211105] NET: Registered protocol family 2
[    0.211358] IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.211866] TCP established hash table entries: 8192 (order: 4,
65536 bytes)
[    0.212090] TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
[    0.212226] TCP: Hash tables configured (established 8192 bind 8192)
[    0.212242] TCP reno registered
[    0.212260] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.212292] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.212623] NET: Registered protocol family 1
[    0.213057] RPC: Registered named UNIX socket transport module.
[    0.213077] RPC: Registered udp transport module.
[    0.213090] RPC: Registered tcp transport module.
[    0.213103] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.213649] cpuidle-am33xx cpuidle-am33xx.0: failed to register driver
[    0.215173] audit: initializing netlink socket (disabled)
[    0.215242] type=2000 audit(0.210:1): initialized
[    0.226622] VFS: Disk quotas dquot_6.5.2
[    0.226705] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.228060] msgmni has been set to 494
[    0.229491] Block layer SCSI generic (bsg) driver version 0.4
loaded (major 252)
[    0.229517] io scheduler noop registered
[    0.229531] io scheduler deadline registered
[    0.229594] io scheduler cfq registered (default)
[    0.230798] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[    0.232402] omap_uart.0: ttyO0 at MMIO 0x44e09000 (irq = 72) is a
OMAP UART0
[    0.834573] console [ttyO0] enabled
[    0.838986] omap_uart.1: ttyO1 at MMIO 0x48022000 (irq = 73) is a
OMAP UART1
[    0.846942] omap_uart.2: ttyO2 at MMIO 0x48024000 (irq = 74) is a
OMAP UART2
[    0.854853] omap_uart.3: ttyO3 at MMIO 0x481a6000 (irq = 44) is a
OMAP UART3
[    0.862748] omap_uart.4: ttyO4 at MMIO 0x481a8000 (irq = 45) is a
OMAP UART4
[    0.870645] omap_uart.5: ttyO5 at MMIO 0x481aa000 (irq = 46) is a
OMAP UART5
[    0.879787] brd: module loaded
[    0.887606] loop: module loaded
[    0.891067] at24 1-0051: 32768 byte 24c256 EEPROM, writable, 64
bytes/write
[    0.949996] No daughter card found
[    0.953630] at24 1-0050: 32768 byte 24c256 EEPROM, writable, 64
bytes/write
[    0.968911] Board name: A335BONE
[    0.972328] Board version: 00A6
[    0.975629] The board is a AM335x Beaglebone.
[    0.980934] tps65217 1-0024: TPS65217 ID 0xf version 1.1
[    0.988396] print_constraints: DCDC1: 900 <--> 1800 mV at 1800 mV
[    0.996824] print_constraints: DCDC2: 900 <--> 3300 mV at 1275 mV
[    1.005246] print_constraints: DCDC3: 900 <--> 1500 mV at 1100 mV
[    1.013632] print_constraints: LDO1: 1000 <--> 3300 mV at 1800 mV
[    1.022025] print_constraints: LDO2: 900 <--> 3300 mV at 3300 mV
[    1.030303] print_constraints: LDO3: 1800 <--> 3300 mV at 3300 mV
[    1.038701] print_constraints: LDO4: 1800 <--> 3300 mV at 3300 mV
[    1.045724] Maximum current provided by the USB port is 500mA

which is not sufficient when operating @OPP120 and OPPTURBO. The current requirement for some use-cases using OPP100 might also exceed the maximum current that the USB port can provide. Unless you are fully confident that the current requirements for OPP100 use-case don't exceed the USB limits, switching to AC power is recommended.

[    1.082552]  omap_i2c.3: alias fck already exists
[    1.087824] omap_i2c omap_i2c.3: bus 3 rev2.4.0 at 100 kHz
[    1.098210] at24 3-0054: 32768 byte 24c256 EEPROM, writable, 64
bytes/write
[    1.159999] BeagleBone cape EEPROM: could not read eeprom at address 0x54

Here's the log with CONFIG_XENOMAI = OFF and CONFIG_IPIPE = ON

Uncompressing Linux... done, booting the kernel.

[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 3.2.21-ipipe (chao@chao-laptop) (gcc
version 4.5.4 20120305 (prerelease) (GCC) ) #1 PREEMPT Tue Nov 27
17:36:26 CET 2012
[    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7),
cr=10c53c7d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing
instruction cache
[    0.000000] Machine: am335xevm
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] AM335X ES1.0 (sgx neon )
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.
Total pages: 65024
[    0.000000] Kernel command line: console=ttyO0,115200n8
root=/dev/mmcblk0p2 ro rootfstype=ext4 rootwait ip=none
[    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000000] Dentry cache hash table entries: 32768 (order: 5,
131072 bytes)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Memory: 256MB = 256MB total
[    0.000000] Memory: 252464k/252464k available, 9680k 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 : 0xd0800000 - 0xff000000   ( 744 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc061123c   (6181 kB)
[    0.000000]       .init : 0xc0612000 - 0xc0655000   ( 268 kB)
[    0.000000]       .data : 0xc0656000 - 0xc06a6868   ( 323 kB)
[    0.000000]        .bss : 0xc06a688c - 0xc0737d54   ( 582 kB)
[    0.000000] NR_IRQS:410 nr_irqs:410 410
[    0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with
128 interrupts
[    0.000000] Total of 128 interrupts on 1 active controller
[    0.000000] OMAP clockevent source: GPTIMER2 at 24000000 Hz
[    0.000000] OMAP clocksource: GPTIMER3 at 24000000 Hz
[    0.000000] I-pipe, 24.000 MHz clocksource
[    0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps
every 178956ms
[    0.000000] Interrupt pipeline (release #1)
[    0.000000] Console: colour dummy device 80x30
[    0.000735] Calibrating delay loop... 498.89 BogoMIPS (lpj=2494464)
[    0.118663] pid_max: default: 32768 minimum: 301
[    0.118881] Security Framework initialized
[    0.118984] Mount-cache hash table entries: 512
[    0.119570] Initializing cgroup subsys cpuacct
[    0.119627] Initializing cgroup subsys devices
[    0.119645] Initializing cgroup subsys freezer
[    0.119746] CPU: Testing write buffer coherency: ok
[    0.121323] devtmpfs: initialized
[    0.142538] omap_hwmod: gfx: failed to hardreset
[    0.159288] omap_hwmod: pruss: failed to hardreset
[    0.160005] print_constraints: dummy:
[    0.160342] NET: Registered protocol family 16
[    0.161800] OMAP GPIO hardware version 0.1
[    0.163363] omap_mux_init: Add partition: #1: core, flags: 0
[    0.165179]  omap_i2c.1: alias fck already exists
[    0.165644] hw-breakpoint: debug architecture 0x4 unsupported.
[    0.165856]  omap2_mcspi.1: alias fck already exists
[    0.166011]  omap2_mcspi.2: alias fck already exists
[    0.166215]  edma.0: alias fck already exists
[    0.166245]  edma.0: alias fck already exists
[    0.166271]  edma.0: alias fck already exists
[    0.166381] cape: pcm register
[    0.177948] bio: create slab <bio-0> at 0
[    0.179694] SCSI subsystem initialized
[    0.180900] usbcore: registered new interface driver usbfs
[    0.181072] usbcore: registered new interface driver hub
[    0.181333] usbcore: registered new device driver usb
[    0.181530] musb-ti81xx musb-ti81xx: musb0, board_mode=0x13, plat_mode=0x3
[    0.181709] musb-ti81xx musb-ti81xx: musb1, board_mode=0x13, plat_mode=0x1
[    0.182363] omap_i2c omap_i2c.1: bus 1 rev2.4.0 at 100 kHz
[    0.183779] Advanced Linux Sound Architecture Driver Version 1.0.24.
[    0.184506] Switching to clocksource ipipe_tsc
[    0.220287] musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
[    0.220545] musb-hdrc musb-hdrc.0: dma type: pio
[    0.220788] MUSB0 controller's USBSS revision = 4ea20800
[    0.221366] musb-hdrc musb-hdrc.0: USB OTG mode controller at
d081c000 using PIO, IRQ 18
[    0.221763] musb-hdrc musb-hdrc.1: dma type: pio
[    0.221979] MUSB1 controller's USBSS revision = 4ea20800
[    0.222143] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
[    0.222276] musb-hdrc musb-hdrc.1: new USB bus registered,
assigned bus number 1
[    0.222485] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    0.222510] usb usb1: New USB device strings: Mfr=3, Product=2,
SerialNumber=1
[    0.222532] usb usb1: Product: MUSB HDRC host driver
[    0.222549] usb usb1: Manufacturer: Linux 3.2.21-ipipe musb-hcd
[    0.222566] usb usb1: SerialNumber: musb-hdrc.1
[    0.223435] hub 1-0:1.0: USB hub found
[    0.223478] hub 1-0:1.0: 1 port detected
[    0.224106] musb-hdrc musb-hdrc.1: USB Host mode controller at
d081e800 using PIO, IRQ 19
[    0.224699] NET: Registered protocol family 2
[    0.224989] IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.225617] TCP established hash table entries: 8192 (order: 4,
65536 bytes)
[    0.225845] TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
[    0.225982] TCP: Hash tables configured (established 8192 bind 8192)
[    0.226001] TCP reno registered
[    0.226021] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.226056] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.226446] NET: Registered protocol family 1
[    0.227121] RPC: Registered named UNIX socket transport module.
[    0.227146] RPC: Registered udp transport module.
[    0.227162] RPC: Registered tcp transport module.
[    0.227176] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.227832] cpuidle-am33xx cpuidle-am33xx.0: failed to register driver
[    0.229751] audit: initializing netlink socket (disabled)
[    0.229835] type=2000 audit(0.180:1): initialized
[    0.241446] VFS: Disk quotas dquot_6.5.2
[    0.241550] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.243359] msgmni has been set to 493
[    0.245251] Block layer SCSI generic (bsg) driver version 0.4
loaded (major 252)
[    0.245282] io scheduler noop registered
[    0.245297] io scheduler deadline registered
[    0.245392] io scheduler cfq registered (default)
[    0.246642] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[    0.248598] omap_uart.0: ttyO0 at MMIO 0x44e09000 (irq = 72) is a
OMAP UART0
[    0.860338] console [ttyO0] enabled
[    0.864664] omap_uart.1: ttyO1 at MMIO 0x48022000 (irq = 73) is a
OMAP UART1
[    0.872618] omap_uart.2: ttyO2 at MMIO 0x48024000 (irq = 74) is a
OMAP UART2
[    0.880574] omap_uart.3: ttyO3 at MMIO 0x481a6000 (irq = 44) is a
OMAP UART3
[    0.888525] omap_uart.4: ttyO4 at MMIO 0x481a8000 (irq = 45) is a
OMAP UART4
[    0.896491] omap_uart.5: ttyO5 at MMIO 0x481aa000 (irq = 46) is a
OMAP UART5
[    0.905879] brd: module loaded
[    0.914179] loop: module loaded
[    0.917564] at24 1-0051: 32768 byte 24c256 EEPROM, writable, 64

bytes/write

Any advice on how to proceed to debug this problem? I attach the config files of two cases for your reference.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: config_with_xenomai_off_ipipe_off
URL:

<http://www.xenomai.org/pipermail/xenomai/attachments/20121127/cd61c917/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: config_with_xenomai_off_ipipe_on
URL:

Quoted 5 lines

<http://www.xenomai.org/pipermail/xenomai/attachments/20121127/cd61c917/attachment-0001.ksh>
_______________________________________________
Xenomai mailing list
[email protected]
http://www.xenomai.org/mailman/listinfo/xenomai

Here's the renamed config files for the two cases mentioned above

config1 with CONFIG_IPIPE not set
cnofig2 with CONFIG_IPIPE set

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: config1
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20121127/4cf0977f/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: config2
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20121127/4cf0977f/attachment-0001.ksh>

#8 lore raw
In reply to WONG Sheng Chao
Quoted 6 lines · WONG Sheng Chao

Hi Gilles

Following your advice i tracked down the include files which need to be included to remove the error. The kernel now compiles without errors. I followed the instructions in

Quoted 7 lines

http://www.xenomai.org/pipermail/xenomai/2012-July/000481.html

to change the timer.c and also changing the .handle_irq with ipipe_handle_multi_irq

From the serial terminal i noticed that with CONFIG_IPIPE = ON the
timer is used correctly as in the above post but it hangs at

Are you sure the timer is running correctly?

Quoted 2 lines

Any advice on how to proceed to debug this problem? I attach the config files of two cases for your reference.

I would put a printk in linux timer irq handler.

Signature · 1 line
					    Gilles.
#9 lore raw
Quoted 15 lines · Gilles Chanteperdrix
Quoted 6 lines · WONG Sheng Chao

Hi Gilles

Following your advice i tracked down the include files which need to be included to remove the error. The kernel now compiles without errors. I followed the instructions in

Quoted 7 lines

http://www.xenomai.org/pipermail/xenomai/2012-July/000481.html

to change the timer.c and also changing the .handle_irq with ipipe_handle_multi_irq

From the serial terminal i noticed that with CONFIG_IPIPE = ON the
timer is used correctly as in the above post but it hangs at

Quoted 7 lines

Are you sure the timer is running correctly?

Quoted 2 lines

Any advice on how to proceed to debug this problem? I attach the config files of two cases for your reference.

I would put a printk in linux timer irq handler.

How should i come about debugging the timer irq handler?

Looking at the arch/arm/mach-omap2/timer.c i would think the timer handler is omap_itimer.irq ? But i am not sure how to verify it.

As for the omap_intc_handle_irq in arch/arm/mach-omap2/irq.c here is my function which i used from the vender

static inline void omap_intc_handle_irq(void __iomem *base_addr,unsigned int no_regs_req, struct pt_regs *regs)

{
	u32 irqnr = 0;

	do {
		int i = 0;

		for (i = 0; i < no_regs_req; i++) {
			irqnr = readl_relaxed(base_addr + 0x98 + (0x20 * i));
			if (irqnr)
				goto out;
		}

out:

		if (!irqnr)
			break;

		irqnr = readl_relaxed(base_addr + INTCPS_SIR_IRQ_OFFSET);
		irqnr &= ACTIVEIRQ_MASK;

		if (irqnr)
		{
//			handle_IRQ(irqnr, regs);
			ipipe_handle_multi_irq(irqnr, regs); //This is where i added the 
ipipe_handle_multi_irq
		}

	} while (irqnr);
}

Is this the right place for it?

-WONG

#10 lore raw
Quoted 61 lines · WONG Sheng Chao
Quoted 15 lines · Gilles Chanteperdrix
Quoted 6 lines · WONG Sheng Chao

Hi Gilles

Following your advice i tracked down the include files which need to be included to remove the error. The kernel now compiles without errors. I followed the instructions in

Quoted 7 lines

http://www.xenomai.org/pipermail/xenomai/2012-July/000481.html

to change the timer.c and also changing the .handle_irq with ipipe_handle_multi_irq

From the serial terminal i noticed that with CONFIG_IPIPE = ON the
timer is used correctly as in the above post but it hangs at

Quoted 7 lines

Are you sure the timer is running correctly?

Quoted 2 lines

Any advice on how to proceed to debug this problem? I attach the config files of two cases for your reference.

I would put a printk in linux timer irq handler.

How should i come about debugging the timer irq handler?

Looking at the arch/arm/mach-omap2/timer.c i would think the timer handler is omap_itimer.irq ? But i am not sure how to verify it.

As for the omap_intc_handle_irq in arch/arm/mach-omap2/irq.c here is my function which i used from the vender

static inline void omap_intc_handle_irq(void __iomem *base_addr,unsigned int no_regs_req, struct pt_regs *regs) {
u32 irqnr = 0;

do {
	int i = 0;

	for (i = 0; i < no_regs_req; i++) {
		irqnr = readl_relaxed(base_addr + 0x98 + (0x20 * i));
		if (irqnr)
			goto out;
	}

out:

	if (!irqnr)
		break;

	irqnr = readl_relaxed(base_addr + INTCPS_SIR_IRQ_OFFSET);
	irqnr &= ACTIVEIRQ_MASK;

	if (irqnr)
	{
//			handle_IRQ(irqnr, regs);
		ipipe_handle_multi_irq(irqnr, regs); //This is where i added the
ipipe_handle_multi_irq
	}
Quoted 6 lines

} while (irqnr);
}

Is this the right place for it?

-WONG

Refering to this,

http://www.xenomai.org/pipermail/xenomai/2012-May/025838.html

I believe that i should be put a printk in the function ipipe_mach_acktimer, as it is called when the linux timer interrupt, but I after checking in these files, i still couldn't find it.

./include/ipipe
./include/linux/ipipe_debug.h
./include/linux/ipipe_lock.h
./include/linux/ipipe_base.h
./include/linux/ipipe_tickdev.h
./include/linux/ipipe_trace.h
./include/linux/ipipe_compat.h
./include/linux/ipipe_domain.h
./include/linux/ipipe.h
./include/config/ipipe
./include/config/ipipe.h
./kernel/ipipe
./arch/blackfin/include/asm/ipipe_base.h
./arch/blackfin/include/asm/ipipe.h
./arch/blackfin/kernel/ipipe.c
./arch/arm/include/asm/ipipe_base.h
./arch/arm/include/asm/ipipe_hwirq.h
./arch/arm/include/asm/ipipe.h
./arch/arm/kernel/ipipe_tsc.o
./arch/arm/kernel/ipipe_tsc_asm.o
./arch/arm/kernel/ipipe.c
./arch/arm/kernel/ipipe_tsc.c
./arch/arm/kernel/ipipe_tsc_asm.S
./arch/arm/kernel/ipipe.o

Can someone point me to the right direction?

-WONG

#11 lore raw
Quoted 29 lines · WONG Sheng Chao
Quoted 21 lines · WONG Sheng Chao
Quoted 20 lines · Gilles Chanteperdrix
Quoted 8 lines · WONG Sheng Chao

Hi Gilles

Following your advice i tracked down the include files which need to be
included to remove the error. The kernel now compiles without errors. I
followed the instructions in

Quoted 7 lines

http://www.xenomai.org/pipermail/xenomai/2012-July/000481.html

to change the timer.c and also changing the .handle_irq with ipipe_handle_multi_irq

From the serial terminal i noticed that with CONFIG_IPIPE = ON the
timer is used correctly as in the above post but it hangs at

Are you sure the timer is running correctly?

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

Any advice on how to proceed to debug this problem? I attach the config files of two cases for your reference.

I would put a printk in linux timer irq handler.

How should i come about debugging the timer irq handler?

Quoted 7 lines

Refering to this,

http://www.xenomai.org/pipermail/xenomai/2012-May/025838.html

I believe that i should be put a printk in the function ipipe_mach_acktimer, as it is called when the linux timer interrupt, but I after checking in these files, i still couldn't find it.

ipipe_mach_acktimer disappeared, it is in the pre I-pipe core patches. The documentation for the I-pipe core patches on the ARM architecture is here:
http://www.xenomai.org/index.php/I-pipe-core:ArmPorting

The linux timer interrupt handler given as example in this documentation is "omap2_gp_timer_interrupt" function, and is probably the same for your omap3 derivative.

Signature · 1 line
					    Gilles.
#12 lore raw
Quoted 39 lines · Gilles Chanteperdrix
Quoted 30 lines · WONG Sheng Chao
Quoted 22 lines · WONG Sheng Chao
Quoted 21 lines · Gilles Chanteperdrix
Quoted 8 lines · WONG Sheng Chao

Hi Gilles

Following your advice i tracked down the include files which need to be
included to remove the error. The kernel now compiles without errors. I
followed the instructions in

Quoted 8 lines

http://www.xenomai.org/pipermail/xenomai/2012-July/000481.html

to change the timer.c and also changing the .handle_irq with ipipe_handle_multi_irq

From the serial terminal i noticed that with CONFIG_IPIPE = ON
the
timer is used correctly as in the above post but it hangs at

Are you sure the timer is running correctly?

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

Any advice on how to proceed to debug this problem? I attach the config files of two cases for your reference.

I would put a printk in linux timer irq handler.

How should i come about debugging the timer irq handler?

Quoted 7 lines

Refering to this,

http://www.xenomai.org/pipermail/xenomai/2012-May/025838.html

I believe that i should be put a printk in the function ipipe_mach_acktimer, as it is called when the linux timer interrupt, but I after checking in these files, i still couldn't find it.

Quoted 8 lines

ipipe_mach_acktimer disappeared, it is in the pre I-pipe core patches. The documentation for the I-pipe core patches on the ARM architecture is here:
http://www.xenomai.org/index.php/I-pipe-core:ArmPorting

The linux timer interrupt handler given as example in this documentation is "omap2_gp_timer_interrupt" function, and is probably the same for your omap3 derivative.

Thanks for the information. So to proceed i looked at the function

static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id)

{
	struct clock_event_device *evt = &clockevent_gpt;

	if (!clockevent_ipipe_stolen(evt))
		omap2_gp_timer_ack();

	if (num_online_cpus() == 1)
		__ipipe_tsc_update();

	evt->event_handler(evt);
	return IRQ_HANDLED;
}

when clockevent_ipipe_stolen == 0
the omap2_gp_timer_ack is called to acknowledge the linux timer interrupt (with CONFIG_XENOMAI = no)

I put a printk in omap2_gp_timer_ack and i notice that in both cases of CONFIG_IPIPE = yes and CONFIG_IPIPE = no

the omap2_gp_timer_ack function get called.

But i am not sure how to interrupt this. I guess this means that the timer interrupt is being handled. But it still does not tell me why the kernel does not boot properly when CONFIG_IPIPE = yes.

#13 lore raw
Quoted 73 lines · WONG Sheng Chao
Quoted 47 lines · Gilles Chanteperdrix
Quoted 30 lines · WONG Sheng Chao
Quoted 22 lines · WONG Sheng Chao
Quoted 21 lines · Gilles Chanteperdrix
Quoted 8 lines · WONG Sheng Chao

Hi Gilles

Following your advice i tracked down the include files which need to be
included to remove the error. The kernel now compiles without errors. I
followed the instructions in

Quoted 8 lines

http://www.xenomai.org/pipermail/xenomai/2012-July/000481.html

to change the timer.c and also changing the .handle_irq with ipipe_handle_multi_irq

From the serial terminal i noticed that with CONFIG_IPIPE = ON
the
timer is used correctly as in the above post but it hangs at

Are you sure the timer is running correctly?

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

Any advice on how to proceed to debug this problem? I attach the config files of two cases for your reference.

I would put a printk in linux timer irq handler.

How should i come about debugging the timer irq handler?

Quoted 8 lines

Refering to this,

http://www.xenomai.org/pipermail/xenomai/2012-May/025838.html

I believe that i should be put a printk in the function ipipe_mach_acktimer, as it is called when the linux timer interrupt, but
I after checking in these files, i still couldn't find it.

ipipe_mach_acktimer disappeared, it is in the pre I-pipe core patches.
The documentation for the I-pipe core patches on the ARM architecture is
here:
http://www.xenomai.org/index.php/I-pipe-core:ArmPorting

Quoted 4 lines

The linux timer interrupt handler given as example in this documentation
is "omap2_gp_timer_interrupt" function, and is probably the same for your omap3 derivative.

Thanks for the information. So to proceed i looked at the function

static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id)

{
	struct clock_event_device *evt = &clockevent_gpt;

	if (!clockevent_ipipe_stolen(evt))
		omap2_gp_timer_ack();

	if (num_online_cpus() == 1)
		__ipipe_tsc_update();

	evt->event_handler(evt);
	return IRQ_HANDLED;
}

when clockevent_ipipe_stolen == 0
the omap2_gp_timer_ack is called to acknowledge the linux timer interrupt (with CONFIG_XENOMAI = no)

Quoted 8 lines

I put a printk in omap2_gp_timer_ack and i notice that in both cases of CONFIG_IPIPE = yes and CONFIG_IPIPE = no

the omap2_gp_timer_ack function get called.

But i am not sure how to interrupt this. I guess this means that the timer interrupt is being handled. But it still does not tell me why the kernel does not boot properly when CONFIG_IPIPE = yes.

Put a static counter in the timer_ack function to only emit a printk every HZ ticks, and check whether the timer is ticking when you get the freeze in the at24c driver initialization.

Signature · 1 line
                                                                Gilles.
#14 lore raw
Quoted 80 lines · Gilles Chanteperdrix
Quoted 78 lines · WONG Sheng Chao
Quoted 47 lines · Gilles Chanteperdrix
Quoted 30 lines · WONG Sheng Chao
Quoted 22 lines · WONG Sheng Chao
Quoted 21 lines · Gilles Chanteperdrix
Quoted 8 lines · WONG Sheng Chao

Hi Gilles

Following your advice i tracked down the include files which need to be
included to remove the error. The kernel now compiles without errors. I
followed the instructions in

Quoted 8 lines

http://www.xenomai.org/pipermail/xenomai/2012-July/000481.html

to change the timer.c and also changing the .handle_irq with ipipe_handle_multi_irq

From the serial terminal i noticed that with CONFIG_IPIPE = ON
the
timer is used correctly as in the above post but it hangs at

Are you sure the timer is running correctly?

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

Any advice on how to proceed to debug this problem? I attach the config files of two cases for your reference.

I would put a printk in linux timer irq handler.

How should i come about debugging the timer irq handler?

Quoted 8 lines

Refering to this,

http://www.xenomai.org/pipermail/xenomai/2012-May/025838.html

I believe that i should be put a printk in the function ipipe_mach_acktimer, as it is called when the linux timer interrupt, but
I after checking in these files, i still couldn't find it.

ipipe_mach_acktimer disappeared, it is in the pre I-pipe core patches.
The documentation for the I-pipe core patches on the ARM architecture is
here:
http://www.xenomai.org/index.php/I-pipe-core:ArmPorting

Quoted 4 lines

The linux timer interrupt handler given as example in this documentation
is "omap2_gp_timer_interrupt" function, and is probably the same for your omap3 derivative.

Thanks for the information. So to proceed i looked at the function

static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id)

{
	struct clock_event_device *evt = &clockevent_gpt;

	if (!clockevent_ipipe_stolen(evt))
		omap2_gp_timer_ack();

	if (num_online_cpus() == 1)
		__ipipe_tsc_update();

	evt->event_handler(evt);
	return IRQ_HANDLED;
}

when clockevent_ipipe_stolen == 0
the omap2_gp_timer_ack is called to acknowledge the linux timer interrupt (with CONFIG_XENOMAI = no)

I put a printk in omap2_gp_timer_ack and i notice that in both cases of CONFIG_IPIPE = yes and CONFIG_IPIPE = no

the omap2_gp_timer_ack function get called.

Quoted 8 lines
Quoted 3 lines

But i am not sure how to interrupt this. I guess this means that the timer interrupt is being handled. But it still does not tell me why the kernel does not boot properly when CONFIG_IPIPE = yes.

Put a static counter in the timer_ack function to only emit a printk every HZ ticks, and check whether the timer is ticking when you get the freeze in the at24c driver initialization.

Yes the timer is still ticking after the freeze in the at24c driver initialization. Does this means that the ipipe_handle_multi_irq in omap_intc_handle_irq is not handling the multiple irq properly?

#15 lore raw
Quoted 93 lines · WONG Sheng Chao
Quoted 92 lines · Gilles Chanteperdrix
Quoted 88 lines · WONG Sheng Chao
Quoted 51 lines · Gilles Chanteperdrix
Quoted 34 lines · WONG Sheng Chao
Quoted 23 lines · WONG Sheng Chao
Quoted 22 lines · Gilles Chanteperdrix
Quoted 9 lines · WONG Sheng Chao

Hi Gilles

Following your advice i tracked down the include files which need
to be
included to remove the error. The kernel now compiles without errors. I
followed the instructions in

Quoted 8 lines

http://www.xenomai.org/pipermail/xenomai/2012-July/000481.html

to change the timer.c and also changing the .handle_irq with ipipe_handle_multi_irq

From the serial terminal i noticed that with CONFIG_IPIPE = ON
the
timer is used correctly as in the above post but it hangs at

Are you sure the timer is running correctly?

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

Any advice on how to proceed to debug this problem? I attach the
config files of two cases for your reference.

I would put a printk in linux timer irq handler.

How should i come about debugging the timer irq handler?

Refering to this,

Quoted 7 lines

http://www.xenomai.org/pipermail/xenomai/2012-May/025838.html

I believe that i should be put a printk in the function ipipe_mach_acktimer, as it is called when the linux timer interrupt,
but
I after checking in these files, i still couldn't find it.

ipipe_mach_acktimer disappeared, it is in the pre I-pipe core patches.
The documentation for the I-pipe core patches on the ARM architecture
is
here:
http://www.xenomai.org/index.php/I-pipe-core:ArmPorting

Quoted 5 lines

The linux timer interrupt handler given as example in this documentation
is "omap2_gp_timer_interrupt" function, and is probably the same for
your omap3 derivative.

Thanks for the information. So to proceed i looked at the function

static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id)

{
	struct clock_event_device *evt = &clockevent_gpt;

	if (!clockevent_ipipe_stolen(evt))
		omap2_gp_timer_ack();

	if (num_online_cpus() == 1)
		__ipipe_tsc_update();

	evt->event_handler(evt);
	return IRQ_HANDLED;
}

when clockevent_ipipe_stolen == 0
the omap2_gp_timer_ack is called to acknowledge the linux timer interrupt (with CONFIG_XENOMAI = no)

I put a printk in omap2_gp_timer_ack and i notice that in both cases of
CONFIG_IPIPE = yes and CONFIG_IPIPE = no

the omap2_gp_timer_ack function get called.

But i am not sure how to interrupt this. I guess this means that the timer interrupt is being handled. But it still does not tell me why the
kernel does not boot properly when CONFIG_IPIPE = yes.

Quoted 8 lines
Quoted 4 lines

Put a static counter in the timer_ack function to only emit a printk every HZ ticks, and check whether the timer is ticking when you get the
freeze in the at24c driver initialization.

Yes the timer is still ticking after the freeze in the at24c driver initialization. Does this means that the ipipe_handle_multi_irq in omap_intc_handle_irq is not handling the multiple irq properly?

No. It simply means the problem is not the timer. Next usual suspect is the clocksource. Did you get the message about clocksource switching to ipipe_tsc and does ipipe_tsc_get return increasing values?

Signature · 1 line
                                                                Gilles.
#16 lore raw
Quoted 102 lines · Gilles Chanteperdrix
Quoted 100 lines · WONG Sheng Chao
Quoted 98 lines · Gilles Chanteperdrix
Quoted 84 lines · WONG Sheng Chao
Quoted 53 lines · Gilles Chanteperdrix
Quoted 36 lines · WONG Sheng Chao
Quoted 25 lines · WONG Sheng Chao
Quoted 24 lines · Gilles Chanteperdrix
Quoted 12 lines · WONG Sheng Chao

Hi Gilles

Following your advice i tracked down the include files which need
to be
included to remove the error. The kernel now compiles without errors. I
followed the instructions in

http://www.xenomai.org/pipermail/xenomai/2012-July/000481.html

Quoted 7 lines

to change the timer.c and also changing the .handle_irq with ipipe_handle_multi_irq

From the serial terminal i noticed that with CONFIG_IPIPE =
ON
the
timer is used correctly as in the above post but it hangs at

Are you sure the timer is running correctly

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

Any advice on how to proceed to debug this problem? I attach the
config files of two cases for your reference.

I would put a printk in linux timer irq handler.

How should i come about debugging the timer irq handler?

Refering to this,

Quoted 7 lines

http://www.xenomai.org/pipermail/xenomai/2012-May/025838.html

I believe that i should be put a printk in the function ipipe_mach_acktimer, as it is called when the linux timer interrupt,
but
I after checking in these files, i still couldn't find it.

ipipe_mach_acktimer disappeared, it is in the pre I-pipe core patches.
The documentation for the I-pipe core patches on the ARM architecture
is
here:
http://www.xenomai.org/index.php/I-pipe-core:ArmPorting

Quoted 5 lines

The linux timer interrupt handler given as example in this documentation
is "omap2_gp_timer_interrupt" function, and is probably the same for
your omap3 derivative.

Thanks for the information. So to proceed i looked at the function

static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id)

{
	struct clock_event_device *evt = &clockevent_gpt;

	if (!clockevent_ipipe_stolen(evt))
		omap2_gp_timer_ack();

	if (num_online_cpus() == 1)
		__ipipe_tsc_update();

	evt->event_handler(evt);
	return IRQ_HANDLED;
}

when clockevent_ipipe_stolen == 0
the omap2_gp_timer_ack is called to acknowledge the linux timer interrupt (with CONFIG_XENOMAI = no)

I put a printk in omap2_gp_timer_ack and i notice that in both cases of
CONFIG_IPIPE = yes and CONFIG_IPIPE = no

Quoted 6 lines

the omap2_gp_timer_ack function get called.

But i am not sure how to interrupt this. I guess this means that the timer interrupt is being handled. But it still does not tell me why the
kernel does not boot properly when CONFIG_IPIPE = yes.

Put a static counter in the timer_ack function to only emit a printk every HZ ticks, and check whether the timer is ticking when you get the
freeze in the at24c driver initialization.

Quoted 8 lines
Quoted 3 lines

Yes the timer is still ticking after the freeze in the at24c driver initialization. Does this means that the ipipe_handle_multi_irq in omap_intc_handle_irq is not handling the multiple irq properly?

No. It simply means the problem is not the timer. Next usual suspect is the clocksource. Did you get the message about clocksource switching to ipipe_tsc and does ipipe_tsc_get return increasing values?

Yes the clock source did change to tsc in the boot message, I will take a look at the return value of I pipe_tsc_get.

#17 lore raw
In reply to Gilles Chanteperdrix
Quoted 102 lines · Gilles Chanteperdrix
Quoted 100 lines · WONG Sheng Chao
Quoted 98 lines · Gilles Chanteperdrix
Quoted 84 lines · WONG Sheng Chao
Quoted 53 lines · Gilles Chanteperdrix
Quoted 36 lines · WONG Sheng Chao
Quoted 25 lines · WONG Sheng Chao
Quoted 24 lines · Gilles Chanteperdrix
Quoted 12 lines · WONG Sheng Chao

Hi Gilles

Following your advice i tracked down the include files which need
to be
included to remove the error. The kernel now compiles without errors. I
followed the instructions in

http://www.xenomai.org/pipermail/xenomai/2012-July/000481.html

Quoted 7 lines

to change the timer.c and also changing the .handle_irq with ipipe_handle_multi_irq

From the serial terminal i noticed that with CONFIG_IPIPE =
ON
the
timer is used correctly as in the above post but it hangs at

Are you sure the timer is running correctly?

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

Any advice on how to proceed to debug this problem? I attach the
config files of two cases for your reference.

I would put a printk in linux timer irq handler.

How should i come about debugging the timer irq handler?

Refering to this,

Quoted 7 lines

http://www.xenomai.org/pipermail/xenomai/2012-May/025838.html

I believe that i should be put a printk in the function ipipe_mach_acktimer, as it is called when the linux timer interrupt,
but
I after checking in these files, i still couldn't find it.

ipipe_mach_acktimer disappeared, it is in the pre I-pipe core patches.
The documentation for the I-pipe core patches on the ARM architecture
is
here:
http://www.xenomai.org/index.php/I-pipe-core:ArmPorting

Quoted 5 lines

The linux timer interrupt handler given as example in this documentation
is "omap2_gp_timer_interrupt" function, and is probably the same for
your omap3 derivative.

Thanks for the information. So to proceed i looked at the function

static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id)

{
	struct clock_event_device *evt = &clockevent_gpt;

	if (!clockevent_ipipe_stolen(evt))
		omap2_gp_timer_ack();

	if (num_online_cpus() == 1)
		__ipipe_tsc_update();

	evt->event_handler(evt);
	return IRQ_HANDLED;
}

when clockevent_ipipe_stolen == 0
the omap2_gp_timer_ack is called to acknowledge the linux timer interrupt (with CONFIG_XENOMAI = no)

I put a printk in omap2_gp_timer_ack and i notice that in both cases of
CONFIG_IPIPE = yes and CONFIG_IPIPE = no

Quoted 6 lines

the omap2_gp_timer_ack function get called.

But i am not sure how to interrupt this. I guess this means that the timer interrupt is being handled. But it still does not tell me why the
kernel does not boot properly when CONFIG_IPIPE = yes.

Put a static counter in the timer_ack function to only emit a printk every HZ ticks, and check whether the timer is ticking when you get the
freeze in the at24c driver initialization.

Quoted 8 lines
Quoted 3 lines

Yes the timer is still ticking after the freeze in the at24c driver initialization. Does this means that the ipipe_handle_multi_irq in omap_intc_handle_irq is not handling the multiple irq properly?

No. It simply means the problem is not the timer. Next usual suspect is the clocksource. Did you get the message about clocksource switching to ipipe_tsc and does ipipe_tsc_get return increasing values?

I added a static counter and a printk on ipipe_tsc_get() under the omap2_gp_timer_ack function

static void omap2_gp_timer_ack(void)
{

	test_counter++;

	if(test_counter > 100)
	{
	 test_counter = 0;
	 printk("static counter overflow, ipipe_tsc_get = 
%llu\n",__ipipe_tsc_get());
	}

	__omap_dm_timer_write_status(&clkev, OMAP_TIMER_INT_OVERFLOW);
	__omap_dm_timer_read_status(&clkev);
}

And this is the boot message that i got

[    0.181481] Switching to clocksource ipipe_tsc
.
.
.
[    0.892249] brd: module loaded
[    0.900176] loop: module loaded
[    0.903603] at24 1-0051: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
[    1.633867] static counter overflow, ipipe_tsc_get = 4294967296
[    2.650588] static counter overflow, ipipe_tsc_get = 4294967296
[    3.667300] static counter overflow, ipipe_tsc_get = 4294967296
[    4.684013] static counter overflow, ipipe_tsc_get = 4294967296
[    5.700726] static counter overflow, ipipe_tsc_get = 4294967296
[    6.717439] static counter overflow, ipipe_tsc_get = 4294967296
[    7.734150] static counter overflow, ipipe_tsc_get = 4294967296
[    8.750861] static counter overflow, ipipe_tsc_get = 4294967296

the ipipe_tsc_get is returning a constant value rather than increasing values. How can i further track down the source of the problem?