Lines Matching refs:bflow

161 static int android_read_slot_from_bcb(struct bootflow *bflow, bool decrement)  in android_read_slot_from_bcb()  argument
163 struct blk_desc *desc = dev_get_uclass_plat(bflow->blk); in android_read_slot_from_bcb()
164 struct android_priv *priv = bflow->bootmeth_priv; in android_read_slot_from_bcb()
187 ret = bootflow_cmdline_set_arg(bflow, "androidboot.slot_suffix", in android_read_slot_from_bcb()
195 static int configure_serialno(struct bootflow *bflow) in configure_serialno() argument
202 return bootflow_cmdline_set_arg(bflow, "androidboot.serialno", serialno, false); in configure_serialno()
205 static int configure_bootloader_version(struct bootflow *bflow) in configure_bootloader_version() argument
207 return bootflow_cmdline_set_arg(bflow, "androidboot.bootloader", in configure_bootloader_version()
211 static int android_read_bootflow(struct udevice *dev, struct bootflow *bflow) in android_read_bootflow() argument
213 struct blk_desc *desc = dev_get_uclass_plat(bflow->blk); in android_read_bootflow()
219 bflow->state = BOOTFLOWST_MEDIA; in android_read_bootflow()
244 bflow->os_name = strdup("Android (bootloader)"); in android_read_bootflow()
247 bflow->os_name = strdup("Android (fastbootd)"); in android_read_bootflow()
250 bflow->os_name = strdup("Android (recovery)"); in android_read_bootflow()
253 bflow->os_name = strdup("Android"); in android_read_bootflow()
255 if (!bflow->os_name) in android_read_bootflow()
272 bflow->bootmeth_priv = priv; in android_read_bootflow()
273 bflow->state = BOOTFLOWST_READY; in android_read_bootflow()
277 bflow->bootmeth_priv = priv; in android_read_bootflow()
280 ret = android_read_slot_from_bcb(bflow, false); in android_read_bootflow()
286 ret = scan_boot_part(bflow->blk, priv); in android_read_bootflow()
293 ret = scan_vendor_boot_part(bflow->blk, priv); in android_read_bootflow()
304 configure_serialno(bflow); in android_read_bootflow()
305 configure_bootloader_version(bflow); in android_read_bootflow()
308 ret = bootflow_cmdline_set_arg(bflow, "androidboot.force_normal_boot", in android_read_bootflow()
316 bflow->state = BOOTFLOWST_READY; in android_read_bootflow()
322 bflow->bootmeth_priv = NULL; in android_read_bootflow()
326 static int android_read_file(struct udevice *dev, struct bootflow *bflow, in android_read_file() argument
393 static int avb_append_commandline_arg(struct bootflow *bflow, char *arg) in avb_append_commandline_arg() argument
399 ret = bootflow_cmdline_set_arg(bflow, key, value, false); in avb_append_commandline_arg()
406 static int avb_append_commandline(struct bootflow *bflow, char *cmdline) in avb_append_commandline() argument
412 ret = avb_append_commandline_arg(bflow, arg); in avb_append_commandline()
422 static int run_avb_verification(struct bootflow *bflow) in run_avb_verification() argument
424 struct blk_desc *desc = dev_get_uclass_plat(bflow->blk); in run_avb_verification()
425 struct android_priv *priv = bflow->bootmeth_priv; in run_avb_verification()
480 ret = avb_append_commandline_arg(bflow, extra_args); in run_avb_verification()
486 ret = avb_append_commandline(bflow, out_data->cmdline); in run_avb_verification()
500 static int run_avb_verification(struct bootflow *bflow) in run_avb_verification() argument
505 ret = bootflow_cmdline_set_arg(bflow, in run_avb_verification()
515 static int boot_android_normal(struct bootflow *bflow) in boot_android_normal() argument
517 struct blk_desc *desc = dev_get_uclass_plat(bflow->blk); in boot_android_normal()
518 struct android_priv *priv = bflow->bootmeth_priv; in boot_android_normal()
523 ret = run_avb_verification(bflow); in boot_android_normal()
528 ret = android_read_slot_from_bcb(bflow, true); in boot_android_normal()
549 ret = bootm_boot_start(loadaddr, bflow->cmdline); in boot_android_normal()
554 static int boot_android_recovery(struct bootflow *bflow) in boot_android_recovery() argument
558 ret = boot_android_normal(bflow); in boot_android_recovery()
563 static int boot_android_bootloader(struct bootflow *bflow) in boot_android_bootloader() argument
573 static int android_boot(struct udevice *dev, struct bootflow *bflow) in android_boot() argument
575 struct android_priv *priv = bflow->bootmeth_priv; in android_boot()
580 ret = boot_android_normal(bflow); in android_boot()
583 ret = boot_android_recovery(bflow); in android_boot()
586 ret = boot_android_bootloader(bflow); in android_boot()
591 boot_android_bootloader(bflow); in android_boot()