Welcome! Log In Create A New Profile

Advanced

Debian on Dell Wyse 3020

Posted by Mischif 
Re: Debian on Dell Wyse 3020
February 09, 2024 06:01PM
ksuszka,

> @bohdi, on another side note, I'm completely new
> to the /dev/mtd* stuff in the linux, but I've
> noticed that running commands like:
>
> cat /dev/mtdblock0 > mtdblock0_cat.bin
> cat /dev/mtd0 > mtd0_cat.bin
> cat /dev/mtd0ro > mtd0ro_cat.bin
>
> only seems to work. The content of captured files
> is basically garbage, it is a repeated block of
> the same fragment of the flash. For mtdblock0 it
> is 1KB block repated till 4MB. For mtd0 it is
> 256KB block repeated till 4MB. I'm not sure if
> this should work that way or is this even a
> sensible way to verify if it works.

If the flash is NAND type then use nanddump. If the flash is SPI type then use dd. When the mtd definition are correct as seen in the output of
cat /proc/mtd
then nanddump (for NAND) and dd (for SPI) should give us the correct dumps.

Examples for NAND and SPI, respectively:

nanddump --noecc --omitoob -f mtd0.bin /dev/mtd0
or
dd if=/dev/mtd0 of=mtd0.bin bs=64k conv=sync

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
mmm
Re: Debian on Dell Wyse 3020
February 09, 2024 06:02PM
Quote
ksuszka
> I'm still on 6.4.11 on eMMC. I tried 6.5.7 on the
> flash drive and it booted ok, but I didn't yet
> bother to upgrade eMMC. However it shouldn't
> matter as I understand that in your case it
> doesn't even start to boot from the kernel image.
> I assume that you have serial console connected as
> you were able to capture the kernel panic message
> so if you try to boot from eMMC do you see any
> activity from the kernel?

Yep i do have it connected through serial, and I only get this when I boot it up (which is just Wloader nonsense):
*** FlashNumber...
Code: :
*** Loading Next Image...
*** Loading Next Image...
*** Set Partition for Image...
*** Validate Image...
*** GPIO_14, GPIO_13 both low ...
 Controller1 DDR size reg is 0xE ...
*** Your OBM Boot Test Successes ...
*** Shutting ports and transferring control ...

123ABC
12345

Quote
ksuszka
> @bohdi, on another side note, I'm completely new
> to the /dev/mtd* stuff in the linux, but I've
> noticed that running commands like:
>
> cat /dev/mtdblock0 > mtdblock0_cat.bin
> cat /dev/mtd0 > mtd0_cat.bin
> cat /dev/mtd0ro > mtd0ro_cat.bin
>
> only seems to work. The content of captured files
> is basically garbage, it is a repeated block of
> the same fragment of the flash. For mtdblock0 it
> is 1KB block repated till 4MB. For mtd0 it is
> 256KB block repeated till 4MB. I'm not sure if
> this should work that way or is this even a
> sensible way to verify if it works.

I've been able to notice this as well, which might also be the reason why the people who tried flashing OpenFirmware failed. Here's the data from /dev/mtd0:

00000000  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
00000200  00 04 03 00 48 4d 49 54  00 00 00 00 c0 aa 6c 00  |....HMIT......l.|
00000210  1f 00 00 00 ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
00000220  ff ff ff ff ff ff ff ff  0a 49 50 53 04 00 00 00  |.........IPS....|
00000230  00 00 00 00 24 08 00 00  48 4d 49 54 49 4d 54 57  |....$...HMITIMTW|
00000240  00 00 00 00 00 00 02 d1  dc 09 00 00 00 00 00 00  |................|
00000250  14 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000260  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000290  00 00 00 00 00 00 00 00  49 4d 54 57 49 4d 42 4f  |........IMTWIMBO|
000002a0  00 0c 00 00 00 00 00 d1  04 fa 01 00 00 00 00 00  |................|
000002b0  14 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000002c0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000002f0  00 00 00 00 00 00 00 00  49 4d 42 4f 4f 4c 53 4f  |........IMBOOLSO|
00000300  00 0c 02 00 00 00 00 00  10 07 01 00 00 00 00 00  |................|
00000310  14 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000320  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000350  00 00 00 00 00 00 00 00  4f 4c 53 4f ff ff ff ff  |........OLSO....|
00000360  00 14 03 00 00 00 10 00  00 00 02 00 00 00 00 00  |................|
00000370  14 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000380  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000003b0  00 00 00 00 00 00 00 00  48 54 50 4f 07 00 00 00  |........HTPO....|
000003c0  58 52 42 54 18 00 00 00  00 40 02 d1 01 00 00 00  |XRBT.....@......|
000003d0  48 4d 49 54 00 20 02 d1  43 4d 4f 4e 08 00 00 00  |HMIT. ..CMON....|
000003e0  45 52 4f 43 0c 00 00 00  00 00 00 00 54 52 41 55  |EROC........TRAU|
000003f0  10 00 00 00 46 46 00 00  01 00 00 00 50 44 49 43  |....FF......PDIC|
00000400  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
and then it just loops again beginning with the line with "HMIT".
mmm
Re: Debian on Dell Wyse 3020
February 09, 2024 06:06PM
As far as I'm concerned it's SPI, here's an image i made:

# Mapfile. Created by GNU ddrescue version 1.27
# Command line: ddrescue -d -r3 /dev/mtdblock0 mtdblock0.img mtdblock0.log
# Start time:   2024-02-09 07:14:31
# Current time: 2024-02-09 07:14:40
# Finished
# current_pos  current_status  current_pass
0x003F0000     +               1
#      pos        size  status
0x00000000  0x00400000  +

https://bin.idrix.fr/?a0722bcb359bd300#4BkhXh6HB432JZQmpK456y65UFX9B3J8xpfJqQnFL1QK
Re: Debian on Dell Wyse 3020
February 09, 2024 06:07PM
(Cont. from https://forum.doozan.com/read.php?2,134563,136676#msg-136676)

This box has 4MB SPI flash. So use dd to dump 4MB

dd if=/dev/mtd0 of=mtd0.bin bs=4096k conv=sync

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Dell Wyse 3020
February 09, 2024 06:10PM
I've just uncompressed the content of the boot loader from the image file I downloaded from the Dell website. And just browsing it with the hex editor I noticed that there are 3 booting modes: "WTOS Mode WinCE Mode Linux Mode".

The message "Cannot load OS from PAR1." is present there so it is definetely WLoader which is responsible for it.

Also it seems to support some other variation of wloader.cfg with <TX0D_IMGUPGRADE_START> tag.
Re: Debian on Dell Wyse 3020
February 09, 2024 06:25PM
bodhi Wrote:
-------------------------------------------------------
> (Cont. from
> https://forum.doozan.com/read.php?2,134563,136676#msg-136676)
>
> This box has 4MB SPI flash. So use dd to dump 4MB
>
>
> dd if=/dev/mtd0 of=mtd0.bin bs=4096k conv=sync
>

Something strange happened. I just run this command and check the content of the mtd0.bin and it was all zeros (EDIT: correction, all FFs) (I've used some snippet from SO to generate quick and dirty histogram of bytes in the file):
root@debian:~# dd if=/dev/mtd0 of=mtd0.bin bs=4096k conv=sync
1+0 records in
1+0 records out
4194304 bytes (4.2 MB, 4.0 MiB) copied, 5.93347 s, 707 kB/s
root@debian:~# mc

root@debian:~# cat mtd0.bin | sed 's/\(.\)/\1\n/g' | sort | uniq -c
4194304 �

So I wanted to prepare a set of commands to attach here to show what configuration I have and that it fails and... it worked:
root@debian:~# dmesg | grep "Kernel command line"
[    0.000000] Kernel command line: root=LABEL=mmcrootfs raid=noautodetect console=ttyS2,115200 init=/usr/bin/systemd mtdparts=spi0.0:4m(boot)
root@debian:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00400000 00001000 "boot"
root@debian:~# dd if=/dev/mtd0 of=mtd0.bin bs=4096k conv=sync
1+0 records in
1+0 records out
4194304 bytes (4.2 MB, 4.0 MiB) copied, 5.99982 s, 699 kB/s
root@debian:~# cat mtd0.bin | sed 's/\(.\)/\1\n/g' | sort | uniq -c
.... a lot of content here

The same session, the same command executed like 2 minutes later.

EDIT: And it works every second run. When I run it repeatadely I got all zeros (EDIT: correction, all FFs) and proper content every second run.



Edited 2 time(s). Last edit at 02/09/2024 06:54PM by ksuszka.
mmm
Re: Debian on Dell Wyse 3020
February 09, 2024 06:33PM
This is exactly what happened to me! The image i made with ddrescue previously is garbage, what i read now with dd is just this:
00000000  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
00400000
but then it worked perfectly?
00000000  00 04 03 00 48 4d 49 54  00 00 00 00 c0 aa 6c 00  |....HMIT......l.|
00000010  1f 00 00 00 ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
00000020  ff ff ff ff ff ff ff ff  0a 49 50 53 04 00 00 00  |.........IPS....|
00000030  00 00 00 00 24 08 00 00  48 4d 49 54 49 4d 54 57  |....$...HMITIMTW|
00000040  00 00 00 00 00 00 02 d1  dc 09 00 00 00 00 00 00  |................|
00000050  14 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000060  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000090  00 00 00 00 00 00 00 00  49 4d 54 57 49 4d 42 4f  |........IMTWIMBO|
000000a0  00 0c 00 00 00 00 00 d1  04 fa 01 00 00 00 00 00  |................|
000000b0  14 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000000c0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000000f0  00 00 00 00 00 00 00 00  49 4d 42 4f 4f 4c 53 4f  |........IMBOOLSO|
00000100  00 0c 02 00 00 00 00 00  10 07 01 00 00 00 00 00  |................|
00000110  14 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000120  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000150  00 00 00 00 00 00 00 00  4f 4c 53 4f ff ff ff ff  |........OLSO....|
00000160  00 14 03 00 00 00 10 00  00 00 02 00 00 00 00 00  |................|
00000170  14 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000180  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000001b0  00 00 00 00 00 00 00 00  48 54 50 4f 07 00 00 00  |........HTPO....|
000001c0  58 52 42 54 18 00 00 00  00 40 02 d1 01 00 00 00  |XRBT.....@......|
000001d0  48 4d 49 54 00 20 02 d1  43 4d 4f 4e 08 00 00 00  |HMIT. ..CMON....|
000001e0  45 52 4f 43 0c 00 00 00  00 00 00 00 54 52 41 55  |EROC........TRAU|
000001f0  10 00 00 00 46 46 00 00  01 00 00 00 50 44 49 43  |....FF......PDIC|
00000200  18 00 00 00 01 00 00 00  49 52 42 54 01 00 00 00  |........IRBT....|
00000210  31 52 44 44 31 52 44 44  c0 07 00 00 02 00 00 00  |1RDD1RDD........|
00000220  ab 00 00 00 01 00 00 00  01 00 00 00 02 00 00 00  |................|
00000230  00 00 00 00 01 00 00 00  78 2c 28 d4 41 05 03 00  |........x,(.A...|
00000240  07 00 00 00 24 10 05 d4  02 e0 02 00 01 00 00 00  |....$...........|
00000250  00 28 28 d4 01 90 b9 88  07 00 00 00 44 2a 28 d4  |.((.........D*(.|
00000260  70 00 55 00 01 00 00 00  8c 28 28 d4 00 00 00 00  |p.U......((.....|
00000270  06 00 00 00 7c 2c 28 d4  ff 03 ff ff 07 00 00 00  |....|,(.........|
00000280  7c 2c 28 d4 00 54 00 00  06 00 00 00 80 2c 28 d4  ||,(..T.......,(.|
00000290  ff 03 ff ff 07 00 00 00  80 2c 28 d4 00 54 00 00  |.........,(..T..|
000002a0  06 00 00 00 84 2c 28 d4  ff 03 ff ff 07 00 00 00  |.....,(.........|
000002b0  84 2c 28 d4 00 54 00 00  06 00 00 00 48 2a 28 d4  |.,(..T......H*(.|
000002c0  ff df ff ff 06 00 00 00  4c 2a 28 d4 ff df ff ff  |........L*(.....|
000002d0  06 00 00 00 50 2a 28 d4  ff df ff ff 01 00 00 00  |....P*(.........|
000002e0  60 28 28 d4 00 00 00 00  01 00 00 00 d4 28 28 d4  |`((..........((.|
000002f0  00 00 00 00 01 00 00 00  d8 28 28 d4 00 00 00 00  |.........((.....|
00000300  06 00 00 00 64 2c 28 d4  aa aa 00 fe 06 00 00 00  |....d,(.........|
00000310  68 2c 28 d4 fc ff ff ff  06 00 00 00 dc 2c 28 d4  |h,(..........,(.|
00000320  fe ff ff ff 06 00 00 00  28 28 28 d4 00 f0 ff ff  |........(((.....|
00000330  06 00 00 00 40 28 28 d4  00 00 f3 ff 06 00 00 00  |....@((.........|
00000340  18 29 28 d4 00 f0 ff ff  01 00 00 00 64 50 01 d4  |.)(.........dP..|
00000350  03 00 00 00 03 00 00 00  f4 01 00 00 07 00 00 00  |................|
00000360  40 e1 01 d4 00 04 00 00  07 00 00 00 44 e1 01 d4  |@...........D...|
00000370  00 04 00 00 03 00 00 00  f4 01 00 00 01 00 00 00  |................|
00000380  04 50 01 d4 04 00 00 00  03 00 00 00 f4 01 00 00  |.P..............|
00000390  01 00 00 00 04 50 01 d4  07 00 00 00 03 00 00 00  |.....P..........|
000003a0  f4 01 00 00 01 00 00 00  04 50 01 d4 03 00 00 00  |.........P......|
000003b0  03 00 00 00 f4 01 00 00  01 00 00 00 10 10 01 d4  |................|
000003c0  60 40 00 00 03 00 00 00  f4 01 00 00 01 00 00 00  |`@..............|
000003d0  10 10 01 d4 60 00 00 00  03 00 00 00 f4 01 00 00  |....`...........|
000003e0  01 00 00 00 20 10 01 d4  00 00 00 00 03 00 00 00  |.... ...........|
000003f0  f4 01 00 00 01 00 00 00  08 10 01 d4 32 00 00 00  |............2...|
00000400  01 00 00 00 10 10 01 d4  69 00 00 00 03 00 00 00  |........i.......|
00000410  f4 01 00 00 01 00 00 00  08 10 01 d4 24 00 00 00  |............$...|
00000420  01 00 00 00 10 10 01 d4  68 00 00 00 03 00 00 00  |........h.......|
00000430  f4 01 00 00 01 00 00 00  08 10 01 d4 1f 00 00 00  |................|
00000440  01 00 00 00 10 10 01 d4  6a 00 00 00 03 00 00 00  |........j.......|
00000450  20 4e 00 00 06 00 00 00  34 00 05 d4 ff fe ff ff  | N......4.......|
00000460  07 00 00 00 18 04 05 d4  01 00 00 00 01 00 00 00  |................|
00000470  14 04 05 d4 99 06 39 05  01 00 00 00 34 00 05 d4  |......9.....4...|
00000480  00 52 1c 00 07 00 00 00  34 00 05 d4 00 01 00 00  |.R......4.......|
00000490  03 00 00 00 f4 01 00 00  07 00 00 00 14 04 05 d4  |................|
000004a0  00 00 00 20 03 00 00 00  88 13 00 00 01 00 00 00  |... ............|
000004b0  68 00 05 d4 d1 04 00 00  03 00 00 00 f4 01 00 00  |h...............|
000004c0  01 00 00 00 04 28 28 d4  10 05 bc 00 06 00 00 00  |.....((.........|
000004d0  50 29 28 d4 00 00 00 fe  07 00 00 00 50 29 28 d4  |P)(.........P)(.|
000004e0  01 00 22 80 06 00 00 00  88 29 28 d4 ff ff 0f fe  |.."......)(.....|
000004f0  07 00 00 00 88 29 28 d4  00 00 10 00 01 00 00 00  |.....)(.........|
00000500  08 00 05 d4 00 00 80 41  01 00 00 00 6c 28 28 d4  |.......A....l((.|
00000510  03 06 00 00 03 00 00 00  f4 01 00 00 07 00 00 00  |................|
00000520  04 28 28 d4 00 00 00 40  03 00 00 00 f4 01 00 00  |.((....@........|
00000530  07 00 00 00 04 28 28 d4  00 00 00 20 03 00 00 00  |.....((.... ....|
00000540  f4 01 00 00 07 00 00 00  04 28 28 d4 00 00 00 10  |.........((.....|
00000550  03 00 00 00 f4 01 00 00  01 00 00 00 10 00 00 d0  |................|
00000560  01 00 0e 00 01 00 00 00  20 00 00 d0 30 65 04 00  |........ ...0e..|
00000570  01 00 00 00 30 00 00 d0  00 00 00 00 01 00 00 00  |....0...........|
00000580  80 00 00 d0 66 00 25 51  01 00 00 00 84 00 00 d0  |....f.%Q........|
00000590  f5 0d 88 85 01 00 00 00  88 00 00 d0 c2 2a 8c 24  |.............*.$|
000005a0  01 00 00 00 8c 00 00 d0  d1 50 63 23 01 00 00 00  |.........Pc#....|
-- concatenated --

The data at the beginning of this last dd image looks like what was repeated throughout the ddrescue dump. There's definitely something strange going on with the SPI.

Here's the image of /dev/mtd0 made with dd: https://drop.idrix.fr/r/uxCH3ZZRVU#l0YcJOD75eCFgNXChOIPeQBi/yDW4KeMOKefTlYllh8=
Re: Debian on Dell Wyse 3020
February 09, 2024 06:34PM
ksuszka,


> Something strange happened. I just run this
> command and check the content of the mtd0.bin and
> it was all zeros (I've used some snippet from SO
> to generate quick and dirty histogram of bytes in
> the file):
>
> root@debian:~# dd if=/dev/mtd0 of=mtd0.bin
> bs=4096k conv=sync
> 1+0 records in
> 1+0 records out
> 4194304 bytes (4.2 MB, 4.0 MiB) copied, 5.93347 s,
> 707 kB/s
> root@debian:~# mc
> 
> root@debian:~# cat mtd0.bin | sed 's/\(.\)/\1\n/g'
> | sort | uniq -c
> 4194304 �
>
>
> So I wanted to prepare a set of commands to attach
> here to show what configuration I have and that it
> fails and... it worked:
>
> root@debian:~# dmesg | grep "Kernel command line"
> [    0.000000] Kernel command line:
> root=LABEL=mmcrootfs raid=noautodetect
> console=ttyS2,115200 init=/usr/bin/systemd
> mtdparts=spi0.0:4m(boot)
> root@debian:~# cat /proc/mtd
> dev:    size   erasesize  name
> mtd0: 00400000 00001000 "boot"
> root@debian:~# dd if=/dev/mtd0 of=mtd0.bin
> bs=4096k conv=sync
> 1+0 records in
> 1+0 records out
> 4194304 bytes (4.2 MB, 4.0 MiB) copied, 5.99982 s,
> 699 kB/s
> root@debian:~# cat mtd0.bin | sed 's/\(.\)/\1\n/g'
> | sort | uniq -c
> .... a lot of content here
>
>
> The same session, the same command executed like 2
> minutes later.

I guess at least one sync should be done after the dd to make sure the file was completely flushed out to disk.

dd if=/dev/mtd0 of=mtd0.bin bs=4096k conv=sync
sync

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Dell Wyse 3020
February 09, 2024 06:42PM
Additional sync doesn't change this behaviour:
root@debian:~# dd if=/dev/mtd0 of=mtd0.bin bs=4096k conv=sync ; sync ; gzip mtd0.bin -c | wc
1+0 records in
1+0 records out
4194304 bytes (4.2 MB, 4.0 MiB) copied, 5.95483 s, 704 kB/s
      0       1    4107
root@debian:~# dd if=/dev/mtd0 of=mtd0.bin bs=4096k conv=sync ; sync ; gzip mtd0.bin -c | wc
1+0 records in
1+0 records out
4194304 bytes (4.2 MB, 4.0 MiB) copied, 5.9576 s, 704 kB/s
  11222   67386 3551794
root@debian:~# dd if=/dev/mtd0 of=mtd0.bin bs=4096k conv=sync ; sync ; gzip mtd0.bin -c | wc
1+0 records in
1+0 records out
4194304 bytes (4.2 MB, 4.0 MiB) copied, 6.06864 s, 691 kB/s
      0       1    4107
root@debian:~# dd if=/dev/mtd0 of=mtd0.bin bs=4096k conv=sync ; sync ; gzip mtd0.bin -c | wc
1+0 records in
1+0 records out
4194304 bytes (4.2 MB, 4.0 MiB) copied, 5.99585 s, 700 kB/s
  11222   67386 3551794

EDIT: I was thinking that maybe the flash size is incorrect but I opened top cover and I can see two Winbond chips: 25q32fvsig and 25q80dvsig. From datasheets the first one is 4MB (so it is probably "the one") and the second one is 1MB.

EDIT2: One correction, I wrote that every second time it is all zeros - it is not true, it is all FFs.



Edited 3 time(s). Last edit at 02/11/2024 02:22PM by ksuszka.
Re: Debian on Dell Wyse 3020
February 09, 2024 07:27PM
mmm,

> Thank you, now using this instead:
>
> lsmod | awk '{print $1}' | tail -n +2 >
> /etc/initramfs-tools/modules
> update-initramfs -u
>

I think you only need to add these 2 modules:
pwrseq_emmc
mmc_block

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Dell Wyse 3020
February 09, 2024 07:54PM
@bodhi I've just noticed that I repeatedly misspelled your nick. I sincerely appologize for it. Just an explanation, in polish there is a name spelled "Bohdan" and "bohdi" is a word one could use if he tried to use it in English and make it sound less formal. So I read it that way as it sounded familiar.
Re: Debian on Dell Wyse 3020
February 09, 2024 09:04PM
@mmm I updated my eMMC to kernel 6.5.7 using the method described by bodhi, I added missing modules to /etc/initramfs-tools/modules and then run commands similar to:
KERNEL_VERSION=6.5.7-mvebu-tld-1

# install kernel deb files
dpkg -i linux-*-${KERNEL_VERSION}_1_armhf.deb

# update initramfs - previous command should already perform this, but better safe than sorry
update-initramfs -k ${KERNEL_VERSION} -u

# recreate boot images
cat zImage-${KERNEL_VERSION} dts/mmp3-dell-ariel.dtb > zImage.fdt
mkimage -A arm -O linux -T kernel -C none -a 0x8000 -e 0x8000 -n Linux-${KERNEL_VERSION} -d zImage.fdt uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x3000000 -e 0x3000000 -d initrd.img-${KERNEL_VERSION}  uInitrd

# copy generated images to boot partition
mount /dev/mmcblk0p1 /media/p1
cp uImage uInitrd /media/p1
sync
sync
umount /media/p1

and rebooted the machine.

The first reboot took almost 3 minutes before I could ssh back into to machine, but probably because I already switched to systemd and installed a bunch of services. The next reboot took 40s. But it worked. I've got kernel 6.5.7 booting successfully from eMMC.

EDIT: @mmm an idea - try to uncheck the "Override settings by configuration file" checkbox and force boot from eMMC and see if on the screen you will see that wloader tries to boot using options given in the "Kernel Parameter" field. If I understand correctly how it suppose to work, if this checkbox is checked then wloader.cfg file overrides whatever you entered into those fields. Maybe in your case for some reason it is not able to understand wloader.cfg from eMMC?



Edited 1 time(s). Last edit at 02/09/2024 09:15PM by ksuszka.
Re: Debian on Dell Wyse 3020
February 09, 2024 09:07PM
Is there anything that summarizes the installation process?
Re: Debian on Dell Wyse 3020
February 09, 2024 09:13PM
> @bodhi I've just noticed that I repeatedly
> misspelled your nick. I sincerely appologize for
> it. Just an explanation, in polish there is a name
> spelled "Bohdan" and "bohdi" is a word one could
> use if he tried to use it in English and make it
> sound less formal. So I read it that way as it
> sounded familiar.

It's all good :) hard to keep track of "d" and "h" order in all languages.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Dell Wyse 3020
February 09, 2024 09:29PM
@LegacyObj for running sytem from the flash drive the script prepared by @mmm contains all required steps: https://forum.doozan.com/read.php?2,134563,136664#msg-136664. rootfs package 6.6.2 with kernel 6.5.7 is a combination that seems to work.

However it is highly recommended to connect a serial console to see what is happening as without it if it doesn't start you will not know why.

For booting from eMMC things get complicated. I've managed to do so but it seems I was lucky with the bootloader configuration my terminals came with. Same steps didn't work for @mmm.



Edited 1 time(s). Last edit at 02/09/2024 09:30PM by ksuszka.
Re: Debian on Dell Wyse 3020
February 09, 2024 09:33PM
Thanks! I'm not familiar with hardware much, so I'm sorry this is a really beginner question. There is a serial port on the motherboard. How to connect it?
Re: Debian on Dell Wyse 3020
February 09, 2024 09:46PM
@ksuszka,

> @mmm I updated my eMMC to kernel 6.5.7 using the
> method described by bodhi, I added missing modules
> to /etc/initramfs-tools/modules

Is there other modules needed or just these 2?
pwrseq_emmc
mmc_block
It's would be good to include only what's needed. So I could configure them as builtin modules in the next kernel build if size permitted.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Dell Wyse 3020
February 09, 2024 10:05PM
@bodhi It seems that only mmc_block is required to boot from emmc.

@LegacyObj you need a laptop/PC with USB to UART adapter. They can be bought for less than $1 on aliexpress: https://www.aliexpress.com/w/wholesale-usb-uart-adapter.html. I use the one with CH340G chip. Next you need to open top cover of the Wyse 3020 and connect two pins of CN4502 connector on the motherboard to this adapter. You need to connect GND (pin no 3) on the motherboard to the GND on the adapter and TX on the motherboard (pin no 5) to the RX on the adapter. Optionaly you can also connect RX on the motherboard (pin no 4) to TX on the adapter and you will be able to give commands to the linux (it is not necessary, as when you manage to start the system you will be able to connect to it through ssh). There is a photo and the description of the connector: https://linux-mmp.docs.kernel.org/dell-wyse-3020/connectors.html#cn4502. And here is a video where guy describes the same process for debugging rasberry pi, but it is basically the same for most of consumer electronics nowadays: https://www.youtube.com/watch?v=UpVMO7gbnYM.

When you connect adapter, run some terminal software and boot your Wyse 3020 you should see some info from the booting process - you will know you did it right.

EDIT: I attached a photo of how mine is connected.



Edited 1 time(s). Last edit at 02/10/2024 07:00AM by ksuszka.
Attachments:
open | download - Dell_Wyse_3020_serial_connection.jpg (991.3 KB)
Re: Debian on Dell Wyse 3020
February 10, 2024 01:07AM
> @LegacyObj you need a laptop/PC with USB to UART
> adapter. They can be bought for less than $1 on
> aliexpress:
> https://www.aliexpress.com/w/wholesale-usb-uart-adapter.html.
> I use the one with CH340G chip. Next you need to
> open top cover of the Wyse 3020 and connect two
> pins of CN4502 connector on the motherboard to
> this adapter. You need to connect GND (pin no 3)
> on the motherboard to the GND on the adapter and
> TX on the motherboard (pin no 5) to the RX on the
> adapter. Optionaly you can also connect RX on the
> motherboard (pin no 4) to TX on the adapter and
> you will be able to give commands to the linux (it
> is not necessary, as when you manage to start the
> system you will be able to connect to it through
> ssh). There is a photo and the description of the
> connector:
> https://linux-mmp.docs.kernel.org/dell-wyse-3020/connectors.html#cn4502.
> And here is a video where guy describes the same
> process for debugging rasberry pi, but it is
> basically the same for most of consumer
> electronics nowadays:
> https://www.youtube.com/watch?v=UpVMO7gbnYM.
>
> When you connect adapter, run some terminal
> software and boot your Wyse 3020 you should see
> some info from the booting process - you will know
> you did it right.

Or see here in the Wiki thread about what to buy

Quote

Unbricking with Serial Console & JTAG console

Serial Port connector - what are people using to make it work

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
mmm
Re: Debian on Dell Wyse 3020
February 10, 2024 06:57AM
Quote
ksuszka
> EDIT: @mmm an idea - try to uncheck the "Override
> settings by configuration file" checkbox and force
> boot from eMMC and see if on the screen you will
> see that wloader tries to boot using options given
> in the "Kernel Parameter" field. If I understand
> correctly how it suppose to work, if this checkbox
> is checked then wloader.cfg file overrides
> whatever you entered into those fields. Maybe in
> your case for some reason it is not able to
> understand wloader.cfg from eMMC?

Wloader doesn't allow me to uncheck the box, on a sidenote, what system version in the wloader are you on?

I ordered another box that should come next week, hopefully that one is less fussy.

Edit: I just ran "dd if=/dev/zero of=/dev/mmcblk0 status=progress" and I still get the exact same error message, so I suspect that wloader fails to even read wloader.cfg from my boot partition.



Edited 1 time(s). Last edit at 02/10/2024 07:25AM by mmm.
mmm
Re: Debian on Dell Wyse 3020
February 10, 2024 09:51AM
So a few observations lead me to believe that this is some sort of firmware issue:
1. "Empty URL, try next device" means that Wloader cannot find a device, and this is exactly what happens when I force it to boot from "Harddisk".
2. I don't think this is an issue with my wloader.cfg, as I was actually able to boot from USB without it (by putting the kernel params into wloader)

@ksuszka did your device come with "Citrix Receiver" as well? I took an image of the original eMMC before overwriting it, and I decided to investigate it now:
$ fdisk -l mmcblk0.img 
Disk mmcblk0.img: 3.64 GiB, 3909091328 bytes, 7634944 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device       Boot   Start     End Sectors   Size Id Type
mmcblk0.img1          256 1933311 1933056 943.9M  c W95 FAT32 (LBA)
mmcblk0.img2      1933312 3866623 1933312   944M  c W95 FAT32 (LBA)
mmcblk0.img3 *    3866624 5799935 1933312   944M  c W95 FAT32 (LBA)
mmcblk0.img4      5799936 7634943 1835008   896M  c W95 FAT32 (LBA)
I can't mount partitions 1,2 and 4, I get this error in dmesg: "FAT-fs (loop0): invalid media value (0x00)". Partition 3 does work, but it doesn't have anything useful/interesting on it:
$ tree
.
├── bin
│   └── ica
├── etc
│   ├── ld.so.cache
│   ├── ld.so.conf
│   └── ld.so.conf.d
│       ├── arm-linux-gnueabi.conf
│       └── libc.conf
├── lib
│   ├── arm-linux-gnueabi
│   │   ├── libanl.so.1
│   │   ├── libBrokenLocale.so.1
│   │   ├── libcidn.so.1
│   │   ├── libcrypt.so.1
│   │   ├── libc.so.6
│   │   ├── libdl.so.2
│   │   ├── libgcc_s.so.1
│   │   ├── libgcrypt.so.11
│   │   ├── libglib-2.0.so.0
│   │   ├── libgpg-error.so.0
│   │   ├── libkeyutils.so.1
│   │   ├── libm.so.6
│   │   ├── libnss_db.so.2
│   │   ├── libnss_dns.so.2
│   │   ├── libnss_files.so.2
│   │   ├── libnss_hesiod.so.2
│   │   ├── libpcre.so.3
│   │   ├── libpng12.so.0
│   │   ├── libpthread.so.0
│   │   ├── libresolv.so.2
│   │   ├── librt.so.1
│   │   ├── libselinux.so.1
│   │   ├── libthread_db.so.1
│   │   └── libz.so.1
│   └── ld-linux.so.3
├── pkg
│   └── base.arm.pkg
├── proc
├── sys
└── usr
    ├── bin
    │   ├── mmsv
    │   └── mmsv_dove
    └── lib
        └── arm-linux-gnueabi
            ├── gstreamer-0.10
            │   ├── libgstaudioconvert.so
            │   └── libgstcoreelements.so
            ├── libffi.so.5
            ├── libgio-2.0.so.0
            ├── libglib-2.0.so
            ├── libgmodule-2.0.so
            ├── libgmodule-2.0.so.0
            ├── libgobject-2.0.so
            ├── libgobject-2.0.so.0
            ├── libgstapp-0.10.so.0
            ├── libgstaudio-0.10.so
            ├── libgstaudio-0.10.so.0
            ├── libgstbase-0.10.so
            ├── libgstbase-0.10.so.0
            ├── libgsth264parse.so.0
            ├── libgstinterfaces-0.10.so
            ├── libgstinterfaces-0.10.so.0
            ├── libgstjpeg.so.0
            ├── libgstnetbuffer-0.10.so.0
            ├── libgstpbutils-0.10.so
            ├── libgstpbutils-0.10.so.0
            ├── libgstreamer-0.10.so
            ├── libgstreamer-0.10.so.0
            ├── libgstrtp-0.10.so
            ├── libgstrtp-0.10.so.0
            ├── libgstrtpdemux.so.0
            ├── libgstudp.so.0
            ├── libgstvideo-0.10.so
            ├── libgstvideo-0.10.so.0
            ├── libgstwyse.so.0
            ├── libgstwysevmeta.so.0
            ├── libgthread-2.0.so
            ├── libgthread-2.0.so.0
            ├── libjpeg.so.8
            ├── liborc-0.4.so.0
            ├── libstdc++.so.6
            ├── libtfm.so
            ├── libxml2.so
            └── libxml2.so.2

14 directories, 72 files
Re: Debian on Dell Wyse 3020
February 10, 2024 10:49AM
@mmm I took photos of various pages of WLoader settings on my machine. Unfortunately, there is a limit here to what I can attach so I shared it through google drive: https://photos.app.goo.gl/Hxo3LPDaUAvnLuHU7

I'm not sure what "Citrix Receiver" is so probably I don't have one ;)

The structure of the eMMC looks similar to what I had before erasing it. And if you download ThinOS merlin archive for Wyse 3020 from dell webstie and extract OS_Merlin_v8.6_B013_3020_T10D_ENG\3020_8.6_013_EN.zip file, and next uncompress par1.img file you will get a 4GB file which when you examine with fdisk will have the same structure:
$ fdisk -l par1                                                                                                                                            
Disk par1: 3.64 GiB, 3909091328 bytes, 7634944 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot   Start     End Sectors   Size Id Type
par1p1              256 1933311 1933056 943.9M  c W95 FAT32 (LBA)
par1p2          1933312 3866623 1933312   944M  c W95 FAT32 (LBA)
par1p3     *    3866624 5799935 1933312   944M  c W95 FAT32 (LBA)
par1p4          5799936 7634943 1835008   896M  c W95 FAT32 (LBA)
Re: Debian on Dell Wyse 3020
February 10, 2024 11:08AM
@mmm I just noticed something interesting. When you go to WLoader Boot Order page and you focus on the device there is the URL field at the bottom and it shows if WLoader found a viable partition there. You can see on my screenshot that I've got HardDisk selected and there is "D:/;" on it. On my second box I don't have anything interesting on the eMMC at the moment and this field is empty when HardDisk is selected and I have the same error message about not founding OS on PAR1. When I connect proper flash drive and select USB on the Boot Order page then I can see something in URL field. So basically you can check if WLoader is recognising disk directly from the Boot Order page.
mmm
Re: Debian on Dell Wyse 3020
February 10, 2024 11:20AM
Thank you for the screenshots :).

Seems like I'm on 7.1_216 which has a completely different splash screen, so there are at least some differences. I'll try flashing this unit with OpenFirmware, hopefully the other unit allows me to boot straight out of eMMC as well.
Attachments:
open | download - 20240210_181107-min.jpg (873.8 KB)
mmm
Re: Debian on Dell Wyse 3020
February 10, 2024 11:38AM
Quote
ksuszka
> @mmm I just noticed something interesting. When
> you go to WLoader Boot Order page and you focus on
> the device there is the URL field at the bottom
> and it shows if WLoader found a viable partition
> there. You can see on my screenshot that I've got
> HardDisk selected and there is "D:/;" on it. On my
> second box I don't have anything interesting on
> the eMMC at the moment and this field is empty
> when HardDisk is selected and I have the same
> error message about not founding OS on PAR1. When
> I connect proper flash drive and select USB on the
> Boot Order page then I can see something in URL
> field. So basically you can check if WLoader is
> recognising disk directly from the Boot Order
> page.

Hm, that's definitely good to know. After I did this:

root@debian:~# fdisk -l /dev/mmcblk0
Disk /dev/mmcblk0: 3.64 GiB, 3909091328 bytes, 7634944 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device         Boot   Start     End Sectors   Size Id Type
/dev/mmcblk0p1          256 1933311 1933056 943.9M  c W95 FAT32 (LBA)
/dev/mmcblk0p2      1933312 3866623 1933312   944M  c W95 FAT32 (LBA)
/dev/mmcblk0p3 *    3866624 5799935 1933312   944M  c W95 FAT32 (LBA)
/dev/mmcblk0p4      5799936 7634943 1835008   896M  c W95 FAT32 (LBA)
root@debian:~# fdisk /dev/mmcblk0 

Welcome to fdisk (util-linux 2.38.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): d
Partition number (1-4, default 4): 

Partition 4 has been deleted.

Command (m for help): d
Partition number (1-3, default 3): 

Partition 3 has been deleted.

Command (m for help): d
Partition number (1,2, default 2): 

Partition 2 has been deleted.

Command (m for help): d
Selected partition 1
Partition 1 has been deleted.

Command (m for help): 


Command (m for help): n
Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1):  
First sector (2048-7634943, default 2048): 
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-7634943, default 7634943): +100M

Created a new partition 1 of type 'Linux' and of size 100 MiB.

Command (m for help): t
Selected partition 1
Hex code or alias (type L to list all): c
Changed type of partition 'Linux' to 'W95 FAT32 (LBA)'.

Command (m for help): n
Partition type
   p   primary (1 primary, 0 extended, 3 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (2-4, default 2): 
First sector (206848-7634943, default 206848): 
Last sector, +/-sectors or +/-size{K,M,G,T,P} (206848-7634943, default 7634943): 

Created a new partition 2 of type 'Linux' and of size 3.5 GiB.

Command (m for help): p
Disk /dev/mmcblk0: 3.64 GiB, 3909091328 bytes, 7634944 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device         Boot  Start     End Sectors  Size Id Type
/dev/mmcblk0p1        2048  206847  204800  100M  c W95 FAT32 (LBA)
/dev/mmcblk0p2      206848 7634943 7428096  3.5G 83 Linux

Command (m for help): a
Partition number (1,2, default 2): 1

The bootable flag on partition 1 is enabled now.

Command (m for help): p
Disk /dev/mmcblk0: 3.64 GiB, 3909091328 bytes, 7634944 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device         Boot  Start     End Sectors  Size Id Type
/dev/mmcblk0p1 *      2048  206847  204800  100M  c W95 FAT32 (LBA)
/dev/mmcblk0p2      206848 7634943 7428096  3.5G 83 Linux

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

root@debian:~# mount /dev/sdb1 /mnt
root@debian:~# ls /dev/sdb1
/dev/sdb1
root@debian:~# ls /mnt      
.                         linux-6.5.7-mvebu-tld-1.patch                uImage                    zImage.fdt
..                        linux-dtb-6.5.7-mvebu-tld-1.tar              uInitrd
config-6.5.7-mvebu-tld-1  linux-headers-6.5.7-mvebu-tld-1_1_armhf.deb  wloader.cfg
dts                       linux-image-6.5.7-mvebu-tld-1_1_armhf.deb    zImage-6.5.7-mvebu-tld-1
root@debian:~# mkfs.fat /dev/mmcblk0p1 
mkfs.fat 4.2 (2021-01-31)
root@debian:~# mkfs.ext3 /dev/mmcblk0p2 
mke2fs 1.47.0 (5-Feb-2023)
Discarding device blocks: done                            
Creating filesystem with 928512 4k blocks and 232464 inodes
Filesystem UUID: c68a338e-daf3-4fae-8409-fed6774570cf
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912, 819200, 884736

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done 

root@debian:~# lsblk
NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
sda            8:0    1    0B  0 disk 
sdb            8:16   1  7.3G  0 disk 
|-sdb1         8:17   1   64M  0 part /mnt
`-sdb2         8:18   1  7.2G  0 part /
mtdblock0     31:0    0    4M  0 disk 
mmcblk0      179:0    0  3.6G  0 disk 
|-mmcblk0p1  179:1    0  100M  0 part 
`-mmcblk0p2  179:2    0  3.5G  0 part 
mmcblk0boot0 179:8    0    4M  1 disk 
mmcblk0boot1 179:16   0    4M  1 disk 
root@debian:~# mount /dev/mmcblk0p1 /me^C   
root@debian:~# mkdir /run/media/p1
mkdir: cannot create directory '/run/media/p1': No such file or directory
root@debian:~# mkdir -p /run/media/p1
root@debian:~# mount /dev/mmcblk0p1 /run/media/p1/
root@debian:~# lsblk               
NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
sda            8:0    1    0B  0 disk 
sdb            8:16   1  7.3G  0 disk 
|-sdb1         8:17   1   64M  0 part /mnt
`-sdb2         8:18   1  7.2G  0 part /
mtdblock0     31:0    0    4M  0 disk 
mmcblk0      179:0    0  3.6G  0 disk 
|-mmcblk0p1  179:1    0  100M  0 part /run/media/p1
`-mmcblk0p2  179:2    0  3.5G  0 part 
mmcblk0boot0 179:8    0    4M  1 disk 
mmcblk0boot1 179:16   0    4M  1 disk 
root@debian:~# cp /mnt/wloader.cfg /mnt/uImage /mnt/uInitrd /run/media/p1/
root@debian:~# ls /run/media/p1/
.  ..  uImage  uInitrd  wloader.cfg
root@debian:~# umount /run/media/p1
root@debian:~# sync
root@debian:~# sync
root@debian:~# sync
root@debian:~# umount /mnt
root@debian:~# shutdown -h now

I just get an empty URL on the Boot Order page when I select "HardDisk". Do you think that might have something to with my partitioning?
Re: Debian on Dell Wyse 3020
February 10, 2024 12:10PM
I used the first part of your original script on /dev/mmcblk0 device in my machine. I needed to alter it a little bit as there is an additional p letter before partition number. After that I noticed that your script doesn't set boot flag, but even without it when I rebooted machine and opened Boot Order page and select HardDisk then I can see URL field filled. I didn't even put any files on those partitions, just repartitioned mmc with your script and it was enough for WLoader on my machine to recognize the boot partition.

So it is not that you are doing something else than me. Probably there is some difference in your version of the boot loader.

I think there is an official procedure to update boot loader but it seems like a lot of hassle. I recall I read somewhere that somebody used old version of Dell management suite app for thin clients to generate "upgrade" flash drive with the newer firmaware from the dell website.



Edited 1 time(s). Last edit at 02/10/2024 12:12PM by ksuszka.
Re: Debian on Dell Wyse 3020
February 10, 2024 12:30PM
@mmm additional thing that comes to my mind. Can you check what do you have in mmcblk0boot0/mmcblk0boot1 partitions? maybe their content confuses WLoader? As far as I can tell mine are completely empty (filled with zeros)

root@debian:~# dd if=/dev/mmcblk0boot0 bs=4096k conv=sync | gzip -c | wc
1+0 records in
1+0 records out
4194304 bytes (4.2 MB, 4.0 MiB) copied, 0.37388 s, 11.2 MB/s
      0       1    4098
root@debian:~# dd if=/dev/mmcblk0boot1 bs=4096k conv=sync | gzip -c | wc
1+0 records in
1+0 records out
4194304 bytes (4.2 MB, 4.0 MiB) copied, 0.344546 s, 12.2 MB/s
      0       1    4098
Re: Debian on Dell Wyse 3020
February 10, 2024 01:39PM
@mmm yet another idea to try, reset to zero state and move by small incremental changes:
- revert to previous content of mmc and reset WLoader to boot whatever was previous there, make sure that ThinOS or whathever you had starts
- open Boot Order page and select HardDisk and check if URL field is populated (should be)
- go to Setting, set Kernel Image to uImage and force reboot to force switch to linux mode
- open Boot Order page again and select HardDIsk and check if still URL field is populated
- boot debian from the flash drive, but instaed of clearing whole eMMC, mount boot FAT partition and clear its context
- reset machine, open Boot Order page again and select HardDIsk and check if still URL field is populated
- boot debian from the flash drive, copy uImage, uInitrd, wloader.cfg to FAT partition you emptied earlier
- reset machine, open Boot Order page again and select HardDIsk and check if still URL field is populated
- boot from eMMC and see what happens

So basically the idea is to start with the state where machine is booting from eMMC and apply incremental changes and see when it stops to work.

EDIT: I just noticed that information about partitions discovered by WLoader is also present on the Event Log page, even with the partition type and size "D: registered, type 0xc, size 64MB"



Edited 3 time(s). Last edit at 02/10/2024 02:10PM by ksuszka.
mmm
Re: Debian on Dell Wyse 3020
February 10, 2024 02:11PM
Quote
ksuszka
> @mmm additional thing that comes to my mind. Can
> you check what do you have in
> mmcblk0boot0/mmcblk0boot1 partitions? maybe their
> content confuses WLoader? As far as I can tell
> mine are completely empty (filled with zeros)
>
>
> root@debian:~# dd if=/dev/mmcblk0boot0 bs=4096k
> conv=sync | gzip -c | wc
> 1+0 records in
> 1+0 records out
> 4194304 bytes (4.2 MB, 4.0 MiB) copied, 0.37388 s,
> 11.2 MB/s
>       0       1    4098
> root@debian:~# dd if=/dev/mmcblk0boot1 bs=4096k
> conv=sync | gzip -c | wc
> 1+0 records in
> 1+0 records out
> 4194304 bytes (4.2 MB, 4.0 MiB) copied, 0.344546
> s, 12.2 MB/s
>       0       1    4098
> 

root@debian:~# dd if=/dev/mmcblk0boot0 | hexdump -C
00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00400000
8192+0 records in
8192+0 records out
4194304 bytes (4.2 MB, 4.0 MiB) copied, 0.258027 s, 16.3 MB/s
root@debian:~# dd if=/dev/mmcblk0boot1 | hexdump -C
00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00400000
8192+0 records in
8192+0 records out
4194304 bytes (4.2 MB, 4.0 MiB) copied, 0.26969 s, 15.6 MB/s

Just zeros as well.

Quote
ksuszka
> @mmm yet another idea to try, reset to zero state
> and move by small incremental changes:
> - revert to previous content of mmc and reset
> WLoader to boot whatever was previous there, make
> sure that ThinOS or whathever you had starts
> - open Boot Order page and select HardDisk and
> check if URL field is populated (should be)
> - go to Setting, set Kernel Image to uImage and
> force reboot to force switch to linux mode
> - open Boot Order page again and select HardDIsk
> and check if still URL field is populated
> - boot debian from the flash drive, but instaed of
> clearing whole eMMC, mount boot FAT partition and
> clear its context
> - reset machine, open Boot Order page again and
> select HardDIsk and check if still URL field is
> populated
> - boot debian from the flash drive, copy uImage,
> uInitrd, wloader.cfg to FAT partition you emptied
> earlier
> - reset machine, open Boot Order page again and
> select HardDIsk and check if still URL field is
> populated
> - boot from eMMC and see what happens
>
> So basically the idea is to start with the state
> where machine is booting from eMMC and apply
> incremental changes and see when it stops to work.

I did recover it like you described already, and If I rember correctly once i switched into linux mode in wloader i got the "Empty URL" error when manually selecting the "HardDisk" with the previous software still installed there. I'm going to check again if the URL was populated before and after switching modes once dd is done copying the old image again.
mmm
Re: Debian on Dell Wyse 3020
February 10, 2024 03:14PM
After restoring the eMMC and resetting the device to factory settings, the "HardDisk" url is empty and when I force boot from it (in WTOS mode) I just get "Hard Disk failed, try next device...". After switching to Linux mode, i just get "Empty URL", so sadly it seems like that's not going to work with this firmware.

On a sidenote, I tried flashing the SPI with both flashcp and with mtd_debug, but I just couldn't get it to work. Reading the SPI doesn't seem particularly reliable as we know already as well, so I'm not sure what to do about that now.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: