Skip to content
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

CustomPiOS v2 - support for remote modules and meta modules and more #214

Open
guysoft opened this issue Nov 11, 2023 · 14 comments
Open

CustomPiOS v2 - support for remote modules and meta modules and more #214

guysoft opened this issue Nov 11, 2023 · 14 comments
Assignees

Comments

@guysoft
Copy link
Owner

guysoft commented Nov 11, 2023

Hey all,
So I am working on the idea of having CustomPiOS get better support for other boards, and modules that are stored on other repositories.
I still want to keep CustomPiOS "simple" so I am trying to limit the new logic. I would value your input if its too simple. Or not clear enough. Or if something critical is missing.

I have now a feature branch for meta modules.
The branch at work is here:
https://github.com/guysoft/CustomPiOS/tree/feature/meta-modules

This work is geared towards having what Mainsail did work on other distributions (namely OctoPi, but hopefully others too, perhaps FullPageOS).
Mainsail build for multiple boards using a "config" folder and a bunch of scripts to place the builds.
You can see how that looks here:
https://github.com/mainsail-crew/MainsailOS/tree/develop/config

So how is it expected to look?

the idea is you could do
build -d
And it would automatically download the latest image and build it.
Or run a mult_build orangepi_orangepi_zero2,raspberrypiarm64,armbian_orangepi3lts
And get a bunch of images image for your distribution for diffrent boards.
All images and settings managed

What are meta modules?

The idea is that you have a "meta" file in a modules. Which lets you add in sub modules based on if they are needed in a board.
Its an executable script that can hold any logic you like. And example for one for base is here (and there is one for network:
https://github.com/guysoft/CustomPiOS/blob/feature/meta-modules/src/modules/base/meta
So for example:

base(octopi)

Could be turned by a meta file to

base(armbian(octopi))

What are remote modules?

The idea is that you can have modules that are stored on other repositories, currently implemented only for git repositories, and have them downloaded and used at build time.
They are configured in this yaml file:
https://github.com/guysoft/CustomPiOS/blob/feature/meta-modules/src/modules_remote.yml
I could add a local yaml that a repo can add in their repository that would let you set extra modules per-repo.

More info about what mainsail are doing

Partly this started because I am trying to organize what Mainsail are doing here:
https://github.com/mainsail-crew/MainsailOS/blob/develop/config/orangepi/default#L26
Namely how we handle base for armbian and orangepi and other boards

@guysoft guysoft changed the title CustomPiOS v2 - support for remote modules, meta modules CustomPiOS v2 - support for remote modules and meta modules Nov 11, 2023
@guysoft guysoft self-assigned this Nov 12, 2023
guysoft added a commit that referenced this issue Nov 27, 2023
…e modules, get meta modules and images name to match #214
@guysoft guysoft changed the title CustomPiOS v2 - support for remote modules and meta modules CustomPiOS v2 - support for remote modules and meta modules and more Nov 27, 2023
@guysoft
Copy link
Owner Author

guysoft commented Jan 2, 2024

Just updating that there is initial support for this on the branch. I Want to build a multi-build command, that would let you build for multiple devices your OS. It also downloads the images and all together. Perhaps also have better CLI feedback.

Would value input for this.

@geeklimit
Copy link

geeklimit commented Jan 15, 2024

@guysoft

Sounds great, and I can test this today on a Raspberry Pi Zero W and a Libre Le Potato AML-S905X-CC. Unfortunately I'm not a Linux/software dev and I get a little lost on what to do.

For FullPageOS on the Libre board from "out of the box" to up and running on wifi, I'll try the following as a test?

-1. Install Raspbian, CustomPiOS, Ubuntu, or Debian (Armbian?) OS on the Le Potato
0. sudo apt-get install gawk util-linux realpath qemu-user-static p7zip-full git (xzcat? see step 11)

  1. git clone https://github.com/guysoft/CustomPiOS.git
  2. ./src/make_custom_pi_os -g armbian
  3. cd armbian/src
  4. sudo nano armbian/src/config
  5. sudo ./armbian/src/build_dist fullpageos
  6. df
  7. (insert SD card)
  8. df
  9. (note new entry, as in '/dev/sdb1')
  10. sudo umount /dev/sdb1
  11. sudo xzcat ./armbian/src/build_dist/workspace/armbian.xz | sudo dd bs=4M of=/dev/sdb
  12. sync
  13. (power down, remove SD card reader, switch SD cards, power up and log in)
  14. sudo iwlist scan | grep SSID
  15. ifconfig
  16. sudo nano /etc/network/interfaces
  17. paste:

allow-hotplug (device ID from ifconfig, as in: wlp2s0)
iface wlp2s0 inet dhcp
wpa-ssid (mySSID)
wpa-psk (mySSIDpassword)

  1. sudo nano ./boot/fullpageos.txt
  2. (enter web address to load in Chromium, save)
  3. (Power down, connect headless to display, power up and test for 24+ hours, monitor for Chromium crashes or freezes)

@guysoft
Copy link
Owner Author

guysoft commented Jan 22, 2024

@geeklimit
Sounds cool. And I whink tis worth a test, but there is no armbian image ofr librepotaton on yet. Once there is you can change this command to the right board+distro name:
./src/make_custom_pi_os -g armbian
And this:
sudo xzcat ./armbian/src/build_dist/workspace-armbian-distro-name-path-to-be/armbian.xz | sudo dd bs=4M of=/dev/sdb

@geeklimit
Copy link

@geeklimit Sounds cool. And I whink tis worth a test, but there is no armbian image ofr librepotaton on yet. Once there is you can change this command to the right board+distro name: ./src/make_custom_pi_os -g armbian And this: sudo xzcat ./armbian/src/build_dist/workspace-armbian-distro-name-path-to-be/armbian.xz | sudo dd bs=4M of=/dev/sdb

@guysoft so this is no good, then? https://www.armbian.com/lepotato/

I could use Debian, I guess?

@guysoft
Copy link
Owner Author

guysoft commented Jan 22, 2024

It should work with a little tweaking. The goal ia to have it and I have lepotato here donated for testing

@geeklimit
Copy link

ok, I don't want to push it with the variables for a test, I'm happy to test with whatever - Debian, Ubuntu, etc.. I'll give it a try this afternoon.

@guysoft
Copy link
Owner Author

guysoft commented Jan 23, 2024

@meteyou @KwadFan Do What do you do in order to maintain these images?

Can we add a lepotato one?
https://github.com/mainsail-crew/armbian-builds/

@meteyou
Copy link
Contributor

meteyou commented Jan 26, 2024

@guysoft sry for the late answer. in case of le potato, i would recommend you to use the original image. Maybe @KwadFan can tell you the current state of the le potato image in our test workflow.

but i can add the image to our armbian build workflow, if you want to test it.

@KwadFan
Copy link
Contributor

KwadFan commented Jan 26, 2024

@guysoft Hey, nice to ask me.

So, I am in closer contact with one of the developers of Libres interpretation of "Raspberry PiOS" (which it isnt really but based on some of the packages).

I was during my test confronted with a thing, how they handle their DTBs/Overlays. I had multiple back and forths with him and they decided to hear me. Therefore, there is now a posibilty to enable them in an easy way and I can built a sort of first boot service to enable "MainsailOS" typical setup.
But I got stuck due lack of time, so its in backlog and I will provide based on there Image a MainsailOS version.
That said, it should be easy to use for other projects then. I highly recommend using there own Images.
But it comes with the downside, they dont want to drop BTRFS as main / - FS. Even he tried to provide an api to resize the image if not "hot" mounted, I wasnt able to use. In the end, I see no benefit using armbian for this little boi ;)

