Installing QMK in Gentoo GNU/Linux

Hello!

Today, I needed to install QMK on my Gentoo, as you can see, the istallaion is straightforward, but, I got some errors anyway during the setup step

☒ Can't find arm-none-eabi-gcc in your path.
☒ Can't find avr-gcc in your path.
☒ Can't find avrdude in your path.
☒ Can't find dfu-util in your path.

Both avrdude and dfu-util can be installed using portage with no issues, but find the other two packages was a little more challenging.

After some searching on the net I find an blog post talking about a similar issue, and a little hint in the Gentoo wiki

Based on those resources I executed the following commands:

$ echo 'sys-devel/gcc multilib' | sudo tee -a /etc/portage/package.use/gcc
$ sudo emerge -va sys-devel/gcc
$ sudo emerge -va sys-devel/crossdev
$ sudo crossdev --target arm-none-eabi
$ sudo crossdev --target avr

And now, qmk setup works, but it is complaining about the avr-gcc version : ⚠ We do not recommend avr-gcc newer than 8. Downgrading to 8.x is recommended.

Luckf me, someone already had that issue and shared a fix on Gentoo's forum, briefly, below are the commands from that forum post:

$ echo '>sys-devel/gcc-10.4.0' | sudo tee -a /etc/portage/package.mask/gcc
$ sudo emerge -av1 sys-devel/gcc
$ sudo eselect gcc set 3 # To select gcc-10.4.0
$ sudo crossdev --g 10.4.0 --target avr
$ sudo eselect gcc set 2 # To set the right version of avr

Then, the package mask should be removed, be cause we'll not need to compile avr again.

Finally, QMK compiles and flashs the microcontroller using qmk flash -kb splitkb/aurora/corne -km default

links

social