Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Need help with booting initramfs for rpi4 Gentoo systemd
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
Goverp
Advocate
Advocate


Joined: 07 Mar 2007
Posts: 2179

PostPosted: Thu Nov 26, 2020 1:45 pm    Post subject: Reply with quote

You may be interested in trying my gen_init_cpio input generator. You give it a configuration file that lists the minimum details about your /init script, and it generates the necessary gen_init_cpio input. The sequence of statements in the result is a bit weird, but that's the result of using "tsort" to ensure they occur in a correct order.

The script and a sample configuration file are on my wiki page https://wiki.gentoo.org/wiki/User:Goverp/Genlist

I use the script to build my kernel's embedded initramfs. I wrote the script after getting a non-booting kernel after library changes for fsck.f2fs broke my initramfs.

The sample config:
Code:
ryzen ~ # cat genlist.conf
# Executable programs to be copied (with their dependent libraries) into the initramfs
programs="mdadm fsck.f2fs busybox"

# If a path exist in the invoking environment,
# attrs, Uid, Guid and type will be copied from it,
# otherwise defaulted to 755 0 0
paths="/proc /sys /dev/console /dev/tty0 /dev/tty1 /dev/null /mnt/root"

# Files to be copied into the initramfs, optionally moved if there's a new path/name preceding ":="
# Don't forget to include your init file moved to "/init"
files="/init:=/usr/src/initramfs/init /etc/mdadm.conf"

# Symbolic links to create in the initramfs, format "link:=target"
slinks="/bin/sh:=busybox"


generates the following output:
Code:
ryzen ~ # ./genlist
dir   /usr                                                           755    0    0
dir   /usr/sbin                                                      755    0    0
dir   /sbin                                                          755    0    0
dir   /mnt                                                           751    0    0
dir   /lib64                                                         755    0    0
dir   /init                                                          755    0    0
dir   /etc                                                           755    0    0
dir   /dev                                                           755    0    0
dir   /bin                                                           755    0    0
file  /usr/sbin/fsck.f2fs            /usr/sbin/fsck.f2fs             755    0    0
file  /usr/lib64/libf2fs.so.8        /usr/lib64/libf2fs.so.8         755    0    0
dir   /sys                                                           555    0    0
file  /sbin/mdadm                    /sbin/mdadm                     755    0    0
dir   /proc                                                          555    0    0
dir   /mnt/root                                                      755    0    0
file  /lib64/libdl.so.2              /lib64/libdl.so.2               755    0    0
file  /lib64/libc.so.6               /lib64/libc.so.6                755    0    0
file  /lib64/ld-linux-x86-64.so.2    /lib64/ld-linux-x86-64.so.2     755    0    0
file  /init                          /usr/src/initramfs/init         755    0    0
file  /etc/mdadm.conf                /etc/mdadm.conf                 644    0    0
nod   /dev/tty1                                                      620    0    5 c 4 1
nod   /dev/tty0                                                      620    0    5 c 4 0
nod   /dev/null                                                      666    0    0 c 1 3
nod   /dev/console                                                   600    0    0 c 5 1
file  /bin/busybox                   /bin/busybox                    755    0    0
slink /bin/sh                        busybox                         777    0    0

_________________
Greybeard
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Thu Nov 26, 2020 2:21 pm    Post subject: Reply with quote

kucklehead,

That looks good. You won't know until you try. DEVTMPS is on by default.

There are some things that can be done in either the init script or in the file list.
Like making symbolic links.

/sbin/lvm.static works as whatever it is called as.
There ale several ways to pass commands to it. Using symbolic links, as a path of the command etc.

Some comments would be good explaining hat you are doing and why.
In 6 months time if you want to tweak things, you will be glad of the comments.
_________________
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
kucklehead
Tux's lil' helper
Tux's lil' helper


Joined: 13 Oct 2020
Posts: 108

PostPosted: Fri Nov 27, 2020 7:29 am    Post subject: Reply with quote

I executed these commands here:
Code:

mkdir /usr/src/initramfs
cd /usr/src/linux
make -C /usr/src/linux/usr/ gen_init_cpio
chmod +x usr/gen_init_cpio usr/gen_initramfs_list.sh ## gen_initramfs_list.sh does not exist for some reason...
nano -w /usr/src/initramfs/initramfs_list
mkdir --parents /usr/src/initramfs/{usr,var,bin,dev,etc,lib,lib64,mnt,mnt/root,proc,root,sbin,sys}
cp --archive /dev/{null,console,tty,mapper} /usr/src/initramfs/dev/             # Need to remove sda1 archive as that is not where the system is going to be at. As for right now, everything is in chroot..
USE="static" emerge --ask --verbose sys-apps/busybox
cp --archive /bin/busybox /usr/src/initramfs/bin/busybox
USE="-udev, static" emerge --quiet sys-fs/lvm2 # This allows you to copy the lvm into the intiramfs, so it can use it
cp --archive /sbin/lvm /usr/src/initramfs/sbin/lvm
cd /usr/src/initramfs
find . -print0 | cpio --null --create --verbose --format=newc | gzip --best > /boot/custom-initramfs.cpio.gz

cd /usr/src/linux
usr/gen_init_cpio /root/initrd/initramfs_list > /boot/initramfs_static # Haven't executed this command yet as I am confused if I should or shouldn't







This is what I have for init:
Code:
#!/bin/busybox sh

rescue_shell() {
    echo "$@"
    echo "Something went wrong. Dropping you to a shell."
    busybox --install -s
    exec /bin/sh
}

uuidlabel_root() {
    for cmd in $(cat /proc/cmdline) ; do
        case $cmd in
        root=*)
            type=$(echo $cmd | cut -d= -f2)
            echo "Mounting rootfs"
            if [ $type == "LABEL" ] || [ $type == "UUID" ] ; then
                uuid=$(echo $cmd | cut -d= -f3)
                mount -o ro $(findfs "$type"="$uuid") /mnt/root
            else
                mount -o ro $(echo $cmd | cut -d= -f2) /mnt/root
            fi
            ;;
        esac
    done
}

check_filesystem() {
    # most of code coming from /etc/init.d/fsck

    local fsck_opts= check_extra= RC_UNAME=$(uname -s)

    # FIXME : get_bootparam forcefsck
    if [ -e /forcefsck ]; then
        fsck_opts="$fsck_opts -f"
        check_extra="(check forced)"
    fi

    echo "Checking local filesystem $check_extra : $1"

    if [ "$RC_UNAME" = Linux ]; then
        fsck_opts="$fsck_opts -C0 -T"
    fi

    trap : INT QUIT

    # using our own fsck, not the builtin one from busybox
    /sbin/fsck -p $fsck_opts $1
 case $? in
        0)      return 0;;
        1)      echo "Filesystem repaired"; return 0;;
        2|3)    if [ "$RC_UNAME" = Linux ]; then
                        echo "Filesystem repaired, but reboot needed"
                        reboot -f
                else
                        rescue_shell "Filesystem still have errors; manual fsck required"
                fi;;
        4)      if [ "$RC_UNAME" = Linux ]; then
                        rescue_shell "Fileystem errors left uncorrected, aborting"
                else
                        echo "Filesystem repaired, but reboot needed"
                        reboot
                fi;;
        8)      echo "Operational error"; return 0;;
        12)     echo "fsck interrupted";;
        *)      echo "Filesystem couldn't be fixed";;
    esac
    rescue_shell
}

# temporarily mount proc and sys
mount -t proc none /proc
mount -t sysfs none /sys
mount -t devtmpfs none /dev

# Setting up the root volume that is installed in lvm
lvm vgscan --mknodes # creates /dev/mapper/control
lvm lvchange -a ly VG/root
lvm vgscan --mknodes # creates /dev/mapper/VG-root and /dev/VG/root

# mount using findfs uncomment this out because idk if i'll really need it?
#mount -o ro $(findfs UUID=2<uuid string here>) /mnt/root
#mount -o ro $(findfs UUID=<uuid string here>) /dev/mapper/gentoo-tmp
#mount -o ro $(findfs UUID=<uuid string here>) /dev/mapper/gentoo-swap
#mount -o ro $(findfs UUID=<uuid string here>) /dev/mapper/gentoo-var_log
#mount -o ro $(findfs UUID=<uuid string here>) /dev/mapper/gentoo-root


# disable kernel messages from popping onto the screen
echo 0 > /proc/sys/kernel/printk

# clear the screen
clear

# mounting rootfs on /mnt/root
uuidlabel_root || rescue_shell "Error with uuidlabel_root"
echo "All done. Switching to real root."

# clean up. The init process will remount proc sys and dev later
umount /proc
umount /sys
umount /dev

# switch to the real root and execute init
exec switch_root /mnt/root /sbin/init


And yes, I re-edited the init_list because I didn't understand why NeddySeagoon had /dev/mp-0 # I am guessing that dm stands for device mapper and the 0 is the first partition??
I also removed the mknod and made it nod for each line
Here's the re-edited version of /usr/src/initramfs/initramfs_list
Code:
# directory structure
dir /proc       755 0 0
dir /usr        755 0 0
dir /bin        755 0 0
dir /sys        755 0 0
dir /var        755 0 0
dir /lib        755 0 0
dir /sbin       755 0 0
dir /lib64      755 0 0
#dir /lib32     755 0 0
dir /mnt        755 0 0
dir /mnt/root   755 0 0
dir /etc        755 0 0
dir /root       700 0 0
dir /dev        755 0 0
dir /dev/mapper 755 0 0
dir /etc/lvm    755 0 0

# dev/mmcblk and partitions
nod /dev/mmcblk0         0660 0 0 b 8 0
nod /dev/mmcblk0p1       0660 0 0 b 8 1
nod /dev/mmcblk0p2       0660 0 0 b 8 2
#nod /dev/sda4           0660 0 0 b 8 4
#nod /dev/sda5           0660 0 0 b 8 5
#nod /dev/sda6           0660 0 0 b 8 6

# dev/sdb and partitions
#nod /dev/sdb            0660 0 0 b 8 16
# ...
# dev/sdc and partitions
#nod /dev/sdc            0660 0 0 b 8 32

# all the lvm nodes I need
nod /dev/dm-0             0660 0 0 b 253 0      ## Right here is where I had /dev/gentoo/root. Basically all my lvm partitions right here.
nod /dev/dm-1             0660 0 0 b 253 1
nod /dev/dm-2             0660 0 0 b 254 2
nod /dev/dm-3             0660 0 0 b 254 3


#slink /dev/stderr                       /proc/self/fd/2                 777 0 0
#slink /dev/stdin                        /proc/self/fd/0                 777 0 0
#slink /dev/std/out                      /proc/self/fd/1                 777 0 0


# busybox
file /bin/busybox /bin/busybox 755 0 0

# LVM
file /sbin/lvm.static           /sbin/lvm.static         755 0 0
# libraries required by /sbin/fsck.ext4 and /sbin/fsck
slink   /lib                            /lib64                          777 0 0
file    /lib64/ld-linux-aarch64.so.1  /lib64/ld-linux-aarch64.so.1      755 0 0
file    /lib64/libext2fs.so.2     /lib64/libext2fs.so.2                 755 0 0
file    /lib64/libcom_err.so.2    /lib64/libcom_err.so.2                755 0 0
file    /lib64/libpthread.so.0    /lib64/libpthread.so.0                755 0 0
file    /lib64/libblkid.so.1      /lib64/libblkid.so.1                  755 0 0
file    /lib64/libmount.so.1      /lib64/libmount.so.1                  755 0 0
file    /lib64/libuuid.so.1       /lib64/libuuid.so.1                   755 0 0
file    /lib64/libe2p.so.2        /lib64/libe2p.so.2                    755 0 0
file    /lib64/libc.so.6          /lib64/libc.so.6                      755 0 0
file    /lib64/librt.so.1         /lib64/librt.so.1                     755 0 0
file    /lib64/libdl.so.2         /lib64/libdl.so.2                     755 0 0

file    /sbin/fsck              /sbin/fsck                          755 0 0
file    /sbin/fsck.ext4         /sbin/fsck.ext4                     755 0 0

# our init script
file    /init                   /usr/src/initramfs/init             755 0 0


Here's my source that I am following: https://wiki.gentoo.org/wiki/Old_Fashioned_Gentoo_Install#Making_the_initrd
https://wiki.gentoo.org/wiki/Early_Userspace_Mounting https://wiki.gentoo.org/wiki/Custom_Initramfs
I need to remove the sda1 archive and perhaps "feed" the init_list to the /boot/initramfs_static
I also did this to my lvm package:
Code:
    Use vgscan as shown above (simplest solution)
    Mount by UUID or label instead of using /dev/VG/root. It works because findfs is happy with just /dev/dm-42
    Build a LVM binary with the -udev USE flag (specifically for the initramfs only!)
    Disable udev dependency by including a minimal /etc/lvm/lvm.conf in the initramfs:

All I need to is recompile my kernel, build the initramfs inside it, move the dtbs files to /boot, move the 32bit out of the way, add the lines for grub in this article: https://wiki.gentoo.org/wiki/Custom_Initramfs
move the overlays to /boot/overlays. I was thinking about making that a symlink. Because I have more than just one kernel. I know that overlays files exists in /usr/src/<name of kernel>. And Goverp, I think that example is the similar to what I am doing I think. I'll look at it right now actually. And do I need to add more to the /dev? ----> cp --archive /dev/{null,console,tty,mapper} /usr/src/initramfs/dev/ and the article mentioned that you can keep the binaries updated and shot me here:
Code:
Variations for switch_root

Some init setups require proc, sys and dev to be mounted before starting up. If you find you are having trouble with switch_root in your initramfs setup try replacing the umount command with a mount --move in your init script.

For example, replace this.
FILE /usr/src/initramfs/initumount commands

# Clean up
umount /proc
umount /sys
umount /dev

# Boot the real thing
exec switch_root /newroot /sbin/init

With this.
FILE /usr/src/initramfs/initmount --move commands

# Clean up
mount --move /proc /newroot/proc
mount --move /sys /newroot/sys
mount --move /dev /newroot/dev

# Boot the real thing
exec switch_root /newroot /sbin/init

Important
umount is used to ensure that "real" init systems, like OpenRC, start in a clean state. You should ideally use umount if it is possible in this circumstance.
Examples

See Custom_Initramfs/Examples for fully functional examples of finished /init scripts.
See also

    Initramfs/Guide — covers the concepts of the initramfs as well as how to properly create and manage initramfs instances.
    Early Userspace Mounting — how to build a custom minimal initramfs that checks the /usr filesystem and pre-mounts /usr. Another worth to read article about custom initramfs

External resources

    Official initramfs documentation locally (less /usr/src/linux/Documentation/filesystems/ramfs-rootfs-initramfs.txt) or online at kernel.org
    Linux® From Scratch - About initramfs

    update your initramfs using bash

Categories:

    DirtyInitramfs
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Fri Nov 27, 2020 9:59 am    Post subject: Reply with quote

kucklehead,

Quote:
move the overlays to /boot/overlays. I was thinking about making that a symlink

There is a problem with that. /boot has to be vfat and vfat does not support overlays.

You will hate the initrd built into the kernel. When it doesn't work, the first few times, its a kernel rebuild to fix.

The Pi can load a separate initrd, so make it work first and think about building it into the kernel later.
I've not checked your two files. I'm bound to miss something and realistically, it won't work the first few times.

Be sure that your kernel includes Simple Framebuffer because the Video Core framebuffer driver will not load until the real root is mounted and the module is loaded. That's after the initrd has completed. You will need a console before that.
The alternative is a real serial console. That needs a USB to serial adapter for your PC that supports 3.3v signalling. A 5v one will kill the serial port on the Pi and maybe the whole 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
Goverp
Advocate
Advocate


Joined: 07 Mar 2007
Posts: 2179

PostPosted: Fri Nov 27, 2020 10:34 am    Post subject: Reply with quote

NeddySeagoon wrote:
...
You will hate the initrd built into the kernel. When it doesn't work, the first few times, its a kernel rebuild to fix.
...
IMHO, not necessarily so; kernel "make" for just a change to the initrd should be pretty fast; there are no config changes to trigger recompilation (unless you do an unnecessary "make clean"). However, my experience is on my AMD desktop, not a Pi, and the lower performance might make this an issue, but for me, the built-in initramfs has never been a problem. What is an unavoidable problem is having to reboot to test the changes, and fall back to a previous configuration if it doesn't work :-(. Hence I use a "vmlinuz.new" symlink for testing, and a "New for old" script to manage it when I'm happy.
_________________
Greybeard
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Fri Nov 27, 2020 11:44 am    Post subject: Reply with quote

Goverp,

That's a good point about the kernel build not actually doing anything for an initrd change.
It just visits all the nodes and finds nothing to do.

There is no boot menu on a Pi. You edit its /boot/config.txt by hand.
If you really want a boot menu, you can use u-boot or even the experimental EFI code but neither is required.
_________________
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
kucklehead
Tux's lil' helper
Tux's lil' helper


Joined: 13 Oct 2020
Posts: 108

PostPosted: Fri Nov 27, 2020 12:42 pm    Post subject: Reply with quote

That's really good advice Goverp. and I won't do a symlink to the overlays. What's a good way to test my installation without shutting down everything, popping the sd card in and watching it crash. I was looking into qemu-manager but the article I found that allows you to boot a system ontop of the host. I have a hunch that qemu can do what I want, but it must be in a .img or iso; maybe what I want is buried deep inside the qemu document? Any suggestions? Also, I am however, going to install grub, so it can interact with the initramfs that I made. Yeah, I understand that it'll be easier to boot it, and see what it does, but this is my first time building an initramfs as I relied on the "black magic" too much; I just want to make sure I get everything I might need, understand what /dev/dm-0 is without guessing. I'll edit the config file again so it includes a console. Your script actually does provide one.
Here's the output when I ran find . -print0 | cpio --null --create --verbose --format=newc | gzip --best > /boot/custom-initramfs.cpio.gz:
Code:

.
./mnt
./mnt/root
./bin
./bin/busybox
./lib64
./etc
./etc/lvm
./etc/lvm/lvm.conf
./dev
./dev/null
./dev/mapper
./dev/mapper/gentoo-root
./dev/mapper/gentoo-var_log
./dev/mapper/control
./dev/mapper/gentoo-swap
./dev/mapper/gentoo-tmp
./dev/console
./dev/tty
./dev/sda1
./genlist.conf
./usr
./sbin
./sbin/lvm
./var
./root
./initramfs_list
./sys
./init
./lib
./proc
8181 blocks

Here's what my /boot dir looks like, warning it's messy:
Code:

config-5.10.0-rc4-v8      overlays
config-5.10.0-rc4-v8.old  System.map-5.10.0-rc4-v8
custom-initramfs.cpio.gz  System.map-5.10.0-rc4-v8.old
dtbs                      vmlinuz-5.10.0-rc4-v8
linux-rpi-5.10.y.img      vmlinuz-5.10.0-rc4-v8.old

Here is where the dtb files are at, and no I didn't put them there:
Code:

ls /boot/dtbs/5.10.0-rc4-v8/broadcom
bcm2710-rpi-2-b.dtb       bcm2711-rpi-400.dtb       bcm2837-rpi-3-b.dtb
bcm2710-rpi-3-b.dtb       bcm2711-rpi-4-b.dtb       bcm2837-rpi-3-b-plus.dtb
bcm2710-rpi-3-b-plus.dtb  bcm2711-rpi-cm4.dtb       bcm2837-rpi-cm3-io3.dtb
bcm2710-rpi-cm3.dtb       bcm2837-rpi-3-a-plus.dtb

Here is where the files inside the overlay located here: /boot/dtbs/5.10.0-rc4-v8/overlays
Code:

act-led.dtbo                            mcp251xfd.dtbo
adafruit18.dtbo                         mcp3008.dtbo
It has more files, but I am not pasting them again, because I already have so

There's a empty dir located here: /boot/overlays I created this by following this guide: https://wiki.gentoo.org/wiki/Raspberry_Pi/Kernel_Compilation
Code:

root #cd /usr/src/linux
root #mount /boot
root #mkdir /boot/overlays


Last edited by kucklehead on Fri Nov 27, 2020 1:10 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

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

kucklehead,

One way or another, you have to boot it and watch it crash. :)
It doesn't matter if that's on the Pi or in QEMU.

Grub won't help you interact with the initrd. It loads the kernel and optionally, the intitrd, then its just the kernel and initrd.
The initrd interactivity is provided by the rescue shell, which gets invoked by the || rescue_shell when a command fails.

In the rescue shell, its just you and busybox.
_________________
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
kucklehead
Tux's lil' helper
Tux's lil' helper


Joined: 13 Oct 2020
Posts: 108

PostPosted: Fri Nov 27, 2020 1:20 pm    Post subject: Reply with quote

