Commit d4e34bcb authored by Luc Verhaegen's avatar Luc Verhaegen Committed by Alejandro Mery
Browse files

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: default avatarLuc Verhaegen <libv@skynet.be>
parent bfc61ea9
......@@ -5,5 +5,6 @@ bootinfo
fel
pio
nand-part
meminfo
*.o
*.swp
......@@ -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"; \
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment