Skip to main content
sheng yang
Senior
April 10, 2018
Question

port uclinux on stm32f7?

  • April 10, 2018
  • 1 reply
  • 1150 views
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?

    This topic has been closed for replies.

    1 reply

    stm322399
    Senior
    April 10, 2018
    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.

    sheng yang
    Senior
    April 11, 2018
    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.

    stm322399
    Senior
    April 11, 2018
    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.