On Thu, Oct 14, 2010 at 10:58:57PM -0500, W. Michael Petullo wrote: > I have some MTD-related questions about OpenWrt on my WRT160NL. > > /proc/mtd shows the layout of MTD. In my case, > > dev: size erasesize name > mtd0: 00040000 00010000 "u-boot" > mtd1: 00130000 00010000 "kernel" > mtd2: 00670000 00010000 "rootfs" > mtd3: 002f0000 00010000 "rootfs_data" > mtd4: 00010000 00010000 "nvram" > mtd5: 00010000 00010000 "art" > mtd6: 007a0000 00010000 "firmware" > > Where does this come from? That is, is it specific to a device and set > up by the vendor? Or, does OpenWrt influence the layout?
AFAIK it's defined in the running kernel, for the exact bits look at the file: target/linux/ar71xx/files/drivers/mtd/wrt160nl_part.c > How does U-Boot work? For example, I use mtd to write an image to > "firmware." Does OpenWrt build this image in the way that Linksys' > U-Boot configuration expects? Or is U-Boot's configuration rewritten by > the OpenWrt install process? How does U-Boot works? read it somewhere. U-Boot just loads the bits from "kernel" to memory and transfer control to it, after that the Linux kernel takes the control. MTD "partitions" can overlap others, for example "firmware" overlaps over "kernel" + "rootfs", it's just a convenience map. > If I write an image to "firmware" using mtd, then how does "kernel," > "rootfs," etc. get filled? Is this done by U-Boot? U-Boot can write to MTD as a Linux kernel too. > What is "rootfs_data," "nvram" and "art?" NVRAM stores the configuration for the Linksys firmware, OpenWRT doesn't use it except for fetching MAC addresses. ART is where the Atheros Wireless specific EEPROM data resides, like calibration and probably other stuff. - solca _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel