Commit Graph

5038 Commits

Author SHA1 Message Date
Jason Zhu 3b1ddd14f7 spl: add CONFIG_MTD_BLK_U_BOOT_OFFS
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
2020-07-24 18:43:48 +08:00
Joseph Chen d3bfb68b0c spl: fit: seperate compress and decompress address
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
2020-07-24 18:02:27 +08:00
Joseph Chen e12dde2d59 spl: fit: support load kernel fit
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
2020-07-24 18:02:27 +08:00
Joseph Chen 3d94fb2890 Kconfig: fit: add options for loading kernel in SPL
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ice46bc2e457bb8d421d9002057ee0f00af229da8
2020-07-24 18:02:27 +08:00
Joseph Chen 569a1737e3 spl: fit: add spl_fit_load_blob()
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
2020-07-24 18:02:27 +08:00
Joseph Chen 8b16d676d3 spl: mmc: always load U-Boot partition
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
2020-07-24 18:02:27 +08:00
Joseph Chen a2b9279dbb spl: Kconfig: wrap some option by CONFIG_SPL_KERNEL_BOOT
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ia599ec3f94726e490467b5f8bc24199832d62dca
2020-07-24 18:02:27 +08:00
Joseph Chen 9c63328889 common: fit: update board_fit_image_post_process() args
Add more args for the function to parse more fit information.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I9be6607e5f7eb9b9912eb570f765dc6f634f956e
2020-07-24 18:02:27 +08:00
Joseph Chen 7385816b5a common: fit: add fit_image_get_comp_addr()
Add API to get compress address of image.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Id33d96795d5bb5db8d55a537f7d1c7a425b5b3e8
2020-07-24 18:02:27 +08:00
Wyon Bi d8123c4406 common: edid: fix the mode flag for interlaced
Fixes: b9e63a962a ("edid: support decode edid to drm modes")
Change-Id: I97cece70ff053bedd78b9af29be64c3d3d7679eb
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2020-07-16 16:21:18 +08:00
Philippe Reynes 85289e9d5d UPSTREAM: rsa: add support of padding pss
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
2020-07-15 10:33:36 +08:00
Philippe Reynes 219050bf6a UPSTREAM: rsa: add a structure for the padding
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>
2020-07-15 10:33:36 +08:00
Joseph Chen a7560f55a3 spl: fit: not allow default configure node miss
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I07af21fdc371dcfdc55115febfc3e99ff41ee8d4
2020-07-13 20:41:52 +08:00
Joseph Chen ad07c38f68 tools: mkimage: support set FIT image version
Command: "./mkimage ... -v [version]".

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I84dd5c3d7380150f428cdd0c2055929343bf2138
2020-07-09 09:23:37 +08:00
Joseph Chen fe941802b2 common: image-fit: check hash calculation result
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I11ee44465512de5ca58e22b6b61d5be8f7d0842e
2020-07-08 17:20:32 +08:00
Joseph Chen e49e7bf9b1 spl: remove unused variable "rollback_index"
We prefer use "gd->rollback_index".

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I45bc64e38224064797d8d8bd89d9d3881f8793b5
2020-07-07 16:11:07 +08:00
Joseph Chen dec078707b common: image-fit: clean up hash calculate
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: If8b96eeab57232f790c8a83fd092cba1ce6ebd75
2020-07-07 14:36:20 +08:00
Algea Cao 00997ff116 edid: Move functions of sorting modes to edid.c
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>
2020-07-06 19:40:40 +08:00
Algea Cao d34efd258b edid: Complete hdmi infoframe
Complete hdmi infoframe interfaces.

