Jump to content

Recommended Posts

Posted

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


 

Posted

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 ...

Posted

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.

Posted
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

 

Posted
On 5/12/2019 at 5:15 PM, jevgienij said:

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...

Hello there, I am new to Linux, I have a problem with the boot time. Can you explain clearly how you did it.

Posted (edited)

From start to finish, here's how I did it.

 

Go to the following link, download build root, unzip it and 'cd' into the directory:
https://git.busybox.net/buildroot/

 

Then issue the following commands that are in italics and follow the bullet point directions.

 

make friendlyarm_nanopi_neo_defconfig

          - Where friendlyarm_nanopi_neo_defconfig is the name of your board's def config located in the /buildroot/config/ folder

make menuconfig

         - A UI will pop up and you can add/remove packages or libraries from here. ie: Python, nano, libgpiod, etc... (Use "/" key to search)

make uboot-menuconfig

         - This is the direct answer to OP's question

         - From this prompt, scroll all the way to the bottom

         - Device drivers --> USB Support --> Uncheck all boxes

         - There's also another option to reduce boot time. Go all the way back to the first page of uboot-menuconfig

         - Change delay in seconds before automatically booting to 0

make

 

This will output /output/images/sdcard.img. use Etcher or w/e to write to sd card like usual. Make command took ~1hr to compile the first time so...

The link below is a NanoPi Neo image, with no password. It boots in 4 seconds and has Python, libgpiod and nano installed and nothing else. No USB or Ethernet.

https://fastupload.io/2vykAzhretXuft1/file

 

Screenshot from 2023-01-26 20-22-37.png

Edited by StuxNet
added sdcard.img output folder info

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...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines