Author Topic: Debian And Uboot  (Read 79719 times)

danr

  • Full Member
  • ***
  • Posts: 138
    • View Profile
    • http://
Debian And Uboot
« Reply #90 on: April 26, 2007, 09:58:44 am »
I managed to boot Debian on an 860 using svs57's guide.  My SD card was originally formatted as ext2, and Debian didn't like that, so I created a journal on it to make it an ext3-type.  Debian booted OK after that.

I couldn't find loadkeys anywhere, so do I need to copy it over from Angstrom or something?  It's not very usable when I can't type '/'!

I installed the Angstrom X server, but it couldn't find a touch screen library or something, so I guess I will need to install Debian xorg or something to get that to work.

BTW I have streamlined flashing of the kernel by using some backup and restore scripts which I found somewhere - can't remember unfortunately, but they are called backup.sh and restore.sh.  The backup script creates files boot.pdx, emerg.pdx, kernel.pdx, root.pdx, which I have on a CF card.  To jump between pdaXrom and Debian kernels, I simply use

Code: [Select]
restore.sh -e -r -u -s /mnt/cf/backup
after renaming the relevant kernel to kernel.pdx, and putting it in /mnt/cf/backup.  I've copied the scripts to the CF card so I can run this script from the uboot emergency screen, or directly from pdaXrom.

If no-one can find the scripts, I'll post them here.  Apologies to the author for not remembering where I found them!

Dan
SL-C860 running Debian EABI on top of Angstrom 2.6 kernel

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Debian And Uboot
« Reply #91 on: April 26, 2007, 10:05:50 am »
Quote
Quote
10. Press [OK] and keep pressing it)
11. Reinsert AC (still pressing [OK])
12. Hit [On], back to the Emergency System again (step 2). That's exactly the starting point.