Change-Id: I4a5408c83d08fb13dc1123a87d9037d4d9dc96da
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2020-07-06 19:40:40 +08:00
Joseph Chen 7f6bf349e1 common: image-fit: print bad hash value
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I948ff79b68be626797bcc41e8c1cb4dd1bc330bf
2020-07-06 18:40:50 +08:00
Joseph Chen 4fe117be42 common: image-fit: add API to get "/totalsize"
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Icca5200040ab14ad76515888cdaa4cd16f554af0
2020-07-06 16:10:46 +08:00
Joseph Chen 9db5ffeb00 common: image: add weak fit_read_otp_rollback_index()
Board should implement it.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I95023ce489c4335fdd9034d9577ce242eac0f1ea
2020-06-30 12:30:23 +08:00
Joseph Chen e5ca21e884 common: fit: add more info for otp index
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I9360d3d4bc16c1c1f5e4a2310e79858d38413eb8
2020-06-30 12:24:31 +08:00
Jason Zhu 9a65720b98 spl: fit: release and run mcu address depended on entry_point
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ibbd28c604c6f6bf558f74c4b5a8064d894492015
2020-06-29 17:19:42 +08:00
Joseph Chen 35176ccb87 Revert "spl: fit: check image length"
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>
2020-06-29 10:14:11 +08:00
Joseph Chen 986192a2bc common: image-fit: remove fit_get_image_defconf_node()
It's not a standard and nice interface, remove it.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ib918c4759fa5e01393c36eccd5673b8ca754ef35
2020-06-24 11:21:14 +08:00
Joseph Chen c8b8e10892 common: image-sig: make fit_rollback_index_verify() __weak function.
Allow board to implement it.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Id5f87214510ccfea58621086c7c49c92ec36c06a
2020-06-24 11:21:14 +08:00
Joseph Chen a78c1921ec common: iotrace: do optimize
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I260f46e744a4059ba5b3022586c26910187606eb
2020-06-22 20:02:15 +08:00
Jason Zhu e6832242e0 spl: rkfw: fix test misc_decompress_is_complete return value
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ie378336e55d638e94f1d7c0c9dccb2c9b5ac6758
2020-06-18 10:34:16 +08:00
Joseph Chen 558b8198d4 dm: serial: introduce DEBUG_UART_ALWAYS_MODE configure
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
2020-06-16 15:07:35 +08:00
Joseph Chen 359ed52cc2 spl: fit: check image length
Do not go further if it is 0.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I1d4c07303a4998a9c112986ee4efda39c1d55d63
2020-06-15 11:41:08 +08:00
Jason Zhu 602b8060f1 spl: mmc: support load image depend on parameter next_stage
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I215cc0095d875fe8f4d58b27d49e30cb615e8167
2020-06-12 09:22:40 +08:00
Jason Zhu 1258f25b98 spl: rkfw: fix decompress error when boot.img has no ramdisk
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I43066282cd8449b08b37d5ef68d57dd3046b956b
2020-06-10 09:30:47 +08:00
Jason Zhu 44da3fa18e spl: mtd_blk: load rk firmware when load fit failed
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ic8b0a397e9193e62f7349bbd2230d34b6485b58a
2020-06-09 11:01:59 +08:00
Jason Zhu 2e93c98a37 spl: mmc: fix partition error
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
2020-06-09 10:09:06 +08:00
Joseph Chen 85f134f569 spl: mmc: add partition name to load image
Thus, the a/b system can be supported.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I8bceb3d56f50e5bb10de3ec7d4f7768aa7d61fe1
2020-06-08 16:23:31 +08:00
Joseph Chen 54ac22e074 spl: mtd blk: clean rkfw code
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I9afc158744895ac73ad54251ed68b1f959c8e9e6
2020-06-08 16:23:21 +08:00
Joseph Chen 34f805b88f spl: nand: clean rkfw code
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Icc07b4d18f4de3faf5b9e92da117a90b3c48ea4e
2020-06-08 16:23:21 +08:00
Joseph Chen 5458123932 spl: mmc: clean rkfw from mmc_load_image_raw_sector()
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
2020-06-08 16:23:21 +08:00
Joseph Chen 8a5f71e473 spl: rkfw: get partition sector independ on outside
- 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
2020-06-08 16:23:21 +08:00
Joseph Chen 99ca0554fa common: image-fdt: ignore sysmem alloc for reseved memory at zero address
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
2020-06-05 14:36:13 +08:00
Jason Zhu a6f23aea12 common: spl: define maximum decompressible size to prevent memory overrun
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ib0be02bc85cb16ccdd832abf9a56260b2f2e500d
2020-06-05 09:14:02 +08:00
Joseph Chen ca0130caa2 common: image-fit: correct fit_set_totalsize()
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I2febc67bf0b16611cd54afad75fa79ac7454f4a5
2020-06-01 14:44:48 +08:00
Joseph Chen 17a682eab6 common: fit: verify otp verified-boot flag along with kernel image
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
2020-05-28 19:13:38 +08:00
Joseph Chen 7c79bd2280 common: board_r: fix mtd blk compile error
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ie24f8c9c7e0b2642d021ec5ce673e17b5c815514
2020-05-27 11:42:03 +08:00
Jason Zhu ddb43797d5 spl: mtd_blk: apply mtd_blk_map_partitions()
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I9ed6ff49d5e366797ae1b4d9128432d1ad0e7728
2020-05-26 22:13:28 +08:00
Jason Zhu 4e2ae7292a common: board_r: apply mtd_blk_map_partitions()
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I2e1fd21a6a41f8b86ab6f52c69631018a88445ec
2020-05-26 22:13:22 +08:00
Jason Zhu 69808149dc spl: rkfw: call misc_decompress_stop() to clear the decompress irq
Otherwise the next stage will respond to the decompress completed interrupt.

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ie56a7eb939374bd5aac326bb3cd022225bf71dd2
2020-05-26 18:17:17 +08:00
Joseph Chen c516743f40 common: fit: add fit_set_totalsize() interface
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ib10984da99aa82d5dd4bbfe2b13233e7155aee41
2020-05-25 14:57:18 +08:00
Joseph Chen 4a2b8db466 common: add usbplug support
- disable some message
- add "usbplug.bin" generation
- add minimum usbplug dtb support
- add individual board_init_r() init sequence.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: If48ee49247fca6108db3a1fbab3b403241b3a8eb
2020-05-22 16:58:04 +08:00
Joseph Chen d45e5655df dm: serial: allow skip console serial init
Always use debug uart.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Id751856abd7be219e8acb4c5986469a804051934
2020-05-22 16:46:40 +08:00
Joseph Chen aedbab3f0f common: cli: allow fall back to simple cli
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
2020-05-22 16:46:40 +08:00
Joseph Chen 598c6b730e common: fdt_support: update code wrap by configure
It avoids compile error while disabling CONFIG_ARCH_FIXUP_FDT_MEMORY.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I283a335c2ecf559e42544ab138af414423d8a888
2020-05-22 16:46:40 +08:00
Joseph Chen d41e543aa6 common: spl: initial spl->next_stage
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I5066612be4c90ff674b61034768eeaba9b9c9b85
2020-05-22 16:39:51 +08:00
Joseph Chen d4229e7722 image: fit: export fit_image_check_hash()
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I41c5c853e9fdad0a9e64c823a68cc88fb68a7e55
2020-05-13 18:37:52 +08:00
Joseph Chen b3622f5b4f common: board_r: skip initr_nand() if kernel dtb is enabled
Nand will be initialized at init_kernel_dtb().

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I41ec1edfcb6328cbe02435143f212453e1638c80
2020-05-13 09:05:41 +08:00
Joseph Chen ab6f8011c4 Merge branch 'next-dev' into thunder-boot 2020-05-06 18:29:50 +08:00
Jason Zhu 1e33e3cb7c common: spl: ab: update new function to support ab system
Add spl_ab_append_part_slot()
Delete spl_get_partitions_sector()

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I116d6d708604762203974dc66a39be1a0e7b6bbe
2020-05-06 11:59:29 +08:00
Jason Zhu 9561619343 common: spl: mmc: delete ab system support in rkfw process
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I9cafffa266fbbe2c18c4300fdddb89944430cc0c
2020-05-06 11:59:22 +08:00
Joseph Chen 9c00c79ad8 Merge branch 'next-dev' into thunder-boot 2020-04-29 09:52:58 +08:00
Jason Zhu db9b4c53f2 common: spl: change TLB memory base align to SZ_16K
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
2020-04-29 09:07:43 +08:00
Joseph Chen e9e0746f31 Merge branch 'next-dev' into thunder-boot 2020-04-27 16:54:06 +08:00
Jason Zhu f141910278 common: android: fix compile error if only enable ab system
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
2020-04-27 14:32:51 +08:00
Jason Zhu 4736384cd0 spl: Kconfig: add SPL_AB depends on SPL_EFI_PARTITION
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Id4500ae748f965235aac278baee07f278d88d70a
2020-04-27 14:32:51 +08:00
Joseph Chen 2bc8e1106f Merge branch 'next-dev' into thunder-boot 2020-04-23 16:43:12 +08:00
Joseph Chen 1cef1b20c4 dm: misc: merge generic header file into misc.h
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
2020-04-23 16:17:06 +08:00
Joseph Chen 710cfa3daa Merge branch 'next-dev' into thunder-boot 2020-04-22 18:15:33 +08:00
Jason Zhu 5b7d32987c drivers: misc: use misc_mode to distinguish different device
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
2020-04-22 18:08:19 +08:00
Joseph Chen 98894c7310 Merge branch 'next-dev' into thunder-boot 2020-04-21 16:19:07 +08:00
Joseph Chen 1f452cbf59 fit: support board sig verify require
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
2020-04-21 12:02:02 +08:00
Joseph Chen 11a8d4b2e0 Merge branch 'next-dev' into thunder-boot 2020-04-21 11:09:09 +08:00
Jason Zhu d300a21655 spl: mtd_blk: support load fit firmware
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I3a32874977a7aa654b8e3fb432e3637b900525ab
2020-04-21 10:38:15 +08:00
Joseph Chen b0a6db3b4a Merge branch 'next-dev' into thunder-boot 2020-04-20 19:55:03 +08:00
Joseph Chen 30ef03eb67 spl: print entry point for U-Boot and OP-TEE
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ifeb52986851b93cb634f177e3834cbf681f3dfb0
2020-04-20 19:42:03 +08:00
Joseph Chen ec4fe46226 fit: add comment for success return
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I58f1c1a159af2da675bd47b632022c2a0cdb9d40
2020-04-20 18:29:14 +08:00
Joseph Chen 5de879f9d8 common: board_f: reserve noncache memory region
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
2020-04-20 18:29:14 +08:00
Joseph Chen c637f2321b Merge branch 'next-dev' into thunder-boot
Change-Id: I22ac688008080eac49169d752a94b66668f890fc

