Author Topic: Replacement Boot Loader  (Read 10210 times)

0 Members and 1 Guest are viewing this topic.

Offline sbingner

  • Administrator
  • Veteran.
  • *****
  • Posts: 1301
Replacement Boot Loader
« on: March 28, 2007, 01:37:49 pm »
Well, I've been working on getting a replacement boot loader... not entirely sure why, but I think I MIGHT need it to properly boot a new kernel.  Anyways, I've been working on U-Boot and have gotten it to at least do this:

Code: [Select]
EP7312 # ide info                                                                                                                                                             
                                                                                                                                                                             
IDE device 0: Model: ........................................ Firm: ........ Ser#: ....................                                                                       
            Type: Hard Disk                                                                                                                                                   
            Capacity: 24608.1 MB = 24.0 GB (50397442 x 512)                                                                                                                   
IDE device 1: Model: ........................................ Firm: ........ Ser#: ....................                                                                       
            Type: Hard Disk                                                                                                                                                   
            Capacity: 24608.1 MB = 24.0 GB (50397442 x 512)

I still can't find the partitions etc, but at least it's a start....  if anybody knows about such things help is always appreciated too :p  and no, I don't really have two drives on it... it just sees the same one twice lol

Offline sbingner

  • Administrator
  • Veteran.
  • *****
  • Posts: 1301
Re: Replacement Boot Loader
« Reply #1 on: April 02, 2007, 05:41:44 am »
Code: [Select]
DRAM:  16 MB
Flash: 16 MB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Hit any key to stop autoboot:  0
EP7312 # ide reset

Reset IDE: Bus 0: OK
  Device 0: Model: PhatNoise DMS 20GB Firm: M1.42 E  Ser#: 35563208 T
            Type: Hard Disk
            Capacity: 19077.1 MB = 18.6 GB (39070080 x 512)
EP7312 # fatload ide 0:5 c0400000 uImage26
reading uImage26

1237148 bytes read
EP7312 #  bootm c0400000
## Booting image at c0400000 ...
   Image Name:   Linux Kernel Image
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1237084 Bytes =  1.2 MB
   Load Address: c0028000
   Entry Point:  c0028000
   Verifying Checksum ... OK
OK

Starting kernel ...

Linux version 2.6.20.4-crypt1 (root@fairhaven.bingner.com) (gcc version 3.4.3) #5 PREEMPT Sun Apr 1 19:28:49 HST 2007
CPU: ARM720T [41807202] revision 2 (ARMv4T), cr=0000217f
Machine: Cirrus Logic 7212/7312
Warning: bad configuration page, trying to continue
Ignoring unrecognised tag 0x00000000
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists.  Total pages: 4064
Kernel command line: console=ttyCL0 root=/dev/hda3 ro
Trying to install interrupt handler for IRQ4                                                                                                                                 
Trying to install interrupt handler for IRQ5
Trying to install interrupt handler for IRQ6
Trying to install interrupt handler for IRQ7
Trying to install interrupt handler for IRQ8
Trying to install interrupt handler for IRQ9
Trying to install interrupt handler for IRQ10
Trying to install interrupt handler for IRQ11
Trying to install interrupt handler for IRQ12
Trying to install interrupt handler for IRQ13
Trying to install interrupt handler for IRQ14
Trying to install interrupt handler for IRQ15
Trying to install interrupt handler for IRQ16
Trying to install interrupt handler for IRQ17
Trying to install interrupt handler for IRQ18
Trying to install interrupt handler for IRQ28
Trying to install interrupt handler for IRQ29
PID hash table entries: 64 (order: 6, 256 bytes)
start_kernel(): bug: interrupts were enabled early
Console: colour dummy device 80x30
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory: 16MB = 16MB total
Memory: 14828KB available (1072K code, 238K data, 64K init)
Security Framework v1.0.0 initialized
Capability LSM initialized
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
SCSI subsystem initialized
io scheduler noop registered
io scheduler deadline registered (default)
Serial: CLPS711x driver $Revision: 1.42 $
ttyCL0 at I/O 0x100 (irq = 12) is a CLPS711x
ttyCL1 at I/O 0x1100 (irq = 28) is a CLPS711x
loop: loaded (max 8 devices)
mice: PS/2 mouse device common for all mice
VFS: Cannot open root device "hda3" or unknown-block(0,0)
Please append a correct "root=" boot option
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

*claps*

Now I just need to add the IDE support to the 2.6 kernel, which should be trivial

Offline judb

  • Administrator
  • Veteran.
  • *****
  • Posts: 1329
  • ph4t l3wtz
Re: Replacement Boot Loader
« Reply #2 on: April 02, 2007, 01:48:00 pm »
sam FTW!  This is really cool indeed!

(for anyone that doesn't realize what Sam is up to, we could change the partition layout a little bit and ditch the whole ramdisk concept which would free up more physical RAM on the system.  That my help with caching / playback of large files and keep your drives from spinning as much.  Thats just the first thing that pops to mind.)

Offline sbingner

  • Administrator
  • Veteran.
  • *****
  • Posts: 1301
Re: Replacement Boot Loader
« Reply #3 on: April 02, 2007, 05:56:52 pm »
Well.. there's a tree of a working u-boot on the phatos sourceforge SVN repository now... and a tree of the 2.6 kernel I've been working with, but while enabling IDE was rather trivial.... I now get kernel panics as soon as it tries to access the IDE I/O ports.  *sigh*

Tempted to just update the 2.4 to do that, but I want 2.6 for the optomizations and JFFS2

Offline sbingner

  • Administrator
  • Veteran.
  • *****
  • Posts: 1301
Re: Replacement Boot Loader
« Reply #4 on: April 28, 2007, 06:52:50 am »
Code: [Select]
DRAM:  16 MB
Flash: 16 MB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Hit any key to stop autoboot:  0

Reset IDE: Bus 0: OK
  Device 0: Model: PhatNoise DMS 20GB Firm: M1.42 E  Ser#: 35563208 T
            Type: Hard Disk
            Capacity: 19077.1 MB = 18.6 GB (39070080 x 512)
reading uImage26

1486264 bytes read
## Booting image at c0400000 ...
   Image Name:   Linux Kernel Image
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1486200 Bytes =  1.4 MB
   Load Address: c0028000
   Entry Point:  c0028000
   Verifying Checksum ... OK
OK

Starting kernel ...

Linux version 2.6.20.4-crypt1 (root@agiel.bingner.com) (gcc version 3.4.3) #46 Fri Apr 27 20:50:03 HST 2007
CPU: ARM720T [41807202] revision 2 (ARMv4T), cr=0000217b
Machine: Cirrus Logic 7212/7312
Warning: bad configuration page, trying to continue
Ignoring unrecognised tag 0x00000000
Memory policy: ECC disabled, Data cache buffered
Built 1 zonelists.  Total pages: 4064
Kernel command line: console=ttyCL0 root=/dev/hda3 ro
Trying to install interrupt handler for IRQ0
Trying to install interrupt handler for IRQ1
Trying to install interrupt handler for IRQ2
Trying to install interrupt handler for IRQ3
Trying to install interrupt handler for IRQ4
Trying to install interrupt handler for IRQ5
Trying to install interrupt handler for IRQ6
Trying to install interrupt handler for IRQ7
Trying to install interrupt handler for IRQ8
Trying to install interrupt handler for IRQ9
Trying to install interrupt handler for IRQ10
Trying to install interrupt handler for IRQ11
Trying to install interrupt handler for IRQ12
Trying to install interrupt handler for IRQ13
Trying to install interrupt handler for IRQ14
Trying to install interrupt handler for IRQ15
Trying to install interrupt handler for IRQ16
Trying to install interrupt handler for IRQ17
Trying to install interrupt handler for IRQ18
Trying to install interrupt handler for IRQ28
Trying to install interrupt handler for IRQ29
PID hash table entries: 64 (order: 6, 256 bytes)
start_kernel(): bug: interrupts were enabled early
Console: colour dummy device 80x30
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory: 16MB = 16MB total
Memory: 14572KB available (1300K code, 260K data, 68K init)
Security Framework v1.0.0 initialized
Capability LSM initialized
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
SCSI subsystem initialized
io scheduler noop registered
io scheduler deadline registered (default)
Serial: CLPS711x driver $Revision: 1.42 $
ttyCL0 at I/O 0x100 (irq = 12) is a CLPS711x
ttyCL1 at I/O 0x1100 (irq = 28) is a CLPS711x
loop: loaded (max 8 devices)
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
hda: PhatNoise DMS 20GB, ATA DISK drive
ide0 at 0xc1800000-0xc1800007,0xc180000e on irq 6
hda: max request size: 128KiB
hda: 39070080 sectors (20003 MB), CHS=38760/16/63
hda: cache flushes supported
 hda: hda1 hda2 hda3 hda4 < hda5 >
mice: PS/2 mouse device common for all mice
VFS: Mounted root (ext2 filesystem) readonly.
Freeing init memory: 68K
INIT: version 2.86 booting
INIT: Entering runlevel: 1
INIT: Id "p" respawning too fast: disabled for 5 minutes

It's a start, apparently phatd/51d don't particularly like 2.6 kernels...

Offline sbingner

  • Administrator
  • Veteran.
  • *****
  • Posts: 1301
Re: Replacement Boot Loader
« Reply #5 on: May 01, 2007, 10:10:19 am »
Code: [Select]
[root@phatbox dos]# mount
/dev/hda3 on / type ext3 (rw,data=ordered)
proc on /proc type proc (rw)
devpts on /dev/pts type devpts (rw)
tmpfs on /tmp type tmpfs (rw)
/dev/hda1 on /dos type vfat (rw,fmask=0022,dmask=0022,codepage=cp437,iocharset=ascii)
/dev/hda5 on /dos/Data type vfat (rw,fmask=0022,dmask=0022,codepage=cp437,iocharset=ascii)
[root@phatbox dos]# uname -a
Linux phatbox 2.6.21.1-crypt1 #132 Mon Apr 30 22:53:57 HST 2007 armv4tl unknown
[root@phatbox dos]# free
              total         used         free       shared      buffers
  Mem:        14440         4400        10040            0          628
 Swap:        16376            0        16376
Total:        30816         4400        26416
[root@phatbox dos]#

Yay, it's working... now we just need a replacement or a hacked version of phatd that runs on it lol...  for now I have my 51d emulator keeping it from rebooting at least :)