View previous topic :: View next topic |
Author |
Message |
g-virus n00b

Joined: 26 Aug 2017 Posts: 66
|
Posted: Fri Nov 06, 2020 5:21 pm Post subject: [SOLVED] RPi 4B, Kernel 5.10 and rpi4-eeprom-updater |
|
|
Hello everyone!
I didn't update my Pi a long time and yesterday that day came. I decided to switch kernel version to the latest available for Pi 5.10 and everything goes ok, but when I try to update sys-apps/flashrom, it complains on missing kernel options
Code: | The following features are unavailable on your machine: CONFIG_LINUX_MTD=yes CONFIG_LINUX_SPI=yes CONFIG_GFXNVIDIA=yes CONFIG_SATASII=yes CONFIG_ATAVIA=yes CONFIG_DRKAISER=yes CONFIG_NICINTEL=yes CONFIG_NICINTEL_SPI=yes CONFIG_NICINTEL_EEPROM=yes CONFIG_OGP_SPI=yes CONFIG_IT8212=yes |
Maybe the new kernel configuration skipped some of them during make olddefconfig, but I actually don't know which programmer on the board is required to work with rpi4-eeprom-updater and sys-apps/flashrom respectively, the question is what USE flag do I have to enable in flashrom package to update it successfully?
current USE flags
Code: | [ebuild U ] sys-apps/flashrom-1.2-r2 [1.2-r1] USE="atavia buspirate-spi ch341a-spi dediprog developerbox-spi digilent-spi drkaiser dummy ft2232-spi gfxnvidia internal-dmi it8212 linux-mtd linux-spi nicintel nicintel-eeprom nicintel-spi ogp-spi pickit2-spi pony-spi satasii serprog usbblaster-spi wiki (-atahpt) (-atapromise) (-internal) (-jlink-spi) -mstarddc-spi (-nic3com) (-nicnatsemi) (-nicrealtek) (-rayer-spi) (-satamv) -static -stlinkv3-spi (-tools)"
|
Thanks in advance!
Last edited by g-virus on Fri Nov 06, 2020 9:16 pm; edited 1 time in total |
|
Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 47007 Location: 56N 3W
|
Posted: Fri Nov 06, 2020 5:32 pm Post subject: |
|
|
g-virus,
sys-apps/flashrom is a pain in the bum.
Its build system checks that the build host actually has the hardware to use the options selected in the USE flags.
The Gentoo way is to issue warnings but not make the build fail, so you can build one place and use it somewhere else.
Code: | USE="atavia buspirate-spi ch341a-spi dediprog developerbox-spi digilent-spi drkaiser dummy ft2232-spi gfxnvidia internal-dmi it8212 linux-mtd linux-spi nicintel nicintel-eeprom nicintel-spi ogp-spi pickit2-spi pony-spi satasii serprog usbblaster-spi wiki (-atahpt) (-atapromise) (-internal) (-jlink-spi) -mstarddc-spi (-nic3com) (-nicnatsemi) (-nicrealtek) (-rayer-spi) (-satamv) -static -stlinkv3-spi (-tools)" |
Turn off the USE flags that correspond to hardware not installed on your build host. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
 |
g-virus n00b

Joined: 26 Aug 2017 Posts: 66
|
Posted: Fri Nov 06, 2020 5:48 pm Post subject: |
|
|
Thank you for a quick reply!
NeddySeagoon wrote: |
Turn off the USE flags that correspond to hardware not installed on your build host. |
I tried it, but now I get an error "Target arch is unknown. Aborting." during emerge |
|
Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 47007 Location: 56N 3W
|
Posted: Fri Nov 06, 2020 6:27 pm Post subject: |
|
|
g-virus,
The timeleness of any response here is just luck.
On my 64 bit Pi 4, fixing the USE flags so that the check passes gets me
Code: | [ebuild R ] sys-apps/flashrom-1.2-r2::gentoo USE="buspirate-spi ch341a-spi dediprog developerbox-spi digilent-spi dummy ft2232-spi internal-dmi pickit2-spi pony-spi (-atahpt) (-atapromise) -atavia* -drkaiser* -gfxnvidia* (-internal) -it8212* (-jlink-spi) -linux-mtd* -linux-spi* -mstarddc-spi (-nic3com) -nicintel* -nicintel-eeprom* -nicintel-spi* (-nicnatsemi) (-nicrealtek) -ogp-spi* (-rayer-spi) (-satamv) -satasii* -serprog* -static -stlinkv3-spi (-tools) -usbblaster-spi* -wiki*" 0 KiB
| but it gets worse ...
Code: | Replacing all version templates with 1.2.
Checking for a C compiler... sed -e "s#@PREFIX@#/usr#" -e "s#@LIBDIR@#lib64#" -e "s#@INCLUDEDIR@#include#" -e "s#@VERSION@#1.2#" -e "s#@LIBS@# -lusb-1.0 #" < flashrom.pc.in > flashrom.pc.tmp && mv flashrom.pc.tmp flashrom.pc
found.
Target arch is unknown. Aborting.
make: *** [Makefile:1187: compiler] Error 1 |
Its installed as it built on the arm64 build box and I installed the binary from my binhost
sys-apps/flashrom-1.0 is is Sakakis genpi64 overlay so there must have been an issue with building it on the 64 bit Pi 4.
You don't say if you are using 32 bit on 64 bit Gentoo on your Pi. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
 |
