Fresh Raspberry Pi 4B Install with linux-raspberrypi4 Kernel

This forum is for topics dealing with problems with software specifically in the AArch64 repo.

Fresh Raspberry Pi 4B Install with linux-raspberrypi4 Kernel

Postby steadybright » Fri Feb 12, 2021 3:46 pm

Greetings,

I'd like to use the linux-raspberrypi4 kernel on my RPi-4B.

How is this accomplished?

Would you review what I think I need to do and fill in the gaps/correct me:

UPDATED from original post:
    - Modified step 2, per @graysky feedback (below)
    - Modified step 3, per @graysky feedback (below)
    - Added steps #4 and #5.

1. Complete "standard" Raspberry Pi 4/ARMv8/AArch64 installation, instructions here:
....https://archlinuxarm.org/platforms/armv8/broadcom/raspberry-pi-4
2. Then, I update the system with pacman -Syyu
3. Next, I install packages for linux-raspberrypi4 kernel
....a. linux-raspberrypi4
....b. linux-raspberrypi4-headers (optional, but I installed)
....c. raspberrypi-firmware
....d. Are there any other packages I should consider installing unique to the linux-raspberrypi4 kernel?
4. Prior to rebooting, the /etc/fstab file must be updated to change the 1 to a zero for the
....boot partition, i.e., ...1p1 becomes ...0p1.
5. Reboot

The steps above got me an almost fully-functional RPi-4B. Almost, because my RTC didn't work due to an i2c issue.

See this thread for a workaround if you use i2c:
https://archlinuxarm.org/forum/viewtopic.php?f=65&t=15112

sb
Last edited by steadybright on Sat Feb 13, 2021 4:26 pm, edited 3 times in total.
People are illogical, unreasonable, and self-centered. Love them anyway.
steadybright
 
Posts: 53
Joined: Thu Aug 29, 2013 4:08 am

Re: Fresh Raspberry Pi 4B Install with linux-raspberrypi4 Ke

Postby graysky » Fri Feb 12, 2021 3:57 pm

1. Right
2. I would update the system entirely to grab other packages/partial updates are not supported (ie pacman -Syu). After that you can swap kernels, see below:
3a. required
3b. not required, if you want to build modules or the like, you can install them
3c. Install both.

Several months ago, when I tried switching linux-aarch64 to linux-raspberrypi4, I found some files where left behind. Will you try and comment?

