Difference between revisions of "U Boot for WRT Series"

Jump to navigation Jump to search
1,449 bytes added ,  19:50, 25 September 2021
m
no edit summary
m
m
 
(One intermediate revision by the same user not shown)
Line 17: Line 17:
To change active partitions: chpart nand0,X (where X is one of the above #s)
To change active partitions: chpart nand0,X (where X is one of the above #s)


=== Environment Variables ===
Do NOT do this (ONLY AN EXAMPLE, the U-Boot documentation would lead one to believe this "attaches" a partitions, nope, it is equivalent to using the FDISK command in DOS to actually create a partition.): To create (IE overwrite an existing partition) and "attach" (not "mount" apparently) a UBI Parition: ubi part NameOfPartition (like firmware2, IE ubi part firmware2)
 
For information: ubi info (only works after the above "attach" command is issued)
 
...and another 2 hours of research after this, and no luck what so ever in figuring out why everyone on the planet says that something like "ubi part firmware2" will ''attach'' a UBI volume, when on the WRT32X Marvell version of U-Boot, it executes a complete "FDISK" (guess what the F stands for here), and wipes everything on the existing partition (checked it twice and it DOES hose the partition).<syntaxhighlight lang="text">
It does this;
 
Venom>> ubi part firmware2
Creating 1 MTD partitions on ...
 
Instead of this;
Venom>> ubi part firmware2
mtd: Giving out device 1 to mtd=5
ubi0: attaching mtd1
</syntaxhighlight>Maybe it isn't a UBI partition at this point because it has a SquashFS image there.  Who know?  Certainly not a web page publically accessible and apparently an OpenWRT secret.  Am I cranky?  Yup.  This is what happens when smart people build things.  They don't document it very well.<br />
 
===Environment Variables===
Note the bootcmd and nandboot variables.  Essentially the boot command (setenv bootargs console=ttyS0,115200 root=/dev/mtdblock6;nand read $defaultLoadAddr $priKernAddr $priKernSize; bootz $defaultLoadAddr) breaks down as follows;
Note the bootcmd and nandboot variables.  Essentially the boot command (setenv bootargs console=ttyS0,115200 root=/dev/mtdblock6;nand read $defaultLoadAddr $priKernAddr $priKernSize; bootz $defaultLoadAddr) breaks down as follows;


* setenv bootargs console=ttyS0,115200 root=/dev/mtdblock6
*setenv bootargs console=ttyS0,115200 root=/dev/mtdblock6
* nand read 0x2000000 0x0900000 0x0600000 (this equates to the above "firmware1" mtd partition, which is defined by OpenWRT as mtd5 / kernel1 (primary kernel image & mtd6 rootfs1 (ubi))
*nand read 0x2000000 0x0900000 0x0600000 (this equates to the above "firmware1" mtd partition, which is defined by OpenWRT as mtd5 / kernel1 (primary kernel image & mtd6 rootfs1 (ubi))
* bootz 0x2000000
*bootz 0x2000000
<syntaxhighlight lang="text">
<syntaxhighlight lang="text">
CASset=max
CASset=max
Line 130: Line 146:
</syntaxhighlight>
</syntaxhighlight>


=== U-Boot Commands ===
===U-Boot Commands===
<syntaxhighlight lang="text">
<syntaxhighlight lang="text">
Venom>> help
Venom>> help
Line 307: Line 323:
</syntaxhighlight>
</syntaxhighlight>


=== Typical Command Line Boot Up Messages Displayed Via Serial Port / TTL ===
===Typical Command Line Boot Up Messages Displayed Via Serial Port / TTL===
<syntaxhighlight lang="text">
<syntaxhighlight lang="text">
BootROM - 1.73
BootROM - 1.73
Line 688: Line 704:
[  16.489803] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[  16.489803] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
</syntaxhighlight>
</syntaxhighlight>
===Thanks to...===
https://github.com/ARM-software/u-boot/blob/master/doc/README.ubi

Navigation menu