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 Fri 29 Aug 2014, 14:42
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 13 of 58 [868 Posts]   Goto page: Previous 1, 2, 3, ..., 11, 12, 13, 14, 15, ..., 56, 57, 58 Next
Author Message
gabe

Joined: 03 Apr 2009
Posts: 85
Location: Minnesota, USA

PostPosted: Mon 06 Dec 2010, 15:13    Post subject:  

I understand the purpose of your project is small embedded systems/saa, but I'm curious as to whether this can turn an old (48MB RAM) desktop into something of a word processor/basic media player. Would turbopup be better for this purpose?
Back to top
View user's profile Send private message 
goingnuts

Joined: 07 Dec 2008
Posts: 780

PostPosted: Mon 06 Dec 2010, 16:47    Post subject:  

gabe: I would try TurboPup first - I haven't tested it my self - but if it works its a lot easier than building a desktop on pupngo. If you want to play with pupngo anyway - try the BL3-sfs linked in latest version-post. BL3 has Abiword as an add-on and in one of the external links on the BL3 homepage there is a static build of mplayer. I have tested both and they seem to work.
Back to top
View user's profile Send private message Visit poster's website 
goingnuts

Joined: 07 Dec 2008
Posts: 780

PostPosted: Wed 08 Dec 2010, 17:08    Post subject:  COPY2RAM  

COPY2RAM is hardcoded to be done if RAMSIZE greater than 220Mb. I would like to make this dynamic and depending on the size of pup_412pupngo.sfs. But what should be the minimum size to handle load of kernel and initrd?
Any suggestions? Any rules of thumbs here?
Back to top
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4346

PostPosted: Wed 08 Dec 2010, 17:50    Post subject:  

Re COPY2RAM:
I posted this to Barry's Blog a while back and he has since integrated it into woof. (See init in latest wary/quirky release) I can check it out when I get back home if you need help locating the code block.

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

Joined: 30 Nov 2010
Posts: 4

PostPosted: Wed 08 Dec 2010, 18:46    Post subject:  

My plan is building a diskless PC that will netboot from my machine and load itself into RAM (only 256 MB available). I'm going to use it for one thing only -Music Player Daemon server.

I think your supermini superawesome pUPnGO is the right thing for this job, right? Any suggestions on this setup? Anything I should worry about? I'm a bit of a noob in console, but I'll learn as I go.

I don't need MPD client on that box, so I guess I don't have to load X?

I'm going to hook up a USB DAC on that box. Would your 4 MB build autodetect such a device? It's using standard USB Audio driver on more common distros (Ubuntu, Mint...), so I guess it's not something too exotic.
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4346

PostPosted: Wed 08 Dec 2010, 22:59    Post subject:  

here is the key code
Code:
RAMSIZE=`free | grep 'Mem:' | tr -s ' ' | cut -f 3 -d ' '`
SIZESFSK=`du -k ${PUPSFSDEVMNTPT}${PUPSFSFILE} | cut -f 1`
#need to add a "fudge factor" to the size of the sfs
# ... 32Mb maybe enough ... 16Mb if nox (32768 ... 16384)


@xyrion
if you are just wanting to play mp3s you can try minimp3 ... other than that you only need what you need - try the full driver version and use the zdrv cutter

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

Joined: 07 Dec 2008
Posts: 780

PostPosted: Thu 09 Dec 2010, 00:43    Post subject:  

technosaurus: Thanks a lot!

xyrion: Maybe you can use something from this post?
Back to top
View user's profile Send private message Visit poster's website 
xyrion

Joined: 30 Nov 2010
Posts: 4

PostPosted: Thu 09 Dec 2010, 05:51    Post subject:  

No MP3s, I only play FLAC.

Thank you both. That m_serv looks like a great plan B. Smile
Back to top
View user's profile Send private message 
goingnuts

Joined: 07 Dec 2008
Posts: 780

PostPosted: Sat 11 Dec 2010, 11:38    Post subject:  Save2CD/DVD and load sfs-files - is that possible?  

I am working on an add-on pet containing the missing progs for pupngo to be able to save to CD/DVD. I have never used this save-method myself and I do not see any code making it possible for a saved2cd system to load an additional sfs-file sitting on the CD/DVD...
Is this possible?
Back to top
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4346

PostPosted: Sat 11 Dec 2010, 17:18    Post subject: Re: Save2CD/DVD and load sfs-files - is that possible?  

