Closed ghost closed 7 years ago
Thanks for your interest! I will push some elaborate documentation later this week, but for now a quick and coarse list of things:
export CROSS_COMPILE=aarch64-linux-gnu-
make PLAT=sun50iw1p1 DEBUG=1 bl31
make pine64_plus_defconfig && make
dd if=/dev/sdx of=boot0.img bs=8k skip=1 count=4
from an existing image, which could be Android as well)./boot0img -b boot0.img -d trampoline64:0x44000 -u u-boot.bin -e -s bl31.bin -a 0x44008 -o pine64.img
dd if=pine64.img of=/dev/sdx bs=8k seek=1 skip=1
some more detailed instructions here: https://gist.github.com/apritzel/68941c29c77955f1daa45b50d36c5425
May I ask what toolchain and compiler you are using? With GCC 5.4.0 (GNU as 2.26.1) I run into this problem:
bl31/aarch64/runtime_exceptions.S: Assembler messages:
bl31/aarch64/runtime_exceptions.S:193: Error: non-constant expression in ".if" statement
...
This if-clause in include/common/aarch64/asm_macros.S
seems to be the problem:
.macro check_vector_size since
.if (. - \since) > (32 * 4)
.error "Vector exceeds 32 instructions"
.endif
.endm
I guess you are building the wrong branch. Please checkout the allwinner
branch and build that according to the instructions given:
make PLAT=sun50iw1p1 DEBUG=1 bl31
But to not dodge your question: Yes, this is a known problem. ATF (since commit 79627dc37259) unfortunately relies on a fixed toolchain, since this issue is caused by a binutils bug. You can quickly fix this by removing the ",0" after the .align directives in include/common/aarch64/asm_macros.S, as in:
--- a/include/common/aarch64/asm_macros.S
+++ b/include/common/aarch64/asm_macros.S
@@ -77,7 +77,7 @@
*/
.macro vector_base label
.section .vectors, "ax"
- .align 11, 0
+ .align 11
\label:
.endm
@@ -90,7 +90,7 @@
*/
.macro vector_entry label
.section .vectors, "ax"
- .align 7, 0
+ .align 7
\label:
.endm
Hi, First I wanna thank you for this fantastic work, that's what I was waitinf for for my board. I just want to know if it's possible that you share how you did it and explain all the steps followed. thanks in advance,