Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Most eMMC chips (basically the chip version of an SD card) can be configured to work in pseudo-SLC (pSLC) mode. This halves the capacity but improves the write endurance by several times.


Raspberry Pi's "Making a More Resilient File System" document https://pip.raspberrypi.com/categories/685-app-notes-guides-... has instructions on how to configure the eMMC on the CM4 and CM5 to run in pSLC mode. Halving the storage capacity.


Yup. mmc-utils is the way to go. Note that this change is irreversible once you send the command to finalize the settings.

The single biggest thing you can do to improve the reliability of your embedded system is to use eMMC’s built-in hardware partitioning.

- Each hardware partition is a separate block device. A firmware update cannot corrupt the device by overwriting a partition table.

- There are two small boot partitions, and they can be made permanently read-only after programming, thus preventing corruption of your bootloader. You can also use the other one read-write for your uboot environment.

- You can easily have two OS partitions for A/B firmware updates. In addition to mounting them readonly, temporary write protection can be enabled on a per-partition basis and disabled when needed for fw updates.

- If you can’t afford the capacity hit from pSLC, I believe it can be enabled on a per-partition basis. (Don’t quote me on this, it could be wrong).

All these settings can be configured with either mmc-utils or u-boot. In volumes, programming houses can take care of this for you. (You’ll have to list all the registers out very specifically in an Excel spreadsheet)

The downside is that calculating all the correct register values is not a simple process, and you’ll have to spend a bit of time reading the eMMC spec.


How come there is so much "permanent" config for SD cards?


I believe it's because it originally was SD/MMC which was supposed to be a future media for audio and the like for retail sale. I had some read only palm pilot cards like this - books etc were also sold this way for a short period.


The spec was developed with DRM as one of its use cases.


Probably the same reason microcontrollers have OTP fuses—to prevent accidental corruption in the field or from buggy programming.


Could you also use ZFS or BTRFS with copies? I'm not sure I'd trust any of these drives.


Guess what the PocketCHIP guys did in a upgrade. Exactly the oppsite. Yes, ubifs died every time.


They switched it from SLC to MLC? I wouldn't expect 2 bits per cell to cause problems... how bad was the flash?

Unless you're saying the switch corrupted the existing data, in which case wow what a screwup.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: