~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/driver-api/mtd/spi-intel.rst

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /Documentation/driver-api/mtd/spi-intel.rst (Version linux-6.12-rc7) and /Documentation/driver-api/mtd/spi-intel.rst (Version linux-6.11.7)


  1 ==============================                      1 ==============================
  2 Upgrading BIOS using spi-intel                      2 Upgrading BIOS using spi-intel
  3 ==============================                      3 ==============================
  4                                                     4 
  5 Many Intel CPUs like Baytrail and Braswell inc      5 Many Intel CPUs like Baytrail and Braswell include SPI serial flash host
  6 controller which is used to hold BIOS and othe      6 controller which is used to hold BIOS and other platform specific data.
  7 Since contents of the SPI serial flash is cruc      7 Since contents of the SPI serial flash is crucial for machine to function,
  8 it is typically protected by different hardwar      8 it is typically protected by different hardware protection mechanisms to
  9 avoid accidental (or on purpose) overwrite of       9 avoid accidental (or on purpose) overwrite of the content.
 10                                                    10 
 11 Not all manufacturers protect the SPI serial f     11 Not all manufacturers protect the SPI serial flash, mainly because it
 12 allows upgrading the BIOS image directly from      12 allows upgrading the BIOS image directly from an OS.
 13                                                    13 
 14 The spi-intel driver makes it possible to read     14 The spi-intel driver makes it possible to read and write the SPI serial
 15 flash, if certain protection bits are not set      15 flash, if certain protection bits are not set and locked. If it finds
 16 any of them set, the whole MTD device is made      16 any of them set, the whole MTD device is made read-only to prevent
 17 partial overwrites. By default the driver expo     17 partial overwrites. By default the driver exposes SPI serial flash
 18 contents as read-only but it can be changed fr     18 contents as read-only but it can be changed from kernel command line,
 19 passing "spi_intel.writeable=1".                   19 passing "spi_intel.writeable=1".
 20                                                    20 
 21 Please keep in mind that overwriting the BIOS      21 Please keep in mind that overwriting the BIOS image on SPI serial flash
 22 might render the machine unbootable and requir     22 might render the machine unbootable and requires special equipment like
 23 Dediprog to revive. You have been warned!          23 Dediprog to revive. You have been warned!
 24                                                    24 
 25 Below are the steps how to upgrade MinnowBoard     25 Below are the steps how to upgrade MinnowBoard MAX BIOS directly from
 26 Linux.                                             26 Linux.
 27                                                    27 
 28  1) Download and extract the latest Minnowboar     28  1) Download and extract the latest Minnowboard MAX BIOS SPI image
 29     [1]. At the time writing this the latest i     29     [1]. At the time writing this the latest image is v92.
 30                                                    30 
 31  2) Install mtd-utils package [2]. We need thi     31  2) Install mtd-utils package [2]. We need this in order to erase the SPI
 32     serial flash. Distros like Debian and Fedo     32     serial flash. Distros like Debian and Fedora have this prepackaged with
 33     name "mtd-utils".                              33     name "mtd-utils".
 34                                                    34 
 35  3) Add "spi_intel.writeable=1" to the kernel      35  3) Add "spi_intel.writeable=1" to the kernel command line and reboot
 36     the board (you can also reload the driver      36     the board (you can also reload the driver passing "writeable=1" as
 37     module parameter to modprobe).                 37     module parameter to modprobe).
 38                                                    38 
 39  4) Once the board is up and running again, fi     39  4) Once the board is up and running again, find the right MTD partition
 40     (it is named as "BIOS")::                      40     (it is named as "BIOS")::
 41                                                    41 
 42         # cat /proc/mtd                            42         # cat /proc/mtd
 43         dev:    size   erasesize  name             43         dev:    size   erasesize  name
 44         mtd0: 00800000 00001000 "BIOS"             44         mtd0: 00800000 00001000 "BIOS"
 45                                                    45 
 46     So here it will be /dev/mtd0 but it may va     46     So here it will be /dev/mtd0 but it may vary.
 47                                                    47 
 48  5) Make backup of the existing image first::      48  5) Make backup of the existing image first::
 49                                                    49 
 50         # dd if=/dev/mtd0ro of=bios.bak            50         # dd if=/dev/mtd0ro of=bios.bak
 51         16384+0 records in                         51         16384+0 records in
 52         16384+0 records out                        52         16384+0 records out
 53         8388608 bytes (8.4 MB) copied, 10.0269     53         8388608 bytes (8.4 MB) copied, 10.0269 s, 837 kB/s
 54                                                    54 
 55  6) Verify the backup::                            55  6) Verify the backup::
 56                                                    56 
 57         # sha1sum /dev/mtd0ro bios.bak             57         # sha1sum /dev/mtd0ro bios.bak
 58         fdbb011920572ca6c991377c4b418a0502668b     58         fdbb011920572ca6c991377c4b418a0502668b73  /dev/mtd0ro
 59         fdbb011920572ca6c991377c4b418a0502668b     59         fdbb011920572ca6c991377c4b418a0502668b73  bios.bak
 60                                                    60 
 61     The SHA1 sums must match. Otherwise do not     61     The SHA1 sums must match. Otherwise do not continue any further!
 62                                                    62 
 63  7) Erase the SPI serial flash. After this ste     63  7) Erase the SPI serial flash. After this step, do not reboot the
 64     board! Otherwise it will not start anymore     64     board! Otherwise it will not start anymore::
 65                                                    65 
 66         # flash_erase /dev/mtd0 0 0                66         # flash_erase /dev/mtd0 0 0
 67         Erasing 4 Kibyte @ 7ff000 -- 100 % com     67         Erasing 4 Kibyte @ 7ff000 -- 100 % complete
 68                                                    68 
 69  8) Once completed without errors you can writ     69  8) Once completed without errors you can write the new BIOS image::
 70                                                    70 
 71     # dd if=MNW2MAX1.X64.0092.R01.1605221712.b     71     # dd if=MNW2MAX1.X64.0092.R01.1605221712.bin of=/dev/mtd0
 72                                                    72 
 73  9) Verify that the new content of the SPI ser     73  9) Verify that the new content of the SPI serial flash matches the new
 74     BIOS image::                                   74     BIOS image::
 75                                                    75 
 76         # sha1sum /dev/mtd0ro MNW2MAX1.X64.009     76         # sha1sum /dev/mtd0ro MNW2MAX1.X64.0092.R01.1605221712.bin
 77         9b4df9e4be2057fceec3a5529ec3d950836c87     77         9b4df9e4be2057fceec3a5529ec3d950836c87a2  /dev/mtd0ro
 78         9b4df9e4be2057fceec3a5529ec3d950836c87     78         9b4df9e4be2057fceec3a5529ec3d950836c87a2 MNW2MAX1.X64.0092.R01.1605221712.bin
 79                                                    79 
 80     The SHA1 sums should match.                    80     The SHA1 sums should match.
 81                                                    81 
 82  10) Now you can reboot your board and observe     82  10) Now you can reboot your board and observe the new BIOS starting up
 83      properly.                                     83      properly.
 84                                                    84 
 85 References                                         85 References
 86 ----------                                         86 ----------
 87                                                    87 
 88 [1] https://firmware.intel.com/sites/default/f     88 [1] https://firmware.intel.com/sites/default/files/MinnowBoard%2EMAX_%2EX64%2E92%2ER01%2Ezip
 89                                                    89 
 90 [2] http://www.linux-mtd.infradead.org/            90 [2] http://www.linux-mtd.infradead.org/
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php