jevgienij Posted May 10, 2019 Posted May 10, 2019 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 0 Quote
Igor Posted May 11, 2019 Posted May 11, 2019 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 ... 0 Quote
Tido Posted May 11, 2019 Posted May 11, 2019 9 hours ago, jevgienij said: Is taking whole 7 seconds - one for each device scan. did you already look at the chart: http://manpages.ubuntu.com/manpages/bionic/man1/systemd-bootchart.1.html ? 0 Quote
Igor Posted May 11, 2019 Posted May 11, 2019 32 minutes ago, Tido said: did you already look at the chart: http://manpages.ubuntu.com/manpages/bionic/man1/systemd-bootchart.1.html ? I think this part is alright out of the box. One can save some time with network detection - if you can use a fixed IP address. 0 Quote
jevgienij Posted May 12, 2019 Author Posted May 12, 2019 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. 0 Quote
martinayotte Posted May 12, 2019 Posted May 12, 2019 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 0 Quote
jevgienij Posted May 12, 2019 Author Posted May 12, 2019 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... 0 Quote
serro Posted January 17, 2021 Posted January 17, 2021 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. 0 Quote
StuxNet Posted January 27, 2023 Posted January 27, 2023 (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 Edited February 16 by StuxNet added sdcard.img output folder info 2 Quote
Recommended Posts
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.