android_image_parse_kernel_comp() doesn't return valid os
compressed type after android_image_set_kload(), so we add
the env "os_comp" to record compressed type.
Change-Id: Ie175649d348c0578ce78e139bdbbf4b6f9ea1101
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
If there is not "kernel_addr_c", using "kernel_addr_r" for Image/zImage
on 32-bit platform.
If there is not "kernel_addr_c", adjust load address to promise compressed
kernel can normal boot on 64-bit platform.
Change-Id: I42cc3c9074eb8f1caaa44d9256d2abdae6cd97b8
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
During board_f sequence, it's able to add any count of dram banks
and validate memory layout after reserve_xxx() done, stop bootflow
if there is something wrong.
During board_r sequence, it's able to manage all memory blocks and
add reserve memory blocks for bi_dram[] at late bootflow, it's
nesscessary for AMP boot.
Change-Id: I4443a809792bb04e205bb26d79870c85cb5fe7bd
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Remove dram_initr_banksize(), use mmu_set_region_dcache_behaviour()
in board_initr_caches_fixup() to set region MMU table attr is more
easily.
Change-Id: I9d9917e938fe5bbab5aa27575a5c8592ff08ab50
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
- import memblk id to manage memory blocks;
- change "sysmem_property" to generic "memblock";
- use alloc instead of reserve for all memory blocks;
- clean up and fix some logic;
- add U-Boot cmd for sysmem;
Change-Id: I614223ce3bf97a7b3566412a9d1864fb30b68fd8
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
There are sometimes we would like to disable ctrlc, just enable it.
Change-Id: I2911650b22d47b057a039774d8293cad6317bb6d
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
We should keep the boot mode value, linux
kernel need it.
Change-Id: Ic31166dffc3fefdf352cac1d1002a91dea319fc5
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Minus the retry-count in every boot with ab system. If the ab system
boot success, the system service boot_ctrl reset the retry-count or set
boot-successful.
Change-Id: Ic37f65b745d1feb978730332835246dc43d72dab
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
There is a compile error when enable AB config. The error message is
"error: a label can only be part of a statement and a declaration isnot
a statement". Add brackets to fix this error.
Change-Id: I4ec3af984503e35fc1304d08cd7cd8ab587dfb0a
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Using the same name when write key in new formation and old formation
cause ta parse key data error when use key in old formation
Change-Id: I7f83efc3672e903e608d89f7dc214465dc321502
Signed-off-by: Tony Xu <tony.xu@rock-chips.com>
It saves boot time and make final load address is where we expect.
Change-Id: I1e7c3bba48c9b318e7016bf15acf0a3bc8047cb3
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Sometimes, framework or user would call fdt_increase_size() to update
fdt size, it's better reserve more space to avoid sysmem gives the fdt
region overflow report.
The CONFIG_SYS_FDT_PAD default value is sync with bootm framework
in: common/image-fdt.c
Change-Id: I363e9a4182e13b1628a76666acd8272d25db659d
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Return directly and do not continue read from misc partition
if there is no partition.
Change-Id: I549d123632aecc5bd29ebdc2c4c7917c76750247
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
- add interface to get android avb enable state;
- get ramdisk from "ramdisk_addr_r" only when android avb disabled
and CONFIG_ANDROID_BOOT_IMAGE_SEPARATE is enabled;
(fixes: 644e344 android: support loading android image separate)
Change-Id: I7280f911a0c5db851d119acb458b3f335dc28bce
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
This patch support loading android image separate for the
kernel/ramdisk/second images. It is disabled when android
AVB is enabled, because AVB need verify the full android image.
It brings some benefits, mainly for saving a lot of boot time:
- allow skip load second content when kernel dtb is enabled;
- allow skip fdt and ramdisk relocation during bootm boot flow;
- allow loading fdt/ramdisk to "fdt_addr_r"/"ramdisk_addr_r";
- avoid android image too large when load to ram;
Change-Id: Ia040b3031307a8a7c98b011ce038ec61fee6804a
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
sysmem avoids memory block overlap with each other.
Change-Id: I7c705c7860a7c88b0d3672b6b4edb8cb8334654d
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Extract keymaster CA module from OpteeClientInterface
refactoring code for keymaster reads and writes form caller module
Change-Id: I1069fce0d29d9d9815f71e7f3b4d231754382acd
Signed-off-by: Jian Qiu <qiujian@rock-chips.com>
Since the androidboot.verifiedbootstate is required in android Pie, so add
it to bootargs when secure boot flag is not set.
Change-Id: I4a883ca87bbba321a894ee66ebcf0ff9d5cb6ca8
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
We read the vboot_flag which is the flag of secure boot to enable
verified boot in uboot.
Change-Id: I592473ad14f9e19c6529602d029b7ec2fb335da8
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
If slot_suffix is equal to "_a", slot_index_to_boot is equal to '0'
but not '1' when use function strncmp.
Change-Id: I53ffc920824e03c923f1d9ab8fd326a733c59654
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Only ARM and in some configs MIPS really implement arch_fixup_fdt().
Others just use the same boilerplate which is not good by itself,
but what's worse if we try to build with disabled CONFIG_CMD_BOOTM
and enabled CONFIG_OF_LIBFDT we'll hit an unknown symbol which was
apparently implemented in arch/xxx/lib/bootm.c.
Now with weak arch_fixup_fdt() right in image-fdt.c where it is
used we get both items highlighted above fixed.
Change-Id: Iaac96fbb0bcc484906952ced132b10b2cead782e
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: York Sun <york.sun@nxp.com>
Cc: Stefan Roese <sr@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>