Warning: this is an htmlized version!
The original is here, and
the conversion rules are here.
#######
#
# E-scripts on libreboot.
#
# Note 1: use the eev command (defined in eev.el) and the
# ee alias (in my .zshrc) to execute parts of this file.
# Executing this file as a whole makes no sense.
# An introduction to eev can be found here:
#
#   (find-eev-quick-intro)
#   http://angg.twu.net/eev-intros/find-eev-quick-intro.html
#
# Note 2: be VERY careful and make sure you understand what
# you're doing.
#
# Note 3: If you use a shell other than zsh things like |&
# and the for loops may not work.
#
# Note 4: I always run as root.
#
# Note 5: some parts are too old and don't work anymore. Some
# never worked.
#
# Note 6: the definitions for the find-xxxfile commands are on my
# .emacs.
#
# Note 7: if you see a strange command check my .zshrc -- it may
# be defined there as a function or an alias.
#
# Note 8: the sections without dates are always older than the
# sections with dates.
#
# This file is at <http://angg.twu.net/e/libreboot.e>
#           or at <http://angg.twu.net/e/libreboot.e.html>.
#        See also <http://angg.twu.net/emacs.html>,
#                 <http://angg.twu.net/.emacs[.html]>,
#                 <http://angg.twu.net/.zshrc[.html]>,
#                 <http://angg.twu.net/escripts.html>,
#             and <http://angg.twu.net/>.
#
#######



# (find-es "grub")
# (find-esfile "grub.e" "libreboot")


# «.mailing-list»		(to "mailing-list")
# «.flashrom»			(to "flashrom")
# «.libreboot-util»		(to "libreboot-util")
# «.create-image-from-rom»	(to "create-image-from-rom")
# «.otp-bits»			(to "otp-bits")
# «.failed-to-map-dmar2»	(to "failed-to-map-dmar2")




#####
#
# mailing lists
# 2019apr21
#
#####

# «mailing-list» (to ".mailing-list")
# https://libreboot.org/news/new-mailing-lists.html
# https://libreboot.org/lists/ (404)
# https://libreboot.org/pipermail/development/ (404)




#####
#
# flashrom
# 2019mar04
#
#####

# «flashrom» (to ".flashrom")
# (find-status   "flashrom")
# (find-vldifile "flashrom.list")
# (find-udfile   "flashrom/")

# (find-fline "/lib/udev/rules.d/60-flashrom.rules")
# (find-fline "/usr/sbin/flashrom")
# (find-udfile "flashrom/README.gz")
# (find-udfile "flashrom/changelog.Debian.gz")
# (find-udfile "flashrom/copyright")
# (find-udfile "flashrom/mysteries_intel.txt.gz")
# (find-udfile "flashrom/serprog-protocol.txt.gz")
# (find-man "8 flashrom")

# (find-udfile "flashrom/README.Debian")
#  #flashrom on irc.freenode.net
# http://flashrom.org/Mailinglist
# https://www.mail-archive.com/flashrom@flashrom.org/


# (find-freenode-links "l" "#libreboot")
(find-freenode-3a "#libreboot")


Hi... I have a Thinkpad T400 with libreboot, and I was trying to rewrite its flash memory to change some details of its grub configuration... but when I ran
  flashrom/x86_64/flashrom -p internal -V
I got this message at the end of the log:



# (find-librebootutilfile "ofpiv")
# (find-librebootutilsh "grep Found ofpiv")
# (find-librebootutilfile "ofpiv" "Found Macronix" "8192 kB")
# (find-librebootutilfile "ofpiv" "may never be able to write it")







#####
#
# libreboot-util
# 2019feb25
#
#####

# «libreboot-util» (to ".libreboot-util")
# (find-es "grub" "libreboot-x200-cbfs")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# https://libreboot.org/docs/gnulinux/grub_cbfs.html#download-the-libreboot-utility-archive
# https://www.mirrorservice.org/sites/libreboot.org/release/stable/20160907/libreboot_r20160907_util.tar.xz
rm -Rfv ~/usrc/libreboot_r20160907_util/
rm -Rfv ~/usrc/libreboot_util/
tar -C ~/usrc/ -xvf \
  $S/https/www.mirrorservice.org/sites/libreboot.org/release/stable/20160907/libreboot_r20160907_util.tar.xz
mv -v  ~/usrc/libreboot_r20160907_util \
       ~/usrc/libreboot_util
cd     ~/usrc/libreboot_util/

# (find-librebootutilfile "")
# (find-librebootutilsh "find * | sort")
# (find-librebootutilfile "cbfstool/x86_64/" " cbfstool")
# (find-librebootutilfile "flashrom/x86_64/")

# You can find the flash chip size by running the following command:
#    flashrom -p internal -V
#   (find-man "8 flashrom" "-V, --verbose")
sudo flashrom/x86_64/flashrom -p internal -V    |& tee ofpiv

# (find-librebootutilfile "ofpiv")
# (find-librebootutilsh "grep Found ofpiv")
# (find-librebootutilfile "ofpiv" "Found Macronix" "8192 kB")
# (find-librebootutilfile "ofpiv" "may never be able to write it")

