- Add "reboot" command as alias of "reset";
- Support command like: reboot loader/bootloader/recovery, etc.
Change-Id: I9748664aeca052a775a3f88f7fdf9b3923941026
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Support command like: reboot loader/bootloader/recovery, etc.
It depends on the node whose compatible is "syscon-reboot-mode".
Change-Id: I3ef497c6a4355a0d8be9a277bd77bbee43df57fb
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Merge all codes into resource_tool.c
Sync from kernel-4.4:
(0787850 rk: scripts/resource_tool: add sha1 for file entry)
Change-Id: Iff379458086f1623e7e5126dcb532b178d94c684
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Use the same SPL_STACK_R_ADDR in Kconfig instead of each board config;
default to 0x4000000(64MB) instead of 0x80000(512KB) for this address
can support all the SoCs including those may have only 64MB memory, and
also reserve enough space for atf, kernel(in falcon mode) loading.
After the ATF entry move to 0x40000, the stack from 0x80000 may be override
when loading ATF bl31.
Change-Id: I9bb524ee0762e908bd390393168f30ca197e2a52
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
We are using DRAM offset 0~0x40000 as SPL text size, Note that BSS,
STACK and MALLOC may using separate space.
Change-Id: I1d9128b339140569e427fad44dc0a2f3058deaf0
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Remove CONFIG_ROCKCHIP_SPL_RESERVE_IRAM=0x50000 and it will default to
0. No need to reserve the space for we move the bl31 entry to 0x40000
and limit the size of SPL at 0~0x40000.
Change-Id: I39a69f2ee03a93b4556cc29ab41f62c344f28a02
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Remove CONFIG_ROCKCHIP_SPL_RESERVE_IRAM=0x50000 and it will default to
0. No need to reserve the space for we move the bl31 entry to 0x40000
and limit the size of SPL at 0~0x40000.
Change-Id: I76385fcb3524eb16c19c3006c59954edc2f3531e
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Remove CONFIG_ROCKCHIP_SPL_RESERVE_IRAM=0x50000 and it will default to
0. No need to reserve the space for we move the bl31 entry to 0x40000
and limit the size of SPL at 0~0x40000.
Change-Id: Iff502eec2a38bfe112b5cadc22d772fded39c4ed
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Make sure there is enough memory when more nodes are
enabled in u-boot.dtb.
Change-Id: Ieb204daa41c04035b86064962569b08152375124
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
So that we can add "u-boot,dm-pre-reloc" to node "sdmmc_pin"
in rk3308-u-boot.dtsi to control the sdmmc iomux in spl.
Change-Id: I867927c37dd20f1b586a62676a195dbf52dca44d
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Let's rk3368-px5-evb-u-boot.dtsi include rk3368-u-boot.dtsi.
Note: px5 evb use uart4 as debug console.
Change-Id: Icca1fe00f95fb956abd41d34202af380b18f3c34
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
This issue happens on the SDK version < 8.1. The reason is we don't
read enough blocks from storage for kernel compressed type validation.
ANDROID_ROCKCHIP_LEGACY_PAGE_SIZE(16KB) is defined by rockchip legacy
mkboot tool(SDK version < 8.1) and larger than Google defined.
To compatible this, we malloc enough buffer but only read android
header and kernel image(1 block) from storage.
Change-Id: I9800e4150985adcd5dbd78c28c471604eb403eae
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Fixed-regulator maybe the first device probed by regulators_enable_boot_on(),
its failure ends up the other regulator traverse(e.g. PMIC regulator), we hope
to get this information.
Change-Id: I2f1f67232dbb8a1b72dc8dfec75f1f6414b2abb9
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
The uc_pdata->name is from property "regulator-name" which
is more accuracy to descript this regulator.
Change-Id: I813604ff528b757a1f9b9191dbdd4472f838a367
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
This is important and necessary for U-disk firmware upgrade to
avoid loading the bad kernel dtb to init USB driver.
Also helpful for normal boot.
Change-Id: I81629991547ccb2930312278295e9737f4827945
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
At this moment, we just load file entries but not really load file.
Change-Id: I550e6bd90bcdf81f866c0d5f5c6b71faa0ecde19
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Only a few developers need this feature, disable it by default.
Change-Id: I074594c8e47c34a05324e363d11613383f3528a7
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
The mode AVB_HASHTREE_ERROR_MODE_RESTART_AND_INVALIDATE will add
"androidboot.vbmeta.invalidate_on_error=yes" to cmdline, and kernel
will invalidate vbmeta if verified fail. This will modify the vbmeta.img
head and make uboot verify vbmeta.img fail in avb system. And in avb & ab
system, we can use the retry-count to change slot if verify fail without
modify the vbmeta. So just use the mode AVB_HASHTREE_ERROR_MODE_RESTART.
Change-Id: I98d60683d5365b996fcca2e85d4847d4a6df2ef6
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
- 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 partition disk layer takes over the responsibility of
slot suffix appending.
Change-Id: Ia02f5b8635676d49ec60eec7d3930740f2ba5ee4
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
This patch takes over the responsibility of slot suffix appending from
developer to framework on querying partition, it makes slot suffix
invisible for developers.
Change-Id: I33e1e8f6611232c4797d68b7b844a70db88a3eb8
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>
- It provides a way to promise kernel dtb can be loaded successfully
even when the image is damaged.
- This makes developers easily to add what they what just like a "U-Boot" dtb.
- The kern.dtb file is pack into the end of u-boot.bin while ./dts/kern.dtb
is exist.
Change-Id: I93a36a9c65ea8719e5610cdcbcc7708e5337c53f
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
- alloc sysmem after load kernel dtb successfully;
- allow distro kernel dtb to be loaded later than other
resource file, that is not controlled by code condition
"if (list_empty(&entrys_head))".
Change-Id: If1657289a4f8980ad7d7a5df7da0e061aab21504
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
The 0x0 address is usually allocated by 32-bit uncompressed kernel
and this alloc action is just a peek. Due to LMB core doesn't support
alloc at 0x0 address, we have to alloc the memblk backword a few bytes.
This patch is mainly to avoid fail message from sysmem/LMB.
Change-Id: I894ae2252a30a7690d10899484266191dfb12d15
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
This patch handles the boot fail for RK3288 4GB machine.
Change-Id: I2be6e532120595a6c10e9e99a779d9ec32f48fb5
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Since the nand driver is not standard dm driver in spl, so move
rk_nand_init() to the function end.
Change-Id: I075a309fa3d2d0b938863cdb1867b70d217f2ce3
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
fix: "ls: cannot access trust*.img: No such file or director".
Change-Id: Iabecb6b751dd3ba3f25fe725dac17cf4b7c39801
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Add "fasboot getvar is-userspace" support.
The Android-Q document shows "not allow the flashing of dynamic partitions"
is not aimed at the physical partition(call "super") but its child partitions
(i.e. system, vendor, oem...).
Change-Id: I4e21a9728a1093b68a9d1a08420586f33dcf0117
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Uniform loader, u-boot, linux low layer driver code to reduce bug in
the migration process
Change-Id: I618345fdfece2a59437a15cb3bd8d70b7c292abb
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>