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.

BeagleBoard-X15: Android cannot enter fastboot mode

Part Number: BEAGLEBOARD-X15
Other Parts Discussed in Thread: BEAGLEBOARD-X15, AM5728

Hi

environment:

hardware: TI AM5728 BeagleBoard-X15  board

software: android O (SDK is ti-processor-sdk-android-am57xx-evm-04.02.00.09-Linux-x86-Install.bin)

issue:

In ADB mode, I try to execute "adb reboot bootloader" , but the board can not enter fastboot mode. the board still boot android system.

there are some doubtful kernel log. the log as below

[ 21.579611] nf_conntrack: automatic helper assignment is deprecated and it will be removed soon. Use the iptables CT target to attach helpers instead.
[ 44.058069] init: reboot-bootloader: Error writing bootloader_message: failed to find /misc partition
[ 44.067439] init: Reboot start, reason: reboot,bootloader, rebootTarget: bootloader
[ 44.075677] init: Shutdown timeout: 6

Thanks and Regards.

qu shenghui

  • Hello Qu,

    At the moment, "adb reboot bootloader" simply reboots the Android system rather than booting the board into fastboot mode.

    Does your use case allow you to interrupt the boot process in uboot, and then run "fastboot reboot bootloader" to boot the board into fastboot mode?

    Regards,
    Nick
  • Adding:

    adb reboot bootloader is not supported from kernel level because of limitation with warm reset and allowing the system to enter recovery mode thru this mechanism .

    (for debug purpose to enter fastboot mode): stop the system in fastboot mode from bootloader prompt. (command fastboot reboot bootloader)

    (for production purpose to enable recovery mode): Ref: www.omappedia.org/.../6AM.1.3_Application_Notes 

    (Note on Recovery - This is not the same feature as entering fastboot mode from adb kernel stage) 

  • Hi Nick,

    Thanks!

    "fastboot reboot bootloader" can enter fastboot mode, but this method needs to use UART.

    how to enable "adb reboot bootloader" function?


    Regards,

    qu shenghui
  • Hi Praneeth,


    Thank you for your information.

    Ref: www.omappedia.org/.../6AM.1.3_Application_Notes advice as below:

    Recovery Mode
    Switching to recovery mode is enabled in this release. This feature is enabled using u-boot environment variables. From Android userspace, an environment variable is set which is used by u-boot to decide which image to load (boot.img or recovery.img)

    Build the u-boot env tool (fw_printenv) using linaro tool chain
    cd ${YOUR_PATH}/u-boot
    export CROSS_COMPILE=/opt/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/bin/arm-linux-gnueabihf-
    make HOSTLDFLAGS=-static env
    Create the fw_env.config file with below content
    /dev/block/mmcblk0 140000 0x20000
    /dev/block/mmcblk0 160000 0x20000
    Copy all files to targer
    adb root
    adb remount
    adb push tools/env/fw_printenv /system/bin/
    adb push tools/env/fw_printenv /system/bin/fw_setenv
    adb push fw_env.config /system/etc/
    With steps above, all the necessary tools are in file system. To get in to recovery mode, set the "reboot_image" u-boot environment variable to value "recovery" before doing reboot.
    fw_setenv -l /data reboot_image "recovery"

    but my tool chain is not linaro, my development environment is android,the compile is arm-linux-androideabi-.
    when I replace arm-linux-gnueabihf- with arm-linux-androideabi-, and run "make HOSTLDFLAGS=-static env", make is fail, log as below:

    $ make HOSTLDFLAGS=-static env
    LD tools/env/built-in.o
    HOSTCC tools/env/aes.o
    In file included from tools/env/aes.c:1:0:
    tools/env/../../lib/aes.c:28:20: fatal error: string.h: No such file or directory
    #include <string.h>
    ^
    compilation terminated.
    scripts/Makefile.host:111: recipe for target 'tools/env/aes.o' failed
    make[1]: *** [tools/env/aes.o] Error 1
    Makefile:1399: recipe for target 'env' failed
    make: *** [env] Error 2


    Regards,

    qu shenghui
  • Correct,

    For building the fw_printenv utility in uboot-tools you have to use linaro toolchain instead of google toolchain.

    gcc-androideabi- from google is not recommended to build uboot tools.

    Log:

    $ make ARCH=arm CROSS_COMPILE=<Android_prebuilt_eabi_path> am57xx_evm_defconfig
    HOSTLD scripts/kconfig/conf
    #
    # configuration written to .config
    #
    $ make ARCH=arm CROSS_COMPILE=<Android_prebuilt_eabi_path> HOSTLDFLAGS=-static env
    HOSTLD scripts/kconfig/conf
    scripts/kconfig/conf --silentoldconfig Kconfig
    CHK include/config.h
    UPD include/config.h
    GEN include/autoconf.mk
    GEN include/autoconf.mk.dep
    GEN spl/include/autoconf.mk
    LD tools/env/built-in.o
    HOSTCC tools/env/aes.o
    In file included from tools/env/aes.c:1:0:
    tools/env/../../lib/aes.c:28:20: fatal error: string.h: No such file or directory
    #include <string.h>
    ^
    compilation terminated.
    make[1]: *** [tools/env/aes.o] Error 1
    make: *** [env] Error 2

    $ make ARCH=arm CROSS_COMPILE=<linaro_toolchain_path> am57xx_evm_defconfig
    HOSTLD scripts/kconfig/conf
    #
    # configuration written to .config
    #
    $ make ARCH=arm CROSS_COMPILE=<linaro_toolchain_path> HOSTLDFLAGS=-static env
    HOSTLD scripts/kconfig/conf
    scripts/kconfig/conf --silentoldconfig Kconfig
    CHK include/config.h
    GEN include/autoconf.mk
    GEN include/autoconf.mk.dep
    GEN spl/include/autoconf.mk
    LD tools/env/built-in.o
    HOSTCC tools/env/aes.o
    HOSTCC tools/env/crc32.o
    HOSTCC tools/env/ctype.o
    HOSTCC tools/env/env_attr.o
    HOSTCC tools/env/env_flags.o
    HOSTCC tools/env/fw_env.o
    HOSTCC tools/env/linux_string.o
    AR tools/env/lib.a
    HOSTCC tools/env/fw_env_main.o
    HOSTLD tools/env/fw_printenv
    STRIP tools/env/fw_printenv

    --

  • Hi Praneeth,

    Thanks,

    use your method, I have got fw_printenv tool, and run these commend , log as below:

    am57xevm:/system/bin # ./fw -l /data reboot_image "recovery"
    fw_printenv fw_setenv
    am57xevm:/system/bin # ./fw_setenv -l /data reboot_image "recovery"
    am57xevm:/system/bin # ./fw_printenv -l /data reboot_image
    reboot_image=recovery
    am57xevm:/system/bin # ./fw_printenv -l /data reboot_image
    reboot_image=recovery
    am57xevm:/system/bin # reboot




    but another question, device not enter recovery mode.

    I stop the system in uboot stage, and read env, "reboot_image" is still boot, log as below:

    Hit any key to stop autoboot: 0
    =>
    =>
    =>
    =>
    =>
    => env print reboot_image
    reboot_image=boot
    =>

    why?

    Regards,

    qu shenghui
  • So it looks like 

    Only recovery mode ( reboot with recovery.img) is supported today. 

    --

    the only way you will be able to reboot and enter fastboot mode today is thru uboot prompt by command ("fastboot reboot bootloader"). but not thru adb.

    Clarified additional detail on the ticket resolution at 

    https://e2e.ti.com/support/arm/sitara_arm/f/791/p/667728/2456342#2456342  

    ---