Dosfsck Compiled For The Gp2x And A "wrapper" Of Stdout/stde


Artemio

Still Fresh
Joined
May 9, 2006
Messages
30
Age
48
Location
Mexico
Website
junkerhq.net
For those messed filesystems and for those who want to run commands and view the results without telneting or saving to file, here are two small releases that I found useful.


(Please excuse the poor quality of the cellphone pic)

The first is your standard dosfsck to check the filesystem of the SD. I compiled the thing and maybe someone else will benefit. here is the readme I am including on the Zip:
[CUT]
dosfsck 2.11 for the GP2x (static build)

This is just dosfsck compiled for the GP2X. Since my 2 GB SD card had a lot of trouble (a couple of bad sectors) I wanted to use fsck, so I went and did this build. I did apply a patch to it, since it always said that "Logical sector size is zero" on the SD card. Since that was the only real use I wanted to give to it, I searched the net and found a patch already to solve that problem for another arm platform. Otheriwse, it is the standard release (dosfstools-2.11). The patch is in the file dosfstools-2.10.patch if you need it for reference (taken from http://beer.geek.nz/software/zaurus/dosfstools/).

This one was compiled using the following optimizations (which proved to give it a nice speed boost):

-O3 -Wall -ftracer -fstrength-reduce -Wno-unused -funroll-loops -fomit-frame-pointer -fstrict-aliasing -ffast-math

Of course you'll need to run this on the SD (/dev/mmcsd/disc0/part1) while it is unmounted, and you'll need to have the executable on the nand or the root filesystem.

I also wrote a small tool and a script to help those that don't have telnet access to the GP2X (or for those wanting to run it while on the road, though I'd mind the batteries). It is called sdlmore, and it includes the script I use to run dosfsck on my GP2X (unmount the SD, run dosfsck and mount it back again). I've found it useful to have them both on the nand under an utils folder.

Disclaimer:

As always I am not responsible for any damage you do to your SD or your data, although you should be safe since it is the standard dosfsck release. It has worked great for me so far, but it might not be your case. I recommend to unmount the SD first or use a script to do so.

And for those who want to run commands on the GP, like listing files, checking the running process, view the free space on the filesystem or even running the above dosfsck, I made a small and simple app in sdl to get the text output (stdout and stderr) of a command and print that to the screen in the same fashion as the more command in Unix (albeit more simple).

Here is the readme file:
sdlmore 0.1

Since I wanted to run certain unix commands on my GP2X while on the go and I wanted to see the output, I figured an application that took the stdout and stderr or any command line and draw that with SDL could be made. It is not something I am particularly proud of, but I believe it can be quite useful to some folks out there.

Requirements:
Simply to put a file named font.ttf (any ttf font) on the same folder as the executable.

Use:
./sdlmore PROGRAM

where PROGRAM is the command that you want to execute. If the command has parameters, you can enclose the whole thing between quotes. Such as:

./sdlmore "ls -al"

Personally, I use this command on a gpu script (There are some examples provided, even one for dosfsck that unmounts the SD and remounts it after the check). I have found that it is better for me to have all this scripts on the nand under a folder (such as utils). I hope you find this useful :)
Hope you guys find any of them useful.

dosfsck-gp2x-2.11.tar.gz

sdlmore-0.1.tar.gz

Edit:
Added image, Changed links to the archive[/CUT]
 
Back
Top