Thanks again!
[div align=\"right\"][a href=\"index.php?act=findpost&pid=159855\"][{POST_SNAPBACK}][/a][/div]

switch step 2 and 3, then 4 shouldn't be necessary and 5 will be done automatically.

Don't press OK in step 10/11/12, the kernel automatically looks for the SD to boot from. No need to press anything.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=159862\"][{POST_SNAPBACK}][/a][/div]


No... Step 5 doesn't come automatically; autoboot.sh doesn't run itself.
It's on the SD and SD is not mounted when rebooting into the Emergency System.
Would there be something wrong with the script?  I am using the uboot autoboot.sh from r197 (Corgi).

This time i don't do steps 10-12; i plug out the AC. Count 5 and take a deep breath. Plug in AC. Power on. Bingo! Nothing.


Quote
Quote
12. Hit [On], back to the Emergency System again (step 2). That's exactly the starting point.

[div align=\"right\"][a href=\"index.php?act=findpost&pid=159855\"][{POST_SNAPBACK}][/a][/div]

That's the fun of it, you can keep going ....            
[div align=\"right\"][a href=\"index.php?act=findpost&pid=159864\"][{POST_SNAPBACK}][/a][/div]

"All great deeds and all great thoughts have a ridiculous beginning."
« Last Edit: April 26, 2007, 10:09:23 am by ZDevil »

Life is too precious for hacking *too much*
Visit my Z screencap gallery[/color]
My EeePC 701 Black = Debian (Lenny) on IceRocks + Transcend SDHC Class6 8GB + 2GB RAM
My Zaurus SL-C3200 = Debian EABI (kernel 2.6.24.3-yonggun) on a swapped internal Sandisk Extreme III CF 16gb
My Debian EABI feed: http://matrixmen.free.fr/zaurus/debian/
My OpenBSD/Zaurus feeds:  Link1, Link2
[/i][/font][/color][/size]

ShiroiKuma

  • Hero Member
  • *****
  • Posts: 900
    • View Profile
Debian And Uboot
« Reply #92 on: April 26, 2007, 10:10:51 am »
Quote
"All great deeds and all great thoughts have a ridiculous beginning."
) Sometimes.

Just a thought that ocurred to me now, since I'd still maybe like to play with it.

Since I was using Angstrom kernel to boot the debian anyway, I'd like to extract the debian rootfs alongside Angstrom's so that I could use them in parallel, anyone have thoughts on how to do this, aside the plain old chroot.

I mean something along the lines, if I have hda1 partition with Angstrom's rootfs and hda2 partition with debian, can I switch the partition numbers in fdisk or whatnot, so that hda2 becomes hda1 and the Z boots debian on restart?

Or have subfolders on debfs and angfs on hda1 root and then symlink all the dirs in one sub to hda1's root so that that system would boot?

What'd be the best way to do this, any thoughts anyone?
[span style=\'font-size:8pt;line-height:100%\']Das ganze tschechische Volk ist eine Simulantenbande.[/font][/span]
Militäroberarzt Bautze

svs57

  • Full Member
  • ***
  • Posts: 108
    • View Profile
    • http://
Debian And Uboot
« Reply #93 on: April 26, 2007, 10:11:03 am »
If you have pdaXrom installed on NAND you can mount it and get files you need.
mkdir /mnt/nand
mount  -t jffs2 /dev/mtdblock2 /mnt/nand

"/" doesn't work that's why I want to set  loading modules, start sshd and correct keyboard mapping on sd before first boot.
It's really trick.

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Debian And Uboot
« Reply #94 on: April 26, 2007, 10:14:02 am »
Right. I also notice one thing:
After the rebooting into Debian fails, i power the device off.
With both the AC and battery in.
But the charging light is not on.

[EDIT]
I think i know why: when booting into the emergency system without the battery, there is an error message about something wrong about charging. So after the boot failure, putting in the battery won't charge it because something is not working from the beginning. But the tricky thing is there is no way for me to boot into emergency sytem WITH the battery in.

"One must believe that Sisyphus is happy"
« Last Edit: April 26, 2007, 10:29:53 am by ZDevil »

Life is too precious for hacking *too much*
Visit my Z screencap gallery[/color]
My EeePC 701 Black = Debian (Lenny) on IceRocks + Transcend SDHC Class6 8GB + 2GB RAM
My Zaurus SL-C3200 = Debian EABI (kernel 2.6.24.3-yonggun) on a swapped internal Sandisk Extreme III CF 16gb
My Debian EABI feed: http://matrixmen.free.fr/zaurus/debian/
My OpenBSD/Zaurus feeds:  Link1, Link2
[/i][/font][/color][/size]

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Debian And Uboot
« Reply #95 on: April 26, 2007, 11:03:25 am »
That's all what i got when booting into the emergency system:
Code: [Select]
    pdaXrom emergency system
    =========================
    pdaXrom [Husky]
    Loading /etc/sysconfig/keyboard/Husky/keymap.map

    Proccesing /etc/profile... Done

        -sh-3.00#
autoboot.sh on SD doesn't load; SD not mounted when boot...

Note: My SD is 256MB, FAT formatted.
« Last Edit: April 26, 2007, 11:08:51 am by ZDevil »

Life is too precious for hacking *too much*
Visit my Z screencap gallery[/color]
My EeePC 701 Black = Debian (Lenny) on IceRocks + Transcend SDHC Class6 8GB + 2GB RAM
My Zaurus SL-C3200 = Debian EABI (kernel 2.6.24.3-yonggun) on a swapped internal Sandisk Extreme III CF 16gb
My Debian EABI feed: http://matrixmen.free.fr/zaurus/debian/
My OpenBSD/Zaurus feeds:  Link1, Link2
[/i][/font][/color][/size]

bunkford

  • Newbie
  • *
  • Posts: 13
    • View Profile
Debian And Uboot
« Reply #96 on: April 26, 2007, 11:04:27 am »
I got debian running without using u-boot for anyone that is interested.
I used the Angstrom Kernel (2.6.20.6) to boot off the micro drive of my 3200.
I used Angstrom's install script to uncompress the rootfs and install the kernel.

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Debian And Uboot
« Reply #97 on: April 26, 2007, 11:08:01 am »
Quote
I got debian running without using u-boot for anyone that is interested.
I used the Angstrom Kernel (2.6.20.6) to boot off the micro drive of my 3200.
I used Angstrom's install script to uncompress the rootfs and install the kernel.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=159873\"][{POST_SNAPBACK}][/a][/div]

Could you give more detail here? A step-by-step guide will be great.
It seems I also need to swtich to Angstrom again to boot Debian.

Life is too precious for hacking *too much*
Visit my Z screencap gallery[/color]
My EeePC 701 Black = Debian (Lenny) on IceRocks + Transcend SDHC Class6 8GB + 2GB RAM
My Zaurus SL-C3200 = Debian EABI (kernel 2.6.24.3-yonggun) on a swapped internal Sandisk Extreme III CF 16gb
My Debian EABI feed: http://matrixmen.free.fr/zaurus/debian/
My OpenBSD/Zaurus feeds:  Link1, Link2
[/i][/font][/color][/size]

ShiroiKuma

  • Hero Member
  • *****
  • Posts: 900
    • View Profile
Debian And Uboot
« Reply #98 on: April 26, 2007, 11:32:28 am »
That's easy... That's what I did yesterday.

Just follow the Angstrom installation guide (for the 3200 that is). Put zImage.bin and update.sh in your CF card and you will have to repack the armel-root-fs file so that you remove the leading armel-root-fs directory from it. Then tar gzip the resultant files to a hdimage1.tgz and put this file on your CF too.

Then just reboot, using the OK-PowerOn combo and Angstrom kernel will flash and the rootfs will expand into hda1 and you'll boot up debian with the Angstrom kernel.
[span style=\'font-size:8pt;line-height:100%\']Das ganze tschechische Volk ist eine Simulantenbande.[/font][/span]
Militäroberarzt Bautze

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Debian And Uboot
« Reply #99 on: April 26, 2007, 11:48:54 am »
Quote
That's easy... That's what I did yesterday.

Just follow the Angstrom installation guide (for the 3200 that is). Put zImage.bin and update.sh in your CF card and you will have to repack the armel-root-fs file so that you remove the leading armel-root-fs directory from it. Then tar gzip the resultant files to a hdimage1.tgz and put this file on your CF too.

Then just reboot, using the OK-PowerOn combo and Angstrom kernel will flash and the rootfs will expand into hda1 and you'll boot up debian with the Angstrom kernel.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=159876\"][{POST_SNAPBACK}][/a][/div]

Ok. Sounds surprisingly simple. Let me try this with SD.  
Just two quick questions:
-- Should the card be FAT or EXT2/3?
-- Do i need to use another name instead of "hdimage1.tgz" if i want to boot from SD (something like "mmcdimage1.tgz"?)
« Last Edit: April 26, 2007, 11:53:37 am by ZDevil »

Life is too precious for hacking *too much*
Visit my Z screencap gallery[/color]
My EeePC 701 Black = Debian (Lenny) on IceRocks + Transcend SDHC Class6 8GB + 2GB RAM
My Zaurus SL-C3200 = Debian EABI (kernel 2.6.24.3-yonggun) on a swapped internal Sandisk Extreme III CF 16gb
My Debian EABI feed: http://matrixmen.free.fr/zaurus/debian/
My OpenBSD/Zaurus feeds:  Link1, Link2
[/i][/font][/color][/size]

ShiroiKuma

  • Hero Member
  • *****
  • Posts: 900
    • View Profile
Debian And Uboot
« Reply #100 on: April 26, 2007, 11:56:02 am »
FAT. It should always be FAT when you're flashing the Zaurus.

I don't know how booting off of an SD works in Angstrom. Obviously I've done this with the 3200 kernel which boots straight off of the HDD.

You might wanna check OZ FAQ etc., since in this respect Angstrom is identical to OZ, to see if it can be done... Don't know.
[span style=\'font-size:8pt;line-height:100%\']Das ganze tschechische Volk ist eine Simulantenbande.[/font][/span]
Militäroberarzt Bautze

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Debian And Uboot
« Reply #101 on: April 26, 2007, 03:13:59 pm »
Yet another failed experiement...    

I tried both on my 1gb SD (naming the rootfs as "mmcdimage1.tgz" and "hdaimage1.tgz") and 512mb CF ("hdaimage1.tgz")
Both cards are FAT.
The tgz is done with 7Zip on a Windows PC.

Angstrom kernel installs successfully.

Tons of error messages run amok after
"INIT: version 2.78 booting"

The last line reads:
Code: [Select]
INIT: ld "ln" respawning too fast: disabled for 5 minutesSince then, the system is condemned to repeat forever the same meaningless task of booting the flawed system, only to see it roll down and fail again.    

A question pops up: is it necessary to partition the card into

/dev/hda1 = base system mounted under /
/dev/hda2 = user home mounted under /home
/dev/hda3 = storage mounted under /media/hd

as described in https://www.oesf.org/index.php?title=C3100_OpenZaurus?

Will give one very last try again by making a new tgz again on my home mac.
« Last Edit: April 26, 2007, 03:17:08 pm by ZDevil »

Life is too precious for hacking *too much*
Visit my Z screencap gallery[/color]
My EeePC 701 Black = Debian (Lenny) on IceRocks + Transcend SDHC Class6 8GB + 2GB RAM
My Zaurus SL-C3200 = Debian EABI (kernel 2.6.24.3-yonggun) on a swapped internal Sandisk Extreme III CF 16gb
My Debian EABI feed: http://matrixmen.free.fr/zaurus/debian/
My OpenBSD/Zaurus feeds:  Link1, Link2
[/i][/font][/color][/size]

bunkford

  • Newbie
  • *
  • Posts: 13
    • View Profile
Debian And Uboot
« Reply #102 on: April 26, 2007, 07:53:17 pm »
Could someone post a link to a tared rootfs that is already set up for the zaurus with correct key mappings and xserver for example?

ShiroiKuma

  • Hero Member
  • *****
  • Posts: 900
    • View Profile
Debian And Uboot
« Reply #103 on: April 27, 2007, 03:22:18 am »
Quote
Yet another failed experiement...   

I tried both on my 1gb SD (naming the rootfs as "mmcdimage1.tgz" and "hdaimage1.tgz") and 512mb CF ("hdaimage1.tgz")

The last line reads:
Code: [Select]
INIT: ld "ln" respawning too fast: disabled for 5 minutes
That's because the rootfs didn't install on the harddrive, assuming you've done this on a 3200.

The file must be named hdimage1.tgz not hdaimage1.tgz.
[span style=\'font-size:8pt;line-height:100%\']Das ganze tschechische Volk ist eine Simulantenbande.[/font][/span]
Militäroberarzt Bautze

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Debian And Uboot
« Reply #104 on: April 27, 2007, 04:34:50 am »
Quote
Quote
Yet another failed experiement...    

I tried both on my 1gb SD (naming the rootfs as "mmcdimage1.tgz" and "hdaimage1.tgz") and 512mb CF ("hdaimage1.tgz")

The last line reads:
Code: [Select]
INIT: ld "ln" respawning too fast: disabled for 5 minutes
That's because the rootfs didn't install on the harddrive, assuming you've done this on a 3200.

The file must be named hdimage1.tgz not hdaimage1.tgz.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=159919\"][{POST_SNAPBACK}][/a][/div]

Oops, sorry, it's my typo actually. I did use hdimage1.tgz. But it fails to install.
I begin to suspect that there is something wrong when i was making the right tarball.
Will try that again this evening.
But probably i will be busy playing with OpenBSD on my 3200.

Life is too precious for hacking *too much*
Visit my Z screencap gallery[/color]
My EeePC 701 Black = Debian (Lenny) on IceRocks + Transcend SDHC Class6 8GB + 2GB RAM
My Zaurus SL-C3200 = Debian EABI (kernel 2.6.24.3-yonggun) on a swapped internal Sandisk Extreme III CF 16gb
My Debian EABI feed: http://matrixmen.free.fr/zaurus/debian/
My OpenBSD/Zaurus feeds:  Link1, Link2
[/i][/font][/color][/size]