edison.rst 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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. You may need to use
  32. a virtual machine running Ubuntu Trusty. Once you have built it and installed
  33. libboost-all-dev, you can copy xfstk-dldr-solo to /usr/local/bin and
  34. libboost_program_options.so.1.54.0 to /usr/lib/i386-linux-gnu/ and with luck
  35. it will work. You might fine this `drive`_ helpful.
  36. If it does, then you can download and unpack the Edison reocovery image,
  37. install dfu-util, reset your board and flash U-Boot like this::
  38. $ xfstk-dldr-solo --gpflags 0x80000007 \
  39. --osimage u-boot-edison.img \
  40. --fwdnx recover/edison_dnx_fwr.bin \
  41. --fwimage recover/edison_ifwi-dbg-00.bin \
  42. --osdnx recover/edison_dnx_osr.bin
  43. This should show the following
  44. .. code-block:: none
  45. XFSTK Downloader Solo 0.0.0
  46. Copyright (c) 2015 Intel Corporation
  47. Build date and time: Aug 15 2020 15:07:13
  48. .Intel SoC Device Detection Found
  49. Parsing Commandline....
  50. Registering Status Callback....
  51. .Initiating Download Process....
  52. .......(lots of dots)........XFSTK-STATUS--Reconnecting to device - Attempt #1
  53. .......(even more dots)......................
  54. You have about 10 seconds after resetting the board to type the above command.
  55. If you want to check if the board is ready, type:
  56. .. code-block:: none
  57. lsusb |egrep "8087|8086"
  58. Bus 001 Device 004: ID 8086:e005 Intel Corp.
  59. If you see a device with the same ID as above, the board is waiting for your
  60. command.
  61. After about 5 seconds you should see some console output from the board:
  62. .. code-block:: none
  63. ******************************
  64. PSH KERNEL VERSION: b0182b2b
  65. WR: 20104000
  66. ******************************
  67. SCU IPC: 0x800000d0 0xfffce92c
  68. PSH miaHOB version: TNG.B0.VVBD.0000000c
  69. microkernel built 11:24:08 Feb 5 2015
  70. ******* PSH loader *******
  71. PCM page cache size = 192 KB
  72. Cache Constraint = 0 Pages
  73. Arming IPC driver ..
  74. Adding page store pool ..
  75. PagestoreAddr(IMR Start Address) = 0x04899000
  76. pageStoreSize(IMR Size) = 0x00080000
  77. *** Ready to receive application ***
  78. After another 10 seconds the xFSTK tool completes and the board resets. About
  79. 10 seconds after that should see the above message again and then within a
  80. few seconds U-Boot should start on your board:
  81. .. code-block:: none
  82. U-Boot 2020.10-rc3 (Sep 03 2020 - 18:44:28 -0600)
  83. CPU: Genuine Intel(R) CPU 4000 @ 500MHz
  84. DRAM: 980.6 MiB
  85. WDT: Started with servicing (60s timeout)
  86. MMC: mmc@ff3fc000: 0, mmc@ff3fa000: 1
  87. Loading Environment from MMC... OK
  88. In: serial
  89. Out: serial
  90. Err: serial
  91. Saving Environment to MMC... Writing to redundant MMC(0)... OK
  92. Saving Environment to MMC... Writing to MMC(0)... OK
  93. Net: No ethernet found.
  94. Hit any key to stop autoboot: 0
  95. Target:blank
  96. Partitioning using GPT
  97. Writing GPT: success!
  98. Saving Environment to MMC... Writing to redundant MMC(0)... OK
  99. Flashing already done...
  100. 5442816 bytes read in 238 ms (21.8 MiB/s)
  101. Valid Boot Flag
  102. Setup Size = 0x00003c00
  103. Magic signature found
  104. Using boot protocol version 2.0c
  105. Linux kernel version 3.10.17-poky-edison+ (ferry@kalamata) #1 SMP PREEMPT Mon Jan 11 14:54:18 CET 2016
  106. Building boot_params at 0x00090000
  107. Loading bzImage at address 100000 (5427456 bytes)
  108. Magic signature found
  109. 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"
  110. Magic signature found
  111. Starting kernel ...
  112. ...
  113. Poky (Yocto Project Reference Distro) 1.7.2 edison ttyMFD2
  114. edison login:
  115. .. _xFSTK: https://community.intel.com/t5/Intel-Makers/Building-xFSTK-on-Ubuntu-14-04-32-bit-for-flashing-Edison/td-p/538081
  116. .. _drive: https://drive.google.com/drive/u/0/folders/1URPHrOk9-UBsh8hjv-7WwC0W6Fy61uAJ