The subject sentence summarizes it pretty well. I want to take my uClinux image, split the kernel and romfs into two separate files, put it on jffs2 in my flash and get u-boot to load and boot the kernel properly. Sounds easy enough, but I'm clearly missing a bit of info, maybe someone here can help me before I have to read both all of u-boot's source and the uClinux MTD map driver.
Details: 1. Starting point -> standard uClinux build with a combined kernel and romfs (after .bss) image. Image ran through mkimage and then written directly to flash. Start in u-boot via a 'bootm 0xffc20000' command. Of course this works exactly as expected. 2. First step -> erased and changed my flash configuration to jffs2, wrote the combined uImage.bin.gz.uboot file into that filesystem. U-boot commands 'fsload 0x01c00000; bootm 0x01c00000' allows it to boot as expected. This works fine. 3. Next step -> split romfs and kernel out, package them separate and load them separately. I can get the kernel to boot, then panic on lack of init, but I can't seem to figure out the magic sauce to get this to work. Specifically, here's what I did to package the inividual parts: $(ROOTDIR)/u-boot-2012.07/tools/mkimage -A m68k -O linux -T kernel -C gzip -a 0x20000 -e 0x20000 -n "kernel" -d $(IMAGEDIR)/linux.bin.gz /tftpboot/linux.bin.gz.uboot $(ROOTDIR)/u-boot-2012.07/tools/mkimage -A m68k -O linux -T ramdisk -C gzip -n "RomFs" -d $(ROMFSIMG).gz /tftpboot/romfs.bin.gz.uboot Then I tried the obvious commands in u-boot (after getting them to the filesystem), compleate with uboot's output: 5235IWI> fsload 0x01b00000 /linux.bin.gz.uboot ### JFFS2 loading '/linux.bin.gz.uboot' to 0x1b00000 ### JFFS2 load complete: 1368831 bytes loaded to 0x1b00000 5235IWI> ls -rw-r--r-- 11 Mon Jan 28 23:17:54 2013 test.txt -rw-r--r-- 1414220 Tue Jan 29 16:36:18 2013 romfs.img.gz.uboot -rw-r--r-- 1368831 Tue Jan 29 16:32:04 2013 linux.bin.gz.uboot 5235IWI> fsload 0x01d00000 /romfs.img.gz.uboot ### JFFS2 loading '/romfs.img.gz.uboot' to 0x1d00000 ### JFFS2 load complete: 1414220 bytes loaded to 0x1d00000 5235IWI> bootm 0x01b00000 0x01d00000 ## Booting kernel from Legacy Image at 01b00000 ... Image Name: IWI Kernel Image Type: M68K Linux Kernel Image (gzip compressed) Data Size: 1368767 Bytes = 1.3 MiB Load Address: 00020000 Entry Point: 00020000 Verifying Checksum ... OK ## Loading init Ramdisk from Legacy Image at 01d00000 ... Image Name: IWI romfs Image Type: M68K Linux RAMDisk Image (gzip compressed) Data Size: 1414156 Bytes = 1.3 MiB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK Uncompressing Kernel Image ... OK Loading Ramdisk to 01dd8000, end 01f3140c ... OK I totally don't understand how or why u-boot picks the load address it does. I even forced specific load addresses into the image using -a with mkimage, and it still loads it thusly. For the kernel, I tried to change CONFIG_MTD_UCLINUX_EBSS and specify the loading address (tried both where I was loading with fsload and where uboot seemed to load it), but I get a hung kernel with those options. Anyway, I'm sure it's fairly simple since it looks like all the general parts exist, so if someone could point the way I'd really appreciate it. Thanks, - Steve
_______________________________________________ uClinux-dev mailing list uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev