mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-21 06:33:41 +00:00
kernel: create bootfs partition when parsing on BCM4908
It's helpful for accessing booting data (DTS, kernel, etc.). It has to
be used carefully as CFE's JFFS2 support is quite dumb. It doesn't
recognize deleted files and has problems handling 0 inode.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 6dd727ac24
)
This commit is contained in:
parent
cb16581df5
commit
76423e2364
@ -17,7 +17,7 @@
|
||||
#define je16_to_cpu(x) ((x).v16)
|
||||
#define je32_to_cpu(x) ((x).v32)
|
||||
|
||||
#define NR_PARTS 1
|
||||
#define NR_PARTS 2
|
||||
|
||||
static int mtdsplit_cfe_bootfs_parse(struct mtd_info *mtd,
|
||||
const struct mtd_partition **pparts,
|
||||
@ -58,12 +58,16 @@ static int mtdsplit_cfe_bootfs_parse(struct mtd_info *mtd,
|
||||
if (!parts)
|
||||
return -ENOMEM;
|
||||
|
||||
parts[0].name = "bootfs";
|
||||
parts[0].offset = 0;
|
||||
parts[0].size = rootfs_offset;
|
||||
|
||||
if (type == MTDSPLIT_PART_TYPE_UBI)
|
||||
parts[0].name = UBI_PART_NAME;
|
||||
parts[1].name = UBI_PART_NAME;
|
||||
else
|
||||
parts[0].name = ROOTFS_PART_NAME;
|
||||
parts[0].offset = rootfs_offset;
|
||||
parts[0].size = mtd->size - rootfs_offset;
|
||||
parts[1].name = ROOTFS_PART_NAME;
|
||||
parts[1].offset = rootfs_offset;
|
||||
parts[1].size = mtd->size - rootfs_offset;
|
||||
|
||||
*pparts = parts;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user