ramips/dir878: remove the original factory partition definition

This commit is contained in:
AmadeusGhost 2020-08-12 11:01:24 +08:00
parent c91eb2a930
commit 0ca6b90875
3 changed files with 4 additions and 57 deletions

View File

@ -423,47 +423,6 @@ static struct mtd_part_parser uimage_fonfxc_parser = {
.parse_fn = mtdsplit_uimage_parse_fonfxc,
};
/**************************************************
* ubootpad96
**************************************************/
#define ubootpad96_PAD_LEN 96
static ssize_t uimage_find_ubootpad96(u_char *buf, size_t len, int *extralen)
{
if (uimage_verify_default(buf, len, extralen) < 0)
return -EINVAL;
*extralen = ubootpad96_PAD_LEN;
return 0;
}
static int
mtdsplit_uimage_parse_ubootpad96(struct mtd_info *master,
const struct mtd_partition **pparts,
struct mtd_part_parser_data *data)
{
return __mtdsplit_parse_uimage(master, pparts, data,
uimage_find_ubootpad96);
}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
static const struct of_device_id mtdsplit_uimage_ubootpad96_of_match_table[] = {
{ .compatible = "ubootpad96,uimage" },
{},
};
#endif
static struct mtd_part_parser uimage_ubootpad96_parser = {
.owner = THIS_MODULE,
.name = "ubootpad96-fw",
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
.of_match_table = mtdsplit_uimage_ubootpad96_of_match_table,
#endif
.parse_fn = mtdsplit_uimage_parse_ubootpad96,
};
/**************************************************
* OKLI (OpenWrt Kernel Loader Image)
**************************************************/
@ -531,7 +490,6 @@ static int __init mtdsplit_uimage_init(void)
register_mtd_parser(&uimage_netgear_parser);
register_mtd_parser(&uimage_edimax_parser);
register_mtd_parser(&uimage_fonfxc_parser);
register_mtd_parser(&uimage_ubootpad96_parser);
register_mtd_parser(&uimage_okli_parser);
return 0;

View File

@ -97,14 +97,14 @@
factory: partition@40000 {
label = "factory";
reg = <0x40000 0x20000>;
reg = <0x40000 0x10000>;
read-only;
};
partition@60000 {
compatible = "ubootpad96,uimage";
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x60000 0xfa0000>;
reg = <0x50000 0xfb0000>;
};
};
};

View File

@ -87,11 +87,6 @@ define Build/netis-tail
sed 's/../\\\\x&/g' | xargs echo -ne >> $@
endef
define Build/ubootpad96
uimage_padhdr -i $@ -o $@.new -l 96
mv $@.new $@
endef
define Build/ubnt-erx-factory-image
if [ -e $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) -a "$$(stat -c%s $@)" -lt "$(KERNEL_SIZE)" ]; then \
echo '21001:6' > $(1).compat; \
@ -229,15 +224,9 @@ define Device/dlink_dir-878-a1
BLOCKSIZE := 64k
IMAGE_SIZE := 16000k
DEVICE_VENDOR := D-Link
IMAGES += factory.bin
DEVICE_MODEL := DIR-878
DEVICE_VARIANT := A1
DEVICE_PACKAGES := kmod-mt7615e wpad-openssl
KERNEL_INITRAMFS := $$(KERNEL) | ubootpad96
IMAGE/sysupgrade.bin := append-kernel | append-rootfs | ubootpad96 |\
pad-rootfs | check-size | append-metadata
IMAGE/factory.bin := append-kernel | append-rootfs | ubootpad96 |\
check-size
endef
TARGET_DEVICES += dlink_dir-878-a1