Does this complete without errors:
$this->bbcode_second_pass_code('', 'pacman -S linux-raspberrypi4 raspberrypi-bootloader
raspberrypi-bootloader-x')
graysky
Developer
 
Posts: 1728
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: Fresh Raspberry Pi 4B Install with linux-raspberrypi4 Ke

Postby steadybright » Fri Feb 12, 2021 6:11 pm

$this->bbcode_second_pass_quote('graysky', '
')
Several months ago, when I tried switching linux-aarch64 to linux-raspberrypi4, I found some files where left behind. Will you try and comment?

Does this complete without errors:
$this->bbcode_second_pass_code('', 'pacman -S linux-raspberrypi4 raspberrypi-bootloader
raspberrypi-bootloader-x')


Per your request. I ran this after running all steps in my original post and after rebooting:
$this->bbcode_second_pass_code('', '[alarm@alarm ~]$ sudo pacman -S linux-raspberrypi4 raspberrypi-bootloader raspberrypi-bootloader-x
warning: linux-raspberrypi4-5.10.14-2 is up to date -- reinstalling
warning: raspberrypi-bootloader-20210208-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (3) linux-raspberrypi4-5.10.14-2 raspberrypi-bootloader-20210208-1 raspberrypi-bootloader-x-20210208-1

Total Download Size: 1.88 MiB
Total Installed Size: 66.80 MiB
Net Upgrade Size: 6.39 MiB

:: Proceed with installation? [Y/n] ')
People are illogical, unreasonable, and self-centered. Love them anyway.
steadybright
 
Posts: 53
Joined: Thu Aug 29, 2013 4:08 am

Re: Fresh Raspberry Pi 4B Install with linux-raspberrypi4 Ke

Postby steadybright » Fri Feb 12, 2021 7:04 pm

I can also confirm that sound is finally working.

By sound, I mean analog audio through the RPi-4B jack, not HDMI audio. I haven't tested HDMI audio.

In addition to the steps in my initial post, I installed "alsa-utils".

Other changes:

I modified the /boot/cmdline.txt (the modification was only to suppress audit messages in the console, and should not impact whether sound works or not. Here it is anyway):
$this->bbcode_second_pass_code('', 'root=/dev/mmcblk0p2 rw rootwait console=ttyAMA0,115200 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=ttyAMA0,115200 audit=0')

I added several lines to the /boot/config.txt file (all lines after the blank line). After adding these lines and rebooting, sound works from the console and in X.

NOTE: I had previously added the "dtparam=audio=on" line alone, but that didn't result in audio working. After I added the rest, audio was working:
$this->bbcode_second_pass_code('', '# See /boot/overlays/README for all available options
dtoverlay=vc4-kms-v3d
initramfs initramfs-linux.img followkernel

arm_64bit=1
enable_gic=1
dtparam=i2c_arm=on
dtoverlay=i2c-rtc,ds3231
dtparam=audio=on
dtoverlay=disable-wifi
dtoverlay=disable-bt
disable_overscan=0
gpu_mem=128')
Note that I have entries supporting my setup, like the RTC. I'm showing you the whole file for completeness.

To test audio from the console:
$this->bbcode_second_pass_code('', '$ aplay /usr/share/sounds/alsa/Front_Center.wav ')

The "no audio" bug vexed me for a week. Glad it's behind me for now. Good luck!

sb
People are illogical, unreasonable, and self-centered. Love them anyway.
steadybright
 
Posts: 53
Joined: Thu Aug 29, 2013 4:08 am

Re: Fresh Raspberry Pi 4B Install with linux-raspberrypi4 Ke

Postby steadybright » Fri Feb 12, 2021 11:54 pm

The original issue was resolved, so I'm deleting the text to avoid confusion.
Last edited by steadybright on Sat Feb 13, 2021 7:07 pm, edited 1 time in total.
People are illogical, unreasonable, and self-centered. Love them anyway.
steadybright
 
Posts: 53
Joined: Thu Aug 29, 2013 4:08 am

Re: Fresh Raspberry Pi 4B Install with linux-raspberrypi4 Ke

Postby graysky » Sat Feb 13, 2021 11:18 am

$this->bbcode_second_pass_quote('steadybright', 'N')ote that raspberrypi-firmware is provided by raspberrypi-userland-aarch64-git.
...
This is important because raspberrypi-userland-aarch64-git provides the command vcgencmd, while raspberrypi-firmware does not.
...


What? No such package. raspberrypi-firmware provides vcgencmd

$this->bbcode_second_pass_code('', '
% pacman -Ss userland
extra/php-apcu 5.1.19-2
A userland caching module for PHP
extra/php7-apcu 5.1.19-2
A userland caching module for PHP
community/open-iscsi 2.1.3-1
iSCSI userland tools
')

$this->bbcode_second_pass_code('', '% which vcgencmd
/opt/vc/bin/vcgencmd

% pacman -Qo vcgencmd
/opt/vc/bin/vcgencmd is owned by raspberrypi-firmware 20210128-1
')
graysky
Developer
 
Posts: 1728
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: Fresh Raspberry Pi 4B Install with linux-raspberrypi4 Ke

Postby steadybright » Sat Feb 13, 2021 2:33 pm

vcgencmd issue resolved; deleting this text.
Last edited by steadybright on Sat Feb 13, 2021 7:08 pm, edited 1 time in total.
People are illogical, unreasonable, and self-centered. Love them anyway.
steadybright
 
Posts: 53
Joined: Thu Aug 29, 2013 4:08 am

Re: Fresh Raspberry Pi 4B Install with linux-raspberrypi4 Ke

Postby graysky » Sat Feb 13, 2021 2:48 pm

$this->bbcode_second_pass_quote('steadybright', '1'). I wouldn't have sought a solution to...

$this->bbcode_second_pass_code('', '$ vcgencmd
-bash: vcgencmd: command not found')
...


I suspect you just need to update PATH in your shellrc to include /opt/vc/bin/

$this->bbcode_second_pass_code('', '% grep PATH ~/.zshrc
PATH=$PATH:/opt/vc/bin:$HOME/bin
')
graysky
Developer
 
Posts: 1728
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000
Top

Re: Fresh Raspberry Pi 4B Install with linux-raspberrypi4 Ke

Postby steadybright » Sat Feb 13, 2021 2:57 pm

I just completed an experiment, doing the following:

1. Uninstalled raspberrypi-userland-aarch64-git

2. Installed raspberrypi-firmware

3. Rebooted

4. Looked for the command, and found it:

$this->bbcode_second_pass_code('', '$ locate -i -r vcgencmd
/opt/vc/bin/vcgencmd
/opt/vc/include/interface/vmcs_host/vcgencmd.h')
5. Ran vcgencmd, with the following result:

$this->bbcode_second_pass_code('', '$ vcgencmd
-bash: vcgencmd: command not found')
6. Tried to run with sudo

$this->bbcode_second_pass_code('', '$ sudo vcgencmd
-bash: vcgencmd: command not found')
7. Then, I ran it using its full path:

$this->bbcode_second_pass_code('', '$ /opt/vc/bin/vcgencmd
Usage: vcgencmd [-t] command
...')
Success!

I don't want to tinker and break something (e.g., the other commands in /opt/vc/bin), but I also don't want to enter the full path each time I run the command. If I add this folder to my path, should that resolve this without unintended side effects?

sb
People are illogical, unreasonable, and self-centered. Love them anyway.
steadybright
 
Posts: 53
Joined: Thu Aug 29, 2013 4:08 am

Re: Fresh Raspberry Pi 4B Install with linux-raspberrypi4 Ke

Postby steadybright » Sat Feb 13, 2021 2:58 pm

You answered before I could post my update. Thanks!
People are illogical, unreasonable, and self-centered. Love them anyway.
steadybright
 
Posts: 53
Joined: Thu Aug 29, 2013 4:08 am

Next

Return to ARMv8

Who is online

Users browsing this forum: No registered users and 5 guests