Welcome! Log In Create A New Profile

Advanced

OpenWrt on Promwad ThinClient (aka Depo Sky A60) (aka AK Systems AK1100)

Posted by cmp18 
OpenWrt on Promwad ThinClient (aka Depo Sky A60) (aka AK Systems AK1100)
December 22, 2024 10:40AM
OpenWRT with official OpenWRT kernel (kmod packages are working).
Rootfs - UBIFS.

ATTENTION:
The official openwrt kernel config for kirkwood is without HIGHMEM, therefore, only 768Mb of RAM is visible.


Link (images and howto)


Issues:
-usb not working (dtb problems)
-sound and dvi also not working (drivers)


!DO NOT FLASH OTHER DEVICES!
this UBIFS only for the NAND flash of this device (Samsung 1Gb)


__________________________________________
if you want to compile it yourself, there is an excellent instruction, very detailed and with a description of many nuances. You need to select a similar device (cisco on 100 in our case), and replace the dtb with your own.


or,
if you are satisfied with everything by default, we will create a uImage and rootfs for our device based on the firmware from a similar device, like this:

me@pc:~/tmpdir$ wget https://downloads.openwrt.org/releases/23.05.5/targets/kirkwood/generic/openwrt-23.05.5-kirkwood-generic-cisco_on100-squashfs-sysupgrade.bin

me@pc:~/tmpdir$ tar xf openwrt-23.05.5-kirkwood-generic-cisco_on100-squashfs-sysupgrade.bin 

me@pc:~/tmpdir$ cd sysupgrade-cisco_on100/

#find out where the uImage header and FTD are in order to delete
me@pc:~/tmpdir/sysupgrade-cisco_on100$ binwalk kernel 

DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------
0             0x0             uImage header, header size: 64 bytes, header CRC: 0xF503333B, created: 2024-09-23 12:34:46, image size: 2791120 bytes, Data Address: 0x8000, Entry Point: 0x8000, data CRC: 0x62DCBA0C, OS: Linux, CPU: ARM, image type: OS Kernel Image, compression type: none, image name: "ARM OpenWrt Linux-5.15.167"
64            0x40            Linux kernel ARM boot executable zImage (little-endian)
30160         0x75D0          xz compressed data
30652         0x77BC          xz compressed data
2779640       0x2A69F8        Flattened device tree, size: 11544 bytes, version: 17

me@pc:~/tmpdir/sysupgrade-cisco_on100$ dd if=kernel of=zImage-baddtb bs=64 skip=1

me@pc:~/tmpdir/sysupgrade-cisco_on100$binwalk zImage-baddtb

DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------
0             0x0             Linux kernel ARM boot executable zImage (little-endian)
30096         0x7590          xz compressed data
30588         0x777C          xz compressed data
2779576       0x2A69B8        Flattened device tree, size: 11544 bytes, version: 17

me@pc:~/tmpdir/sysupgrade-cisco_on100$ dd if=zImage-baddtb of=zImage bs=2779576 count=1


#make uImage with our FDT
me@pc:~/tmpdir/sysupgrade-cisco_on100$ cat kirkwood-promwad-thin-client.dtb >> zImage
me@pc:~/tmpdir/sysupgrade-cisco_on100$ mkimage -A arm -O linux -T kernel -C none -a 0x8000 -e 0x8000 -n Linux-5.15.167-1 -d zImage uImage5.15.167-1

#we need to be root when creating a rootfs so that there are no permissions issues
me@pc:~/tmpdir/sysupgrade-cisco_on100$ sudo -s

root@pc:/home/me/tmpdir/sysupgrade-cisco_on100# unsquashfs root

#enable ttyS0 console for login and shell
root@pc:/home/me/tmpdir/sysupgrade-cisco_on100# echo 'ttyS0::askfirst:/usr/libexec/login.sh' >> squashfs-root/etc/inittab


#set general ubi parametrs
root@pc:/home/me/tmpdir/sysupgrade-cisco_on100# echo '[ubifs]' > ubinize.cfg; echo 'mode=ubi' >> ubinize.cfg;  echo 'image=ow.tmp' >> ubinize.cfg; echo 'vol_id=0' >> ubinize.cfg; echo 'vol_size=900MiB' >> ubinize.cfg; echo 'vol_type=dynamic' >> ubinize.cfg; echo 'vol_name=rootfs' >> ubinize.cfg ;echo 'vol_flags=autoresize' >> ubinize.cfg

#set nand parametrs
#erase block, page, and subpage parameters are taken from the nand flash datasheet
#logical UBI block parameters calculated according to the formula, and matches the value in the stock firmware
#the count of logical UBIFS blocks is calculated for the UBIFS size of 900M
root@pc:/home/me/tmpdir/sysupgrade-cisco_on100# mkfs.ubifs -q -r squashfs-root/ -m 2048 -e 129024 -c 8191 -o ow.tmp
root@pc:/home/me/tmpdir/sysupgrade-cisco_on100# ubinize -o ow23.05.5.ubi -m 2048 -p 128KiB -s 512 ubinize.cfg


