La Zaurus tiene 16MB de rom flash, y 64 o 32MB de RAM.
En la ROM de Sharp, los 16MB de flash son de sólo lectura, y todos los paquetes instalados lo hacen en el disco ram (32MB en la 5500, y 6MB en la 5000).
En OpenZaurus, la flash es escribible, por lo que se pueden instalar en ella aplicaciones (de hecho, el destino de instalación por defecto es la flash).
Los diferentes ficheros zImages permiten escoger cuanta memoria RAM se tiene y cuanta se deja como ramdisk para documentos e instalar aplicaciones.
Como explicación:
Hacer un flash con OpenZaurus escogiendo el fichero de imagen correspondiente a 64MB de memoria ram y 0MB de disco ram.
Desmontar la tarjeta SD:
umount /mnt/card
Crear dos particiones en la tarjeta SD utilizando fdisk
Necesitarás instalar primero esta utilidad, ya que OpenZaurus no la trae por defecto
Yo tengo una SD de 256MB y por el momento he creado una partición del cilindro 1 al 486 y otra del 487 al 973.
Formatear las dos particiones creadas:
mkfs.ext2 /dev/mmcda1
mkfs.ext2 /dev/mmcda2
Cambiar de nombre los directorios /opt y /usr:
mv /opt /opt2
mv /usr /usr2
Editar el fichero /etc/fstab:
/dev/mmcda1 /opt auto defaults,noauto,noatime,user,exec,suid 0 0
/dev/mmcda2 /usr auto defaults,noauto,noatime,user,exec,suid 0 0
Montar las dos nuevas particiones:
mount -t ext2 /dev/mmcda1 /opt
mount -t ext2 /dev/mmcda2 /usr
Mover el contenido de los antiguos directorios /opt y /usr a las nuevas particiones:
mv /opt2/* /opt
mv /usr2/* /usr
rmdir /opt2
rmdir /usr2
Opcionalmente también se puede mover el directorio /root a la tarjeta SD, por ejemplo:
mv /root /usr
ln -sf /usr/root /root
Como es lo mismo instalar aplicaciones en root que en SD y no existe ram se pueden anular en /etc/ipkg.conf precediendo del carácter '#' esas líneas.
Si se reinicia la pda en este momento... no arrancará opie. Si ya lo has hecho no pasa nada, puedes continuar.
El problema radica en que las particiones de la SD no se montan antes de que lo necesite el sistema.
En /etc/rcS.d se encuentra 'la secuencia de arranque':
cd /etc/rcS.d
Necesitamos espacio para un par de cosas antes de que se ejecute el archivo S01devices, por lo que lo renombraremos as S04devices: mv S01devices S04devices
ln -s ../init.d/sd ./S02sd
Hay que crear un fichero script que contenga un par de líneas para montar las particiones de la SD:
vi ../init.d/sdmnt
y añade las siguientes líneas:
/bin/mount -t ext2 -o defaults,noatime,exec /dev/mmcda1 /opt
/bin/mount -t ext2 -o defaults,noatime,exec /dev/mmcda2 /usr
Y no te olvides de hacerlo ejecutable:
chmod +x ../init.d/sdmnt
ln -s ../init.d/sdmnt ./S03sdmnt
The Zaurus can be booted entirely off external memory by doing the following steps. Here we are assuming that you want to boot off of the sd card but this will work for any external memory or even the internal RAM (a shell script is provided at the end):
The following assumptions are made:
/mnt/card = sd card
The advantages to this way are that the original filesystem is modified only very slightly, and if you have a problem with the SD card you can pop it out and reboot, and the original filesystem will then load.
If you want to boot off of the RAM or the cf card you can skip steps 1 and 3.
You can execute the following script to do all this (don't forget chmod -x. I always do. :-):
#!/bin/sh # # Script to setup a Zaurus system to boot from the sd card (/mnt/card). # # I don't really know very much about shell scripting so this script is not # very robust. If someone wants to contribute a better one it would be # great. # copy the /dev/mmcda1 to /etc /bin/cp /dev/mmcda1 /etc #create our proot script to pivot the root cd /etc/init.d echo "#!/bin/sh" > proot echo " " >> proot echo "#Script to pivot the root to /mnt/card" >> proot echo " " >> proot echo "/bin/mount -t ext2 -o defaults,noatime /etc/mmcda1 /mnt/card" >> proot echo "/sbin/pivot_root /mnt/card /mnt/card/mnt/root" >> proot # make script executable chmod +x proot # setup our boot sequence cd /etc/rcS.d mv S01devices S04devices ln -s ../init.d/sd ./S02sd ln -s ../init.d/proot ./S03proot # copy the files cp -a /bin /mnt/card/ cp -a /boot /mnt/card/ cp -a /etc /mnt/card/ cp -a /home /mnt/card/ cp -a /lib /mnt/card/ cp -a /opt /mnt/card/ cp -a /root /mnt/card/ cp -a /sbin /mnt/card/ cp -a /tmp /mnt/card/ cp -a /usr /mnt/card/ #fixme cp -a /dev /mnt/card/ # make the folders that we don't copy mkdir /mnt/card/var mkdir /mnt/card/proc mkdir /mnt/card/mnt mkdir /mnt/card/mnt/root mkdir /mnt/card/mnt/cf mkdir /mnt/card/mnt/net
NOTE:
Formatear la tarjeta SD:
# umount /mnt/card
# mkfs.ext2 /dev/mmcda1
# mount /mnt/card
Editar el archivo /etc/fstab y cambiar las opciones de montaje del nuevo sistema de ficheros
ext2 para que incluya "noatime", o cambie "sync" por "async", para obtener un rendimiento mejor.
(If you have no idea what this means, check the options for the mount command
Deshabilitar Documentos: Launcher
Al reiniciar la PDA pulsar cualquier tecla para que no se inicie opie.
Ejecutar /mnt/cf/confSD2.sh
Editar el archivo /etc/profile y modificar la línea del PATH para que quede como sigue:
PATH="/usr/local/bin:/usr/bin:/bin"
igualmente modificar la variable (el orden de /lib:/usr/lib es importante):
LD_LIBRARY_PATH="/opt/QtPalmtop/lib:/usr/local/lib:/lib:/usr/lib"
Editar el archivo /etc/ipkg.conf y añadir un # delante de las líneas:
#
Because of the way that OpenZaurus is set up, it is NOT necessary to do
the following to install applications to your SD card. In OpenZaurus,
you can directly install all applications to one of 4 locations: the
root partition (the flash mounted on /), the storage ram (amount
decided by zImage - mounted on /mnt/ram), a CF card (/mnt/cf), or an SD
card (/mnt/card). When installing applications, you can use ipkg -d sd install <packagename> or select SD when installing from the gui package manager to install your application onto the SD card. Then, just run ipkg-link add <packagename>
to create symlinks of all the files installed onto the SD onto the root
partition so that the applications think they were installed onto the
root (ipkg-link is not needed if you're using the GUI).
If you still wish to move directories onto the SD card to cut down on the number of writes to the internal flash, you can follow these instructions:
If all went well, you should now have about 8mb (from a default OpenZaurus flash) of space on your ROM (useful for libraries/perl/python/ruby which install to /usr (Note: I'm reliably informed by DaJoker than moving /usr is a bad bad bad idea, though if you must (or if you're very low on space on the ROM) you could move the /usr/local and /usr/share subtrees).
If you now install software to "root" (/) then it should work out nicely, and be installed to the SD card. To prevent confusion, you could remove the lines:
from your /etc/ipkg.conf file, as you have no RAM available for software installation, and installing to root will install to your SD card where possible, so the seperate option is largely redundant.
Recomiendo deshabilitar 'Documents': si tienes una SD de 256MB y una CF de 512MB te puede dar la risa tenerlo habilitado... al intentar abrir un archivo con determinados programas ¡te escanea todo!
Pediría a todos los programadores que implementen los menús de Nuevo, Abrir y Guardar como toda la vida.
Yo no siempre quiero guardar todos mis archivos en Documents.
Dejemos libertad a los usuarios para decidir como organizar sus datos en el árbol de directorios; al final es lo mismo que Linux, libertad para todo ;-).
Image Viewer |
MooView |
Tx Image Viewer |
Eye of Zilla |
In brief:
The failed to link errors are pretty much harmless and can be ignored
because they mean that links are trying to be created to files or
directories that already exist (e.g /opt)
More detail:
Opie & Qtopia are set up to run applications and read their
settings from directories off the root path (/). When you install an
application to root the binary tends to end up (usually) in
/opt/QtPalmtop/bin which is where all the paths are set up to read from.
However when you install to you CF card for example (/mnt/cf), the
binary will go to /mnt/cf/opt/QtPalmtop/bin which isn't in your path.
To get around this, symbolic links are created that point to the correct locations.
Now when a package is installed, a list is created for that package which contains every file and directory that is involved. An attempt to create a link for each file/directory in the file. If that file/directory already exists (and /opt or /opt/QtPalmtop always exist) you get a failed to link error.
Cuando se actualiza OZ, todos los contenidos de la memoria interna se pierden; pero las aplicaciones instaladas en CF o SD/MMC aún están ahí. Para hacerlas reaparecer en el GUI de Qtopia, abre un terminal y escribe:
ipkg-link mount /mnt/card
ipkg-link mount /mnt/cf
para SD y CF, respectivamente.
Un md5 hash es una cadena de 32 carateres alfanumérica (números hexadecimales).
Un fichero solamente tiene un md5 hash, si se cambia un sólo byte en un fichero el cálculo para obtener el número md5 producirá un valor totalmente diferente. Por esto el cálculo de este número es útil para comprobar la integridad de los ficheros descargados.
En Linux (incluida la Zaurus), el programa md5sum puede ser usado para obtener el md5 hash. Simplemente teclea md5sum [fichero]
# mount -t cramfs -o loop gcc.cramfs /gccmountpoint
#/bin/bash GCCMOUNT=/gccmountpoint #links for gcc ln -sf $GCCMOUNT/include /usr/local/include ln -sf $GCCMOUNT/lib/Mcrt1.o /usr/lib/Mcrt1.o ln -sf $GCCMOUNT/lib/crt1.o /usr/lib/crt1.o ln -sf $GCCMOUNT/lib/crti.o /usr/lib/crti.o ln -sf $GCCMOUNT/lib/crtn.o /usr/lib/crtn.o ln -sf $GCCMOUNT/lib/gcc-lib /usr/lib/gcc-lib ln -sf $GCCMOUNT/lib/libbfd-2.9.5.0.14.so /usr/lib/libbfd-2.9.5.0.14.so ln -sf $GCCMOUNT/lib/libopcodes-2.9.5.0.14.so /usr/lib/libopcodes-2.9.5.0.14.so ln -sf $GCCMOUNT/lib/libstdc++-3-libc6.1-2-2.10.0.so /usr/lib/libstdc++-libc6.1-2.so.3 ln -sf /usr/lib/libstdc++-libc6.1-2.so.3 /usr/lib/libstdc++.so ln -sf /lib/libc.so.6 /usr/lib/libc.so ln -sf /lib/libm.so.6 /usr/lib/libm.so
mkdir /mnt/gcc mount -t cramfs -o loop gcc.cramfs /mnt/gccThen, change your gcc-links script to the new path and execute it as super user, next
PATH=$PATH:/mnt/gcc/bin export PATHThis now works fine. I have just compiled several programs.