From 488242eb941305ef61319b8499d4a1e8ccf218a1 Mon Sep 17 00:00:00 2001
From: Francis Rowe
- A coreboot or libreboot ROM is not simply "flat"; there is an actual filesystem inside called CBFS (coreboot filesystem). A utility called 'cbfstool' + A libreboot (or coreboot) ROM is not simply "flat"; there is an actual filesystem inside called CBFS (coreboot filesystem). A utility called 'cbfstool' allows you to change the contents of the ROM. In this case, libreboot is configured such that the grub.cfg exists directly inside CBFS instead of inside the grub.elf payload's 'memdisk' (which is itself stored in CBFS).
@@ -61,30 +61,30 @@You can work directly with one of the ROM's already included in libreboot_bin.tar.gz. For the purpose of this tutorial it is assumed - that your ROM is named 'coreboot.rom' so please make sure to adapt. + that your ROM is named 'libreboot_usqwerty.rom' so please make sure to adapt.
If you want to re-use the ROM that you currently have flashed (and running) then see ../index.html#build_flashrom
and then run:
- $ sudo ./flashrom -p internal -r coreboot.rom
- Notice that this is using "-r" (read) instead of "-w" (write). This will create a dump (copy) of your current firmware and name it coreboot.rom. You need to take ownership of the file. For example:
- $ sudo chown yourusername:yourusername coreboot.rom
- # chown yourusername:yourusername coreboot.rom
+ $ sudo ./flashrom -p internal -r libreboot_usqwerty.rom
+ Notice that this is using "-r" (read) instead of "-w" (write). This will create a dump (copy) of your current firmware and name it libreboot_usqwerty.rom. You need to take ownership of the file. For example:
+ $ sudo chown yourusername:yourusername libreboot_usqwerty.rom
+ # chown yourusername:yourusername libreboot_usqwerty.rom
Display contents of ROM:
- $ ./cbfstool coreboot.rom print
+ $ ./cbfstool libreboot_usqwerty.rom print
- The coreboot.rom file contains your grub.cfg. + The libreboot_usqwerty.rom file contains your grub.cfg.
Extract grub.cfg from the ROM:
- $ ./cbfstool coreboot.rom extract -n grub.cfg -f grub.cfg
+ $ ./cbfstool libreboot_usqwerty.rom extract -n grub.cfg -f grub.cfg
@@ -93,22 +93,22 @@
Delete the grub.cfg that remained inside the ROM:
- $ ./cbfstool coreboot.rom remove -n grub.cfg
+ $ ./cbfstool libreboot_usqwerty.rom remove -n grub.cfg
Display ROM contents and now you see grub.cfg no longer exists there:
- $ ./cbfstool coreboot.rom print
+ $ ./cbfstool libreboot_usqwerty.rom print
Add the modified version that you just made:
- $ ./cbfstool coreboot.rom add -n grub.cfg -f grub.cfg -t raw
+ $ ./cbfstool libreboot_usqwerty.rom add -n grub.cfg -f grub.cfg -t raw
Now display ROM contents again and see that it exists again:
- $ ./cbfstool coreboot.rom print
+ $ ./cbfstool libreboot_usqwerty.rom print
-- cgit v0.9.1