From 37ef3109f366ac0adbd2edf541b8fb8c6bd5af25 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Fri, 6 Apr 2001 23:00:13 +0000 Subject: Initrd fixes from Steven. --- arch/mips/Makefile | 1 - arch/mips/kernel/setup.c | 18 ++++-------------- arch/mips/ld.script.in | 8 ++++++++ arch/mips/philips/nino/Makefile | 2 +- arch/mips/philips/nino/ramdisk/ld.script | 4 +--- 5 files changed, 14 insertions(+), 19 deletions(-) (limited to 'arch/mips') diff --git a/arch/mips/Makefile b/arch/mips/Makefile index a9fc965ee..cbbeca454 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile @@ -284,7 +284,6 @@ archclean: rm -f arch/$(ARCH)/ld.script $(MAKE) -C arch/$(ARCH)/tools clean $(MAKE) -C arch/mips/baget clean - $(MAKE) -C arch/mips/philips/nino clean archmrproper: @$(MAKEBOOT) mrproper diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index bffbd67cf..587adaadd 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c @@ -26,13 +26,9 @@ #include #include #include -#ifdef CONFIG_BLK_DEV_RAM #include -#endif #include -#ifdef CONFIG_RTC #include -#endif #include #include @@ -69,16 +65,16 @@ int EISA_bus = 0; struct screen_info screen_info; -#ifdef CONFIG_BLK_DEV_FD extern struct fd_ops no_fd_ops; struct fd_ops *fd_ops; -#endif #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) extern struct ide_ops no_ide_ops; struct ide_ops *ide_ops; #endif +extern void * __rd_start, * __rd_end; + extern struct rtc_ops no_rtc_ops; struct rtc_ops *rtc_ops; @@ -504,9 +500,6 @@ void __init setup_arch(char **cmdline_p) void momenco_ocelot_setup(void); void nino_setup(void); -#ifdef CONFIG_NINO - extern void * __rd_start, * __rd_end; -#endif unsigned long bootmap_size; unsigned long start_pfn, max_pfn, first_usable_pfn; @@ -697,15 +690,12 @@ void __init setup_arch(char **cmdline_p) /* Reserve the bootmap memory. */ reserve_bootmem(PFN_PHYS(first_usable_pfn), bootmap_size); -#ifdef CONFIG_NINO +#ifdef CONFIG_BLK_DEV_INITRD + /* Board specific code should have set up initrd_start and initrd_end */ ROOT_DEV = MKDEV(RAMDISK_MAJOR, 0); initrd_start = (unsigned long)&__rd_start; initrd_end = (unsigned long)&__rd_end; initrd_below_start_ok = 1; -#endif - -#ifdef CONFIG_BLK_DEV_INITRD - /* Board specific code should have set up initrd_start and initrd_end */ if (initrd_start) { unsigned long initrd_size = ((unsigned char *)initrd_end) - ((unsigned char *)initrd_start); printk("Initial ramdisk at: 0x%p (%lu bytes)\n", diff --git a/arch/mips/ld.script.in b/arch/mips/ld.script.in index 787c96d7a..ca3532669 100644 --- a/arch/mips/ld.script.in +++ b/arch/mips/ld.script.in @@ -77,6 +77,14 @@ SECTIONS { _fdata = . ; *(.data) + + /* Align the initial ramdisk image (INITRD) on page boundaries. */ + . = ALIGN(4096); + __rd_start = .; + *(.initrd) + __rd_end = .; + . = ALIGN(4096); + CONSTRUCTORS } .data1 : { *(.data1) } diff --git a/arch/mips/philips/nino/Makefile b/arch/mips/philips/nino/Makefile index 29ab017c8..ca9716c31 100644 --- a/arch/mips/philips/nino/Makefile +++ b/arch/mips/philips/nino/Makefile @@ -25,7 +25,7 @@ obj-$(CONFIG_BLK_DEV_INITRD) += ramdisk.o ramdisk.o: $(MAKE) -C ramdisk - ln -sf ramdisk/ramdisk.o ramdisk.o + mv ramdisk/ramdisk.o ramdisk.o clean: rm -f *.o diff --git a/arch/mips/philips/nino/ramdisk/ld.script b/arch/mips/philips/nino/ramdisk/ld.script index 87fd81108..a7be3344f 100644 --- a/arch/mips/philips/nino/ramdisk/ld.script +++ b/arch/mips/philips/nino/ramdisk/ld.script @@ -2,10 +2,8 @@ OUTPUT_FORMAT("ecoff-littlemips") OUTPUT_ARCH(mips) SECTIONS { - .data : + .initrd : { - __rd_start = .; *(.data) - __rd_end = .; } } -- cgit v1.2.3