mirror of
https://gitee.com/Vancouver2017/luban-lite.git
synced 2025-12-29 01:06:56 +00:00
V1.0.6
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2022-2023, ArtInChip Technology Co., Ltd
|
||||
* Copyright (c) 2022-2024, ArtInChip Technology Co., Ltd
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
@@ -17,7 +17,9 @@
|
||||
#include <aic_utils.h>
|
||||
#include <aic_crc32.h>
|
||||
#include "fitimage.h"
|
||||
#include <boot_param.h>
|
||||
|
||||
extern struct boot_args boot_arg;
|
||||
//#define CRC32_MTD_READ
|
||||
|
||||
int fit_find_config_node(const void *fdt)
|
||||
@@ -66,6 +68,9 @@ int fit_find_config_node(const void *fdt)
|
||||
|
||||
static int spl_simple_fit_parse(struct spl_fit_info *ctx)
|
||||
{
|
||||
int len;
|
||||
const char *version;
|
||||
|
||||
/* Find the correct subnode under "/configurations" */
|
||||
ctx->conf_node = fit_find_config_node(ctx->fit);
|
||||
if (ctx->conf_node < 0)
|
||||
@@ -83,6 +88,9 @@ static int spl_simple_fit_parse(struct spl_fit_info *ctx)
|
||||
return -1;
|
||||
}
|
||||
|
||||
version = fdt_getprop(ctx->fit, ctx->images_node, "version", &len);
|
||||
strncpy(&boot_arg.image_version[0], version, 16);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -247,6 +255,10 @@ static int spl_read(struct spl_load_info *info, ulong offset, void *buf, int siz
|
||||
{
|
||||
int rdlen = 0;
|
||||
|
||||
//determines whether the read length is 0
|
||||
if (!size)
|
||||
return size;
|
||||
|
||||
if (info->dev_type == DEVICE_SPINAND || info->dev_type == DEVICE_SPINOR) {
|
||||
#if defined(AIC_MTD_BARE_DRV)
|
||||
struct mtd_dev *mtd = (struct mtd_dev *)info->dev;
|
||||
|
||||
Reference in New Issue
Block a user