On arduino Yun, the default mtd partitioning require that the kernel be below 1280k. It is actually not possible with the default configuration. What could be shipped in the lede project tree to generate a kernel image with a smaller size ? How to activate and deactivate some kernel options specifically for the arduino Yun ?
I am playing with this for a month but I can't find documentation and the lede-project tree files don't have comments for most of them. Any links to understand how to tweak and integrate a device would be welcome.
But I didn't manage to have a working sysupgrade image. I get "Bad magic number". Now I am a bit stuck, trying to read different Makefile but I don't manage to understand. How to investigate further why the generated sysupgrade image is not working ?
PS: I lost my "Zoha" account and had to create a new one. So Zoha==camille-hack
Your kernel, based on your Device/yun-16m definition, is placed at offset 0xD90000 (13888k) in the image, so the U-Boot cat boot it with bootm 0x9FD90000, not bootm 0x9FDE0000.
The kernel is placed at offset 0xDE0000 (256k + 64k + 13888k = 14208k) if we start from the very beginning of the flash.
With the default lininoOS custom openwrt distribution, the default offset was 0xEA0000 (256k + 64k + 14656k = 14976k) and it was working.
0xD90000 or 13888k, is the ROOTFS_SIZE, and not the kernel offset. The uboot partition and the uboot environment partition should be part of the math somehow.
I just get my calculator out again to check and I must say that I don't get the logic.
Anyway, I just sysupgrade and tried with bootm 0x9FD90000 and bootm 0x9FDE0000 and both returned "Bad Magic Number".
So now the kernel is at 0x050000, at the beginning of the firmware partition by default. Sysupgrade works and I am preparing a commit against the lede project tree. Thanks for your help @pepe2k !
@camille-hack
It's work in Lede git branch v17.0.3 or not sir?
because when I compile target profile to Arduino 16MB it's failed generated *.bin image for arduino yun...