Jump to content

going

Members
  • Posts

    610
  • Joined

  • Last visited

Everything posted by going

  1. I have already hinted at this. But here there is some general problem of writing an overlay file for an already running system. We can help the user by luring him to Armbian OS if we get the user's @Peter Gregory consent. We find "compatible" in the source code of the driver : compatible = "ti,ads7846" Check the presence of the driver module in the Armbian kernel for sunxi: armbian/build> grep -nr TOUCHSCREEN_ADS7846 config/kernel/linux-sunxi* config/kernel/linux-sunxi64-current.config:2965:CONFIG_TOUCHSCREEN_ADS7846=m config/kernel/linux-sunxi64-edge.config:2978:CONFIG_TOUCHSCREEN_ADS7846=m config/kernel/linux-sunxi64-legacy.config:2902:CONFIG_TOUCHSCREEN_ADS7846=m config/kernel/linux-sunxi-current.config:2865:CONFIG_TOUCHSCREEN_ADS7846=m config/kernel/linux-sunxi-edge.config:2966:CONFIG_TOUCHSCREEN_ADS7846=m config/kernel/linux-sunxi-legacy.config:2890:CONFIG_TOUCHSCREEN_ADS7846=m I wanted to write something as a template, but I found it on this forum. Look at the example: examples/spi-ads7846.dts sun8i-h3-spi-ads7846.dts Please write questions and errors here. Let's try to figure this out for a modern kernel (>=6.1)
  2. I have no idea what the syntax in dts is in this image Please extract it from the file system dtc --sort -I fs -O dts /sys/firmware/devicetree/base > cur-dts-out.txt or from the existing dtb used and publish only two nodes pio and spi
  3. For node spidev@0 spidev@1, it is necessary to explicitly register cs pins And it seems it will be superfluous
  4. Don't rush to say goodbye. Try to provide more information
  5. Try setting the verbose parameter to 7 in armbianEnv.txt verbosity=7 The final DTS with the applied overlay can be obtained directly on the working device: dtc --sort -I fs -O dts /sys/firmware/devicetree/base > dts-out.txt Check the existence of the spi object in the sys file system: find /sys/ -name '*spi*' Check dmesg command. dmesg | grep spi dmesg | grep -i err dmesg | grep -i warn This processor has not been tested for a long time. Perhaps changes in the upstream of the u-boot, kernel sources somehow affected the situation. Feel free to experiment. The device is in your hands. I'm just trying to guide you along some path. And the code I wrote is not necessarily working. Just do your own by analogy. The errors that you will get as a result are posted here in text form.
  6. That's exactly what you need to do and combine both overlays: sun7i-a20-spi0-spidev.dts fragment2 is taken from the sun7i-a20.dtsi
  7. It is ok. This entry says that an overlay will be accepted: sun7i-a20-spi-spidev.dtbo /_/-/ Replace the underscore with a dash Let's look at the source file: compatible = "armbian,spi-dev"; - This line will cause the spidev module to load into the kernel. But the /dev/spidev0.X interface will not be present because it is not enabled (status = "disabled"). It is necessary to register more overlays to include the necessary nodes spi0, spi1 or spi2. The source text of the file "sun7i-a20-spi0.dts": To include spi1 and spi2, the lines must be: ... fdtfile=sun7i-a20-bananapi-m1-plus.dtb overlay_prefix=sun7i-a20 overlays=spi-spidev spi1 spi2 ... In this case, three nodes will be added for control via the spidev driver and only two will be enabled. This can be bad if, for example, spi0 is planned to be used in some other way and another driver must be connected. You will have to rewrite the overlay yourself for a specific task and compile it. You can find all the source texts of the overlays in the kernel folder after all the patches have been applied before compiling. build/cache/sources/linux-kernel-worktree/6.1__sunxi__armhf/arch/arm/boot/dts/overlay/*
  8. 😢! What is the banana version? bananapim1plus - A20 SOC. The native reassembly of the kernel turns into eternity. Check the configuration: grep -nr CONFIG_SPI_SPIDEV /boot/conf* Maybe some details from you? What is connected via SPI?
  9. Please show the link in the code: drivers/spi/spi-sun6i.c which deadlines do you think are working incorrectly. And please check the dtb on the working board. It may need to be fixed.
  10. Check the git status in this repository if this folder is under git control. Add all the files and commit. Assign a tag to it. Step by step make your changes and commit git for each step. Extract all your commits in one move: mkdir userpatches/patch/kernel/sunxi-6.1/patches.spi KERNEL="cache/sources/linux-kernel-worktree/6.1__sunxi__armhf" ./tools/mk_format_patch $KERNEL Tag..HEAD userpatches/patch/kernel/sunxi-6.1/patches.spi I do not know how patches are applied today in the current version of the build system. But they will be applied every time the build system starts assembling the kernel. The order of assembly is determined by a single file: patch/kernel/archive/sunxi-6.1/series.conf Just add them to this place and write them in this file.
  11. I think I misunderstood the translation of this. Will you be able to portray this as a flowchart?
  12. Please decipher what you want to get in the end? You came up with the idea. And it is not included in my immediate plans. I just added your links to my browser bookmarks for the future. The idea is as follows: Today, in order to test the process of downloading a new image, I have to attach a UART-USB adapter cable to the device and to the desktop computer, run minicom in the terminal and read the running line. It seems to me it will be very convenient if the UART traffic from a specific device is routed to a specific Ethernet port and ends up in a log file.
  13. Thanks for the links. This should be pretty easy to set up.
  14. I understood. We can ask Alistair @ALIGMSTEN. He seems to have this device.
  15. The first thing that came to mind was the DTB for this device. On the u-boot and kernel side.
  16. I just put together an image with this new u-boot: linux-u-boot-bananapim64-edge (2023.07.02) The device is loading. The difference: 1) the build was done in my branch. My branch is in an unbalanced state, but it allows me to build almost any package. The assembly of images is unstable. 2) ATF : ATFBRANCH='commit:0cf5f08a205e4877c9daef5d90e1086643590226' - This v2.9.0 + 440 commits
  17. No. On the contrary, we'll just fix the build process. I have found what needs to be done. @Gunjan Gupta I did not find in the build system the correct export of parameters when building with SCP: export SCP=/src/crust/build/scp/scp.bin and without using it. If SCP is not used, pass the parameter to ignore. export SCP=/dev/null It is necessary to add somewhere in this place or I do not know lib/functions/compilation/uboot.sh#L151
  18. how-to-run-scripts-on-start-up run-script-boot-up-debian
  19. In order for a doctor to make a diagnosis, he needs a patient. Tell us the build parameters. To narrow down the search, you need to know at least the version of the kernel that will be built.
  20. Do you want to make an external power switch in this way? Do you want to send a signal to one of the pins of connector 40? Do you want the device to turn off? But at the same time, will the 5V power supply to the device be sold? There are pitfalls here. Are you interested in knowing them? And how will the external activation of the device be carried out?
  21. I am a bad advisor in this kernel subsystem. But in dts from manufacturers, I have seen lines that reserve a certain amount of memory in a fixed region for a specific purpose. Check the processor's data sheet. Maybe it's a hardware limitation?
  22. Maybe you can keep your blog here and interested people will join. I'm one of them.
  23. I didn't see any obvious crime in your changes. The question of why they are not applied is still open. The only assumption is that the dtb is already in the kernel or in initramfs. Show the contents of the file in the extlinux folder.
  24. @Something Name The image you are using is something previously from the author Oleg @balbes150. This is some kind of early work. There is no support for allwinner D1 in the upstream kernel 5.19. Support starts with kernel version 6.3 riscv/boot/dts/allwinner/sun20i-d1-nezha.dts I don't think he will want to go back to the old images and support them. Try to use the last option on the 6.5 kernel: Nezha_D1/ArmbianTV/20230710-edge The author will be available soon. He's on vacation today. He will be able to help faster. By the way, it uses the extlinux mechanism to load the kernel. The /boot folder should have a directory of the same name with a boot configuration file.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines