Re: [PATCH v3 05/10] kernel: mtdsplit_uimage: replace "openwrt, okli" parser

2021-01-20 Thread Rafał Miłecki

On 20.01.2021 16:48, Bjørn Mork wrote:

Rafał Miłecki  writes:


On 20.01.2021 15:35, Bjørn Mork wrote:

diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c 
b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c
index 58c40e9ec70b..32c027d3e979 100644
--- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c
+++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c
@@ -429,58 +429,6 @@ static struct mtd_part_parser uimage_edimax_parser = {
.type = MTD_PARSER_TYPE_FIRMWARE,
   };
   -/**
- * OKLI (OpenWrt Kernel Loader Image)
- **/
-
-#define IH_MAGIC_OKLI  0x4f4b4c49


You have that magic value put directly in a few .dts files.

What about moving above define to the dt-bindings/mtd/partitions/uimage.h ?


Yes, that is probably a good idea for all the magics which are reused
for a number of devices.  But I do not want a situation where we have to
patch uimage.h for every new Netgear device, so I think we should avoid
this for the magics which are unique to only a few devices.


Sounds good to me!

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH v3 05/10] kernel: mtdsplit_uimage: replace "openwrt, okli" parser

2021-01-20 Thread Bjørn Mork
Rafał Miłecki  writes:

> On 20.01.2021 15:35, Bjørn Mork wrote:
>> diff --git 
>> a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c 
>> b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c
>> index 58c40e9ec70b..32c027d3e979 100644
>> --- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c
>> +++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c
>> @@ -429,58 +429,6 @@ static struct mtd_part_parser uimage_edimax_parser = {
>>  .type = MTD_PARSER_TYPE_FIRMWARE,
>>   };
>>   -/**
>> - * OKLI (OpenWrt Kernel Loader Image)
>> - **/
>> -
>> -#define IH_MAGIC_OKLI   0x4f4b4c49
>
> You have that magic value put directly in a few .dts files.
>
> What about moving above define to the dt-bindings/mtd/partitions/uimage.h ?

Yes, that is probably a good idea for all the magics which are reused
for a number of devices.  But I do not want a situation where we have to
patch uimage.h for every new Netgear device, so I think we should avoid
this for the magics which are unique to only a few devices.


Bjørn

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH v3 05/10] kernel: mtdsplit_uimage: replace "openwrt, okli" parser

2021-01-20 Thread Rafał Miłecki

On 20.01.2021 15:35, Bjørn Mork wrote:

diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c 
b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c
index 58c40e9ec70b..32c027d3e979 100644
--- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c
+++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c
@@ -429,58 +429,6 @@ static struct mtd_part_parser uimage_edimax_parser = {
.type = MTD_PARSER_TYPE_FIRMWARE,
  };
  
-/**

- * OKLI (OpenWrt Kernel Loader Image)
- **/
-
-#define IH_MAGIC_OKLI  0x4f4b4c49


You have that magic value put directly in a few .dts files.

What about moving above define to the dt-bindings/mtd/partitions/uimage.h ?

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel