2008-04-07 23:33:45 How to update kernel image in linux?
Zhi Qiang Zhang (CHINA)
Message: 53792 Hi,
I want my system can update uclinux image after the uclinux bootup, my system has a usb host(ISP116X) and a IDE cdrom, I want the kernel of my system can be easily upgraed by using a USB-disk or CDROM.
Regards,
ZhangZQ
QuoteReplyEditDelete
2008-04-07 23:44:15 Re: How to update u-boot in linux?
Mike Frysinger (UNITED STATES)
Message: 53793 so setup partition mapping for your flash where things are stored, and then erase/flash the files to the corresponding partitions. mtd-utils provides utilities to erase mtd blocks.
you could also try using the netflash program.
QuoteReplyEditDelete
2008-04-07 23:56:27 Re: How to update u-boot in linux?
Zhi Qiang Zhang (CHINA)
Message: 53795 Mike,
Yes, that is the way. But is there a example program that show how to access flash by directly using CFI?
Regards,
ZhangZQ
QuoteReplyEditDelete
2008-04-08 01:06:44 Re: How to update u-boot in linux?
Mike Frysinger (UNITED STATES)
Message: 53799 that is not how Linux works. you access flash through the MTD layer. the MTD layer takes care of the CFI protocol for you.
QuoteReplyEditDelete
2008-04-08 01:50:18 Re: How to update u-boot in linux?
Zhi Qiang Zhang (CHINA)
Message: 53802 Thanks, but I can't find any documentation about how to use MTD in docs.blackfin.uclinux.org, my system has the 2M bytes nor flash. Can you give me some information about this?
Regards,
ZhangZQ
QuoteReplyEditDelete
2008-04-08 01:59:12 Re: How to update u-boot in linux?
Zhi Qiang Zhang (CHINA)
Message: 53803 how to make my system support partition? I found these code
static struct mtd_partition zzq_partitions[] = {
{
.name = "Bootloader",
.size = 0x40000,
.offset = 0,
}, {
.name = "Kernel",
.size = 0xE0000,
.offset = MTDPART_OFS_APPEND,
}, {
.name = "RootFS",
.size = MTDPART_SIZ_FULL,
.offset = MTDPART_OFS_APPEND,
}
};
static struct physmap_flash_data zzq_flash_data = {
.width = 2,
.parts = zzq_partitions,
.nr_parts = ARRAY_SIZE(zzq_partitions),
};
static struct resource zzq_flash_resource[] = {
{
.name = "cfi_probe",
.start = 0x00000000,
.end = 0x001fffff,
.flags = IORESOURCE_MEM,
}
};
static struct platform_device zzq_flash_device = {
.name = "BF5xx-Flash",
.id = 0,
.dev = {
.platform_data = &zzq_flash_data,
},
.num_resources = ARRAY_SIZE(zzq_flash_resource),
.resource = zzq_flash_resource,
};
is that code supports MTD partition?
Regards,
ZhangZQ
QuoteReplyEditDelete
2008-04-08 02:22:14 Re: How to update u-boot in linux?
Mike Frysinger (UNITED STATES)
Message: 53804 please review:
http://docs.blackfin.uclinux.org/doku.php?id=enabling_jffs2
QuoteReplyEditDelete
2008-04-08 02:22:47 Re: How to update u-boot in linux?
Mike Frysinger (UNITED STATES)
Message: 53805 just look at the documentation for the mtd-utils package:
http://www.linux-mtd.infradead.org/
QuoteReplyEditDelete
2008-04-08 02:59:09 Re: How to update u-boot in linux?
Zhi Qiang Zhang (CHINA)
Message: 53809 Mike,
It seems the MTD partition works well, but I have to verify. Thank you very much!
BF5xx-Flash: probing 16-bit flash bus
BF5xx-Flash: Found 1 x16 devices at 0x0 in 16-bit bank
Amd/Fujitsu Extended Query Table at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
RedBoot partition parsing not available
BF5xx-Flash: Using board partition definition
Creating 3 MTD partitions on "BF5xx-Flash":
0x00000000-0x00040000 : "Bootloader"
0x00040000-0x00120000 : "Kernel"
0x00120000-0x00200000 : "RootFS"
Regards,
ZhangZQ