Page 1 of 1
Issue with Linux installation on fit-PC2i
Posted: Wed Feb 10, 2010 6:38 am
by chutz
Hi, I just got my fit-pc2i and I am trying to install gentoo on it, but I can't seem to get any livecd to recognize the hard drive, both the gentoo minimal CD and the Ubuntu 9.10 livecd's only see the internal flash, but not the HDD. The copy of Ubuntu that came on the hard drive seems to work alright with the internal hard drive.
Loading pata-sch only makes the flash drive available, not the HDD.
Re: fit-pc2i HDD on Linux
Posted: Wed Feb 10, 2010 2:11 pm
by Denis
Hi,
fit-PC2i rev 1.1 requires patch for slave HDD detection
Code: Select all
--- a/drivers/ata/pata_sch.c 2009-09-10 01:13:59.000000000 +0300
+++ b/drivers/ata/pata_sch.c 2010-02-10 14:05:21.000000000 +0200
@@ -75,11 +75,53 @@
ATA_BMDMA_SHT(DRV_NAME),
};
+/**
+ * sch_tf_read - input device's ATA taskfile shadow registers
+ * @ap: Port from which input is read
+ * @tf: ATA taskfile register set for storing input
+ *
+ * Note: Original code is ata_sff_tf_read().
+ */
+
+static void sch_tf_read (struct ata_port *ap, struct ata_taskfile *tf)
+{
+ struct ata_ioports *ioaddr = &ap->ioaddr;
+ int i;
+
+ tf->command = ata_sff_check_status(ap);
+ tf->feature = ioread8(ioaddr->error_addr);
+
+ /* FIX */
+ if (tf->feature == 0x81)
+ tf->feature = 0x1;
+
+ tf->nsect = ioread8(ioaddr->nsect_addr);
+ tf->lbal = ioread8(ioaddr->lbal_addr);
+ tf->lbam = ioread8(ioaddr->lbam_addr);
+ tf->lbah = ioread8(ioaddr->lbah_addr);
+ tf->device = ioread8(ioaddr->device_addr);
+ if (tf->flags & ATA_TFLAG_LBA48) {
+ if (likely(ioaddr->ctl_addr)) {
+ iowrite8(tf->ctl | ATA_HOB, ioaddr->ctl_addr);
+ tf->hob_feature = ioread8(ioaddr->error_addr);
+ tf->hob_feature = ioread8(ioaddr->error_addr);
+ tf->hob_nsect = ioread8(ioaddr->nsect_addr);
+ tf->hob_lbal = ioread8(ioaddr->lbal_addr);
+ tf->hob_lbam = ioread8(ioaddr->lbam_addr);
+ tf->hob_lbah = ioread8(ioaddr->lbah_addr);
+ iowrite8(tf->ctl, ioaddr->ctl_addr);
+ ap->last_ctl = tf->ctl;
+ } else
+ WARN_ON(1);
+ }
+}
+
static struct ata_port_operations sch_pata_ops = {
.inherits = &ata_bmdma_port_ops,
.cable_detect = ata_cable_unknown,
.set_piomode = sch_set_piomode,
.set_dmamode = sch_set_dmamode,
+ .sff_tf_read = sch_tf_read,
};
static struct ata_port_info sch_port_info = {
Re: fit-pc2i HDD on Linux
Posted: Thu Feb 11, 2010 8:29 pm
by chutz
Thanks, it works fine with that patch.
Are there any plans to push this patch upstream to the vanilla kernel?
Re: fit-pc2i HDD on Linux
Posted: Sun Feb 14, 2010 12:24 pm
by Denis
It will be fixed in the next HW revision of fitPC2i, it is not Linux kernel problem.
BTW slave disk detection works fine in Windows on current revision because of different detection procedure.
Re: fit-pc2i HDD on Linux
Posted: Mon Feb 15, 2010 9:12 pm
by chutz
It's still a problem for people with the pilot run of fit-PC2i machines, so having the support in the vanilla kernel is still desirable (unless this can be fixed in BIOS?).
Would you have any objections to someone else sending this patch upstream?
Re: fit-pc2i HDD on Linux
Posted: Tue Feb 16, 2010 3:37 pm
by Denis
No, we have no plans to send this patch upstream.
If you want to use some non-Ubuntu distribution - you will need to apply this patch manually and recompile the kernel. Our preinstalled Ubuntu has this patch.
Re: Issue with Linux installation on fit-PC2i
Posted: Mon Mar 08, 2010 3:02 pm
by Mnemonic
How can I apply this patch when booting on a live cd ex: Ubuntu Desktop 9.10?
Re: Issue with Linux installation on fit-PC2i
Posted: Fri Apr 09, 2010 3:01 pm
by axcoco
The thing is that dont really care about detection because we can mount the HDD in fstab and then do a mount /dev/sdb1 /media/hdd
Detection is needed with cd installation but we cant apply this patch
So this is useless for me. Still cant find any solution to install ubuntu server to HDD...
Re: fit-pc2i HDD on Linux
Posted: Wed Jun 02, 2010 9:38 pm
by johan
Denis wrote:It will be fixed in the next HW revision of fitPC2i, it is not Linux kernel problem.
BTW slave disk detection works fine in Windows on current revision because of different detection procedure.
I am a bit confused about this answer. You say its a hardware problem that will be fixed in the next HW revision, yet windows can detect it correctly? How can it then be a hardware problem? And how can a patch on the linux kernel make it work?
I got a fit pc2i with this problem. I ordered the diskless, wanting to install debian on it using pxe. I am guessing I will need to deploy a different strategy now.
-J