Updating to Debian ubi.img.1.0.6 (just the file system partition), then just type "boot".

Of course, anything that you have placed or configured on the previous image is GONE! right ? Yes of course, we've just re-imaged the filesystem partition.

Flashing the dtb, Kernel and the Debian FS with ubi v1.0.6:

=> mmc rescan
=> fatls mmc 0
            system volume information/
            star trek the motion picture (1979)/
            rt documentation/
    37018   am335x-owasys.dtb
    74400   mlo
    40323   owasys104.png
 113770496   ubi.img.1.0.6
  8912896   ubi.img.backup1
   472172   u-boot.img
  3523888   zimage

7 file(s), 15 dir(s)

=> fatload mmc 0 0x82000000 am335x-owasys.dtb
reading am335x-owasys.dtb
37018 bytes read in 22 ms (1.6 MiB/s)
=> nand erase 0x200000 0x80000

NAND erase: device 0 offset 0x200000, size 0x80000
Erasing at 0x200000 -- 100% complete.
=> nand write 0x82000000 0x200000 0x80000

NAND write: device 0 offset 0x200000, size 0x80000
 524288 bytes written: OK
=> fatload mmc 0 0x82000000 zImage
reading zImage
3523888 bytes read in 378 ms (8.9 MiB/s)
=> nand erase 0x400000 0x1000000

NAND erase: device 0 offset 0x400000, size 0x1000000
Erasing at 0x1380000 -- 100% complete.
=> nand write 0x82000000 0x400000 0x1000000

NAND write: device 0 offset 0x400000, size 0x1000000
 16777216 bytes written: OK
=> fatload mmc 0 0x82000000 ubi.img.1.0.6
reading ubi.img.1.0.6
113770496 bytes read in 11653 ms (9.3 MiB/s)
=> nand erase 0x2800000 0x3d800000

NAND erase: device 0 offset 0x2800000, size 0x3d800000
Erasing at 0x3ff80000 -- 100% complete.
=> nand write 0x82000000 0x2800000 0x7000000

NAND write: device 0 offset 0x2800000, size 0x7000000
 117440512 bytes written: OK

=> boot
Booting from nand ...

NAND read: device 0 offset 0x200000, size 0x80000
 524288 bytes read: OK

Falsh device = /dev/ubi0

Flash layout

# cat /proc/mtd

dev: size erasesize name
mtd0: 00080000 00080000 "NAND.SPL"
mtd1: 00080000 00080000 "NAND.SPL.backup1"
mtd2: 00080000 00080000 "NAND.SPL.backup2"
mtd3: 00080000 00080000 "NAND.SPL.backup3"
mtd4: 00080000 00080000 "NAND.u-boot-spl-os"
mtd5: 00080000 00080000 "NAND.u-boot"
mtd6: 00080000 00080000 "NAND.u-boot-env"
mtd7: 00080000 00080000 "NAND.u-boot-env.backup1"
mtd8: 01000000 00080000 "NAND.kernel"
mtd9: 01400000 00080000 "NAND.file-system.backup1"
mtd10: 3d800000 00080000 "NAND.file-system"

Partition name.Purpose

Offset in blocks


Image name
mtd8kernel16 M400,000zImage

No backup boot

Hello Martin,
The booting sequence has been defined in this way for security reasons, to avoid third party sw being booted from a SD card. If you brick the unit, let's say because the u-boot has been wrongly flashed, the only solution is to send it back to owasys to recover it.
About the partitioning, this has been adopted because they are based in Beaglebone structures and the unused ones are kept just in case, for future use. And the backup partition can be left untouched, just not write to it. It is meant to boot from this when the main FS does not boot, in order to try to repair it, nothing else.

Best regards / Un saludo

Iñigo Alday
Parque tecnologico 207B
48160 Derio - Bizkaia (Spain)
Tel: +34 946 025 336 / +34 637 371 302

2018-03-06 17:57 GMT+01:00 Martin Politick <mpolitick@wencomine.com>:
On B)
Yes I've read that part, does it not assume that:  mtd0 &  mtd5 are all valid ?
What I mean is what is mtd1, mtd2, mtd3 and how can I use it ?
I assume that the boot ssequence is : http://processors.wiki.ti.com/index.php/Boot_Sequence
If, for some reason i BRICK my Owasys43, is there a way for me to set the pins to "SW4 = 00100111 (high to low, i.e. SW4.1 = 1)" to make the CPU boot from the external card ?
Also, would it not be safer to keep the  file-system.backup1 as it was in a known good state and not overwrite it in case  ubi.img.1.0.3 is wrong ?
Say flash "nand write 0x82000000 0x2800000 0x7000000", then reboot and verify it works then update the "nand write 0x82000000 0x1400000 0x1000000"

ubinfo /dev/ubi0 -a

mtd_debug info /dev/mtd0


device nand0 <nand.0>, # parts = 10
#: name size offset mask_flags
0: NAND.SPL 0x00080000 0x00000000 0
1: NAND.SPL.backup1 0x00080000 0x00080000 0
2: NAND.SPL.backup2 0x00080000 0x00100000 0
3: NAND.SPL.backup3 0x00080000 0x00180000 0
4: NAND.u-boot-spl-os 0x00080000 0x00200000 0
5: NAND.u-boot 0x00080000 0x00280000 0
6: NAND.u-boot-env 0x00080000 0x00300000 0
7: NAND.u-boot-env.backup10x00080000 0x00380000 0
8: NAND.kernel 0x01000000 0x00400000 0
9: NAND.file-system.backup1-(NAND.file-system0x01400000 0x01400000 0



active partition: nand0,0 - (NAND.SPL) 0x00080000 @ 0x00000000



mtdids : nand0=nand.0
mtdparts: mtdparts=nand.0:512k(NAND.SPL),512k(NAND.SPL.backup1),512k(NAND.SPL.backup2),512k(NAND.SPL.backup3),512k(NAND.u-boot-spl-os),512k(NAND.u-boot),512k(NAND.u-boot-env),512k(NAND.u-boot-env.backup1),16m(NAND.kernel),20m(NAND.file-system.backup1-(NAND.file-system)