U-boot doesn't start anymore

Claudiu Petre claudiu.petre85 at gmail.com
Tue Aug 10 16:54:24 CEST 2021


Hi,



I have an U_Boot tailored for a specific board.

In this U_Boot we have a command: “*myperipheral*"



U_BOOT_CMD(

               myperipheral, 6, 0, do_my_periph,

               "my peripheral  info",

               /*  */"info                              - important hw
info\n"

               " myperipheral [disable/enable]            - disable/enable
system\n"

               " myperipheral stop                              - stop the
driver\n"

               " myperipheral reapply-clocks              - reapply clock
setting \n"

               " myperipheral reg <offset>                  - read
register\n"

);

Everything works fine so far.

Then  I changed this command by adding a new parameter : *test*



U_BOOT_CMD(

               myperipheral, 6, 0, do_my_periph,

               "my peripheral  info",

               /*  */"info                              - important hw
info\n"

               " myperipheral [disable/enable]            - disable/enable
system\n"

               " myperipheral stop                              - stop the
driver\n"

               " myperipheral reapply-clocks              - reapply clock
setting \n"

               " myperipheral reg <offset>                  - read
register\n"

               *" myperipheral test                            - periph
test"*

);



So I added a function *my_test_func(),* which is called when “myperipheral
test” command is issued on u_boot cmd line.



void *my_test_func* (void) {

            int i=0;

            printf("Test nr %d\n", i++);

            printf("Test nr %d\n", i++);

            printf("Test nr %d\n", i++);

            printf("Test nr %d\n", i++);

            printf("Test nr %d\n", i++);

// and more 20 lines with  printf("Test nr %d\n", i++);

}



Again everything works fine when I issue “myperipheral test" , I can see 25
time of prints .

But when I add another 25 lines of prints in my_test_func, rebuild and
reflash,  the U_Boot does not start anymore.



Does anyone knows why ?



I mention that I’ve tried to add this my_test_function() (on both variants
with 25 and 50 prints) in myperipheral_probe() and got the same results:
with 25 U_boot starts and prints, and with 50 u_boot doesn’t start!

Of course I have real problem to solve, but my real problem leads me to
this test, because something like this I need to do in my real problem.


Best regards,

Claudiu


More information about the U-Boot mailing list