Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Timing issues with USB attached storage



john%ziaspace.com@localhost (John Klos) writes:

>https://www.klos.com/~john/no_root.jpeg

>Where is the proper place to introduce a delay so it'll discover the sd 
>device before it tries to mount it as the root filesystem?

Something like:

Index: sys/kern/init_main.c
===================================================================
RCS file: /cvsroot/src/sys/kern/init_main.c,v
retrieving revision 1.541
diff -p -u -r1.541 init_main.c
--- sys/kern/init_main.c        26 Oct 2022 23:20:47 -0000      1.541
+++ sys/kern/init_main.c        18 Nov 2022 06:36:05 -0000
@@ -671,6 +671,13 @@ main(void)
        sysctl_finalize();
 
        /*
+        * Breathe
+        */
+       printf("SLEEP 5 seconds\n");
+       kpause("breathe", false, 5 * hz, NULL);
+       printf("SLEPT 5 seconds\n");
+
+       /*
         * Now that autoconfiguration has completed, we can determine
         * the root and dump devices.
         */




Home | Main Index | Thread Index | Old Index