forked from realmicu/uboot-wnrmod2k
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TODO
73 lines (58 loc) · 2.61 KB
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
* lib_mips/board.c : verify if all routines apply correctly to WNDR3700v1&v2
* verify need for *reset_default() family of functions; see below
* verify need for CFG_SINGLE_FIRMWARE, especially in net/net.c and net/nmrp.c
(maybe rewrite TFTP flashing?)
* create showflash command that shows flash layout
* WNR612v2: explore possibility of special Power LED flashing during u-boot
startup (may be powered off when entering CLI). This router has no amber LED
and all LEDs are off while u-boot is loading, so it looks that nothing is
happening (blinking should differ from two OpenWrt modes and emergency flash).
Timer ? Any conflicts ?
* change factory reset from resetting config partition (will be dropped because
OpenWrt ignores it) to resetting rootfs_data - needs squashfs basic support
implemented to recognize rootfs_data within rootfs
jffs2 node "rootfs_data" has below header at the beginning of every 64kB
erase block:
19 85 20 03 00 00 00 0c f0 60 dc 98 ff ff ff ff
struct jffs2_unknown_node
{
/* All start like this */
jint16_t magic;
jint16_t nodetype;
jint32_t totlen; /* So we can skip over nodes we don't grok */
jint32_t hdr_crc;
};
so scan memory above image until ART for these bytes and first occurence marks
beginning of rootfs_data partition; for image length check commands imls/iminfo
* enable HW ID for WNDR3700v1 based on PCB number
* add OPENWRT_COMPAT flag which changes image to be OpenWrt/LEDE
friendly.
+ allowed max image sizes:
for 4M : 256k uboot + 64k env -> CFG_IMAGE_LEN = 0x003A0000 - rootfs_reserved
for 8M : 256k uboot + 64k env -> CFG_IMAGE_LEN = 0x007A0000 - rootfs_reserved
for 8M : 320k uboot + 128k env -> CFG_IMAGE_LEN = 0x00780000 - rootfs_reserved
for 16M : 256k uboot + 64k env -> CFG_IMAGE_LEN = 0x00FA0000 - rootfs_reserved
for 16M : 320k uboot + 128k env -> CFG_IMAGE_LEN = 0x00F80000 - rootfs_reserved
assume rootfs_reserved = 128k or 256k
UPDATE: according to OpenWRT docs, 3 eraseblocks are reserved (192k)
+ add reset rootfs_data command and function when factory defaults
are enforced
* Fix size in below command:
wndr3700v1> fsinfo
### filesystem type is SQUASHFS
SquashFS version: 3.0
Files: 3
Bytes_used: -2080982040 <<!!!
Block_size: 65536
Inodes are compressed
Data is compressed
Fragments are compressed
Check data is not present in the filesystem
Fragments are present in the filesystem
Always_use_fragments option is not specified
Duplicates are removed
Filesystem size -2080982040 bytes <<!!!
Number of fragments 0
Number of inodes 3
Number of uids 1
Number of gids 0