OpenWrt Forum Archive

Topic: [MT7621A]WiTi Board is coming. Do you want to hack it?

The content of this topic has been archived between 8 Feb 2018 and 3 May 2018. Unfortunately there are posts – most likely complete pages – missing.

Hi everybody. I'm a new forum user. I have a WiTi board and I have some problems. I would like to install WPA for the WiFi interfaces and p910nd for plug in a printer and get a printer server but the only I get are errors.

opkg install kmod-usb-printer p910nd
Installing kmod-usb-printer (3.18.23-1) to root...
Downloading http://downloads.openwrt.org/snapshots/ … 24kec.ipk.
Multiple packages (kmod-usb-core and kmod-usb-core) providing same name marked HOLD or PREFER. Using latest.
Installing p910nd (0.97-4) to root...
Downloading http://downloads.openwrt.org/snapshots/ … 24kec.ipk.
Configuring p910nd.
//usr/lib/opkg/info/p910nd.postinst: line 4: default_postinst: not found
Configuring block-mount.
//usr/lib/opkg/info/block-mount.postinst: line 4: default_postinst: not found
Configuring hostapd-common.
//usr/lib/opkg/info/hostapd-common.postinst: line 4: default_postinst: not found
Configuring wpad-mini.
//usr/lib/opkg/info/wpad-mini.postinst: line 4: default_postinst: not found
Collected errors:
* satisfy_dependencies_for: Cannot satisfy the following dependencies for kmod-usb-printer:
*     kernel (= 3.18.23-1-fe3e4217de4d8dbd15006ba7779d8780) *
* opkg_install_cmd: Cannot install package kmod-usb-printer.
* pkg_run_script: package "p910nd" postinst script returned status 127.
* opkg_configure: p910nd.postinst returned 127.
* pkg_run_script: package "block-mount" postinst script returned status 127.
* opkg_configure: block-mount.postinst returned 127.
* pkg_run_script: package "hostapd-common" postinst script returned status 127.
* opkg_configure: hostapd-common.postinst returned 127.
* pkg_run_script: package "wpad-mini" postinst script returned status 127.
* opkg_configure: wpad-mini.postinst returned 127.


Can anybody help me? What do I need to do?

@whatdemocracy

This is one of the problems of building and using trunk images, buildbot keeps building new kernels, packages and images automatically but the kernel on the image you've flashed stands still.

You have two options going forward,

1st is okg install --force-depends to ignore the fact kernel module and kernel you flashed are different.

2nd option is to build your own image with the stuff you want and need built in based on openwrt + a few small changes so the WiTi board option shows up.

Should you pick option 2 today, you can grab nitroshift's repository that has those small patches preapplied and build an image for yourself. Going forward, as those changes land in trunk, should you continue to use trunk builds, you'll likely be using the trunk imagebuilder which is less work. Eventually, come 16.01 release or whatever the number for the next major release, you could use that and not care about building anything.

maurer wrote:

hi again,
you probably have the same issue as i have - sd card is mounted every time read-only.
you need to patch the patch smile
https://github.com/openwrt/openwrt/blob … -SoC.patch
to
https://github.com/mqmaker/witi-openwrt … tion.patch
if you just want a compiled fw until you get a proper fix grab my compiled image:
https://www.dropbox.com/s/l6y5busryffai … e.bin?dl=1

Can I use that firmware? Do I need to istall luci after aply it? Does the firmware come with the patches applyed?

it has luci and the patch for sd write - it's your decision to use it or not wink

maurer wrote:

it has luci and the patch for sd write - it's your decision to use it or not wink

Thanks.

Is ther any possibility to upgrade the firmware once I have installed it?

whatdemocracy wrote:

Thanks.

Is ther any possibility to upgrade the firmware once I have installed it?

Yes; like with any other openwrt device.

Seems to remove ..WP.. (write-protect) option from some bitmask.
Any idea what that amounts to in practice and why wouldn't it be in the default kernel?

Seems like there're some issues with the mt76 driver that persist at head and cause wifi to stop working.

