https://linux-sunxi.org/api.php?action=feedcontributions&user=Keziolio&feedformat=atomlinux-sunxi.org - User contributions [en]2024-03-29T13:16:09ZUser contributionsMediaWiki 1.35.8https://linux-sunxi.org/index.php?title=File:Orange_pi_one_plus_top.jpg&diff=22049File:Orange pi one plus top.jpg2019-01-16T22:43:14Z<p>Keziolio: Keziolio uploaded a new version of &quot;File:Orange pi one plus top.jpg&quot;: slightly better picture</p>
<hr />
<div>Xunlong Orange Pi One Plus Top</div>Kezioliohttps://linux-sunxi.org/index.php?title=H6&diff=22045H62019-01-14T16:57:16Z<p>Keziolio: Add pic</p>
<hr />
<div>{{Infobox SoC<br />
| image = [[File:H6.jpeg|250px]]<br />
| manufacturer = Allwinner<br />
| process = 28nm<br />
| cpu = Quad-Core ARM Cortex-A53 @ 1.8GHz<br />
| ltwo = <br />
| extensions = <br />
| memory = LPDDR2/LPDDR3/DDR3/DDR4<br />
| gpu = Mali-T720 MP2 @ 600Mhz<br />
| vpu = <br />
| apu = <br />
| video = HDMI 2.0 with HDCP 2.2, TV CVBS, RGB LCD<br />
| audio = I2S, PCM, TDM<br />
| network = GBit MAC, integrated 10/100M PHY<br />
| storage = MMC, NAND<br />
| usb = 1x OTG, 1x Host 2.0, 1x Host 3.0<br />
| other = PCIE 2.0 1x<br />
| release_date = June 2017<br />
| website = [http://www.allwinnertech.com/index.php?c=product&a=index&id=66 Product Page]<br />
}}<br />
<br />
Allwinner [[H6]] (sun50iw6p1) SoC features a Quad-Core Cortex-A53 ARM CPU, and a Mali-T720 MP2 GPU from ARM. The Allwinner H6 is an OTT SoC.<br />
<br />
=Overview=<br />
See [[Mainlining Effort]] and [[Mainline U-Boot]] for support status. The initial support for the SoC will be added in kernel 4.17<br />
<br />
== Differences / New features (compared to H5) ==<br />
<br />
=== High level differences ===<br />
* addition of PCIe support (broken, see below)<br />
** single lane PCIe 2.0<br />
** totally undocumented software interface<br />
* addition of USB 3.0 host<br />
* Mali T720 instead of Mali 450<br />
* DDR4 DRAM support<br />
* addition of IOMMU<br />
** though only connected to display controller and video codecs<br />
* (New?) Audio Hub component<br />
<br />
=== Programming model/driver level differences ===<br />
* heavily changed memory map (UART0 at 0x05000000, for instance)<br />
** SRAM locations moved around as well (SRAM A1 at 0x2000 now)<br />
* bus clock gates and device reset control now grouped by devices and merged into one register (high 16 bits reset, low 16 bits clock gates) <br />
* DMA controller changed (more than 32 ports, but still limited to 32 bit addresses)<br />
* no GPIO port A and B<br />
<br />
=== Errata ===<br />
* '''The PCIe implementation is broken.'''<br />
Allwinner H6 has a quirky PCIe controller that doesn't map the PCIe address space properly (only 64k accessible at one time) to CPU, and accessing the PCIe config space, I/O space or memory space will need to be wrapped. As Linux doesn't wrap PCIe memory space access, it's not possible to do a proper PCIe controller driver for H6. The BSP kernel modifies the driver to wrap the access, so it's also not generic, and only devices with modified driver will work.<br />
<br />
=H6 SoC Features=<br />
* CPU<br />
** ARM Cortex-A53 Quad-Core<br />
** 512KB L2-Cache (shared between four cores)<br />
** 32 KB (Instruction) / 32KiB (Data) L1-Cache per core<br />
** SIMD NEON, VFP4<br />
** Virtualization<br />
* GPU<br />
** ARM Mali-T720 MP2<br />
** Featuring 2 unified shader cores<br />
** Complies with OpenGL ES 3.0, OpenCL 1.2<br />
* Memory<br />
** DDR3/DDR4/LPDDR2/LPDDR3 controller<br />
** NAND Flash controller and 64-bit ECC, supports full disk encryption<br />
** 3 MMC controllers, in which MMC2 (eMMC controller) supports full disk encryption<br />
* Video<br />
** Ultra HD 4k and Full HD 1080p video decoding of MPEG-2, MPEG-4 SP/ASP GMC, H.263, H.264, H.265, WMV9/VC-1, and VP8<br />
** BD Directory, BD ISO and BD m2ts video decoding<br />
** H.264 High Profile 1080P@60fps encoding<br />
** 3840×1080,1920x2160 3D decoding<br />
** Complies with RTSP, HTTP,HLS,RTMP,MMS streaming media protocol<br />
* Display<br />
** Integrated HDMI V2.0 with HDCP2.2 4K@60fps<br />
** TV CVBS output<br />
** RGB LCD output<br />
* Camera<br />
** Integrated parallel 8-bit I/F YUV422 sensor<br />
** Support CCIR656 protocol fot NTSC and PAL<br />
** 5M CMOS sensor support<br />
** Support video capture resolution up to 1080p@30fps<br />
* Audio<br />
** Two audio digital-to-analog(DAC) channels 92dB SNR<br />
** Two differential microphone inputs (one low-noise)<br />
** Stereo Linein input<br />
** TDM Digital Microphone input<br />
* Embedded Controller:<br />
** [[AR100]] controller.<br />
* Thermal Sensor Controller (TSC) providing over-temperature protection interrupt and over-temperature alarm interrupt<br />
* AXP805 PMIC<br />
* package: FBGA451, 15 mm x 15 mm, 0.65 mm Pitch<br />
<br />
=Documentation=<br />
* [[File:Allwinner_H6_V200_Datasheet_V1.1.pdf]] <small>(PDF, 80 pages, 2017-11-14)</small><br />
* [[File:Allwinner_H6_V200_User_Manual_V1.1.pdf]] <small>(PDF, 965 pages, 2017-11-14)</small><br />
<br />
<br />
= Register guide =<br />
= Software =<br />
<br />
== Original SDK ==<br />
A beta version of the H6 BSP was released on 2018/01/30...<br />
<br />
* https://github.com/Allwinner-Homlet/H6-BSP4.9-brandy<br />
* https://github.com/Allwinner-Homlet/H6-BSP4.9-tools<br />
* https://github.com/Allwinner-Homlet/H6-BSP4.9-linux<br />
<br />
== Boot0 ==<br />
== U-boot ==<br />
<br />
=== Allwinner ===<br />
<br />
=== Sunxi Community ===<br />
=== Mainline U-Boot ===<br />
<br />
<br />
== Kernel code ==<br />
=== Allwinner ===<br />
=== Sunxi Community ===<br />
=== Mainline ===<br />
<br />
== GPL Violations ==<br />
<br />
{{edit|TBD}}<br />
<br />
=== kernel ===<br />
<br />
{{edit|TBD}}<br />
<br />
=== U-Boot ===<br />
<br />
{{edit|TBD}}<br />
<br />
= Devices =<br />
<br />
<categorytree mode=pages hideroot=on depth=1>H6 Devices</categorytree><br />
<br />
[[Category:System on Chip]]</div>Kezioliohttps://linux-sunxi.org/index.php?title=File:H6.jpeg&diff=22044File:H6.jpeg2019-01-14T16:53:51Z<p>Keziolio: H6 top</p>
<hr />
<div>H6 top</div>Kezioliohttps://linux-sunxi.org/index.php?title=U-Boot&diff=21405U-Boot2018-05-25T20:37:45Z<p>Keziolio: I wasted an hour on this</p>
<hr />
<div>Support for sunxi devices is increasingly available from [http://www.denx.de/wiki/U-Boot upstream U-Boot]. This page describes that support. We have a separate page for the 'legacy' [[U-Boot|sunxi branch of U-Boot]].<br />
<br />
{{alert|This document is for 32bits ARM device, for ARM64 see directly board/sunxi/README.sunxi64 in uboot sources}}<br />
= Status =<br />
<br />
The current U-Boot release fully supports major functions (except NAND) on<br />
all the older Allwinner SoCs ([[A10]]/[[A10s]]/[[A13]]/[[A20]]/[[A23]]/[[A31]]/[[A31s]]) and has basic support for the more recent [[A33]], [[A64]], [[A80]], [[A83T]], [[H2+]], [[H3]], [[H5]], and [[V3s]].<br />
<br />
The next release will be v2018.03.<br />
<br />
See also: [http://www.denx.de/wiki/U-Boot/ReleaseCycle U-Boot Release Cycle and Release Schedule].<br />
<br />
== In Progress ==<br />
* [[A83T]] USB support (WiP: Chen-Yu Tsai (wens)) [http://lists.denx.de/pipermail/u-boot/2016-March/250003.html patch-rfc]<br />
* [[A83T]] PSCI support (WiP: Timothy Pearson) [https://patchwork.ozlabs.org/patch/622853/ patch-rfc]<br />
* [[H2+]]/[[H3]]/[[A64]] HDMI / Composite out support (WiP: Jernej Škrabec) [https://github.com/jernejsk/u-boot/tree/de2_wip git-repo]<br />
* [[A20]] SPI driver (WiP: Stephan van Schaik (Swabbles)) [http://lists.denx.de/pipermail/u-boot/2017-February/280966.html patch-rfc] [https://github.com/StephanvanSchaik/u-boot/tree/sunxi-spi git-repo]<br />
* [[A31]]/[[A80]]/[[A64]] SPI driver (WiP: Philipp Tomsich) [https://lists.denx.de/pipermail/u-boot/2017-February/281946.html patch-v1]<br />
* [[R40]] [[Banana Pi M2 Ultra]] support (WiP: Chen-Yu Tsai (wens)) [https://lists.denx.de/pipermail/u-boot/2017-March/282760.html patch]<br />
<br />
== Next Release (v2018.03) ==<br />
<br />
[http://git.denx.de/?p=u-boot/u-boot-sunxi.git;a=shortlog;h=refs/heads/master Development branch]<br />
<br />
== v2018.01 ==<br />
* Boards<br />
** [[NanoPi NEO Plus 2]]<br />
** [[TBS A711]]<br />
<br />
== v2017.11 ==<br />
* Boards<br />
** [[Olimex A20-OLinuXino-Micro]] eMMC variant<br />
** [[FriendlyARM Nanopi M1 Plus]]<br />
** [[Sinovoip Banana Pi M2]] Magic<br />
<br />
== v2017.09 ==<br />
* Boards<br />
** [[FriendlyARM_NanoPi_A64 | NanoPi A64 ]]<br />
** [[Olimex_A20-OLinuXino-Lime2 | OLinuXino Lime2 (A20)]] with eMMC<br />
** [[Olimex_A64-OLinuXino | OLinuXino A64]]<br />
<br />
== v2017.07 ==<br />
* Boards<br />
** [[Xunlong Orange Pi Win]] and Win Plus<br />
** [[Xunlong Orange Pi Prime]]<br />
** [[Xunlong Orange Pi Zero Plus 2]]<br />
<br />
== v2017.05 ==<br />
* [[A64]] SPL support<br />
* [[H5]] support (with SPL)<br />
* Boards<br />
** [[Xunlong Orange Pi PC 2]]<br />
** [[FriendlyARM NanoPi NEO Air]]<br />
<br />
== v2017.03 ==<br />
[http://git.denx.de/?p=u-boot.git;a=shortlog;h=refs/tags/v2017.03 v2017.03 Release branch]<br />
<br />
* [http://git.denx.de/?p=u-boot.git;a=commit;h=2fc554d3e37c27c5b8d2540d7a571dc53152a301 enable H3 EMAC for the nanopi neo]<br />
* [http://git.denx.de/?p=u-boot.git;a=commit;h=59603d026b9ad3f51a8d69c2a94d3a511639c525 add proper device tree for Orange Pi Zero boards]<br />
* [http://git.denx.de/?p=u-boot.git;a=commit;h=7490130c9f8a4e17e858a38c767ad9ed64bd777b OrangePi Zero: defconfig: enable SPI flash]<br />
* [http://git.denx.de/?p=u-boot.git;a=commit;h=8b15f8eb67a48a98d5c131c1d44aa78c236c064d OrangePi Zero: add Ethernet node]<br />
<br />
== v2017.01 ==<br />
[http://git.denx.de/?p=u-boot.git;a=shortlog;h=refs/tags/v2017.01 v2017.01 Release branch]<br />
<br />
* add support for [[Nintendo NES Classic Edition]]<br />
<br />
== v2016.11 ==<br />
[http://git.denx.de/?p=u-boot.git;a=shortlog;h=refs/tags/v2016.11 v2016.11 Release branch]<br />
<br />
* Hans de Goede and Ian Campbell step down as U-boot Sunxi maintainers<br />
<br />
* A80<br />
** Full SPL support<br />
<br />
* A64<br />
** USB support<br />
<br />
* H3<br />
** DRAM impedance calibration fixes<br />
<br />
* Boards<br />
** [[FriendlyARM NanoPi NEO]]<br />
** [[Sinlinx SinA33]]<br />
*** USB host and OTG support<br />
** [[Cubietech Cubieboard4]]<br />
<br />
== v2016.09 ==<br />
[http://git.denx.de/?p=u-boot.git;a=shortlog;h=refs/tags/v2016.09 v2016.09 Release branch]<br />
<br />
* General<br />
** GPIO fixes<br />
** PSCI rewrite in C part 2<br />
** NAND controller driver<br />
** H3/A64 Ethernet (EMAC) support<br />
<br />
* Boards<br />
** [[Empire Electronix M712]]<br />
** [[Inet Q972]]<br />
** [[Olimex A33-OLinuXino]]<br />
** [[Xunlong Orange Pi PC | Xunlong Orange Pi PC Plus]]<br />
** [[Xunlong Orange Pi Plus 2E]]<br />
<br />
== v2016.07 ==<br />
[http://git.denx.de/?p=u-boot.git;a=shortlog;h=refs/tags/v2016.07 v2016.07 Release branch]<br />
<br />
* AXP809 PMIC support<br />
<br />
* PSCI rewrite in C part 1<br />
<br />
* Boards<br />
** [[Allwinner R16 EVB]]<br />
** [[Inet 86dz]]<br />
** [[Polaroid MID2407PXE03]]<br />
<br />
== v2016.05 ==<br />
[http://git.denx.de/?p=u-boot.git;a=shortlog;h=refs/tags/v2016.05 v2016.05 Release branch]<br />
<br />
* [[A23]]<br />
** Support new revisions<br />
<br />
* [[A64]]<br />
** 64-bit ARMv8 port, basic support (MMC, UART, no USB, no Ethernet)<br />
** (basic) EFI support (allows booting EFI applications (like grub) or kernels)<br />
<br />
* I2C support fix for families with separate reset control<br />
<br />
* SID e-fuse support for A83T and H3<br />
<br />
* Sync up dts files with Linux kernel<br />
* Update compatible strings for GPIO<br />
<br />
* Boards<br />
** colorfly e708 q1, Difrence DIT4350, Polaroid MID2809PXE4, Itead Ibox, icnova-a20-swac, yones toptech bs1078-v2, Dserve DSRV9703C, <br />
** [[Cubietech Cubietruck Plus]]<br />
** [[Sinlinx SinA31s]]<br />
** [[Xunlong Orange Pi 2]]<br />
** [[Pine64]]<br />
** [[LicheePi Zero]]<br />
<br />
== v2016.03 ==<br />
[http://git.denx.de/?p=u-boot.git;a=shortlog;h=refs/tags/v2016.03 v2016.03 Release branch]<br />
<br />
* PRCM i2c support<br />
<br />
* A83T<br />
** LPDDR3 support<br />
<br />
* H3<br />
** USB host support<br />
** PSCI (security switches included)<br />
** sy8106a i2c-based regulator support<br />
<br />
* AXP PMICs<br />
** Power off support<br />
<br />
* Boards<br />
** [[Banana Pi M3]] (SinoVoip BPi-M3)<br />
<br />
{{knownProblems|1=<br><br />
* Commit [http://git.denx.de/?p=u-boot.git;a=commit;h=c32a6fd07b1839e4a45729587ebc8e1c55601a4d c32a6fd] breaks MII detection (and thus U-Boot networking) for sunxi GMAC.<br />
<br />
You might observe the PHY not initializing (e.g. no LED activity), and the command <code>mii&nbsp;info</code> likely will list useless information on all available PHY slots (0x00-0x1F). Commit [http://git.denx.de/?p=u-boot.git;a=commit;h=fc8991c61c393ce6a9d3dfc97cb56dbbd9e8cbba fc8991c] fixes it again, but unfortunately that means U-Boot release '''v2016.03 is affected'''.}}<br />
<br />
== v2016.01 ==<br />
[http://git.denx.de/?p=u-boot.git;a=shortlog;h=refs/tags/v2016.01 v2016.01 Release branch]<br />
* sun8i-H3 support<br />
<br />
* Boards<br />
** Empire Electronix D709 tablet<br />
** A83T HomletV2 Board<br />
** [[Lamobo R1]]<br />
** [[Xunlong Orange Pi Plus]]<br />
** [[Orange Pi PC|Xunlong Orange Pi PC]]<br />
** [[NextThingCo_CHIP | C.H.I.P.]]<br />
<br />
== v2015.10 ==<br />
[http://git.denx.de/?p=u-boot.git;a=shortlog;h=refs/tags/v2015.10 v2015.10 Release branch]<br />
<br />
* Console/display output<br />
:* ANX9804 LCD-eDP bridge chip support<br />
:* Composite video output support<br />
* NAND SPL driver<br />
<br />
* Boards<br />
** Olimex A20-SOM-EVB<br />
** A10s-Wobo-i5 (settop box)<br />
** Point of View pov protab2-ips9 tablet<br />
** Auxtek-T003 HDMI stick<br />
** A10 tablets based on the iNet-tek iNet-1 mainboard (e.g. Point of View Protab2 XXL, Cherry M1007)<br />
** A10 tablets based on the inet9f-rev03 mainboard (e.g. qware tb-g100 tablet)<br />
** A13 tablets based on on the inet98v_rev2 mainboard<br />
** A10 tablets based on the inet97fv2 mainboard<br />
** A23 tablets based on the gt90h-v4 mainboard<br />
<br />
== v2015.07 ==<br />
[http://git.denx.de/?p=u-boot.git;a=shortlog;h=refs/tags/v2015.07 v2015.07 Release branch]<br />
<br />
* Serial number support<br />
* Device model support<br />
** Ethernet<br />
** GPIO<br />
* sun8i (A33) support (including SPL)<br />
* sun9i (A80) basic support<br />
** UART<br />
** MMC<br />
* sun6i/sun8i<br />
** PSCI CPU hotplugging<br />
* SPL<br />
** <strike>NAND support</strike> reverted: [http://git.denx.de/?p=u-boot.git;a=commit;h=da9971d1b3bdb554d4a4ac948119f8b2616bbcce Revert commit]<br />
<br />
* Boards:<br />
** [[Mixtile LOFT-Q]]<br />
** [[Ainol AW1]]<br />
** [[Yones Toptech BD1078]]<br />
** [[iNet 3W]]<br />
** [[iNet 3F]]<br />
** [[ET-Q8 A33]]<br />
** [[Ippo q8h#v1.2 | Ippo q8h v1.2 A33 1024x600]]<br />
** [[ga10h v1.1]]<br />
** [[Merrii A80 Optimus Board]]<br />
<br />
== v2015.04 ==<br />
[http://git.denx.de/?p=u-boot.git;a=shortlog;h=refs/tags/v2015.04 v2015.04 Release branch]<br />
<br />
* sun7i (A20) [[PSCI]] CPU hotplug<br />
* sun8i (A23) SPL<br />
** RSB<br />
** AXP223<br />
<br />
* sun9i (A80) basic support<br />
** Clocks<br />
** RSB<br />
<br />
* Console/display output<br />
** VGA via internal DAC<br />
** VGA via external DAC on LCD interface<br />
** LVDS<br />
** SSD2828 MIPI bridge<br />
** tl059wv5c0 LCD panel<br />
<br />
* USB OTG<br />
<br />
* Boards:<br />
** [[CSQ CS908]]<br />
** [[Merrii Hummingbird A31]]<br />
** [[Ippo q8h#Q8H-V1.2 | Ippo q8h v1.2]]<br />
** [[MSI Primo81]]<br />
** [[MSI Primo73]]<br />
** [[LinkSprite pcDuino]]<br />
** [[LinkSprite pcDuino V2]]<br />
** [[LeMaker Banana Pro]]<br />
** [[Rikomagic mk802]]<br />
** [[Rikomagic mk802ii]]<br />
** [[Semitime g2]] (See also [[Format_MK802]] with A10s)<br />
** [[MarsBoard A10]]<br />
** [[Gemei G9]]<br />
** [[Chuwi V7 CW0825]]<br />
** [[Mele M5]]<br />
** [[Hyundai A7HD]]<br />
** [[LinkSprite pcDuino3 Nano]]<br />
** [[TZX-Q8-713B7]]<br />
** [[Inet 86vs]]<br />
** [[Ampe A76]]<br />
** [[Jesurun Q5]]<br />
** [[MK808C]]<br />
** [[Mele I7]]<br />
** [[Forfun Q88DB]]<br />
** [[Wits Pro A20 DKT]]<br />
** [[Xunlong Orange Pi]]<br />
** [[Xunlong Orange Pi Mini]]<br />
** [[Wexler TAB 7200]]<br />
<br />
== v2015.01 ==<br />
[http://git.denx.de/?p=u-boot.git;a=shortlog;h=refs/tags/v2015.01 v2015.01 Release branch]<br />
<br />
* sun6i (A31) processor support<br />
** P2WI<br />
** AXP221<br />
** SPL<br />
** GMAC<br />
* sun8i (A23) processor support (no SPL)<br />
* sun6i/sun8i reset support<br />
* Console/display output<br />
** HDMI only<br />
** simplefb<br />
<br />
* Boards:<br />
** [[Mele M3]]<br />
** [[Olimex A20-OLinuXino-Lime2]]<br />
** WITS Colombus Board<br />
** [[Mele M9]]<br />
<br />
== v2014.10 ==<br />
[http://git.denx.de/?p=u-boot.git;a=shortlog;h=refs/tags/v2014.10 v2014.10 Release branch]<br />
<br />
* AHCI (SATA)<br />
* sun4i (AKA A10) and sun5i (AKA A10s and A13) processors<br />
* EMAC Ethernet<br />
* AXP152 and AXP209 power controllers<br />
* EHCI USB<br />
* SMP support for sun7i via [[PSCI]].<br />
<br />
* Boards:<br />
** [[LeMaker Banana Pi]]<br />
<br />
== v2014.07 ==<br />
[http://git.denx.de/?p=u-boot.git;a=shortlog;h=refs/tags/v2014.07 v2014.07 Release branch]<br />
* sun7i (AKA A20) processors<br />
* MMC<br />
* GMAC Ethernet<br />
* Boards:<br />
** [[Cubietech Cubietruck]]<br />
<br />
= Supported Devices =<br />
<categorytree mode=pages hideroot=on>Mainline_U-Boot</categorytree><br />
Beware: some of the above might only be supported in the latest development version.<br />
<br />
= Compile U-Boot =<br />
<br />
== Get a toolchain ==<br />
<br />
If you haven't done so before, get a suitable [[toolchain]] installed and added to your PATH.<br />
<br />
== Get the Device-tree Compiler ==<br />
<br />
Depending on your desired U-Boot version, a sufficiently up-to-date ''dtc'' may be required. (The build process will error on an outdated ''dtc'', and request you to upgrade it.) The installation of dtc is described in the [[Device_Tree#Get_the_Device-tree_Compiler|Device tree article]].<br />
<br />
If you are going to build a Linux kernel alongside U-Boot, it might also be worth to examine the kernel sources - as they come with ''dtc'' included under <code>${KERNEL_DIR}/scripts/dtc/</code>.<br />
<br />
== Clone the repository ==<br />
<br />
You can clone the u-boot repository by running:<br />
<pre>git clone git://git.denx.de/u-boot.git</pre><br />
<br />
{{alert|You should prefer using a stable release, unless you're testing recently added boards or experimental features that have not yet made into stable release:<br />
<br />
git checkout v2016.01 # or whatever is latest<br />
}}<br />
== Determine build target ==<br />
<br />
Go to your u-boot tree and search in the directory ''configs/'' for your board, the file name looks like ''<board_name>_defconfig''.<br />
<br />
So, if your device is [[Cubietech Cubieboard2|Cubieboard2]] your build target is ''Cubieboard2_defconfig''.<br />
<br />
== Build ==<br />
When you have determined what <board_name> you want to build, configure:<br />
<pre>make CROSS_COMPILE=arm-linux-gnueabihf- <board_name>_defconfig</pre><br />
<br />
There is also menuconfig to play with settings if you feel like it:<br />
<pre>make CROSS_COMPILE=arm-linux-gnueabihf- menuconfig</pre><br />
<br />
Then just build it:<br />
<pre>make CROSS_COMPILE=arm-linux-gnueabihf-</pre><br />
<br />
or for A64:<br />
<br />
<pre> make ARCH=arm CROSS_COMPILE=aarch64-linux-gnu-</pre><br />
<br />
(When compiling natively, omit the <kbd>CROSS_COMPILE=…</kbd>)<br />
<br />
When the build has completed, there will be ''u-boot-sunxi-with-spl.bin'' available in your u-boot tree. The installation step will instruct how to install this on the installation media (e.g. a SD card), but first U-Boot needs to be configured.<br />
<br />
= Configure U-Boot =<br />
<br />
This article provides a collection of various scenarios for booting with U-Boot. <br />
<br />
== Boot ==<br />
<br />
For getting these bits loaded onto the hardware, please refer to the respective howto:<br />
* [[Bootable_SD_card#Bootloader | SD Card]]<br />
* [[Mainline_NAND_Howto#Booting_from_NAND|NAND]]<br />
* [[Bootable SPI flash | SPI NOR Flash]]<br />
* [[FEL/USBBoot | USB OTG]]<br />
* [[How_to_boot_the_A10_or_A20_over_the_network | Ethernet]]<br />
<br />
=== Booting with boot.cmd ===<br />
For booting from SD with mainline U-Boot, the recommended way is:<br />
<br />
* create a file ''boot.cmd'' on the first partition (also check [[Kernel arguments]] for extra 'bootargs' options):<br />
<br />
{| class="wikitable"<br />
! mainline kernel<br />
! sunxi-3.4 kernel<br />
|-<br />
|<br />
setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait panic=10<br />
load mmc 0:1 0x43000000 ${fdtfile} || load mmc 0:1 0x43000000 boot/${fdtfile}<br />
load mmc 0:1 0x42000000 uImage || load mmc 0:1 0x42000000 boot/uImage<br />
bootm 0x42000000 - 0x43000000<br />
||<br />
setenv bootm_boot_mode sec<br />
setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait panic=10<br />
load mmc 0:1 0x43000000 script.bin || load mmc 0:1 0x43000000 boot/script.bin<br />
load mmc 0:1 0x42000000 uImage || load mmc 0:1 0x42000000 boot/uImage<br />
bootm 0x42000000<br />
|}<br />
* If you also want to use an initramfs, please refer to the [[Initial Ramdisk]] article for details.<br />
<br />
:{{info|If you're wondering why setting '''bootm_boot_mode''' might be necessary for older kernels, have a look at the details of [[PSCI]].}}<br />
<br />
:{{note|Directly using a '''zImage''' is also supported by U-Boot for the sunxi platform.}} Substitute ''zImage'' in place of ''uImage'' in the commands above, and then use the '''bootz''' command instead of ''bootm''.<br />
<br />
=== Booting with extlinux.conf ===<br />
Mainline U-Boot also use syslinux/extlinux as payload.<br />
<br />
You need to install the boot configuration file extlinux.conf in an ext2/3/4 partition of SD card and U-Boot will find and execute it. This is conceptually identical to creating a GRUB configuration file on a desktop PC.<br />
<br />
Example extlinux.conf:<br />
<pre><br />
TIMEOUT 100<br />
DEFAULT default<br />
MENU TITLE Boot menu<br />
<br />
LABEL default<br />
MENU LABEL Default<br />
LINUX /zImage<br />
FDT /sun4i-a10-marsboard.dtb<br />
APPEND root=/dev/sda1 rootwait console=tty0 console=ttyS0,115200n8<br />
<br />
LABEL exit<br />
MENU LABEL Local boot script (boot.scr)<br />
LOCALBOOT 1<br />
</pre><br />
<br />
== Setting u-boot environment variables ==<br />
<br />
There is a difference in setting environment variables between the boot script and the U-Boot shell.<br />
<br />
Inside the shell you would set, for instance:<br />
<pre>setenv root /dev/sda1</pre><br />
<br />
But in the script you would use:<br />
<pre>root=/dev/sda1</pre><br />
<br />
== NAND ==<br />
Example U-Boot environment, as found in <code>uEnv.txt</code> from a stock android U-Boot environment partition<br />
<br />
<pre>bootdelay=0<br />
bootcmd=run setargs boot_normal<br />
console=ttyS0,115200<br />
nand_root=/dev/nandc<br />
mmc_root=/dev/mmcblk0p4<br />
init=/init<br />
loglevel=8<br />
setargs=setenv bootargs console=${console} root=${nand_root} init=${init} loglevel=${loglevel}<br />
boot_normal=nand read 40007800 boot;boota 40007800<br />
boot_recovery=nand read 40007800 recovery;boota 40007800<br />
boot_fastboot=fastboot</pre><br />
<br />
== NFS ==<br />
<br />
Recent version of U-Boot are able to boot from NFS as well as TFTP, but you have to get rid of the automatic setup of FTP. Check [[How_to_boot_the_A10_or_A20_over_the_network | Ethernet]] for more information.<br />
<br />
{{Note|on the A20 based cubieboards, this only seems to work on the stable kernel, not on stage.}}<br />
<br />
== FB console ==<br />
<br />
To get U-Boot output shown on the built-in framebuffer driver (currently, HDMI only at 1024x768), add the following to your boot.cmd:<br />
<pre>setenv stdout=serial,vga<br />
setenv stderr=serial,vga</pre><br />
The default environment has these values set as well.<br />
<br />
== LCD Settings ==<br />
<br />
There is a [[LCD|separate wiki page about configuring LCD]] in U-Boot.<br />
<br />
= Install U-Boot =<br />
<br />
* Convert the ''boot.cmd'' to ''boot.scr'' using [[U-Boot/Tools#mkimage|mkimage]]:<br />
<br />
mkimage -C none -A arm -T script -d boot.cmd boot.scr<br />
<br />
* Copy the bootloader to the installation media<br />
<br />
dd if=u-boot-sunxi-with-spl.bin of=/dev/sdX bs=1024 seek=8<br />
<br />
* copy kernel files to the first partition<br />
** For a 3.4 kernel you need ''uImage'' (linux kernel) and ''script.bin'' (binary representation of [[Fex Guide|FEX]]).<br />
** For a device tree based kernel ("mainline", 4.x) you need the kernel image (''uImage'' or ''zImage'') and the device-specific ''.dtb'' file (the one referenced in the ''${fdtfile}'' above) that is generated as part of your kernel compilation.<br />
<br />
Look at [[Manual build howto]] for more details.<br />
<br />
= Troubleshooting =<br />
<br />
== USB 1.x, USB keyboards (U-Boot < v2015.07) ==<br />
<br />
'''U-Boot v2015.07 and later shouldn't have problems supporting mixed USB 1.x/2.0 devices.''' OHCI and EHCI no longer conflict with each other (after the switch to device model).<br />
<br />
Previous U-Boot versions (v2015.04 and older) have a problem supporting both USB 1.x (OHCI) and USB 2.0 (EHCI) at the same time - the latter includes the ''SUNXI_EHCI'' driver for Allwinner boards.<br />
<br />
:Unfortunately, this also affects many '''USB HID / keyboard''' devices which would not be detected properly by U-Boot. The typical message in this case is "''cannot reset port N!?''", where ''N'' is whichever USB port those devices were attached to.<br />
<br />
{{info|A possible workaround is to place an external USB 2.0 hub between your board and these USB devices.}}<br />
<br />
See: http://lists.denx.de/pipermail/u-boot/2015-January/200162.html.<br />
<br />
== U-Boot 2015.07+ won't start ==<br />
If you're using a recent (device model based) U-Boot, and the SPL just hangs after initializing the DRAM (<code>CPU: 912000000Hz, AXI/AHB/APB: 3/2/2</code> or something similar), chances are that your main U-Boot binary may be missing DTB information / a proper [[device tree]]. Depending on the (possibly outdated) instructions you followed: double-check that you're not incorrectly using ''u-boot.bin'' instead of ''u-boot'''-dtb'''.bin'', or ''u-boot.img'' instead of ''u-boot'''-dtb'''.img''.<br />
<br />
== Legacy kernel won't start ==<br />
* If your 3.4.x kernel refuses to boot / gets stuck right after ''"Starting kernel ..."'': Double-check that '''bootm_boot_mode''' is set to "'''sec'''"! (see [[#Boot|above]])<br />
* If you don't have a serial console and only use VGA/HDMI/LCD, then it might be also the case of "Unrecognized/unsupported machine ID" (see [[#Unrecognized.2Funsupported_machine_ID|below]]).<br />
<br />
== Unrecognized/unsupported machine ID ==<br />
The sunxi-3.4 kernel may fail to boot with one of the following error messages on the serial console (but this message is not visible on a HDMI monitor or a LCD display!):<br />
<pre><br />
Error: unrecognized/unsupported machine ID (r1 = 0x10001008).<br />
Error: unrecognized/unsupported machine ID (r1 = 0x1000102a).<br />
Error: unrecognized/unsupported machine ID (r1 = 0x100010bb).<br />
</pre><br />
In this case either upgrade to a recent ''stage/sunxi-3.4'' kernel ([https://github.com/linux-sunxi/linux-sunxi/tree/stage/sunxi-3.4 github branch]) - or try to '''"Enable workarounds for booting old kernels"''' in U-Boot:<br />
:<code>make menuconfig</code> or <code>make CROSS_COMPILE=arm-linux-gnueabihf- menuconfig</code>, the option is located under "ARM architecture". (Make sure to rebuild your U-Boot after changing it.)<br />
<br />
If upgrading to ''stage/sunxi-3.4'' is not an option (i.e. using some old and very much diverged<br />
sunxi-3.4 fork is really necessary), then the following patches can be cherry-picked (=&nbsp;selectively merged <u>as a set</u>):<br />
<pre><br />
wget https://github.com/linux-sunxi/linux-sunxi/commit/5052b83aa44dc16d6662d8d9d936166c139ad8c5.patch<br />
wget https://github.com/linux-sunxi/linux-sunxi/commit/9a1cd034181af628d4145202289e1993c1687db6.patch<br />
wget https://github.com/linux-sunxi/linux-sunxi/commit/c4c4664ed1a2f35e54a33ae4e65f517721ff43b5.patch<br />
wget https://github.com/linux-sunxi/linux-sunxi/commit/ade08aa6e5249a9e75a97393e86c250b2bcb3ec8.patch<br />
wget https://github.com/linux-sunxi/linux-sunxi/commit/16b25a95327f45a995f6efcf3e9d83a414231af9.patch<br />
wget https://github.com/linux-sunxi/linux-sunxi/commit/dea62f21deb177053b84b15a519dff6c74d061d9.patch<br />
wget https://github.com/linux-sunxi/linux-sunxi/commit/d47d367036be38c5180632ec8a3ad169a4593a88.patch<br />
git am 5052b83aa44dc16d6662d8d9d936166c139ad8c5.patch<br />
git am 9a1cd034181af628d4145202289e1993c1687db6.patch<br />
git am c4c4664ed1a2f35e54a33ae4e65f517721ff43b5.patch<br />
git am ade08aa6e5249a9e75a97393e86c250b2bcb3ec8.patch<br />
git am 16b25a95327f45a995f6efcf3e9d83a414231af9.patch<br />
git am dea62f21deb177053b84b15a519dff6c74d061d9.patch<br />
git am d47d367036be38c5180632ec8a3ad169a4593a88.patch<br />
</pre><br />
{{warn|It is required to apply '''all''' of them, as they contain important stability/safety changes. The last patch in this series only takes care of the safety guard, which exists there specifically to block booting problematic kernels. Just removing the safety guard alone without applying all the bugfixes will lead to obscure runtime problems, please don't be tempted to do this.|}}<br />
<br />
<br />
== ImportError: No module named _libfdt ==<br />
<br />
If you see the following error when compiling on Arch Linux arm<br />
<pre><br />
ImportError: No module named _libfdt<br />
</pre><br />
<br />
install dtc<br />
<pre><br />
sudo pacman -S dtc<br />
</pre><br />
<br />
= Adding a new device to upstream U-Boot =<br />
<br />
http://lists.denx.de/pipermail/u-boot/2014-December/199351.html<br />
<br />
== DRAM Settings ==<br />
<br />
=== Failsafe DRAM settings, based on standard JEDEC timings ===<br />
<br />
Each device has DRAM settings configured in its defconfig file in the U-Boot "configs" directory (here is [http://git.denx.de/?p=u-boot.git;a=blob;f=configs/Cubietruck_defconfig;h=b64f84f2b8d2d48bed3130aecd31d220013061f0;hb=HEAD an example for the Cubietruck board]). The slow failsafe DRAM settings for an A10/A13/A20 device may look like:<br />
<pre style="background-color: lightgreen;"><br />
+S:CONFIG_DRAM_CLK=360<br />
+S:CONFIG_DRAM_ZQ=123<br />
+S:CONFIG_DRAM_EMR1=4<br />
+S:CONFIG_DRAM_TIMINGS_DDR3_800E_1066G_1333J=y<br />
</pre><br />
<br />
A more complete set of available Kconfig options and their descriptions can be found here: http://git.denx.de/?p=u-boot.git;a=blob;f=board/sunxi/Kconfig;h=e1d4ab148f0838d746889775cfbab5bed57838bf;hb=a705ebc81b7f91bbd0ef7c634284208342901149#l177<br />
<br />
=== The settings from the Android firmware ===<br />
<br />
Somewhat better settings can be retrieved by the [[Retrieving_device_information#Reading_memory_information_from_registers|meminfo tool]] from the stock Android or GNU/Linux system, provided by the device manufacturer. It still makes sense to [[Hardware_Reliability_Tests#DRAM|test the reliability]] of the resulting DRAM configuration. Because some vendors are providing poor configuration for ZQ or EMR1, but nevertheless trying to optimistically set the DRAM clock speed too high.<br />
<br />
=== Performance optimized DRAM settings ===<br />
<br />
Tuning DRAM setting for each individual board can provide much better performance than the failsafe defaults. This involves trial and error testing of different settings using a tool until an optimal combination is found. The [[DRAM_Controller|DRAM Controller page]] provides links to start researching this topic. This approach will be time consuming, so a satisfactory solution using one of the other approaches may be best to start with.<br />
<br />
= See also =<br />
* [[Mainline Kernel Howto]]<br />
<br />
[[Category:Tutorial]]<br />
[[Category:Software]]<br />
[[Category:Development]]<br />
[[Category:Boot]]</div>Kezioliohttps://linux-sunxi.org/index.php?title=File:Beelink_x2_front.jpg&diff=17957File:Beelink x2 front.jpg2016-07-22T12:59:54Z<p>Keziolio: Keziolio uploaded a new version of &quot;File:Beelink x2 front.jpg&quot;: new pic</p>
<hr />
<div>beelink x2 front</div>Kezioliohttps://linux-sunxi.org/index.php?title=File:Beelink_X2_back.jpg&diff=17956File:Beelink X2 back.jpg2016-07-22T12:56:04Z<p>Keziolio: Keziolio uploaded a new version of &quot;File:Beelink X2 back.jpg&quot;: Reverted to version as of 12:54, 22 July 2016</p>
<hr />
<div>Beelink X2 back</div>Kezioliohttps://linux-sunxi.org/index.php?title=File:Beelink_X2_back.jpg&diff=17955File:Beelink X2 back.jpg2016-07-22T12:54:34Z<p>Keziolio: Keziolio uploaded a new version of &quot;File:Beelink X2 back.jpg&quot;: Reverted to version as of 12:53, 22 July 2016</p>
<hr />
<div>Beelink X2 back</div>Kezioliohttps://linux-sunxi.org/index.php?title=File:Beelink_X2_back.jpg&diff=17954File:Beelink X2 back.jpg2016-07-22T12:54:18Z<p>Keziolio: Keziolio uploaded a new version of &quot;File:Beelink X2 back.jpg&quot;</p>
<hr />
<div>Beelink X2 back</div>Kezioliohttps://linux-sunxi.org/index.php?title=File:Beelink_X2_back.jpg&diff=17953File:Beelink X2 back.jpg2016-07-22T12:53:02Z<p>Keziolio: Keziolio uploaded a new version of &quot;File:Beelink X2 back.jpg&quot;</p>
<hr />
<div>Beelink X2 back</div>Kezioliohttps://linux-sunxi.org/index.php?title=File:Beelink_X2_back.jpg&diff=17952File:Beelink X2 back.jpg2016-07-22T12:38:20Z<p>Keziolio: Beelink X2 back</p>
<hr />
<div>Beelink X2 back</div>Kezioliohttps://linux-sunxi.org/index.php?title=File:Beelink_x2_front.jpg&diff=17951File:Beelink x2 front.jpg2016-07-22T12:36:58Z<p>Keziolio: beelink x2 front</p>
<hr />
<div>beelink x2 front</div>Keziolio