onion 2s does not save any data
-
@evelina I'd be interested to see the output of df -hT and your boot log.
-
@tjoseph1 hi. WE using our in-house designed board.
The firmware version is 4.3.0.3
At reboot no data no folder no file persist.
the image gives more informations on boot
-
@crispyoz said in onion 2s does not save any data:
@evelina I'd be interested to see the output of df -hT and your boot log.
Also try this from a command prompt.
cd
echo "this is a test" >> mytestfile.txt
cat mytestfile.txt
rebootAfter rebooting, type these commands:
cd
cat mytestfile.txtIf the output is "this is a test" then there is no issue with your device, so now look at whatever software you are using and how it is saving files.
-
@evelina :
Please run the command "readlink" as below, after the file "mytestfile.txt" is created as @crispyoz suggested.
~# readlink -f mytestfile.txt
/root/mytestfile.txt (It should report /root as the folder)Please make sure that the file is not created under /tmp or /var:
Thanks.
-
@crispyoz
from the output it would seem that the sd card connector is not seen at all
-
@evelina so you're saving stuff to a file system that doesn't exist. Might be the reason that your files are not saved
The second question I asked in my initial response to your query was "....and your boot log". I suspect your sdcard is not being found and I can determine that by looking at your bootlog.
There are two root causes I am suspecting:
- your firmware does not include the required modules
- you have an issue with your hardware design. sdcard slots drove me mad last year until finally I realised my gnd was not actually a gnd.
-
my custom card with the onion omega 2s cleaned on board does not recognize the sd card. this is the message that appears when i insert the sd with the system on.
-
@evelina I've never seen this error message but if you google "no support for card's volts" it indicates an issue with your design.
Have you looked at the 2S reference schematics?
-
@evelina :
This is what I see in my Omega2+ (with SD Reader built onto the SoC package) when the SD Reader is loaded/active:
root@Omega-745F:/# cat /sys/kernel/debug/mmc0/ios
clock: 48000000 Hz
vdd: 20 (3.2 ~ 3.3 V)
bus mode: 2 (push-pull)
chip select: 0 (don't care)
power mode: 2 (on)
bus width: 2 (4 bits)
timing spec: 2 (sd high-speed)
signal voltage: 0 (3.30 V)
driver type: 0 (driver type B)I would guess the reader has to be compatible for Omega2S.
Just FI, here is what is shows when the SD card is absent:
root@Omega-745F:/# cat /sys/kernel/debug/mmc0/ios
clock: 0 Hz
vdd: 0 (invalid)
bus mode: 2 (push-pull)
chip select: 0 (don't care)
power mode: 0 (off)
bus width: 0 (1 bits)
timing spec: 0 (legacy)
signal voltage: 0 (3.30 V)
driver type: 0 (driver type B)Thanks..
-
@crispyoz Hello, thanks for the suggestion, but your test gave the following result. no file or folder is saved after the reboot
-
@tjoseph1 said in onion 2s does not save any data:
hi,
my sd card is absent. you think is something about the schematic that misconnects the sd card?
-
@evelina we can't see the entire boot process in your screen shot but clearly you have some file system issues.
Your ongoing loss of files after reboot is unsurprising when I look at the output of your df -hT because it shows your root file system is in /tmp/root which means it will get wiped out when you reboot.
You seem to have 2 separate issues.
- files lost between boots (see my answer above)
- cannot access sdcard
In relation to 1, you can likely fix the issue by performing a factory reset. Since you are using an Omega2S I hope you implemented the switch correctly. Otherwise you can run firstboot -y
- Please check the reference schematic and check you have implemented the design correctly. You can find the schematic here:
https://github.com/OnionIoT/Omega2/blob/master/Schematics/Omega2S-Reference-Schematic.pdf
-
@evelina You should separate your issues.
You have an Onion2S+ module on your custom board, your firmware is v0-3-2 b239.Your filesystem is corrupted.
These are the outputs of a few commands of a well working Omega2+ with FW v0-3-2 b239:# Omega2+ FW v0-3-2 b239 without SD Card root@Omega-5BE1:/# dev: size erasesize name mtd0: 00030000 00010000 "u-boot" mtd1: 00010000 00010000 "u-boot-env" mtd2: 00010000 00010000 "factory" mtd3: 01f30000 00010000 "firmware" mtd4: 0018a0e3 00010000 "kernel" mtd5: 01da5f1d 00010000 "rootfs" mtd6: 01610000 00010000 "rootfs_data" mtd7: 00080000 00010000 "user" root@Omega-5BE1:/# ls -l / drwxr-xr-x 2 root root 853 Apr 9 14:46 bin drwxr-xr-x 5 root root 2580 Apr 9 14:50 dev drwxr-xr-x 1 root root 0 Apr 9 14:50 etc drwxr-xr-x 1 root root 0 Apr 9 14:47 lib drwxr-xr-x 1 root root 0 Sep 23 22:56 mnt drwxr-xr-x 5 root root 0 Jan 1 1970 overlay dr-xr-xr-x 57 root root 0 Jan 1 1970 proc drwxr-xr-x 16 root root 223 Apr 9 14:46 rom drwxr-xr-x 2 root root 3 Apr 9 14:46 root drwxr-xr-x 2 root root 862 Apr 9 14:46 sbin dr-xr-xr-x 11 root root 0 Jan 1 1970 sys drwxrwxrwt 16 root root 520 Sep 24 09:57 tmp drwxr-xr-x 1 root root 0 Apr 9 14:46 usr lrwxrwxrwx 1 root root 3 Apr 9 14:46 var -> tmp drwxr-xr-x 4 root root 63 Apr 9 14:46 www root@Omega-5BE1:/tmp# df -hT Filesystem Type Size Used Available Use% Mounted on /dev/root squashfs 7.8M 7.8M 0 100% /rom tmpfs tmpfs 60.9M 96.0K 60.8M 0% /tmp /dev/mtdblock6 jffs2 22.1M 696.0K 21.4M 3% /overlay overlayfs:/overlay overlay 22.1M 696.0K 21.4M 3% / tmpfs tmpfs 512.0K 0 512.0K 0% /dev /dev/mtdblock7 jffs2 512.0K 224.0K 288.0K 44% /mnt/mtdblock7
If the output of the
cat /proc/mtd
command is correct and the bootlog contains these lines:... [ 0.387513] 5 fixed-partitions partitions found on MTD device spi0.0 [ 0.393973] Creating 5 MTD partitions on "spi0.0": [ 0.398840] 0x000000000000-0x000000030000 : "u-boot" [ 0.404852] 0x000000030000-0x000000040000 : "u-boot-env" [ 0.411059] 0x000000040000-0x000000050000 : "factory" [ 0.417112] 0x000000050000-0x000001f80000 : "firmware" [ 0.502999] 2 uimage-fw partitions found on MTD device firmware [ 0.509048] 0x000000050000-0x0000001da0e3 : "kernel" [ 0.515027] 0x0000001da0e3-0x000001f80000 : "rootfs" [ 0.520853] mtd: device 5 (rootfs) set to be root filesystem [ 0.528136] 1 squashfs-split partitions found on MTD device rootfs [ 0.534476] 0x000000970000-0x000001f80000 : "rootfs_data" [ 0.540898] 0x000001f80000-0x000002000000 : "user" ...
(without an inserted SD card) try to perform a Factory Reset.
Otherwise - without an iserted SD card - please reinstall your b239 firmware. For example:
cd /tmp
wget http://repo.onioniot.com.s3.amazonaws.com/omega2/images/omega2p-v0.3.2-b239.bin
Check the downloaded file:
md5sum omega2p-v0.3.2-b233.bin
45d6b0be4eb3fb4a0396f417c087d838 omega2p-v0.3.2-b239.binsysupgrade -n omega2p-v0.3.2-b239.bin
Repeat the First Time Setup again please.
You can install the b233 (the stable ?!) or the b244 (the latest) image instead of b239 of course:
wget http://repo.onioniot.com.s3.amazonaws.com/omega2/images/omega2p-v0.3.2-b233.bin
md5sum omega2p-v0.3.2-b233.bin
9616a502010ddd4793dbd5b31499b3e3 omega2p-v0.3.2-b233.bin
sysupgrade -n omega2p-v0.3.2-b233.bin
wget http://repo.onioniot.com.s3.amazonaws.com/omega2/images/omega2p-v0.3.2-b244.bin
md5sum omega2p-v0.3.2-b244.bin
d990a68d131a635985adb60861cabca1 omega2p-v0.3.2-b244.bin
sysupgrade -n omega2p-v0.3.2-b244.bin
Good luck.
-
@evelina :
Yes. This is what I see on an Omega2, that does not even have the SD drive, which is pointing that, Omega you have also does not see the drive.I would think, it sees the SD_xx pins (shown as 53-60) in the PDF, page 12:
https://raw.githubusercontent.com/OnionIoT/Omega2/master/Documents/Omega2S Datasheet.pdf as open even when a card is inserted.Why would the df -ht reports:
overlayfs:/tmp/root overlay .... /
in @evelina's case ?The default seems to be, like:
overlayfs:/overlay overlay .... /
is this because of a mistake in the configuration file ?
-
Friends, have you noticed the message in the first posted image warning about a CRC problem and use of default environment?
I'm attaching the image with a red arrow pointing to the message. Maybe that's the root cause of all problems in this thread...
-
@victoriano This '*** Warning - ...' is related to U-Boot only.
Please read this post and a few older post(s)
or The DENX U-Boot and Linux Guide