Elektrický

Members
  • Content Count

    22
  • Joined

  • Last visited

 Content Type 

Forums

Member Map

Store

Crowdfunding

Raffles

Applications

Everything posted by Elektrický

  1. Orange Pi Zero NTP Stratum 1 PPS GPS Server with Armbian OS. Link to the Tutorial - http://schwartzel.eu3.org/ntp-stratum1.html This tutorial uses a 3.3V capable GPS module with PPS output - TOPGNSS GN-701 (u-blox 7) but other similar modules should work. This tutorial is for the Orange Pi Zero, but will probably work for other boards. I couldn't easily do a comprehensive hardware and software tutorial on this forum, so I've published it on my web server and linked from here and attached a PDF. Link to the Tutorial - http://schwartzel.eu3.org/ntp-stratum1.html Tutorial PDF ntp-stratum1.pdf If you spot any typo's or errors please let me know.
  2. Elektrický

    Elektrický

  3. 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
  4. 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.
  5. 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
  6. 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.
  7. 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
  8. 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?
  9. 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....
  10. 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
  11. 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.
  12. 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.
  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
  15. In case anyone else is considering this. I can confirm that I was able to compile Dual DHCP DNS Server on the Orange Pi Zero Plus board by using the instructions for 64 bit Linux as given in the Dual DHCP DNS Server manual (in the download). The project is hosted on Source Forge https://sourceforge.net/projects/dhcp-dns-server/ This is a very lightweight but powerful DHCP/DNS server for Windows and Linux. I currently am running a primary server on Windows and a secondary on the Orange Pi. My current OS is ARMBIAN 5.38 stable Ubuntu 16.04.4 LTS 4.14.48-sunxi64. I suspect that it will work for other versions of the OS and board too. Daemonize proved to be simple. Set up the paths in the rc script and symbolic link to it in init.d. The only other differences were that the dualserver.ini file defaults to /etc rather than the program directory and I configured it in the rc script to use /etc/dualserver/dualserver.ini. I couldn't get the log to work in /var, so I left it at the default in the program folder.
  16. Thanks If it's not a known issue, then I will open it up and connect into the debug uart and do some debugging when I can find some time.
  17. My headless Orange Pi Zero Plus was configured to boot from a powered external USB2 drive with 3 partitions, a 48Gb linux partition populated by armbian-config, a 4Gb swap partition and a 800Gb NTFS data partition (shared by Samba). The setup is stable and works beautifully when powered up from the powered off state. The Pi fails to start when I reboot it. I suspect that the USB port or drive or both need some kind of reset when a reboot occurs. Has anybody encountered this problem? Is there a known solution?
  18. Thanks Igor, I have made a note for future reference. I now suspect that it might not be the higher version causing the problem, but only that the problem is worse and happens all the time on the higher kernel version. I can make the problem occur on the lower kernel version by copying a very large file on the drive. If I do the same thing with a usb stick instead of the powered drive, I don't have the problem. Do you know if there has been a change that could increase power consumption between the two versions? My thoughts are that there might be a power issue with the drive, even though the drive has it's own power supply and the board is powered by a 3A unit directly connected to the pins. Next step is to attach a volt-meter to see if I can see a voltage drop or fluctuation.
  19. Having not received a reply to this question, I tried a few things and borked my setup. I had to go back to my backup on next_4.14.14. My GPS PPS and NTP Server worked again. I then plugged in my powered 1TB disk drive and all looked good, until I mounted a partition and began to use it. The GPS died. The PPS lock blink went off and obviously NTP stopped receiving PPS and NMEA. When I stopped using the drive (it was still mounted) the PPS lock blink on the GPS came back and NTP received again. Very strange. Is it some kind of USB / UART interference? Maybe RF interference with the GPS module? Something related to processor load? Any insight is welcome. UBLOX 7020 neo-7m-c gnss chip UART TTL level GPS module on UART2 with PPS on PA3
  20. I originally installed Armbian_5.38_Orangepizeroplus_Ubuntu_xenial_next_4.14.14 I got NTP with PPS up and running on UART2 with PPS on PA3 I have a working backup image of this. I then used armbian-config to boot from USB disk and I installed a LAMP stack and battled to get a DB up and running. My mistake was upgrading the kernel before making a backup. My version is now ARMBIAN 5.38 stable Ubuntu 16.04.4 LTS 4.14.48-sunxi64 NTP and PPS no longer work. Is there a way to downgrade the kernel without having to go back to the backup and battle with the DB config again? I'm a Linux newb so please make allowances for my ignorance. I have searched for several hours without success before posting.