Re: about mips linux root file system
Qingbo Wu wrote: > >I think if I can use ramdisk using serail port. I do not know >how to combine kernel image with ramdisk root file image. >And where can I get small size root file image for mipsel? >If someone knows, please help me. >Thanks in advance! > There is a way which i use. Take a look at the arch/mips/ld.script linker commandfile. As you can see, you need to create an ELF binary with the ".initrd" section, and link this binary into your kernel. You must put your initial ramdisk into this section. There are ext2fs, romfs, gzipped ext2fs and minixfs ramdisks currently supported. Here is an example with gzipped ramdisk for MIPS linux-2.4.x : NOTE: the 'disk' directory is assumed your root filesystem directory, which you going to be using on your mips 1) First of all, you need the properly MIPS linux kernel: cvs -d :pserver:[EMAIL PROTECTED]:/cvs -z9 co linux 2) Add new target to your specific Makefile (i mean arch/mips//Makefile): ... obj-$(CONFIG_BLK_DEV_INITRD)+= ramdisk.o ... ramdisk.c:ramdisk.bin $(CC) $(CFLAGS) -c -o $@ $< $(OBJCOPY) --add-section=.initrd=ramdisk.bin $@ ... 3) Create the root filesystem gzipped image and copy it to your specific location: # dd if=/dev/zero of=ramdisk bs=1k count=4096 # mke2fs -Fvm0 ramdisk 4096 # mount -o loop ramdisk /tmp/ram # cp -a disk/* /tmp/ram/ # umount /tmp/ram/ # dd if=ramdisk bs=1k count=4096 | gzip -v9 > ramdisk.bin # cp ramdisk.bin linux/arch/mips// 4) Compile the kernel # cd linux # make ... I think that's all Regards. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: about mips linux root file system
Qingbo Wu wrote: I think if I can use ramdisk using serail port. I do not know how to combine kernel image with ramdisk root file image. And where can I get small size root file image for mipsel? If someone knows, please help me. Thanks in advance! There is a way which i use. Take a look at the arch/mips/ld.script linker commandfile. As you can see, you need to create an ELF binary with the .initrd section, and link this binary into your kernel. You must put your initial ramdisk into this section. There are ext2fs, romfs, gzipped ext2fs and minixfs ramdisks currently supported. Here is an example with gzipped ramdisk for MIPS linux-2.4.x : NOTE: the 'disk' directory is assumed your root filesystem directory, which you going to be using on your mips 1) First of all, you need the properly MIPS linux kernel: cvs -d :pserver:[EMAIL PROTECTED]:/cvs -z9 co linux 2) Add new target to your specific Makefile (i mean arch/mips//Makefile): ... obj-$(CONFIG_BLK_DEV_INITRD)+= ramdisk.o ... ramdisk.c:ramdisk.bin $(CC) $(CFLAGS) -c -o $@ $ $(OBJCOPY) --add-section=.initrd=ramdisk.bin $@ ... 3) Create the root filesystem gzipped image and copy it to your specific location: # dd if=/dev/zero of=ramdisk bs=1k count=4096 # mke2fs -Fvm0 ramdisk 4096 # mount -o loop ramdisk /tmp/ram # cp -a disk/* /tmp/ram/ # umount /tmp/ram/ # dd if=ramdisk bs=1k count=4096 | gzip -v9 ramdisk.bin # cp ramdisk.bin linux/arch/mips// 4) Compile the kernel # cd linux # make ... I think that's all Regards. - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
about mips linux root file system
Hi, all, I am new to this mail list. Our university are porting linux to our mips evaluation board. There is no network card and CDROM driver can not work under linux. But we have serail port, I can download our modified kernel to evaluation board, and it can run, stop at mount root file system. I think if I can use ramdisk using serail port. I do not know how to combine kernel image with ramdisk root file image. And where can I get small size root file image for mipsel? If someone knows, please help me. Thanks in advance! Barry - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
about mips linux root file system
Hi, all, I am new to this mail list. Our university are porting linux to our mips evaluation board. There is no network card and CDROM driver can not work under linux. But we have serail port, I can download our modified kernel to evaluation board, and it can run, stop at mount root file system. I think if I can use ramdisk using serail port. I do not know how to combine kernel image with ramdisk root file image. And where can I get small size root file image for mipsel? If someone knows, please help me. Thanks in advance! Barry - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/