€•¡DŒsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ,/translations/zh_CN/driver-api/mtd/spi-intel”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/zh_TW/driver-api/mtd/spi-intel”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/it_IT/driver-api/mtd/spi-intel”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/ja_JP/driver-api/mtd/spi-intel”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/ko_KR/driver-api/mtd/spi-intel”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/sp_SP/driver-api/mtd/spi-intel”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒUpgrading BIOS using spi-intel”h]”hŒUpgrading BIOS using spi-intel”…””}”(hh¨hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hh£hžhhŸŒF/var/lib/git/docbuild/linux/Documentation/driver-api/mtd/spi-intel.rst”h KubhŒ paragraph”“”)”}”(hX_Many Intel CPUs like Baytrail and Braswell include SPI serial flash host controller which is used to hold BIOS and other platform specific data. Since contents of the SPI serial flash is crucial for machine to function, it is typically protected by different hardware protection mechanisms to avoid accidental (or on purpose) overwrite of the content.”h]”hX_Many Intel CPUs like Baytrail and Braswell include SPI serial flash host controller which is used to hold BIOS and other platform specific data. Since contents of the SPI serial flash is crucial for machine to function, it is typically protected by different hardware protection mechanisms to avoid accidental (or on purpose) overwrite of the content.”…””}”(hh¹hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h Khh£hžhubh¸)”}”(hŒzNot all manufacturers protect the SPI serial flash, mainly because it allows upgrading the BIOS image directly from an OS.”h]”hŒzNot all manufacturers protect the SPI serial flash, mainly because it allows upgrading the BIOS image directly from an OS.”…””}”(hhÇhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K hh£hžhubh¸)”}”(hXzThe spi-intel driver makes it possible to read and write the SPI serial flash, if certain protection bits are not set and locked. If it finds any of them set, the whole MTD device is made read-only to prevent partial overwrites. By default the driver exposes SPI serial flash contents as read-only but it can be changed from kernel command line, passing "spi_intel.writeable=1".”h]”hX~The spi-intel driver makes it possible to read and write the SPI serial flash, if certain protection bits are not set and locked. If it finds any of them set, the whole MTD device is made read-only to prevent partial overwrites. By default the driver exposes SPI serial flash contents as read-only but it can be changed from kernel command line, passing “spi_intel.writeable=1â€.”…””}”(hhÕhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h Khh£hžhubh¸)”}”(hŒ¹Please keep in mind that overwriting the BIOS image on SPI serial flash might render the machine unbootable and requires special equipment like Dediprog to revive. You have been warned!”h]”hŒ¹Please keep in mind that overwriting the BIOS image on SPI serial flash might render the machine unbootable and requires special equipment like Dediprog to revive. You have been warned!”…””}”(hhãhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h Khh£hžhubh¸)”}”(hŒLBelow are the steps how to upgrade MinnowBoard MAX BIOS directly from Linux.”h]”hŒLBelow are the steps how to upgrade MinnowBoard MAX BIOS directly from Linux.”…””}”(hhñhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h Khh£hžhubhŒ block_quote”“”)”}”(hX€1) Download and extract the latest Minnowboard MAX BIOS SPI image [1]. At the time writing this the latest image is v92. 2) Install mtd-utils package [2]. We need this in order to erase the SPI serial flash. Distros like Debian and Fedora have this prepackaged with name "mtd-utils". 3) Add "spi_intel.writeable=1" to the kernel command line and reboot the board (you can also reload the driver passing "writeable=1" as module parameter to modprobe). 4) Once the board is up and running again, find the right MTD partition (it is named as "BIOS"):: # cat /proc/mtd dev: size erasesize name mtd0: 00800000 00001000 "BIOS" So here it will be /dev/mtd0 but it may vary. 5) Make backup of the existing image first:: # dd if=/dev/mtd0ro of=bios.bak 16384+0 records in 16384+0 records out 8388608 bytes (8.4 MB) copied, 10.0269 s, 837 kB/s 6) Verify the backup:: # sha1sum /dev/mtd0ro bios.bak fdbb011920572ca6c991377c4b418a0502668b73 /dev/mtd0ro fdbb011920572ca6c991377c4b418a0502668b73 bios.bak The SHA1 sums must match. Otherwise do not continue any further! 7) Erase the SPI serial flash. After this step, do not reboot the board! Otherwise it will not start anymore:: # flash_erase /dev/mtd0 0 0 Erasing 4 Kibyte @ 7ff000 -- 100 % complete 8) Once completed without errors you can write the new BIOS image:: # dd if=MNW2MAX1.X64.0092.R01.1605221712.bin of=/dev/mtd0 9) Verify that the new content of the SPI serial flash matches the new BIOS image:: # sha1sum /dev/mtd0ro MNW2MAX1.X64.0092.R01.1605221712.bin 9b4df9e4be2057fceec3a5529ec3d950836c87a2 /dev/mtd0ro 9b4df9e4be2057fceec3a5529ec3d950836c87a2 MNW2MAX1.X64.0092.R01.1605221712.bin The SHA1 sums should match. 10) Now you can reboot your board and observe the new BIOS starting up properly. ”h]”hŒenumerated_list”“”)”}”(hhh]”(hŒ list_item”“”)”}”(hŒvDownload and extract the latest Minnowboard MAX BIOS SPI image [1]. At the time writing this the latest image is v92. ”h]”h¸)”}”(hŒuDownload and extract the latest Minnowboard MAX BIOS SPI image [1]. At the time writing this the latest image is v92.”h]”hŒuDownload and extract the latest Minnowboard MAX BIOS SPI image [1]. At the time writing this the latest image is v92.”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h Khj ubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjubj )”}”(hŒ Install mtd-utils package [2]. We need this in order to erase the SPI serial flash. Distros like Debian and Fedora have this prepackaged with name "mtd-utils". ”h]”h¸)”}”(hŒŸInstall mtd-utils package [2]. We need this in order to erase the SPI serial flash. Distros like Debian and Fedora have this prepackaged with name "mtd-utils".”h]”hŒ£Install mtd-utils package [2]. We need this in order to erase the SPI serial flash. Distros like Debian and Fedora have this prepackaged with name “mtd-utilsâ€.”…””}”(hj(hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h Khj$ubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjubj )”}”(hŒ¤Add "spi_intel.writeable=1" to the kernel command line and reboot the board (you can also reload the driver passing "writeable=1" as module parameter to modprobe). ”h]”h¸)”}”(hŒ£Add "spi_intel.writeable=1" to the kernel command line and reboot the board (you can also reload the driver passing "writeable=1" as module parameter to modprobe).”h]”hŒ«Add “spi_intel.writeable=1†to the kernel command line and reboot the board (you can also reload the driver passing “writeable=1†as module parameter to modprobe).”…””}”(hj@hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K#hj<ubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjubj )”}”(hŒéOnce the board is up and running again, find the right MTD partition (it is named as "BIOS"):: # cat /proc/mtd dev: size erasesize name mtd0: 00800000 00001000 "BIOS" So here it will be /dev/mtd0 but it may vary. ”h]”(h¸)”}”(hŒ^Once the board is up and running again, find the right MTD partition (it is named as "BIOS")::”h]”hŒaOnce the board is up and running again, find the right MTD partition (it is named as “BIOSâ€):”…””}”(hjXhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K'hjTubhŒ literal_block”“”)”}”(hŒM# cat /proc/mtd dev: size erasesize name mtd0: 00800000 00001000 "BIOS"”h]”hŒM# cat /proc/mtd dev: size erasesize name mtd0: 00800000 00001000 "BIOS"”…””}”hjhsbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1jfhŸh¶h K*hjTubh¸)”}”(hŒ-So here it will be /dev/mtd0 but it may vary.”h]”hŒ-So here it will be /dev/mtd0 but it may vary.”…””}”(hjxhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K.hjTubeh}”(h]”h ]”h"]”h$]”h&]”uh1j hjubj )”}”(hŒµMake backup of the existing image first:: # dd if=/dev/mtd0ro of=bios.bak 16384+0 records in 16384+0 records out 8388608 bytes (8.4 MB) copied, 10.0269 s, 837 kB/s ”h]”(h¸)”}”(hŒ)Make backup of the existing image first::”h]”hŒ(Make backup of the existing image first:”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K0hjŒubjg)”}”(hŒy# dd if=/dev/mtd0ro of=bios.bak 16384+0 records in 16384+0 records out 8388608 bytes (8.4 MB) copied, 10.0269 s, 837 kB/s”h]”hŒy# dd if=/dev/mtd0ro of=bios.bak 16384+0 records in 16384+0 records out 8388608 bytes (8.4 MB) copied, 10.0269 s, 837 kB/s”…””}”hjžsbah}”(h]”h ]”h"]”h$]”h&]”jvjwuh1jfhŸh¶h K2hjŒubeh}”(h]”h ]”h"]”h$]”h&]”uh1j hjubj )”}”(hŒëVerify the backup:: # sha1sum /dev/mtd0ro bios.bak fdbb011920572ca6c991377c4b418a0502668b73 /dev/mtd0ro fdbb011920572ca6c991377c4b418a0502668b73 bios.bak The SHA1 sums must match. Otherwise do not continue any further! ”h]”(h¸)”}”(hŒVerify the backup::”h]”hŒVerify the backup:”…””}”(hj¶hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K7hj²ubjg)”}”(hŒ‡# sha1sum /dev/mtd0ro bios.bak fdbb011920572ca6c991377c4b418a0502668b73 /dev/mtd0ro fdbb011920572ca6c991377c4b418a0502668b73 bios.bak”h]”hŒ‡# sha1sum /dev/mtd0ro bios.bak fdbb011920572ca6c991377c4b418a0502668b73 /dev/mtd0ro fdbb011920572ca6c991377c4b418a0502668b73 bios.bak”…””}”hjÄsbah}”(h]”h ]”h"]”h$]”h&]”jvjwuh1jfhŸh¶h K9hj²ubh¸)”}”(hŒ@The SHA1 sums must match. Otherwise do not continue any further!”h]”hŒ@The SHA1 sums must match. Otherwise do not continue any further!”…””}”(hjÒhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K=hj²ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j hjubj )”}”(hŒ½Erase the SPI serial flash. After this step, do not reboot the board! Otherwise it will not start anymore:: # flash_erase /dev/mtd0 0 0 Erasing 4 Kibyte @ 7ff000 -- 100 % complete ”h]”(h¸)”}”(hŒkErase the SPI serial flash. After this step, do not reboot the board! Otherwise it will not start anymore::”h]”hŒjErase the SPI serial flash. After this step, do not reboot the board! Otherwise it will not start anymore:”…””}”(hjêhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K?hjæubjg)”}”(hŒG# flash_erase /dev/mtd0 0 0 Erasing 4 Kibyte @ 7ff000 -- 100 % complete”h]”hŒG# flash_erase /dev/mtd0 0 0 Erasing 4 Kibyte @ 7ff000 -- 100 % complete”…””}”hjøsbah}”(h]”h ]”h"]”h$]”h&]”jvjwuh1jfhŸh¶h KBhjæubeh}”(h]”h ]”h"]”h$]”h&]”uh1j hjubj )”}”(hŒ|Once completed without errors you can write the new BIOS image:: # dd if=MNW2MAX1.X64.0092.R01.1605221712.bin of=/dev/mtd0 ”h]”(h¸)”}”(hŒ@Once completed without errors you can write the new BIOS image::”h]”hŒ?Once completed without errors you can write the new BIOS image:”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h KEhj ubjg)”}”(hŒ9# dd if=MNW2MAX1.X64.0092.R01.1605221712.bin of=/dev/mtd0”h]”hŒ9# dd if=MNW2MAX1.X64.0092.R01.1605221712.bin of=/dev/mtd0”…””}”hjsbah}”(h]”h ]”h"]”h$]”h&]”jvjwuh1jfhŸh¶h KGhj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j hjubj )”}”(hX:Verify that the new content of the SPI serial flash matches the new BIOS image:: # sha1sum /dev/mtd0ro MNW2MAX1.X64.0092.R01.1605221712.bin 9b4df9e4be2057fceec3a5529ec3d950836c87a2 /dev/mtd0ro 9b4df9e4be2057fceec3a5529ec3d950836c87a2 MNW2MAX1.X64.0092.R01.1605221712.bin The SHA1 sums should match. ”h]”(h¸)”}”(hŒPVerify that the new content of the SPI serial flash matches the new BIOS image::”h]”hŒOVerify that the new content of the SPI serial flash matches the new BIOS image:”…””}”(hj6hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h KIhj2ubjg)”}”(hŒ¾# sha1sum /dev/mtd0ro MNW2MAX1.X64.0092.R01.1605221712.bin 9b4df9e4be2057fceec3a5529ec3d950836c87a2 /dev/mtd0ro 9b4df9e4be2057fceec3a5529ec3d950836c87a2 MNW2MAX1.X64.0092.R01.1605221712.bin”h]”hŒ¾# sha1sum /dev/mtd0ro MNW2MAX1.X64.0092.R01.1605221712.bin 9b4df9e4be2057fceec3a5529ec3d950836c87a2 /dev/mtd0ro 9b4df9e4be2057fceec3a5529ec3d950836c87a2 MNW2MAX1.X64.0092.R01.1605221712.bin”…””}”hjDsbah}”(h]”h ]”h"]”h$]”h&]”jvjwuh1jfhŸh¶h KLhj2ubh¸)”}”(hŒThe SHA1 sums should match.”h]”hŒThe SHA1 sums should match.”…””}”(hjRhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h KPhj2ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j hjubj )”}”(hŒMNow you can reboot your board and observe the new BIOS starting up properly. ”h]”h¸)”}”(hŒLNow you can reboot your board and observe the new BIOS starting up properly.”h]”hŒLNow you can reboot your board and observe the new BIOS starting up properly.”…””}”(hjjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h KRhjfubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjubeh}”(h]”h ]”h"]”h$]”h&]”Œenumtype”Œarabic”Œprefix”hŒsuffix”Œ)”uh1jhjubah}”(h]”h ]”h"]”h$]”h&]”uh1hÿhŸh¶h Khh£hžhubh¢)”}”(hhh]”(h§)”}”(hŒ References”h]”hŒ References”…””}”(hj’hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjhžhhŸh¶h KVubh¸)”}”(hŒ\[1] https://firmware.intel.com/sites/default/files/MinnowBoard%2EMAX_%2EX64%2E92%2ER01%2Ezip”h]”(hŒ[1] ”…””}”(hj hžhhŸNh NubhŒ reference”“”)”}”(hŒXhttps://firmware.intel.com/sites/default/files/MinnowBoard%2EMAX_%2EX64%2E92%2ER01%2Ezip”h]”hŒXhttps://firmware.intel.com/sites/default/files/MinnowBoard%2EMAX_%2EX64%2E92%2ER01%2Ezip”…””}”(hjªhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”j¬uh1j¨hj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h KXhjhžhubh¸)”}”(hŒ'[2] http://www.linux-mtd.infradead.org/”h]”(hŒ[2] ”…””}”(hj¿hžhhŸNh Nubj©)”}”(hŒ#http://www.linux-mtd.infradead.org/”h]”hŒ#http://www.linux-mtd.infradead.org/”…””}”(hjÇhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”jÉuh1j¨hj¿ubeh}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h KZhjhžhubeh}”(h]”Œ references”ah ]”h"]”Œ references”ah$]”h&]”uh1h¡hh£hžhhŸh¶h KVubeh}”(h]”Œupgrading-bios-using-spi-intel”ah ]”h"]”Œupgrading bios using spi-intel”ah$]”h&]”uh1h¡hhhžhhŸh¶h Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”h¶uh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(h¦NŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”jŒerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”h¶Œ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(jéjæjájÞuŒ nametypes”}”(jé‰já‰uh}”(jæh£jÞjuŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nhžhub.