PinePhone: Difference between revisions

[unchecked revision][unchecked revision]
Content deleted Content added
Immibis (talk | contribs)
No edit summary
Immibis (talk | contribs)
No edit summary
Line 12:
* https://linux-sunxi.org/File:Allwinner_A64_User_Manual_V1.1.pdf - includes memory map; full register documentation for several basic peripherals including GPIOs, DMA, timers...
* https://wiki.pine64.org/index.php?title=PinePhone#PinePhone_board_information,_schematics_and_certifications
 
The CPU is an [https://linux-sunxi.org/A64 Allwinner A64] (a.k.a. "sun50i"), which is also used in some of Pine64's single-board computers. Although Allwinner does not release full documentation, significant reverse-engineered information is available through the [https://linux-sunxi.org/ linux-sunxi project]. This is presumably one reason Pine64 chose this CPU.
 
== Requirements ==
Line 21 ⟶ 23:
Since the OS controls all signs of whether the phone is powered on, it's probably a good idea to remove the battery, so that you can be sure whether the phone is on or off. Also, some aspects of battery charging are controlled by the OS, so this removes any chance of accidentally damaging it by applying incorrect settings (not sure if this is possible/likely). The cellular modem is powered directly from the battery and won't work if the battery is not inserted - but this won't be a problem until your OS is quite well developed. The CPU seems to work just fine while the battery is removed.
 
== Boot orderBooting ==
 
The CPU is an [https://linux-sunxi.org/A64 Allwinner A64] (a.k.a. "sun50i"), which is also used in some of Pine64's single-board computers. Although Allwinner does not release full documentation, significant reverse-engineered information is available through the [https://linux-sunxi.org/ linux-sunxi project]. This is presumably one reason Pine64 chose this CPU.
 
The CPU first boots from an integrated boot ROM, which then tries to boot from one of these sources:[https://linux-sunxi.org/Boot_Process]
Line 30:
# The internal eMMC storage, if boot signature (eGON header) is found
# The FEL mode ROM - a USB slave mode where the host computer can read, write and execute memory.
 
 
There is also an FEL button that can theoretically be pressed to force boot in FEL mode, but on the PinePhone it is only connected to a test pad, not to an actual button.
 
 
The normal way to prepare an OS for the PinePhone is to flash a microSD card and insert it. The OS may then offer an option to install itself onto the eMMC. However, when getting started with osdev, FEL mode (which allows loading code via USB) should allow for a much faster testing cycle.
 
For your OS, you can choose to boot via U-boot [TODO] or directly into your own "bootloader".
 
=== Loading code via microSD/eMMC ===
Line 78:
To see if your toolchain works you can try to run [[User:Immibis/PinePhone Blinky]].
 
== BootloaderCustom bootloader stuff ==
 
Skip this section if you are running your OS from U-Boot.