What I mean by interacting, grub will hopefully allow me to boot of whatever initramfs I want to boot off of. I also re-edited my previous post. How do I even use QEMU to boot off my physical drive? All, I can find is turning it into a .img and booting it like that. I'm asking cause the sd card that has ubuntu mate is 32gb, while gentoo is on a 256gb.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Fri Nov 27, 2020 1:36 pm    Post subject: Reply with quote

kucklehead,

To run grub on a Raspberry Pi, you need the EFI code which is under development.

Here's how to use a phyical drive in QEMU.

However, QEMU is not a Pi. QEMU knows nothing of the files that run on the PI GPU to load the kernel and initrd, so somehow you need to get those files loaded. It won't use the Pi's config.txt nor the cmdline.txt either.
_________________
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
kucklehead
Tux's lil' helper
Tux's lil' helper


Joined: 13 Oct 2020
Posts: 108

PostPosted: Sat Dec 12, 2020 12:02 am    Post subject: Reply with quote

I ran these following codes:
Code:
 echo sys-fs/lvm2 static -udev -systemd >> /etc/portage/package.use/lvm2
emerge --quiet sys-fs/lvm2
/usr/src/linux
usr/gen_init_cpio /usr/src/initramfs/initramfs.list > ../initramfs.cpio
Note: I had to replace the initramfs.list with /usr/src/initramfs/initramfs_list because usr/gen_initramfs_list.sh didn't exist.
gzip --best ../initramfs.cpio
mv ../initramfs.cpio.gz /boot


I ran this to get the custom_initramfs.cpio.gz:
Code:

find . -print0 | cpio --null --create --verbose --format=newc | gzip --best > /boot/custom-initramfs.cpio.gz
## Which is in the boot dir###

*I got rid of custom_initramfs.cpio.gz because the article is flagged as dirty

Edit my config.txt file:
Code:
# set 64 bit mode
arm_64bit=1
enable_gic=1
device_tree=bcm2711-rpi-4-b.dtb_64
initramfs initramfs.cpio.gz followkernel
# have a properly sized image
disable_overscan=1

# for sound over HDMI
hdmi_drive=2

# lets have the VC4 hardware accelerated video
dtoverlay=vc4-fkms-v3d

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

# Enable autoprobing of Bluetooth driver without the need of hciattach/btattach files
dtparam=krnbt=on

# Enable the SPI interface on your RPI
dtparam=spi=on

# gpu_mem is for closed-source driver only; since we are only using the
# open-source driver here, set low
gpu_mem=16


copied these files:
Code:
fixup4cd.dat         
fixup4.dat     
fixup4db.dat
fixup4x.dat
fixup_cd.dat
fixup.dat
fixup_db.dat
fixup_x.dat
start4cd.elf
start4db.elf
start4.elf
start4x.elf
start_cd.elf
start_db.elf
start_x.elf


*Need to remove the files that do not have a 4 in it later on*
*Going to add the uboot.bin later on when I got everything in order.
Code:

kernel=uboot.bin
initramfs whatever the initramfs is

You said I should include a videoframe buffer driver, and a serial console. I didn't include a frame buffer because I don't know which one to include, I'll add the serial console in and see if that does something. It's this
Code:
nod /dev/console        0600 0 0 c 5 1
nod /dev/null           0666 0 0 c 1 5

* That's not the serial console, but it is a console, my bad about that.

[Edit]
I had some time to go through my initramfs_list and init, it needed alot of editing; possibly why it wouldn't boot. I need to remove these archives I created:
Code:
cp --archive /dev/{null,console,tty,mapper} /usr/src/initramfs/dev/

I need them gone because I installed static-dev, which creates the nodes I need, so it is useless to have them. I don't know how to remove them efficiently, perhaps I am overthinking it? I ran rm -r /usr/src/initramfs/dev/tty,console,and null; worked like a charm.

I combined the three articles together, and doing most of my initramfs building from this guide: https://wiki.gentoo.org/wiki/Old_Fashioned_Gentoo_Install#Making_the_initrd I am confused about the static_overlay. Am I suppose to remove the if statements which include the udev, and do I have to emerge lvm and xorg the one's I didn't edit along with static_overlay? Im gonna buy serial console adapter eventually.
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
Goto page Previous  1, 2
Page 2 of 2

 
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