I think is possible, when i run:
chumby:/# hexdump -C /dev/mtdblock0 |grep root
00002bf0: 726f6f74 3d2f6465 762f6d74 64626c6f root=/dev/mtdblo
00002c00: 636b3320 726f6f74 66737479 70653d63 ck3 rootfstype=c
00002c20: 74747953 302c3338 34303020 726f6f74 ttyS0,38400 root
00002c40: 726f6f74 66737479 70653d63 72616d66 rootfstype=cramf
chumby:/# more /proc/mtd
dev: size erasesize name
mtd0: 00100000 00004000 "Boot Loader"
mtd1: 00200000 00004000 "PSP"
mtd2: 00280000 00004000 "Kernel2"
mtd3: 00800000 00004000 "Root Disk2"
mtd4: 00300000 00004000 "Kernel1"
mtd5: 01600000 00004000 "Root Disk1"
mtd6: 01800000 00004000 "Cache"
mtd7: 00080000 00004000 "MSP"
Can i rebuild the loader sources changing in bootloader/setupKernel.c
void
setup_tags(void *parameters, int doUpdateBoot)
{
setup_core_tag(parameters, 4096); /* standard core tag 4k pagesize */
setup_mem_tag(DRAM_BASE, 0x4000000); /* 64Mb */
// setup_mem_tag(DRAM_BASE + 0x8000000, 0x2000000); /* 32Mb at 0x18000000 */
// setup_ramdisk_tag(4096); /* create 4Mb ramdisk */
// setup_initrd2_tag(INITRD_LOAD_ADDRESS, 0x100000); /* 1Mb of compressed data placed 8Mb into memory */
if( doUpdateBoot )
setup_cmdline_tag("console=ttyS0,38400 root=/dev/mtdblock3 rootfstype=cramfs"); /* commandline setting root device */
else
setup_cmdline_tag("console=ttyS0,38400 root=/dev/mtdblock5 rootfstype=cramfs"); /* commandline setting root device */
setup_end_tag(); /* end of tags */
}
to:
void
setup_tags(void *parameters, int doUpdateBoot)
{
setup_core_tag(parameters, 4096); /* standard core tag 4k pagesize */
setup_mem_tag(DRAM_BASE, 0x4000000); /* 64Mb */
// setup_mem_tag(DRAM_BASE + 0x8000000, 0x2000000); /* 32Mb at 0x18000000 */
// setup_ramdisk_tag(4096); /* create 4Mb ramdisk */
// setup_initrd2_tag(INITRD_LOAD_ADDRESS, 0x100000); /* 1Mb of compressed data placed 8Mb into memory */
if( doUpdateBoot )
setup_cmdline_tag("console=ttyS0,38400 root=/dev/sda2 rootfstype=ext3"); /* commandline setting root device */
else
setup_cmdline_tag("console=ttyS0,38400 root=/dev/sda2 rootfstype=ext3"); /* commandline setting root device */
setup_end_tag(); /* end of tags */
}
and then:
dd if=/mnt/usb/bootloader.img of=/dev/mtdblock0 ?
Is necessary a 512 byte align in bootloader.img?
If the bootloader does't works how can i reflash him?
with the iMX21 boot process?
using JTAG?
Best Regards