" work inside? Fastboot has the following convenient function (if the user’s image upload failed, the devic...">

How does the "fastboot boot <kernel>" work inside?

Fastboot has the following convenient function (if the user’s image upload failed, the device simply magically loads the default image the next time, and everything is going fine):

To boot from a host image of the kernel

This command allows you to load the kernel image (and the optional root file system image) and load the phone with them instead of using the kernel and rootfs in the bootable flash partition. This is very useful when developing a kernel or changing rootfs.

bootboot bootboot <kernel> [<ramdisk>]

Does anyone know how it works inside? Is the kernel copied to a special boot partition? before rebooting the device? (UPDATE: As the answer says, there is no reboot, since fastboot is a step in the boot process, which basically makes my question pointless.) I studied the source code of fastboot, but it seems to contain only what happens on the host side, and not on the device.

I mean, how the blinking function works, I can simulate it by simply copying the boot image using a special kernel to the partition boot, for example, via:

dd if='<my_boot.img>' of='/dev/block/platform/msm_sdcc.1/by-name/boot'

Btw: I ask a question because of the application that I am developing; I want to “download for free” the boot kernel directly from the device where it is stored, for example. on the SD card.

+4
source share
1 answer

​​ ?

, - .
( ) . fastboot netboot, . / Ethernet TFTP. , , .

ramdisk, .

- , ?

fastboot - , .
USB . (ramdisk initramfs) USB . .

Btw: - , ; " " ​​ , , . SD-

, , - /, fastboot.

+6

Source: https://habr.com/ru/post/1623361/


All Articles