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 | |
| 26 | $ truncate -s %4096 u-boot.bin |
| 27 | |
| 28 | 2. Run your board and interrupt booting to U-Boot console. In the console |
| 29 | call:: |
| 30 | |
| 31 | => run do_force_flash_os |
| 32 | |
| 33 | 3. Wait for few seconds, it will prepare environment variable and runs |
| 34 | DFU. Run DFU command from the host system:: |
| 35 | |
| 36 | $ dfu-util -v -d 8087:0a99 --alt u-boot0 -D u-boot.bin |
| 37 | |
| 38 | 4. Return to U-Boot console and following hint. i.e. push Ctrl+C, and |
| 39 | reset the board:: |
| 40 | |
| 41 | => reset |
Simon Glass | 138b2d2 | 2020-09-06 10:35:35 -0600 | [diff] [blame] | 42 | |
| 43 | |
| 44 | Updating U-Boot using xFSTK |
| 45 | --------------------------- |
| 46 | |
| 47 | You can also update U-Boot using the xfstk-dldr-solo tool if you can build it. |
| 48 | One way to do that is to follow the `xFSTK`_ instructions. You may need to use |
| 49 | a virtual machine running Ubuntu Trusty. Once you have built it and installed |
| 50 | libboost-all-dev, you can copy xfstk-dldr-solo to /usr/local/bin and |
| 51 | libboost_program_options.so.1.54.0 to /usr/lib/i386-linux-gnu/ and with luck |
| 52 | it will work. You might fine this `drive`_ helpful. |
| 53 | |
| 54 | If it does, then you can download and unpack the Edison reocovery image, |
| 55 | install dfu-util, reset your board and flash U-Boot like this:: |
| 56 | |
| 57 | $ xfstk-dldr-solo --gpflags 0x80000007 \ |
| 58 | --osimage u-boot-edison.img \ |
| 59 | --fwdnx recover/edison_dnx_fwr.bin \ |
| 60 | --fwimage recover/edison_ifwi-dbg-00.bin \ |
| 61 | --osdnx recover/edison_dnx_osr.bin |
| 62 | |
| 63 | This should show the following |
| 64 | |
| 65 | .. code-block:: none |
| 66 | |
| 67 | XFSTK Downloader Solo 0.0.0 |
| 68 | Copyright (c) 2015 Intel Corporation |
| 69 | Build date and time: Aug 15 2020 15:07:13 |
| 70 | |
| 71 | .Intel SoC Device Detection Found |
| 72 | Parsing Commandline.... |
| 73 | Registering Status Callback.... |
| 74 | .Initiating Download Process.... |
| 75 | .......(lots of dots)........XFSTK-STATUS--Reconnecting to device - Attempt #1 |
| 76 | .......(even more dots)...................... |
| 77 | |
| 78 | |
| 79 | You have about 10 seconds after resetting the board to type the above command. |
| 80 | If you want to check if the board is ready, type: |
| 81 | |
| 82 | .. code-block:: none |
| 83 | |
| 84 | lsusb |egrep "8087|8086" |
| 85 | Bus 001 Device 004: ID 8086:e005 Intel Corp. |
| 86 | |
| 87 | If you see a device with the same ID as above, the board is waiting for your |
| 88 | command. |
| 89 | |
| 90 | After about 5 seconds you should see some console output from the board: |
| 91 | |
| 92 | .. code-block:: none |
| 93 | |
| 94 | ****************************** |
| 95 | PSH KERNEL VERSION: b0182b2b |
| 96 | WR: 20104000 |
| 97 | ****************************** |
| 98 | |
| 99 | SCU IPC: 0x800000d0 0xfffce92c |
| 100 | |
| 101 | PSH miaHOB version: TNG.B0.VVBD.0000000c |
| 102 | |
| 103 | microkernel built 11:24:08 Feb 5 2015 |
| 104 | |
| 105 | ******* PSH loader ******* |
| 106 | PCM page cache size = 192 KB |
| 107 | Cache Constraint = 0 Pages |
| 108 | Arming IPC driver .. |
| 109 | Adding page store pool .. |
| 110 | PagestoreAddr(IMR Start Address) = 0x04899000 |
| 111 | pageStoreSize(IMR Size) = 0x00080000 |
| 112 | |
| 113 | *** Ready to receive application *** |
| 114 | |
| 115 | After another 10 seconds the xFSTK tool completes and the board resets. About |
| 116 | 10 seconds after that should see the above message again and then within a |
| 117 | few seconds U-Boot should start on your board: |
| 118 | |
| 119 | .. code-block:: none |
| 120 | |
| 121 | U-Boot 2020.10-rc3 (Sep 03 2020 - 18:44:28 -0600) |
| 122 | |
| 123 | CPU: Genuine Intel(R) CPU 4000 @ 500MHz |
| 124 | DRAM: 980.6 MiB |
| 125 | WDT: Started with servicing (60s timeout) |
| 126 | MMC: mmc@ff3fc000: 0, mmc@ff3fa000: 1 |
| 127 | Loading Environment from MMC... OK |
| 128 | In: serial |
| 129 | Out: serial |
| 130 | Err: serial |
| 131 | Saving Environment to MMC... Writing to redundant MMC(0)... OK |
| 132 | Saving Environment to MMC... Writing to MMC(0)... OK |
| 133 | Net: No ethernet found. |
| 134 | Hit any key to stop autoboot: 0 |
| 135 | Target:blank |
| 136 | Partitioning using GPT |
| 137 | Writing GPT: success! |
| 138 | Saving Environment to MMC... Writing to redundant MMC(0)... OK |
| 139 | Flashing already done... |
| 140 | 5442816 bytes read in 238 ms (21.8 MiB/s) |
| 141 | Valid Boot Flag |
| 142 | Setup Size = 0x00003c00 |
| 143 | Magic signature found |
| 144 | Using boot protocol version 2.0c |
| 145 | Linux kernel version 3.10.17-poky-edison+ (ferry@kalamata) #1 SMP PREEMPT Mon Jan 11 14:54:18 CET 2016 |
| 146 | Building boot_params at 0x00090000 |
| 147 | Loading bzImage at address 100000 (5427456 bytes) |
| 148 | Magic signature found |
| 149 | Kernel command line: "rootwait root=PARTUUID=ada722ed-6410-764e-8619-abff6f66e10e rootfstype=ext4 console=ttyMFD2 earlyprintk=ttyMFD2,keep loglevel=4 g_multi.ethernet_config=cdc systemd.unit=multi-user.target hardware_id=00 g_multi.iSerialNumber=2249baf774c675598661a63098c0ad41 g_multi.dev_addr=02:00:86:c0:ad:41 platform_mrfld_audio.audio_codec=dummy" |
| 150 | Magic signature found |
| 151 | |
| 152 | Starting kernel ... |
| 153 | |
| 154 | ... |
| 155 | |
| 156 | Poky (Yocto Project Reference Distro) 1.7.2 edison ttyMFD2 |
| 157 | |
| 158 | edison login: |
| 159 | |
| 160 | .. _xFSTK: https://community.intel.com/t5/Intel-Makers/Building-xFSTK-on-Ubuntu-14-04-32-bit-for-flashing-Edison/td-p/538081 |
| 161 | .. _drive: https://drive.google.com/drive/u/0/folders/1URPHrOk9-UBsh8hjv-7WwC0W6Fy61uAJ |