[   75.190000] br-lan: port 2(wlan0) entered forwarding state
[18326.710000] ------------[ cut here ]------------
[18326.720000] WARNING: CPU: 0 PID: 0 at /home/risk/projects/openwrt/build_dir/target-mipsel_1004kc+dsp_musl-1.1.11/linux-ramips_mt7621/mt76
-2015-10-30/mac.c:67 mt76_mac_process_rx+0x19c/0x248 [mt76pci]()
[18326.760000] Modules linked in: pppoe ppp_async iptable_nat pppox ppp_generic nf_nat_ipv4 nf_conntrack_ipv6 nf_conntrack_ipv4 ipt_REJECT i
pt_MASQUERADE xt_time xt_tcpudp xt_state xt_nat xt_multiport xt_mark xt_mac xt_limit xt_id xt_conntrack xt_comment xt_TCPMSS xt_REDIRECT xt_
LOG xt_CT usbhid slhc rtc_pcf8563 nf_reject_ipv4 nf_nat_masquerade_ipv4 nf_nat nf_log_ipv4 nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack_rtcach
e nf_conntrack iptable_raw iptable_mangle iptable_filter ip_tables hid_generic crc_ccitt hid evdev input_core i2c_dev i2c_core mt76pci mac80
211 cfg80211 compat ledtrig_usbdev ip6t_REJECT nf_reject_ipv6 nf_log_ipv6 nf_log_common ip6table_raw ip6table_mangle ip6table_filter ip6_tab
les x_tables mmc_block sdhci_pltfm sdhci mtk_sd mmc_core leds_gpio xhci_plat_hcd xhci_hcd ahci libahci libata sd_mod scsi_mod gpio_button_ho
tplug usbcore nls_base usb_common
[18326.910000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.18.23 #1
[18326.920000] Stack : 00000000 00000004 00000006 80057e90 00000000 00000000 00000000 00000000
[18326.920000]    804456da 00000034 00000000 00000001 803f0000 80460000 803ef043 803ef3e8
[18326.920000]    80374898 00000000 00000000 8044445c 8ea94800 00000040 8eeb957c 800589f4
[18326.920000]    803f35b4 800279c8 803f35b8 803f0000 8037839c 803ddbfc 8ea94800 003ddbfc
[18326.920000]    00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[18326.920000]    ...
[18326.990000] Call Trace:
[18327.000000] [<80016690>] show_stack+0x50/0x84
[18327.010000] [<801920d8>] dump_stack+0x64/0x88
[18327.020000] [<80027ad0>] warn_slowpath_common+0x84/0xb4
[18327.030000] [<80027b84>] warn_slowpath_null+0x18/0x24
[18327.040000] [<8ecd51d8>] mt76_mac_process_rx+0x19c/0x248 [mt76pci]
[18327.050000] [<8ecd0ebc>] mt76_kick_queue+0x478/0x590 [mt76pci]
[18327.060000] 
[18327.060000] ---[ end trace 35c6055006a4e40e ]---
[18327.070000] ------------[ cut here ]------------
[18327.080000] WARNING: CPU: 0 PID: 0 at /home/risk/projects/openwrt/build_dir/target-mipsel_1004kc+dsp_musl-1.1.11/linux-ramips_mt7621/comp
at-wireless-2015-10-26/net/mac80211/rx.c:3617 ieee80211_rx_napi+0x2f8/0x860 [mac80211]()
[18327.120000] Rate marked as a VHT rate but data is invalid: MCS: 10, NSS: 3
[18327.140000] Modules linked in: pppoe ppp_async iptable_nat pppox ppp_generic nf_nat_ipv4 nf_conntrack_ipv6 nf_conntrack_ipv4 ipt_REJECT i
pt_MASQUERADE xt_time xt_tcpudp xt_state xt_nat xt_multiport xt_mark xt_mac xt_limit xt_id xt_conntrack xt_comment xt_TCPMSS xt_REDIRECT xt_
LOG xt_CT usbhid slhc rtc_pcf8563 nf_reject_ipv4 nf_nat_masquerade_ipv4 nf_nat nf_log_ipv4 nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack_rtcach
e nf_conntrack iptable_raw iptable_mangle iptable_filter ip_tables hid_generic crc_ccitt hid evdev input_core i2c_dev i2c_core mt76pci mac80
211 cfg80211 compat ledtrig_usbdev ip6t_REJECT nf_reject_ipv6 nf_log_ipv6 nf_log_common ip6table_raw ip6table_mangle ip6table_filter ip6_tab
les x_tables mmc_block sdhci_pltfm sdhci mtk_sd mmc_core leds_gpio xhci_plat_hcd xhci_hcd ahci libahci libata sd_mod scsi_mod gpio_button_ho
tplug usbcore nls_base usb_common
[18327.290000] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G        W      3.18.23 #1
[18327.300000] Stack : 00000000 00000004 00000006 80057e90 00000000 00000000 00000000 00000000
[18327.300000]    804456da 00000041 00000000 00000001 803f0000 80460000 803ef043 803ef3e8
[18327.300000]    80374898 00000000 00000000 8044445c 00000000 00000040 8eeb957c 800589f4
[18327.300000]    803f35b4 80027954 803f35b8 803f0000 8037839c 803ddbac 00000000 003ddbac
[18327.300000]    00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[18327.300000]    ...
[18327.370000] Call Trace:
[18327.380000] [<80016690>] show_stack+0x50/0x84
[18327.390000] [<801920d8>] dump_stack+0x64/0x88
[18327.390000] [<80027ad0>] warn_slowpath_common+0x84/0xb4
[18327.400000] [<80027b2c>] warn_slowpath_fmt+0x2c/0x38
[18327.410000] [<8ef22aa8>] ieee80211_rx_napi+0x2f8/0x860 [mac80211]
[18327.430000] [<8ecd0edc>] mt76_kick_queue+0x498/0x590 [mt76pci]
[18327.440000] 
[18327.440000] ---[ end trace 35c6055006a4e40f ]---
[18327.450000] ------------[ cut here ]------------
[18327.460000] WARNING: CPU: 0 PID: 0 at /home/risk/projects/openwrt/build_dir/target-mipsel_1004kc+dsp_musl-1.1.11/linux-ramips_mt7621/mt76
-2015-10-30/mac.c:67 mt76_mac_process_rx+0x19c/0x248 [mt76pci]()
[18327.500000] Modules linked in: pppoe ppp_async iptable_nat pppox ppp_generic nf_nat_ipv4 nf_conntrack_ipv6 nf_conntrack_ipv4 ipt_REJECT i
pt_MASQUERADE xt_time xt_tcpudp xt_state xt_nat xt_multiport xt_mark xt_mac xt_limit xt_id xt_conntrack xt_comment xt_TCPMSS xt_REDIRECT xt_
LOG xt_CT usbhid slhc rtc_pcf8563 nf_reject_ipv4 nf_nat_masquerade_ipv4 nf_nat nf_log_ipv4 nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack_rtcach
e nf_conntrack iptable_raw iptable_mangle iptable_filter ip_tables hid_generic crc_ccitt hid evdev input_core i2c_dev i2c_core mt76pci mac80
211 cfg80211 compat ledtrig_usbdev ip6t_REJECT nf_reject_ipv6 nf_log_ipv6 nf_log_common ip6table_raw ip6table_mangle ip6table_filter ip6_tab
les x_tables mmc_block sdhci_pltfm sdhci mtk_sd mmc_core leds_gpio xhci_plat_hcd xhci_hcd ahci libahci libata sd_mod scsi_mod gpio_button_ho
tplug usbcore nls_base usb_common
[18327.650000] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G        W      3.18.23 #1
[18327.660000] Stack : 00000000 00000004 00000006 80057e90 00000000 00000000 00000000 00000000
[18327.660000]    804456da 00000041 00000000 00000001 803f0000 80460000 803ef043 803ef3e8
[18327.660000]    80374898 00000000 00000000 8044445c 8ea92800 00000040 8eeb957c 800589f4
[18327.660000]    803f35b4 80027954 803f35b8 803f0000 8037839c 803ddbfc 8ea92800 003ddbfc
[18327.660000]    00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[18327.660000]    ...
[18327.730000] Call Trace:
[18327.740000] [<80016690>] show_stack+0x50/0x84
[18327.750000] [<801920d8>] dump_stack+0x64/0x88
[18327.750000] [<80027ad0>] warn_slowpath_common+0x84/0xb4
[18327.760000] [<80027b84>] warn_slowpath_null+0x18/0x24
[18327.770000] [<8ecd51d8>] mt76_mac_process_rx+0x19c/0x248 [mt76pci]
[18327.790000] [<8ecd0ebc>] mt76_kick_queue+0x478/0x590 [mt76pci]
[18327.800000] 
[18327.800000] ---[ end trace 35c6055006a4e410 ]---
maurer wrote:

hi again,
you probably have the same issue as i have - sd card is mounted every time read-only.
you need to patch the patch smile
https://github.com/openwrt/openwrt/blob … -SoC.patch
to
https://github.com/mqmaker/witi-openwrt … tion.patch

Can you please explain what you mean by "patch the patch"? Can you provide command line commands to do this? I am using nitroshift's repo, will it work on that? I ask because I am wary of trying to use the mqmaker patch on it. Thanks!

EDIT: I think I figured it out.

nano target/linux/ramips/patches-3.18/0053-mmc-MIPS-ralink-add-sdhci-for-mt7620a-SoC.patch

Change line 1961 to

 +    .flags          = MSDC_SYS_SUSPEND | MSDC_CD_PIN_EN | MSDC_REMOVABLE | MSDC_HIGHSPEED,

Trying it now. We'll see if it works!

(Last edited by shutin on 26 Nov 2015, 06:53)

risk wrote:

re: 512 vs. 256 .. do you see a practical difference for your use case?
I've been meaning to take a look at how exactly the kernel figures out how much memory the board has, but I'd rather try to spend time trying to help shepherd nitroshift's changes in first, and take on the 256 vs 512 challenge

I don't care at all about the 512m memory feature. I don't think those versions have even shipped yet. I only mentioned that the 512m patch wasn't working because the mqmaker openwrt repo was failing to build because of a bad patch. Forget the 512m memory thing, I want a clean way to get the sdcard to mount as writable!

shutin wrote:

I don't care at all about the 512m memory feature. I don't think those versions have even shipped yet. I only mentioned that the 512m patch wasn't working because the mqmaker openwrt repo was failing to build because of a bad patch. Forget the 512m memory thing, I want a clean way to get the sdcard to mount as writable!

https://github.com/mqmaker/witi-openwrt … dec5d368cd
The last amendment results in the fact that it manages to build a this firmware (use virtual machine ubuntu-15.10-i386-server) - another thing that I do not know how it works - has not yet reached me WiTi Board 512 MB purchased ...
I found yet another repo test mentioned at the forum mqmaker and described here:
https://k0st.wordpress.com/2015/11/25/w … d-openwrt/
https://forum.mqmaker.com/t/mainline-op … ver/143/35

(Last edited by build000 on 26 Nov 2015, 06:24)

whatdemocracy wrote:
maurer wrote:

hi again,
you probably have the same issue as i have - sd card is mounted every time read-only.
you need to patch the patch smile
https://github.com/openwrt/openwrt/blob … -SoC.patch
to
https://github.com/mqmaker/witi-openwrt … tion.patch
if you just want a compiled fw until you get a proper fix grab my compiled image:
https://www.dropbox.com/s/l6y5busryffai … e.bin?dl=1

Can I use that firmware? Do I need to istall luci after aply it? Does the firmware come with the patches applyed?

Can you explain me how I must use the patches to have sd card mounted rw? I'm using nitroshift git and my sd is mounted every time ro.

(Last edited by whatdemocracy on 26 Nov 2015, 19:16)

I was having a terrible time recently trying to flash a new firmware through luci. It kept giving me this error in the UI:

"The uploaded image file does not contain a supported format. Make sure that you choose the generic image format for your platform."

I tried a test t the command line:

sysupgrade -d 60 -v -T /tmp/path_to_my_bin.bin

That gave me a slightly different error:

"Sysupgrade is not yet supported on generic
Image check 'platform_check_image' failed."

That led me to this support ticket with the answer. https://dev.openwrt.org/ticket/10554

 cat /tmp/sysinfo/board_name 

was set to 'generic'. change it to 'witi'.

I flashed a newer firmware, which would kernel panic on boot. tftpflashed another, which sits there with 192.168.1.1, but i cannot ping anything from it (via a UART console, hit enter a bunch after boot), nor can i ping it from my pc. gonna attempt some more. this kind of stuff is the fun that i bought it for, right? big_smile

whatdemocracy wrote:

Can you explain me how I must use the patches to have sd card mounted rw? I'm using nitroshift git and my sd is mounted every time ro.

This issue isn't solved yet. nitroshift said they want to focus on getting initial support in main openwrt first, then focus on that stuff, which i can appreciate.

if you are feeling adventurous, see my post #109. mqmaker supposedly solved the sdcard problem awhile ago. you can try applying their fix by modifying a file in nitroshifts repo. i've been trying to do this but have run into lots of other unrelated issues.

WiTi/witi/MQmaker WiTi naming conventions were kind of tricky to get right, which I guess is now causing sysupgrade troubles depending on what you ended up using, and what you're trying to use sysupgrade on. AFAIK, in the images produced by openwrt uImage starts at the beginning of the file, and uboot kernel is being loaded at the start of firmware as well, so writing the sysupgrade image directly to the firmware partition should result in kernel being loaded correctly on reboot.

I'm happy to report that the SD card write-protect fix works. See post 109. I've been able to mount a 16gig SD card as my overlay and swap partition. Finally.

One huge problem I had with the recent nitroshift builds was the network after flash. It would set 192.168.1.1 as the ip in br-lan, but you could not ping the router or ping out from that. I was pretty lost until I flashed the one image that has always worked for me, risk's post #90. I copied the /etc/config/network settings from that and wrote them into the newer image via UART console. Presto, that worked.

I don't know where I would add these settings in the source code, but they need to make it in there. This goes in /etc/network/config at the bottom.

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '0 1 2 3 6t'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '4 6t'

It's in 02_network, recent nitroshift sources get it right, settings that get generated are subject to machine name -> board name detection working properly (e.g. matching is case sensitive there)

@nitroshift

Are there any extra steps to get the image build?
I was able to build successfully (from your branch) however the at boot time I get kernel panic.
It seems it can't detect the spi flash and gets stuck creating the partitions.

Thanks

filipescu.cristian wrote:

@nitroshift

Are there any extra steps to get the image build?
I was able to build successfully (from your branch) however the at boot time I get kernel panic.
It seems it can't detect the spi flash and gets stuck creating the partitions.

Thanks

Which tree did you build from? Also, please use pastebin to post your boot log.

nitroshift

(Last edited by nitroshift on 29 Nov 2015, 08:57)

maurer wrote:

it has luci and the patch for sd write - it's your decision to use it or not wink

Hi, for what purpose do you need sdcard(write)?

maurer wrote:

hi again,
you probably have the same issue as i have - sd card is mounted every time read-only.
you need to patch the patch smile
https://github.com/openwrt/openwrt/blob … -SoC.patch
to
https://github.com/mqmaker/witi-openwrt … tion.patch
if you just want a compiled fw until you get a proper fix grab my compiled image:
https://www.dropbox.com/s/l6y5busryffai … e.bin?dl=1

I've install your compiled fw and have some questions:

Have you try to get rw permissions on a mmc formatted as ext3 or ext4? I  haven't got it.

gsustek wrote:
maurer wrote:

it has luci and the patch for sd write - it's your decision to use it or not wink

Hi, for what purpose do you need sdcard(write)?

For example:

http://foro.seguridadwireless.net/openw … xtroot%29/

MicroSD as extroot.

whatdemocracy wrote:
gsustek wrote:
maurer wrote:

it has luci and the patch for sd write - it's your decision to use it or not wink

Hi, for what purpose do you need sdcard(write)?

For example:

http://foro.seguridadwireless.net/openw … xtroot%29/

MicroSD as extroot.

Yes! You may have noticed there is only about 11 megs of space free after you flash the firmware with luci. By using extroot and extending the root partition using /overlay onto the sd card, you can have plenty of space to install additional packages. Here are the steps that worked for me: https://wiki.openwrt.org/doc/howto/extroot

You will need to install packages block-mount and kmod-fs-ext4. don't be fooled by the "ext4", it also adds support for ext2 and ext3.

nitroshift wrote:
filipescu.cristian wrote:

@nitroshift

Are there any extra steps to get the image build?
I was able to build successfully (from your branch) however the at boot time I get kernel panic.
It seems it can't detect the spi flash and gets stuck creating the partitions.

Thanks

Which tree did you build from? Also, please use pastebin to post your boot log.

nitroshift

I also had this issue (kernel panic), using  https://github.com/nitroshift/openwrt/t … al-support
Sorry I don't have a log, but sounds like the error he got. So something happened between your nitroshift/witi and nitroshift/openwrt repos because I am running the former but the latter panics.

Sorry, posts 126 to 125 are missing from our archive.