Conflicts:
	drivers/phy/Kconfig
	drivers/phy/Makefile
2020-04-16 15:48:00 +08:00
Joseph Chen a515b6d27e fit: spl: verify hashes of images by default
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Iea4eabcd87ea612eeeb7cb5e34ce26adee053557
2020-04-16 14:18:10 +08:00
Joseph Chen da2f97ecea common: sig: require /signature node for images verify
Not allow fail if FIT_SIGANATURE is enabled.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Icad787e4b25587121ede1b308c62e1a39e5899f1
2020-04-16 12:50:55 +08:00
Jason Zhu 2996edba74 common: spl: mmc: clean up the useless log
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ibf588d918ce6471aeb540321118e51877ce6fea0
2020-04-15 20:58:18 +08:00
Jason Zhu 6177e32d3d spl: rkfw: support decompress kernel and ramdisk
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I172b75ed0587726f5d465dcbb20bf9aa7e65e1e4
2020-04-15 11:55:40 +08:00
Jason Zhu fcf012f8b3 spl: Kconfig: add config SPL_KERNEL_COMPRESS_ADDR & SPL_RAMDISK_COMPRESS_ADDR
Load compressed kernel and ramdisk firmwares in these addresses.

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Icca49069fcaa08c19f5ef574d9ec4f803dbba6d1
2020-04-15 11:55:40 +08:00
Joseph Chen a873a53297 Merge branch 'next-dev' into thunder-boot 2020-04-14 14:16:56 +08:00
Joseph Chen b074ddcefe common: sig: require /signature node if FIT_SIGANATURE is enabled
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I415d198f4d97f6430f7a0bfd478e3bdfb2c6b5aa
2020-04-14 13:10:19 +08:00
Rick Chen f8ddf2aa61 UPSTREAM: tools: mkimage: Support RISC-V arch
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)
2020-04-14 12:45:33 +08:00
Rick Chen ade0ea07bd UPSTREAM: riscv: Modify generic codes to support RISC-V
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)
2020-04-14 12:45:33 +08:00
Jason Zhu 342d050ebb spl: fit: support boot standalone firmware
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ib3e35cfba0bb52141c8948de994f5e6c9661887f
2020-04-14 12:45:33 +08:00
Marek Vasut f2413b2f2f UPSTREAM: fit: Add standalone image type handling
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)
2020-04-14 12:45:33 +08:00
Joseph Chen 9d4243d397 Merge branch 'next-dev' into thunder-boot 2020-04-10 16:38:43 +08:00
Joseph Chen e7be2a072c Kconfig: disable CLI for verified-boot
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I09acae3dda1a886629d0f9901b4c95059cdd8b42
2020-04-10 14:17:32 +08:00
Joseph Chen f8f8bbc62f Merge branch 'next-dev' into thunder-boot 2020-04-10 12:05:09 +08:00
Joseph Chen 22c7c1a827 spl: fit: support load multiple backup of images
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I29bce60f1b958baedbd2b45e86a611b89547c0d8
2020-04-10 10:22:22 +08:00
Joseph Chen 7a1370759d fit: add rollback index protect support
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I3af0049532d7b34adadbbb1faf6c54aad6232f93
2020-04-09 18:26:22 +08:00
Joseph Chen f8ca9d164a spl: do cleanup before jumping to next stage
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
2020-04-09 18:26:22 +08:00
Jason Zhu 4ef4c8bf6e spl: rkfw: goto boot next stage directly if find used uboot
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ia32663b91e1360bc491f1db364900eb5b27892f9
2020-04-08 19:09:09 +08:00
Joseph Chen 41bb8b737c Merge branch 'next-dev' into thunder-boot
Conflicts:
	common/spl/spl_rkfw.c
	drivers/pinctrl/pinctrl-rockchip.c
	make.sh

Change-Id: I93f4dbe1e067c3b938bf64c4964bd5e7023b1daf
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2020-04-07 21:18:08 +08:00
Joseph Chen aa415ed977 common: spl: fix cherry-pick sync conflict
fixes: (1cb393f common: spl: rkfw: support bing-up arm32 firmware)

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I1b7f1a6269794ea9a4a508933381bbb8e3e7133b
2020-04-07 21:00:48 +08:00
Joseph Chen 6ba9d88bbb fit: drop images->verify condition from verify process
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
2020-04-07 19:35:27 +08:00
Joseph Chen 568848617e common: spl: set default address for entry_point_os
Could be override in boot_from_devices().

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ifbfac5903ec61e65739732949f9e6b8a2704155d
(cherry picked from commit f8ca32e1ca)
2020-04-07 17:47:16 +08:00
Jason Zhu 605bf846bd common: spl: jump next process depend on entry_point_os
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)
2020-04-07 17:47:16 +08:00