How does the bootloader pick up the command after a “restarting system with command”?
Looking in the android source for the reboot command we find the following line: __reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, \ LINUX_REBOOT_CMD_RESTART2, argv[optind]); Which is the standard Linux system call to reboot the system with a specific command, see Unix System Call Reboot . In Android this command is used to tell the bootloader to start either the kernel in recovery mode or to go to the fastboot mode within the bootloader. My question is: How does the bootloader pick up the command? And is this functionality implemented in U-Boot? (I am unable to find it searching either