- the partition disk layer takes over the responsibility of slot suffix
appending, we remove relative code to make file clean;
- put android a/b code together and name them to be eary understood,
this makes file esay to read.
Change-Id: Id8c838da682ce6098bd7192d7d7c64269f4e86ba
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
- The U-disk boot is only supported from U-Boot, the earlier preloader
doesn't support it;
- MMC1(SD) has higher priority than U-disk;
- Always boot into recovery mode and deliver "usbfwupdate" to cmdline;
- Usb driver may depend on clock/regulator init, so behind of them;
- Suggest to add ./dts/kern.dtb file to promise the kernel dtb always
to be loaded successfully even the native images are all damaged.
Change-Id: Ibbb2a061a727752277ac1b80abf362de5d94cca2
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
For some legacy reasons, rockchip use mkbootimg tool to pack android
images with special pack parameters(SDK version lower than 8.1) to
assign kernel/ramdisk/seconds address and page size.
Android hdr on RK3399 SDK-7.1:
kernel size: 1299808
kernel address: 60408000
ramdisk size: 1e6b80
ramdisk addrress: 62000000
second size: 41c00
second address: 60f00000
tags address: 60088000
page size: 4000
header_version: 0
os_version: e041114 (ver: 1.7.2, level: 2017.4)
name:
cmdline: buildvariant=userdebug
The kernel/ramdisk/seconds address base is not from 0x10000000 and
page size is not 0x800!
This patch makes bootflow to compatible with above legacy packing.
Change-Id: I663a0d1386694658c97586706ff21ed887d6a2e7
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
This patch add auto parse the compress format of kernel image.
Then decompress the compressed kernel image for arm64, as for
arm32 zImage, we only need to load it to a higher memory, then
the kernel will handle the decompress itself.
Test on RK3308 AARCH64 mode (Cortex A35 816 MHZ) boot with eMMC:
------------------------------------------------------------------
Format | Size(Byte) | Ratio | Decomp time(ms) | Boot time(ms) |
-------------------------------------------------------------------
Image | 7720968 | | | 488 |
-------------------------------------------------------------------
Image.lz4 | 4119448 | 53% | 59 | 455 |
-------------------------------------------------------------------
Image.lzo | 3858322 | 49% | 141 | 536 |
-------------------------------------------------------------------
Image.gz | 3529108 | 45% | 222 | 609 |
-------------------------------------------------------------------
Image.bz2 | 3295914 | 42% | 2940 | |
-------------------------------------------------------------------
Image.lzma| 2683750 | 34% | | |
-------------------------------------------------------------------
Note: the boot time is counted from first ddr init log to first Kernel log.
Change-Id: I73b12ec944fbc8238b0e061a37e2f31aa3093231
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
The kernel image follows the header(default 0x800) in boot.img, we need to fix
the load address for boot.img so that kernel image can align to 0x80000 as
required by ARM64 kernel booting.
Change-Id: I526ff38bfce2d8fd1571aff817ade11086f196e3
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
The commit point is updated to google external/avb/
which commit point is cf8c56208d2d9643804a7f123b196c7ebc9af276.
Change-Id: I5a10a8a45d3e9e2c9d20d9b3d44946073c9a49ff
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
New cmd usage:
boot_android mmc 0
update boot_android:
- do not need provide argv for misc partition and slot
- If CONFIG_ROCKCHIP_RESOURCE_IMAGE is enabled, try to get dtb from resource
partition.
Change-Id: I7242880f9cde916ca10d677ddac07790c66a07a4
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Support boot the system in the old mode, and there
is no need to differentiate the _a or _b slot
in the gpt table.
Change-Id: I162e34a9bd0120db051f709faec06daf3bc0aa9c
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
The android things system need some avb info
in the stage of u-boot, like VBH value and so
on.
Change-Id: Ia102931f3b0c912c7e1f34f668d8af0b45fa4a6e
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
if user input "reboot recovery" by adb or serial console,
uboot will load recovery ramfs image to run.
Change-Id: Ibad1709ed78938dbf1826446a0de5c822c6ce4e4
Signed-off-by: Wenping Zhang <wenping.zhang@rock-chips.com>
split boot_android and boot_mode int two commits.
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
The system must support recovery and fastboot
mode, so the u-boot must judge the boot command
in the misc partition.
Change-Id: I53c876eeefdc20ebe313a6a73d4cfac443fafa67
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
If excute avb_ab_flow() failed, the free the
no use buffer.
Change-Id: I874f3367eceb35424b069a04a1ec35c37b46e639
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
In the fuction do_avb_flow, the return value of
avb_ab_flow() must be judged. If not, the process
can not return to u-boot command line when execute
avb_ab_flow failing.
Change-Id: I925c9c63cee2153d365ea78b286d8958624b106c
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
The android things boot must have avb function,
then we add the fuction in file cmd/boot_android.c.
In boot_android.c, we add bootavb flow v/n to
bootload android system.
The bootavb flow v bootload android system
with avb.And bootavb flow n bootload android
system as usual.
Change-Id: I3064f8a4aebf2b4bfdb0cf6f0458f42438c27027
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
The android_bootloader_control struct defined in bootloader_message.h
stored the A/B metadata used to decide which slot should we use to boot
the device. This patch implements the bootloader side of the slot
selection in a new "android_ab_select" command which decides the
current slot and updates the metadata as needed.
Bug: 32707546
Test: Booted a rpi3, updated to the other slot.
Change-Id: I9344ff5b76194160d2b466a50e84f4f423b1a98a
part_get_info_by_name() was extended to support more than just mmc/efi
partitions. This patch remove this restriction from the
part_get_info_by_dev_and_name() function.
Bug: 32707546
Test: Booted rpi3.
Change-Id: If6399f7d24e99911b3b14a125a6bc1f472b7eecf
In order to support booting from either slot, this patch passes the
slot name from the command line.
Bug: 32707546
Test: Booted rpi3.
Change-Id: I30582bd8b1b95dc0f25b0c6624e7909ee4118bd0
The new "boot_android" command simply executes the Android Bootloader
flow. This receives the location (interface, dev, partition) of the
Android "misc" partition which is then used to lookup and infer the
kernel and system images that should be booted.
Bug: 32707546
Test: Booted a rpi3 build with Android Things.
Signed-off-by: Alex Deymo <deymo@google.com>
Change-Id: Ibf3f31e38b159d42db7a0835b99ad7ec260fc2a7