Terry B. Chen
terryc at tyanchina.com
Thu Apr 10 05:02:00 CEST 2003
Thank you for your advice, I did as you say, but the ide_init() failed, do you meet the problem ? or you have change the code?
From: Steve Gehlbach [mailto:steve at nexpath.com]
Sent: 2003年4月10日 13:26
To: Terry B. Chen
Subject: Re: about BOOT_IDE
Terry B. Chen wrote:
> Dear all:
> I decide to elf_boot use BOOT_IDE, because the rom is too small
> to settle a big kernel that support.
> Can some one tell me the usage of the options such as ONE_TRACK and how
> to put the elf to hard disk, I think it must be dangerous, it seem to
> read the sector directly. Someone can teach me a little?
See pcchips787.config in util/config for complete configuration.
This enables booting from IDE, the file to use is linux.bin.gz:
If you do not use drive 0 (default), then you can set which drive to
boot; (0,1,2,3) are the four standard PC drives:
The linux.bin.gz file is put in raw form at partition 1, ie, the first
partition on the disk. This is located just past the partition table.
The partition table size varies, it is "one track" from the beginning of
the disk. "one track" in c/h/s notation is "s" or the number of sectors
per track. ONE_TRACK is in sectors, the software multiplies by 512.
Most disks are 63 sectors per track (the default), but my CF is 32
sectors per track. eg, the partion table is 63x512 or 32x512 bytes.
You can partition your disk as you want, but linux goes raw in partition
1; just make sure partition 1 is big enough, not a problem on today's
disks. You could put the linux root file system on partition 2, for
example. In pcchips787.config, I put the linux root file system on IDE
0, partition 2 (I was experimenting with linux in partition 1), but I
eventually put linux on drive 2 using CF. You are right, copying of
linux.bin.gz raw to the partition is dangerous, and something like "cat
linux.bin.gz > /dev/hda1" will definitely screw the disk if you put the
wrong disk or partition. I recommend a shell script, fingers cannot be
trusted. You can also use "dd" but "cat" works.
More information about the coreboot