root@pc:/home/me/tmpdir/sysupgrade-cisco_on100# chown me.me ow23.05.5.ubi uImage5.15.167-1



Edited 18 time(s). Last edit at 01/01/2025 11:56PM by cmp18.
Re: OpenWrt on Promwad ThinClient (aka Depo Sky A60) (aka AK Systems AK1100)
December 22, 2024 05:21PM
cmp18,

Do you have any instruction for people to do it on their own? or at least the log of how did you do it?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
MM
Re: OpenWrt on Promwad ThinClient (aka Depo Sky A60) (aka AK Systems AK1100)
December 23, 2024 01:09PM
cmp18,

Thanks for 'howto' and OpenWrt build!

Unfortunately i got ECC error in NAND blocks at mtd2 (rootfs):

[    1.582382] ubi0: attaching mtd2
[    1.585798] ecc_sw_hamming_correct: uncorrectable ECC error
[    1.591403] ubi0 warning: 0xc04c5004: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read only 64 bytes, retry
[    1.602995] ecc_sw_hamming_correct: uncorrectable ECC error
[    1.608598] ubi0 warning: 0xc04c5004: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read only 64 bytes, retry
[    1.619790] ecc_sw_hamming_correct: uncorrectable ECC error
[    1.625395] ubi0 warning: 0xc04c5004: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read only 64 bytes, retry
[    1.636592] ecc_sw_hamming_correct: uncorrectable ECC error
[    1.642197] ubi0 error: 0xc04c503c: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read 64 bytes

bad blocks table:
Marvell>> nand bad

Device 0 bad blocks:
  003a0000
  00600000
  067e0000
  08f00000
  0d0c0000
  14200000
  33e00000
  37860000
  39cc0000


log in attach


another one Thin Client is ordered)
Attachments:
open | download - nand error.txt (17.5 KB)
Re: OpenWrt on Promwad ThinClient (aka Depo Sky A60) (aka AK Systems AK1100)
December 24, 2024 04:32AM
bodhi,

I updated the first post.




MM,

badblocks are normal, even on new NAND there may be about 20 badblocks (and this is not a manufacturing defect).
badblocks in the rootfs (UBIFS) are not critical (UBIFS was specially made for NAND and knows how to work with badblocks). so don't worry about bad blocks in the rootfs.

But you have another problem - there are blocks in the kernel partition:
003a0000 (3801088) = at 3712 KiB (at 3,625 MiB)
00600000 (6291456) = at 6144 KiB (at 6 MiB)

This is critical, but it can also be fixed.
(by creating bad partition, like this:
0M-1M U-Boot
1M-10M badblocks
10M-20M kernel
20M-..M rootfs)


To do this, flash THIS device according to THESE instructions so that everything works:


connect to the u-boot console, and execute the commands:

setenv serverip 192.168.10.1; setenv ipaddr 192.168.10.10; nand erase.chip;

mw.b 0x06400000 00 0x100000
tftp 0x06400000 thinclient-u-boot.kwb
nand write 0x06400000 0x0 0x100000

tftp 0x06400000 uImage5.15.167-1
nand write.e 0x06400000 0xA00000 0xA00000

tftp 0x06400000 ow23.05.5.ubi
nand write.e 0x06400000 0x1400000 0xA00000

reset

(there will be a double start for setting default envs)


terminate boot, and enter the commands to u-boot console:

set x_bootcmd_kernel_rcvr; set x_bootargs_root_rcvr; set bootcmd_rcvr;

setenv serverip 192.168.10.1; setenv ipaddr 192.168.10.10;

set bootcmd 'setenv bootargs ${x_bootargs} ${x_bootargs_root}; run x_bootcmd_kernel; bootm 0x6400000;'

set x_bootargs console=ttyS0,115200 loglevel=9 mtdparts=orion_nand:1M(U-Boot),9M(badblocks),10M(uImage),-(ubipart) earlyprintk=serial

set x_bootargs_root ubi.mtd=3 ubi.block=0,rootfs root=/dev/ubiblock0_0

set x_bootcmd_kernel nand read.e 0x06400000 0xA00000 0xA00000

saveenv; reset;



Edited 2 time(s). Last edit at 12/24/2024 04:35AM by cmp18.
MM
Re: OpenWrt on Promwad ThinClient (aka Depo Sky A60) (aka AK Systems AK1100)
December 24, 2024 11:58AM
cmp18,

thanks so much!


BusyBox v1.36.1 (2024-09-23 12:34:46 UTC) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt 23.05.5, r24106-10cc5fcd00
 -----------------------------------------------------
root@OpenWrt:/#

+1 OpenWrt box is Up)



Edited 1 time(s). Last edit at 12/24/2024 12:02PM by MM.
Re: OpenWrt on Promwad ThinClient (aka Depo Sky A60) (aka AK Systems AK1100)
December 24, 2024 10:10PM
MM

cool)

more about ecc errors: it also sometimes happens that ecc errors appear when partitions are partially overwritten from uboot (for example, only the kernel, or only rootfs), so, it would be good to erase full nand chip first before flashing anything from uboot (as written at the beginning of the instructions)
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: