Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] RPi 4B, Kernel 5.10 and rpi4-eeprom-updater
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
g-virus
n00b
n00b


Joined: 26 Aug 2017
Posts: 66

PostPosted: Fri Nov 06, 2020 5:21 pm    Post subject: [SOLVED] RPi 4B, Kernel 5.10 and rpi4-eeprom-updater Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 46756
Location: 56N 3W

PostPosted: Fri Nov 06, 2020 5:32 pm    Post subject: Reply with quote

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
View user's profile Send private message
g-virus
n00b
n00b


Joined: 26 Aug 2017
Posts: 66

PostPosted: Fri Nov 06, 2020 5:48 pm    Post subject: Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 46756
Location: 56N 3W

PostPosted: Fri Nov 06, 2020 6:27 pm    Post subject: Reply with quote

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
View user's profile Send private message
g-virus
n00b
n00b


Joined: 26 Aug 2017
Posts: 66

PostPosted: Fri Nov 06, 2020 6:33 pm    Post subject: Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 46756
Location: 56N 3W

PostPosted: Fri Nov 06, 2020 7:54 pm    Post subject: Reply with quote

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
View user's profile Send private message
g-virus
n00b
n00b


Joined: 26 Aug 2017
Posts: 66

PostPosted: Fri Nov 06, 2020 8:22 pm    Post subject: Reply with quote

ok then I wait until it will be fixed, will mask the r2 version for now
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 46756
Location: 56N 3W

PostPosted: Fri Nov 06, 2020 8:24 pm    Post subject: Reply with quote

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
View user's profile Send private message
g-virus
n00b
n00b


Joined: 26 Aug 2017
Posts: 66

PostPosted: Fri Nov 06, 2020 8:28 pm    Post subject: Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 46756
Location: 56N 3W

PostPosted: Fri Nov 06, 2020 8:37 pm    Post subject: Reply with quote

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
View user's profile Send private message
g-virus
n00b
n00b


Joined: 26 Aug 2017
Posts: 66

PostPosted: Fri Nov 06, 2020 9:01 pm    Post subject: Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 46756
Location: 56N 3W

PostPosted: Fri Nov 06, 2020 9:14 pm    Post subject: Reply with quote

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
View user's profile Send private message
g-virus
n00b
n00b


Joined: 26 Aug 2017
Posts: 66

PostPosted: Fri Nov 06, 2020 9:16 pm    Post subject: Reply with quote

Ok understood, thank you for your help!
Back to top
View user's profile Send private message
ShorTie
n00b
n00b


Joined: 12 Feb 2006
Posts: 32

PostPosted: Thu Dec 03, 2020 11:13 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum