Welcome! Log In Create A New Profile

Advanced

Debian on TBS2921 MOI+

Posted by ri8 
ri8
Re: Debian on TBS2921 MOI+
November 20, 2024 07:49AM
bodhi,

reinstal rootfs,
6.11.6 etc
boots normally
apt-get update -> OK
and then
apt-get install xyz
complaining about glibc 2.38
the same after reboot, now without network
r.
alex
Attachments:
open | download - apt-get_err.txt (683 bytes)
Re: Debian on TBS2921 MOI+
November 20, 2024 01:08PM
Alex,

> reinstal rootfs,
> 6.11.6 etc
> boots normally
> apt-get update -> OK

> and then
> apt-get install xyz
> complaining about glibc 2.38
> the same after reboot, now without network

No idea. It could be something you did to apt sources? or DKMS.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
ri8
Re: Debian on TBS2921 MOI+
November 20, 2024 03:22PM
bodhi,

another:

root@debian:/usr/src/linux-headers-6.11.6-kirkwood-tld-1# make scripts
SYNC include/config/auto.conf.cmd
can't find file Kconfig
make[3]: *** [scripts/kconfig/Makefile:85: syncconfig] Error 1
make[2]: *** [Makefile:681: syncconfig] Error 2
make[1]: *** [/usr/src/linux-headers-6.11.6-kirkwood-tld-1/Makefile:782: include/config/auto.conf.cmd] Error 2
make: *** [Makefile:224: __sub-make] Error 2
root@debian:/usr/src/linux-headers-6.11.6-kirkwood-tld-1#

r.alex
ri8
Re: Debian on TBS2921 MOI+
November 21, 2024 08:58AM
bodhi,

compiled with dkms
8188eu driver , version 5.13.5
depmod
modprobe ok -> no complains
lsmod -> listed
ip link -> not listed

Now, a silly question;-)
Before you 've made that beautiful
u-boot, eth0 was also not listed
with ip link isn't is the same way
with wireless chip, and something
have to be activated throu the u-boot first?

Regards.
alex
Re: Debian on TBS2921 MOI+
November 21, 2024 12:22PM
Alex,

> Before you 've made that beautiful
> u-boot, eth0 was also not listed
> with ip link isn't is the same way
> with wireless chip, and something
> have to be activated throu the u-boot first?

Actually u-boot has nothing to do with helping the Ethernet or Wifi network connection in Linux.

It only seems that way because the way I was troubleshooting the problem. I wrote this u-boot because you could not find a backup file or u-boot GPL source code.

In Linux, the Ethernet network link was flip-floping up/down, so I was not sure we have the correct settings. But once we have u-boot network running at 1Gbs, I knew the Linux settings are correct.

The mainline Linux driver mv643xx_eth has never been seen running with this 88E1516 chip. So it might have some auto-negotiation problem (the symptom was it was continously trying to negotiate 1Gbs and failed back to 100Mbs). Turning off the auto-negotiation in Linux has kept the link stable at 1Gbs.

U-Boot has no driver for this wifi chip, so we could not bring it up. But in Linux, if the correct wifi driver is running, it should be able to bring it up without problem.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on TBS2921 MOI+
November 21, 2024 05:57PM
compiled with dkms 
8188eu driver , version 5.13.5 
depmod 
modprobe ok -> no complains 
lsmod -> listed 
ip link -> not listed

Did you try to bring up all network?
ifup -a
Is wlan0 in /etc/network/interfaces?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
ri8
Re: Debian on TBS2921 MOI+
November 22, 2024 03:53AM
bodhi,

(uboot has nothing to do with...)
strange: it were not before you posted
uboot for moi_plus, that eth0 showed up in it;
exactly , that was the reason, i've posted for the first
time to this forum;
but, as to 8188 - some output there
and, 8188eu don't load at boot

Regards,
alex

root@debian:~# lsmod
Module Size Used by
8188eu 1134592 0
tls 77824 0
cfg80211 872448 1 8188eu
rfkill 28672 1 cfg80211
sg 28672 0
kirkwood_thermal 12288 0
orion_wdt 12288 0
marvell_cesa 36864 0
fixed 16384 0
uio_pdrv_genirq 16384 0
uio 20480 1 uio_pdrv_genirq
root@debian:~#
oot@debian:~# ls -l /lib/firmware/rtlwifi/rtl8188*
-rw-r--r-- 1 root root 11216 May 1 2023 /lib/firmware/rtlwifi/rtl8188efw.bin
-rw-r--r-- 1 root root 13904 May 1 2023 /lib/firmware/rtlwifi/rtl8188eufw.bin
-rw-r--r-- 1 root root 21020 Nov 21 23:54 /lib/firmware/rtlwifi/rtl8188fufw.bin

