OESF Portables Forum
Everything Else => Zaurus Distro Support and Discussion => Distros, Development, and Model Specific Forums => Archived Forums => Angstrom & OpenZaurus => Topic started by: derekp on February 04, 2004, 11:55:57 pm
-
I\'ve been playing around with a dual-boot setup for my 5500 that allows me to keep a Sharp-based rom installed, yet lets me boot up an alternate distribution, such as OpenZaurus, from my SD card. If anyone\'s interested, I can put together a howto article, and some scripts to automate rebuilding your Sharp image to support this.
The basic modifications to the Sharp rom is:
(this is pseudo code from memory, I haven\'t had time to put together a cleaned up version yet)
1) Move /sbin/init to /sbin/orig/init
2) Create a shell script in the place of /sbin/init that does the following:
- insmod the mmc/sd driver
- mount ramfs filesystem on /dev, and populate it as necissary
- mount sd card
- if [ -f /mnt/card/init.card ]
- then
- cp /nt/card/init.card /dev/.
- umount /mnt/card
- exec /mnt/card/init.card
- else
umount /mnt/card
rmmod mmc/sd module
- exec /sbin/orig/init $@
- fi
3) Copy root filesystem contents of desired rom image to the SD card
4) Create an init.card script on the SD card that does:
- mv /dev/mmcda1 /dev/mmcsd1 (needed so that the contents of the SD card doesn\'t appear as any type of external storage to opie apps, otherwise it can cause problems with anything that scan all files on mounted media)
- mount -oasync,noatime /dev/mmcsd1 /mnt/card
- pivot_root /mnt/card
- exec /sbin/init
The various \"exec\" lines in the fake /sbin/init script on the rom and in the init.card are needed so that the final real init that ends up running is still process id 1. Also, a couple of adjustments were needed to the OZ rc scripts to accomidate the differences between the OZ kernel and the Sharp one. Also, you need to compile install on your sharp-derived rom a copy of pivot_root, you can\'t use the one from OZ as it is linked against a newer version of ld-linux.
I\'ve been using this for a while now, and so far very few problems have popped up. With some cheaper brands of SD cards, you might have problems with suspending due to bugs in the Sharp SD driver, but my Lexar card seems to due ok. Also, I am currently getting a lockup sometimes if I suspend while in the docking cradle. I think this is fixable by having an apm script that turns off the usb port during suspend.
Let me know if anyone wants me to put together some scripts that will automate rebuilding a Sharp (or TKC) rom image to support the above. I may even get the scripts to work on the Z itself instead of having to build it on another Linux workstation. Personally, I think this is a great way to try out OZ, and other roms. Also makes it much more functional, as you end up with a much larger root filesytem (potentially 512 meg instead of 16 meg that you get within the Z\'s flash).
--derek
-
Do you realize this feature makes the Zaurus the most powerful PDA ever! Good work Derek! A script would be most welcome!
-
There are a few external programs my script will require. I will go ahead and upload a package containing the necissary items, but would rather point to existing ones if they are available.
1) Zaurus version of mkcramfs. I haven\'t found it anywhere, so I compiled it myself along with a bunch of other Linux utils
2) pivot_root that works on Sharp rom. You can\'t call the OZ version from sharp, even if you set LD_LIBRARY_PATH, since OZ uses a newer version of ld-linux.so
3) A copy of the OZ 3.3.5 image as a tar.gz file. Currently, the only way I know to get it is to load a mtdblock and mtdram driver on a Linux workstation, dd the image to the emulated mtdblock device, them mount it an tar it up. I can upload the copy I made, but would rather point to an official version in my instructions.
With the above three available, I think everything can be done on the Zaurus, assuming you have enough free space available on a CF card.
Also note, that this would still remain an advanced install procedure, the user would need to be proficient at the Linux command line to get it to work (I\'ll do the best I can to make it easy).
-
Wow, looks like you just saved me days of pain and frustration
I was palnning on trying something like this, but you gone and done it already - YAY!
Please let us know where the how-to is/will be posted. I\'m dying to try this out on my C760 - will make testing new roms a much more pleasant task if I can just remove a SD card and reboot to my stanard system.
thanks
Stu
-
There are a few external programs my script will require. I will go ahead and upload a package containing the necissary items, but would rather point to existing ones if they are available.
Derek:
Did you post this package? There was a prep-home SD package in the ZUG downloads, but in reading the description it seems to slightly different from what you describe in this thread. I\'m interested in trying this with a Sharp based ROM in internal memory and booting to pdaXrom on SD. The latest Cacko Qt ROM, allows access to terminal before QT rom loads which I\'m thinking may be helpful in this process.
Thanks,
Jerry
-
does this \"pivot_root\" change the kernel or not? I was going to try the iptables. I think something have to be compiled into the kernel, like OZ did, not just the modules.
So, if I have a sharp rom and pivot_root to OZ, can I use the iptables?
Thanks?
-
Nope, pivot_root just changes where / is.
AFAIK there is NO way to change kernels on the fly - you must reboot to change to another kernel
-
I\'m just putting the finishing touches on the whole package. Will need to go through several more hours of testing with different roms and configurations, the last thing I want is for it to brick someones Zaurus (although the worst that should happen is you\'d have to re-flash from a known good rom).
Currently recovering from a week of on-call. I should have something posted up by Thursday.
--derek
-
Hey Derek,
Have you tried running any other rom off the sd.
JP
-
I\'m just putting the finishing touches on the whole package. Will need to go through several more hours of testing with different roms and configurations, the last thing I want is for it to brick someones Zaurus (although the worst that should happen is you\'d have to re-flash from a known good rom).
Currently recovering from a week of on-call. I should have something posted up by Thursday.
--derek
Great news, I look forward to checking it out, thanks for sharing your work
-
Yes, this is great. I\'ve been thinking of flashing my 5500 with OZ (now that I have 750 to play with), but having both ROMs will be even nicer.
-
Ok, here\'s a quick status update.
I\'ve got the rom modification script wrote, and got mkcramfs compiled so everything can be run from the zaurus (no need to have access to a linux pc). It will read your existing (sharp, tkc) rom image, and create a new one with a modified /sbin/init, /root/etc/rc.d/rc.sysinit, and a few other utilities & scripts added. It then deposits this new initrd.bin file on your CF card ready for you to flash. The problem I ran into in testing is that mkcramfs would segfault and cause some minor havoc about 1 in 4 tests. It appears to run ok if qtopia is shut down. But this isn\'t an acceptable track record (to me at least). I\'ve identified where the problem is: mkcramfs creates a large annonymous mmap which exhausts memory, even with a fairly big swap file. So I\'m modifying mkcramfs to take a commandline option so that it could use a specified temp file as backing for this particular mmap call. This should not only eliminate this segfault error, but also eliminate the need to create a temporary swap file on the CF card.
A second package that I\'ve just started on will take an existing OpenZaurus initrd.bin file, and extract the contents to your SD card. This required me to compile the mtdram and jffs2 kernel modules. Will need to pakage both these scripts and associated tools into ipk files, then reflash my Z with a standard Sharp kernel and do a couple more dry run tests.
I will post the results to this thread as an attachment if everything checks out tomorrow. If not, then it will definately be ready by next wednesday (I have another commitment for over the weekend).
-
Awesome derek!
-
Ok, here\'s a quick status update...
How\'s it going with this project?
Cheers,
Jerry
-
I\'ve finally got the dualboot scripts tweaked enough for a first release.
I highly recommend grabbing the async io kernel also. Otherwise, the
SD card is to painfully slow to use as your main root filesystem.
Dualboot setup quick instructions
I. Backup your current stuff.
II. Install modrom-dualboot.ipk. Then run /usr/local/bin/modrom-dualboot.sh
This requires that you have a 128meg CF card inserted. It will read your
currently installed rom image, and create a new initrd.bin file, deposit
it on your CF card. Then use the normal rom flashing technique to reflash
your Zaurus with this new rom. I have tested this on a freshly installed
Sharp 3.10 rom image, it should also work for v3.13, and for tkcrom 1.0.
The modifications made to the rom are:
1) new /sbin/init -- this is now a shell script that will check for an
alternate system on your SD card on bootup. If no alternate distribution
exists on your SD card, the Zaurus will continue to bootup normally off the
internal rom image.
2) modified /root/etc/rc.d/rc.sysinit script. This modification has nothing
to do with dualboot, it is there to support optional /home on SD, same as
with tkcrom 2.0-alpha3. See prep-home-sd.sh documentation for details on
this.
III. Once you have the dual-boot rom created and flashed, test it out
to see if it is working ok (i.e., reboot a time or two, reset, etc.)
Then, install oz2sd.ipk. Place the OpenZaurus 3.3.5 initrd.bin file on
your CF card, and then run:
/usr/local/bin/oz2sd.sh -i /mnt/cf/initrd_oz_3.3.5.bin
This will:
* insmod mtdram and jffs2 kernel modules
* copy oz\'s initrd to the mtdram test device (should be /dev/mtdblock3)
* tar up oz, creating /mnt/cf/oz.tar.gz
* unload the modules to free up memory
* ext2 format your SD card, and extract oz to it.
* create a file on your SD root, called \"init.card\". This is what gets
called by the modified /sbin/init in the dualboot rom.
* patches up a few oz files to make it run better from your SD card
There are a few command line options available for oz2sd.sh, you should be
able to figure them out from the source. They mostly affect default
temp file locations and such. Also, it creates a temporary swapfile in
/home/swap.tmp1, 16 meg. This is needed because the mtdram module (used
to help extract the jffs2 oz image) takes up so much memory.
You may also want to run oz2sd.sh without qpe running (when booting the
zaurus, hit \"/\" at the \"Wait..5..4..3..2..1\" countdown, and log in as root).
I\'ve had a couple out-of-memory conditions happen when running it.
In short, here\'s a quick recap of the quick instructions:
1) Flash the async io kernel located in the downloads section (optional,
but highly desirable)
2) Install modrom-dualboot_arm.ipk, insert a 128meg CF card, and run modrom-dual
boot.sh
3) Reflash rom with new initrd.bin file (assuming no errors -- size should be
about 14 meg).
4) Reboot, install oz2sd_arm.ipk, put initrd_oz_3.3.5.bin on your CF card,
stop the gui (or boot without it), and run
oz2sd.sh -i /mnt/cf/initrd_oz_3.3.5.bin (with an SD card inserted)
5) Reboot with the SD card inserted. To boot into your normal Sharp rom,
boot without the SD card.
Again, this should work with Sharp rom 3.10, 3.13, and tkcrom 1.0, possibly
other sharp-style roms. Also, when before you flash the modified rom image,
do a quick sanity check (is it about 14 megs? were there any errors? etc.)
I will be putting together a bit more comprehensive documentation, and an
explaination of what all is changed, but this should get you going for now.
Have fun...
--derek
-
could i use this to flash pdaxrom to sd on a 860?
Actually I ran the script to try and create the image, it runs fine, formats and then says
Copying current rom to temp image....
Segmentation Fault
umount: /tmp/tmp_src Invalid argument
Making modifications to new filesystem image.
cp: cannot create regular file \'/tmp/tmp_dest/root/etc/rc.d/rc.sysinit\': No such file or directory
followed by lots of No such file or directory errors...
Any ideas whats wrong - i end up with a 4kb initrd.bin?
im using cacko 1.20 rom...
-
could i use this to flash pdaxrom to sd on a 860?
You can use the basic concepts, but you\'d have to do a slightly different implimentation.
For one, the 5500\'s initrd.bin file is a cramfs image, whereas the other zaurus models (including the 860) is a jffs2 image. Therefore you\'d have to modify the modrom-dualboot script accordingly.
Unless your refering to taking the pdaxrom and putting it on the SD to run it on a 5500. For this, you can use the bulk of the oz2sd.sh script, but the last part of oz2sd.sh applies some patches that are specific to openzaurus (some of these patches help it run better off the SD card, others are needed becausing were still running off a standard kernel instead of openzaurus\'s kernel). Also, the X server for the 860 I believe won\'t work on the 5500 (I tried this already), you\'d have to swap in one for the 5500\'s chipset.
This will be my next project, to get the pdaxrom working on the 5500 off the sd card.
-
Thanks, great work derekp! I\'ll try it out tomorrow.
-
One thing I just caught.
If you are running tkcrom, then you will need to enter \"unset LD_LIBRARY_PATH\" before running oz2sd.sh.
The reason is, tkcrom sets LD_LIBRARY_PATH to point to /mnt/card/lib. This causes any command executed after oz is extracted to the SD card to pick up the wrong libraries.
-
derek:
I\'m trying to modify your modrom-dualboot.sh to dual boot my C750 from Cacko ROM to pdaXrom on SD.
Since the latest Cacko Qt ROM uses both cramfs & jffs2, I tried your script on the 1.18 version (no need to make it any more difficult!). By increasing the tmp_img_size to 64 and mtdblock0 to mtdblock2 I\'ve gotten it to work up to the creation of the initrd.bin.
Since it needs to be jffs2, I was looking at the build scripts for the file systems. I copied the binary mkfs.jffs2 to the Z but am struggling with the command to create the initrd.bin. I can\'t get the syntax correct/home/root/usr/bin/mkfs.jffs2 -r /tmp/tmp_dest $OUTFILE
Obviously this isn\'t working. Any clues you could send me would be greatly appreciated.
Can\'t wait to try hacking on the oz2sd.sh to try and get it to extract the xrom :shock:
-
/home/root/usr/bin/mkfs.jffs2 -r /tmp/tmp_dest $OUTFILE
Try it with \"-o $OUTFILE\", the rest of the command line looks ok (at least according to the manpage for mkfs.jffs2).
Also, be careful with modifying the 750 (unless you already know what your are doing), I\'ve read of a few people on this board bricking theirs.
Also, when you get to modifying the oz2sd.sh script, most of it can be used as is, but you\'ll have to take out/replace the bottom part where it applies some oz-specific patches (but leave in the section where it creates the init.card file).
Good luck
--derek
-
/.
-
has anyone tried this on 5600
-
Well, I give up for tonight. I can\'t get the mkfs.jffs2 syntax to work right. Keep getting -> mkfs.jffs2: 1: Syntax error: \"(\" unexpected <- no matter how I try. The man pages aren\'t that helpful in usage. I tried following the example in the build.sh script that is used to create initrd.bin from the sharp rootfs, but same damn error :evil:
-
jerrybme, where\'d you get your copy of mkfs.jffs2? From the error, it looks like it is a shell script. If so, the problem might be that it uses bash syntax, and the default shell on the zaurus is a smaller stripped-down shell. Therefore you\'d need to install bash.
-
jerrybme, where\'d you get your copy of mkfs.jffs2? From the error, it looks like it is a shell script. If so, the problem might be that it uses bash syntax, and the default shell on the zaurus is a smaller stripped-down shell. Therefore you\'d need to install bash.
Well, I\'ve tried several sources, but they all give same error. I\'m using the mkfs.jffs2 from the C7X0_rootfs that sashz posted a while back, it was for the 1.18 version. It was in the bin directory with the build.sh script. I\'ll try installing bash, but I\'m also of thinking about just directly editing the rc.sysinit file directly and creating the sbin/init your modrom_dualboot.sh script creates.
Thanks for your help and showing the way
-
derekp: while I wait for the reflash to finish, I\'m looking at the rc.rofilesys scripts in Cacko Qt & pdaXrom and they are very different. Are the rc.rofilesys scripts the same in OZ & Sharp? If so, to get this to work, I\'m thinking that when booting to pdaXrom, it may be necessary to have the pdaXrom\'s rofilesys script run after the detection of the rc.card on the SD. Is that even possible? Do we need the rofilesys run before that call is made?
Sorry for the potentially stupid questions, but as a linux newbie, I\'m in WAY over my head :shock:
Thanks
-
jerrybme,
I had actually combined two independant projects into one. The part that is used to dualboot another os from the SD card is in the /sbin/init replacement script (don\'t forget to put the old copy of /sbin/init into /sbin/sys/init). Another project I had was to optionally boot up with /home on SD. That\'s where the rc.sysinit changes come into play. If you are just inplementing the os dualboot part, you can leave out modifying the rc.sysinit script.
As for how rc.rofilesys and rc.sysinit work, on the sharp (and tkc) rom, they boot up with a read-only root file system, pointing to the cramfs image in rom. The rc.sysinit script calls rc.rofilesys, which will initialize a new ramdisk if this is the first boot after a reset. Then rc.sysinit will mount the ramdisk to /home. What my home-on-sd modifications do is check for the existance of an rc.card script (on the SD) to execute prior to mounting up the ramdisk /home. This rc.card script can then be written to do a number of things, but the primary purpose is to mount the SD as home instead of the ramdisk. The rc.card and SD setup is done by the script \"prep-home-sd.sh\". This is basically the same setup I sent into Proto, which is included in the tckrom 2.0 alpha3 release.
Again, the dualboot rom (/sbin/init changes) and the dualboot home-on-sd (modified /etc/rc.sysinit) are two independant projects, I just combined them both in the modrom script convenience.
When I get a free moment, I\'ll download some of the initrd.bin\'s for the other Zaurus models and try to figure them out a bit.
--derek
-
I gave up on mkfs.jffs2, I found a bash.ipk, had to mount -o rw,remount / to get it to install, but still no joy. Decided to modify the ROM directly and created a new init & card.init scripts. I figured if I can get it at least dual boot, I\'ll tackle home on SD later.
Since I wasn\'t trying to copy out the ROM, I decided to go back to the latest Cacko ROM. I found that the Cacko 1.20\'s init file is really a symlink to telinit, I moved it anyway and found that reboot is only possible with a battery pull (but at least it still booted ok with the new init file).
Getting the oz2sd script to work on the pdaxrom initrd.bin, proved difficult as well, kept getting device is full error, swap errors plus the mtdram & jffs2 modules were throwing errors. I commented out the OZ revisions, the jffs2 insmod and increased the swap file to 25, but still device errors. So I gave up and just mounted the initrd.bin on my linux box and copied out the file structure to a tmp folder to copy to the SD. Wierd thing was the total file system was a little over 8 megs, sigh.
Learning lots, but getting nowhere. Back to trying to figure out why not everything is getting written out of the 20+ meg pdaXrom initrd..
A lot of work just to find out whether this\'ll work, but it is fun in a frustrating way
-
So far still no luck but I have made some progress and perhaps someone with more linux knowledge will, either point me in the right direction or take this project up. I think being able to dual boot the CXXX series would be so cool (and useful)
Status so far-] I gave up trying to get derekp\'s scripts to work on the C750, I think there are too many differences from the 5500. So, I made the init and init.card files manually (and yes chmoded them correctly) Finally got the mounting of the jffs2 image of the pdaXrom initrd.bin to work correctly on my linux box and copied it to a 256 mb SD card, I copied over the init.card file that derekp\'s script is supposed to create.
The init file must be very different from the 5500, as it is a symlink to telinit and when you move it to /sbin/sys (still pointing back to telinit) the Z won\'t reboot without a battery pull (this was true for both the cacko 1.18 & 1.20 versions). The telinit file is not a script, looks to be code (at least when you try and view it in Midnight Commander). I went ahead anyway and moved the new init in place.
On reboot, the init file doesn\'t kick off the init.card as it is supposed to. I installed a kernel that shows the boot up messages but couldn\'t make much out of the text as it flew by. I did halt the boot process and went to a linux terminal by pressing a key during the Wait..1, 2 message. At that point in the booting process the SD drivers are already insmodded and if I tried exec init
I\'d get the messeage Usage: init 0123456SsQqAaBbCcUu
I then tried running the commands in the init script. Nothing worked until I got to the copy init.card to /dev. Then I could run the init.card from /dev however, it would work until it reached the command
exec /sbin/init
Which of course would throw the error listed above. follwed by the error,
spawning ln too fast, wait 5 minutes..
So, that\'s as far as I could take this, until until someone explains to me how the init process works on the CXXX series. If anyone has a clue please let me know.
Cheers,
Jerry
-
Am going to asume that you wort your own \"/sbin/init\". And moved the default init to \"/sbin/sys/init\". In witch case you need to run \"exec /sbin/sys/init\".
JP
-
Am going to asume that you wort your own \"/sbin/init\". And moved the default init to \"/sbin/sys/init\". In witch case you need to run \"exec /sbin/sys/init\".
JP
Yes, interestingly, both that command & exec /sbin/telinit (which is what /sbin/sys/init points to) result in the same error listed in previous post \"Usage: init 123456..etc\"
Good news is I didn\'t brick my Z with all of that screwing around
-
OK, download this file and unzip. Move \"/sbin/telinit\" to \"/sbin/sys/telinit\". Move the unziped copy of telinit to \"/sbin/telinit\". Move the unziped copy of \"init.card\" to the root dir of your sd card. Make sure that \"/sbin/init\" points to \"/sbin/telinit\". Link \"/sbin/sys/telinit\" to \"/sbin/sys/init\". This two files are based off dearkp\'s scripts. Make sure that nothing under \"/sbin\" is linked to \"/sbin/sys/telint\" or \"/sbin/sys/init\". Hope this works. I counld not test this, don\'t have Cxxx(yet).
Good Luck.
P.S. this is based off of Cacko rom flashed to internel ram and the pdax rom on sd.
JP
-
OK, download this file and unzip. Move \"/sbin/telinit\" to \"/sbin/sys/telinit\". Move the unziped copy of telinit to \"/sbin/telinit\". Move the unziped copy of \"init.card\" to the root dir of your sd card. Make sure that \"/sbin/init\" points to \"/sbin/telinit\". Link \"/sbin/sys/telinit\" to \"/sbin/sys/init\". This two files are based off dearkp\'s scripts. Make sure that nothing under \"/sbin\" is linked to \"/sbin/sys/telint\" or \"/sbin/sys/init\". Hope this works. I counld not test this, don\'t have Cxxx(yet).
Good Luck.
P.S. this is based off of Cacko rom flashed to internel ram and the pdax rom on sd.
JP
Thanks, I\'ve give it a whirl. I think I know where you are going with modifying the scripts to use the telinit. I was thinking along the same lines. Got my fingers, toes & eyes crossed
Cheers,
Jerry
-
good luck, i am dying to try this out on my 860 - but a bit worried i might brick it, no way I could afford to buy another one :-)
-
Here\'s a basic dual-boot \"theory of operation\" if it helps.
The first thing that the kernel loads up is /sbin/init. Now, init can behave in different ways depending on how it\'s called. If it is the first program that is run, then it will have process id 1. In this case, it can be called with or without arguments (without means that it will use the default runlevel as specified in /etc/inittab). If it is run after the system is booted up, then it will have a PID of greater than 1, in which case it will require a command line argument (which is the run level to switch to).
So, for the dualboot setup, the replacement /sbin/init is initally loaded up, and has PID 1. It then does some stuff (i.e., mount the sd card and inspect it), and depending on what it decides it will transfer control to another copy of init (either internal, or the one on the card). But for new init to function properly in it\'s primary roll, it will need to have PID 1. Therefore, the first init script uses the \"exec\" call when it transfers control to another init so it can maintain PID 1. Otherwise the called init will behave differently (i.e., give you the \"usage...\" message).
So, to get this whole technique working on you C series, you need to make sure that (via using an \"exec\" call at each level) the final copy of init that\'s called has PID 1.
Hope this helps.
--derek
-
@joshp Well, so far no luck. Your scripts were what I was thinking of trying next. Thanks.
At least I can reboot without pulling the battery now. Not sure why the scripts aren\'t working. I wish there was a way to step through the boot process to find out where the problem is; dmseg is not that informative [or I\'m not smart enough to see where the problem is].
But I\'m not giving up yet..
Cheers
-
I\'ve been having the same problem with /sbin/init on the C760, I\'m going to try editing rc or rc.sysinit instead as they are called first by telinit.
I\'ll report back my findings tomorrow
Stu
-
jerrybme, did you comment out \"/\" and \"/home\" in \"/etc/fstab\" on you sd card rom, and do you have pivot_root installed on your internel flash rom?
JP
-
jerrybme, did you comment out \"/\" and \"/home\" in \"/etc/fstab\" on you sd card rom, and do you have pivot_root installed on your internel flash rom?
JP
Not sure about pivot_root being installed. One of derekp\'s ipks copied pivot_root to /home/root/usr/local/bin. So the file\'s there. I didn\'t comment out root & home on the /etc/fstab on the sd. I\'ll try that next.
oh, BTW, I forgot to thank derekp for the explanation on how the init process works above, it was very helpful.
Cheers,
Jerry
-
jerrybme, did you comment out \"/\" and \"/home\" in \"/etc/fstab\" on you sd card rom,
JP
Tried it but still not working....
-
Ok, try moveing pivot_root to \"/sbin\". Make sure that \"/sbin\" is in you path whan your booting up by chacking \"/etc/rc.d/rc.sysinit\" look for a line that starts with PATH.(Based off of tkc10)
Hope this works.
JP
-
Dont know if this will help at all, but pocketworkstation used a script for pivot_root to debian on sd on the c7x0 perhaps this will help? The files are at http://pocketworkstation.org/files/c700-kernel/ (http://pocketworkstation.org/files/c700-kernel/) it was the scripts in the file http://pocketworkstation.org/files/c700-ke...-2003-03-20.zip (http://pocketworkstation.org/files/c700-kernel/romupdate-native-debian-2003-03-20.zip) that i thought might be of use....
-
BTW, has anyone had success / problems with this on thier 5500\'s? I\'m fixing to finish up a full howto plus a couple minor tweeks to upload to the regular files section on here. Any constructive comments on how I can make the documentation better?
-
BTW, has anyone had success / problems with this on thier 5500\'s? I\'m fixing to finish up a full howto plus a couple minor tweeks to upload to the regular files section on here. Any constructive comments on how I can make the documentation better?
I\'m planning to set up my 5500 with dual boot. If all goes well, I\'mm try to do the same with 750 and Cacko Qtopia/X11 ROMs.
-
has anyone done this with there 5600. i just got mine a few days ago and i don\'t want to mess it up if it doesn\'t work
-
has anyone done this with there 5600. i just got mine a few days ago and i don\'t want to mess it up if it doesn\'t work
The scripts are for the 5500 only. It would be posible to do the same type of thing on the 5600, but since it has a different layout, you can\'t use the same scripts. See the posts from jerrybme where he\'s trying to do the same setup for his c750 (which has a similar rom layout as the 5600).
-
Well I have had limited success with dual booting a C760.
Got past the \"respawn\" problem by moving /sbin/telinit to /sbin/sys/ and renaming to init. Then I created a link from /sbin/sys/init to /sbin/telinit.
Now I can load normally if there is no init.card on the SD card. If there is on SD card then I get what lloks like a core dump flash by and the CF card no longer mounts and the only way to reboot is to do a hard reboot (hold OK and Home while toggling battery lock switch then power on with external on/off button).
If there is a init.card on SD card then it passes control over to the init.card on .dev, and runs the commands in init.car (they are shown on the screen with a \"+\" in front of them, however it freezes after the exec/sbin/init command. This is with OZ 3.3.5, will try pdaXrom and Cacko QT to see if they are the same.
Stu
-
keep us posted stubear - i am really looking to dualbooting qtopia and pdaxrom!!!
Thanks to everyone who works/worked on these scripts for your hard work ..
-
Any constructive comments on how I can make the documentation better?
Less on the documentation, but on automation:
You can launch the rom modification script from a Qt icon. What I would expect it to do:
a) check for having a SL-5500 with Sharp ROM or any other that works
check for presence of a writable CF card with enough free capacity
c) create the flashable file on the CF card
And put everything in a nice dualboot_arm-1.0.ipk
Then, documentation reduces to
1. install dualboot.ipk
2. insert CF card
3. launch dual-boot-installer application
4. wait for completion (x minutes)
5. flash a new rom according to the standard instructions
6. copy second rom\'s initrd.bin to a fresh SD card
The only issue with Qt wrapped shell scripts is that they can\'t have a user interface. But I remember that there is a /bin command (I don\'t have the Z with me at the moment to specify) which pastes an image to the screen (like the initial Zaurus welcome screen). So predefined pngs can be used for messages like \"please wait\", \"error\", \"finished\".
If you need support on this idea, please contact me.
-- hns
-
The only issue with Qt wrapped shell scripts is that they can\'t have a user interface. But I remember that there is a /bin command (I don\'t have the Z with me at the moment to specify) which pastes an image to the screen (like the initial Zaurus welcome screen). So predefined pngs can be used for messages like \"please wait\", \"error\", \"finished\".
Ok, here\'s a couple ideas I was thinking of.
1) I can launch the terminal app from the icon, with a paramater to call the modrom script. This way, there can be at least a minimal user interface. Only drawback is, the terminal app isn\'t installed by default. So I\'d have to make it a dependency in the ipk. But someone might have an alternat terminal app installed (i.e., opie-terminal), and I\'m not sure how to make the dependency an either/or.
2) The script switch to another virtual cosole (call \"chvt 3\" at the top of it). This would give the same type of user interface as above, but not rely on having the terminal app installed.
This could work ok for the modrom script, but the oz2sd script will cause a low memory condition (since it has to insmod the mtdram module which takes up an aditional 16 meg memory), which results in qpe displaying the low memory dialog. Don\'t know if this would pop up over the alternate virtual console, I\'ll have to do some tests on this.
3) There is a program out there that allows a shell script to make qt calls (open window for output, dialog buttons, etc.) Haven\'t played with it yet, but it could be an option for providing a minimal gui interface. Again, it adds another dependency.
I\'m leaning more towards option 2, since it would be the easiest for me to impliment for the time being. As for the documentation, I\'ll split it up into a \"quickstart\" guide, a \"detailed\" section, and a third part that gives a more in-depth look at what is changed. Also, the modrom script sets up the zaurus for both dual-boot root on SD, and also has another component, for just /home on SD. I\'ll have to do a better job of documenting both so that they don\'t get confused.
Now, if I get some funds together, I\'ll order an sl-5600, then I\'ll be able to maintain a seperate version for that platform (which seems to be many of the requests here). I\'ve just gotta make the determination if the 5600 would be worth it for me at this point, or if I should hold out for the 6000 or c860.
-
Well, I found out that my option 2 above won\'t work, as chvt hangs while under the tkc (and sharp, i think) rom (unless you kill qtopia). I think this due to a file lock issue with qtopia. So, I\'m working on putting together the ipk\'s with launch icons that call the terminal app to run the scripts.
The good news is that I\'ve got a way around the low memory issues when extracting the OZ filesystem (oz2sd package). I found a blkmtd test driver in the kernel, which will work with a jffs2 image, instead of using the mtdram test driver. This way, the script won\'t have to insmod a 16-meg module, or create a temporary swap file either. So the final packages should be a bit more robust.
The other change I\'ll make to the modrom script is to have it use md5sum to identify the installed rom, and validate the md5 on the generated initrd.bin file. I\'ll have to load up several versions of the various compatible roms, so far my list includes Sharp 3.10, Sharp 3.13, TKCrom 1.0, TKCrom 2.0-alpha3. Any others I should include?
-
Jerrybeme,
I can now boot into pdaXrom on SD and run console apps but when I start X the display is mangled and unusable, but at least I got rid of the segmentation faults I was getting before. If I can\'t kick the display problem on pdaXrom, I\'ll try OZ 3.3.6r1 and see if I have better luck with a qt based rom.
Here are the scripts I use for /sbin/init and /mnt/card/init.card.
Brief steps to get as far as I have
1. remount / writeable (mount -o rw,remount /)
2. mkdir /sbin/sys
3. cp /sbin/telinit /sbin/sys/init - this was the crucial step for me, telinit didn\'t like being linked from /sbin/sys/init and gave spawning errors
4. cp init scrip to /sbin
5. chmod +x /sbin/init
6. copy rom to ext2 formatted SD card
7. copy init.card to SD card
8. reboot and cross fingers
Had some problems getting a good copy of the roms from the initrd.bin (think my mtdram/mtdblock modules on my desktop box are a little dodgy as the sometimes give strange errors) ended up flashing my Z with pdaXrom and extracting the files that way.
Now if I can just get over the display problem, I\'ll be a happy camper
Stu
NOTE: the current scripts don\'t e2fsk the sd card during boot as I rewrote the scripts from scratch to work out what was different between 5500 and C760, will probably put it back in later.
-
Stubear,
Were you able to get dual-boot to work with OpenZaurus and a Sharp-based rom (such as Cacko 1.21)? If so, could you please post a detailed how-to on setting it up for the Cxxx? Thank you!
-
ZeeUser,
Sorry no luck yet with OpenZaurus from the SD, in the midst of testing Cacko 1.21 from the SD - looking good, no seg faults at the moment, just need to tweak the startup to load everything properly.
PdaX works after changing the Xfbdev from X11-zaurus, but it\'s a bit slow as I only have really old SD card (gotta get me a new one)
Stu
-
Stubear,
What ROM do you currently have flashed that Cacko 1.21 is working in dual-boot off the SD with? I wouldn\'t mind trying a dual-boot with OpenZaurus in flash and either pdaXrom or Cacko 1.21 on SD, if that is currently working. I just don\'t like playing the flashing game :wink:
I would like to try dual-boot with the modified pdaXrom now, but I am not clear on your instructions from your April 3rd post. When you say copy the rom to the SD card, specifically which rom and in what form? I don\'t mind waiting if you plan on writing a detailed how to once all the kinks are worked out, though.
By the way, would it be possible to boot from multiple roms? This would be accomplished by having each alternate rom on a separate SD card. What I would really like to see, though, is an boot menu to choose from different roms on the same SD (maybe through partitioning the card and some extra scripting?).
My thanks to Stubear, DerekP, Jerrybme and everyone else who has/is working on this!
-
ZeeUser,
I\'m trying to dual-boot Cacko 1.21 from a Standard Sharp Qtopia rom, if that works I\'ll try some other roms to see if my script needs tweaking.
I took my pdaX dual-boot stuff over to another thread (http://%5burl=https://www.oesf.org/forums/index.php?showtopic=3027)]http://www.zaurususergroup.com/index.php?n...27]thread[/url][/url] cause I was having unrealted to this thread. A tarball of the pdaXrom and my dual-boot scripts can be downloaded from here (http://zaurus.hostnic.us/pdaXrom-SD%20dual%20boot/)
Booting multiple roms from multiple SD cards should work fine, but i\'ve had no luck getting pivot_root to boot different roms from the same SD card. (That\'s a project after I get cacko dual-booting)
Stu
-
I\'m interested in derekp\'s dual boot - How\'s the HOW TO coming along?
Would also like some info from joshp about his 4-ROM setup is possible - just ordered myself a 256MB SD card to try this stuff out on.
-
???
-
Derekp haseint relley been doing to much with his howto. As for me I suck at wrighting. So post what you want to know and I will try to explme as much as I can. On a side note my 4 way boot setup does tend to look your Z but I don\'t know if thats because of my wifi card or the way I have it set up. And my wifi problumes come form the fact that I compiled my own kernel. Not form doing dualboot. Have you goten you 256MB sd card yet?
JP
P.S. Sorry I did not post sooner.
-
Hi,
Nope, SD card is en route from US so takes a while
-
I was just wondering how well versied are you in linux? And on a side note do you have a sd card that is above 32mb? By the way what brand of sd card did you order?
JP
P.S. Just out of cursity where are you in the world?
-
I know enough about linux to try things but not enough to fix them when they go wrong
I have a 32mb SD right now, SanDisk 256MB on order (somewhere over/on the atlantic)
I\'m in the UK
-
It has arrived - gonna have a go at creating a dual-boot setup and then i\'ll let you know how i messed it up
-
You cant mess it up to much. Derekps daul boot setup is prerty seample once you under stand what it all does. My 4 way dual boot setup is a little more complucated. And also note that derekp did not relley need to mod open zaurus to much to do a dual boot, me on the other hand, I had to mod I little more to get the roms that where ment for internel flash to work right.
JP
-
I should be back into the swing of things next week. I\'ve been tied down with a heavy project load at work, and don\'t really feel like turning on a computer at home (so I\'ve been sorta neglecting this site for a while).
I\'ll see what I can put together this weekend (I promise :-).
-
Well, after a few tries I just couldn\'t get the darn thing to boot from my new SD card. I contacted SanDisk and they have agreed that the card is fu-*cough*, err broken
So....waiting for replacement :/
-
Well, after a few tries I just couldn\'t get the darn thing to boot from my new SD card. I contacted SanDisk and they have agreed that the card is fu-*cough*, err broken
So....waiting for replacement :/
Did you try the other sd card driver form the ZUG download setcion.
JP
-
It\'s broken - it gives errors when I try to format it on my PC
-
I\'m trying to accomplish this using my 5500, with a 64mb sd card and a 256mb cf card, hopefully dual-booting to oz. Since i am a total newbie, I can\'t really troubleshoot on my own, so thats where you guys come in.......... (hopefully)..........
When I type as root:
# /usr/local/bin/modrom-dualboot.sh
all the stuff comes up with \"This will rebuild your existing rom to support dual-boot home-on-sd AND support dual-boot root-on-sd......\" and everything looks to be going ok, it goes on about the nodes etc. until it gets to this point:
Writing superblocks and filesystem accounting information: done
copying current rom to temp image...
mkdir: Cannot create directory \'/tmp/tmp_src\': File exists
mkdir: Cannot create directory \'/tmp/tmp_dest\': File exists
Making modifications to new filesystem image.
Done making modifications
Building new initrd.bin
/usr/local/bin/mkcramfs: error while loading shared libraries: libz.so.1: cannot load shared object file: No such file or directory
Problem creating image
And thats it. But I cannot find tmp_dest or tmp_src in /tmp, and unless my file manager is lying through its teeth, libz.so.1 does exist.
Any help is much appreciated, as usual
-
You need to load Zlib for the compression.
-
Sorry, its me again. Thank you keithecampbell, now the scipt has sucessfully completed, so at least thats good. Now, this is probably just my naivety, but there is no zImage, so when I go to \"updateROM\" it says \"Image file is not found\". I have never flashed my ROM before, so I am new to this! Do I need to download one of the zImages from www.openzaurus.org ?
Help is always appreciated
-
Well as there were no replies and im very impatient, I downloaded a zImage from the openzaurus website, and followed reflashing instructions, and now when I boot up my Z with or without storage cards inserted, an openzaurus banner is displayed on a black background and the only other feature is a thin white band at the bottom. There is a blinking indicator which probably should be typing the start-up text. In the worst scenario I perform a hard reset and restore my settings. Obviously this should not of happened, but if anyone could help me I could be grateful.
-------------------------------------------------
UPDATE: I\'ve just tried a hard reset and the same screen still displays! I really need some help now!!
-------------------------------------------------
UPDATED UPDATE :wink: Well using my CF reader/writer I tried to delete the zImage and initrd.bin, but it still freezes at the same screen. SOMEBODY PLEASE HELP ME!!!!!!!
-
Phew........... I just consulted the unofficial zaurus faq, and I found my answer there; turns out there must have been a corrupt part (either the zImage or initrd.bin) and just by reflashing with the ospack my settings are back, which relieves me substantially.
Just when I was losing hope..............
-
I\'ve just got the dual boot setup working, and I would like to express my gratitude to derekp and all the other people who have made this possible. You have no idea how much more useful this makes the Z! I was so relieved the first time openzaurus loaded up, and then when I removed my SD card the standard ROM appeared. Thank you all for doing something I dreamed of but didnt think possible on my 5500!
-
The mkcramfs would be useful for compressing reference material on an SD or CF card and then accessing the material as if they were regular files. Where can I get a copy of the mkcramfs that Derekp mentions?
-
Hmm, I'd like to play around with this, but I can't find any of the scripts mentioned... can anyone point me there? And a basic question: What about the packages installed to ram, are they usable by every image? They should, if the symlinks are in / , right?
Thanks, cheers
Philipp
-
The mkcramfs would be useful for compressing reference material on an SD or CF card and then accessing the material as if they were regular files. Where can I get a copy of the mkcramfs that Derekp mentions?
You can find mkcramfs in the zgcc package - details on http://s91215199.onlinehome.us/zaurus/zgcc2install.html (http://s91215199.onlinehome.us/zaurus/zgcc2install.html)
Regards,
Daniel
-
I have to agree with Pyrates, I can't find the download links for any of these scripts or packages. I am very interested in testing this out and don't want to have to reinvent the wheel piecing the information from this thread together and writing my own. Help!
-
I fully support Pyrates and sonicbuddha. I would love to try this out.
Thanks to anyone with guidance.
-
Ugh, I hate to have two threads doing esentially the same thing, but... at least I can say I didn't start it. And 6 pages seems like enough and time to start fresh..
klrussell, pyrates, a new thread has been started on this subject with a little bit more info. None of it is currently tested, but check it out. Besides, Stubear has offered to repost some of the scripts he has already tested. Lets put it all together and m'be get a "how to" on ZUG when we are finished!
https://www.oesf.org/forums/inde...33&hl=dual+boot (https://www.oesf.org/forums/index.php?showtopic=8233&hl=dual+boot)
-
Where can I find modrom-dualboot.ipk? I have searched and searched but cannot find. This must be a real loser question because it seems everyone else can find it.
Thanks
windom
-
... Install modrom-dualboot.ipk.
... Then, install oz2sd.ipk.
Where do we get theese files from?
Do you think your dual boot method would work on a sl-6000l?
Do you think it would work with the Guylhem ROM as the second OS?
Jon Loldrup