Provide modules to 'init' script - done (again)

Under development: PCMCIA, wireless, etc.
Message
Author
gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

Updated version

#101 Post by gyro »

Last update released.
Please see first post.
gyro

gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

Updated version

#102 Post by gyro »

Yet another update to the 'init' patch. Now at 'modules.zdrv9.diff'.
See first post for download.

This patch simplifies the 'psavemark' processing.
(It also allows this patch to work with another little project of mine.)

gyro

gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

Updated version.

#103 Post by gyro »

Yet another update to the 'init' patch. Now at 'modules.zdrv10.diff'.
See first post for download.

Always checks for the config file on the current partition, first. (The partition containing zdrv.)
Only mounts 'SAVEPART' if necessary.
So the mount can be bypassed by copying the config file to be beside the zdrv.

gyro

gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

#104 Post by gyro »

This is a small update to the 'init' patch.
Replace

Code: Select all

if [ "$PIMOD" = ""  -a "$SAVEPART" != ""];then
with

Code: Select all

if [ "$PIMOD" = ""  -a "$SAVEPART" != "" ];then
See first post for download.

gyro

gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

config file is DOS file

#105 Post by gyro »

I just found that the 'init' patch doesn't work if the config file gets changed to DOS line ending. I suspect that the '\r' remains on the end of the variable read from the file.
I'm not sure if the line ending change is likely to happen under normal usage. (I deliberately did the change as a test.)
So, I don't intend to issue a fix anytime soon.
If it becomes a problem, I'm sure it can be fixed without much difficulty. Of course the config file could always be converted back to Unix line endings.

gyro

gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

Re: config file is DOS file

#106 Post by gyro »

gyro wrote:I just found that the 'init' patch doesn't work if the config file gets changed to DOS line ending. I suspect that the '\r' remains on the end of the variable read from the file.
Well I just fixed it.
I found a similar problem when the config file is copied into an iso. So the config file line now has any '\r' or '\n' deleted before use.

See first post for download.

gyro

gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

Review

#107 Post by gyro »

I just added a more complete 'How to use the current version' section to the first post.

A few observations upon reviewing the whole thread.

It's quite obvious that this is not 'all my own work'. So thanks to everyone who has put the grey cells to work and contributed.

This project should not impact on net booting, it uses the zdrv...sfs that normal puppy code has located.

We can make the contents of zdrv available to 'init' without destroying it and hence destroying the 'huge-kernels' concept.

We're in a catch-22 situation;
We need to load modules before we try to setup the savefile/savefolder but the definitive information needed to load modules is contained in the savefile/savefolder.

A complete solution can only be done if we find a way to automatically and reliably, detect the minimum set of modules required to load to make the keyboard work.
Then we can load those and only those.
A rewrite of 'init' can make this workaround a lot simpler, but won't solve the problem.
So, we may be stuck with some workaround like this for a while.

On the question of rewriting 'init', thanks to those who seemed to be encouraging me to do that. I must be going crazy, I'm actually thinking of how to start such a project.
A frugal only 'init' that does a switch root to a pupmode=5 situation as soon as possible and then uses this complete system to sort out the save stuff and morph the aufs stack appropriately.
But that's for some other day.

Finally some thoughts on developing this project futher.

1) The "initmodules" utility could be improved to sortout dependencies, adding them to the list.
It could also provide an example "pimod=" string that could be cut and pasted into the boot parameter line in the boot config file.

2) The 'init' code could be significantly simplified if config file support were removed.
Using "isoBooter", (choosing 'n' to the splash screen question), there is a readily editable "menu.lst" in the first partition.
Using "ISO Master", it's fairly easy to replace "isolinux.cfg" in an iso with an edited version.

3) Use "modprobe" instead of "insmod" so dependencies get sorted automatically.
Doesn't work for me.
Using a bind mount to replace the "/lib" directory of the initrd system with the "/lib" directory of the zdrv, I got "modinfo" to work, but "modprobe" still said it couldn't find the module.

gyro

Post Reply