Add bash script for extracting rd1 file with Linux console
authorBrad Griffis <bgriffis@ti.com>
Wed, 9 Jan 2019 17:36:31 +0000 (11:36 -0600)
committerBrad Griffis <bgriffis@ti.com>
Wed, 9 Jan 2019 17:36:31 +0000 (11:36 -0600)
padconf/am57xx-padconf-rd1.sh [new file with mode: 0755]

diff --git a/padconf/am57xx-padconf-rd1.sh b/padconf/am57xx-padconf-rd1.sh
new file mode 100755 (executable)
index 0000000..bc90650
--- /dev/null
@@ -0,0 +1,830 @@
+#!/bin/bash
+today=`date '+%Y-%m-%d_%H%M%S'`;
+OUTPUT_FILE=am57xx-padconf_$today.rd1
+
+id_code=`devmem2 0x4AE0C204 | sed '1d2ds/.*: 0x[0-9a-fA-F]\([0-9a-fA-F]\{3\}\)[0-9a-fA-F]\{4\}/\1/'`
+
+if [ $id_code = "B9B" ]
+then
+       echo "PadConf AM571x" > $OUTPUT_FILE
+
+# Append to file
+while IFS='' read -r line || [[ -n "$line" ]]; do
+    devmem2 $line | sed '1d2ds/.*\s\(0x[0-9a-fA-F]*\)\s.*: \(0x[0-9a-fA-F]*\)*/\1 \2/' >> $OUTPUT_FILE
+done << EOM
+0x4A003400
+0x4A003404
+0x4A003408
+0x4A00340C
+0x4A003410
+0x4A003414
+0x4A003418
+0x4A00341C
+0x4A003420
+0x4A003424
+0x4A003428
+0x4A00342C
+0x4A003430
+0x4A003434
+0x4A003438
+0x4A00343C
+0x4A003440
+0x4A003444
+0x4A003448
+0x4A00344C
+0x4A003450
+0x4A003454
+0x4A003458
+0x4A00345C
+0x4A003460
+0x4A003464
+0x4A003468
+0x4A00346C
+0x4A003470
+0x4A003474
+0x4A003478
+0x4A00347C
+0x4A003480
+0x4A003484
+0x4A003488
+0x4A00348C
+0x4A003490
+0x4A003494
+0x4A003498
+0x4A00349C
+0x4A0034A0
+0x4A0034A4
+0x4A0034A8
+0x4A0034AC
+0x4A0034B0
+0x4A0034B4
+0x4A0034B8
+0x4A0034BC
+0x4A0034C0
+0x4A0034C4
+0x4A0034C8
+0x4A0034CC
+0x4A0034D0
+0x4A0034D4
+0x4A0034D8
+0x4A003554
+0x4A003558
+0x4A00355C
+0x4A003560
+0x4A003564
+0x4A003568
+0x4A00356C
+0x4A003570
+0x4A003574
+0x4A003578
+0x4A00357C
+0x4A003580
+0x4A003584
+0x4A003588
+0x4A00358C
+0x4A003590
+0x4A003594
+0x4A003598
+0x4A00359C
+0x4A0035A0
+0x4A0035A4
+0x4A0035A8
+0x4A0035AC
+0x4A0035B0
+0x4A0035B4
+0x4A0035B8
+0x4A0035BC
+0x4A0035C0
+0x4A0035C4
+0x4A0035C8
+0x4A0035CC
+0x4A0035D0
+0x4A0035D4
+0x4A0035D8
+0x4A0035DC
+0x4A0035E0
+0x4A0035E4
+0x4A0035E8
+0x4A0035EC
+0x4A0035F0
+0x4A0035F4
+0x4A0035F8
+0x4A0035FC
+0x4A003600
+0x4A003604
+0x4A003608
+0x4A00360C
+0x4A003610
+0x4A003614
+0x4A003618
+0x4A00361C
+0x4A003620
+0x4A003624
+0x4A003628
+0x4A00362C
+0x4A003630
+0x4A003634
+0x4A003638
+0x4A00363C
+0x4A003640
+0x4A003644
+0x4A003648
+0x4A00364C
+0x4A003650
+0x4A003654
+0x4A003658
+0x4A00365C
+0x4A003660
+0x4A003664
+0x4A003668
+0x4A00366C
+0x4A003670
+0x4A003674
+0x4A003678
+0x4A00367C
+0x4A003680
+0x4A003684
+0x4A003688
+0x4A00368C
+0x4A003690
+0x4A003694
+0x4A003698
+0x4A00369C
+0x4A0036A0
+0x4A0036A4
+0x4A0036A8
+0x4A0036AC
+0x4A0036B0
+0x4A0036B4
+0x4A0036B8
+0x4A0036BC
+0x4A0036C0
+0x4A0036C4
+0x4A0036C8
+0x4A0036CC
+0x4A0036D0
+0x4A0036D4
+0x4A0036D8
+0x4A0036DC
+0x4A0036E0
+0x4A0036E4
+0x4A0036E8
+0x4A0036EC
+0x4A0036F0
+0x4A0036F4
+0x4A0036F8
+0x4A0036FC
+0x4A003700
+0x4A003704
+0x4A003708
+0x4A00370C
+0x4A003710
+0x4A003714
+0x4A003718
+0x4A00371C
+0x4A003720
+0x4A003724
+0x4A003728
+0x4A00372C
+0x4A003730
+0x4A003734
+0x4A003738
+0x4A00373C
+0x4A003740
+0x4A003744
+0x4A003748
+0x4A00374C
+0x4A003750
+0x4A003754
+0x4A003758
+0x4A00375C
+0x4A003760
+0x4A003764
+0x4A003768
+0x4A00376C
+0x4A003770
+0x4A003774
+0x4A003778
+0x4A00377C
+0x4A003780
+0x4A003784
+0x4A003788
+0x4A00378C
+0x4A003790
+0x4A003794
+0x4A003798
+0x4A00379C
+0x4A0037A0
+0x4A0037A4
+0x4A0037A8
+0x4A0037AC
+0x4A0037B0
+0x4A0037B4
+0x4A0037B8
+0x4A0037BC
+0x4A0037C0
+0x4A0037C4
+0x4A0037C8
+0x4A0037CC
+0x4A0037D0
+0x4A0037D4
+0x4A0037E0
+0x4A0037E4
+0x4A0037E8
+0x4A0037EC
+0x4A0037F0
+0x4A0037F4
+0x4A0037F8
+0x4A0037FC
+0x4A003800
+0x4A003804
+0x4A003808
+0x4A00380C
+0x4A003818
+0x4A003824
+0x4A003828
+0x4A00382C
+0x4A003830
+0x4A003834
+0x4A003838
+0x4A00383C
+0x4A003840
+0x4A003844
+0x4A003848
+0x4A00384C
+0x4A00385C
+0x4A003860
+0x4A003864
+EOM
+fi
+
+if [ $id_code = "B99" ]
+then
+       echo "PadConf AM572x" > $OUTPUT_FILE
+# Append to file
+while IFS='' read -r line || [[ -n "$line" ]]; do
+    devmem2 $line | sed '1d2ds/.*\s\(0x[0-9a-fA-F]*\)\s.*: \(0x[0-9a-fA-F]*\)*/\1 \2/' >> $OUTPUT_FILE
+done << EOM
+0x4A003400
+0x4A003404
+0x4A003408
+0x4A00340C
+0x4A003410
+0x4A003414
+0x4A003418
+0x4A00341C
+0x4A003420
+0x4A003424
+0x4A003428
+0x4A00342C
+0x4A003430
+0x4A003434
+0x4A003438
+0x4A00343C
+0x4A003440
+0x4A003444
+0x4A003448
+0x4A00344C
+0x4A003450
+0x4A003454
+0x4A003458
+0x4A00345C
+0x4A003460
+0x4A003464
+0x4A003468
+0x4A00346C
+0x4A003470
+0x4A003474
+0x4A003478
+0x4A00347C
+0x4A003480
+0x4A003484
+0x4A003488
+0x4A00348C
+0x4A003490
+0x4A003494
+0x4A003498
+0x4A00349C
+0x4A0034A0
+0x4A0034A4
+0x4A0034A8
+0x4A0034AC
+0x4A0034B0
+0x4A0034B4
+0x4A0034B8
+0x4A0034BC
+0x4A0034C0
+0x4A0034C4
+0x4A0034C8
+0x4A0034CC
+0x4A0034D0
+0x4A0034D4
+0x4A0034D8
+0x4A0034DC
+0x4A0034E0
+0x4A0034E4
+0x4A0034E8
+0x4A0034EC
+0x4A0034F0
+0x4A0034F4
+0x4A0034F8
+0x4A0034FC
+0x4A003500
+0x4A003504
+0x4A003508
+0x4A00350C
+0x4A003510
+0x4A003514
+0x4A003518
+0x4A00351C
+0x4A003520
+0x4A003524
+0x4A003528
+0x4A00352C
+0x4A003530
+0x4A003534
+0x4A003538
+0x4A00353C
+0x4A003540
+0x4A003544
+0x4A003548
+0x4A00354C
+0x4A003550
+0x4A003554
+0x4A003558
+0x4A00355C
+0x4A003560
+0x4A003564
+0x4A003568
+0x4A00356C
+0x4A003570
+0x4A003574
+0x4A003578
+0x4A00357C
+0x4A003580
+0x4A003584
+0x4A003588
+0x4A00358C
+0x4A003590
+0x4A003594
+0x4A003598
+0x4A00359C
+0x4A0035A0
+0x4A0035A4
+0x4A0035A8
+0x4A0035AC
+0x4A0035B0
+0x4A0035B4
+0x4A0035B8
+0x4A0035BC
+0x4A0035C0
+0x4A0035C4
+0x4A0035C8
+0x4A0035CC
+0x4A0035D0
+0x4A0035D4
+0x4A0035D8
+0x4A0035DC
+0x4A0035E0
+0x4A0035E4
+0x4A0035E8
+0x4A0035EC
+0x4A0035F0
+0x4A0035F4
+0x4A0035F8
+0x4A0035FC
+0x4A003600
+0x4A003604
+0x4A003608
+0x4A00360C
+0x4A003610
+0x4A003614
+0x4A003618
+0x4A00361C
+0x4A003620
+0x4A003624
+0x4A003628
+0x4A00362C
+0x4A003630
+0x4A003634
+0x4A003638
+0x4A00363C
+0x4A003640
+0x4A003644
+0x4A003648
+0x4A00364C
+0x4A003650
+0x4A003654
+0x4A003658
+0x4A00365C
+0x4A003660
+0x4A003664
+0x4A003668
+0x4A00366C
+0x4A003670
+0x4A003674
+0x4A003678
+0x4A00367C
+0x4A003680
+0x4A003684
+0x4A003688
+0x4A00368C
+0x4A003690
+0x4A003694
+0x4A003698
+0x4A00369C
+0x4A0036A0
+0x4A0036A4
+0x4A0036A8
+0x4A0036AC
+0x4A0036B0
+0x4A0036B4
+0x4A0036B8
+0x4A0036BC
+0x4A0036C0
+0x4A0036C4
+0x4A0036C8
+0x4A0036CC
+0x4A0036D0
+0x4A0036D4
+0x4A0036D8
+0x4A0036DC
+0x4A0036E0
+0x4A0036E4
+0x4A0036E8
+0x4A0036EC
+0x4A0036F0
+0x4A0036F4
+0x4A0036F8
+0x4A0036FC
+0x4A003700
+0x4A003704
+0x4A003708
+0x4A00370C
+0x4A003710
+0x4A003714
+0x4A003718
+0x4A00371C
+0x4A003720
+0x4A003724
+0x4A003728
+0x4A00372C
+0x4A003730
+0x4A003734
+0x4A003738
+0x4A00373C
+0x4A003740
+0x4A003744
+0x4A003748
+0x4A00374C
+0x4A003750
+0x4A003754
+0x4A003758
+0x4A00375C
+0x4A003760
+0x4A003764
+0x4A003768
+0x4A00376C
+0x4A003770
+0x4A003774
+0x4A003778
+0x4A00377C
+0x4A003780
+0x4A003784
+0x4A003788
+0x4A00378C
+0x4A003790
+0x4A003794
+0x4A003798
+0x4A00379C
+0x4A0037A0
+0x4A0037A4
+0x4A0037A8
+0x4A0037AC
+0x4A0037B0
+0x4A0037B4
+0x4A0037B8
+0x4A0037BC
+0x4A0037C0
+0x4A0037C4
+0x4A0037C8
+0x4A0037CC
+0x4A0037D0
+0x4A0037D4
+0x4A0037E0
+0x4A0037E4
+0x4A0037E8
+0x4A0037EC
+0x4A0037F0
+0x4A0037F4
+0x4A0037F8
+0x4A0037FC
+0x4A003800
+0x4A003804
+0x4A003808
+0x4A00380C
+0x4A003818
+0x4A00381C
+0x4A003820
+0x4A003824
+0x4A003828
+0x4A00382C
+0x4A003830
+0x4A003834
+0x4A003838
+0x4A00383C
+0x4A003840
+0x4A003844
+0x4A003848
+0x4A00384C
+0x4A00385C
+0x4A003860
+0x4A003864
+EOM
+fi
+
+if [ $id_code = "BB5" ]
+then
+       echo "PadConf AM574x" > $OUTPUT_FILE
+
+# Append to file
+while IFS='' read -r line || [[ -n "$line" ]]; do
+    devmem2 $line | sed '1d2ds/.*\s\(0x[0-9a-fA-F]*\)\s.*: \(0x[0-9a-fA-F]*\)*/\1 \2/' >> $OUTPUT_FILE
+done << EOM
+0x4A003400
+0x4A003404
+0x4A003408
+0x4A00340C
+0x4A003410
+0x4A003414
+0x4A003418
+0x4A00341C
+0x4A003420
+0x4A003424
+0x4A003428
+0x4A00342C
+0x4A003430
+0x4A003434
+0x4A003438
+0x4A00343C
+0x4A003440
+0x4A003444
+0x4A003448
+0x4A00344C
+0x4A003450
+0x4A003454
+0x4A003458
+0x4A00345C
+0x4A003460
+0x4A003464
+0x4A003468
+0x4A00346C
+0x4A003470
+0x4A003474
+0x4A003478
+0x4A00347C
+0x4A003480
+0x4A003484
+0x4A003488
+0x4A00348C
+0x4A003490
+0x4A003494
+0x4A003498
+0x4A00349C
+0x4A0034A0
+0x4A0034A4
+0x4A0034A8
+0x4A0034AC
+0x4A0034B0
+0x4A0034B4
+0x4A0034B8
+0x4A0034BC
+0x4A0034C0
+0x4A0034C4
+0x4A0034C8
+0x4A0034CC
+0x4A0034D0
+0x4A0034D4
+0x4A0034D8
+0x4A0034DC
+0x4A0034E0
+0x4A0034E4
+0x4A0034E8
+0x4A0034EC
+0x4A0034F0
+0x4A0034F4
+0x4A0034F8
+0x4A0034FC
+0x4A003500
+0x4A003504
+0x4A003508
+0x4A00350C
+0x4A003510
+0x4A003514
+0x4A003518
+0x4A00351C
+0x4A003520
+0x4A003524
+0x4A003528
+0x4A00352C
+0x4A003530
+0x4A003534
+0x4A003538
+0x4A00353C
+0x4A003540
+0x4A003544
+0x4A003548
+0x4A00354C
+0x4A003550
+0x4A003554
+0x4A003558
+0x4A00355C
+0x4A003560
+0x4A003564
+0x4A003568
+0x4A00356C
+0x4A003570
+0x4A003574
+0x4A003578
+0x4A00357C
+0x4A003580
+0x4A003584
+0x4A003588
+0x4A00358C
+0x4A003590
+0x4A003594
+0x4A003598
+0x4A00359C
+0x4A0035A0
+0x4A0035A4
+0x4A0035A8
+0x4A0035AC
+0x4A0035B0
+0x4A0035B4
+0x4A0035B8
+0x4A0035BC
+0x4A0035C0
+0x4A0035C4
+0x4A0035C8
+0x4A0035CC
+0x4A0035D0
+0x4A0035D4
+0x4A0035D8
+0x4A0035DC
+0x4A0035E0
+0x4A0035E4
+0x4A0035E8
+0x4A0035EC
+0x4A0035F0
+0x4A0035F4
+0x4A0035F8
+0x4A0035FC
+0x4A003600
+0x4A003604
+0x4A003608
+0x4A00360C
+0x4A003610
+0x4A003614
+0x4A003618
+0x4A00361C
+0x4A003620
+0x4A003624
+0x4A003628
+0x4A00362C
+0x4A003630
+0x4A003634
+0x4A003638
+0x4A00363C
+0x4A003640
+0x4A003644
+0x4A003648
+0x4A00364C
+0x4A003650
+0x4A003654
+0x4A003658
+0x4A00365C
+0x4A003660
+0x4A003664
+0x4A003668
+0x4A00366C
+0x4A003670
+0x4A003674
+0x4A003678
+0x4A00367C
+0x4A003680
+0x4A003684
+0x4A003688
+0x4A00368C
+0x4A003690
+0x4A003694
+0x4A003698
+0x4A00369C
+0x4A0036A0
+0x4A0036A4
+0x4A0036A8
+0x4A0036AC
+0x4A0036B0
+0x4A0036B4
+0x4A0036B8
+0x4A0036BC
+0x4A0036C0
+0x4A0036C4
+0x4A0036C8
+0x4A0036CC
+0x4A0036D0
+0x4A0036D4
+0x4A0036D8
+0x4A0036DC
+0x4A0036E0
+0x4A0036E4
+0x4A0036E8
+0x4A0036EC
+0x4A0036F0
+0x4A0036F4
+0x4A0036F8
+0x4A0036FC
+0x4A003700
+0x4A003704
+0x4A003708
+0x4A00370C
+0x4A003710
+0x4A003714
+0x4A003718
+0x4A00371C
+0x4A003720
+0x4A003724
+0x4A003728
+0x4A00372C
+0x4A003730
+0x4A003734
+0x4A003738
+0x4A00373C
+0x4A003740
+0x4A003744
+0x4A003748
+0x4A00374C
+0x4A003750
+0x4A003754
+0x4A003758
+0x4A00375C
+0x4A003760
+0x4A003764
+0x4A003768
+0x4A00376C
+0x4A003770
+0x4A003774
+0x4A003778
+0x4A00377C
+0x4A003780
+0x4A003784
+0x4A003788
+0x4A00378C
+0x4A003790
+0x4A003794
+0x4A003798
+0x4A00379C
+0x4A0037A0
+0x4A0037A4
+0x4A0037A8
+0x4A0037AC
+0x4A0037B0
+0x4A0037B4
+0x4A0037B8
+0x4A0037BC
+0x4A0037C0
+0x4A0037C4
+0x4A0037C8
+0x4A0037CC
+0x4A0037D0
+0x4A0037D4
+0x4A0037E0
+0x4A0037E4
+0x4A0037E8
+0x4A0037EC
+0x4A0037F0
+0x4A0037F4
+0x4A0037F8
+0x4A0037FC
+0x4A003800
+0x4A003804
+0x4A003808
+0x4A00380C
+0x4A003818
+0x4A00381C
+0x4A003820
+0x4A003824
+0x4A003828
+0x4A00382C
+0x4A003830
+0x4A003834
+0x4A003838
+0x4A00383C
+0x4A003840
+0x4A003844
+0x4A003848
+0x4A00384C
+0x4A00385C
+0x4A003860
+0x4A003864
+EOM
+fi