boot linux with gnu make

…continuation of the previous post…

what is still missing from the picture I was presenting in the previous post was handling events as some of the sys v init replacement try to do.

well, a separate process should handle events, and touch/create some files with standard format with updated event information, then one could write sthg. like

event_handler: event

!webserver: stop_all_services_event

 

booting linux or gnu make negative target

Booting linux is a slow process. And it is slow as there is no good order in organizing that process… I do not pretend perfect order, but good order. That is if process X could be already started, it should be started… And is nonsense to wait for y,z,w etc. to finish to start. There are some experiments like upstart or whatsoever, but they go to far from classical unix concepts.

I was therefore playing arround with the idea of using classical gnu make to implement the build process. Each script (boot script, service script etc) should create a status file at the end. So these files would be targets. We would have rules like:

webserver: networking

networking: kernel_modules

There is however something that I would call negative target, that is missing in makefile. It in impossible to write something like:

!networking: !webserver

!kernel_modules: !networking

So this is the magic that is missing from the gnu make… Maybe it makes sense to add sthg. like that…

 

distributed build with gnu make, the minusj

I was just nanometers close to design a nice distributed build system, however the gnu make when called with -j does not tell to the target builder process any information (through environment variable) about the number of the instance started in parallel…

There is however a more complicated way, if you would like to better use the resources of a build team (suppose for eg. everybody has quadcores), where instead of calling the, let’s say gcc compiler, you call a wrapper, that would be a client application to a builddistributor server. The server would know which resources are not loaded in the network and distribute a compilation there…