uboot基础(2)——uboot cmd

39 篇文章 13 订阅

U_BOOT_CMD

#define U_BOOT_CMD(_name, _maxargs, _rep, _cmd, _usage, _help)          \
        U_BOOT_CMD_COMPLETE(_name, _maxargs, _rep, _cmd, _usage, _help, NULL)

boot_android

static int do_boot_android(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])

U_BOOT_CMD(
        boot_android, 5, 0, do_boot_android,
        "Execute the Android Bootloader flow.",
        "<interface> <dev[:part|;part_name]> <slot> [<kernel_addr>]\n"
        "    - Load the Boot Control Block (BCB) from the partition 'part' on\n"
        "      device type 'interface' instance 'dev' to determine the boot\n"
        "      mode, and load and execute the appropriate kernel.\n"
        "      In normal and recovery mode, the kernel will be loaded from\n"
        "      the corresponding \"boot\" partition. In bootloader mode, the\n"
        "      command defined in the \"fastbootcmd\" variable will be\n"
        "      executed.\n"
        "      On Android devices with multiple slots, the pass 'slot' is\n"
        "      used to load the appropriate kernel. The standard slot names\n"
        "      are 'a' and 'b'.\n"
        "    - If 'part_name' is passed, preceded with a ; instead of :, the\n"
        "      partition name whose label is 'part_name' will be looked up in\n"
        "      the partition table. This is commonly the \"misc\" partition.\n"
);
=> boot_android
boot_android - Execute the Android Bootloader flow.

Usage:
boot_android <interface> <dev[:part|;part_name]> <slot> [<kernel_addr>]
    - Load the Boot Control Block (BCB) from the partition 'part' on
      device type 'interface' instance 'dev' to determine the boot
      mode, and load and execute the appropriate kernel.
      In normal and recovery mode, the kernel will be loaded from
      the corresponding "boot" partition. In bootloader mode, the
      command defined in the "fastbootcmd" variable will be
      executed.
      On Android devices with multiple slots, the pass 'slot' is
      used to load the appropriate kernel. The standard slot names
      are 'a' and 'b'.
    - If 'part_name' is passed, preceded with a ; instead of :, the
      partition name whose label is 'part_name' will be looked up in
      the partition table. This is commonly the "misc" partition.
=> boot_android mmc 0
ANDROID: reboot reason: "(none)"
Fdt Ramdisk skip relocation
Booting IMAGE kernel at 0x00280000 with fdt at 0x8300000...


Sysmem Warn: kernel 'reserved-memory' "region@110000"(0x00110000 - 0x00200000) is overlap with [invisible] "SHM" (0x00100000 - 0x00200000)
## Booting Android Image at 0x0027f800 ...
Kernel load addr 0x00280000 size 18863 KiB
## Flattened Device Tree blob at 08300000
   Booting using the fdt blob at 0x8300000
   XIP Kernel Image ... OK
  'reserved-memory' region@110000: addr=110000 size=f0000
   Using Device Tree in place at 0000000008300000, end 000000000831ce26
board_modify_fdt
Adding bank: 0x00200000 - 0x08400000 (size: 0x08200000)
Adding bank: 0x0a200000 - 0x80000000 (size: 0x75e00000)
Total: 91895.702 ms

Starting kernel ...

led

int do_led(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])

U_BOOT_CMD(
        led, 4, 1, do_led,
        "manage LEDs",
        "<led_label> on|off|toggle" BLINK "\tChange LED state\n"
        "led [<led_label>\tGet LED state\n"
        "led list\t\tshow a list of LEDs"
);
=> led 
led - manage LEDs

Usage:
led <led_label> on|off|toggle   Change LED state
led [<led_label>        Get LED state
led list                show a list of LEDs
=> led list
system_work_led1 <inactive>
=> led system_work_led1 on
=>

TBC

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值