This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM5726: How to boot LINUX into single or init=/bin/sh mode (how to provide boot parameters?)

Part Number: AM5726

On our AM5726 I would like to boot linux and pass it standard boot commands. For instance on other systems I can say "init=/bin/sh" or "single" both of which put LINUX into single prompt mode.

When we stop in uboot. I can show the bootcmd as follows:

=>
=> printenv bootcmd
bootcmd=if test ${dofastboot} -eq 1; then echo Boot fastboot requested, resetting dofastboot ...;setenv dofastboot 0; saveenv;echo Booting into fastboot ...; fastboot 1; fi;if test ${boot_fit} -eq 1; then run update_to_fit;fi;run findfdt; run envboot; run mmcboot;run emmc_linux_boot; run emmc_android_boot; run setconsole;
=>

when I do "run bootcmd" system comes up. But this bootcmd has so many things in it I can't see where I can put arguments to boot so that it will for instance stop in shell when I try to say init=/bin/sh, how do you do that?

Usually you modify environment variable bootargs but when I do that, the argument is ignored. How can I boot with linux boot arguments?

  • I found the answer: you just have run those contained commands until you find the one that attaches arguments. But use of “single” or init=/bin/sh is too late. I want to try stopping in the initial ram disk or the busy box. Looking for that now

  • Tom,


    I found the answer: you just have run those contained commands until you find the one that attaches arguments.

    That is correct.


    I want to try stopping in the initial ram disk or the busy box. Looking for that now

    Something like below:

    setenv bootargs root=/dev/ram0 rw console=ttyO2,115200n8 initrd=0x81600000,20M ramdisk_size=20480 earlyprintk no_console_suspend

    setenv bootcmd 'mmc dev 0; fatload mmc 0 80300000 zImage; fatload mmc 0 81600000 bb.raw; fatload mmc 0 0x81000000 am572x-idk.dtb; bootz 80300000 - 81000000'

    boot

    bb.raw is your busybox ramdisk file.

    I had tried the above commands on a different board but the same should work for am572x.

    Best Regards,
    Keerthy