Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
** SOLVED ** raspberry pi 4 wont boot with gentoo
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
JumboAg
Apprentice
Apprentice


Joined: 03 Mar 2007
Posts: 205
Location: Dallas, TX

PostPosted: Sun Aug 27, 2023 1:59 am    Post subject: ** SOLVED ** raspberry pi 4 wont boot with gentoo Reply with quote

I've done this install a dozen times before without issue, so I'm sure I'm just forgetting something but for the life of me I cannot figure out what.

Trying to setup a raspberry pi 4 using gentoo. I first boot it off a USB stick running stock raspian then do the modified handbook install method

I install the following 3 packages:

raspberrypi-firmware
raspberrypi-image
raspberrypi-sources

compile, install, etc... install dracut, create an initramfs.

After I'm done and reboot - no video at all. I can't tell if its booting or not. I'm not getting any networking so I assume no but cannot confirm 100%.

I've tried bypassing the raspberrypi-sources kernel by removing the kernel and initramfs lines from the config.txt to see if it'll just boot off the stock kernelX.img file in /boot.... same result.


I can provide additional info, setup etc if needed but hopefully from the above and the symptom (no video at all) someone can quickly tell me what I forgot to do.


Last edited by JumboAg on Sun Aug 27, 2023 5:03 pm; edited 1 time in total
Back to top
View user's profile Send private message
ShorTie
Tux's lil' helper
Tux's lil' helper


Joined: 12 Feb 2006
Posts: 101

PostPosted: Sun Aug 27, 2023 10:52 am    Post subject: Reply with quote

Why are you making a initramfs ??
Pi's do not need 1
You don't even need to compile a kernel.
What is in the 1st partition ??
Is the root variable correct in cmdline.txt ??
Back to top
View user's profile Send private message
JumboAg
Apprentice
Apprentice


Joined: 03 Mar 2007
Posts: 205
Location: Dallas, TX

PostPosted: Sun Aug 27, 2023 3:00 pm    Post subject: Reply with quote

1) because I use btrfs as my root filesystem since its on a micro sd card and that's configured as a module using the bcm2711_defconfig. I know I could go into menuconfig and change that but no reason to (which also is a justification for using raspberrypi-sources, the flexibility to do that). An initramfs should work fine. The Raspberry Pi does support them.

2) I have no desire to use the kernelX.img files included in raspberrypi-images. I want to use the kernel source code in raspberrypi-sources and compile it myself because to paraphrase the Mandalorian for gentoo purposes.... This is the way.

3) my /dev/mmcblk0p1 is my boot partition. Its currently fat32 but I have also used ext2 and ext4 over the various builds.

4) I believe so, same as always.

Code:
console=serial0,115200 console=tty1 root=/dev/mmcblk0p3 rootfstype=btrfs elevator=deadline fsck.repair=yes rootwait


I'm going to try the older 5.15 kernel on another pi to see if its just something in the new 6.x sources.
Back to top
View user's profile Send private message
ShorTie
Tux's lil' helper
Tux's lil' helper


Joined: 12 Feb 2006
Posts: 101

PostPosted: Sun Aug 27, 2023 3:07 pm    Post subject: Reply with quote

If you want to build a kernel that bad, I'd surely build btrfs in.
Jusy makes life easier is all.
Back to top
View user's profile Send private message
JumboAg
Apprentice
Apprentice


Joined: 03 Mar 2007
Posts: 205
Location: Dallas, TX

PostPosted: Sun Aug 27, 2023 3:25 pm    Post subject: Reply with quote

I do appreciate the suggestion, its just that I've had cause to use initramfs files for so long they're second nature to me at this point.

As mentioned in my original post, I have removed the calls to a custom kernel and initramfs in the config.txt file so it would try to load everything from raspberrypi-images, same result. I get no video and the system never seems to initialize.

I've got to be overlooking something obvious at this point.
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1555
Location: Montréal

PostPosted: Sun Aug 27, 2023 3:28 pm    Post subject: Reply with quote

Why not to use the root=UUID= instead of the device file name of the root partition. On an Odroid-xu4 Linux do not boot with the device file name as root=. Confirm on ArchLinuxarm and Armbian.
_________________
Paul
Back to top
View user's profile Send private message
pingtoo
Veteran
Veteran


Joined: 10 Sep 2021
Posts: 1271
Location: Richmond Hill, Canada

PostPosted: Sun Aug 27, 2023 3:35 pm    Post subject: Re: raspberry pi 4 wont boot with gentoo Reply with quote

JumboAg wrote:
I've done this install a dozen times before without issue, so I'm sure I'm just forgetting something but for the life of me I cannot figure out what.

Trying to setup a raspberry pi 4 using gentoo. I first boot it off a USB stick running stock raspian then do the modified handbook install method

I install the following 3 packages:

raspberrypi-firmware
raspberrypi-image
raspberrypi-sources

compile, install, etc... install dracut, create an initramfs.

After I'm done and reboot - no video at all. I can't tell if its booting or not. I'm not getting any networking so I assume no but cannot confirm 100%.

I've tried bypassing the raspberrypi-sources kernel by removing the kernel and initramfs lines from the config.txt to see if it'll just boot off the stock kernelX.img file in /boot.... same result.


I can provide additional info, setup etc if needed but hopefully from the above and the symptom (no video at all) someone can quickly tell me what I forgot to do.


It is not clear from your post which device you expect to boot from? USB or SD card?

isn't the raspberrypi-image will install stuff in to /boot? so your kernel build/installation was after raspberrypi-image?
Back to top
View user's profile Send private message
JumboAg
Apprentice
Apprentice


Joined: 03 Mar 2007
Posts: 205
Location: Dallas, TX

PostPosted: Sun Aug 27, 2023 3:41 pm    Post subject: Re: raspberry pi 4 wont boot with gentoo Reply with quote

pingtoo wrote:
JumboAg wrote:
I've done this install a dozen times before without issue, so I'm sure I'm just forgetting something but for the life of me I cannot figure out what.

Trying to setup a raspberry pi 4 using gentoo. I first boot it off a USB stick running stock raspian then do the modified handbook install method

I install the following 3 packages:

raspberrypi-firmware
raspberrypi-image
raspberrypi-sources

compile, install, etc... install dracut, create an initramfs.

After I'm done and reboot - no video at all. I can't tell if its booting or not. I'm not getting any networking so I assume no but cannot confirm 100%.

I've tried bypassing the raspberrypi-sources kernel by removing the kernel and initramfs lines from the config.txt to see if it'll just boot off the stock kernelX.img file in /boot.... same result.


I can provide additional info, setup etc if needed but hopefully from the above and the symptom (no video at all) someone can quickly tell me what I forgot to do.


It is not clear from your post which device you expect to boot from? USB or SD card?

isn't the raspberrypi-image will install stuff in to /boot? so your kernel build/installation was after raspberrypi-image?



Initial install - boot off a USB stick running stock raspian

Then do the modified handbook install for Rasberrypi on a microsd card.

Yes, I have the files for both the rasperrypi-image package and the installed kernel files from raspberrypi-sources in /boot (/dev/mmcblk0p1)

Following the model in "https://forums.gentoo.org/viewtopic-t-1157509-highlight-.html" which I've done several times. I'm sure I'm leaving something out and/or something minor changed in a package update between now and the last time I bricked a new pi that I'm overlooking.
Back to top
View user's profile Send private message
pingtoo
Veteran
Veteran


Joined: 10 Sep 2021
Posts: 1271
Location: Richmond Hill, Canada

PostPosted: Sun Aug 27, 2023 3:51 pm    Post subject: Reply with quote

JumboAg,

Please share /boot content listing (from the SD card)
Code:
ls -l /boot


Please share /boot/config.txt (from the SD card)

Have you try to turn on your pi without SD card (or any other bootable device)? if you try do you get some information about your PI on the HDMI output?
Back to top
View user's profile Send private message
JumboAg
Apprentice
Apprentice


Joined: 03 Mar 2007
Posts: 205
Location: Dallas, TX

PostPosted: Sun Aug 27, 2023 4:20 pm    Post subject: Reply with quote

pingtoo wrote:
JumboAg,

Please share /boot content listing (from the SD card)
Code:
ls -l /boot


Please share /boot/config.txt (from the SD card)

Have you try to turn on your pi without SD card (or any other bootable device)? if you try do you get some information about your PI on the HDMI output?


Code:
raspberrypi /usr/src/linux # ls -la /boot
total 119864
drwxr-xr-x 3 root root     8192 Dec 31  1969 .
drwxr-xr-x 1 root root      224 Aug 26 20:42 ..
-rwxr-xr-x 1 root root    28503 Aug 26 20:48 bcm2708-rpi-b.dtb
-rwxr-xr-x 1 root root    28822 Aug 26 20:48 bcm2708-rpi-b-plus.dtb
-rwxr-xr-x 1 root root    28182 Aug 26 20:48 bcm2708-rpi-b-rev1.dtb
-rwxr-xr-x 1 root root    28246 Aug 26 20:48 bcm2708-rpi-cm.dtb
-rwxr-xr-x 1 root root    28128 Aug 26 20:48 bcm2708-rpi-zero.dtb
-rwxr-xr-x 1 root root    29539 Aug 26 20:48 bcm2708-rpi-zero-w.dtb
-rwxr-xr-x 1 root root    30241 Aug 26 20:48 bcm2709-rpi-2-b.dtb
-rwxr-xr-x 1 root root    30148 Aug 26 20:48 bcm2709-rpi-cm2.dtb
-rwxr-xr-x 1 root root    30390 Aug 26 20:48 bcm2710-rpi-2-b.dtb
-rwxr-xr-x 1 root root    32142 Aug 26 20:48 bcm2710-rpi-3-b.dtb
-rwxr-xr-x 1 root root    32753 Aug 26 20:48 bcm2710-rpi-3-b-plus.dtb
-rwxr-xr-x 1 root root    30285 Aug 26 20:48 bcm2710-rpi-cm3.dtb
-rwxr-xr-x 1 root root    31318 Aug 26 20:48 bcm2710-rpi-zero-2.dtb
-rwxr-xr-x 1 root root    31318 Aug 26 20:48 bcm2710-rpi-zero-2-w.dtb
-rwxr-xr-x 1 root root    52682 Aug 26 20:48 bcm2711-rpi-400.dtb
-rwxr-xr-x 1 root root    52593 Aug 26 20:48 bcm2711-rpi-4-b.dtb
-rwxr-xr-x 1 root root    53202 Aug 26 20:48 bcm2711-rpi-cm4.dtb
-rwxr-xr-x 1 root root    38182 Aug 26 20:48 bcm2711-rpi-cm4-io.dtb
-rwxr-xr-x 1 root root    50504 Aug 26 20:48 bcm2711-rpi-cm4s.dtb
-rwxr-xr-x 1 root root    52476 Aug 26 20:52 bootcode.bin
-rwxr-xr-x 1 root root      116 Aug 26 20:54 cmdline.txt
-rwxr-xr-x 1 root root   228654 Aug 26 20:49 config-6.1.21_p20230405-raspberrypi-v8
-rwxr-xr-x 1 root root   228654 Aug 26 20:45 config-6.1.21_p20230405-raspberrypi-v8.old
-rwxr-xr-x 1 root root     1917 Aug 26 20:56 config.txt
-rwxr-xr-x 1 root root     3170 Aug 26 20:52 fixup4cd.dat
-rwxr-xr-x 1 root root     5398 Aug 26 20:52 fixup4.dat
-rwxr-xr-x 1 root root     8382 Aug 26 20:52 fixup4db.dat
-rwxr-xr-x 1 root root     8386 Aug 26 20:52 fixup4x.dat
-rwxr-xr-x 1 root root     3170 Aug 26 20:52 fixup_cd.dat
-rwxr-xr-x 1 root root     7265 Aug 26 20:52 fixup.dat
-rwxr-xr-x 1 root root    10229 Aug 26 20:52 fixup_db.dat
-rwxr-xr-x 1 root root    10229 Aug 26 20:52 fixup_x.dat
-rwxr-xr-x 1 root root 18359324 Aug 26 20:55 initramfs-6.1.21_p20230405-raspberrypi-v8.img
-rwxr-xr-x 1 root root        0 Aug 26 20:47 .keep
-rwxr-xr-x 1 root root  6810592 Aug 26 20:48 kernel7.img
-rwxr-xr-x 1 root root  7225232 Aug 26 20:48 kernel7l.img
-rwxr-xr-x 1 root root  8219600 Aug 26 20:48 kernel8.img
-rwxr-xr-x 1 root root  6466528 Aug 26 20:48 kernel.img
drwxr-xr-x 2 root root    24576 Aug 26 20:48 overlays
-rwxr-xr-x 1 root root   805436 Aug 26 20:52 start4cd.elf
-rwxr-xr-x 1 root root  3747240 Aug 26 20:52 start4db.elf
-rwxr-xr-x 1 root root  2250848 Aug 26 20:52 start4.elf
-rwxr-xr-x 1 root root  2998344 Aug 26 20:52 start4x.elf
-rwxr-xr-x 1 root root   805436 Aug 26 20:52 start_cd.elf
-rwxr-xr-x 1 root root  4819144 Aug 26 20:52 start_db.elf
-rwxr-xr-x 1 root root  2975104 Aug 26 20:52 start.elf
-rwxr-xr-x 1 root root  3721992 Aug 26 20:52 start_x.elf
-rwxr-xr-x 1 root root  3676160 Aug 26 20:49 System.map-6.1.21_p20230405-raspberrypi-v8
-rwxr-xr-x 1 root root  3676160 Aug 26 20:45 System.map-6.1.21_p20230405-raspberrypi-v8.old
-rwxr-xr-x 1 root root 22407680 Aug 26 20:49 vmlinuz-6.1.21_p20230405-raspberrypi-v8
-rwxr-xr-x 1 root root 22407680 Aug 26 20:45 vmlinuz-6.1.21_p20230405-raspberrypi-v8.old


With NOTHING inserted, I do get the stock splash screen telling me it cant find anything. What's odd is if I put the sd card in, I dont even get that.


Code:
 $ cat config.txt
kernel=vmlinuz-6.1.21_p20230405-raspberrypi-v8
initramfs initramfs-6.1.21_p20230405-raspberrypi-v8.img

# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Uncomment this to enable infrared communication.
#dtoverlay=gpio-ir,gpio_pin=17
#dtoverlay=gpio-ir-tx,gpio_pin=18

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

[pi4]
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
dtoverlay=vc4-fkms-v3d
max_framebuffers=2

[all]
#dtoverlay=vc4-fkms-v3d
arm_64bit=1
dtparam=krnbt=on
Back to top
View user's profile Send private message
pingtoo
Veteran
Veteran


Joined: 10 Sep 2021
Posts: 1271
Location: Richmond Hill, Canada

PostPosted: Sun Aug 27, 2023 4:42 pm    Post subject: Reply with quote

I can't spot anything wrong from your /boot and config.txt. So likely we will need serial console in order to debug this.

JumboAg wrote:
With NOTHING inserted, I do get the stock splash screen telling me it cant find anything. What's odd is if I put the sd card in, I dont even get that.
This is expected. I just want to confirm that hardware is not broken.

With serial console we can see if the specified kernel/initramfs load successful or not. If load successfully we know it is kernel configuration issue, if not it is likely the firmware on the SD card having problem.

Have you try to comment out the "kernel=..." line in config.txt then boot? this will test firmware boot sequence. it should load "kernel.img" which should give kernel boot messages on HDMI output. don't worry about Linux boot failure, it is expected since your initrd dose not match the "kernel.img" and likely your rootfs also not match.
Back to top
View user's profile Send private message
JumboAg
Apprentice
Apprentice


Joined: 03 Mar 2007
Posts: 205
Location: Dallas, TX

PostPosted: Sun Aug 27, 2023 5:02 pm    Post subject: Reply with quote

sigh... just shoot me now. Told you guys it was something stupid I was overlooking. Didn't think I'd do something THIS stupid though.....

What is wrong with the picture below :)

Code:
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device         Boot    Start       End   Sectors   Size Id Type
/dev/mmcblk0p1          2048   2099199   2097152     1G  83 Linux
/dev/mmcblk0p2       2099200  35653631  33554432    16G 82 Linux swap / Solaris
/dev/mmcblk0p3      35653632 499744767 464091136 221.3G 83 Linux


Fixed... and solved....
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