Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Sep 2017 12:55:38 +0200
From:      Matthias Apitz <guru@unixarea.de>
To:        freebsd-questions@freebsd.org
Subject:   modifying the BIOS of an Acer C720 from within FreeBSD CURRENT
Message-ID:  <20170912105538.GA52179@c720-r314251>

next in thread | raw e-mail | index | archive | help

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=3D$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      (autodetect=
ed)
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_ref=
erence

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 enu=
meration type
      'enum vb2_nv_param' to different enumeration type 'VbNvParam' (aka 'e=
num 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/f=
irmware/lib/vboot_api_kernel.o] Error 1

Thanks

	matthias

--=20
Matthias Apitz, =E2=9C=89 guru@unixarea.de, =E2=8C=82 http://www.unixarea.d=
e/  =E2=98=8E +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170912105538.GA52179>