use board serial number from device tree
authorDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 16 Oct 2017 09:59:58 +0000 (11:59 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 16 Oct 2017 09:59:58 +0000 (11:59 +0200)
usb-composite-all.sh

index ecc3938..4593a01 100755 (executable)
@@ -24,7 +24,7 @@ echo 0x0100 > bcdDevice # v1.0.0
 echo 0x0200 > bcdUSB # USB2
 
 mkdir -p strings/0x409
 echo 0x0200 > bcdUSB # USB2
 
 mkdir -p strings/0x409
-echo "deadbeef00000001" > strings/0x409/serialnumber
+echo `cat /proc/device-tree/serial-number` > strings/0x409/serialnumber
 echo `uname -r` > strings/0x409/manufacturer 
 echo `hostname -s` > strings/0x409/product 
 
 echo `uname -r` > strings/0x409/manufacturer 
 echo `hostname -s` > strings/0x409/product