cancel
Showing results for 
Search instead for 
Did you mean: 

port uclinux on stm32f7?

sheng yang
Associate III
Posted on April 10, 2018 at 17:23

I want to port uclinux to my board based on stm32f767igt,i portted u-boot before.Now i want to port uClinux to my board.So i download uClinux-dist-20160919.tar.bz2,then i compile the kernel with arch/arm/configs/stm32_defconfig,after i compile Image,then i generate the uImage file with command kimage -A arm -O linux -T kernel -C none -a 0xc0008000 -e 0xc0008001 -n 'yyfish' -d Image yyfish.bin.but i hung with Starting kernel...

i use uart1 as my console,so i use a dtb file with stm32469i-eval.dtb.i pushed the kernel and dtb file .Is there any good advice?

4 REPLIES 4
stm322399
Senior
Posted on April 10, 2018 at 17:40

What is the version of your toolchain ? binutils is known to break thumb linux since 2.29 ... and nobody cares ...

[edit]

Hum, looks like you are using gcc5, so probably binutils <2.29

The problem is maybe in Linux, maybe in u-boot, maybe anywhere else.

When STM32 port has earlyprintk, use it.

Otherwise, buildroot can also help you, they use another bootloader (leaner than u-boot). Of course, make sure to avoid binutils 2.29 and higher when choosing the toolchain.

Posted on April 11, 2018 at 03:53

I download the tool china from uClinux site

https://netix.dl.sourceforge.net/project/uclinux/Tools/arm-uclinuxeabi-20160831/arm-uclinuxeabi-tools-20160831.tar.gz

 the version arm-uclinuxeabi-tools-20160831.tar.gz. is gcc 5.4.0 and (GNU Binutils) 2.26.20160125 .

i tried use code as *(volatile int *)(0x40011028) = 'Y' in init/main.c start_kernel funtion;and i can see the Y charactor in the uart1.So I guess the problem is the console init,and i want to check code with this.i do not know why the console did not be relate with printk function.

Posted on April 11, 2018 at 09:31

That's the way Linux does work: printk go to buffer, and the buffer might be streamed to uart.

Sending Y's was a good idea, you can use that to find where it locks by dichotomy.

I recently see an issue where the kernel was unable to mount root, and crashes, with no output. Try to use LLDEBUG and earlyprintk.

Posted on April 11, 2018 at 16:43

en,thanks for your advice ,i get some puts as below:

[ 0.000000] Unhandled exception: IPSR = 0000000f LR = fffffff1

[ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 4.4.0-uc0-g456f0aa-dirty &sharp6

[ 0.000000] Hardware name: STM32 (Device Tree Support)

[ 0.000000] task: c0118518 ti: c0116000 task.ti: c0116000

[ 0.000000] PC is at start_kernel+0x19e/0x288

[ 0.000000] LR is at timerqueue_add+0x51/0x74

[ 0.000000] pc : [<c0108566>] lr : [<c008d571>] psr: 4100000b

[ 0.000000] sp : c0117fc0 ip : 00000018 fp : 00000000

[ 0.000000] r10: c0112f48 r9 : c0113a40 r8 : c1fbd700

[ 0.000000] r7 : c0118000 r6 : ffffffff r5 : c011fa20 r4 : 00000000

[ 0.000000] r3 : 00000000 r2 : 00000001 r1 : 00000000 r0 : 00000001

[ 0.000000] xPSR: 4100000b

[ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 4.4.0-uc0-g456f0aa-dirty &sharp6

[ 0.000000] Hardware name: STM32 (Device Tree Support)

[ 0.000000] [<c000bcb9>] (unwind_backtrace) from [<c000b0ab>] (show_stack+0xb/0xc)

[ 0.000000] [<c000b0ab>] (show_stack) from [<c000b63f>] (__invalid_entry+0x4b/0x4c)

it's hung here,i gusee stop around static int stm32_console_setup(struct console *co, char *options),and i will keep on check these code.