I had to apply the below patch to get Linux 2.2.14 to compile on PPC. With
this tiny patch it compiled fine but there is some trouble booting. If I
boot MacOS and then use the BootX app to boot Linux, all is well, but if I
boot via the BootX extention, Linux hangs during boot at some point between
printing "TCP: Hash tables configured (ehash 131072 bhash 65536)" and
"Starting kswapd v 1.5".
For 2.3.3[5678] at least, the kernel hasn't built. I had a determined go to
get it to build 2.3.38 and found:
- atyfb has two identical copies of function aty_sleep_notify
- various files in arch/ppc/kernel required patches (supplied below in case
they help some people get this fixed.)
Still there was some trouble with the definition of hw_interrupt_type, and
even when I kludged around that I got some undefined symbols in the link.
If LinuxPPC hackers read this list, please don't flame me. I believe it is
possible to get better source for PPC though I don't know where - it
certainly isn't available on the ftp.kernel.org site. But shouldn't at
least stable kernels work? And wouldn't it be a good idea to at least allow
some of us who have platforms other than ix86 try out 2.3.x before it
becomes 2.4.x?
Yours,
Peter
Patch to fix compile error in 2.2.14:
--- cut ---
--- pmac_setup.c~ Tue Jan 4 18:12:12 2000
+++ pmac_setup.c Mon Jan 10 21:40:23 2000
@@ -56,6 +56,7 @@
#include <asm/feature.h>
#include <asm/ide.h>
#include <asm/machdep.h>
+#include <asm/dma.h>
#include "time.h"
#include "local_irq.h"
--- cut ---
Patches to fix some compile errors in 2.3.38:
--- cut ---
--- atyfb.c.orig Mon Jan 10 17:30:29 2000
+++ atyfb.c Mon Jan 10 21:24:56 2000
@@ -4805,98 +4805,6 @@
}
#endif /* CONFIG_PMAC_PBOOK */
-#ifdef CONFIG_PMAC_PBOOK
-/*
- * Save the contents of the frame buffer when we go to sleep,
- * and restore it when we wake up again.
- */
-int
-aty_sleep_notify(struct pmu_sleep_notifier *self, int when)
-{
- struct fb_info_aty *info;
- unsigned int pm;
-
- for (info = first_display; info != NULL; info = info->next) {
- struct fb_fix_screeninfo fix;
- int nb;
-
- atyfb_get_fix(&fix, fg_console, (struct fb_info *)info);
- nb = fb_display[fg_console].var.yres * fix.line_length;
-
- switch (when) {
- case PBOOK_SLEEP_NOW:
- /* Stop accel engine (stop bus mastering) */
- if (info->current_par.accel_flags & FB_ACCELF_TEXT)
- reset_engine(info);
-#if 1
- /* Backup fb content */
- info->save_framebuffer = vmalloc(nb);
- if (info->save_framebuffer)
- memcpy(info->save_framebuffer,
- (void *)info->frame_buffer, nb);
-#endif
- /* Blank display and LCD */
- atyfbcon_blank(VESA_POWERDOWN+1, (struct fb_info *)info);
-
- /* Set chip to "suspend" mode. Note: There's an HW bug in the
- chip which prevents proper resync on wakeup with automatic
- power management, we handle suspend manually using the
- following (weird) sequence described by ATI. Note2:
- We could enable this for all Rage LT Pro chip ids */
- if ((Gx == LG_CHIP_ID) || (Gx == LT_CHIP_ID) || (Gx == LP_CHIP_ID)) {
- pm = aty_ld_le32(POWER_MANAGEMENT, info);
- pm &= ~PWR_MGT_ON;
- aty_st_le32(POWER_MANAGEMENT, pm, info);
- pm = aty_ld_le32(POWER_MANAGEMENT, info);
- pm &= ~(PWR_BLON | AUTO_PWR_UP);
- pm |= SUSPEND_NOW;
- aty_st_le32(POWER_MANAGEMENT, pm, info);
- pm = aty_ld_le32(POWER_MANAGEMENT, info);
- pm |= PWR_MGT_ON;
- aty_st_le32(POWER_MANAGEMENT, pm, info);
- do {
- pm = aty_ld_le32(POWER_MANAGEMENT, info);
- } while ((pm & PWR_MGT_STATUS_MASK) != PWR_MGT_STATUS_SUSPEND);
- mdelay(500);
- }
- break;
- case PBOOK_WAKE:
- /* Wakeup chip */
- if ((Gx == LG_CHIP_ID) || (Gx == LT_CHIP_ID) || (Gx == LP_CHIP_ID)) {
- pm = aty_ld_le32(POWER_MANAGEMENT, info);
- pm &= ~PWR_MGT_ON;
- aty_st_le32(POWER_MANAGEMENT, pm, info);
- pm = aty_ld_le32(POWER_MANAGEMENT, info);
- pm |= (PWR_BLON | AUTO_PWR_UP);
- pm &= ~SUSPEND_NOW;
- aty_st_le32(POWER_MANAGEMENT, pm, info);
- pm = aty_ld_le32(POWER_MANAGEMENT, info);
- pm |= PWR_MGT_ON;
- aty_st_le32(POWER_MANAGEMENT, pm, info);
- do {
- pm = aty_ld_le32(POWER_MANAGEMENT, info);
- } while ((pm & PWR_MGT_STATUS_MASK) != 0);
- mdelay(500);
- }
-#if 1
- /* Restore fb content */
- if (info->save_framebuffer) {
- memcpy((void *)info->frame_buffer,
- info->save_framebuffer, nb);
- vfree(info->save_framebuffer);
- info->save_framebuffer = 0;
- }
-#endif
- /* Restore display */
- atyfb_set_par(&info->current_par, info);
- atyfbcon_blank(0, (struct fb_info *)info);
- break;
- }
- }
- return PBOOK_SLEEP_OK;
-}
-#endif /* CONFIG_PMAC_PBOOK */
-
#ifdef MODULE
int __init init_module(void)
{
--- pci.c.orig Fri Jan 7 17:03:34 2000
+++ pci.c Mon Jan 10 21:34:40 2000
@@ -21,7 +21,7 @@
#include "pci.h"
-static void __init pcibios_claim_resources(struct pci_bus *);
+static void __init pcibios_claim_resources(struct list_head *);
unsigned long isa_io_base = 0;
unsigned long isa_mem_base = 0;
@@ -71,7 +71,7 @@
printk("PCI: Probing PCI hardware\n");
ioport_resource.end = ~0L;
pci_scan_bus(0, &generic_pci_ops, NULL);
- pcibios_claim_resources(pci_root);
+ pcibios_claim_resources(&pci_root_buses);
if ( ppc_md.pcibios_fixup )
ppc_md.pcibios_fixup();
}
--- pmac_nvram.c.orig Mon Jan 10 21:41:35 2000
+++ pmac_nvram.c Mon Jan 10 21:42:59 2000
@@ -10,6 +10,7 @@
#include <asm/io.h>
#include <asm/system.h>
#include <asm/prom.h>
+#include <asm/machdep.h>
#include <linux/adb.h>
#include <linux/pmu.h>
--- cut ---
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sat Jan 15 2000 - 21:00:18 EST