Custom Initramfs does not boot

Discussion in 'UDOO NEO' started by AM97, Jul 18, 2018.

  1. AM97

    AM97 New Member

    Joined:
    Jun 19, 2018
    Messages:
    19
    Likes Received:
    0
    I built a custom initramfs on an udoo-neo using the following instructions:

    mkdir -p /usr/src/initramfs/{bin,dev,etc,lib,lib64,mnt/root,proc,root,sbin,sys}

    cp -a /dev/{null,console,tty,mmcblk0p2} /usr/src/initramfs/dev/

    sudo apt-get install busybox-static

    cp -a /bin/busybox /usr/src/initramfs/bin/busybox

    My init file is:

    #!/bin/busybox sh

    # Mount the /proc and /sys filesystems.
    mount -t proc none /proc
    mount -t sysfs none /sys

    # Do your stuff here.
    echo "This script just mounts and boots the rootfs, nothing else!"

    # Mount the root filesystem.
    mount -o ro /dev/mmcblk0p2/mnt/root

    # Clean up.
    umount /proc
    umount /sys

    # Boot the real thing.
    exec switch_root /mnt/root /sbin/init

    And then I do

    chmod +x /usr/src/initramfs/init

    After setting the initramfs source file to "/usr/src/initramfs" in menuconfig, rebuilding kernel, copying it back to the SD card and rebooting, i just boot into my normal screen, and the echo message does not appear. I've checked if zImage is being written properly (it is). How can I fix this?
     

Share This Page