2012/6/20 Roman A. aka BasicXP <[email protected]>:
> 20.06.2012, в 10:08, Rafał Miłecki <[email protected]> написал(а):
>> 2012/6/19 Roman A. aka BasicXP <[email protected]>:
>>> Turns out the region is 0x0002 for worldwide. If you have a WNDR4500 
>>> yourself, try running routerinfo, it will give you the information you need.
>>
>> Interesting, "routerinfo" indeeds shows 0x0002:
>>> Board ID - U12H189T00_NETGEAR
>>> region_num - 0x0002
>>
>> However I took a look at tools/firmware-utils/src/mkchkimg.c and found
>> interesting thing:
>>
>> hdr->magic = htonl (0x2a23245e);
>> hdr->reserved[0] = (unsigned char)(region & 0xff);
>>
>> struct chk_header {
>>    uint32_t magic;
>>    uint32_t header_len;
>>    uint8_t  reserved[8];
>>    uint32_t kernel_chksum;
>>    uint32_t rootfs_chksum;
>>    uint32_t kernel_len;
>>    uint32_t rootfs_len;
>>    uint32_t image_chksum;
>>    uint32_t header_chksum;
>>    /* char board_id[] - upto MAX_BOARD_ID_LEN */
>> };
>>
>> And that allows me to read sth different from
>> WNDR4500-V1.0.0.103_1.0.21.chk hexdump. It looks like that:
>>
>> 2A23245E 0000003A 01010000 67010015
>>
>> So it seems that:
>> reserved[0] = 0x01
>> reserved[1] = 0x01
>> reserved[2] = 0x00
>> reserved[3] = 0x00
>> reserved[4] = 0x67
>> reserved[5] = 0x01
>> reserved[6] = 0x00
>> reserved[7] = 0x15
>>
>> I don't see any "0x02" here, especially in reserver[0]. If reserver[0]
>> is really a region, it seems to be 0x01 for me.
>
> If you look in trunk/target/linux/brcm47xx/image/Makefile, all firmwares are 
> built with region 2.

That's right, but at the same time, most of them was never tested.


Now I know I was right about two different regions.
I've just tried installing OpenWRT chk image built with region=2. I
used official firmware GUI for that. See what warning I got:

> Router Update
> Warning! You are trying to download the firmware which the region is 
> different from the current firmware you had.
> Do you still want to continue?

So despite displaying "region_num - 0x0002" in "routerinfo", official
firmware didn't like my image with region=2. So despite displaying
"region_num - 0x0002" official firmware was region=1.

-- 
Rafał
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to