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

Re: Running Debian from a USB-drive on a Cubox-i 4



Hi Vagrants,

On Thursday 19 November 2015 21:13:34 Vagrant Cascadian wrote:
> 
> I'd recommend trying the images for debian-installer instead, as those
> *should* set up booting correctly:
> 
>   http://ftp.us.debian.org/debian/dists/jessie/main/installer-armhf/current/images/netboot/SD-card-images/

Thanks for guiding me to the Jessie images. When I started playing my Cubox-i
last year, they were not available and I did not check when I started recently
changing the configuration of the little box.

> 
> You would need to put uEnv.txt at the /uEnv.txt, not /boot/uEnv.txt,
> unless you mount boot as a separate partition.

Yes, I forgot to mention that I had symlinked /uEnv.txt -> /boot/uEnv.txt...


> But in general, I'd recommend against using uEnv.txt, as it's not
> supported in mainline u-boot for the Cubox-i, and not supported in newer
> versions of u-boot in Debian (e.g. stretch).

So, what is the Debian way of specifying u-boot variable, without having to
enter them from the u-boot command line? If I have 2 MMC cards, one booting
with / on the SD carrd, the other one from an external disk. Is there a way to
keep the kernel parameters and other u-boot commands in a fille on the card?
Or do I need to rebuild the boot.scr differently for each card?


I've installed Jessie from the Jessie d-i image, putting /boot on the SD card
and / on a external USB drive. Installation went smooth but the initial reboot
did not detect the USB drive.
Next reboot, I set bootargs from u-boot command line to specify to the kernel
where is the root file system with:

CuBox-i U-Boot > setenv bootargs root=/dev/sda1 rootfstype=ext4 rootwait rw console=ttymxc0,115200 video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24,bpp=32
CuBox-i U-Boot > boot
Switch to partitions #0, OK
mmc0 is current device
** File not found uEnv.txt **
843 bytes read in 52 ms (15.6 KiB/s)
Running bootscript from mmc ...
## Executing script at 10800000
** File not found /boot/vmlinuz-3.16.0-4-armmp **
3185160 bytes read in 281 ms (10.8 MiB/s)
29346 bytes read in 70 ms (409.2 KiB/s)
12587191 bytes read in 951 ms (12.6 MiB/s)
Booting Debian 3.16.0-4-armmp from mmc 0:1...
Kernel image @ 0x10800000 [ 0x000000 - 0x309a08 ]
## Flattened Device Tree blob at 18000000
   Booting using the fdt blob at 0x18000000
EHCI failed to shut down host controller.
   Using Device Tree in place at 18000000, end 1800a2a1

Starting kernel ...

[    0.113563] edma-dma-engine edma-dma-engine.0: Can't allocate PaRAM dummy slot
[    1.161943] imx-sdma 20ec000.sdma: firmware: failed to load imx/sdma/sdma-imx6q.bin (-2)
Loading, please wait...
Gave up waiting for root device.  Common problems:
 - Boot args (cat /proc/cmdline)
   - Check rootdelay= (did the system wait long enough?)
   - Check root= (did the system wait for the right device?)
 - Missing modules (cat /proc/modules; ls /dev)
ALERT!  /dev/sda1 does not exist.  Dropping to a shell!
modprobe: module i8042 not found in modules.dep
modprobe: module uhci-hcd not found in modules.dep


My USB hard drive is not detected, probably because module uhci-hcd is not
loaded. I've checked and this module is not available in the initramfs. The
only reference I've found is in /lib/modprobe.dep/aliases.conf:

# work around other kernel issues ############################################
# The EHCI driver should be loaded before the ones for low speed controllers
# or some devices may be confused when they are disconnected and reconnected.
softdep uhci-hcd pre: ehci-hcd
softdep ohci-hcd pre: ehci-hcd


And looking at the kernel configuration, it seems that UCI was not enable for
this kernel:

# CONFIG_USB_UHCI_HCD is not set
CONFIG_USB_UHCI_SUPPORT_NON_PCI_HC=y
CONFIG_USB_UHCI_PLATFORM=y


Is there a "simpler" way to solve this problem than recompiling the kernel
and including that module (or buying a faster USB hard drive; this one must be
a USB-1!)?

Thanks
--
Pierre


Reply to: