From e7eeb6dd2d727ae32c3b796a4c04604fc3eb5650 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Fri, 27 Nov 2020 17:59:09 +0200 Subject: doc: edison: Update information about xFSTK xFSTK sources got a new home under Edison Firmware Group on GitHub [1]. Update Intel Edison documentation accordingly. While here, fix couple of typos. [1]: https://github.com/edison-fw Signed-off-by: Andy Shevchenko Reviewed-by: Simon Glass Acked-by: Bin Meng --- doc/board/intel/edison.rst | 49 +++++++++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/doc/board/intel/edison.rst b/doc/board/intel/edison.rst index d658fac02c8..5a65673d1e0 100644 --- a/doc/board/intel/edison.rst +++ b/doc/board/intel/edison.rst @@ -23,38 +23,48 @@ use. more step (if and only if you have original U-Boot), i.e. run the following command:: - $ truncate -s %4096 u-boot.bin + $ truncate -s %4096 u-boot.bin 2. Run your board and interrupt booting to U-Boot console. In the console call:: - => run do_force_flash_os + => run do_force_flash_os 3. Wait for few seconds, it will prepare environment variable and runs DFU. Run DFU command from the host system:: - $ dfu-util -v -d 8087:0a99 --alt u-boot0 -D u-boot.bin + $ dfu-util -v -d 8087:0a99 --alt u-boot0 -D u-boot.bin 4. Return to U-Boot console and following hint. i.e. push Ctrl+C, and reset the board:: - => reset - + => reset Updating U-Boot using xFSTK --------------------------- You can also update U-Boot using the xfstk-dldr-solo tool if you can build it. -One way to do that is to follow the `xFSTK`_ instructions. You may need to use -a virtual machine running Ubuntu Trusty. Once you have built it and installed -libboost-all-dev, you can copy xfstk-dldr-solo to /usr/local/bin and +One way to do that is to follow the `xFSTK`_ instructions. In short, after you +install all necessary dependencies and clone repository, it will look like this: + +.. code-block:: sh + + cd xFSTK + export DISTRIBUTION_NAME=ubuntu20.04 + export BUILD_VERSION=1.8.5 + git checkout v$BUILD_VERSION + ... + +Once you have built it, you can copy xfstk-dldr-solo to /usr/local/bin and libboost_program_options.so.1.54.0 to /usr/lib/i386-linux-gnu/ and with luck -it will work. You might fine this `drive`_ helpful. +it will work. You might find this `drive`_ helpful. + +If it does, then you can download and unpack the Edison recovery image, +install dfu-util, reset your board and flash U-Boot like this: -If it does, then you can download and unpack the Edison reocovery image, -install dfu-util, reset your board and flash U-Boot like this:: +.. code-block:: sh - $ xfstk-dldr-solo --gpflags 0x80000007 \ + xfstk-dldr-solo --gpflags 0x80000007 \ --osimage u-boot-edison.img \ --fwdnx recover/edison_dnx_fwr.bin \ --fwimage recover/edison_ifwi-dbg-00.bin \ @@ -64,7 +74,7 @@ This should show the following .. code-block:: none - XFSTK Downloader Solo 0.0.0 + XFSTK Downloader Solo 1.8.5 Copyright (c) 2015 Intel Corporation Build date and time: Aug 15 2020 15:07:13 @@ -75,13 +85,12 @@ This should show the following .......(lots of dots)........XFSTK-STATUS--Reconnecting to device - Attempt #1 .......(even more dots)...................... - You have about 10 seconds after resetting the board to type the above command. If you want to check if the board is ready, type: .. code-block:: none - lsusb |egrep "8087|8086" + lsusb | egrep "8087|8086" Bus 001 Device 004: ID 8086:e005 Intel Corp. If you see a device with the same ID as above, the board is waiting for your @@ -112,9 +121,9 @@ After about 5 seconds you should see some console output from the board: *** Ready to receive application *** - After another 10 seconds the xFSTK tool completes and the board resets. About - 10 seconds after that should see the above message again and then within a - few seconds U-Boot should start on your board: +After another 10 seconds the xFSTK tool completes and the board resets. About +10 seconds after that should see the above message again and then within a few +seconds U-Boot should start on your board: .. code-block:: none @@ -146,7 +155,7 @@ After about 5 seconds you should see some console output from the board: Building boot_params at 0x00090000 Loading bzImage at address 100000 (5427456 bytes) Magic signature found - 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" + Kernel command line: "rootwait ..." Magic signature found Starting kernel ... @@ -157,5 +166,5 @@ After about 5 seconds you should see some console output from the board: edison login: -.. _xFSTK: https://community.intel.com/t5/Intel-Makers/Building-xFSTK-on-Ubuntu-14-04-32-bit-for-flashing-Edison/td-p/538081 +.. _xFSTK: https://github.com/edison-fw/xFSTK .. _drive: https://drive.google.com/drive/u/0/folders/1URPHrOk9-UBsh8hjv-7WwC0W6Fy61uAJ -- cgit v1.3.1 From 6ef1b7508740dfce9b30f172839b385361e8bd50 Mon Sep 17 00:00:00 2001 From: Sughosh Ganu Date: Mon, 14 Dec 2020 11:52:44 +0530 Subject: fsp: Move and rename fsp_types.h file The fsp_types.h header file contains macros for building signatures of different widths. These signature macros are architecture agnostic, and can be used in all places which use signatures in a data structure. Move and rename the fsp_types.h under the common include header. Signed-off-by: Sughosh Ganu Reviewed-by: Simon Glass Reviewed-by: Bin Meng --- arch/x86/include/asm/fsp/fsp_support.h | 3 +- arch/x86/include/asm/fsp/fsp_types.h | 62 ---------------------------------- include/signatures.h | 62 ++++++++++++++++++++++++++++++++++ 3 files changed, 64 insertions(+), 63 deletions(-) delete mode 100644 arch/x86/include/asm/fsp/fsp_types.h create mode 100644 include/signatures.h diff --git a/arch/x86/include/asm/fsp/fsp_support.h b/arch/x86/include/asm/fsp/fsp_support.h index 29e511415cd..3cd3e4fcf5b 100644 --- a/arch/x86/include/asm/fsp/fsp_support.h +++ b/arch/x86/include/asm/fsp/fsp_support.h @@ -7,11 +7,12 @@ #ifndef __FSP_SUPPORT_H__ #define __FSP_SUPPORT_H__ +#include + #include #include #include #include -#include #include #include diff --git a/arch/x86/include/asm/fsp/fsp_types.h b/arch/x86/include/asm/fsp/fsp_types.h deleted file mode 100644 index 3d5b17ecf11..00000000000 --- a/arch/x86/include/asm/fsp/fsp_types.h +++ /dev/null @@ -1,62 +0,0 @@ -/* SPDX-License-Identifier: Intel */ -/* - * Copyright (C) 2013, Intel Corporation - * Copyright (C) 2014, Bin Meng - */ - -#ifndef __FSP_TYPES_H__ -#define __FSP_TYPES_H__ - -/** - * Returns a 16-bit signature built from 2 ASCII characters. - * - * This macro returns a 16-bit value built from the two ASCII characters - * specified by A and B. - * - * @A: The first ASCII character. - * @B: The second ASCII character. - * - * @return: A 16-bit value built from the two ASCII characters specified by - * A and B. - */ -#define SIGNATURE_16(A, B) ((A) | (B << 8)) - -/** - * Returns a 32-bit signature built from 4 ASCII characters. - * - * This macro returns a 32-bit value built from the four ASCII characters - * specified by A, B, C, and D. - * - * @A: The first ASCII character. - * @B: The second ASCII character. - * @C: The third ASCII character. - * @D: The fourth ASCII character. - * - * @return: A 32-bit value built from the two ASCII characters specified by - * A, B, C and D. - */ -#define SIGNATURE_32(A, B, C, D) \ - (SIGNATURE_16(A, B) | (SIGNATURE_16(C, D) << 16)) - -/** - * Returns a 64-bit signature built from 8 ASCII characters. - * - * This macro returns a 64-bit value built from the eight ASCII characters - * specified by A, B, C, D, E, F, G,and H. - * - * @A: The first ASCII character. - * @B: The second ASCII character. - * @C: The third ASCII character. - * @D: The fourth ASCII character. - * @E: The fifth ASCII character. - * @F: The sixth ASCII character. - * @G: The seventh ASCII character. - * @H: The eighth ASCII character. - * - * @return: A 64-bit value built from the two ASCII characters specified by - * A, B, C, D, E, F, G and H. - */ -#define SIGNATURE_64(A, B, C, D, E, F, G, H) \ - (SIGNATURE_32(A, B, C, D) | ((u64)(SIGNATURE_32(E, F, G, H)) << 32)) - -#endif diff --git a/include/signatures.h b/include/signatures.h new file mode 100644 index 00000000000..4042db1e00b --- /dev/null +++ b/include/signatures.h @@ -0,0 +1,62 @@ +/* SPDX-License-Identifier: Intel */ +/* + * Copyright (C) 2013, Intel Corporation + * Copyright (C) 2014, Bin Meng + */ + +#ifndef __SIGNATURES_H__ +#define __SIGNATURES_H__ + +/** + * Returns a 16-bit signature built from 2 ASCII characters. + * + * This macro returns a 16-bit value built from the two ASCII characters + * specified by A and B. + * + * @A: The first ASCII character. + * @B: The second ASCII character. + * + * @return: A 16-bit value built from the two ASCII characters specified by + * A and B. + */ +#define SIGNATURE_16(A, B) ((A) | (B << 8)) + +/** + * Returns a 32-bit signature built from 4 ASCII characters. + * + * This macro returns a 32-bit value built from the four ASCII characters + * specified by A, B, C, and D. + * + * @A: The first ASCII character. + * @B: The second ASCII character. + * @C: The third ASCII character. + * @D: The fourth ASCII character. + * + * @return: A 32-bit value built from the two ASCII characters specified by + * A, B, C and D. + */ +#define SIGNATURE_32(A, B, C, D) \ + (SIGNATURE_16(A, B) | (SIGNATURE_16(C, D) << 16)) + +/** + * Returns a 64-bit signature built from 8 ASCII characters. + * + * This macro returns a 64-bit value built from the eight ASCII characters + * specified by A, B, C, D, E, F, G,and H. + * + * @A: The first ASCII character. + * @B: The second ASCII character. + * @C: The third ASCII character. + * @D: The fourth ASCII character. + * @E: The fifth ASCII character. + * @F: The sixth ASCII character. + * @G: The seventh ASCII character. + * @H: The eighth ASCII character. + * + * @return: A 64-bit value built from the two ASCII characters specified by + * A, B, C, D, E, F, G and H. + */ +#define SIGNATURE_64(A, B, C, D, E, F, G, H) \ + (SIGNATURE_32(A, B, C, D) | ((u64)(SIGNATURE_32(E, F, G, H)) << 32)) + +#endif /* __SIGNATURES_H__ */ -- cgit v1.3.1