Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Where / how can I edit boot environment on the SPI NOR flash on Zero Plus?

Featured Replies

I'm a newb, so please make allowances if I am a little dumb.
I have SPI NOR boot working on an Orange Pi Zero Plus (H5).  Latest next kernel.  (I've tried the download, and compiled my own).
There is a problem when I power on.  It fails to detect the USB drive.  If I reset the CPU it finds the drive.  If I reboot it finds the drive.
 

resetting USB...
USB0:   USB EHCI 1.00
USB1:   USB OHCI 1.0
scanning bus 0 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found


I want to try some things in the boot environment settings, but I haven't figured out where to do this.

Can anyone point me in the right direction to modify the environment for this board?
I have a Vagrant build environment set up, so I can compile, but so far I haven't been able to find where these settings are configured

 

Solved by schwar3kat

  • Author
  • Solution

Thanks martinayotte - it is working now.
 

I'm describing this for other newbs who might struggle to find these things.

Your referenced patch has pointed me to "arch/arm/mach-sunxi/usb_phy.c" which I  found in my Vagrant build environment at "/home/vagrant/armbian/cache/sources/u-boot/<version>/"
The line "static int initial_usb_scan_delay = CONFIG_INITIAL_USB_SCAN_DELAY;" exists so it looks like the referenced patch is now a part of the build.
 

I found the u-boot configs under "/home/vagrant/armbian/cache/sources/u-boot/<version>/configs" and the one for my board is named "orangepizero_plus_defconfig"

cd /home/vagrant/armbian
sudo nano config-default.conf
modify line CREATE_PATCHES="no" to CREATE_PATCHES="yes"

^X y enter to save
 

sudo ./compile.sh
Select your board then enter at the prompts until you reach:
[ warn ] Make your changes in this directory: [ /home/vagrant/armbian/cache/sources/u-boot/]
[ warn ] Press <Enter> after you are done [ waiting ]
 

In a new session - (I used putty, I couldn't do it from the windows command prompt vagrant ssh )

cd /home/vagrant/armbian/cache/sources/u-boot/<version>/configs

sudo nano orangepizero_plus_defconfig
add a line CONFIG_INITIAL_USB_SCAN_DELAY=3000
^X y enter to save

Back to the original session press enter and answer all prompts until compile is complete.
 

diff --git a/configs/orangepizero_plus_defconfig b/configs/orangepizero_plus_defconfig
index 4298f1e..ef14bcb 100644
--- a/configs/orangepizero_plus_defconfig
+++ b/configs/orangepizero_plus_defconfig
@@ -20,3 +20,4 @@ CONFIG_SUN8I_EMAC=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_MMC_SUNXI_SLOT_EXTRA=2
 CONFIG_SD_BOOT=y
+CONFIG_INITIAL_USB_SCAN_DELAY=3000

The patch will be in \vagrant\output\patch\u-boot-sunxi64-next.patch

Don't be tempted to edit this file in windows.  It will be corrupted by the line feeds.

On 9/15/2018 at 2:38 AM, Elektrický said:

Don't be tempted to edit this file in windows.  It will be corrupted by the line feeds.

 

* Don't use notepad to edit this file in Windows.   Use Notepad++ or another adequate editor, the only ones adding linefeeds date back to MSDOS.  It's not intrinsic to the operating system, it's editor-dependant. 

 

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.