Kernel build error when enabling low-level debugging with Linux-2.6.35 for MX53

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Kernel build error when enabling low-level debugging with Linux-2.6.35 for MX53

1,552 Views
RobbieJiang
Contributor IV

Hi,

I'm working with Linux-2.6.35/MX53,

and would like to enable kernel low level debugging and early printk to help debug kernel booting problem.However, after enabling "Kernel hacking->Kernel low-level debugging functions"

and  "Kernel hacking->Kernel low-level debugging functions->Early printk",

the build process (with the cmd: make ARCH=arm CROSS_COMPILE=arm-fsl-linux-gnueabi- -j 4 uImage)

failed with errors:

....

  CHK     include/linux/version.h

  CHK     include/generated/utsrelease.h

make[1]: `include/generated/mach-types.h' is up to date.

  CALL    scripts/checksyscalls.sh

  CHK     include/generated/compile.h

  AS      arch/arm/kernel/debug.o

In file included from arch/arm/plat-mxc/include/mach/debug-macro.S:52,

                 from arch/arm/kernel/debug.S:130:

arch/arm/plat-mxc/include/mach/mx5x.h:23:2: error: #error "Do not include directly."

make[1]: *** [arch/arm/kernel/debug.o] Error 1

make: *** [arch/arm/kernel] Error 2

make: *** Waiting for unfinished jobs....

make: *** wait: No child processes.  Stop.

The cross-compiling toolchain is arm-fsl-linux-gnueabi-gcc-4.4.4.

Any idea?

Regards,

Robbie

Labels (2)
0 Kudos
8 Replies

1,164 Views
b36401
NXP Employee
NXP Employee

Please try to use LTIB 1308 instead of 1109 one.

Have a great day,

Victor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,164 Views
fabio_estevam
NXP Employee
NXP Employee

You could give kernel 4.6 a try, if possible.

0 Kudos

1,164 Views
TomE
Specialist II

> You could give kernel 4.6 a try, if possible.

Does it now have support for the "Multimedia" parts of the i.MX? Previous versions never did. The last information I had was that the only version of Linux for the i.MX53 supported by Freescale/NXP that handled the IPU and the other video and graphics hardware is 2.6.35.

Linux 3 and above is fine as long as you just want a CPU core, memory, a serial port and Ethernet, but if you want to use the image capture or any of the fancy "Multimedia" stuff, then I don't think you can use anything other than 2.6.35 on an i.MX53, or an i.MX53 with newer software. You have to use an i.MX6 for that.

Here's the link to a definitive statement on the version of Linux to be used on the i.MX53. Scroll down to the post by "igorpadykov":

https://community.nxp.com/message/587032

Tom

0 Kudos

1,164 Views
fabio_estevam
NXP Employee
NXP Employee

4.6 supports LVDS, parallel LCD and TVE on mx53.

Camera capture is work in progress even for mx6 in mainline.

The latest official kernel NXP released for mx53 is based on 2.6.35, but depending on what the customer needs mainline kernel could also be an option.

0 Kudos

1,164 Views
TomE
Specialist II

> 4.6 supports LVDS, parallel LCD and TVE on mx53.

As a simple frame buffer with the CPU having to write every pixel. No video or camera input, no IPU or GPU.

If you only wanted a CPU with a memory interface there should be simpler and cheaper SOCs out there that do that. Why buy an "Innovative Multimedia Extension" if you don't need the "Innovative", "Multimedia" or "Extension" bits?

Tom

0 Kudos

1,164 Views
fabio_estevam
NXP Employee
NXP Employee

Tom,

Looks like there is a misunderstanding here: in kernel 4.6 it is not the CPU that writes every pixel to screen. The IPU is used for such purpose and basic IPU functionality is supported. VPU is also supported by the coda driver.

Going back to the original request of this thread where Robbie wants to enable low-level debugging, I pointed kernel 4.6 because low-level debugging works fine there and I suppose that if someone is trying to enable such option is because they are not getting anything out of the console, and for such purpose 4.6 could be helpful.

As you mentioned before, the official kernel version NXP supports for mx53 is 2.6.35 and I just wanted to help with this specific low-level debugging problem.

Hope this clarifies.

0 Kudos

1,164 Views
TomE
Specialist II

> Looks like there is a misunderstanding here: in kernel 4.6 it is not the CPU that writes

> every pixel to screen. The IPU is used for such purpose

By "screen" I meant the CPU has to write every pixel to the frame buffer without any assistance from the GPU hardware.

This is similar to the simple LCD Controller on the MCF5329, and for old video cards all the way back to the early PCs and the original Macintosh back in 1984.

The original poster must have a problem that has him trying to turn low level debugging on. He then had a problem with that, so is trying to get that working.

So Robbie, if you detail the original problem then someone may be able to help with that.

Tom

0 Kudos

1,164 Views
TomE
Specialist II

I typed your error message into Google. It found your post, and a previous one in this forum dated July 1, 2013.

kernel hacking

Nobody has responded to that question in almost three years.

The Linux 2.6.35 Kernel, plus the 1200 or so Freescale-applied patches have not been tested with all possible combinations of kernel options.

There may be some other options that you can turn on or off that might let it work.

If all else fails you might just have to understand the Makefiles and try to work out a source code change to fix this.

Otherwise, looking at the file it complained about, that file is being included without " __ASM_ARCH_MXC_HARDWARE_H__" being defined.

Assuming you have a clone of Freescale's git repository (if not, get it), type "git grep  __ASM_ARCH_MXC_HARDWARE_H__" and find :

$ git grep  __ASM_ARCH_MXC_HARDWARE_H__

arch/arm/plat-mxc/include/mach/hardware.h:#ifndef __ASM_ARCH_MXC_HARDWARE_H__

arch/arm/plat-mxc/include/mach/hardware.h:#define __ASM_ARCH_MXC_HARDWARE_H__

arch/arm/plat-mxc/include/mach/hardware.h:#endif /* __ASM_ARCH_MXC_HARDWARE_H__ */

arch/arm/plat-mxc/include/mach/mx5x.h:#ifndef __ASM_ARCH_MXC_HARDWARE_H__

arch/arm/plat-mxc/include/mach/mxc.h:#ifndef __ASM_ARCH_MXC_HARDWARE_H__

You should also find out the "magic" to pass to "make" to get it to give you the full compiler commands instead of the "CC Summaries". Then you can try to run the compiler command (that failed) manually with "-E" to get the preprocessor output. That tells you which file included what (and got the assumptions in that file wrong).

Google also finds this, which might be worth checking:

[PATCH 07/14] ARM i.MX/MXS: Allow to include imx*-regs.h directly

Then read this:

xkcd: Arcane Bullshit

Tom

0 Kudos