Hi Luka,

>> -static struct mtd_partition easy98000_nor_partitions[] =
>> -{
>
> Usually partition information is on top...

I can change that easily..

>> +static struct mtd_partition dgn3500_partitions[] = {
>>       {
>> -             .name   = "linux",
>> -             .offset = 0x80000,
>> -             .size   = 0xF80000,     /* map only 16 MiB */
>> +             .name = "u-boot",
>> +             .offset = 0,
>> +             .size = SZ_64K,
>
> I prefer the old way of defining this. If we are going to use this we
> should change all lantiq targets.

You mean the SZ_ and OFS_APPEND macros? It's more readable that hex,
but your right about compatibility with other lantiq code.

>> +             .mask_flags = MTD_WRITEABLE,
>
> I think we do not need to define this.

I don't want to erase any of the original netgear partitions,
especially the bootloader. I don't want to recover the board from
erasing that.

>> +             .name = "dpf",
>
> Can you tell us why we need this partition?

This one contains atheros calibration data and some more undefined bytes...

>> +             .name = "nvram",
>
> Can you tell us why we need this partition?
> Can you tell us why we need this partition?
> Can you tell us why we need this partition?
> Can you tell us why we need this partition?

I cannot, it's the original netgear partition table.

>> +             .name = "entire_flash",
>
> No need for this.
It can go..

>> +     if (!mac_pton(str, ltq_ethaddr))
>> +             memset(ltq_ethaddr, 0, 6);
>
> What if mac address is not passed to kernel when booting?

A random MAC is generated further down the code with
random_ether_addr(ltq_ethaddr);


To summarize:

I don't know what netgear partitions are "static" during an update. I
have my flash backed-up, but it's easier to leave the original netgear
data untouched.
What about I make a clone of the wbmr partitions, leave holes at the
unknown data like this:

static struct mtd_partition dgn3500_partitions[] =
{
        {
                .name   = "uboot",
                .offset = 0x??,
                .size   = 0x??,
                .mask_flags = MTD_WRITEABLE
        },
        {
                .name   = "uboot-env",
                .offset = 0x??,
                .size   = 0x??,
        },
        {
                .name   = "linux",
                .offset = 0x??,
                .size   = 0x??,
        },
        {
                .name   = "calibration",
                .offset = 0x??,
                .size   = 0x??,
                .mask_flags = MTD_WRITEABLE
        },
};
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to