Creating a current armbian-Image with network-fix
#8
Hi,

In order to make this a a little more update resistant, you might find the following script useful


Code:
#!/bin/bash DTB_NAME=sun50i-a64-sopine-baseboard.dtb DTB_PATH=/boot/dtb/allwinner TMPFILE=/tmp/tmp.dts NEWFILE=/tmp/new.dts clean_up() {         rm $TMPFILE $NEWFILE > /dev/null 2>&1 } if [ ! -f $DTB_PATH/$DTB_NAME ] then         echo dtb file not found         exit 999 fi dtc -I dtb -O dts -o $TMPFILE $DTB_PATH/$DTB_NAME > /dev/null 2>&1 if [ $? != 0 ] then         echo Cannot extract dts from $DTB_PATH/$DTB_NAME         exit 998 fi retcode=0 grep 'allwinner,tx-delay-ps' $TMPFILE > /dev/null 2>&1 if [ $? != 0 ] then         sed -e '/ethernet@1c30000 {$/,/phandle = <0x88>;/!b;/phandle = <0x88>;/a\\t\t\tallwinner,tx-delay-ps = <500>;' $TMPFILE > $NEWFILE         if [ $? != 0 ]         then                 echo Could not update temporary DTS file                 retcode=997         else                 dtc -O dtb -o $DTB_PATH/$DTB_NAME -b 0 $NEWFILE > /dev/null 2>&1                 if [ $? != 0 ]                 then                         echo Could not create new dts file                         retcode=996                 fi         fi else         echo Fix already in place fi clean_up exit $retcode

This will check whether the supplied update is in place, and, if not, apply it using SED.

How you use this is up to you - perhaps putting a call to it in rc.local... If the card boots, and the fix is not present then it will be applied and all should be well for the next boot.

If you want to test it first on a mounted image, simply adjust the value of DTB_PATH.

I hope that it is found useful, but use as your own risk, no guarantees of any sort etc etc
  Reply


Messages In This Thread
RE: Creating a current armbian-Image with network-fix - by Dippywood - 09-07-2020, 05:01 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Sad Version/Date of last armbian build that came with network patches? Bazmundi 0 2,784 12-07-2023, 03:23 PM
Last Post: Bazmundi
  Clusterboard not getting IP address after network fix Norlark 14 29,263 08-30-2021, 05:00 PM
Last Post: poVoq
  ArchLinux Network Booting xblack86 2 8,996 02-25-2021, 08:42 AM
Last Post: xblack86
  Clusterboard Armbian aww 17 38,476 07-01-2020, 02:40 PM
Last Post: wayward83
  Network problems (actually bad power supply) Unkn0wn 14 31,245 12-01-2019, 10:02 AM
Last Post: venix1
  Armbian Bionic 4.19.y PigLover 1 5,468 02-02-2019, 02:30 PM
Last Post: mdmbc

Forum Jump:


Users browsing this thread: 1 Guest(s)