meminfo: rename and add to build
* rename a10-meminfo to meminfo * add static build to Makefile * fix operand warning * built binary verified on proper linux and android Signed-off-by: Luc Verhaegen <libv@skynet.be>
This commit is contained in:
parent
bfc61ea903
commit
d4e34bcb5a
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,5 +5,6 @@ bootinfo
|
||||
fel
|
||||
pio
|
||||
nand-part
|
||||
meminfo
|
||||
*.o
|
||||
*.swp
|
||||
|
||||
3
Makefile
3
Makefile
@ -111,6 +111,9 @@ boot_head_sun5i.bin: boot_head_sun5i.elf
|
||||
|
||||
bootinfo: bootinfo.c
|
||||
|
||||
meminfo: meminfo.c
|
||||
$(CROSS_COMPILE)gcc -g -O0 -Wall -static -o $@ $^
|
||||
|
||||
.gitignore: Makefile
|
||||
@for x in $(TOOLS) '*.o' '*.swp'; do \
|
||||
echo "$$x"; \
|
||||
|
||||
6
README
6
README
@ -60,5 +60,11 @@ phoenix_info:
|
||||
phoenixcard utility and optionally extracts the embedded boot
|
||||
code & firmware file from their hidden partitions.
|
||||
|
||||
meminfo:
|
||||
Tool for reading DRAM settings from registers. Compiled as a
|
||||
static binary for use on android and other OSes. To build this,
|
||||
get a toolchain, and run:
|
||||
make CROSS_COMPILE=arm-linux-gnueabihf- meminfo
|
||||
|
||||
This software is licensed under the terms of GPLv2+ as defined by the
|
||||
Free Software Foundation, details can be read in the COPYING file.
|
||||
|
||||
@ -243,7 +243,7 @@ int main(int argc, char **argv)
|
||||
p.cas = (r->mr >> 4 & 15);
|
||||
if (p.type == 3)
|
||||
p.cas += 4;
|
||||
p.density = 1 << 8+(r->dcr >> 3 & 7);
|
||||
p.density = (1 << 8) + (r->dcr >> 3 & 7);
|
||||
p.rank_num = (r->dcr >> 10 & 3)+1;
|
||||
p.io_width = (r->dcr >> 1 & 3) << 3;
|
||||
p.bus_width = ((r->dcr >> 6 & 3)+1) << 3;
|
||||
Loading…
x
Reference in New Issue
Block a user