Author Topic: U-boot Kernel Loading  (Read 3049 times)

louigi600

  • Sr. Member
  • ****
  • Posts: 471
    • View Profile
U-boot Kernel Loading
« on: December 29, 2006, 03:10:57 pm »
I'm trying to reconfigure u-boot to load alternative kernels from SD/MMC.
Anyone know how to modify the line below in order to load kernel from SD instead of onboard flash:
nand read.logical 0xa0800000 0x005a0000 0x00160000

As far as I understand the syntax is:
nand read.logical <destination address> <read start address> <read size>

So prpbably the question boils down to:
anyone know where SD is mapped to on corgi ?
and what should be used to read from SD/MMC since "nand read.logical" is probably meant for onboard flash ?

Could this be the address I'm looking for:
#define CFG_MMC_BASE            0xF0000000

Unfortunately I do not have a serial cable for my Z in order to have a better guess at what should be done ... anyone have any other ideas ?

Please help !
« Last Edit: December 29, 2006, 05:39:25 pm by louigi600 »
Regards
David

SL-c760*  pdaXrom latest
SL-c860    pdaXrom latest ;-)
SL-c1000  pdaXrom Latest
Acer Aspire One running slackware and Clash
Toshiba AC100 running ARMedslack and Clash

*with some hardware problems but good for testing

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
U-boot Kernel Loading
« Reply #1 on: December 29, 2006, 08:02:51 pm »
Quote
I'm trying to reconfigure u-boot to load alternative kernels from SD/MMC.
Anyone know how to modify the line below in order to load kernel from SD instead of onboard flash:
nand read.logical 0xa0800000 0x005a0000 0x00160000

As far as I understand the syntax is:
nand read.logical <destination address> <read start address> <read size>

So prpbably the question boils down to:
anyone know where SD is mapped to on corgi ?
and what should be used to read from SD/MMC since "nand read.logical" is probably meant for onboard flash ?

Could this be the address I'm looking for:
#define CFG_MMC_BASE            0xF0000000

Unfortunately I do not have a serial cable for my Z in order to have a better guess at what should be done ... anyone have any other ideas ?

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

afaik uboot already lets you boot off microdrive, sd, cf, etc...
all you need is a special kernel on those devices...
SL-C3000 - pdaXii13 build5.4.9 (based on pdaXrom beta3) / SL-C3100 - Sharp ROM 1.02 JP (heavily customised)
Netgear MA701 CF, SanDisk ConnectPlus CF, Socket Bluetooth CF, 4GB Kingston CF,  4GB pqi SD, 4GB ChoiceOnly SD, 2GB SanDisk SD USB Plus, 1GB SanDisk USB Plus, 1GB Transcend SD, 2GB SanDisk MicroSD with SD adaptor, Piel Frama Leather Case, GoldX 5-in-1 USB cable, USB hub, USB mouse, USB keyboard, USB ethernet, USB HDD, many other USB accessories...
(Zaurus SL-C3000 owner since March 14. 2005, Zaurus SL-C3100 owner since September 21. 2005)
http://members.iinet.net.au/~wyso/myZaurus - zBook3K

louigi600

  • Sr. Member
  • ****
  • Posts: 471
    • View Profile
U-boot Kernel Loading
« Reply #2 on: December 30, 2006, 06:44:51 am »
No really ... kernel is still loaded from onboard flash but root is fylesystem is passed as a kernel parameter (and can be any one of the devices you said Meanie)
.
See Sash's blog fore more details.
 
If this is what you want you might not even need a different kernel .... at least for SD/MMC; I already had beta4 with root on an ext3 partition of my SD (have not tested CF but I think it might have gotten fixed meantime since Shash's blog posting).

What loads the kernel to default load address is this:

nand read.logical 0xa0800000 0x005a0000 0x00160000

and what sets the boot parameters is this:

setenv bootargs console=ttyS0,115200 console=tty1 root=/dev/mtdblock2 \ rootfstype=jffs2

What I want to do is load an alternative kernel from the SD/MMC instead of the one from onboard flash.

A possible application for this would be allways having a working pdaXrom installed on the onboard flash and being able to test kernels without making the PDA unusable till you reflash a working kernel.
It might even be possible to have some other rom installed on SD/MMC (I like to keep the CF slot free for wifi/bluetooth/gps).
« Last Edit: December 30, 2006, 09:14:29 am by louigi600 »
Regards
David

SL-c760*  pdaXrom latest
SL-c860    pdaXrom latest ;-)
SL-c1000  pdaXrom Latest
Acer Aspire One running slackware and Clash
Toshiba AC100 running ARMedslack and Clash

*with some hardware problems but good for testing

himchen

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • http://
U-boot Kernel Loading
« Reply #3 on: December 31, 2006, 10:39:29 am »
Quote
What loads the kernel to default load address is this:
nand read.logical 0xa0800000 0x005a0000 0x00160000
and what sets the boot parameters is this:
setenv bootargs console=ttyS0,115200 console=tty1 root=/dev/mtdblock2 \ rootfstype=jffs2
What I want to do is load an alternative kernel from the SD/MMC instead of the one from onboard flash.

