pUPnGO - 6Mb ISO - Basic Building Block Puplet

A home for all kinds of Puppy related projects
Message
Author
User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#501 Post by technosaurus »

goingnuts wrote:Not sure about loading of firmware - might not work for that...
Also it seems to work without the content in /ect/modules.
there was a firmware loader as a separate small package on the same sourceforge page
http://prdownloads.sourceforge.net/linu ... _13.tar.gz
(the other version is roughly the same age as diethotplug though ...)
Re: kernel version ... I am assuming the *_module.maps would vary from kernel to kernel, which are what the build uses to generate its header files.

Edit: also found this dillo ssl patch, may work better?:
http://www.jp.freebsd.org/cgi/query-pr.cgi?pr=96592
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#502 Post by goingnuts »

Thanks - I think the ssl patch only makes the ssl-compile possible without changing the real content...
Could not get the firmware thing to compile but will try again later...

Now have Amigos patched ROX-Filer-1.2.2-12 done (without Xft) as standalone or in a MCB - but think it needs some reconfiguring (update icons and helper scripts). But everything seems to work!
Ends up in a 1645K static bin and it seems resource use is extremely low compared to the standard ROX-Filer in P412...(3000K versus 30000K running pinbord and 1 file-window).
Edit: reduced standard ROX ressources above from 30000K to 15000K :oops:
With all these gtk´s onboard...is there any way of preventing a "freeze" if you start too many programs and run out of free ram?
Also discovered that even though diethotplug is fast and attractive - some other functions are depending on the different pupevent scripts - some alternative scripts to handle this should them be made...
Been busy trying to get ROX-Filer running in pupngo - almost working but cant get drive icons to line up (ends in a stack in left bottom corner) and only the cddrive that I boot from opens filer window..?

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#503 Post by technosaurus »

goingnuts wrote: With all these gtk´s onboard...is there any way of preventing a "freeze" if you start too many programs and run out of free ram?
Also discovered that even though diethotplug is fast and attractive - some other functions are depending on the different pupevent scripts - some alternative scripts to handle this should them be made...
Been busy trying to get ROX-Filer running in pupngo - almost working but cant get drive icons to line up (ends in a stack in left bottom corner and only the cddrive that I boot from opens filer window..?
sure... If its an mcb you could use a while loop to sleep 1 while freemem is less than the amount needed. That was my main reason for writing jwm notify ... To provide important notifications without using additional resources. As for the other parts, please post ... BTW I got a working jwm in a ~600kb initrd.gz ... Need to play with some more stuff to get rxvt to work though, looks like I will need mdev at the least.

Edit: I was thinking about designing a little gtk1 frontend in C using glade 1.x if anyone is interested, but I may need some help with a couple things...

Edit2: just noticed this version of jwm in the mcb_vesa uses sh -c to exec apps ... (I had patched to either use system or my fork_exec code to save ~1mb per process)
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#504 Post by goingnuts »

Whats is there to say....? I knew you were some where in the future..now we know you must be a GD enterprise...
COOL!

User avatar
MinHundHettePerro
Posts: 852
Joined: Thu 05 Feb 2009, 22:22
Location: SE

#505 Post by MinHundHettePerro »

Hello :)!

@technosaurus

Very nice toy! - Been playing with it the whole day!

A couple of questions:

1
I use a swedish keyboard and took the easy way out to implement this in this microsaurus-thingy - I simply ungzipped P412's /root/lib/keymaps/se.gz to /usr/share/kmap/se.kmap.

Lo and behold - now I can use my se-kbd out in a terminal (åÅäÄöÖ works and shows properly, as do the other se kbd-layout keys), but in an x terminal-emulator - no go!

Seems like the real terminal uses utf8, and the x term emulator uses ascii/ansi.

In the "welcome screen" - startupcommands - åÅäÄöÖ can be entered properly, but in rxvt, just renders ??????.

A file containing 'e5 c5 e4 c4 f6 d6' renders properly when cat'ed in rxvt, and so does echo -e "\xe5\xc5\xe4....".

- It also makes it impossible to enter backticks (`) in rxvt :(!!!

Any thoughts, did I take a too easy route by simply re-using P412's /root/lib/keymaps/se.gz, is there a better/more complete kmap to use?


2
I'd like to have, at least one free, available tty, apart from the two already in use (tty1, start-up; tty2, x), how to implement this? Or, is this constrained already at compile time?


Cheers :)/ MHHP
[color=green]Celeron 2.8 GHz, 1 GB, i82845, many ptns, modes 12, 13
Dual Xeon 3.2 GHz, 1 GB, nvidia quadro nvs 285[/color]
Slackos & 214X, ... and Q6xx
[color=darkred]Nämen, vaf....[/color] [color=green]ln -s /dev/null MHHP[/color]

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#506 Post by technosaurus »

I made no real effort to do those things as of yet, I just kept half-splitting between what I thought was the absolute minimum to get xvesa+jwm+rxvt and a small, known-working build (pupngo) ... I actually wanted to have to think about "why?" when adding stuff back in, so that it can be done a little more cleanly ... for instance my entire file structure looks like a house of cards built on symlinks (it is) -- I was actually planning to add the localization types of stuff a bit differently as well, only from inside of X and it is easier for me to rewrite stuff from scratch than to adapt existing code... nothing set in stone at the moment, but take heart in knowing that one of my main purposes in doing this in X, was to enable friendlier bootup with better localization - with every option being specifiable @ the bootloader (I like to run pfix=ram, and am loving qemu now, so I don't want to have to set these all the time)
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
MinHundHettePerro
Posts: 852
Joined: Thu 05 Feb 2009, 22:22
Location: SE

#507 Post by MinHundHettePerro »

technosaurus wrote:I made no real effort to do those things as of yet, I just kept half-splitting between what I thought was the absolute minimum to get xvesa+jwm+rxvt and a small, known-working build (pupngo) ...
I hope you keep on half-splitting ...
Microsaurus reminds me of BL3, but in a modern disguise (and with development potential) - now I'll have to dig around for my BL3-files to see if I ever did get se-kbd working there ...

Cheers :)/ MHHP
[color=green]Celeron 2.8 GHz, 1 GB, i82845, many ptns, modes 12, 13
Dual Xeon 3.2 GHz, 1 GB, nvidia quadro nvs 285[/color]
Slackos & 214X, ... and Q6xx
[color=darkred]Nämen, vaf....[/color] [color=green]ln -s /dev/null MHHP[/color]

PANZERKOPF
Posts: 282
Joined: Wed 16 Dec 2009, 21:38
Location: Earth

#508 Post by PANZERKOPF »

MinHundHettePerro wrote: I use a swedish keyboard and took the easy way out to implement this in this microsaurus-thingy - I simply ungzipped P412's /root/lib/keymaps/se.gz to /usr/share/kmap/se.kmap.
Lo and behold - now I can use my se-kbd out in a terminal (åÅäÄöÖ works and shows properly, as do the other se kbd-layout keys), but in an x terminal-emulator - no go!
Seems like the real terminal uses utf8, and the x term emulator uses ascii/ansi.
In the "welcome screen" - startupcommands - åÅäÄöÖ can be entered properly, but in rxvt, just renders ??????.
Your system locale (/usr/lib/locale/?)and Xlocale (/usr/share/X11/locale/?) are correct? Did you have needed files in those directories?
A font used by xterminal is correct?
Also, Kdrive servers like Xvesa and Xfbdev haven't Xkeyboard extension by default so keyboard setup can be performed with xmodmap only. You should create an Xmodmap file with needed redefinitions then load it with xmodmap utility.
SUUM CUIQUE.

User avatar
MinHundHettePerro
Posts: 852
Joined: Thu 05 Feb 2009, 22:22
Location: SE

#509 Post by MinHundHettePerro »

PANZERKOPF wrote:
MinHundHettePerro wrote: I use a swedish keyboard and took the easy way out to implement this in this microsaurus-thingy - I simply ungzipped P412's /root/lib/keymaps/se.gz to /usr/share/kmap/se.kmap.
Lo and behold - now I can use my se-kbd out in a terminal (åÅäÄöÖ works and shows properly, as do the other se kbd-layout keys), but in an x terminal-emulator - no go!
Seems like the real terminal uses utf8, and the x term emulator uses ascii/ansi.
In the "welcome screen" - startupcommands - åÅäÄöÖ can be entered properly, but in rxvt, just renders ??????.
Your system locale (/usr/lib/locale/?)and Xlocale (/usr/share/X11/locale/?) are correct? Did you have needed files in those directories?
N/A in microsaurus' case, besides, I rarely set my locale corresponding to my keyboard layout - e.g. in Puppy I usually set my locale to en_GB, while my kbd-layout, both in console and in X, is set to "se".
A font used by xterminal is correct?
Yes, that could very well be the case. I tried to change rxvt's font in ~/.Xdefaults, to no avail, though. But, could be the cause of the problem.
Also, Kdrive servers like Xvesa and Xfbdev haven't Xkeyboard extension by default so keyboard setup can be performed with xmodmap only. You should create an Xmodmap file with needed redefinitions then load it with xmodmap utility.
Ah, I'm not so experienced with Xvesa, I could try to install xmodmap from P412, but what kind of kbd redefinition shall I create/look for (a bit confused here, there are compiled kmaps, kmaps, and the nested mappings files, like in /usr/share/kbd/keymaps, /etc/X11/kbd)? Grateful for input here ... :) :)
Thanks :), I'll be a-treading the x-font and xmodmap paths ...


@technosaurus
MinHundHettePerro wrote: 2
I'd like to have, at least one free, available tty, apart from the two already in use (tty1, start-up; tty2, x), how to implement this? Or, is this constrained already at compile time?
Yeah, right, I did solve it (sort of :oops: :P) by inserting

Code: Select all

getty 38400 tty3 &
into /init. But, since /etc/inittab isn't read/acted upon, it's not respawned :cry: :cry:. Ah, well, I can live with that ...


For now :)/ MHHP
[color=green]Celeron 2.8 GHz, 1 GB, i82845, many ptns, modes 12, 13
Dual Xeon 3.2 GHz, 1 GB, nvidia quadro nvs 285[/color]
Slackos & 214X, ... and Q6xx
[color=darkred]Nämen, vaf....[/color] [color=green]ln -s /dev/null MHHP[/color]

PANZERKOPF
Posts: 282
Joined: Wed 16 Dec 2009, 21:38
Location: Earth

#510 Post by PANZERKOPF »

MinHundHettePerro wrote: N/A in microsaurus' case,
Xlocale files you can borrow from same (or maybe any?) verison of Xorg.
MinHundHettePerro wrote: I rarely set my locale corresponding to my keyboard layout - e.g. in Puppy I usually set my locale to en_GB, while my kbd-layout, both in console and in X, is set to "se".
Puppy has Xlocale files. Moreover, Puppy uses Xorg with xkb (even Xvesa is compiled with xkb) so there are no problems with languages.
MinHundHettePerro wrote: what kind of kbd redefinition shall I create/look
This page may be useful for you:
http://www.faqs.org/docs/Linux-mini/Intkeyb.html
SUUM CUIQUE.

keniv
Posts: 583
Joined: Tue 06 Oct 2009, 21:00
Location: Scotland

#511 Post by keniv »

Hello All

I have used a number of puppies and I am typing this in 528. I thought I would try pupngo because I was intrigued by it's size. I was not sure which to try and so I went for the one I thought looked the most recent and downloaded V016_090611.iso from Goingnuts site. I burned the iso booted it up and went through the setup procedure. I elected to keep all the drivers. I now have the following files on my hd. GUI_016.sfs, pup_016pupngo.sfs, pup_save.2fs and zdrv_016.sfs. and I am booting from the cd. My problem is wifi setup. My wifi pcmcia card is detected. My router is detected and its id is shown. It detects the wpa security system and asks for the key. When I type in the key and hit OK I get

udhcpc:
SIOCGIFINDEX no such device

I am then asked if I want to cancel or try again. If I try again I get the same result. Can anybody help me get the wifi working. I am using an old Toshiba laptop PIII 800MHZ, 320MB and40GB hd about half full.

Regards,

Ken.

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#512 Post by goingnuts »

keniv wrote:..
udhcpc:
SIOCGIFINDEX no such device

I am then asked if I want to cancel or try again. If I try again I get the same result. Can anybody help me get the wifi working. I am using an old Toshiba laptop PIII 800MHZ, 320MB and40GB hd about half full.
Hi ken - thanks for testing pUPnGO!
The wifi-manager is my (obviously not so good) try to get a simple access wizard to wireless. Its buggy I think - sorry for that. I have seen that error before -but its a long time since I messed with the wireless manager so I do not recall how to solve it. It could be a missing/wrong (firmware)-driver.

Still testing the diethotplug as its extremely fast compared to udevd it seems. To watch what the kernel sends to it I have renamed hotplug to hotplug.bin and made the below script (named hotplug). Then the information send from kernel can be evaluated:

Code: Select all

#!/bin/sh
[ ! -f /tmp/hotplug ] && echo -n >/tmp/hotplug
echo "$(date): Arguments ($*)" >> /tmp/hotplug
echo "$(date): Environment $(env)" >> /tmp/hotplug
hotplug.bin $*
exit
Source code for diethotplug show no sign of handling firmware:

Code: Select all

int firmware_handler (void) {return 0;}
but might be modified with some calling of external script that might handle firmware...or maybe some simple c-code additions.
This page might give some good background for hotplug.
Maybe its just reinventing the wheel - but the speed increase is very attractive...

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#513 Post by technosaurus »

I have gotten the full gtk1 version running in the initrd
resource usage is under 32MB (can get <16mb if you use lower res X) with all gui apps running it is still well <48mb

I am a little distressed that the whole init script needs to keep running or you get the "attempted to kill init" message ... the extra shells push me close to 16mb ram usage with only rxvt running top
Rob Landley has oneit.c which can spawn the init script and act as PID 1, but I also remembered my basic xinit that was derived from my waitfordisplay, which gave me this basic idea:

NOTE- this is just a pseudo-code TODO
fork_exec("/sbin/init.sh")
fork()... xvesa_main(argc, argv)
waitfordisplay(void) //change to waitforX since it is builtin
fork()... jwm_main(3,{"jwm","-display",":0"})
wait()
//should kill Xvesa here, but would need the pid from fork above
fork_exec_wait(1,"/bin/sh")


also jwm/src/command.c has this line that spawns unneeded shells
execl(SHELL_NAME, SHELL_NAME, "-c", command, NULL);
could be?
#define EGGSACK(a) ({if((fork())==0) execvp(a[0],a);})
EGGSACK(command);


Note - jwm used to just use system(command) but was changed for security reasons ... perhaps this no longer applies?
Attachments
microsaurus.png
(122.05 KiB) Downloaded 1004 times
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#514 Post by goingnuts »

I have gotten the full gtk1 version running in the initrd
resource usage is under 32MB (can get <16mb if you use lower res X) with all gui apps running it is still well <48mb
Nice! Let me know if you need sylpheed or aumix as well...
Almost done with the ROX-Filer - working on the hotplug desktop icon update - will propably do a new script just to handle it - to get it out of pup_event_frontend_d.
Found that Dillo download dpi can not use busybox wget (cals wget -O - --load-cookies $HOME/.dillo/cookies.txt) and the --load-cookies makes busybox wget fail. Would also be nice here, to have a message telling that download completed...
If you use some of the dpi´s they stay running after dillo has closed - might be to service other running dillos. But they take up a lot of resources. So I think dillo should be started via a wrapper who looks after that and closes unused dpi´s.

Also found that some scripts fails (if they generate other scripts) with Xdialog. The problem is the rather useless information "locale not supported..." that glib/gtk spawns - as one of its only debug infos.
So modified the code updated build of mcb_gtk attached. No additional files (config, icons etc.) included.

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#515 Post by technosaurus »

goingnuts wrote:Also found that some scripts fails (if they generate other scripts) with Xdialog. The problem is the rather useless information "locale not supported..." that glib/gtk spawns - as one of its only debug infos.
So modified the code updated build of mcb_gtk attached. No additional files (config, icons etc.) included.
for gtk1 wjaguar suggested using -DGTK_NO_CHECK_CASTS -DG_DISABLE_CAST_CHECKS (several pages back) to save some code size. I also started a project on github called "singularity", but haven't set up the repo yet, b/c I wanted to the latest changes. I tested the aboriginal toolchain and it seems to work quite nicely, but the uclibc / uclibc++ needed some tweaking to get the smallest code size (bonus is that we could use c++ based apps) like eliminating the gnuisms and for uclibc++ disabling support for rtti and exceptions (I know how to patch around that if we need to) I am still working on a wrapper script that uses the objects (*.o files) instead of the static library (*.a archive) because it reduces the code by 10-20% by using -fvisibility=hidden (or we could just use them directly in our build scripts) ... I just wonder how many security exploits are avoided by compiling statically with hidden visibility ... the only ones left that I can think of are stack smashing ... but then we could always use -fstack-protector (or whatever it is)

So, I also tested it with the 2.6.39 kernel and it is working nicely (man I am loving qemu - though it takes ~5seconds to X in qemu vs <2 on my old crap hardware), plus it allows a lot of new things like devtmpfs, lzop/xz compressed kernel, initrd and squashfs, ext4 with support for ext2/3 using its driver. I used the kernels initramfs=(location) to build the entire thing into the kernel (this would allow us to build a "zdrv" as an initrd.xz) ... anyhow I am keeping all the modules out of the main initrd for now so that it can be used with any kernel and even built in to it (great for pxe booting)
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

PANZERKOPF
Posts: 282
Joined: Wed 16 Dec 2009, 21:38
Location: Earth

#516 Post by PANZERKOPF »

goingnuts wrote: aumix...
I recommend "gamix" instead of "aumix". Aumix lacks some controls on several soundcards whreas gamix has same functions as alsamixer. It is both compatible with gtk1 or gtk2.
SUUM CUIQUE.

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#517 Post by technosaurus »

microsaurus is now <1mb using the 2.6.32.50 kernel and resource usage is down to <5mb in Xvesa with jwm running and an rxvt terminal open

I posted a screenie and my DOTconfig here:
http://www.murga-linux.com/puppy/viewto ... 822#590822

also wrote my own init in C, but couldn't get mount(...) to work, so I used the mount from embutils (I replaced busybox with this and dash) at this point I am pretty sure we could get it down to ~4mb of resource usage by eliminating some jwm features and removing xinit and replacing rxvt with st, but why when this could be used in a full desktop environment

I did find out that upx-ing the binaries has a huge negative effect on resource usage (it almost tripled with upx'd binaries)

the other good thing to come of this little experiment

Code: Select all

#include <sys/sysinfo.h>

int main(int argc, char **argv){
	struct sysinfo info;
	sysinfo(&info);
	printf("MEMUSEDKB=%d\n",(info.totalram - info.freeram)*info.mem_unit/1024);
}
this is indirectly related to a previous question on how to prevent starting an app if ram is too low
here is the answer based on above
if (info.freeram > ramneeded) ... ;

Edit: it turns out most of the memory usage is from the jpeg background image, if you use the default background (none) memusage is reduced to <3mb ... apparently the binaries can execute in place??? this would make sense since it is a ramfs but nothing documents it... and would explain why upx caused such a large increase
Attachments
microsaurus.jpg
(9.79 KiB) Downloaded 923 times
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

PANZERKOPF
Posts: 282
Joined: Wed 16 Dec 2009, 21:38
Location: Earth

#518 Post by PANZERKOPF »

technosaurus wrote: I did find out that upx-ing the binaries has a huge negative effect on resource usage (it almost tripled with upx'd binaries)
Maybe it not cleans itself from memory after unpacking a program?
I mean that a part of UPX code stays in memory even program is already unpacked and run.
SUUM CUIQUE.

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#519 Post by technosaurus »

@goingnuts
I went to build libtinyX11 on a recent gcc and realized that most of the functions are untyped - also that some of your patches were to add int to the function and patch other places with return 0... was this to support a specific program ? if not I am planning to revert and try to selectively pull from xfree 4.8 and patch tinyX11 to use void typed functions (instead of int, since they don't require a return and sizeof(int) extra space each)
programs that fail to compile by not returning on a void type are typically because it relied on old gcc behaviors that ignored those if the function was void (I forget which version changed this, but it was a while ago, suffice to say most functions can safely be void to slightly reduce size - both compiled and runtime)
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#520 Post by goingnuts »

It was just to make gcc happy - but did not do it all the way. I tried to use the 4.8 as basis for tinyX11 but got a regression (?) during compile of Xvesa - so dropped it as the current level of tinyX11 did the job.

Post Reply