goingnuts wrote:
I am working on an add-on pet containing the missing progs for pupngo to be able to save to CD/DVD. I have never used this save-method myself and I do not see any code making it possible for a saved2cd system to load an additional sfs-file sitting on the CD/DVD...
Is this possible?

sfs linker?
http://murga-linux.com/puppy/viewtopic.php?t=47976

the package may need some de-roxification and could be much smaller if the ldconfig from uclibc is used and sln is replaced with a script
Code:
#!/bin/sh
#replaces sln - recommend using a static uclibc busybox
busybox ln $@

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

Joined: 07 Dec 2008
Posts: 780

PostPosted: Sat 11 Dec 2010, 17:52    Post subject:  

technosaurus: You are swift as always - thanks. Yes, I can mount sfs-files on the cd and do something as the sfs-linker - but my question was if P412 (or other Puppy-versions) running as a save2cd system is able to load any sfs-files on the cd after creating a save folder on the cd (by it self...)

Guess it should be...or are Puppy running only from and saving to CD/DVD not able to use additional sfs-files at all?

Another thing that puzzles me is:
If I burn pUPnGO to a CD-RW and boot, zdrv is not picked up.
If I burn the same image to a DVD_RW and boot, zdrv is picked up.
In both cases copy2ram is used.

If i boot the same CD-RW in a lower-ram system (not copying to ram) zdrv is loaded.

Some timing in initrd? Seems to have something to do with copy2ram and CD-RW....
Back to top
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4346

PostPosted: Sat 11 Dec 2010, 22:29    Post subject:  

I never reallylearned all of the pupmodes, perhaps there is a different mode for dvd vs cd? ???
As for the zdrv I guess its size should be used in the copytoram calculations before copy and mount.(instead of just the main sfs)
I like jrb's tcl style linker better than the unionfs setup, because it should work regardless of the install type.... including the cd/dvd mode.

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

Joined: 07 Dec 2008
Posts: 780

PostPosted: Sun 12 Dec 2010, 09:21    Post subject:  

To be able to save to cd/dvd we have to run in ram (copy2ram in use) - otherwise you can not umount main-sfs or zdrv-sfs. If I deactivate copy2ram for zdrv, zdvr loads fine and main-sfs goes to ram but save2cd is not possible as zdrv-loop-mount is in use.
P412 is not really fit for a zdrv-approach and pupngo is hacked/fixed by using zdrv-code from P431 in initrd - otherwise zdrv is not picked up after creating a frugal-savefile.

I think I have isolated the CD-RW/DVD-RW/copy2ram issue to be happening in the zdrv-code-block:
Code:

############pupngo zdrv hack/fix#############
ZLAYER='' #v4.02
ZFACTOR='' #v426
# note, traditionally, loop2 kept free for scripts to use.
if [ "$ZDRVINIT" != "yes" ]; then
  # v4.02 if ZDRV located, and mounted, put it into the unionfs...
  if [ "$ZDRV" != "" ]; then
    ZDEV="`echo "$ZDRV" | cut -f 1 -d ','`"
    ZFS="`echo "$ZDRV" | cut -f 2 -d ','`"
    ZFILE="`echo "$ZDRV" | cut -f 3 -d ','`"
    MNT_ZFILE=""
    [ -f /mnt/dev_save${ZFILE} ] && MNT_ZFILE="dev_save"
    [ "$MNT_ZFILE" = "" ] && [ -f /mnt/dev_ro2${ZFILE} ] && MNT_ZFILE="dev_ro2"
    ZBASENAME="`basename $ZFILE`" #v426 moved up.
    if [ "$MNT_ZFILE" != "" ]; then
      #w020 do not ever copy it to ram... w460 restore choice...
      if [ "$COPY2RAM" = "yes" ]; then #256MB system. note, only checking physical ram.
        SIZEZK=`du -k /mnt/${MNT_ZFILE}${ZFILE} | cut -f 1`
        SIZEZK=`expr $SIZEZK + 1000` #some slack.
        mount -t tmpfs -o size=${SIZEZK}k tmpfs /mnt/tmpfs2
        cp -af /mnt/${MNT_ZFILE}${ZFILE} /mnt/tmpfs2/
        sync
        losetup /dev/loop3 /mnt/tmpfs2/${ZBASENAME}
      else
        losetup /dev/loop3 /mnt/${MNT_ZFILE}${ZFILE}
      fi
      mount -r -t squashfs -o noatime /dev/loop3 /pup_z
      if [ $? -eq 0 ];then
        ZLAYER=':/pup_z=ro'
        ZFACTOR="$ZBASENAME" #v426
      else   #added debug code - this is where cd/dvd difference happens
        echo "" > /dev/console
        echo "debug - CD_RW ends up here if copy2ram is done" > /dev/console
        echo "debug - DVD_RW do not..." > /dev/console
        read dummy
      fi
    fi
  fi
