Closed Evlers closed 1 year ago
compile it with arm-none-eabi- toolchain
thank you!! I Can continue compiling with arm-none-eabi- But new problems arise:
---------------------------------------------------------------
Compiler version: gcc version 6.3.1 20170620 (15:6.3.1+svn253039-1build1)
Build revision: 6098
---------------------------------------------------------------
CC /home/evler/allwinner/mangopi/dual/mainline/awboot/arch/arm32/mach-t113s3/sdcard.c
LD awboot.elf
/home/evler/allwinner/mangopi/dual/mainline/awboot/arch/arm32/mach-t113s3/sdcard.o: In function `sdcard_detect':
/home/evler/allwinner/mangopi/dual/mainline/awboot/arch/arm32/mach-t113s3/sdcard.c:442: undefined reference to `__aeabi_llsl'
collect2: error: ld returned 1 exit status
Makefile:74: recipe for target 'awboot.elf' failed
make: *** [awboot.elf] Error 1
cmult = UNSTUFF_BITS(card->csd, 47, 3);
csize = UNSTUFF_BITS(card->csd, 62, 12);
card->capacity = (csize + 1) << (cmult + 2);
This cmult seems to be beyond a 64-bit variable ??
I've succesfully compiled it under OSX, with:
arm-none-eabi-gcc -v gcc version 9.2.1 20191025 (release) [ARM/arm-9-branch revision 277599] (GNU Tools for Arm Embedded Processors 9-2019-q4-major)
and on linux, with:
arm-none-eabi-gcc -v gcc version 8.3.1 20190703 (release) [gcc-8-branch revision 273027] (15:8-2019-q3-1+b1)
If you change the C/A/LD-FLAGS in Makefile from -mabi=aapcs-linux to -mabi=apcs-gnu ?
OBJCOPY awboot.bin
text data bss dec hex filename
24692 364 5448 30504 7728 awboot.elf
len: 25056
The bootloader head has been fixed, spl size is 32768 bytes.
I before used a version 6.3 compiler and now installing version 8.3.1 is ok !!
sudo dd if=awboot.bin of=/dev/sdd bs=1024 seek=8
But I write to the TF card, connect PB4 and PB5 have no log output..... I am using the mangopi mq-dual board.
first try running directly from memory:
I using xfel have log output
Allwinner T113-loader
DRAM SIZE = 128M
DRAM simple test OK.
CPU freq=1200 MHz
SD/MMC card not found
oops, something went wrong...
Am I writing in the wrong position?? After inserting the TF card does not enter the FEL mode, it should be read to the boot.
It seems there is some problem with the MMC card, the awboot doesn't found it (from your log: SD/MMC card not found), and maybe if you write the awboot.bin to the MMC, the internal BROM of the T113 can't handle the MMC too.
I log is pulled off the TF card for xfel writing, plug in the words can identify the TF card, the following log:
Allwinner T113-loader
DRAM SIZE = 128M
DRAM simple test OK.
CPU freq=1200 MHz
SD/MMC card at 'sdhci0' controller found
SD/MMC: Image: Read file zImage addr=45000000
*** FATFS: f_open, filename: [zImage]: error
oops, something went wrong...
I replaced two TF cards,I try it by writing with an img file!! In addition, where is the kernel you use? Can you recommend it to me? thanks you~
You need to make 2 partitions to the SDCARD. The first is a FAT partition, where you need to copy the dtb and the kernel, which the awboot will load, and the second partition (ext4) will be your linux rootfs. (you can build one with buildroot, for example).
You can build your own kernel from mainline 6.0 linux sources with the few patches I added. I uploaded a compiled kernel and dtb for testing.
Thank you for your help, I saw the update. I'll test it with the file you gave it, and then I will compile one myself. Are you a Chinese?
Happy hacking :) No, I'm from Europe.
Happy hacking :) No, I'm from Europe.
Be funny if you're Chinese,Because we have been communicating in English. 哈哈哈哈 Thanks again for your help~
Encounter a link error, please help solve, thank you~
Info
cross compile: gcc version 7.5.0 host compile: gcc version 7.5.0
Setp
Error