You could let the Linux kernel load a different Linux kernel, like OpenBSD does it
with the zbsd..o kernel module.

louigi600

  • Sr. Member
  • ****
  • Posts: 471
    • View Profile
U-boot Kernel Loading
« Reply #4 on: December 31, 2006, 11:49:55 am »
Quote
You could let the Linux kernel load a different Linux kernel, like OpenBSD does it
with the zbsd..o kernel module.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=149664\"][{POST_SNAPBACK}][/a][/div]

My goal was to leave the kernel on the onboard flash untouched so that I could allways have a working pdaXrom installation ... but being able to fiddle with testing kernels on tha SD/MMC.
The r121 kernel I think does not have the module you mentioned ... all I could find with bsd was bsd_comp.ko.
Regards
David

SL-c760*  pdaXrom latest
SL-c860    pdaXrom latest ;-)
SL-c1000  pdaXrom Latest
Acer Aspire One running slackware and Clash
Toshiba AC100 running ARMedslack and Clash

*with some hardware problems but good for testing

louigi600

  • Sr. Member
  • ****
  • Posts: 471
    • View Profile
U-boot Kernel Loading
« Reply #5 on: April 12, 2007, 03:08:41 am »
Quote
You could let the Linux kernel load a different Linux kernel, like OpenBSD does it
with the zbsd..o kernel module.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=149664\"][{POST_SNAPBACK}][/a][/div]

Are you talking about kexec there or something else ?
Regards
David

SL-c760*  pdaXrom latest
SL-c860    pdaXrom latest ;-)
SL-c1000  pdaXrom Latest
Acer Aspire One running slackware and Clash
Toshiba AC100 running ARMedslack and Clash

*with some hardware problems but good for testing

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
U-boot Kernel Loading
« Reply #6 on: April 12, 2007, 03:19:29 am »
Quote
Quote
You could let the Linux kernel load a different Linux kernel, like OpenBSD does it
with the zbsd..o kernel module.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=149664\"][{POST_SNAPBACK}][/a][/div]

Are you talking about kexec there or something else ?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=158590\"][{POST_SNAPBACK}][/a][/div]

OpenBSD on Z uses the Sharp kernel to boot the Z, ie makes the skeleton Sharp system a pseudo boot loader and then loads the OpenBSD kernel , etc...

kexec uses a very similar concept and has been implemented in some of the testing versions of OpenZaurus, but not on the stable releases...

unfortunately, it has not been implemented in pdaXrom yet afaik...
« Last Edit: April 12, 2007, 03:19:46 am by Meanie »
SL-C3000 - pdaXii13 build5.4.9 (based on pdaXrom beta3) / SL-C3100 - Sharp ROM 1.02 JP (heavily customised)
Netgear MA701 CF, SanDisk ConnectPlus CF, Socket Bluetooth CF, 4GB Kingston CF,  4GB pqi SD, 4GB ChoiceOnly SD, 2GB SanDisk SD USB Plus, 1GB SanDisk USB Plus, 1GB Transcend SD, 2GB SanDisk MicroSD with SD adaptor, Piel Frama Leather Case, GoldX 5-in-1 USB cable, USB hub, USB mouse, USB keyboard, USB ethernet, USB HDD, many other USB accessories...
(Zaurus SL-C3000 owner since March 14. 2005, Zaurus SL-C3100 owner since September 21. 2005)
http://members.iinet.net.au/~wyso/myZaurus - zBook3K

louigi600

  • Sr. Member
  • ****
  • Posts: 471
    • View Profile
U-boot Kernel Loading
« Reply #7 on: April 12, 2007, 04:42:45 am »
Quote
OpenBSD on Z uses the Sharp kernel to boot the Z, ie makes the skeleton Sharp system a pseudo boot loader and then loads the OpenBSD kernel , etc...

kexec uses a very similar concept and has been implemented in some of the testing versions of OpenZaurus, but not on the stable releases...

unfortunately, it has not been implemented in pdaXrom yet afaik...
[div align=\"right\"][a href=\"index.php?act=findpost&pid=158593\"][{POST_SNAPBACK}][/a][/div]
Yea ... compiling kernel with kexec is not a difficult task ... and I guess that using altboot would then be easy ... but I would really prefer having u-boot load kernel straight from the SD/MMC ... it would be so much better.
My programming skill is far from sufficient to do the job on u-boot ... but looking at the sources it looks like it's possible (but needs some good programmer to have it working for Z). I've been bugging Sash to get help about this but he's too buisy with work.
On top of that I would really need a serial cable to do testing on whatever I do on u-boot ... and that's missing too.
I'm pretty much in a stall situation ;-)
Regards
David

SL-c760*  pdaXrom latest
SL-c860    pdaXrom latest ;-)
SL-c1000  pdaXrom Latest
Acer Aspire One running slackware and Clash
Toshiba AC100 running ARMedslack and Clash

*with some hardware problems but good for testing