# From the end of the "ofpiv" file:

Found Macronix flash chip "MX25L6405D" (8192 kB, SPI).
This chip may contain one-time programmable memory. flashrom cannot read
and may never be able to write it, hence it may not be able to completely
clone the contents of this chip (see man page for details).
No operations were specified.






#####
#
# create-image-from-rom
# 2019mar04
#
#####

# «create-image-from-rom» (to ".create-image-from-rom")
# https://libreboot.org/docs/gnulinux/grub_cbfs.html#create-an-image-from-the-current-rom
# (find-man "8 flashrom" "-r, --read <file>")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd ~/usrc/libreboot_util/
sudo flashrom/x86_64/flashrom -p internal -r libreboot-here.rom


# https://libreboot.org/docs/gnulinux/grub_cbfs.html#download-a-pre-compiled-image-from-the-libreboot-website
cd ~/usrc/libreboot_util/
#      https://www.mirrorservice.org/sites/libreboot.org/release/stable/20160907/rom/grub/
#      https://www.mirrorservice.org/sites/libreboot.org/release/stable/20160907/rom/grub/libreboot_r20160907_grub_x200_8mb.tar.xz
#      https://www.mirrorservice.org/sites/libreboot.org/release/stable/20160907/rom/grub/libreboot_r20160907_grub_t400_8mb.tar.xz
cp -v $S/https/www.mirrorservice.org/sites/libreboot.org/release/stable/20160907/rom/grub/libreboot_r20160907_grub_x200_8mb.tar.xz .
cp -v $S/https/www.mirrorservice.org/sites/libreboot.org/release/stable/20160907/rom/grub/libreboot_r20160907_grub_t400_8mb.tar.xz .
tar -xvf libreboot_r20160907_grub_x200_8mb.tar.xz
#  (find-librebootgrubsfile "")
cp -v    libreboot_r20160907_grub_x200_8mb/x200_8mb_ukqwerty_vesafb.rom \
  libreboot-web.rom

# (find-librebootutilfile "")
# (find-librebootutilfile "" "libreboot-here.rom")
# (find-librebootutilfile "" "libreboot-web.rom")

# https://libreboot.org/docs/gnulinux/grub_cbfs.html#copy-grubtest.cfg-from-the-rom-image
# (find-librebootutilsh "cbfstool/x86_64/cbfstool")
# (find-librebootutilsh "cbfstool/x86_64/cbfstool" "print")
# (find-librebootutilsh "cbfstool/x86_64/cbfstool" "extract")
# (find-librebootutilsh "cbfstool/x86_64/cbfstool libreboot-here.rom print")
# (find-librebootutilsh "cbfstool/x86_64/cbfstool libreboot-web.rom  print")

cd ~/usrc/libreboot_util/
rm -Rv libreboot-here/
mkdir  libreboot-here/
mkdir  libreboot-here/fallback/
FILES=(
  config
  revision
  grub.cfg
  grubtest.cfg
  fallback/romstage
  fallback/ramstage
  fallback/payload
  background.jpg
)

for i in $FILES; do 
  echo $i:
  cbfstool/x86_64/cbfstool \
    libreboot-here.rom extract -m arm64 \
    -n $i -f libreboot-here/$i
  echo ""
done


(code-c-d "libreboothere" "~/usrc/libreboot_util/libreboot-here/")
# (find-librebootherefile "")
# (find-librebootherefile "grub.cfg" "Search ISOLINUX menu (USB)")



# (find-librebootutilfile "libreboot-here/grub.cfg" "Search ISOLINUX menu (USB)")


Found Macronix flash chip "MX25L6405D" (8192 kB, SPI) mapped at physical address 0x00000000ff800000.


Found Macronix flash chip "MX25L6405D" (8192 kB, SPI).
This chip may contain one-time programmable memory. flashrom cannot read
and may never be able to write it, hence it may not be able to completely
clone the contents of this chip (see man page for details).





#####
#
# OTP bits
# 2019may30
#
#####

# «otp-bits» (to ".otp-bits")
# (find-fline "~/LOGS/2019may30.libreboot")
# http://www.macronix.com/Lists/ApplicationNote/Attachments/1898/AN0218V1%20-%20Serial%20Flash%20Secured%20OTP%20Area%20Introduction.pdf




#####
#
# failed-to-map-dmar2
# 2019aug22
#
#####

# «failed-to-map-dmar2» (to ".failed-to-map-dmar2")
https://bbs.archlinux.org/viewtopic.php?id=205008
https://askubuntu.com/questions/413338/why-is-my-syslog-telling-me-that-my-bios-is-broken
https://lists.gnu.org/archive/html/libreboot/2015-11/msg00009.html

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
sudo dmesg | grep -i dmar
sudo dmesg

sudo dmesg | grep -i acpi




# https://www.reddit.com/r/libreboot/comments/buw0h5/would_i_need_to_reflash_libreboot_if_i_were_to/

https://news.ycombinator.com/item?id=28469520 Ministry of Freedom – GNU+Linux laptops with Libreboot preinstalled (minifree.org)







#  Local Variables:
#  coding:               utf-8-unix
#  End: