Hello fellow slackers, here we continue the process...
This stage is apparently referred to as
installing the SPL by sunxsi:
1. We need to obtain an
u_boot - it's source code and it's maintained
here. I got 2017.01
2. To be able to build it we either have to be
native (build it on ARM host) or use a
toolchain (in next post in more detail), i used the last time's
linaro 5.3.1, links apparently obsolete quickly, so please use a search engine and the site structure, to locate the current one?
3. the build result is the file named
Code:
u-boot-sunxi-with-spl.bin
note the
spl it stands for
secondary
program
loader, we used to call
BIOS on x86.
We need put this to where the SBC can find it - an MMC and on the spacial location:
Code:
start size usage
0 8KB Unused, available for partition table etc.
8 24KB Initial SPL loader
32 512KB U-Boot
544 128KB environment
672 352KB reserved
1024 - Free for partitions
according to sunxi.org.
This apparently populates the "track zero" of our "flash-disk"
The partition usually begins at 2048...
drmozes has us covered with the preparation of most orange_pi SBCs. And while he prepares all for us, I used his scripts and the "empty image" as following:
Code:
dd if=u_boot-build/u-boot-sunxi-with-spl.bin of=empty_image.img bs=1k seek=8
so I got my SPL in place where it belongs on a real "drive".
then I just applied it over an dedicated MMC:
Code:
# dd if=empty_image.img of=/dev/sdc
NOTE:
this is the first step one has to make as root,
i used
/dev/sdc as it's the
correct device for me -
use most caution when finding out the proper device - or loose data at You own risk!
and my SPL was in place for me to try boot the OPI-PC:
MMC --> slot
2A (or better) 5V PSU (led driver comes to mind)
UART converter (or anything talking serial) to the OPI_PC header (care to "X" the TX and RX - TX-->RX RX-->TX GND-->GND)
open a terminal:
Code:
# screen -T screen-256color /dev/ttyUSB0 115200,-crtscts
(it becomes blank) (i use root for convenience- otherwise check user is in the right group (
dialout?))
power on the OPI_PC
and it happily spews away:
Code:
U-Boot SPL 2017.01 (Jan 12 2017 - 19:48:33)
DRAM: 1024 MiB
Trying to boot from MMC1
U-Boot 2017.01 (Jan 12 2017 - 19:48:33 +0100) Allwinner Technology
CPU: Allwinner H3 (SUN8I 1680)
Model: Xunlong Orange Pi PC
I2C: ready
DRAM: 1 GiB
MMC: SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment
In: serial
Out: serial
Err: serial
Net: phy interface0
eth0: ethernet@1c30000
starting USB...
USB0: USB EHCI 1.00
USB1: USB OHCI 1.0
USB2: USB EHCI 1.00
USB3: USB OHCI 1.0
USB4: USB EHCI 1.00
USB5: USB OHCI 1.0
scanning bus 0 for devices... 1 USB Device(s) found
scanning bus 2 for devices... 1 USB Device(s) found
scanning bus 4 for devices... 1 USB Device(s) found
Hit any key to stop autoboot: 0
=> <INTERRUPT>
I might note the SPL got (DHCPd's) IP, so Ethernet seems supported by the mainline u_boot.