edison.rst 4.9 KB

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