From 26ce6880a1c38ef208b907f70d95a7282c3cac7d Mon Sep 17 00:00:00 2001 From: Jeroen Quint Date: Wed, 02 Sep 2015 17:22:00 -0400 Subject: docs/gnulinux/grub_cbfs.html: Make it more user-friendly --- (limited to 'docs') diff --git a/docs/gnulinux/grub_cbfs.html b/docs/gnulinux/grub_cbfs.html index d2652ef..b0ed8f2 100644 --- a/docs/gnulinux/grub_cbfs.html +++ b/docs/gnulinux/grub_cbfs.html @@ -156,8 +156,10 @@

Acquire the necessary utilities

- Use cbfstool and flashrom. There are available in the _util release archive, + Use cbfstool and flashrom. There are available in the libreboot_util release archive, or they can be compiled (see ../git/index.html#build_flashrom). + Flashrom is also available from the repositories:
+ # pacman -S flashrom

@@ -178,7 +180,9 @@

ROM images are included pre-compiled in libreboot. You can also dump your current firmware, using flashrom:
$ sudo flashrom -p internal -r libreboot.rom
- # flashrom -p internal -r libreboot.rom + # flashrom -p internal -r libreboot.rom
+ If you are told to specify the chip, add the option -c {your chip} to the command, for example:
+ # flashrom -c MX25L6405 -p internal -r libreboot.rom

@@ -193,13 +197,14 @@

You can check the contents of the ROM image, inside CBFS:
+ $ cd .../libreboot_util/cbfstool $ ./cbfstool libreboot.rom print

The files grub.cfg and grubtest.cfg should be present. grub.cfg is loaded by default, with a menuentry for switching to grubtest.cfg. In this tutorial, you will first modify and test grubtest.cfg. - This is to reduce the possibility of bricking your device. + This is to reduce the possibility of bricking your device, so DO NOT SKIP THIS!

@@ -227,12 +232,12 @@

Re-insert the modified grubtest.cfg into the ROM image

- Delete the unmodified config from the ROM image:
+ Once your grubtest.cfg is modified and saved, delete the unmodified config from the ROM image:
$ ./cbfstool libreboot.rom remove -n grubtest.cfg

- Insert the modified version:
+ Next, insert the modified version:
$ ./cbfstool libreboot.rom add -n grubtest.cfg -f grubtest.cfg -t raw

@@ -249,7 +254,13 @@

Now you have a modified ROM. Refer back to ../install/index.html#flashrom for information - on how to flash it. Once you have done that, shut down and then boot up with your new test configuration. + on how to flash it.
+ $ cd /libreboot_util + # ./flash update libreboot.rom
+ Ocassionally, coreboot changes the name of a given board. If flashrom complains about a board mismatch, but you are sure that you chose the correct ROM image, then run this alternative command:
+ # ./flash forceupdate libreboot.rom
+ You should see "Verifying flash... VERIFIED." written at the end of the flashrom output. + Once you have done that, shut down and then boot up with your new test configuration.

@@ -276,11 +287,11 @@

Final steps

- Create a copy of grubtest.cfg, called grub.cfg, which is the same except for one difference: - change the menuentry 'Switch to grub.cfg' to 'Switch to grubtest.cfg' and inside it, - change all instances of grub.cfg to grubtest.cfg. This is so that the main config still + When you are satisfied booting from grubtest.cfg, you can create a copy of grubtest.cfg, called grub.cfg. This is the same except for one difference: + the menuentry 'Switch to grub.cfg' will be changed to 'Switch to grubtest.cfg' and inside it, + all instances of grub.cfg to grubtest.cfg. This is so that the main config still links (in the menu) to grubtest.cfg, so that you don't have to manually switch to it, in - case you ever want to follow this guide again in the future (modifying the already modified config)
+ case you ever want to follow this guide again in the future (modifying the already modified config). From /libreboot_util/cbfstool, do:
$ sed -e 's:(cbfsdisk)/grub.cfg:(cbfsdisk)/grubtest.cfg:g' -e 's:Switch to grub.cfg:Switch to grubtest.cfg:g' < grubtest.cfg > grub.cfg

@@ -296,8 +307,8 @@

- Now you have a modified ROM. Refer back to ../install/index.html#flashrom for information - on how to flash it. Once you have done that, shut down and then boot up with your new configuration. + Now you have a modified ROM. Again, refer back to ../install/index.html#flashrom for information + on how to flash it. It's the same method as you used before. Shut down and then boot up with your new configuration.

@@ -311,6 +322,7 @@

Copyright © 2014, 2015 Francis Rowe <info@gluglug.org.uk>
+ Copyright © 2015 Jeroen Quint <jezza@diplomail.ch>
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; -- cgit v0.9.1