This commit is contained in:
刘可亮
2024-09-03 11:16:08 +08:00
parent cf270df8d6
commit 803cac77d5
2931 changed files with 614364 additions and 31222 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023, ArtInChip Technology Co., Ltd
* Copyright (c) 2022-2024, ArtInChip Technology Co., Ltd
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -64,7 +64,6 @@ static struct nftl_volume *nftl_new_volume(char *s)
vol->next = nftl_new_volume(p);
}
printf("nftl vol: %s, size %d\n", vol->name, vol->size);
return vol;
err:
if (vol)
@@ -233,7 +232,7 @@ err:
return NULL;
}
struct mtd_partition *mtd_parts_parse(char *parts)
struct mtd_partition *mtd_parts_parse(char *parts, u32 spi_bus)
{
char *p;
p = parts;
@@ -241,6 +240,14 @@ struct mtd_partition *mtd_parts_parse(char *parts)
if (!p)
return NULL;
if (spi_bus == 1) {
while (*p != '1')
p++;
} else if (spi_bus == 2) {
while (*p != '2')
p++;
}
while ((*p != '\0') && (*p != ':'))
p++;
if (*p != ':') {