Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How to debug UBI?

debug UBI
0
Posted

How to debug UBI?

0

Use fake MTD device When debugging UBI one doesn’t have to use a real embedded platform with real flash. In many cases, it is easier to use a PC with an MTD device emulator and run UBI on top of this emulated MTD device. In fact, this is how most of the UBI development was done. There are 3 MTD device emulators in Linux kernel available: • mtdram which simulates NOR flash in RAM; • nandsim which simulates NAND flash in RAM; • block2mtd which simulates NOR flash on top of a block device; For example, to get a 32MiB fake NOR flash, run $ modprobe mtdram total_size=32768 or to get a 64MiB fake NAND flash, run $ modprobe nandsim second_id_byte=0x36 See here for more information about the NAND simulator. To ensure that you have fake MTD devices, run “cat /prof/mtd”. It should print something like dev: size erasesize name mtd0: 02000000 00020000 “mtdram test device” mtd1: 04000000 00004000 “NAND simulator partition” The fake MTD devices may further be attached to UBI (see here). Enable debug

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.