openwrt_deco_e4r/tools/ramdump-parser/patches/0001-Added-IPQ806X-support.patch

99 lines
4.3 KiB
Diff

From e7b820c073afb73396c473fc03019bf47245c870 Mon Sep 17 00:00:00 2001
From: Kirthik Srinivasan <kirthik@qca.qualcomm.cm>
Date: Wed, 17 Dec 2014 15:50:22 +0530
Subject: [PATCH] Added IPQ806X support
Signed-off-by: Kirthik Srinivasan <kirthik@qca.qualcomm.cm>
---
linux-ramdump-parser-v2/boards.py | 16 ++++++++++++++++
linux-ramdump-parser-v2/ramdump.py | 13 +++++++------
2 files changed, 23 insertions(+), 6 deletions(-)
diff --git a/linux-ramdump-parser-v2/boards.py b/linux-ramdump-parser-v2/boards.py
index 31d53ab..1f12499 100755
--- a/linux-ramdump-parser-v2/boards.py
+++ b/linux-ramdump-parser-v2/boards.py
@@ -205,6 +205,18 @@ class Board8994(Board):
self.wdog_addr = 0xfe87f658
self.imem_file_name = 'OCIMEM.BIN'
+class BoardIPQ806X(Board):
+ def __init__(self, socid):
+ super(BoardIPQ806X, self).__init__()
+ self.socid = socid
+ self.board_num = 8068
+ self.cpu = 'KRAIT'
+ self.ram_start = 0
+ self.imem_start = 0x2a03f000
+ self.smem_addr = 0x41000000
+ self.phys_offset = 0x41500000
+ self.imem_file_name = 'IMEM_A.BIN'
+
boards = []
boards.append(Board8916(socid=206, smem_addr=0xe200000))
boards.append(Board8916(socid=206, smem_addr=0x6300000))
@@ -343,6 +355,10 @@ boards.append(Board8625(socid=133, board_num=8625))
boards.append(Board8625(socid=135, board_num=8625))
boards.append(Board8994(socid=207))
+boards.append(BoardIPQ806X(socid=201))
+boards.append(BoardIPQ806X(socid=202))
+boards.append(BoardIPQ806X(socid=203))
+boards.append(BoardIPQ806X(socid=204))
def get_supported_boards():
""" Called by other part of the code to get a list of boards """
diff --git a/linux-ramdump-parser-v2/ramdump.py b/linux-ramdump-parser-v2/ramdump.py
index eebc6ea..0a7a214 100755
--- a/linux-ramdump-parser-v2/ramdump.py
+++ b/linux-ramdump-parser-v2/ramdump.py
@@ -608,7 +608,7 @@ class RamDump():
if b is None:
print_out_str('!!! Could not read banner address!')
return False
- v = re.search('Linux version (\d{0,2}\.\d{0,2}\.\d{0,2})', b)
+ v = re.search('Linux version (\d{0,2}\.\d{0,2}\.\d{0,3})', b)
if v is None:
print_out_str('!!! Could not match version! {0}'.format(b))
return False
@@ -717,7 +717,7 @@ class RamDump():
startup_script.write('sys.up\n'.encode('ascii', 'ignore'))
for ram in self.ebi_files:
- ebi_path = os.path.abspath(ram[3])
+ ebi_path = os.path.basename(ram[3])
startup_script.write('data.load.binary {0} 0x{1:x}\n'.format(
ebi_path, ram[1]).encode('ascii', 'ignore'))
if self.arm64:
@@ -754,8 +754,9 @@ class RamDump():
'PER.S.F C15:0x202 %L 0x80030000\n'.encode('ascii', 'ignore'))
startup_script.write('mmu.on\n'.encode('ascii', 'ignore'))
startup_script.write('mmu.scan\n'.encode('ascii', 'ignore'))
+ vmlinux_name = os.path.basename(self.vmlinux)
startup_script.write(
- ('data.load.elf ' + os.path.abspath(self.vmlinux) + ' /nocode\n').encode('ascii', 'ignore'))
+ ('data.load.elf ' + vmlinux_name + ' /nocode\n').encode('ascii', 'ignore'))
if self.arm64:
startup_script.write(
'task.config C:\\T32\\demo\\arm64\\kernel\\linux\\linux-3.x\\linux3.t32\n'.encode('ascii', 'ignore'))
@@ -780,13 +781,13 @@ class RamDump():
t32_bat = open(out_path + '/launch_t32.bat', 'wb')
if self.arm64:
t32_binary = 'C:\\T32\\bin\\windows64\\t32MARM64.exe'
- elif self.hw_id == 8916 or self.hw_id == 8939 or self.hw_id == 8936:
+ elif self.hw_id == 8916 or self.hw_id == 8939 or self.hw_id == 8936 or self.hw_id == 8068:
t32_binary = 'C:\\T32\\bin\\windows64\\t32MARM.exe'
else:
t32_binary = 'c:\\t32\\t32MARM.exe'
- t32_bat.write(('start '+ t32_binary + ' -c ' + out_path + '/t32_config.t32, ' +
- out_path + '/t32_startup_script.cmm').encode('ascii', 'ignore'))
+ t32_bat.write(('start '+ t32_binary + ' -c ' + 't32_config.t32, ' +
+ 't32_startup_script.cmm').encode('ascii', 'ignore'))
t32_bat.close()
print_out_str(
'--- Created a T32 Simulator launcher (run {0}/launch_t32.bat)'.format(out_path))
--
1.7.9.5