|
|
 |
Re: Someone knows a way to update kernel from internal linux?
|
I managed to do this.
In my first attempt I destroyed u-boot, so I have to recover the board by sam-ba (it seems that linux version does not works but this is another story) because the kernel (I don't know why) overwrite u-boot mtdparts parameter and mtd1 was mapped in some part of u-boot.
At this point I applied this patch in kernel file:
arch/arm/mach-at91/board-sam9260ek.c
changing definition of ek_nand_partition with this new:
static struct mtd_partition __initdata ek_nand_partition[] = { { .name = "uImage", .offset = 0x00100000, .size = 4 * SZ_1M, }, { .name = "store", .offset = MTDPART_OFS_NXTBLK, .size = MTDPART_SIZ_FULL, }, };
this time I decided to not map u-boot at all.
So I compiled corrected kernel, loaded it with u-boot and than the two commands:
$> flash_eraseall /dev/mtd0 $> nandwrite -p /dev/mtd0 /uImage.2.6.30-gesbc9260-armel
worked as expected.
Last few words... I decide to reserve 4M for kernel instead of 3M and call second mtd as "store" instead of "rootfs".
So if you want to go classic this options should works as in the original board:
static struct mtd_partition __initdata ek_nand_partition[] = { { .name = "uBoot", .offset = 0x00000000, .size = SZ_1M, }, { .name = "uImage", .offset = 0x00100000, .size = 3 * SZ_1M, }, { .name = "rootfs", .offset = MTDPART_OFS_NXTBLK, .size = MTDPART_SIZ_FULL, }, };
with commands:
$> flash_eraseall /dev/mtd1 $> nandwrite -p /dev/mtd1 /uImage.2.6.30-gesbc9260-armel
but i did not tested.
« Last Edit: August 28, 2010, 05:53:59 PM by mimmus »
|