fi
############hack end##################


So problem seems to be that the CR-RW for what ever reason is not able to do the
Code:
mount -r -t squashfs -o noatime /dev/loop3 /pup_z

if the copy2ram-code block is run before it...

I am not presenting the solution - only a status of my debugging findings. Seems that every variable have same value before the code-block is run and do not depend on whether its a CD-RW or a DVD-RW.

Update 131210: Did not find any working solution but below hack secure that modules are loaded from zdrv although save to cd/dvd will be disabled (if installed):
Code:
mount -r -t squashfs -o noatime /dev/loop3 /pup_z
      if [ $? -eq 0 ]; then
        ZLAYER=':/pup_z=ro'
      else   #no copy2ram hack
        losetup -d /dev/loop3
        umount /mnt/tmpfs2
        sync
        losetup /dev/loop3 /mnt/${MNT_ZFILE}${ZFILE}
        mount -r -t squashfs -o noatime /dev/loop3 /pup_z
        ZLAYER=':/pup_z=ro'
        echo -en "\\033[1;31m" >/dev/console #31=red
        echo "">/dev/console
        echo "Could not load modules into ram. Save to CD/DVD disabled" >/dev/console
        echo "if installed - try burning iso to another media to fix..." > /dev/console
        echo -en "\\033[0;39m" >/dev/console
      fi

Update 151210: Almost sure now, that the problem only occurs if CD is a defective burn. CD-RW´s that verify the burn works fine whereas CD-RW that do not verify the burn fails in loading zdrv to ram - even though they work fine if you do not copy2ram...
Back to top
View user's profile Send private message Visit poster's website 
goingnuts

Joined: 07 Dec 2008
Posts: 780

PostPosted: Wed 15 Dec 2010, 13:18    Post subject: Updates  

Attached extended versions of pkgstall/pkgremove [pupngo041210_SP2.pet] install/remove pet, sfs, tgz, rpm and deb-files. Nice to have if you want to try the bl3dressup or your own home brewed dress-up-sfs´s...Install this before pupngo041210_SP3.pet.

Also attached pupngo041210_SP3.pet - Save to CD or DVD (RW-types). Approx. 1200Kb installed...but I cheated - used upx on the binaries. Contains static build of the programs needed and updated versions of functions4puppy and rc.shutdown. Additional - burnisotools.sh - is included - burn iso´s to CD/DVD_RW. Please read previous post - its important that your burn verify if zdrv should succeed to load in ram.
pupngo041210_SP3.pet
Description  Save to CD or DVD. Static build of the programs needed/updated functions4puppy and rc.shutdown
pet

 Download 
Filename  pupngo041210_SP3.pet 
Filesize  1.04 MB 
Downloaded  198 Time(s) 
pupngo041210_SP2.pet
Description  Extended version of pkgstall/pkgremove. Install/remove pet, sfs, tgz, rpm and deb-files
pet

 Download 
Filename  pupngo041210_SP2.pet 
Filesize  4.65 KB 
Downloaded  184 Time(s) 
Back to top
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4346

PostPosted: Wed 15 Dec 2010, 15:59    Post subject:  

Sorry I couldn't help out with the save2cd thing - I never use it, but you got me thinking about the possibility of a better way.
1. mount any and all sfs using methods from jrb's sfs/tcz linker
2. Mount a new save file during startup (a compressed 2fs file stored in the initrd)
3. On shutdown (or at the users request ... at a later date) convert to an sfs file and save to disk (or not, if the user declines) with a number suffix XX (one greater than the highest already on disk)
4. On subsequent reboots all the sfs files are loaded, then the save files (in order) and finally a new save file from a compressed .2fs in initrd

(May need to have a couple different sizes of 2fs.bz2 for low ram machines and for those who may want to store more since they need to be mounted in ram .../tmp or /dev/shm would work ... or to disk if insufficient ram)
Note 2fs compresses much better than 3fs or 4fs

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 13 of 58 [868 Posts]   Goto page: Previous 1, 2, 3, ..., 11, 12, 13, 14, 15, ..., 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.1014s ][ Queries: 12 (0.0134s) ][ GZIP on ]