0
jevgienij

Disable U-Boot USB support

Recommended Posts

I'm building a device where fast boot time is essential. I've found that this:

starting USB...
USB0:   USB EHCI 1.00
USB1:   USB OHCI 1.0
USB2:   USB EHCI 1.00
USB3:   USB OHCI 1.0
USB4:   USB EHCI 1.00
USB5:   USB OHCI 1.0
USB6:   USB EHCI 1.00
USB7:   USB OHCI 1.0
scanning bus 0 for devices... 1 USB Device(s) found
scanning bus 1 for devices... 1 USB Device(s) found
scanning bus 2 for devices... 1 USB Device(s) found
scanning bus 3 for devices... 1 USB Device(s) found
scanning bus 4 for devices... 1 USB Device(s) found
scanning bus 5 for devices... 1 USB Device(s) found
scanning bus 6 for devices... 1 USB Device(s) found
scanning bus 7 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

Is taking whole 7 seconds - one for each device scan. If I have my OS installed on eMMC and I don't even need the possibility of booting the OS from any flash drives I don't need this functionality, right? If so, how could I remove/disable it so my board starts faster? It's Orange Pi PC Plus v1.1


 

Share this post


Link to post
Share on other sites

I never tried so I can't produce you direct instructions from my head but it should be possible by rebuilding u-boot with disabled support for USB. U-boot also have a menu driven config, which makes shaping this configuration in more human friendly way. Similar to the kernel menuconfig ...

Share this post


Link to post
Share on other sites

How do I make compile.sh open u-boot menu config? It only asks if I want to open kernel menu config. If I manually go to cache/sources/u-boot/v2019.04 and exec make menuconfig there, then set what I need to set and save the settings, they are being overridden anyway.

Share this post


Link to post
Share on other sites
13 hours ago, jevgienij said:

they are being overridden anyway.

Right ! It is normal ...

What you need to do is to go into cache/sources/u-boot/v2019.04/, edit the configs/orangepi_pc_plus_defconfig file to remove CONFIG_USB_EHCI_HCD and CONFIG_USB_OHCI_HCD , then create a patch and place it in armbian patch folder.

git diff configs/orangepi_pc_plus_defconfig > ~/git-work/igorpecovnik-armbian/build/userpatches/u-boot/u-boot-sunxi/my-patch-turnoff-usb.patch

 

Share this post


Link to post
Share on other sites

Thanks. I managed it with a chattr +i .config workaround but I still wonder what is the proper way of opening u-boot menu config...

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
0