xref: /OK3568_Linux_fs/buildroot/board/technexion/imx7dpico/readme.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun****************************
2*4882a593SmuzhiyunTechnexion i.MX7D Pico board
3*4882a593Smuzhiyun****************************
4*4882a593Smuzhiyun
5*4882a593SmuzhiyunThis file documents the Buildroot support for the Technexion i.MX7D Pico board.
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunBuild
8*4882a593Smuzhiyun=====
9*4882a593Smuzhiyun
10*4882a593SmuzhiyunFirst, configure Buildroot for the i.MX7D Pico board:
11*4882a593Smuzhiyun
12*4882a593Smuzhiyun  make imx7dpico_defconfig
13*4882a593Smuzhiyun
14*4882a593SmuzhiyunBuild all components:
15*4882a593Smuzhiyun
16*4882a593Smuzhiyun  make
17*4882a593Smuzhiyun
18*4882a593SmuzhiyunYou will find in output/images/ the following files:
19*4882a593Smuzhiyun  - imx7d-pico.dtb
20*4882a593Smuzhiyun  - rootfs.ext4
21*4882a593Smuzhiyun  - rootfs.tar
22*4882a593Smuzhiyun  - sdcard.img
23*4882a593Smuzhiyun  - u-boot-dtb.img
24*4882a593Smuzhiyun  - SPL
25*4882a593Smuzhiyun  - zImage
26*4882a593Smuzhiyun
27*4882a593SmuzhiyunFlash U-Boot and SPL
28*4882a593Smuzhiyun=====
29*4882a593Smuzhiyun
30*4882a593SmuzhiyunNote: This method is convenient for development purposes.
31*4882a593SmuzhiyunIf the eMMC has already a U-Boot flashed with DFU support then
32*4882a593Smuzhiyunthe user can go to step 2 below in order to update U-Boot.
33*4882a593Smuzhiyun
34*4882a593SmuzhiyunPut pico board in USB download mode (refer to the PICO-iMX7D Quick Start Guide
35*4882a593Smuzhiyunpage 3)
36*4882a593Smuzhiyun
37*4882a593SmuzhiyunConnect a USB to serial adapter between the host PC and pico.
38*4882a593Smuzhiyun
39*4882a593SmuzhiyunConnect a USB cable between the OTG pico port and the host PC.
40*4882a593Smuzhiyun
41*4882a593SmuzhiyunNote: Some computers may be a bit strict with USB current draw and will
42*4882a593Smuzhiyunshut down their ports if the draw is too high. The solution for that is
43*4882a593Smuzhiyunto use an externally powered USB hub between the board and the host computer.
44*4882a593Smuzhiyun
45*4882a593SmuzhiyunOpen a terminal program such as minicom.
46*4882a593Smuzhiyun
47*4882a593SmuzhiyunCopy SPL and u-boot-dtb.img to the imx_usb_loader folder.
48*4882a593Smuzhiyun
49*4882a593SmuzhiyunLoad the SPL binary via USB:
50*4882a593Smuzhiyun
51*4882a593Smuzhiyun$ sudo ./imx_usb SPL
52*4882a593Smuzhiyun
53*4882a593SmuzhiyunLoad the u-boot-dtb.img binary via USB:
54*4882a593Smuzhiyun
55*4882a593Smuzhiyun$ sudo ./imx_usb u-boot-dtb.img
56*4882a593Smuzhiyun
57*4882a593SmuzhiyunThen U-Boot starts and its messages appear in the console program.
58*4882a593Smuzhiyun
59*4882a593SmuzhiyunUse the default environment variables:
60*4882a593Smuzhiyun
61*4882a593Smuzhiyun=> env default -f -a
62*4882a593Smuzhiyun=> saveenv
63*4882a593Smuzhiyun
64*4882a593SmuzhiyunRun the DFU agent so we can flash the new images using dfu-util tool:
65*4882a593Smuzhiyun
66*4882a593Smuzhiyun=> dfu 0 mmc 0
67*4882a593Smuzhiyun
68*4882a593SmuzhiyunFlash SPL and u-boot-dtb.img into the eMMC running the following commands on a PC:
69*4882a593Smuzhiyun
70*4882a593Smuzhiyun$ sudo dfu-util -D SPL -a spl
71*4882a593Smuzhiyun
72*4882a593Smuzhiyun$ sudo dfu-util -D u-boot-dtb.img -a u-boot
73*4882a593Smuzhiyun
74*4882a593SmuzhiyunRemove power from the pico board.
75*4882a593Smuzhiyun
76*4882a593SmuzhiyunPut pico board into normal boot mode.
77*4882a593Smuzhiyun
78*4882a593SmuzhiyunPower up the board and the new updated U-Boot should boot from eMMC.
79*4882a593Smuzhiyun
80*4882a593SmuzhiyunFlash the eMMC
81*4882a593Smuzhiyun==============
82*4882a593Smuzhiyun
83*4882a593SmuzhiyunIn the U-Boot prompt lauch:
84*4882a593Smuzhiyun
85*4882a593Smuzhiyun=> ums 0 mmc 0
86*4882a593Smuzhiyun
87*4882a593SmuzhiyunThis will mount the eMMC content in the host PC as a mass storage device.
88*4882a593Smuzhiyun
89*4882a593SmuzhiyunTo determine the device associated to the eMMC card have a look in the
90*4882a593Smuzhiyun/proc/partitions file:
91*4882a593Smuzhiyun
92*4882a593Smuzhiyun  cat /proc/partitions
93*4882a593Smuzhiyun
94*4882a593SmuzhiyunBuildroot prepares a bootable "sdcard.img" image in the output/images/
95*4882a593Smuzhiyundirectory, ready to be dumped on the eMMC card. Launch the following
96*4882a593Smuzhiyuncommand as root:
97*4882a593Smuzhiyun
98*4882a593Smuzhiyun  dd if=output/images/sdcard.img of=/dev/<your-sd-device>
99*4882a593Smuzhiyun
100*4882a593Smuzhiyun*** WARNING! This will destroy all the eMMC content. Use with care! ***
101*4882a593Smuzhiyun
102*4882a593SmuzhiyunFor details about the medium image layout, see the definition in
103*4882a593Smuzhiyunboard/freescale/common/imx/genimage.cfg.template.
104*4882a593Smuzhiyun
105*4882a593SmuzhiyunBoot the i.MX7D Pico board
106*4882a593Smuzhiyun==========================
107*4882a593Smuzhiyun
108*4882a593SmuzhiyunTo boot your newly created system:
109*4882a593Smuzhiyun- put a micro USB cable into the Debug USB Port and connect using a terminal
110*4882a593Smuzhiyun  emulator at 115200 bps, 8n1;
111*4882a593Smuzhiyun- power on the board.
112*4882a593Smuzhiyun
113*4882a593SmuzhiyunUsing Wifi
114*4882a593Smuzhiyun==========
115*4882a593Smuzhiyun
116*4882a593Smuzhiyun# modprobe brcmfmac
117*4882a593Smuzhiyun# iwconfig wlan0 essid ACCESSPOINTNAME
118*4882a593Smuzhiyun# wpa_passphrase ACCESSPOINTNAME > /etc/wpa.conf
119*4882a593Smuzhiyun(enter the wifi password and press enter)
120*4882a593Smuzhiyun# wpa_supplicant -Dwext -iwlan0 -c /etc/wpa.conf &
121*4882a593Smuzhiyun# udhcpc -i wlan0
122*4882a593Smuzhiyun# ping buildroot.org
123*4882a593Smuzhiyun
124*4882a593SmuzhiyunEnjoy!
125