nflasebo.blogg.se

Allwinner a64 roms
Allwinner a64 roms







  1. #Allwinner a64 roms manual
  2. #Allwinner a64 roms code

Exactly 32 KiB is fine, as verified by writing a special pattern at the end of the SPL and checking it in the SRAM. Sizes larger than 32 KiB are rejected by the BROM. Note that the top of the SPL stack needs to be changed in U-Boot sources from 0x8000 to something like 0x7000 in order to make it a clean experiment. Exactly 0x7E00 is fine, as verified by writing a special pattern at the end of the SPL file and checking it in the SRAM. Sizes larger than 0x7E00 bytes are rejected by the BROM. There is an artificial 24 KiB limit and anything larger is rejected by the BROM Initial stack pointer value (SP register) The size of the SPL must be a multiple of 8 KiB in NAND and a multiple of 512 bytes on the SD card (see the "sunxi/nand: change BLOCK_SIZE in mksunxiboot to match NAND block size" commit in U-Boot). Such special header can be added to a binary file using the Mksunxiboot tool. In order to be recognized by the BROM, the SPL needs to written to a certain location on the SD card (see SD Card Layout) and have a special header with a correct checksum. "NAND Flash" is not listed above because we have not seen such devices yet.

#Allwinner a64 roms manual

\-> 1) try to boot from SMHC0 (SD card)įIXME: The A64 manual says that booting is supported from "NAND Flash", "SD/TF card", "eMMC" and "Nor Flash", but does not provide any details. The boot-flow process is explained briefly below (based on experimenting with Pine64 and Jide Remix Mini):īoot-> check fel key pressed (yes)-> FEL mode (boot from USB OTG) \_ boot from spi (go to fel mode if failed) \_check boot sel- boot from emmc2 (go to fel mode if failed) (no) \ /_ boot from sd2 (go to fel mode if failed) \ _ boot from nand flash (go to fel mode if failed) The boot-flow process is explained briefly below.īoot-> check fel key pressed (yes)-> check if sd0 bootable(no) ->go to fel mode The fel key priority is higher than the boot select key. Two boot select pins, boot sel0 and boot sel1, which decide where to boot. One fel pin, which is the same as A10/A20. Instead of falling through boot options, the A31 boots slightly differently.

#Allwinner a64 roms code

The source code for boot0 and boot1 for the A20 chip is included in an SDK from Olimex:Īs of March 2015 Allwinner has also published bootloader code on GitHub. Otherwise the above boot-order will be tried. If the pin is pulled low to GND, the A10 will try to boot into FEL mode. This pin is normally internally pulled up by a 50KΩ resistor. As a bypass mechanism, the A10 has the so called Boot Select Pin (BSP). If no other boot options are available, then FEL mode should be the final result. Obviously this can be abused, by corrupting the header and thus forcing failure. This is especially important if there is a valid header in the NAND flash.

  • If all fails, FEL/USB Boot mode is executed from 0xffff0020Īs can be seen, the A10/A20 has several ways to boot and a lot would need to go wrong or 'fail' before entering FEL mode.
  • SPI connected NOR flash also known as SPI.
  • If the pin is high it continues trying to boot from the following media and on failure continues to the next in order.
  • if the pin is low (connected to GND) executes FEL mode at 0xffff0020.
  • check_uboot setups up some registers, then checks the status pin (often called FEL pin, BSP pin or uboot).
  • then it jumps to 'boot' which immediately jumps to check_uboot.
  • does some co-processor setup ( c15, (virtual) System Control Coprocessor).
  • On reset, it jumps to 0xffff0028 where it loads 0xffff4000 (eGON.BRM) into the program counter to be executed next. The reset vector is located at the very begining of FEL mode: at address 0xffff0000. The BROM split up into two parts: The first part (at 0xffff0000) is the FEL mode and the second is the eGON.BRM (located at 0xffff4000). The SoC starts to fetch instructions from address 0xffff0000 which is where the BROM is located at. This could be considered the primary program-loader. After power-up, the A10/A20 boots from an integrated, non-replaceable 32 KiB ROM chip (Boot ROM or BROM).









    Allwinner a64 roms