Bin Meng | dec93f3 | 2019-07-18 00:34:09 -0700 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0+ |
| 2 | .. sectionauthor:: Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
| 3 | |
| 4 | Edison |
| 5 | ====== |
| 6 | |
| 7 | Build Instructions for U-Boot as main bootloader |
| 8 | ------------------------------------------------ |
| 9 | |
| 10 | Simple you can build U-Boot and obtain u-boot.bin:: |
| 11 | |
| 12 | $ make edison_defconfig |
| 13 | $ make all |
| 14 | |
| 15 | Updating U-Boot on Edison |
| 16 | ------------------------- |
| 17 | |
| 18 | By default Intel Edison boards are shipped with preinstalled heavily |
| 19 | patched U-Boot v2014.04. Though it supports DFU which we may be able to |
| 20 | use. |
| 21 | |
| 22 | 1. 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 Shevchenko | df5811d | 2020-11-27 17:59:09 +0200 | [diff] [blame] | 26 | $ truncate -s %4096 u-boot.bin |
Bin Meng | dec93f3 | 2019-07-18 00:34:09 -0700 | [diff] [blame] | 27 | |
| 28 | 2. Run your board and interrupt booting to U-Boot console. In the console |
| 29 | call:: |
| 30 | |
Andy Shevchenko | df5811d | 2020-11-27 17:59:09 +0200 | [diff] [blame] | 31 | => run do_force_flash_os |
Bin Meng | dec93f3 | 2019-07-18 00:34:09 -0700 | [diff] [blame] | 32 | |
| 33 | 3. Wait for few seconds, it will prepare environment variable and runs |
| 34 | DFU. Run DFU command from the host system:: |
| 35 | |
Andy Shevchenko | df5811d | 2020-11-27 17:59:09 +0200 | [diff] [blame] | 36 | $ dfu-util -v -d 8087:0a99 --alt u-boot0 -D u-boot.bin |
Bin Meng | dec93f3 | 2019-07-18 00:34:09 -0700 | [diff] [blame] | 37 | |
| 38 | 4. Return to U-Boot console and following hint. i.e. push Ctrl+C, and |
| 39 | reset the board:: |
| 40 | |
Andy Shevchenko | df5811d | 2020-11-27 17:59:09 +0200 | [diff] [blame] | 41 | => reset |
Simon Glass | 138b2d2 | 2020-09-06 10:35:35 -0600 | [diff] [blame] | 42 | |
| 43 | Updating U-Boot using xFSTK |
| 44 | --------------------------- |
| 45 | |
| 46 | You can also update U-Boot using the xfstk-dldr-solo tool if you can build it. |
Andy Shevchenko | df5811d | 2020-11-27 17:59:09 +0200 | [diff] [blame] | 47 | One way to do that is to follow the `xFSTK`_ instructions. In short, after you |
| 48 | install 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 | |
| 58 | Once you have built it, you can copy xfstk-dldr-solo to /usr/local/bin and |
Simon Glass | 138b2d2 | 2020-09-06 10:35:35 -0600 | [diff] [blame] | 59 | libboost_program_options.so.1.54.0 to /usr/lib/i386-linux-gnu/ and with luck |
Andy Shevchenko | df5811d | 2020-11-27 17:59:09 +0200 | [diff] [blame] | 60 | it will work. You might find this `drive`_ helpful. |
Simon Glass | 138b2d2 | 2020-09-06 10:35:35 -0600 | [diff] [blame] | 61 | |
Andy Shevchenko | df5811d | 2020-11-27 17:59:09 +0200 | [diff] [blame] | 62 | If it does, then you can download and unpack the Edison recovery image, |
| 63 | install dfu-util, reset your board and flash U-Boot like this: |
Simon Glass | 138b2d2 | 2020-09-06 10:35:35 -0600 | [diff] [blame] | 64 | |
Andy Shevchenko | df5811d | 2020-11-27 17:59:09 +0200 | [diff] [blame] | 65 | .. code-block:: sh |
| 66 | |
| 67 | xfstk-dldr-solo --gpflags 0x80000007 \ |
Simon Glass | 138b2d2 | 2020-09-06 10:35:35 -0600 | [diff] [blame] | 68 | --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 | |
| 73 | This should show the following |
| 74 | |
| 75 | .. code-block:: none |
| 76 | |
Andy Shevchenko | df5811d | 2020-11-27 17:59:09 +0200 | [diff] [blame] | 77 | XFSTK Downloader Solo 1.8.5 |
Simon Glass | 138b2d2 | 2020-09-06 10:35:35 -0600 | [diff] [blame] | 78 | 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 Glass | 138b2d2 | 2020-09-06 10:35:35 -0600 | [diff] [blame] | 88 | You have about 10 seconds after resetting the board to type the above command. |
| 89 | If you want to check if the board is ready, type: |
| 90 | |
| 91 | .. code-block:: none |
| 92 | |
Andy Shevchenko | df5811d | 2020-11-27 17:59:09 +0200 | [diff] [blame] | 93 | lsusb | egrep "8087|8086" |
Simon Glass | 138b2d2 | 2020-09-06 10:35:35 -0600 | [diff] [blame] | 94 | Bus 001 Device 004: ID 8086:e005 Intel Corp. |
| 95 | |
| 96 | If you see a device with the same ID as above, the board is waiting for your |
| 97 | command. |
| 98 | |
| 99 | After 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 Shevchenko | df5811d | 2020-11-27 17:59:09 +0200 | [diff] [blame] | 124 | After another 10 seconds the xFSTK tool completes and the board resets. About |
| 125 | 10 seconds after that should see the above message again and then within a few |
| 126 | seconds U-Boot should start on your board: |
Simon Glass | 138b2d2 | 2020-09-06 10:35:35 -0600 | [diff] [blame] | 127 | |
| 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 Shevchenko | df5811d | 2020-11-27 17:59:09 +0200 | [diff] [blame] | 158 | Kernel command line: "rootwait ..." |
Simon Glass | 138b2d2 | 2020-09-06 10:35:35 -0600 | [diff] [blame] | 159 | 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 Shevchenko | df5811d | 2020-11-27 17:59:09 +0200 | [diff] [blame] | 169 | .. _xFSTK: https://github.com/edison-fw/xFSTK |
Simon Glass | 138b2d2 | 2020-09-06 10:35:35 -0600 | [diff] [blame] | 170 | .. _drive: https://drive.google.com/drive/u/0/folders/1URPHrOk9-UBsh8hjv-7WwC0W6Fy61uAJ |