Hi! The UBI is working right - indeed. Thanks for the hint of the bad block table. I'll have a look at it. The background for this is the update routine [0], which does the following:
----------------------- memset(&opts, 0, sizeof(opts)); opts.offset = destAddr; opts.length = rootfs_size; opts.jffs2 = 1; opts.quiet = 0; printf("erasing 0xx size 0xxn",destAddr, rootfs_size); ret = nand_erase_opts(&nand_info[0], &opts); .. and then writes the image ... ret = nand_write_skip_bad(&nand_info[0], destAddr, &srcLen64, (u_char *)srcAddr); ----------------------- With the current development state, I use a usb memory stick for the rootfs (formatted with f2fs). Yesterday I tried the following: - Built a image via "make". - Then moved the lede-lantiq-xrx200-VGV952CJW33-ubifs-fullimage-ubinized.bin as fullimage.img to my tftp server. - Switched off the Easybox - Held the reset button while switched on the device. - The update routine starts: It loads the fullimage.img from the server and updates the rootfs and kernel section. The rootfs section is crap (of course - this is the reason of my help mail). But at least the kernel boots and I point the rootfs to /dev/sda3 so LEDE starts booting. My goal was to have people running this firmware without the need of a serial cable. > Vitaly Chekryzhev send patch to add MDIO support to the rtl8367b used by > the 904 [0]. This patch wasn't merged since it caused issues. My last > update about this was that he is going to fix the issues and will send a > new patch. I'm also in touch with vitaly lately to test the current staging tree (was successful, but not incorporated in my tree yet). I hope this merge would be soon active. > Long story short, I got the following working: > - LAN > - ethernet WAN (the DSL port is ethernet and dsl at the same time) > - LEDs > - Buttons > - Flash without bad block support > - usb port on the back > - ram boot u-boot for recovery Thanks for your work, I if I found your work earlier I would be faster by port LEDE to the device =) I also have some things done (in parallel of your work): - LAN - ethernet WAN (the DSL port is ethernet and dsl at the same time) - LEDs - usb port on the back (and the upper one) - Telephony via Asterix (analogue ports ready) - Display as framebuffer, see it in action (LCD4Linux) [1] - Touchpad as input device WLAN is really missing. No open source driver - not wlan. But it is no use case for me, so I resigned to it. Here's my work [2]. [0] https://github.com/uwehermann/easybox-904-xdsl-firmware/blob/master/package/infineon-utilities/feeds/ifx_feeds_uboot/open_uboot/src.904dsl/common/upgrade.c#L130 [1] http://picpaste.de/pics/EB904.1488320671.JPG [2] https://github.com/Quallenauge/Easybox-904-XDSL Best regards, Quallenauge > -----Ursprüngliche Nachricht----- > Von: Mathias Kresin > Gesendet: Do. 09.03.2017 08:34 > An: hams...@freenet.de, lede-dev@lists.infradead.org > Betreff: Re: [LEDE-DEV] NAND JFFS2 question > > 08.03.2017 23:01, hams...@freenet.de: > > Hi! > > > > I currently work to assembly a fullimage.img for the Easybox 904xdsl. > > Actually there are some differences to upstream made by the vendor. > > I take over some code and now I'm able to update the firmware, or at > > least the kernel via the recovery method within the uboot. > > > > As I wrote, the kernel and also the rootfs is flashed without errors. > > When I try to boot the image, or mount the partition it is not possible > > due some strange ECC errors. > > > > So I did some investigations: When I boot into the target system > > via sdcard as rootfs and then I perform a > > > > ------------------------------------------------------------------------ > > flash_eraseall /dev/mtd1 > > nand_write /dev/mtd1 /root/image.jffs2 > > > > mkdir /tmp/disk > > mount -t jffs2 /dev/mtdblock1 /tmp/disk > > ------------------------------------------------------------------------ > > > Using jffs2 on NAND flash isn't the best idea. jffs2 doesn't work that > good with NAND flash. Use ubi instead! > > I worked on the Easybox 904xdsl as well but stopped after realising that: > > - Arcadian decided to use their own bad block table patterns instead of > the ones which are used by the kernel and an unmodified u-boots. Means a > kernel patch is required just for this board. > > - to support the wireless a complete protocol needs to be reverse > engineered and a lot of missing code needs to be added to the rt2x00 driver > > The rt3883 wireless chip of the Easybox 904xdsl is not a usual wireless > chip, it is a full SoC which is supported as own suptarget in LEDE > (ramips/rt3883). In case of the 904 a complete realtime operating system > is uploaded/runs on the rt3883 instead of a "normal" Operating System > like OpenWrt/LEDE. Since it is a full SoC it has subsystems like PCI and > so on. The rt5392 wireless is attached via PCI to the rt3883 SoC. > > The internal ethernet of the rt3883 SoC is connected to the internal > lantiq switch via MDIO/RGMII. The whole communication and configuration > of the rt3883/rt5392 is done via a proprietary protocol, which is based > on ethernet frames. The way the protocol really works is unknown and > there is no support for that protocol in the rt2x00 wireless driver. > > Vitaly Chekryzhev send patch to add MDIO support to the rtl8367b used by > the 904 [0]. This patch wasn't merged since it caused issues. My last > update about this was that he is going to fix the issues and will send a > new patch. > > Long story short, I got the following working: > > - LAN > - ethernet WAN (the DSL port is ethernet and dsl at the same time) > - LEDs > - Buttons > - Flash without bad block support > - usb port on the back > - ram boot u-boot for recovery > > You can find my code at https://github.com/mkresin/lede/tree/904xdsl. > > Feel free to use it or to rebase your work on it. Would be nice if you > publish what you have so far as well. > > Supporting the build in display should be possible. The driver for the > display is in the staging section of the kernel for a while now [1]. > > Mathias > > [0] https://github.com/lede-project/source/pull/537 > [1] > https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/drivers/staging/fbtft?h=linux-4.4.y > > > -----Ursprüngliche Nachricht Ende----- --- https://email.freenet.de/emig/index.html?utm_medium=Text&utm_source=Footersatz&utm_campaign=Footersatz_Sicherheit170207&epid=e9900000699&utm_content=Text Wir garantieren Ihnen verschlüsselte Datenübertragung & Datenspeicherung auf deutschen Servern - E-Mail made in Germany! _______________________________________________ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev