@@ -250,6 +250,83 @@ However, we need to short 2 pins on Host Connector J3 via a 3.3k resistor
250250(simple shorting without the resistor will also do) for debugging to work.
251251Those 2 pins are Pin5 HOST_RST_N_LT_R) and Pin21 (+V_HOST_3P3_1P8).
252252
253+ MCUBoot Bootloader Support
254+ ==========================
255+
256+ Zephyr on Intel S1000 supports the open source, cross-RTOS MCUBoot Bootloader.
257+ MCUBoot Bootloader in conjuntion with USB DFU (Device Firmware Upgrade) can be
258+ used to upgrade Intel S1000 firmware. The MCUBoot Bootloader source code is
259+ hosted in the `MCUboot GitHub repo `_ page. Check out `MCUboot with Zephyr `_
260+ documentation page on the MCUboot website for more on MCUboot.
261+
262+ First, you need to generate the MCUBoot Bootloader image for Intel S1000.
263+ Go to the MCUBoot Bootloader repository on your local machine and execute the
264+ below commands.
265+
266+ .. zephyr-app-commands ::
267+ :app: ~/mcuboot/boot/zephyr
268+ :board: intel_s1000_crb
269+ :goals: build
270+
271+ zephyr/zephyr_intel_s1000_crb.bin is one of the outputs of the above steps.
272+ This is the MCUBoot Bootloader which now needs to be flashed to address 0 in
273+ the SPI flash. Please ensure the flash is completely erased before loading
274+ the MCUBoot Bootloader.
275+
276+ MCUBoot Bootloader requires 2 images viz. image0 (default image) and image1
277+ (new image). MCUBoot Bootloader for s1000 also has DFU support embedded in it.
278+ Image0 is the image that gets loaded by the MCUBoot Bootloader upon boot. The
279+ new image, Image1, is updated by the MCUBoot Bootloader via the `USB DFU Util `_
280+ utility. Refer to :ref: `usb_dfu ` for details on sample usage of dfu. The
281+ MCUBoot Bootloader will wait for a prescribed duration during boot waiting for
282+ USB DFU to occur. Image1 gets overwritten with a fresh image if a USB DFU is
283+ initiated within this duration. The flash offsets into which image0 and image1
284+ are loaded can be found out by looking at
285+ ``boards/xtensa/intel_s1000_crb/intel_s1000_crb.dts ``. Refer to
286+ :ref: `flash_partitions ` for details about partition layout.
287+
288+ Build an MCUboot-compatible Intel S1000 Firmware image (image0/image1),
289+ by following these steps:
290+
291+ 1. Edit your application's :file: `.conf ` file to enable the
292+ :option: `CONFIG_BOOTLOADER_MCUBOOT ` option. For example, to build
293+ ``tests/boards/intel_s1000_crb `` as MCUboot-compatible, enable the
294+ Kconfig option :option: `CONFIG_BOOTLOADER_MCUBOOT ` in prj.conf.
295+
296+ 2. Use the ``scripts/imagetool.py `` script from the `MCUboot GitHub repo `_
297+ to sign the ``image0 `` image (see `MCUboot with Zephyr `_ documentation
298+ for details.) Please note that zephyr/zephyr.bin over here refers to the
299+ actual path to the bin file
300+ (i.e. tests/boards/intel_s1000_crb/build/zephyr/zephyr.bin)
301+
302+ .. code-block :: console
303+
304+ scripts/imgtool.py sign \
305+ --key root-rsa-2048.pem \
306+ --header-size 0x100 \
307+ --align 8 \
308+ --version 1.2 \
309+ --slot-size 0x1D0000 \
310+ zephyr/zephyr.bin \
311+ signed-zephyr0.bin
312+
313+ 3. Sign the ``image1 `` upgrade image with the ``--pad `` option:
314+
315+ .. code-block :: console
316+
317+ scripts/imgtool.py sign \
318+ --key root-rsa-2048.pem \
319+ --header-size 0x100 \
320+ --align 8 \
321+ --version 1.2 \
322+ --slot-size 0x1D0000 \
323+ --pad
324+ zephyr/zephyr.bin \
325+ signed-zephyr1.bin
326+
327+ More detailed information regarding the use of MCUboot with Zephyr can be found
328+ in the `MCUboot with Zephyr `_ documentation page on the MCUboot website.
329+
253330.. target-notes ::
254331
255332.. _`FT232 UART` : https://www.amazon.com/FT232RL-Serial-Converter-Adapter-Arduino/dp/B06XDH2VK9
@@ -259,3 +336,9 @@ Those 2 pins are Pin5 HOST_RST_N_LT_R) and Pin21 (+V_HOST_3P3_1P8).
259336.. _SDK portal : https://tensilicatools.com
260337
261338.. _Intel Speech Enabling Developer Kit : https://software.intel.com/en-us/iot/speech-enabling-dev-kit
339+
340+ .. _MCUboot GitHub repo : https://github.com/runtimeco/mcuboot
341+
342+ .. _MCUboot with Zephyr : https://mcuboot.com/mcuboot/readme-zephyr.html
343+
344+ .. _USB DFU Util : http://dfu-util.sourceforge.net/
0 commit comments