Simplified initrd on flash/ROM.
Bjorn Eriksson
mdeans at algonet.se
Wed Aug 2 14:07:16 EDT 2000
Does anyone know why I'm not allowed to call ioremap() in
i386/kernel/setup.c:setup_arch()? It fails with the message 'kmem_alloc:
NULL ptr (name=unknown)' when __ioremap() calls get_vm_area(size).
I'm trying to instruct rd.c to read an initrd directly from my ROM which
I've mapped directly above RAM on my hardware. I've got 16MB RAM @ 0-15MB
and 1MB ROM @ 16MB. The actual code is: (BE_EMBEDDED_DEVICE is #defined)
#ifdef CONFIG_BLK_DEV_INITRD
#if defined(BE_EMBEDDED_DEVICE)
initrd_start = ioremap(EPROM_start+ROMDISK_start,
EPROM_size-ROMDISK_start); //remap ~ 1MB @ 16MB
initrd_end = initrd_start+EPROM_size-ROMDISK_start;
#else
if (LOADER_TYPE) {
initrd_start = INITRD_START ? INITRD_START + PAGE_OFFSET : 0;
initrd_end = initrd_start+INITRD_SIZE;
if (initrd_end > memory_end) {
printk("initrd extends beyond end of memory "
"(0x%08lx > 0x%08lx)\ndisabling initrd\n",
initrd_end,memory_end);
initrd_start = 0;
}
}
#endif
#endif
I'm trying to simplify my initrd set-up a bit. The old code was distinctly
trial n' error using ROM disk - rom.c (O.Xymoron's modified loop.c I've
modified to work in 2.2.x). I'd rather use simple initrd support with gzip
compression.
//Björnen.
To unsubscribe, send "unsubscribe mtd" to majordomo at infradead.org
More information about the linux-mtd
mailing list