Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>master
parent
9bac8f7769
commit
985e18d14e
@ -1,4 +1,2 @@ |
||||
bootrom-asm-offsets.[chs] |
||||
|
||||
init.lds |
||||
init.elf |
||||
|
@ -1,41 +0,0 @@ |
||||
#!/usr/bin/gawk -f |
||||
BEGIN { |
||||
print "/* DO NOT EDIT: AUTOMATICALLY GENERATED" |
||||
print " * Input files: bootrom-asm-offsets.awk bootrom-asm-offsets.c.in" |
||||
print " * DO NOT EDIT: AUTOMATICALLY GENERATED" |
||||
print " */" |
||||
print "" |
||||
system("cat bootrom-asm-offsets.c.in") |
||||
print "{" |
||||
} |
||||
|
||||
{ |
||||
/* find a structure definition */ |
||||
if ($0 ~ /typedef struct .* {/) { |
||||
delete members; |
||||
i = 0; |
||||
|
||||
/* extract each member of the structure */ |
||||
while (1) { |
||||
getline |
||||
if ($1 == "}") |
||||
break; |
||||
gsub(/[*;]/, ""); |
||||
members[i++] = $NF; |
||||
} |
||||
|
||||
/* grab the structure's name */ |
||||
struct = $NF; |
||||
sub(/;$/, "", struct); |
||||
|
||||
/* output the DEFINE() macros */ |
||||
while (i-- > 0) |
||||
print "\tDEFINE(" struct ", " members[i] ");" |
||||
print "" |
||||
} |
||||
} |
||||
|
||||
END { |
||||
print "\treturn 0;" |
||||
print "}" |
||||
} |
@ -1,12 +0,0 @@ |
||||
/* A little trick taken from the kernel asm-offsets.h where we convert
|
||||
* the C structures automatically into a bunch of defines for use in |
||||
* the assembly files. |
||||
*/ |
||||
|
||||
#include <linux/stddef.h> |
||||
#include <asm/mach-common/bits/bootrom.h> |
||||
|
||||
#define _DEFINE(sym, val) asm volatile("\n->" #sym " %0 " #val : : "i" (val)) |
||||
#define DEFINE(s, m) _DEFINE(offset_##s##_##m, offsetof(s, m)) |
||||
|
||||
int main(int argc, char * const argv[]) |
Loading…
Reference in new issue