blob: 5a65673d1e06a06494145b88dc3bff3cb6aac5d9 [file] [log] [blame]
Bin Mengdec93f32019-07-18 00:34:09 -07001.. SPDX-License-Identifier: GPL-2.0+
2.. sectionauthor:: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
3
4Edison
5======
6
7Build Instructions for U-Boot as main bootloader
8------------------------------------------------
9
10Simple you can build U-Boot and obtain u-boot.bin::
11
12 $ make edison_defconfig
13 $ make all
14
15Updating U-Boot on Edison
16-------------------------
17
18By default Intel Edison boards are shipped with preinstalled heavily
19patched U-Boot v2014.04. Though it supports DFU which we may be able to
20use.
21
221. Prepare u-boot.bin as described in chapter above. You still need one
23 more step (if and only if you have original U-Boot), i.e. run the
24 following command::
25
Andy Shevchenkodf5811d2020-11-27 17:59:09 +020026 $ truncate -s %4096 u-boot.bin
Bin Mengdec93f32019-07-18 00:34:09 -070027
282. Run your board and interrupt booting to U-Boot console. In the console
29 call::
30
Andy Shevchenkodf5811d2020-11-27 17:59:09 +020031 => run do_force_flash_os
Bin Mengdec93f32019-07-18 00:34:09 -070032
333. Wait for few seconds, it will prepare environment variable and runs
34 DFU. Run DFU command from the host system::
35
Andy Shevchenkodf5811d2020-11-27 17:59:09 +020036 $ dfu-util -v -d 8087:0a99 --alt u-boot0 -D u-boot.bin
Bin Mengdec93f32019-07-18 00:34:09 -070037
384. Return to U-Boot console and following hint. i.e. push Ctrl+C, and
39 reset the board::
40
Andy Shevchenkodf5811d2020-11-27 17:59:09 +020041 => reset
Simon Glass138b2d22020-09-06 10:35:35 -060042
43Updating U-Boot using xFSTK
44---------------------------
45
46You can also update U-Boot using the xfstk-dldr-solo tool if you can build it.
Andy Shevchenkodf5811d2020-11-27 17:59:09 +020047One way to do that is to follow the `xFSTK`_ instructions. In short, after you
48install all necessary dependencies and clone repository, it will look like this:
49
50.. code-block:: sh
51
52 cd xFSTK
53 export DISTRIBUTION_NAME=ubuntu20.04
54 export BUILD_VERSION=1.8.5
55 git checkout v$BUILD_VERSION
56 ...
57
58Once you have built it, you can copy xfstk-dldr-solo to /usr/local/bin and
Simon Glass138b2d22020-09-06 10:35:35 -060059libboost_program_options.so.1.54.0 to /usr/lib/i386-linux-gnu/ and with luck
Andy Shevchenkodf5811d2020-11-27 17:59:09 +020060it will work. You might find this `drive`_ helpful.
Simon Glass138b2d22020-09-06 10:35:35 -060061
Andy Shevchenkodf5811d2020-11-27 17:59:09 +020062If it does, then you can download and unpack the Edison recovery image,
63install dfu-util, reset your board and flash U-Boot like this:
Simon Glass138b2d22020-09-06 10:35:35 -060064
Andy Shevchenkodf5811d2020-11-27 17:59:09 +020065.. code-block:: sh
66
67 xfstk-dldr-solo --gpflags 0x80000007 \
Simon Glass138b2d22020-09-06 10:35:35 -060068 --osimage u-boot-edison.img \
69 --fwdnx recover/edison_dnx_fwr.bin \
70 --fwimage recover/edison_ifwi-dbg-00.bin \
71 --osdnx recover/edison_dnx_osr.bin
72
73This should show the following
74
75.. code-block:: none
76
Andy Shevchenkodf5811d2020-11-27 17:59:09 +020077 XFSTK Downloader Solo 1.8.5
Simon Glass138b2d22020-09-06 10:35:35 -060078 Copyright (c) 2015 Intel Corporation
79 Build date and time: Aug 15 2020 15:07:13
80
81 .Intel SoC Device Detection Found
82 Parsing Commandline....
83 Registering Status Callback....
84 .Initiating Download Process....
85 .......(lots of dots)........XFSTK-STATUS--Reconnecting to device - Attempt #1
86 .......(even more dots)......................
87
Simon Glass138b2d22020-09-06 10:35:35 -060088You have about 10 seconds after resetting the board to type the above command.
89If you want to check if the board is ready, type:
90
91.. code-block:: none
92
Andy Shevchenkodf5811d2020-11-27 17:59:09 +020093 lsusb | egrep "8087|8086"
Simon Glass138b2d22020-09-06 10:35:35 -060094 Bus 001 Device 004: ID 8086:e005 Intel Corp.
95
96If you see a device with the same ID as above, the board is waiting for your
97command.
98
99After about 5 seconds you should see some console output from the board:
100
101.. code-block:: none
102
103 ******************************
104 PSH KERNEL VERSION: b0182b2b
105 WR: 20104000
106 ******************************
107
108 SCU IPC: 0x800000d0 0xfffce92c
109
110 PSH miaHOB version: TNG.B0.VVBD.0000000c
111
112 microkernel built 11:24:08 Feb 5 2015
113
114 ******* PSH loader *******
115 PCM page cache size = 192 KB
116 Cache Constraint = 0 Pages
117 Arming IPC driver ..
118 Adding page store pool ..
119 PagestoreAddr(IMR Start Address) = 0x04899000
120 pageStoreSize(IMR Size) = 0x00080000
121
122 *** Ready to receive application ***
123
Andy Shevchenkodf5811d2020-11-27 17:59:09 +0200124After another 10 seconds the xFSTK tool completes and the board resets. About
12510 seconds after that should see the above message again and then within a few
126seconds U-Boot should start on your board:
Simon Glass138b2d22020-09-06 10:35:35 -0600127
128.. code-block:: none
129
130 U-Boot 2020.10-rc3 (Sep 03 2020 - 18:44:28 -0600)
131
132 CPU: Genuine Intel(R) CPU 4000 @ 500MHz
133 DRAM: 980.6 MiB
134 WDT: Started with servicing (60s timeout)
135 MMC: mmc@ff3fc000: 0, mmc@ff3fa000: 1
136 Loading Environment from MMC... OK
137 In: serial
138 Out: serial
139 Err: serial
140 Saving Environment to MMC... Writing to redundant MMC(0)... OK
141 Saving Environment to MMC... Writing to MMC(0)... OK
142 Net: No ethernet found.
143 Hit any key to stop autoboot: 0
144 Target:blank
145 Partitioning using GPT
146 Writing GPT: success!
147 Saving Environment to MMC... Writing to redundant MMC(0)... OK
148 Flashing already done...
149 5442816 bytes read in 238 ms (21.8 MiB/s)
150 Valid Boot Flag
151 Setup Size = 0x00003c00
152 Magic signature found
153 Using boot protocol version 2.0c
154 Linux kernel version 3.10.17-poky-edison+ (ferry@kalamata) #1 SMP PREEMPT Mon Jan 11 14:54:18 CET 2016
155 Building boot_params at 0x00090000
156 Loading bzImage at address 100000 (5427456 bytes)
157 Magic signature found
Andy Shevchenkodf5811d2020-11-27 17:59:09 +0200158 Kernel command line: "rootwait ..."
Simon Glass138b2d22020-09-06 10:35:35 -0600159 Magic signature found
160
161 Starting kernel ...
162
163 ...
164
165 Poky (Yocto Project Reference Distro) 1.7.2 edison ttyMFD2
166
167 edison login:
168
Andy Shevchenkodf5811d2020-11-27 17:59:09 +0200169.. _xFSTK: https://github.com/edison-fw/xFSTK
Simon Glass138b2d22020-09-06 10:35:35 -0600170.. _drive: https://drive.google.com/drive/u/0/folders/1URPHrOk9-UBsh8hjv-7WwC0W6Fy61uAJ