[Letux-kernel] HowTo: flash Letux OS into Pyra eMMC

H. Nikolaus Schaller hns at goldelico.com
Fri Apr 13 19:54:43 CEST 2018

with the latest letux-4.16 kernel it is again possible to flash some
Letux-OS into the eMMC. Intermediate versions had an experimental driver
which is broken, so that the eMMC was usually inaccessible from user-space.

The new kernel tree includes a tool /root/tsx [1] which allows to manually controls the
txs02612 to switch between µSD and eMMC.

It is simple to use:

	/root/txs eMMC	switches to eMMC
	/root/txs uSD	switches to µSD

It calls partprobe so that the partitions become available.

Now we can use makesd [2] to install some Letux-OS variant in eMMC:

1. download makesd as described on the project page [2] to your host PC
2. make an SD card for the Pyra:
   DEV=/dev/your-sd-reader pyra -r xfce
   or use                  pyra-4g         for 4GB RAM
3. copy makesd to the rootfs partition (so that we can run it on the Pyra as well)
4. boot the Pyra with this 4.16 based SD card
5. console login or ssh into the Pyra
6. setup outgoing internet connection on the Pyra (e.g. through ethernet-gadget over USB)
7. /root/txs eMMC
8. check by cat /proc/partitions that the eMMC has been selected as /dev/mmcblk0
   you see that the special boot sectors mmcblk0boot0 exist
9. DEV=/dev/mmcblk0 ./makesd pyra -r xfce
   or use                    pyra-4g       for 4GB RAM

Note that this flashes Letux-OS (with a not well configured XFCE) and not Pyra-OS.
But it should be possible to copy/reuse some principles and code for a Pyra-OS flasher.

In the long run, we should get rid of the /root/txs tool.

This needs someone to write a better driver [3] that hooks itself into the MMC
subsystem of Linux and automatically controls the switch. Then, the eMMC will
always be accessible and an µSD in addition/parallel if installed.

But this driver does not yet exist. Besides a failed experimental one [4] which
tried to use the SDIO subdevice mechanism.

A better driver might follow the principles of the i2c-mux drivers:
drivers/i2c/i2c-mux.c. But that is up to the developer of a better driver
to decide how it is to be done.


[1]: http://git.goldelico.com/?p=gta04-kernel.git;a=commit;h=a00abbbf2d67bd5c05486fb7cba0abe30ac985a0
[2]: http://projects.goldelico.com/p/gta04-makesd/
[3]: http://projects.goldelico.com/p/gta04-kernel/issues/698/
[4]: http://git.goldelico.com/?p=gta04-kernel.git;a=shortlog;h=refs/heads/work/letux-base/hns/mmc/txs02612-sdio

More information about the Letux-kernel mailing list