g-virus n00b

Joined: 26 Aug 2017 Posts: 66
|
Posted: Fri Nov 06, 2020 6:33 pm Post subject: |
|
|
NeddySeagoon wrote: | g-virus,
but it gets worse ...
Code: | Replacing all version templates with 1.2.
Checking for a C compiler... sed -e "s#@PREFIX@#/usr#" -e "s#@LIBDIR@#lib64#" -e "s#@INCLUDEDIR@#include#" -e "s#@VERSION@#1.2#" -e "s#@LIBS@# -lusb-1.0 #" < flashrom.pc.in > flashrom.pc.tmp && mv flashrom.pc.tmp flashrom.pc
found.
Target arch is unknown. Aborting.
make: *** [Makefile:1187: compiler] Error 1 |
|
yes exactly, the same error with me, I use Gentoo 64bit as well |
|
Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 47007 Location: 56N 3W
|
Posted: Fri Nov 06, 2020 7:54 pm Post subject: |
|
|
g-virus,
It now Bug 753383.
Meanwhile the binary in my binhost installs and works. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
 |
g-virus n00b

Joined: 26 Aug 2017 Posts: 66
|
Posted: Fri Nov 06, 2020 8:22 pm Post subject: |
|
|
ok then I wait until it will be fixed, will mask the r2 version for now |
|
Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 47007 Location: 56N 3W
|
Posted: Fri Nov 06, 2020 8:24 pm Post subject: |
|
|
g-virus,
-r1 doesn't work either and 1.0 has been removed from ::gentoo. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
 |
g-virus n00b

Joined: 26 Aug 2017 Posts: 66
|
Posted: Fri Nov 06, 2020 8:28 pm Post subject: |
|
|
NeddySeagoon wrote: | g-virus,
-r1 doesn't work either and 1.0 has been removed from ::gentoo. |
what should I do then? to build it from genpi64 or? |
|
Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 47007 Location: 56N 3W
|
Posted: Fri Nov 06, 2020 8:37 pm Post subject: |
|
|
g-virus,
genpi64 will get you sys-apps/flashrom-1.0.
If your portage repo is git, you can dig out the sys-apps/flashrom-1.0 ebuild from git.
sys-apps/flashrom-1.0 works. I've used that in the past.
You can use the sys-apps/flashrom-1.2-r2 binary from my binhost. It built on Gentoos big hairy arm64 build box.
It updated my Pi 4 too.
The fix may be a while, it may need an upstream patch, rather than an ebuild change.
The choice is yours, they all work. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
 |
g-virus n00b

Joined: 26 Aug 2017 Posts: 66
|
Posted: Fri Nov 06, 2020 9:01 pm Post subject: |
|
|
I'm actually don't care what version is used, for me it's ok to have 1.2-r1 now, but I'm not sure how rpi4-eeprom-updater will work with the older version. If it's ok for him - it's ok for me too xD
Last edited by g-virus on Fri Nov 06, 2020 9:15 pm; edited 1 time in total |
|
Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 47007 Location: 56N 3W
|
Posted: Fri Nov 06, 2020 9:14 pm Post subject: |
|
|
g-virus,
Looking at the ebuild, most of the changes are to add new programmers.
The Pi does not need those. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
 |
g-virus n00b

Joined: 26 Aug 2017 Posts: 66
|
Posted: Fri Nov 06, 2020 9:16 pm Post subject: |
|
|
Ok understood, thank you for your help! |
|
Back to top |
|
 |
ShorTie n00b

Joined: 12 Feb 2006 Posts: 53
|
Posted: Thu Dec 03, 2020 11:13 am Post subject: |
|
|
fyi: I would suggest using make bcm2711_defconfig instead of make olddefconfig for the kernel configuring.
Makes life a whole lot easier, imho. |
|
Back to top |
|
 |
Phoenix591 Guru

Joined: 17 Sep 2007 Posts: 310
|
Posted: Mon Dec 14, 2020 12:30 pm Post subject: |
|
|
nowadays the eeprom-updater just uses recovery.bin to flash the firmware update by default
Quote: | USE_FLASHROM is deprecated and there is no support for this. The muxing
of the SPI pins causes too many issues for this to ever be reliable.
The flashrom update mechanism may be enabled by setting USE_FLASHROM=1. This
also selects the vl805 tool instead of using recovery.bin to perform the
update. This may be desirable if an immediate update is required or if an
SD card is not present.
However, this not recommended because the SPI pins are muxed with audio and other
device drivers may be using SPI (e.g. HATs). This is also not safe in the
event of a power failure during the update of the EEPROM.
Changing the VL805 firmware whilst USB devices are attached may also cause
those devices to stop working until after the system is reboot. |
|
|
Back to top |
|
 |
|