Find the uboot by CONFIG_MTD_BLK_U_BOOT_OFFS address from nand,
spi nand, nor flash with mtd block interface.
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I6032570406a8eda2609ad877785e71c6c8b5df0c
Address definition:
comp = <0x...>: compress image address;
load = <0x...>: decompress image address;
We default reserve 1MB size for decompress if there is
no "comp = <0x...>", assuming it's enough for U-Boot,
tee and atf, etc.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ic82f69551301121f08fba88ff433ad5789859b70
Support load kernel fit image from boot/recovery partition
and ignore U-Boot proper if we expect to boot kernel in SPL.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I220c70c784e2327feea591756cbbde97ada8335f
Move code to a function in order to be shared with other code.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I0d54ea7bb28a54a54eb313cda11c33f4d4564a84
On the view of spl_xxx.c, it only cares about loading
U-Boot by spl_load_simple_fit().
Other partitions is better to be loaded in the
spl_load_simple_fit().
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I15625f7ebdb3aaee5491fddabf544951723b00a9
Add more args for the function to parse more fit information.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I9be6607e5f7eb9b9912eb570f765dc6f634f956e
Fixes: b9e63a962a ("edid: support decode edid to drm modes")
Change-Id: I97cece70ff053bedd78b9af29be64c3d3d7679eb
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
We add the support of the padding pss for rsa signature.
This new padding is often recommended instead of pkcs-1.5.
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
(cherry picked from commit 061daa0b61f0fbeb214c566f3adb23da05545320)
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I28e5722504bfd0428cd119b2aaae60682a720648
The rsa signature use a padding algorithm. By default, we use the
padding pkcs-1.5. In order to add some new padding algorithm, we
add a padding framework to manage several padding algorithm.
The choice of the padding is done in the file .its.
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
(cherry picked from commit 20031567e12bb312bff95b70767f6275e20f0346)
Conflicts:
common/image-fit.c
lib/rsa/rsa-sign.c
lib/rsa/rsa-verify.c
Change-Id: Ie522fec1ea69e6b86ebde0f7dad91a45670da66b
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Not only does dw-hdmi use these functions, but others
need to use them, such as inno-hdmi.
Change-Id: I1ced6e30b7634511fecbbfb39c24ede78894dd1d
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
This reverts commit 359ed52cc2.
This early return causes variable "image_info" not initialized.
spl_load_fit_image() should return 0 only at the end.
Change-Id: I7dba24826758763e6e4da56579546cb50b9cb984
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
It's not a standard and nice interface, remove it.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ib918c4759fa5e01393c36eccd5673b8ca754ef35
Rename CONSOLE_SERIAL_SKIP_INIT to DEBUG_UART_ALWAYS_MODE for
easy understand.
Select this to always use debug UART, skip complicated
console UART register.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I3c265840bde015fe5fd7c73d959ba0538297b7c2
The part_get_info_by_name() return number that is greater than
zero when called successfully.
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ib3127f90368e7c2bfb9573c7d17e1e98dc67d9db
Don't mix rkfw in the mmc_load_image_raw_sector(), it's
not flexsible to add more feature for rkfw.
Pass blk desc to load.dev that the same as spl_mtd_blk.c
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I87ff776362a667ea0e558749016ae3ba7049e053
- clean and simplify the code.
- support a/b system and spl boot kernel.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I1adb2c1853e51a01e80d7453715ba2aabe0fc973
Kernel will alloc reserved memory dynamically for the node.
This patch avoids the sysmem warning dump.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I9b3a397c022450c152d479a60877551ee803ef91
Don't verify otp verified-boot flag for every image, the same as
signature verify.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I48c230db4429c9530066d0f42de1eea7609ba4b5
Otherwise the next stage will respond to the decompress completed interrupt.
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ie56a7eb939374bd5aac326bb3cd022225bf71dd2
The simple CLI mode only support run_command() which can't support
powerful command line syntax like if...then...else...fi conditionals
or `&&' and '||'.
The run_command_list() falls back to run_command().
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I136cba71e02fd1f57c9a395b37679d9a885ba4a0
It avoids compile error while disabling CONFIG_ARCH_FIXUP_FDT_MEMORY.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I283a335c2ecf559e42544ab138af414423d8a888
According to armv7 spec, translation table base 0 address is align to
2^(14-n). The n is set by TTBCR and is set to zero in uboot.
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I3d4c3f7165d3ef27bcc51d90471830f5e6dccae5
error: ‘reset_cpu_if_android_ab’ defined but not used
[-Werror=unused-function]
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I724ea99df27f9f572aa0913491eddb2b5e248e38
Puting the generic function declaration together that the
caller don't need care too much about different header file.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ib37d1550e5a747d8f18e30c428ea8f613f9cc006
The misc attach different device. We use the misc_mode to show
different device's capability.
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ibce5bb0465e452a7e783c5859f1e8ab2bfd8b0c5
Not allow non-signature image to boot if board requires
signature verify.
The board signature verify usually depends on otp/efuse
key is enabled or disabled.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I4e4dd201e74712a53cb0f481463b48532e30bb40
board_r.c supports noncache memory region right below malloc
area, but board_f.c seems does not reserve it.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I7da218b6d994227a04a91cea02b64b6c91a0cc54
Load compressed kernel and ramdisk firmwares in these addresses.
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Icca49069fcaa08c19f5ef574d9ec4f803dbba6d1
Add riscv uimage arch to support riscv-linux booting.
It can Convert riscv-linux to image which can be
booted by bootm command.
Signed-off-by: Rick Chen <rick@andestech.com>
Signed-off-by: Rick Chen <rickchen36@gmail.com>
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I38119fadebb4fa9f1db12897d6561f97fbf03f02
(cherry picked from commit: 86aa65a0cd2)
Support common commands bdinfo and image format,
also modify common generic flow for RISC-V.
Signed-off-by: Rick Chen <rick@andestech.com>
Signed-off-by: Rick Chen <rickchen36@gmail.com>
Signed-off-by: Greentime Hu <green.hu@gmail.com>
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Change-Id: Id58d17cd58433fdadc8ce7ee78d72035f84adb53
(cherry picked from commit 068feb9b86d991283c43b56e36094f4e6f484d04)
Just add IH_TYPE_STANDALONE to fit_get_image_type_property().
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I0e3dbfad3e15decb81665fabb8d25e1b71f4c7b7
(cherry picked from commit 0298d203754)
Cache/mmu/interrupt cleanup is recommand before jumping to
next stage to avoid some uncertain things.
Provide a arch/board-specific callback to do cleanup things.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ic5e4e378ec9080e7af283741370bcd9c2dc897dc
fit verify process should not depend on this condition, because
it's set by env variable "verify" which maybe can be updated by
fw_setenv tool in userspace.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ibcce0d388de64f3809e5e302d1c5cffc01e6c290
Could be override in boot_from_devices().
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ifbfac5903ec61e65739732949f9e6b8a2704155d
(cherry picked from commit f8ca32e1ca)
The spl can bring up uboot & kernel, and their entry points are diffirent,
so pass their entry points by entry_point_os.
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I625d135d219cfbfb620ff1e3d0de5278143f4079
(cherry picked from commit 78628ac9a9)