From 85eb9c63e3ab5dfe9521bac35636d3a176c651f0 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Mon, 22 Jan 2024 13:42:49 +0100 Subject: [PATCH] Move notes out of readme --- NOTES.md | 21 +++++++++++++++++++++ README.md | 22 ---------------------- 2 files changed, 21 insertions(+), 22 deletions(-) create mode 100644 NOTES.md diff --git a/NOTES.md b/NOTES.md new file mode 100644 index 0000000..6f7017b --- /dev/null +++ b/NOTES.md @@ -0,0 +1,21 @@ +## Use more than 1 CPU + +With only 1 CPU some thigs are soo slow to work. For example, the ttyS0 device +doesn't arrive on time and the login fails. Or the SSH daemon doesn't start +until the third try. With -smp 32 seems to work ok. + +## Compressed instructions + +To see if a binary has compressed instructions or not, you can use objdump: + + hut% nix shell -vL nixpkgs#pkgsCross.riscv64.bintools + hut% objdump -M no-aliases -D result/u-boot | grep 'c\.' | head -5 + 80200000: 822a c.mv tp,a0 + 80200002: 84ae c.mv s1,a1 + 80200018: 52c1 c.li t0,-16 + 8020001e: 0356 c.slli t1,0x15 + 80200024: 850a c.mv a0,sp + +To dump a ROM without the ELF header: + + hut% objdump -b binary -m riscv:rv64 -M no-aliases -D result/u-boot.bin diff --git a/README.md b/README.md index 833f66c..7301ffc 100644 --- a/README.md +++ b/README.md @@ -11,25 +11,3 @@ Then run the boot script: ``` $ ./boot.sh ``` - -## Use more than 1 CPU - -With only 1 CPU some thigs are soo slow to work. For example, the ttyS0 device -doesn't arrive on time and the login fails. Or the SSH daemon doesn't start -until the third try. With -smp 32 seems to work ok. - -## Compressed instructions - -To see if a binary has compressed instructions or not, you can use objdump: - - hut% nix shell -vL nixpkgs#pkgsCross.riscv64.bintools - hut% objdump -M no-aliases -D result/u-boot | grep 'c\.' | head -5 - 80200000: 822a c.mv tp,a0 - 80200002: 84ae c.mv s1,a1 - 80200018: 52c1 c.li t0,-16 - 8020001e: 0356 c.slli t1,0x15 - 80200024: 850a c.mv a0,sp - -To dump a ROM without the ELF header: - - hut% objdump -b binary -m riscv:rv64 -M no-aliases -D result/u-boot.bin