From owner-freebsd-questions@freebsd.org Tue Sep 12 10:55:53 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4497E02CD6 for ; Tue, 12 Sep 2017 10:55:53 +0000 (UTC) (envelope-from guru@unixarea.de) Received: from ms-10.1blu.de (ms-10.1blu.de [178.254.4.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 75E926CB4B for ; Tue, 12 Sep 2017 10:55:53 +0000 (UTC) (envelope-from guru@unixarea.de) Received: from [2.247.249.66] (helo=localhost.unixarea.de) by ms-10.1blu.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.86_2) (envelope-from ) id 1drir2-0003Da-II for freebsd-questions@freebsd.org; Tue, 12 Sep 2017 12:55:45 +0200 Received: from localhost.my.domain (localhost [127.0.0.1]) by localhost.unixarea.de (8.15.2/8.14.9) with ESMTPS id v8CAteVY052272 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Tue, 12 Sep 2017 12:55:40 +0200 (CEST) (envelope-from guru@unixarea.de) Received: (from guru@localhost) by localhost.my.domain (8.15.2/8.14.9/Submit) id v8CAtdnF052271 for freebsd-questions@freebsd.org; Tue, 12 Sep 2017 12:55:39 +0200 (CEST) (envelope-from guru@unixarea.de) X-Authentication-Warning: localhost.my.domain: guru set sender to guru@unixarea.de using -f Date: Tue, 12 Sep 2017 12:55:38 +0200 From: Matthias Apitz To: freebsd-questions@freebsd.org Subject: modifying the BIOS of an Acer C720 from within FreeBSD CURRENT Message-ID: <20170912105538.GA52179@c720-r314251> Reply-To: Matthias Apitz Mail-Followup-To: Matthias Apitz , freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable X-Operating-System: FreeBSD 12.0-CURRENT r314251 (amd64) X-message-flag: Mails containing HTML will not be read! Please send only plain text. User-Agent: Mutt/1.8.0 (2017-02-23) X-Con-Id: 51246 X-Con-U: 0-guru X-Originating-IP: 2.247.249.66 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Sep 2017 10:55:53 -0000 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