Some firmware versions on cell don't allow setting the kernel command line via nvram and the firmware user interface to set it is not officially supported. If we encounter the broken command line, we change it to the values that we expect to be correct and warn the user that they should upgrade the firmware. This patch is not for inclusion in an official kernel but only provided for information purposes. Signed-off-by: Arnd Bergmann Index: linux-2.6.16-rc/arch/powerpc/platforms/cell/setup.c =================================================================== --- linux-2.6.16-rc.orig/arch/powerpc/platforms/cell/setup.c +++ linux-2.6.16-rc/arch/powerpc/platforms/cell/setup.c @@ -142,11 +142,42 @@ static void cell_progress(char *s, unsig printk("*** %04x : %s\n", hex, s ? s : ""); } +static void fixup_cmdline(char *cmd) +{ + char *c; + int fixup = 0; + c = strstr(cmd, "console=rtas0"); + if (c) { + strncpy (c, "console=hvc0 ", 13); + printk(KERN_WARNING "WARNING: outdated console setting: " + "rtas0, use hvc0 instead\n"); + fixup = 1; + } + c = strstr(cmd, "console=bogus0"); + if (c) { + strncpy (c, "console=hvc0 ", 14); + printk(KERN_WARNING "WARNING: outdated console setting: " + "bogus0, use hvc0 instead\n"); + fixup = 1; + } + c = strstr(cmd, "root=/dev/hde"); + if (c) { + strncpy (c, "root=/dev/hda", 13); + printk(KERN_WARNING "WARNING: outdated root dev setting: " + "use 'hda' instead of 'hde'\n"); + fixup = 1; + } + + WARN_ON(fixup); +} + static void __init cell_setup_arch(void) { ppc_md.init_IRQ = iic_init_IRQ; ppc_md.get_irq = iic_get_irq; + fixup_cmdline(cmd_line); + #ifdef CONFIG_SMP smp_init_cell(); #endif Index: linux-2.6.16-rc/drivers/ide/pci/aec62xx.c =================================================================== --- linux-2.6.16-rc.orig/drivers/ide/pci/aec62xx.c +++ linux-2.6.16-rc/drivers/ide/pci/aec62xx.c @@ -352,7 +352,7 @@ static ide_pci_device_t aec62xx_chipsets .channels = 2, .autodma = AUTODMA, .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}}, - .bootable = OFF_BOARD, + .bootable = ON_BOARD, },{ /* 1 */ .name = "AEC6260", .init_setup = init_setup_aec62xx, @@ -361,7 +361,7 @@ static ide_pci_device_t aec62xx_chipsets .init_dma = init_dma_aec62xx, .channels = 2, .autodma = NOAUTODMA, - .bootable = OFF_BOARD, + .bootable = ON_BOARD, },{ /* 2 */ .name = "AEC6260R", .init_setup = init_setup_aec62xx, @@ -380,7 +380,7 @@ static ide_pci_device_t aec62xx_chipsets .init_dma = init_dma_aec62xx, .channels = 2, .autodma = AUTODMA, - .bootable = OFF_BOARD, + .bootable = ON_BOARD, },{ /* 4 */ .name = "AEC6X80R", .init_setup = init_setup_aec6x80, @@ -390,7 +390,7 @@ static ide_pci_device_t aec62xx_chipsets .channels = 2, .autodma = AUTODMA, .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}}, - .bootable = OFF_BOARD, + .bootable = ON_BOARD, } }; --