• Content Count

  • Joined

  • Last visited

About Elektrický

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I posted in "Armbian build framework" when it should be in "Allwinner A64, H5 & H6". (It might be useful for other newbs like me if in the right place) https://forum.armbian.com/topic/8192-where-how-can-i-edit-boot-environment-on-the-spi-nor-flash-on-zero-plus/?do=findComment&comment=61853
  2. This topic continues here with the solution:
  3. 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.
  4. 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
  5. Is there a way to modify the uboot scripts? I want to try doing a usb reset or delay before the usb start. When the device fails to boot after a power up at the uboot prompt, I type: usb reset => usb reset resetting USB... USB0: USB EHCI 1.00 USB1: USB OHCI 1.0 scanning bus 0 for devices... 2 USB Device(s) found scanning usb for storage devices... 1 Storage Device(s) found then I type => usb start => run usb_boot => usb start => run usb_boot Device 0: Vendor: Generic Rev: 1.14 Prod: External Type: Hard Disk Capacity: 70911.1 MB = 69.2 GB (145226111 x 512) ... is now current device Scanning usb 0:1... Found U-Boot script /boot/boot.scr The boot is then successful. I'm very new to linux, and I have not been successful in my search for how to modify the uboot scripts. I have set up a build environment with Vagrant in case it is needed, but I don't know where to find / modify these scripts.
  6. I found some clues in this forum, and realized that it was probably a buggy version. That's why I tried the latest version and it worked. https://forum.armbian.com/topic/5218-spiusb-boot-orange-pi-pc2/?tab=comments#comment-39741
  7. I tried with the uboot from Armbian_5.59_Orangepizeroplus_Ubuntu_bionic_next_4.14.65 (the latest that I could find). It worked better and booted into uboot but I now have one problem: It didn't find my USB drive until I reset the CPU starting 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 Autoboot in 1 seconds, press <Space> to stop Card did not respond to voltage select! MMC: no card present Device 0: device type unknown ... is now current device ** Bad device usb 0 ** ** Bad device usb 0 ** I did a CPU reset and it booted OK. After a reboot it boots OK. After a power up it fails until a CPU reset is done. Any idea how I can solve this?
  8. I tried flashing the concatenated sunxi-spl.bin u-boot.itb to the uboot partition mtd1 (from instructions elsewhere on this forum) https://forum.armbian.com/topic/5218-spiusb-boot-orange-pi-pc2/?tab=comments#comment-42665 The flash worked. apt-get install mtd-utils cat /usr/lib/linux-u-boot-next-orangepizeroplus_5.38_arm64/sunxi-spl.bin /usr/lib/linux-u-boot-next-orangepizeroplus_5.38_arm64/u-boot.itb > /usr/lib/linux-u-boot-next-orangepizeroplus_5.38_arm64/u-boot-sunxi-with-spl.bin flashcp /usr/lib/linux-u-boot-next-orangepizeroplus_5.38_arm64/u-boot-sunxi-with-spl.bin /dev/mtd1 This gave me errors on reboot without SD: Resetting CPU ... resetting ... "Synchronous Abort" handler, esr 0x5e000000 ELR: 12098 LR: 4fdfec70 x 0: 0000000084000009 x 1: 000000004fdfec90 x 2: 0000000000016934 x 3: 000000004fdfecb0 x 4: 000000000001417c x 5: 000000004fdfeeb0 etc....
  9. Success! Many thanks for your help. I logged in as root and followed your instructions slightly modified: Modified source with only two partitions (only the first is used). apt-get install flex apt-get install bison git clone https://github.com/pantoniou/dtc.git cd dtc git checkout dt-overlays5 make PREFIX=/usr make install /root/dtc/dtc -@ -I dts -O dtb -o /boot/overlay-user/my-spinor.dtbo /boot/overlay-user/my-spinor.dts reboot cat /proc/mtd This produced: dev: size erasesize name mtd0: 00100000 00001000 "env" mtd1: 00100000 00001000 "uboot" opi-zero-plus-spi-nor-source.txt
  10. I was able to install the dtc compiler with symbol support after installing flex and bison. The "-@" parameter was not recognized, and gave Error: unknown option. It is not listed in the help output. As this is for symbol support, I am pretty sure that this is caused by it using the wrong dtc compiler as there is one already installed without symbol support. I will try and figure out how to fix this.
  11. Thanks for your help martinayotte, I'm trying to understand the partition table and having some issues (Perhaps I am not understanding it correctly): If I understand what the "Reg=" means the partitions look incorrect to me. Partition 0 - 0x0 to 0x100000 - should this not end at 0x‭FFFFF‬ (0x100000 -1) before partition 1 begins? Partition 1 - 0x100000 to 0x100000 - begins and ends at 0x100000. Should this not end at ‭1FFFFF‬ (0x200000 - 1)? Partition 2 - 0x200000 to 0x600000 - starts at 0x200000, Should this not end at 0x‭5FFFFF‬ (0x600000 -1)? My chip is MXIC MX 25L1606E M2I-12G - 16Mbits = (2M x 8) = ‭2097152‬B = 0x‭200000‬ which seems to be the same size as the example partition table. The total size of spl.bin + uboot.itb is 558268B = 0x‭884BC‬ which will fit in 0x‭100000‬ with a little bit to spare.
  12. Thank you! I will give it a go this weekend.
  13. Thanks martinayotte Is there anything that I can do to fix this, bearing in mind that I'm new to Linux, so this, for me, is a very steep learning curve. I can decompile a dtb but then what? dtc -I dtb -O dts /boot/dtb-4.14.48-sunxi64/allwinner/sun50i-h5-orangepi-zero-plus.dtb -o /tmp/temp.dts Is this the correct dtb or is there one specifically for the spi and is there a way to preserve changes over upgrades? I found something that might or might not be similar. The problem is I don't know what I'm looking for. Is this perhaps something similar for a different board https://lkml.org/lkml/2018/7/24/450 [PATCH] arm64: activate spi flash on pine64 LTS board. If someone could confirm that this is similar then at least I would have a starting point, or am I way off.
  14. From reading through the forums I cobbled together what I thought might work for getting spi nor to boot, but it fails: Activate the spi-jedec-nor overlay in /boot/armbianEnv.txt : overlays=spi-jedec-nor param_spinor_spi_bus=0 Then, after reboot, "cat /proc/mtd" should produce something like this : dev: size erasesize name mtd0: 00200000 00001000 "spi0.0" Here is where it fails - I just get the heading, with no mtd0: 00200000 00001000 "spi0.0". Should I be using a different param_spinor_spi_bus? I assume that once that works, the following will work? apt-get install mtd-utils cat /usr/lib/linux-u-boot-next-orangepizeroplus_5.38_arm64/sunxi-spl.bin /usr/lib/linux-u-boot-next-orangepizeroplus_5.38_arm64/u-boot.itb > /usr/lib/linux-u-boot-next-orangepizeroplus_5.38_arm64/u-boot-sunxi-with-spl.bin flashcp /usr/lib/linux-u-boot-next-orangepizeroplus_5.38_arm64/u-boot-sunxi-with-spl.bin /dev/mtd0