Regards Kwad

@guysoft
Copy link
Owner Author

guysoft commented Feb 5, 2024

Adding BTRFS for librepotato makes sense. I mean I would like to see that running.
I even asked about it over 10 years ago on stack exchange, it looked like a more stable option for SBCs at the time. But Rpi didn't support it:
https://raspberrypi.stackexchange.com/questions/8265/btrfs-root-filesystem-on-raspbian

@dsx724 I am not sure if you are the right address, but saw you active there and thought you might know who to ask. What image should we add to the image build index?

@guysoft
Copy link
Owner Author

guysoft commented Feb 6, 2024

@KwadFan I see you had this effort at the time:
https://github.com/mainsail-crew/MainsailOS/pull/250/files

@KwadFan
Copy link
Contributor

KwadFan commented Feb 6, 2024

@KwadFan I see you had this effort at the time: https://github.com/mainsail-crew/MainsailOS/pull/250/files

Yes, and I didnt give up on that, had to move it to backlogs to figure out some things, dsx had changed quite a few things that you can use there overlay technic during first boot. Will pickup as soon I finished my current project. Hopefully only a few days :)

@dsx724
Copy link

dsx724 commented Feb 9, 2024

Sorry I was sick. I opened a issue almost a decade ago but RPi doesn't care: raspberrypi/linux#1761
Kind of why Libre Computer even exists :D Had enough hot garbage on the software and hardware sides.

@guysoft We have created this bugger: https://github.com/libre-computer-project/libretech-slipstream

@guysoft
Copy link
Owner Author

guysoft commented Feb 18, 2024

@dsx724 What image does libretech-slipstream customize?
I see in the readme debian-12-gnome-arm64+arm64.img. Is there a headless less data image?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants