Re: [OpenWrt-Devel] MTD rework
On 2010-05-03 1:27 AM, Bernhard Loos wrote: Ok, I did split the patch in two parts. The first one introduces libmtd.c and moves the mtd open/close functions there and the second one contains the rest of the rework. The second patch is still rather big, but it's not so easy to separate it further, so I would like to avoid it, if possible. This also fixes a small problem on the wrt160nl. Haven't reviewed all of it yet, but I did notice something in the first patch. You add the following line to trx_fixup(): + trx-len = block-info.erasesize; Wouldn't this break broadcom? Where has this been tested? - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] MTD rework
Olmari from irc tested it, but I don't remember, which device he had. But I don't see, how this could be a problem. The bootloader only calculates the crc over trx-len, which gets also fixed up. I don't think he runs any additional checks or uses the value in some way The only place I know of, where len actually matters is during flashing with the original firmware, which complains if the filesize and the trx len values are different. Bernhard 2010/5/3 Felix Fietkau n...@openwrt.org: On 2010-05-03 1:27 AM, Bernhard Loos wrote: Ok, I did split the patch in two parts. The first one introduces libmtd.c and moves the mtd open/close functions there and the second one contains the rest of the rework. The second patch is still rather big, but it's not so easy to separate it further, so I would like to avoid it, if possible. This also fixes a small problem on the wrt160nl. Haven't reviewed all of it yet, but I did notice something in the first patch. You add the following line to trx_fixup(): + trx-len = block-info.erasesize; Wouldn't this break broadcom? Where has this been tested? - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] MTD rework
Hello While trying to add a crc fixup similiar to the one for the wrt160nl to the ar525w, I stumbled over a number of problems in the mtd code. Primarily, the current system will not work with sysupgrade. Also, it's pretty hard to add new fixups and there are a number of devices which could use them, for example some brcm63xx devices. I created an easy-to-extend system for the fixups and and did a general cleanup of the mtd code, removing a lot of code duplication in the process. The functions, that operate on the actual mtd device are now in their own file and have a reasonable clean interface. Bernhard mtd.diff Description: Binary data ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] MTD rework
On 2010-04-30 6:45 PM, Bernhard Loos wrote: Hello While trying to add a crc fixup similiar to the one for the wrt160nl to the ar525w, I stumbled over a number of problems in the mtd code. Primarily, the current system will not work with sysupgrade. Also, it's pretty hard to add new fixups and there are a number of devices which could use them, for example some brcm63xx devices. I created an easy-to-extend system for the fixups and and did a general cleanup of the mtd code, removing a lot of code duplication in the process. The functions, that operate on the actual mtd device are now in their own file and have a reasonable clean interface. I'll take a look at this soon-ish. It would be very helpful to the review process, if you could split up your patches in the future, instead of mashing together a large chunk of different changes into one single patch. - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] MTD rework
I tried to, but it didn't work out very well in the first version of the patch. It should be easier in the current version, but I kinda forgot about it, sorry. Bernhard 2010/4/30 Felix Fietkau n...@openwrt.org: On 2010-04-30 6:45 PM, Bernhard Loos wrote: Hello While trying to add a crc fixup similiar to the one for the wrt160nl to the ar525w, I stumbled over a number of problems in the mtd code. Primarily, the current system will not work with sysupgrade. Also, it's pretty hard to add new fixups and there are a number of devices which could use them, for example some brcm63xx devices. I created an easy-to-extend system for the fixups and and did a general cleanup of the mtd code, removing a lot of code duplication in the process. The functions, that operate on the actual mtd device are now in their own file and have a reasonable clean interface. I'll take a look at this soon-ish. It would be very helpful to the review process, if you could split up your patches in the future, instead of mashing together a large chunk of different changes into one single patch. - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel