-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SD based Orange Pi Zero #36
Comments
I started trying to adjust the Makefiles This seems like a kludge? why remove debain just to add it in the same line? |
So I got the builder to build an initrd without the Debian os totaling only 10 mb. After flashing the sd card, formating the partition extracting the old uInitrd to it and setting a root device it booted. Although some service failed to start but i think its because root is RO. I think i can fix that by adding a ram disk overlay. What still needs to be done (if anyone has any suggestions how to accomplish I'm all ears.)
|
Just so you know, my plan is to make the lichee-pi stuff more generic and make it available to the rest of the boards, which I think is a completely different path than the one you are taking |
I'm poking and prodding. And on a bit of a time line with the workshop around the corner. I'm happy to to keep this and fork for now and try to get it to work untill you get your refactoring done. Or if there is something I can help with. |
@hamishcoleman in the licheepi-zero image, does If I am to enable that in common-partitions.mk for other boards, it would not have that behaviour right? It will just format the partition but not actually use it on startup? @darkdrgn2k since Raspberry Pi 2 and 3 are both working now, I don't think we need anything else out of mesh-orange for the workshop do we? Also I wonder if this patch will make the |
@darkdrgn2k I do think that the easiest way to get this working is to do it the same way the lichee pi board is working, but you have already been down that path, so perhaps wait a bit for me to untangle it more. The plan is not to even build a small initrd - since that is another entire build system project - and just rely on one simple rule: For non ramdisk use, the kernel has built-in support for the block device containing the root filesystem (ie, no modules are needed to be loaded to support the /dev/mmcblk0 device driver) - this is the case for the raspbian raspberry pi kernel and I have configured our kernel to have this for the orange-pi-zero board (and the other similar Allwinner boards) The reason for the remove/add Debian line you refer to is to ensure that the debian cpio is always first in the list - that allows the default paths to all be created by the debian cpio (and there is nothing in the build that ensures that the initrd list is constructed deterministically, so we use these filters. Rather than having a flag to allow building as ramdisk or not, I'm planning on building both images always - the PART3_SIZE_MEGS is more an internal implementation detail than anything else (And it will need to change to support building both from the one make cmd) The current lichee pi build actually extracts all the cpio files into a root dir, instead of concatenating them into the "initrd" file, so that allows a common build flow - components create archives with their output and then the backend either concatenates or extracts for either type of output. I'm going to skip adding a ramdisk overlay - if you want a ramdisk, use the ramdisk version! However, I am looking at putting in a filesystem snapshot / rollback system that might achieve a similar result for your expectations. At this point, I cannot think of anything specific I could point you at to help with - but if you keep poking and prodding, you will gain more familiarity with the system in general. |
@benhylau yes, the licheepi PART3_SIZE_MEGS flag does exactly what you are saying. There is some more logic in that board file that actually fills in the root partition (which is what I need to make general and factor out) and once that is done, it will be broadly speaking the same for other boards. If you enabled it now, you would just get an empty partition created - and nothing inside it (actually, if you didnt notice, it enforces enabling PART2 before PART3 does anything) |
Check out this commit You don't actually want to change common-partitions.mk, instead define the variable in your boars's make file and this line will detect it in common-partitions.mk |
Honestly I'm not to worried about doing or not doing an overlay. Its easy to slide in manually if needed. But it would reduce the writes to the SD card for longer-running installs. If we ever wanted to add this it be like 2 or 3 lines of code.
Ill take a closer look at the makefile now that i have a better understanding of the boot sequence. (See lower down) |
I don't think so. Although @hamishcoleman does mention that there is some "non obvious logic". But from what i see patch remove the Root Device settings from the boot arguments that (if i understand correctly) are used in a normal initrd to load a root partition. In current Mesh Orange the default initrd init's script is overwritten with one that does the conf.d/init.d boot ignoring most of these settings anyway. |
My dissection of the LicheePi (sorry i was spelling it wrong) can be found here https://cryptpad.fr/code/#/1/edit/4kyci5JqgeYJjRzy2Hq2xg/9338RNXJeJteSf5tjhbY0pgl/ So based on what you said and what i understand... as a high level, If i was to take an orange pi zero build, extract uInnitrd to a partition, add rootdev= and rootfstype= to the armbianEnv and to point to that partition, then delete uInitRd it would boot from the sd card skipping uinitrd? Update
|
just a quick redirect - the "non obvious logic" is in how the kernel decides which filesystem to use for the ramdisk - with that patch, it always uses the "tmpfs". yes, it looks like it is dicking around with root devices etc, but thats why its "non obvious". So, the whole point of those changes is to make the tmpfs available, so you can add some swap and thus have enough space to try installing docker |
After dissecting mesh orange a bit I realized that the way you get the ram disk is by never leaving the initrd stage one boot.
I have not been able to figure out how leechie builds a separate initial initrd and writes the rest of the data to the sd card. Since i was unable to figure out exactly how/where the leechipi writes its
I had some success using the Armbian stock uInitrd to boot the mesh orange with an SD Card (dumping mesh's orange uinitrd into the partition) but there are some incompatibilities so thats not an option.
What do you think the best (or easiest way for now) way to
Even if you can help me figure out the first point the rest i can "Worked around"
The text was updated successfully, but these errors were encountered: