bcm2-utils icon indicating copy to clipboard operation
bcm2-utils copied to clipboard

Ubee DDW36C profile question

Open Anonymous941 opened this issue 8 months ago • 4 comments

@jclehner I'm confused on how to write a device profile for the Ubee DDW36C. For example, when trying to convert this /flash/show portion (full output):

Flash Device Information:

      CFI Compliant: no
        Command Set: Generic SPI Flash
   Device/Bus Width: x16
 Little Word Endian: no
    Fast Bulk Erase: no
    Multibyte Write: 256 bytes max
  Phys base address: 0xbadf1a5
 Uncached Virt addr: 0x1badf1a5
   Cached Virt addr: 0x2badf1a5
   Number of blocks: 257
         Total size: 16777216 bytes, 16 Mbytes
       Current mode: Read Array
        Device Size: 16 MB, Write buffer: 256, Flags: 0

      Size  Device      Device     Region
Block  kB   Address     Offset     Offset   Region Allocation
----- ---- ---------- ----------- --------- -----------------
    0   32 0x1badf1a5           0         0 Bootloader
    1   32 0x1bae71a5      0x8000    0x8000 Bootloader (65536 bytes)
    2   64 0x1baef1a5     0x10000         0 Permanent NonVol
    3   64 0x1baff1a5     0x20000   0x10000 Permanent NonVol (131072 bytes)

I don't understand why both of these are duplicated, and the number of bytes doesn't match up with the device offsets. My best guess is this:

{
	.name = "ddw36c",
	.pretty = "Ubee DDW36C",
	.spaces = {
		{
			.name = "flash",
			.size = 16 * 1024 * 1024,
			// what is .blocksize?
			.parts = {
				{ "bootloader", 0x000000, 0x010000 },
				{ "permnv", 0x010000, 0x020000 }
			}
		}
	}
},

Anonymous941 avatar Jun 09 '24 23:06 Anonymous941