root@debian:~# dkms status
Deprecated feature: REMAKE_INITRD (/var/lib/dkms/8188eu/5.3.9/source/dkms.conf)
8188eu/4.1.4_6773: added
8188eu/5.3.9, 6.11.6-kirkwood-tld-1, armv5tel: installed

root@debian:~# ifup -a
root@debian:~# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.1.222 netmask 255.255.255.0 broadcast 10.0.1.255
inet6 fe80::222:abff:fe80:52d prefixlen 64 scopeid 0x20<link>
inet6 fd00::222:abff:fe80:52d prefixlen 64 scopeid 0x0<global>
inet6 fd14:3148:f28f:4:222:abff:fe80:52d prefixlen 64 scopeid 0x0<global>
ether 00:22:ab:80:05:2d txqueuelen 1000 (Ethernet)
RX packets 53620 bytes 54245291 (51.7 MiB)
RX errors 0 dropped 7001 overruns 0 frame 0
TX packets 17785 bytes 2758921 (2.6 MiB)
TX errors 0 dropped 7 overruns 0 carrier 0 collisions 0
device interrupt 31

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 15 bytes 1974 (1.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 15 bytes 1974 (1.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

(arg:
root@debian:~# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
link/ether 00:22:ab:80:05:2d brd ff:ff:ff:ff:ff:ff
root@debian:~#
var/lib/dkms/8188eu/5.3.9/
|-- 6.11.6-kirkwood-tld-1
| `-- armv5tel
| |-- log
| | `-- make.log
| `-- module
| `-- 8188eu.ko.xz
`-- source -> /usr/src/8188eu-5.3.9

6 directories, 2 files
root@debian:~#
Attachments:
open | download - modinfo_rtl8188eu.txt (6.5 KB)
ri8
Re: Debian on TBS2921 MOI+
November 22, 2024 04:26AM
bodhi,

besides, direct after reboot
manually modprobe with this output
in dmesg:
as it seems, can't find the right firmware

Regards,
alex
oot@debian:~# dmesg|tail -10
[ 42.645631] mv643xx_eth_port mv643xx_eth_port.0 eth0: link down
[ 42.653111] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[ 43.598589] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[ 82.720404] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 82.861253] Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 82.869578] Loaded X.509 cert 'wens: 61c038651aabdcf94bd0ac7ff06c7248db18c600'
[ 82.908330] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 82.918715] cfg80211: failed to load regulatory.db
[ 83.132043] 8188eu: loading out-of-tree module taints kernel.
[ 83.150947] usbcore: registered new interface driver 8188eu
root@debian:~# dmesg|grep 8188
[ 83.132043] 8188eu: loading out-of-tree module taints kernel.
[ 83.150947] usbcore: registered new interface driver 8188eu
Attachments:
open | download - modprobe_8188eu_after_reboot.txt (602 bytes)
Re: Debian on TBS2921 MOI+
November 22, 2024 01:48PM
Alex,

Perhaps you need to
apt-get update
If it does not work, back up your USB rootfs, and upgrade to the latest Debian release.
apt-get upgrade

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
ri8
Re: Debian on TBS2921 MOI+
November 26, 2024 11:01AM
bodh,

the old compile tree from tbs
compiles smoothly on x86_64
with 4.9 gcc
i've managed to extract
also a rootfs tree for the box
from their update archive
would it be possible to
boot the board with your dtb and u-boot loader?
there is uImage generated on compile,
as well as zImage, and initramfs. is also generated
(for mtd, i suppose;-)
Regards
alex
Re: Debian on TBS2921 MOI+
November 26, 2024 01:00PM
Alex,

> the old compile tree from tbs
> compiles smoothly on x86_64
> with 4.9 gcc
> i've managed to extract
> also a rootfs tree for the box
> from their update archive

Nice work!

> would it be possible to
> boot the board with your dtb and u-boot loader?

Not possible. The stock kernel is very old. I think it is 2.6.35 or something like that, so DTB will not work.

You might be able to boot the uImage, though. But without seeing the stock u-boot envs, it will be trial and error. It's worth a try to see stock OS running and browse around to see what is the booting behavior for Ethernet and Wifi.

Recall the first time you boot Debian on this box here with the setenvs in serial console. You should try booting this stock uImage like that.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
ri8
Re: Debian on TBS2921 MOI+
November 26, 2024 02:43PM
bodhi,

thanks for encouraging me:-)
You now, its in fact, kinda
fascinating to chroot ash on
it, and looking around, what 's
have been made- like to break
occasionally in a old house,
where someone for ages leaved.
So, i discovered, there is a the
directory in /lib/firmware/RTL8192SU with
firmware binary within; i recall now, by very
first compilation for RTL8188EUS, which is the
chip, after modprobe .kernel complained about
8192_pci.ko not being there;
having had it booted 'd show some other things, for sure-
I tried, but it stops after the kernel being loaded,
because uIinitrd has no dtb in it, pointing to some
drive, right? You see, i would'n know where to start
with those guessing on the bootargs;
Regards,
Alex
Re: Debian on TBS2921 MOI+
November 26, 2024 03:20PM
Alex,

> You now, its in fact, kinda
> fascinating to chroot ash on
> it, and looking around, what 's
> have been made- like to break
> occasionally in a old house,
> where someone for ages leaved.

Yeah :) sometime you see the specific info how the owner built the entry (see below).

> So, i discovered, there is a the
> directory in /lib/firmware/RTL8192SU with
> firmware binary within; i recall now, by very
> first compilation for RTL8188EUS, which is the
> chip, after modprobe .kernel complained about
> 8192_pci.ko not being there;

Interesting! Here is the list of 8192 modules in the kernel.

# find /lib/modules/6.11.6-kirkwood-tld-1/kernel/ -name '*rtl*8192*.ko*'
/lib/modules/6.11.6-kirkwood-tld-1/kernel/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/rtl8192ee.ko.xz
/lib/modules/6.11.6-kirkwood-tld-1/kernel/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/rtl8192ce.ko.xz
/lib/modules/6.11.6-kirkwood-tld-1/kernel/drivers/net/wireless/realtek/rtlwifi/rtl8192d/rtl8192d-common.ko.xz
/lib/modules/6.11.6-kirkwood-tld-1/kernel/drivers/net/wireless/realtek/rtlwifi/rtl8192du/rtl8192du.ko.xz
/lib/modules/6.11.6-kirkwood-tld-1/kernel/drivers/net/wireless/realtek/rtlwifi/rtl8192de/rtl8192de.ko.xz
/lib/modules/6.11.6-kirkwood-tld-1/kernel/drivers/net/wireless/realtek/rtlwifi/rtl8192se/rtl8192se.ko.xz
/lib/modules/6.11.6-kirkwood-tld-1/kernel/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/rtl8192cu.ko.xz
/lib/modules/6.11.6-kirkwood-tld-1/kernel/drivers/net/wireless/realtek/rtlwifi/rtl8192c/rtl8192c-common.ko.xz

> having had it booted 'd show some other things,
> for sure-
> I tried, but it stops after the kernel being
> loaded,
> because uIinitrd has no dtb in it, pointing to
> some
> drive, right?

No, the DTB should either be load separately in the new u-boot you have installed, or must be appended to uImage when booting with stock u-boot.

The initrd is for extra modules, and it deals with the rootfs mounting, eg. root=LABEL=rootfs. And there are other info in it. But not the DTB.

>You see, i would'n know where to
> start
> with those guessing on the bootargs;

It's very difficult to do without a stock boot log and/or stock u-boot envs. So perhaps just chroot into that rootfs and find any script at /root folder, /etc/rc.local.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
ri8
Re: Debian on TBS2921 MOI+
November 26, 2024 03:21PM
so, something like than
over mtd0
or it is a fdt file , binary , in /sys/firmware
Regards,
alex
Attachments:
open | download - fdt (12 KB)
Re: Debian on TBS2921 MOI+
November 26, 2024 04:55PM
Alex,

> so, something like than
> over mtd0
> or it is a fdt file , binary , in /sys/firmware

That's a good find. I decompiled this FDT
# dtc -I dtb -O dts -o fdt.dts fdt
and attached the DTS here.

It confirmed what we already done for this box regarding Ethernet. As usual, Wifi is not needed in the DTS.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Attachments:
open | download - fdt.dts (13.1 KB)
ri8
Re: Debian on TBS2921 MOI+
December 01, 2024 01:53AM
bodhi,

with that dts compiled,
i'm able to bring the box up into stock rootfs
with all possible combination of
debian and stock uInitrd and uEnv.txt
(where i have the different paths for
stock and your dtb), - but stock uImage;
i have no output after stock uImage loads,
and there is no network activity on an
address i put in etc-network- interfaces
obviously, i have to recompile the sources
with another configuration if i were about to
boot into old rootfs.
Now, i 'm cross_compiling tbs-sources with
make defconfig mv_kw_gw_defconfig,
as
make help
of their suggests;
i have to boot manually after setting temporarily scan_disk to none,
throu the loop - usb boot - reboot - sata-boot, and all combinations
are working, as i said, but if putting stock uImage in place on that sda4 sata
partitiong, where stock rootfs lives

Regards, alex
Attachments:
open | download - printenv_moiplus_sda3_usb_sda4_boot.txt (5 KB)
ri8
Re: Debian on TBS2921 MOI+
December 01, 2024 05:02AM
bodhi,

i found also this file

is it poss. to get a mtd layout from?

Regards, alex
Attachments:
open | download - dump.mtd0.xz (201.3 KB)
Re: Debian on TBS2921 MOI+
December 01, 2024 02:43PM
Alex,

> with that dts compiled,
> i'm able to bring the box up into stock rootfs
> with all possible combination of
> debian and stock uInitrd and uEnv.txt
> (where i have the different paths for
> stock and your dtb), - but stock uImage;
> i have no output after stock uImage loads,
> and there is no network activity on an
> address i put in etc-network- interfaces
> obviously, i have to recompile the sources
> with another configuration if i were about to
> boot into old rootfs.
> Now, i 'm cross_compiling tbs-sources with
> make defconfig mv_kw_gw_defconfig,
> as
> make help
> of their suggests;
> i have to boot manually after setting temporarily
> scan_disk to none,
> throu the loop - usb boot - reboot - sata-boot,
> and all combinations
> are working, as i said, but if putting stock
> uImage in place on that sda4 sata
> partitiong, where stock rootfs lives
>

I'm not clear yet what you want to do here. I need to see if I can understand!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on TBS2921 MOI+
December 01, 2024 02:43PM
Alex,

> is it poss. to get a mtd layout from?

Use hexedit to load the file and then search for mtdparts.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on TBS2921 MOI+
December 01, 2024 05:42PM
> Use hexedit to load the file and then search for
> mtdparts.

bootcmd=ubi part ubi; ubi read 0x800000 kernel; bootm 0x800000 
bootdelay=3 
baudrate=115200 
console=console=ttyS0,115200 
mtdparts=mtdparts=orion_nand:0x0c0000(uboot),0x80000(uboot_env),0x7ec0000(ubi)

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
ri8
Re: Debian on TBS2921 MOI+
December 02, 2024 03:22AM
bodhi,

>I'm not clear yet what you want to do here. I need to see if I can understand!

simply put, to make uImage,
able to bring up the stock rootfs.
it works with: debian uImage , debian and stock uInitrd,
with stock and new dtb, but doesn't work with the
stock uImage; there is no progress after loading that uImage.

If cross-compiled in the tbs-sources tree, configured
with their default mv_kw_gw_defconfig,
all the images produced are :
vmlinuz, zImage, uImage, Image
Basically, i don't get, why it doesn't work
the way it does work with a debian uImage

2. and, if i'd about

nanddump --noecc --omitoob -f mtd0.dump /dev/mtd0

- had i then the old u-boot + u+boot-env in place?

Regards,
alex
ri8
Re: Debian on TBS2921 MOI+
December 02, 2024 05:10AM
Sorry, i ment

nandwrite /dev/mtd0 mtd0.dump
,
and, - most important!-

unfortunately,
i misled you, the stock rootfs tree
i've talked about
was not original one, but
one i created from rootfs which i already
booted into with debian uImage;
forget about those fdt and mtd0.dump
posts.

So, only question 1. remaining
Regards.
alex
Re: Debian on TBS2921 MOI+
December 02, 2024 11:55AM
Alex,

> So, only question 1. remaining

I don't see question 1. Can you repeat it?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
ri8
Re: Debian on TBS2921 MOI+
December 03, 2024 02:19AM
bodhi,

it should be possible to bring
the box up with a stock uImage.
but boptomg stops after
kernel being loaded
.
Regards,
alex
Re: Debian on TBS2921 MOI+
December 03, 2024 12:46PM
Alex,

> it should be possible to bring
> the box up with a stock uImage.

Yes, in theory only.

> but boptomg stops after
> kernel being loaded

That's normal. In order to boot stock kernel, most of the time you'll need to run stock u-boot.

So kwboot the back up mtd0, and if it is successul,

printenv
and then post the serial console log.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
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: