modifying the BIOS of an Acer C720 from within FreeBSD CURRENT

Matthias Apitz guru at unixarea.de
Tue Sep 12 10:55:53 UTC 2017


Hello,

The background: To be able to install and boot FreeBSD on an Acer C720
Chromebook, one must tweak some bits in the BIOS and enable a so called
LEGACY BIOS mode (after removing the hardware write protection of the
BIOS). To do so, there are some tools within ChromeOS which allow this
procedure, but after this you can not boot ChromeOS anymore (from the
saved SSD) and so you can't use these tools within ChromeOS to switch
the bits back.

The tools to use are simple:

# flashrom -p internal -i GBB -r bios.bin
# futility gbb -s --flags=$flags bios.bin
# flashrom -p host -i GBB --fast-verify -w bios.bin

Flashrom we have in the ports as sysutils/flashrom and it works, even
with the small problem at the moment:

$ flashrom -R
flashrom v0.9.9-r1955 on FreeBSD 12.0-CURRENT (amd64)
flashrom is free software, get the source code at https://flashrom.org

$ flashrom -L | egrep -i 'acer|720|chro'
Acer            V75-M                                   OK
Acer            EM61SM/EM61PM                           OK
GIGABYTE        GA-M720-US3                             OK
MSI             MS-7207 (K8NGM2-L)                      OK      (autodetected)
Acer       Aspire 1520         OK
Acer       Aspire One          BAD

$ flashrom -p internal -i GBB -r bios.bin
flashrom v0.9.9-r1955 on FreeBSD 12.0-CURRENT (amd64)
flashrom is free software, get the source code at https://flashrom.org

Region requested (with -i "GBB"), but no layout data is available.

The other tool (futility) is part of ChromiumOS and can be fetched from
here:

$ git clone https://chromium.googlesource.com/chromiumos/platform/vboot_reference

A first try to make it gives:

$ cd vboot_reference
$ gmake
Using qemu for testing.
Package libcrypto was not found in the pkg-config search path.
Perhaps you should add the directory containing `libcrypto.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libcrypto', required by 'virtual:world', not found

We have libcrypto.so in the base system in /usr/lib, but I do not see
any file libcrypto.pc so that other could pick this up; should I install
OpenSSL from the ports system?

The other error on compile is this and I have no clue how to solve this:

    CC            firmware/linktest/main.o
    CC            firmware/lib/vboot_common.o
    CC            firmware/lib/region-fw.o
    CC            firmware/lib/vboot_common_init.o
    CC            firmware/lib/vboot_nvstorage.o
    CC            firmware/lib/region-init.o
    CC            firmware/lib/rollback_index.o
    CC            firmware/lib/tpm_lite/tlcl.o
    CC            firmware/stub/tpm_lite_stub.o
    CC            firmware/stub/vboot_api_stub_init.o
    CC            firmware/stub/vboot_api_stub_region.o
    CC            firmware/lib/cgptlib/cgptlib.o
    CC            firmware/lib/cgptlib/cgptlib_internal.o
    CC            firmware/lib/cgptlib/crc32.o
    CC            firmware/lib/ec_sync.o
    CC            firmware/lib/ec_sync_all.o
    CC            firmware/lib/gpt_misc.o
    CC            firmware/lib/utility_string.o
    CC            firmware/lib/vboot_api_kernel.o
firmware/lib/vboot_api_kernel.c:512:16: error: implicit conversion from enumeration type
      'enum vb2_nv_param' to different enumeration type 'VbNvParam' (aka 'enum VbNvParam')
      [-Werror,-Wenum-conversion]
        VbNvGet(&vnc, VB2_NV_DEV_BOOT_FASTBOOT_FULL_CAP,
        ~~~~~~~       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
gmake: *** [Makefile:1204: /usr/home/guru/Acer-C720/vboot_reference/build/firmware/lib/vboot_api_kernel.o] Error 1

Thanks

	matthias

-- 
Matthias Apitz, ✉ guru at unixarea.de, ⌂ http://www.unixarea.de/  ☎ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub


More information about the freebsd-questions mailing list