xref: /OK3568_Linux_fs/buildroot/board/solidrun/macchiatobin/readme.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunIntro
2*4882a593Smuzhiyun=====
3*4882a593Smuzhiyun
4*4882a593SmuzhiyunThis default configuration will allow you to start experimenting with
5*4882a593Smuzhiyunthe buildroot environment for the MacchiatoBin board based on the
6*4882a593SmuzhiyunMarvell Armada 8040 SoC. Documentation for the board hardware and
7*4882a593Smuzhiyunsoftware is available on the wiki at: http://wiki.macchiatobin.net
8*4882a593Smuzhiyun
9*4882a593SmuzhiyunThis default configuration will bring up the board and allow access
10*4882a593Smuzhiyunthrough the serial console.
11*4882a593Smuzhiyun
12*4882a593SmuzhiyunHow to build
13*4882a593Smuzhiyun============
14*4882a593Smuzhiyun
15*4882a593SmuzhiyunDefault configuration provides the following BSP versions:
16*4882a593Smuzhiyun - Linux v5.6.3 (mainline)
17*4882a593Smuzhiyun - U-Boot v2020.01 (mainline)
18*4882a593Smuzhiyun - ATF v1.5-18.12.2 (Marvell)
19*4882a593Smuzhiyun
20*4882a593SmuzhiyunTo build images run the following commands:
21*4882a593Smuzhiyun
22*4882a593Smuzhiyun    $ make solidrun_macchiatobin_defconfig
23*4882a593Smuzhiyun    $ make
24*4882a593Smuzhiyun
25*4882a593SmuzhiyunHow to write the SD card
26*4882a593Smuzhiyun========================
27*4882a593Smuzhiyun
28*4882a593SmuzhiyunOnce the build process is finished you will have an image
29*4882a593Smuzhiyuncalled "sdcard.img" in the output/images/ directory.
30*4882a593Smuzhiyun
31*4882a593SmuzhiyunCopy the bootable "sdcard.img" onto an SD card with "dd":
32*4882a593Smuzhiyun
33*4882a593Smuzhiyun  $ sudo dd if=output/images/sdcard.img of=/dev/sdX bs=1M conv=fsync
34*4882a593Smuzhiyun  $ sudo sync
35*4882a593Smuzhiyun
36*4882a593SmuzhiyunHow to boot the board
37*4882a593Smuzhiyun=====================
38*4882a593Smuzhiyun
39*4882a593SmuzhiyunThe MacchiatoBin board can be setup to load the bootloader from
40*4882a593Smuzhiyundifferent sources including eMMC, SPI flash, and SD-card.
41*4882a593Smuzhiyun
42*4882a593SmuzhiyunOn Rev 1.2 board to select boot from SD-card the DIP switches
43*4882a593SmuzhiyunSW1 and SW2 should be configured as follows:
44*4882a593Smuzhiyun
45*4882a593SmuzhiyunSW2: 01110
46*4882a593SmuzhiyunSW1: 1xxxx
47*4882a593Smuzhiyun
48*4882a593SmuzhiyunThe upcoming Rev 1.3 board will have a single pins header J1 instead
49*4882a593Smuzhiyunof the SW1/2 DIP switches. To boot from SD-card the setting of J1
50*4882a593Smuzhiyunjumpers should match the DIP switches of Rev v1.2 board
51*4882a593Smuzhiyunfrom left to right:
52*4882a593Smuzhiyun
53*4882a593SmuzhiyunJ1: 011101xxxx
54*4882a593Smuzhiyun
55*4882a593SmuzhiyunInsert the micro SDcard in the MacchiatoBin board and power it up.
56*4882a593SmuzhiyunThe serial console is accessible at the micro-USB Type-B connector
57*4882a593Smuzhiyunmarked CON9. The serial line settings are 115200 8N1.
58*4882a593Smuzhiyun
59*4882a593SmuzhiyunU-Boot environment
60*4882a593Smuzhiyun==================
61*4882a593Smuzhiyun
62*4882a593SmuzhiyunBy default current configuration provides U-Boot that keeps environment
63*4882a593Smuzhiyunin SD/eMMC. However, if needed, u-boot-fragment.config can be tweaked
64*4882a593Smuzhiyunso that U-Boot will keep environment in SPI flash. On the first boot
65*4882a593SmuzhiyunSPI flash may be empty or it may contain a stale environment that
66*4882a593Smuzhiyunprevents proper boot. Then the following commands can be used
67*4882a593Smuzhiyunto boot the board:
68*4882a593Smuzhiyun
69*4882a593Smuzhiyun=> ext4load mmc 1:1 0x01700000 /boot/uEnv-example.txt
70*4882a593Smuzhiyun=> env import -t 0x01700000 $filesize
71*4882a593Smuzhiyun=> boot
72*4882a593Smuzhiyun
73*4882a593SmuzhiyunThe example environment from uEnv-example.txt can be written to
74*4882a593SmuzhiyunSPI flash using the following commands:
75*4882a593Smuzhiyun
76*4882a593Smuzhiyun=> env default -f -a
77*4882a593Smuzhiyun=> ext4load mmc 1:1 0x01700000 /boot/uEnv-example.txt
78*4882a593Smuzhiyun=> env import -t 0x01700000 $filesize
79*4882a593Smuzhiyun=> saveenv
80