By default 5.4 is used. But if you want to keep 4.14,change trgmii to rgmii in the bpi-r2.dts (i hope i do not get overridden). Normally trgmii on gmac0 and rgmii on gmac1 is right,but driver in 4.14 is buggy and does not setup trgmii right so change to rgmii
If you see dsa-ports like wan and lanX you have switch-driver included.
writes the boot code as ASCII into the image file, including a leading “-en”.
As I see, the option -en has no effect, because also the trailing 0x0a is written to $output.
I used okteta to convert it into binary code and voila, the image starts from sd.
Because I have altered the script for debugging purposed, I copied the original from github.
Same results, the string on 0:0 begins with “-en SDMMC_BOOT\x00\x00\x01” and so on, any null bytes.
I´m running ubuntu 20.04.1 on my system, if that matters.
I also created test.sh like frank-w and get the correct results on my build system.
openwrt is a bit tricky with applying patches…you can try to put it in the patches-5.4 folder…if that leads to a build.error you have to include it the normal way:
btw. i don’t know if shell (you can show it by adding “type /bin/sh” in script) executing the script is the problem…it is only a thought…maybe changing shebang works, maybe not
if script is running inside chroot it is possible that it also does not work if echo is build without the -e support. on my ubuntu 20.4 system i see this:
$ which echo
/usr/bin/echo
$ LANG=C type echo
echo is a shell builtin
so maybe using /usr/bin/echo helps
wonder why ubuntu uses dash
$ which sh
/usr/bin/sh
$ ls -l /usr/bin/sh
lrwxrwxrwx 1 root root 4 Apr 27 13:01 /usr/bin/sh -> dash
i thought it was bash but users having bash by default…
$ grep frank /etc/passwd
frank:x:1000:1000:Frank Wunderlich,,,:/home/frank:/bin/bash
Thanks for your work. For newbies: how to add this patch in openwrt buildroot? Brute force: patching mt7623n-bananapi-bpi-r2.dts?
Post an appropriate patch (adding the patch file to openwrt.git) it to [email protected] or bring it to my attention to do so.
Does it want to go in to 19.07 too?