• Content Count

  • Joined

  • Last visited

About Dennboy

  • Rank

Profile Information

  • Gender
  • Location
    The Netherlands
  • Interests
    high speed sensing, ADC, SPI, DMA, GPIO, hardware interrupts

Recent Profile Visitors

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

  1. Yes Igor, for sure we are thankful for all your help here! I'm glad only toys got broken Hope you can teach your kid to repair toys some day I tried with the nanopineo2 (Armbian 20.11.6 Buster), the modules build fine but the installation reports SSL errors during installation of the module, that didn't appear on the orangepizero. The module(s) can be loaded and run after depmod -a. INSTALL pps_timer.ko At main.c:160: - SSL error:02001002:system library:fopen:No such file or directory: ../crypto/bio/bss_file.c:69 - SSL error:2006D080:BIO routines:BIO_new_file:no such file: ../cryp
  2. Hi @hjoe, Your fix seems to work beautifully on the orangepizero, thanks! My kernel module loads and runs beautifully. Tomorrow I'll try on nanopi neo2+ and neo3. @Igor Good luck with the family in these strange times. I hope things change for the best in the next months as more people get vacinated. Kind regards, Dennis
  3. Just retried with Armbian 20.11.7 kernel on nanopineo+2, but have the same issue on that board.
  4. Just retried with a very simple kernel module (added license in second attempt to get rid of kernel taint), with the same result. $ sudo modprobe ktest_module modprobe: ERROR: could not insert 'ktest_module': Exec format error $ dmesg|tail [ 24.151391] pps_timer: module PLT section(s) missing [ 33.784067] vcc3v0: disabling [ 33.784092] vcc5v0: disabling [ 33.784099] vcc-wifi: disabling [ 1413.944125] pps_timer: module PLT section(s) missing [ 7157.483985] ktest_module: module license 'unspecified' taints kernel. [ 7157.484004] Disabling lock debu
  5. Dear all, I can successfully build an out-of-tree module on 5.9 and 5.10.x kernels, but have trouble running them since Armbian 20.11.6. I fixed the missing problem using the receipt from a bugreport with an extra Makefile target: PWD=$(shell pwd) VER=$(shell uname -r) KERNEL_BUILD=/lib/modules/$(VER)/build # Later if you want to package the module binary you can provide an INSTALL_ROOT # INSTALL_ROOT=/tmp/install-root MY_CFLAGS += -g -DDEBUG # for newer 5.10.x kernels with x<=4 $(KERNEL_BUILD)/scripts/ $(KERNEL_BUILD)/scripts/ sudo
  6. Dear maintainers, I have my sensors configured to reboot every night via a user cronjob (0 0 * * * /sbin/reboot), 14 sensors do this without a problem. I've fixed the nanopi neo+2 reboot from NAND some months ago (by re-using friendlyarm first stage u-boot). I just stumbled upon a failed reboot with one of my nanopi neo+2 nodes, after two successful reboots. Looking at the /var/log.hdd/syslog, it got stuck in the shutdown procedure when the watchdog reported a failure. The /var/log.hdd/syslog.1 extracts below show the start of the watchdog, and the stop of the watchdog and it
  7. Hi Quanta, Depending on the type of serial connector, it may (partly) power the nanopi, I usually only connect the GND, RX and TX with my FT232RL USB to TTL Serial Adapter. I've seen cases where parts of the board didn't fully reset when the serial was still connected. You can of course start a separate thread about serial adaptor power issues, which may be a more general issue. My reboot problems however also seem to occur without the serial connected, i.e. can can notice it doesn't become reachable again after reboot is invoked remotely. Kind regards,
  8. Yes, I use the image from FriendlyArm mentioned on their website (in my case, I booted the image that was on the MMC when it got shipped, which is most likely the same one). To capture their first stage bootloader with dd, I analysed the nand-sata-install script to see what needed to be copied. It may be possible to directly fetch the bootloader part from the sdcard image, with a similar dd with if=sdcard.img when you have a linux PC. Since u-boot is opensource, we can probably ask FriendlyArm for their software/configuration changes to the first-stage u-boot in order to get this i
  9. Hi Quanta, Thanks for you reaction. In my case the (re)boot from sdcard do not fail, I only had failing EMMC re-boots. I think the older first stage u-boot from FriendlyArm is running at slower speed so there is less chance of failures. Your u-boot on the sdcard may be fixable with a similar procedure, i.e. by capturing the first stage u-boot bytes from FriendlyArm NEO image and writing it to the sdcard instead of the MMC I guess it would be possible to do this on a linux PC without first booting from the sdcard. Before changing the sdcard, you can of course make a backup on your hard-dri
  10. For your information, with this work-around, U-boot warns about a SPL version mismatch (DRAM: sunxi SPL version mismatch: expected 3, got 2), but works nontheless. I wonder what is different in the SPL version that makes the boot possible (maybe the CPU frequency or DRAM frequency?), and if we can transfer this functionality to the newer SPL without breaking the reboot. See the serial trace of a successful reboot below for the NanoPi neo plus hardware revision 2.0 (revision 1.2 with 512MB DRAM works as well): [ 311.266768] reboot: Restarting system
  11. Dear all, Starting from NAND memory used to work fine on the nanopi neo plus2, however with the new boards (both v1.2 and v2.0 revision) we just obtained it frequently doesn't want to reboot, while a cold boot works fine (I tried also earlier u-boot versions (2019.04, 2018.11) without much success for the reboot from NAND). The re-boot process stops at this point (from the serial console): [ OK ] Reached target Shutdown. [ 152.452083] reboot: Restarting system U-Boot SPL 2019.10-armbian (Jan 25 2
  12. A way to disable hardware is by setting its status to disabled in the device tree, take a look at " dtc -I fs -O dts /sys/firmware/devicetree/base|less" to see the runtime devicetree. For instance for sound and video this would look like below, which you can convert to dtb with something like "dtc -I dts -O dtb youroverlay.dts > youroverlay.dtb" and add as a user-overlay (place dtb file in /boot/overlay-user) and add "user-overlays=youroverlay" line in /boot/armbianEnv.txt. /dts-v1/; / { compatible = "allwinner,sun8i-h3","allwinner,sun50i-h5","friendlyarm,nanopi-neo2"
  13. Hi Robert, I recently looked at the spi controller driver and discovered that the DMA configuration is not used by the SPI controller. It found that dma_set_mask_and_coherent only gives a result until kernel version 4.13.3 (and maybe a bit later), and fails after kernel version 4.14.39 and later). The result is that the DMA configured for SPI is silently ignored, and regular SPI transfers are done instead. Can you confirm that you don't see any performance improvement with DMA enabled? Kind regards, Dennis
  14. I digged further into the kernel code and had a look at spi.c and spi-sun6i.c. It appears that can_dma is a function pointer that is checked while setting up DMA for a transaction. This function pointer is not assigned in spi-sun6i.c (and spi-sun4i.c for that matter). This would explain why I don't see performance improvements when I try to use DMA for with kernel 4.13.3, since the DMA ignored because can_dma=0x0. I compared the behavior with the spi-stm32.c in the 4.14.67 kernel, and this driver reads the controller DMA addresses and sets the can_dma function pointer when they are
  15. Dear Ohms, Many thanks for your feedback. Indeed, the dma_set_mask_and_coherent call does no longer work with the same driver code and device tree. Regarding the sunxi modifications, I cannot easily find release notes of the modifications between kernel 4.13.3 and newer. The change could also be in the mainline kernel updates, e.g. stricter checks in the DMA or SPI driver. The strange thing is that independent of kernel version spi->controller->can_dma is 0x0, which is supposed to tell whether the controller supports DMA according to spi.h. @can_dma: determine whethe