Syntax error DNS-320L.dts OpenWrt 22.03.3

That looks actually pretty good - sysupgrade does the right thing!
Your problem is related to an error message that you need to fix:

[e]Failed to get erase block status

And I suppose that the problem is with your partition map: Your kernel partition is 1M in size, while the kernel is >5M nowadays. You need to redo your partition mapping (in my image, it was 4M, which is nowadays also too small. I suggest you go with 10M).

You have your TFTP commands wrong. You need to load to RAM first and then write to the NAND. Hence, you cannot tftp to 0x100000!

These were my commands I used to boot from TFTP to the NAND - you need to fix the sizes and offsets. The "rw" command clears the RAM from remnants, then I tftpboot to 0x6400000 which is in RAM. Then I erase the NAND and write from RAM to NAND. Only the kernel partition is shown!

rw 0x6400000 0xffff 0x200000
tftpboot 0x6400000 openwrt-dns320l-uImage
nand erase 0x100000 0x400000
nand write.e 0x6400000 0x100000 0x400000

EDIT: And again, it would make matters much easier if you posted your changes! It's a good opportunity to get familiar with git and github - ideally, you create a fork of https://github.com/openwrt/openwrt and push your changes to a new branch. That way, you can then easily contribute back to OpenWrt once you're done.

Wow!!! I made it work with

 0.766378] Creating 3 MTD partitions on "orion_nand":
[    0.771511] 0x000000000000-0x000000100000 : "u-boot"
[    0.780739] 0x000000100000-0x000000500000 : "kernel"
[    0.786342] 0x000000500000-0x000010000000 : "ubi"

Good enough for today! Thanks for help! See you next day. I Have to integrate dns320l-daeomon into rootfs during the firmare build.

Great! That's still just roughly 4M, i would at least double it to be on the safe side for future kernel updates.

I have in plans also to make a partition for initramfs image.It will be used to boot if common firware cannot boot. Something like emergency boot. There is such possibility in "printenv".

Hi. I try to insert "iniparser" and "dns-320l-daemon".
I have found one single instruction:

#################
'
5a. We are not in a hurry to flash, we still need to compile dns320l-daemon The method by which we will compile it later can be used to port any software we need to our dns-320l (well, almost any)) 5b. wget https: //www.aboehler.a...mon/archive/tip.tar.gz This is actually the daemon itself wget https://github.com/nde...ser/archive/master.zip This is the iniparser library that is needed for compilation and work dns320l-daemon 5c. Unzip, prepare the environment for compilation. Add to the patch the paths where we have the previously compiled compiler for the arm/dns-320l system PATH=$PATH:/your_path_to/openwrt-barrier_breaker-36dcf68/staging_dir/toolchain-arm_xscale_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/bin STAGING_DIR =/your_path_to/openwrt-barrier_breaker-36dcf68/staging_dir export PATH export STAGING_DIR we may still need it in our dns-320l) After compilation, two files will appear libiniparser.a libiniparser.so.1 Copy them to /your_path_to/openwrt-barrier_breaker-36dcf68/staging_dir/toolchain-arm_xscale_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/ lib5d. The library is ready, go to the directory with dns320l-daemon and repeat make CC=arm-openwrt-linux-uclibcgnueabi-gcc LD=arm-openwrt-linux-uclibcgnueabi-ld The dns320l-daemon executable will appear.

###################

I don't understand, where I have to change the "path to xscale_gcc"?
I have found this file in openwrt build directory, and "staging_dir" I have found too.
I have inspected all files in iniparser directory. There is no any file with variable "path"

Creating the package is much easier than the instructions you copied here - check out the Wiki. Basically, you just need to write a Makefile and point the build system to the source code.

That said: My daemon has last been updated 10 years ago. I had a quick look at the code and you will have to change some things to make it work:

  • GPIOs are hardcoded and accessed via sysfs -> export the required GPIO node in the .dts and fix the code. That's probably required because the GPIO numbering has probably changed over time. Check if it works before doing this.
  • The iniparser module is not available for OpenWrt -> replace the ini system by uci. Since this is quite some work, you can also include iniparser in dns320l-daemon.
  • You need a working serial port at /dev/ttyS1. Did you specify that in your dts (or is it not necessary on Kirkwood platforms)?

And then one more hint: The alt-f project has modified the daemon quite a bit, some modifications might apply: https://github.com/svn2github/alt-f/blob/master/alt-f/package/alt-f-utils/alt-f-utils-0.1.7/dns320l-daemon.c

Does dns320l-daemon use serial to get temperature? How it works? I tried to use i2c and lm-sensors instead, and got nothing in collectd. What is required serial speed?

Yes.

There is a command that's sent and the MCU responds with a value that needs to be compared to a ThermalTable. For further details please consult the code, that's too long ago for me to remember.

I have found this table in script written in Python
script
Will it work if I install "python" package?
And what about HDD temperature? Where from I can get it?

Maybe, why don't you just try it?

From the HDDs, using smartctl for instance.