[PR]100万円が無料で当たる!:今すぐ応募して現金を当てよう!


LibrettoL1 Fedora Core1にKernel-2.6

LibrettoL1のFedora Core1へKernel-2.6をインストールした時の手順をまとめたものです。

・LibrettoL1 Fedora Core1へKernel-2.6インストール準備

まずは、インストールに必要なファイルを前もってダウンロードする。
ダウンロードしたファイルは、/tmpディレクトリに配置されているものとする。

ファイル名
ダウンロード元
linux-2.6.6.tar.bz2
http://www.kernel.org/  

・Kernel-2.6.6 Install

linux-2.6.6ソースを展開する。

                                                                                         
  # cd /usr/src
  # tar jxf /tmp/linux-2.6.6.tar.bz2


リブートが行えるように drivers/usb/host/ohci-hcd.c へ修正を行う。

                                                                                         
static int hc_start (struct ohci_hcd *ohci)
{
#ifdef  NOLIBRETTOL1
        u32                     mask, tmp;
#else
        u32                     mask;
#endif
        struct usb_device       *udev;
        struct usb_bus          *bus;

        spin_lock_init (&ohci->lock);
        disable (ohci);

        /* Tell the controller where the control and bulk lists are
         * The lists are empty now. */
        writel (0, &ohci->regs->ed_controlhead);
        writel (0, &ohci->regs->ed_bulkhead);

        /* a reset clears this */
        writel ((u32) ohci->hcca_dma, &ohci->regs->hcca);

        /* force default fmInterval (we won't adjust it); init thresholds
         * for last FS and LS packets, reserve 90% for periodic.
         */
        writel ((((6 * (FI - 210)) / 7) << 16) | FI, &ohci->regs->fminterval);
        writel (((9 * FI) / 10) & 0x3fff, &ohci->regs->periodicstart);
        writel (LSTHRESH, &ohci->regs->lsthresh);

        /* some OHCI implementations are finicky about how they init.
         * bogus values here mean not even enumeration could work.
         */
        if ((readl (&ohci->regs->fminterval) & 0x3fff0000) == 0
                        || !readl (&ohci->regs->periodicstart)) {
                ohci_err (ohci, "init err\n");
                return -EOVERFLOW;
        }

        /* start controller operations */
        ohci->hc_control &= OHCI_CTRL_RWC;
        ohci->hc_control |= OHCI_CONTROL_INIT | OHCI_USB_OPER;
        writel (ohci->hc_control, &ohci->regs->control);
        ohci->hcd.state = USB_STATE_RUNNING;

        /* Choose the interrupts we care about now, others later on demand */
        mask = OHCI_INTR_MIE | OHCI_INTR_UE | OHCI_INTR_WDH;
        writel (mask, &ohci->regs->intrstatus);
        writel (mask, &ohci->regs->intrenable);

#ifdef  NOLIBRETTOL1
        /* handle root hub init quirks ... */
        tmp = roothub_a (ohci);
        tmp &= ~(RH_A_PSM | RH_A_OCPM);
        if (ohci->flags & OHCI_QUIRK_SUPERIO) {
                /* NSC 87560 and maybe others */
                tmp |= RH_A_NOCP;
                tmp &= ~(RH_A_POTPGT | RH_A_NPS);
        } else if (power_switching) {
                /* act like most external hubs:  use per-port power
                 * switching and overcurrent reporting.
                 */
                tmp &= ~(RH_A_NPS | RH_A_NOCP);
                tmp |= RH_A_PSM | RH_A_OCPM;
        } else {
                /* hub power always on; required for AMD-756 and some
                 * Mac platforms.  ganged overcurrent reporting, if any.
                 */
                tmp |= RH_A_NPS;
        }
        writel (tmp, &ohci->regs->roothub.a);
        writel (RH_HS_LPSC, &ohci->regs->roothub.status);
        writel (power_switching ? RH_B_PPCM : 0, &ohci->regs->roothub.b);
#endif
        // flush those pci writes


ieee1394用パッチを当てる。

                                                                                         
ieee1394は以下の設定を行う事でカーネル標準のドライバで動作する。

WinXP コントロールパネルの「東芝HWセットアップ」にある「デバイスの設定」を「全デバイス設定」へ
変更し「適用」or「OK」ボタンを押す。
電源投入時ESCを押し続けた後にF1キーを押すことでデフォルト設定に戻ります。
この設定を行えない場合は、以下のパッチを当てること。


詳細は「Redhat8.0 ieee1394」を参照。
利用するパッチファイルはこれ
必要なパッチを当てた後カーネルを作成する。

                                                                                         
  # ln -s linux-2.6.6 linux
  # cd /usr/src/linux

  drivers/usb/host/ohci-hcd.cへパッチを当てる。

  # zcat 1394_2606.difi.gz | patch -p1
  # make mrproper
  # make menuconfig
  # make bzImage
  # cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.6  
  # make modules
  # make modules_install
  # cp System.map /boot/System.map-2.6.6
  # mkinitrd -f /boot/initrd-2.6.6.img 2.6.6

USBドライバとSoundドライバは、Kernelの中へ取り込むよう設定する。
USBのohci-hcdドライバをモジュール化する場合は、/etc/modules.confのalias usb-controller usb-ohciをコメント化しalias usb-controller ohci-hcdを追加する事。

/boot/grub/grub.confを修正しkernel-2.6.6にて起動可能とする。

                                                                                         
default=1
timeout=10
splashimage=(hd0,6)/grub/splash.xpm.gz
title Windows 98/XP
	rootnoverify (hd0,0)
	chainloader +1
title Fedora Core (2.6.6)
	root (hd0,6)
	kernel /vmlinuz-2.6.6 ro root=LABEL=/ acpi=on rhgb vga=0x405
	initrd /initrd-2.6.6.img
title Fedora Core (2.4.22-1.2174.nptl)
	root (hd0,6)
	kernel /vmlinuz-2.4.22-1.2174.nptl ro root=LABEL=/ hde=ide-scsi acpi=on rhgb vga=0x405
	initrd /initrd-2.4.22-1.2174.nptl.img



2004/05/17更新

[PR]話題の新車を無料プレゼント中:必ず当る抽選会!今すぐ応募で簡単GET