Will installation to eMMC be ever supported again?

As we know, on version 4.4, ceemmc support was removed, of course there is still a way to have newer EmuELEC versions on eMMC by installing 4.3 and updating the OS. However, this is not the ideal scenario, as it is not the “natural flow” of the OS installation.

As of 4.6, support to some S905x4 devices might be introduced (I tried the TEST build and it worked), but there is no way to install EmuELEC into the Box’s internal drive.

My questions are:
Will ceemmc be back again someday?
Or is there a way to install it on eMMC after 4.3 versions (even if risky)?

1 Like

Ampart has been a part of 4.6 test for a while.

7Ji/ampart: A simple, fast, yet powerful partition tool for Amlogic’s proprietary emmc partition format (github.com)

You can use aminstall to test it, but be aware that it comes with no guarantees nor support.

EmuELEC/aminstall at dev · EmuELEC/EmuELEC (github.com)

make sure you remove the device check, but I will repeat this comes with no guarantees nor support

1 Like

Awesome, didn’t knoiw we had some of these features. I’ll stay tuned for 4.6 with hopes for ampart. Thanks for the quick reply.

Also, loved the cup_of_tea()

S905x4 (or at least the HK1 RBOX X4 in my hand) is not supported by ampart, as it needs to read several partitions info from dtb to properly initialize the platform. There’re two partition tables on an Amlogic device: one at the beginning of the reserved partition, the other one in dtb to create the first one. Since ampart modifies the first one and Amlogic’s “friendly” u-boot will “helpfully” fix the first table if it’s different from the latter one, ampart had to remove the partition table from dtb, which therefore renders it unusable on S905X4

I always recommend learning ampart’s syntax from its documentation (Home · 7Ji/ampart Wiki · GitHub) and using ampart directly, in that way you will truly unleash the full potential of it and can do the layout in whatever way you want it. But still, however you use ampart – with aminstall to wrap around it or not, it’s not a supported feature on EmuELEC

2 Likes

Hey, @7Ji , sorry for necromancing this thread, but I didn’t think it’d be worth to bring this up on a brand new one.
About the ampart, do you think there’s a (considerable) risk of bricking a S905x4 box if I try installing EmuELEC 4.6 on it? If something goes wrong (as you mentioned it might not work on S905x4), can I reverse the damage?

Also, bringing it to a S905x3 box… I have installed EmuELEC 4.3 by eMMC, I updated it to 4.5 just fine. But could the update to the future release of 4.6 a risk?

I rewrote ampart in September to completely support s905x4, it’s just that the one in EmuELEC 's source is not bumped because I changed the API and the existing aminstall script relies on the old API to work and I’m lazy to update that. You can use the newest commit to build ampart by yourself.

The tool can now safely edit the partition layout on s905x4 because I implemented DTB modification functions (and without libfdt at all, I basically wrote my own FDT parser from ground up), and EPT(eMMC Partition Table) will be updated from this DTB just like how Amlogic’s u-boot does it, which avoids the drawback that both ceemmc and old ampart had: the partitions node had to be removed from the DTB which upsets Amlogic’s uboot and it refuses to boot. Now that the DTB can be edited and those essential partitions needed by the u-boot is kept, it’ll be happy to boot.

This is a post I made on CoreELEC forum, in which I reported I made an Android+EmuELEC dual boot on s905x4 team CE thought impossible

And actually I made the box triple boot, with Android, CE, EE all on eMMC, and also with a re-flahsable USB burning image that’ll bring this triple boot layout to all HK1 RBOX X4 devices. Thing is I don’t want to share this image because sellers will be very happy to sell these “powerful” boxes with Android+CE+EE triple boot.

The idea is simply to unpack the Android image and use ampart to modify the dtb to add additional partitions for CE and EE. If you don’t want a re-flahsable image like this you can still use ampart like the old way, shrink Android data and create new partitions for EE then install to these partitions.

If you’re using ArchLinux you can use my AUR package to easily build and install ampart on it and easily modify the burning image from there:
https://aur.archlinux.org/packages/ampart-git

Otherwise just git clone ampart and use make to build it easily, ampart only has a single dependency zlib.

The usage of ampart is very simple and pretty straightforward, just read the documentations first

Edit: for devices that the DTB must be modified with special care, go from dsnapshot mode first to get a snapshot aa working parg series for dclone mode, then work from these pargs on dclone mode with minor tweaks here and there. The bare minimum partitions for HK1 RBOX x4 is documented here: ampart/available-modes.md at ampart · 7Ji/ampart · GitHub

parg = (ampart) Partition ARGument mini-language, it’s a domain-specific language I wrote for ampart, there’s documentation for it in the doc folder

Adding to my last post, if you want to dig deeper about the Amlogic’s booting mechanism and the partition logic, I wrote a complete guide about how to install ArchLinux ARM manually on an out-of-tree Amlogic device, in which the #bootloader# and #emmc partitioning# parts documents thoroughly about these Amlogic quirks (I was considering to split these parts into their own documentation, but that’ll made the ALARM installation guide hard to follow).

This is probably the one and only documentaion as of now that explains exactly about those hidden Amlogic quirks and traps here and there, most of them are the results of my reverse engineering. With enough explanation for most of the terminology you could find hard to follow elsewhere. (I doubt you have to get a documentation from Amlogic themselves to get better explanation, which is near impossible due to their negative attitude to open sourcing their technical details, especially on late models). And after following the guide to prepare yourself with enough knowledge to set up a bootable distro from ground up on Amlogic devices. It will become way much easier to just partitiom the eMMC and dump EmuELEC files into them, since you already know how a system could be booted on Amlogic platforms.

2 Likes

This makes a lot of sense. It is kinda sad that some of the advances we make have to be kept low-profile because sellers would abuse it for profit on people who didn’t know it is easily obtained for free. About the triple-boot, it is indeed amazing, I love my EE with eMMC + Android on NAND, I feel like I really have a bit of control over its customization. But writing something so low-level like ampart is way out of my league, something I wouldn’t be able to accomplish with my scripting and high-level programming knowledge.
Thanks a lot for the explanation on how all of this works and also for replying here with updates. I will definitely check ampart out when 4.6 releases.

Also, are there any major risks (like bricking the device) of updating 4.5 to 4.6 considering it is installed in internal storage? Will it mess up the boot? Asking that because of my poor knowledge over those devices and boot logic in general.

No one can confirm when 4.6 will be released for now, but because of some of the parts I’ve touched (1. the mounting logic re-write which supports multiple externel ROM drives at the same time, and 2. the lib32 change which builds 32-bit emulator cores natively with the EmuELEC toolchain, which will probably conflict with those 32-bit “external” libraries populated as persistent files in 4.5, etc) it would probably be better to get a fresh 4.6 installation than upgrading from 4.5. The fresh installation would be pretty worth it, though, even just for the multiple ROM drives feature.

But

shouldn’t happen even though I can’t confirm, as the main booting logic was not changed yet.

That’s perfect. I’m just preparing myself for now with all the backups I can get with configs and saves until 4.6 comes.
When it releases I’ll probably format my box drive and try installing it with those ampart docs you posted.

Thanks a lot!