Closed staroselskii closed 5 years ago
Good idea, question is of course: what goes into minimal? Just boots? Sets up bt,wifi/eth? I'll have a look at your partitioning maybe this weekend. And would be good to hear @alext-mkrs opinion.
@htot
I should've actually named it an RFC, because I'm not sure what should go into minimal. I just left the stuff that I use on almost every boot. I guess swig and tzdata should also go from minimal to the full image.
cleanjournal is kind of a mystery for me. It seems like it is responsible for some weird "bisect journal I/O errors" that I sometimes see.
So, once again: your mileage may vary so we should discuss and I'm happy to update the PR accordingly.
But I like the idea of a clean up. And there is still some stuff around that no longer has a function and should be removed entirely.
Also I liked the idea of @thecubic to use btrfs as the file system as that would make better use of the available emmc. But maybe that's for another day.
@htot
I think that btrfs is certainly something that we shouldn't mix with this PR.
So what is the minimum that the edison-image-minimal should support?
I my mind: not the tools that are used for debugging (htop, iotop, systemd-analyze etc). Maybe even not the stuff that are nice to have for a user that has cli access (timezone, less, screen).
But I think at least stuff that gets hardware initialized (oobe - when I get that to work, related python and nodejs and daemons, ap-mode-toggle etc). Probably should trigger initramfs/kernel + U-Boot build too. This way you get autoconfigured or web server configured device that doesn't do much else.
Then edison-image should add everything a developer (with Edison-Arduino) wants (cli tools not used by scripts/deamons, debugging / perf related).
While specific applications would have there own layer with image including edison-image-minimal and adding whatever else needed?
The idea LGTM. For the minimal one I'd suggest anything and everything that gets the thing booted and all the comms interfaces up (BT, WiFi, USB). Essentially what @htot proposed as well.
I'm not sure I get the idea of applications having the whole image recipe included - are we talking about single-app images for Edison where that single app's recipe would tweak the whole OS image to suit the needs and cut everything else? Essentially, the proposed split is okay even without that - I like modularity it introduces :)
Just one nitpick - the commit message in the first one ("distro: core: images: add edison-image-minimal") has several typos, I'd suggest to correct them before merging.
@alext-mkrs Wow, these are some serious typos! Sorry for that! And thanks for the review. I'll force push the changes, then?
@htot
But I think at least stuff that gets hardware initialized (oobe - when I get that to work, related python and nodejs and daemons, ap-mode-toggle etc). Probably should trigger initramfs/kernel + U-Boot build too. This way you get autoconfigured or web server configured device that doesn't do much else.
Are you sure nodejs is needed?
So, just to be on one page: do I get rid of less,screen,strace et al.?
I'm also not sure about swig? It seems more like a build dependency rather than something we'd like to have on the device, doesn't it? (I've had only a very limited SWIG exposure so there's a chance I don't understand all the detail).
I think we are on the same page.
Currently I'm fixing up the oobe
which consists of a python configuration script and a nodejs
web server. This thread made me think I can integrate the web server in the python script. And afaik other than that nodejs
is only used with mraa
and upm
which might be moved out the base image then.
I don't know why we have screen
, but `strace should go I think. And
lessI added because in interactive mode
journalctllooks messed because of the
busybox` replacement.
@htot
It'd be nice if nodejs could be left out of the image.
And less I added because in interactive mode
journalctl
looks messed because of thebusybox
replacement.
I propose to leave it be, then! Why suffer?
I don't know why we have screen
I usually use screen when deal with UART, so this is kind of hardware related.
Currently I'm fixing up the oobe
As a matter of fact I haven't used it, so can't comment on that.
Currently I'm fixing up the oobe
As a matter of fact I haven't used it, so can't comment on that.
It is a script used to setup the machine name, root password, wifi connection and used from the command line. It then doesn't do much you couldn't do in another way, but like a configuration wizard makes life easier. When called by the web server, it switches to AP mode, gets a list of available AP's, lets you enter the password and then connects to that AP. So you can potentially configure from a laptop or phone over wifi.
@htot
IMHO, this is definitely something that shouldn't go in the minimal image because, well, we can do it using some underlying tools.
If we require that the minimal image runs on a platform which minimally has a serial port, then yes, via the terminal configuration is always possible - in particular using connmanctl. OTOH we can also define the minimal image won't run on any platform, but instead always needs to be part of a distribution which adds tools for initial setup (+ particular hardware support + application). As Intel initially planned I guess looking at the division between meta-intel-edison-bsp and meta-intel-edison-distro.
So how about we just use your division as a split between image-minimal and image? Image will work as it does right now, image-minimal fulfills your requirements. And we can refine (i.e. move more away from minimal) later if needed. If other users want another division they can speak up and we can decide then.
I force-pushed the changes.
Moved to edison-image.bb:
@htot
Thanks for the review! A bit of sloppiness on my side. I'll do a force push tomorrow.
No rush.
@htot @alext-mkrs
Thank you guys for the review. I just force pushed. It'd be nice if someone could build it before merging.
Thanks. I'll test the full image prior to merging.
Merged
Hello, guys!
In this PR I propose to use a edison-image-minimal as a base for other images. This seems to be the cleanest solution for application meta-layers to depend on.
These layers then would have for example another my-awesome-application.bb image recipe with a
require recipes-core/images/edison-image-minimal.bb
. This has worked quite good for me for a while.I'm eager to hear your thoughts.