rockchip: support read kernel from fit and uimage
Signed-off-by: Joseph Chen <chenjh@rock-chips.com> Change-Id: If77ffadc81bb3a53789d74f3185aa6f1650ee0e7
This commit is contained in:
parent
191c6877bc
commit
c5b2395492
|
|
@ -23,9 +23,11 @@
|
||||||
#include <sysmem.h>
|
#include <sysmem.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <asm/arch/boot_mode.h>
|
#include <asm/arch/boot_mode.h>
|
||||||
|
#include <asm/arch/fit.h>
|
||||||
#include <asm/arch/hotkey.h>
|
#include <asm/arch/hotkey.h>
|
||||||
#include <asm/arch/param.h>
|
#include <asm/arch/param.h>
|
||||||
#include <asm/arch/resource_img.h>
|
#include <asm/arch/resource_img.h>
|
||||||
|
#include <asm/arch/uimage.h>
|
||||||
#include <dm/ofnode.h>
|
#include <dm/ofnode.h>
|
||||||
#include <linux/list.h>
|
#include <linux/list.h>
|
||||||
#include <u-boot/sha1.h>
|
#include <u-boot/sha1.h>
|
||||||
|
|
@ -457,6 +459,18 @@ int rockchip_read_dtb_file(void *fdt_addr)
|
||||||
u32 size;
|
u32 size;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
|
#ifdef CONFIG_ROCKCHIP_FIT_IMAGE
|
||||||
|
if (ret) {
|
||||||
|
hash_size = 0;
|
||||||
|
ret = rockchip_read_fit_dtb(fdt_addr, &hash, &hash_size);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_ROCKCHIP_UIMAGE
|
||||||
|
if (ret) {
|
||||||
|
hash_size = 0;
|
||||||
|
ret = rockchip_read_uimage_dtb(fdt_addr, &hash, &hash_size);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
#ifdef CONFIG_ROCKCHIP_EARLY_DISTRO_DTB
|
#ifdef CONFIG_ROCKCHIP_EARLY_DISTRO_DTB
|
||||||
if (ret) {
|
if (ret) {
|
||||||
hash_size = 0;
|
hash_size = 0;
|
||||||
|
|
@ -469,7 +483,6 @@ int rockchip_read_dtb_file(void *fdt_addr)
|
||||||
ret = rockchip_read_resource_dtb(fdt_addr, &hash, &hash_size);
|
ret = rockchip_read_resource_dtb(fdt_addr, &hash, &hash_size);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (ret) {
|
if (ret) {
|
||||||
printf("Failed to load DTB\n");
|
printf("Failed to load DTB\n");
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue