Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 29 Jul 2014, 13:15
All times are UTC - 4
 Forum index » Advanced Topics » Puppy Projects
pUPnGO - 6Mb ISO - Basic Building Block Puplet
Moderators: Flash, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 35 of 58 [868 Posts]   Goto page: Previous 1, 2, 3, ..., 33, 34, 35, 36, 37, ..., 56, 57, 58 Next
Author Message
keniv

Joined: 06 Oct 2009
Posts: 195
Location: Scotland

PostPosted: Sun 18 Dec 2011, 15:06    Post subject:  

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.
Back to top
View user's profile Send private message 
goingnuts

Joined: 07 Dec 2008
Posts: 779

PostPosted: Sun 18 Dec 2011, 16:20    Post subject:  

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:
#!/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:
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...
Back to top
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4282

PostPosted: Sun 18 Dec 2011, 17:52    Post subject:  

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?
microsaurus.png
 Description   
 Filesize   122.05 KB
 Viewed   957 Time(s)

microsaurus.png


_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
goingnuts

Joined: 07 Dec 2008
Posts: 779

PostPosted: Sun 18 Dec 2011, 18:16    Post subject:  

Quote:
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.
mcb_gtk181211.tar.gz
Description  mp,Xdialog,aumix,ROX-Filer,mtpaint and dillo mcb static build
gz

 Download 
Filename  mcb_gtk181211.tar.gz 
Filesize  1.06 MB 
Downloaded  123 Time(s) 
Back to top
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4282

PostPosted: Sun 18 Dec 2011, 21:29    Post subject:  

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)

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
PANZERKOPF

Joined: 16 Dec 2009
Posts: 280
Location: Earth

PostPosted: Mon 19 Dec 2011, 11:03    Post subject:  

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.
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4282

PostPosted: Wed 21 Dec 2011, 06:54    Post subject:  

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/viewtopic.php?p=590822#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:
#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
initramfs.tar.gz
Description  here is a tarball of the initramfs that I used
gz

 Download 
Filename  initramfs.tar.gz 
Filesize  659.54 KB 
Downloaded  113 Time(s) 
microsaurus.jpg
 Description   
 Filesize   9.79 KB
 Viewed   877 Time(s)

microsaurus.jpg


_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
PANZERKOPF

Joined: 16 Dec 2009
Posts: 280
Location: Earth

PostPosted: Wed 21 Dec 2011, 12:40    Post subject:  

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.
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4282

PostPosted: Fri 23 Dec 2011, 07:24    Post subject:  

@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)

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
goingnuts

Joined: 07 Dec 2008
Posts: 779

PostPosted: Fri 23 Dec 2011, 08:12    Post subject:  

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.
Back to top
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4282

PostPosted: Fri 23 Dec 2011, 12:04    Post subject:  

thx, at least I know what is in store for me. I'd also like to make lib and include a bit more sane and clean up the need for various ../../../ garbage... using something like include/mi/mi.h and changing all references to be simply <mi/mi.h> or X11/mi/mi.h depending on where it _should_ be (what a PITA) - its hard to tell on some of them, many were split out from their parent directories into subdirectories to make things easier for someone... and a README in each dir is always useful - will put my findings, TODOs etc... there. My impression is that the xorg versions of kdrives were second class citizens toward the end, but if anyone can point me to a known sane version, I will try and pull from there too... I am kinda interested in their SDL version of kdrive (elephants and all)
_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
goingnuts

Joined: 07 Dec 2008
Posts: 779

PostPosted: Fri 23 Dec 2011, 12:30    Post subject:  

@technosaurus: The ../../../ garbage... is my fault - not originally there. I think you could upgrade to 4.8 for the Xlib things and maybe leave the Xvesa part as is - or for a later round-up. I have added some functions to make gtk work - if needed I will upload my revised tool-chain? Ever thought of putting everything in one dir (source, headers, libs)?
Back to top
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4282

PostPosted: Mon 26 Dec 2011, 00:28    Post subject:  

Not necessarily 1 directory, but possibly 3 (include, libs, programs) I also think it would be a good idea to integrate my basic init with the xvesa,jwm,rxvt mcb because it would speed up booting. I figured out how to mount /dev/pts in c too so we are talking <1s boot times.

The only difference is I would just fork xvesa_main then call jwm_main as a function call without forking it and add this at the beginning in place of using an external mount binary.
#include <sys/mount.h>
mount( "/dev/pts", "/dev/pts", "devpts", MS_MGC_VAL, NULL );

This would allow the boot to X even without busybox ... Jwm needs command.c patched though if no shell is included (i have used fork...execvp)... It also cuts resource usage.

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
goingnuts

Joined: 07 Dec 2008
Posts: 779

PostPosted: Mon 26 Dec 2011, 09:33    Post subject:  

@technosaurus: Do you have a patch for the jwm exec-thing?

Did some test on the mcb_gtk to evaluate the influence on resources:
The bigger the mcb becomes the more ram is used at execution-time. Using upx does not give a huge difference (maybe +5-10% more ram is used).
So depending on the purpose one might use mcb (nothing beats that for size on disk), standalone (lowest ram usage
/largest size on disk) or the upxed variant of the two possibilities.
I have uploaded standalone version of sylpheed-1.0.6 and roxgtk1-2.2 as they for various reasons seems to be candidates for the standalone approach (sylpheed needs ssl and is big in itself/ROX is the only one using gdk-pixbuf). The ROX is patched to do pinboard-remove so now the puppypin-stuff is working. Also included most of the other needed files (icons/cddetect/diff) and a modified pup_event_frontend_d named roxpin.sh targeted this special version. Get them here
Back to top
View user's profile Send private message Visit poster's website 
Aitch


Joined: 04 Apr 2007
Posts: 6825
Location: Chatham, Kent, UK

PostPosted: Mon 26 Dec 2011, 12:09    Post subject:  

techno/goingnuts

reading/watching you 2 develop is fascinating....I love the ideas and ways you are exploring - back to basics
I can't do coding at all, but it doesn't stop me from appreciating those who do
many thanks....look forward to a usable final minimalist version, with a brief instruction how to add[/remove?] software to taste

This maybe will suit my old IBM 560/570 that got put away with 214R on.....as being a bit slow......[I got an IBM T21, then T30/current]

thanks, guys Very Happy

Aitch Smile
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 35 of 58 [868 Posts]   Goto page: Previous 1, 2, 3, ..., 33, 34, 35, 36, 37, ..., 56, 57, 58 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Puppy Projects
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1210s ][ Queries: 12 (0.0172s) ][ GZIP on ]