Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initramfs: wait for sdcard device to mount /boot #56

Merged
merged 1 commit into from
Sep 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions initramfs/init
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ IMAGEFILE=/boot/imagefile.cpio.gz


# Get our basic working environment up.
mount -t devtmpfs devtmpfs /dev
mount -t proc proc /proc
mount -t sysfs sysfs /sys
mdev -s


# This is called if something goes horribly wrong.
panic()
Expand All @@ -31,6 +30,10 @@ set -x
/sbin/led-daemon &
LED_DAEMON_PID=$!

while [ ! -e /dev/mmcblk0 ]; do
echo "Waiting for /dev/mmcblk0 to appear"
sleep 1
done

# Mounting /boot isn't altogether straightforward as the SD card may or may not
# be partitioned, so we have to try both mmcblk0p1 and mmcblk0
Expand Down Expand Up @@ -276,4 +279,5 @@ sync
umount /boot
umount /sys
umount /proc
umount /dev
exec switch_root -c /dev/console /rootfs /sbin/init
Loading