• October 20, 2018, 07:00:10 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

This Forum Beta is ONLY for registered owners of D-Link products in the USA for which we have created boards at this time.

Author Topic: Not able to build module WIRELESS compiling DAP-1520 GPL Source firmware  (Read 1083 times)

brunoaduarte

  • Level 1 Member
  • *
  • Posts: 5

I'm trying to customize my DAP-1520 repeater to work on a fixed 2.4GHz channel + disable WPS pin permanently by compiling the latest provided GPL Source code (v1.08)
downloaded from here https://tsd.dlink.com.tw/
DAP-1520_A1_v108b01_FOSS.tar.gz

Problem is that the provided Makefile does not include compilation of the wireless module

As you can see here the "wireless" section is empty

/home/AthSDK/Makefile Original (file is not complete here, i just extracted the needed info)

Code: [Select]
naconfig:
rm -rf $(PRJ_PATH)/wireless/
cp -ap wireless_normal wireless

cp -r $(PRJ_PATH)/NA.config .config
cp -r $(PRJ_PATH)/NA.kernel.config $(PRJ_PATH)/platform/MT7620/kernels/mips-linux-2.6.36.x/.config

apps_clean:
$(MAKE) -C apps clean

backup_apps_clean:
$(MAKE) -C backup_apps clean

platform_%:
$(MAKE) -C platform $(subst platform_,,$@ )

wireless:

wireless_clean:

driver:
$(MAKE) -C $(KERNEL_PATH)/../../drivers

driver_clean:
$(MAKE) -C $(KERNEL_PATH)/../../drivers clean

build:
@echo =================== building rootfs ===================
$(MAKE) -C rootfs
@echo =================== building platform ===================
$(MAKE) -C platform
@echo =================== building apps ===================
$(MAKE) -C apps
@echo =================== building wireless ===================

install:
@echo =================== Create image folder ===================
rm -fr $(IMG_PATH)
mkdir -p $(IMG_PATH)
@echo =================== installing platform ===================
$(MAKE) -C platform install || exit 1
@echo =================== installing apps ===================
$(MAKE) -C apps install || exit 1
@echo =================== installing wireless ===================
$(MAKE) -C wireless install || exit 1
@echo =================== installing rootfs ===================
$(MAKE) -C rootfs install || exit 1
@echo =================== Finish ===================

"building wireless" does nothing and instead of compiling the module, it just copies a pre-compiled version that is on the folder "wireless_original"
And then finally, install to the final image after all the other builds (rootfs, platform, apps)

So i "fixed" it like this

/home/AthSDK/Makefile Modified

Code: [Select]
naconfig:
# rm -rf $(PRJ_PATH)/wireless/
# cp -ap wireless_normal wireless

cp -r $(PRJ_PATH)/NA.config .config
cp -r $(PRJ_PATH)/NA.kernel.config $(PRJ_PATH)/platform/MT7620/kernels/mips-linux-2.6.36.x/.config

apps_clean:
$(MAKE) -C apps clean

backup_apps_clean:
$(MAKE) -C backup_apps clean

platform_%:
$(MAKE) -C platform $(subst platform_,,$@ )

wireless:
$(MAKE) -C wireless

wireless_clean:
$(MAKE) -C wireless clean

driver:
$(MAKE) -C $(KERNEL_PATH)/../../drivers

driver_clean:
$(MAKE) -C $(KERNEL_PATH)/../../drivers clean

build:
@echo =================== building rootfs ===================
$(MAKE) -C rootfs
@echo =================== building platform ===================
$(MAKE) -C platform
@echo =================== building apps ===================
$(MAKE) -C apps
@echo =================== building wireless ===================
$(MAKE) -C wireless

install:
@echo =================== Create image folder ===================
rm -fr $(IMG_PATH)
mkdir -p $(IMG_PATH)
@echo =================== installing platform ===================
$(MAKE) -C platform install || exit 1
@echo =================== installing apps ===================
$(MAKE) -C apps install || exit 1
@echo =================== installing wireless ===================
$(MAKE) -C wireless install || exit 1
@echo =================== installing rootfs ===================
$(MAKE) -C rootfs install || exit 1
@echo =================== Finish ===================

But still no good, "wireless" Makefile is also incomplete + commented

/home/AthSDK/wireless/Makefile Original

Code: [Select]
ifeq ($(WL_MODULE),MT7620)
WIRELESS_ALL = mt7620_build
WIRELESS_CLEAN = mt7620_clean
WIRELESS_INSTALL = mt7620_install
endif

all:

clean: $(WIRELESS_CLEAN)

install: $(WIRELESS_INSTALL)

# MT7620
mt7620_build:
cd $(WL_PATH)/rt2860v2_ap && $(MAKEARCH) -C $(KERNEL_PATH) SUBDIRS=$(WL_PATH)/rt2860v2_ap modules
cd $(WL_PATH)/rt2860v2_sta && $(MAKEARCH) -C $(KERNEL_PATH) SUBDIRS=$(WL_PATH)/rt2860v2_sta modules

mt7620_clean:
#cd $(WL_PATH)/rt2860v2 && $(MAKEARCH) clean

mt7620_install:
@if [ -f $(WL_PATH)/rt2860v2_ap/rt2860v2_ap.ko ]; then \
mkdir -p $(FS_PATH)/lib/modules/$(KERNELVERSION)/kernel/drivers/net/wireless/rt2860v2_ap; \
cp -f $(WL_PATH)/rt2860v2_ap/rt2860v2_ap.ko $(FS_PATH)/lib/modules/$(KERNELVERSION)/kernel/drivers/net/wireless/rt2860v2_ap/ ; \
fi

@if [ -f $(WL_PATH)/rt2860v2_sta/rt2860v2_sta.ko ]; then \
mkdir -p $(FS_PATH)/lib/modules/$(KERNELVERSION)/kernel/drivers/net/wireless/rt2860v2_sta; \
cp -f $(WL_PATH)/rt2860v2_sta/rt2860v2_sta.ko $(FS_PATH)/lib/modules/$(KERNELVERSION)/kernel/drivers/net/wireless/rt2860v2_sta/ ; \
fi

/home/AthSDK/wireless/Makefile Modified

Code: [Select]
ifeq ($(WL_MODULE),MT7620)
WIRELESS_ALL = mt7620_build
WIRELESS_CLEAN = mt7620_clean
WIRELESS_INSTALL = mt7620_install
endif

all:  $(WIRELESS_ALL)

clean: $(WIRELESS_CLEAN)

install: $(WIRELESS_INSTALL)

# MT7620
mt7620_build:
cd $(WL_PATH)/rt2860v2_ap && $(MAKEARCH) -C $(KERNEL_PATH) SUBDIRS=$(WL_PATH)/rt2860v2_ap modules
cd $(WL_PATH)/rt2860v2_sta && $(MAKEARCH) -C $(KERNEL_PATH) SUBDIRS=$(WL_PATH)/rt2860v2_sta modules

mt7620_clean:
cd $(WL_PATH)/rt2860v2 && $(MAKEARCH) clean

mt7620_install:
@if [ -f $(WL_PATH)/rt2860v2_ap/rt2860v2_ap.ko ]; then \
mkdir -p $(FS_PATH)/lib/modules/$(KERNELVERSION)/kernel/drivers/net/wireless/rt2860v2_ap; \
cp -f $(WL_PATH)/rt2860v2_ap/rt2860v2_ap.ko $(FS_PATH)/lib/modules/$(KERNELVERSION)/kernel/drivers/net/wireless/rt2860v2_ap/ ; \
fi

@if [ -f $(WL_PATH)/rt2860v2_sta/rt2860v2_sta.ko ]; then \
mkdir -p $(FS_PATH)/lib/modules/$(KERNELVERSION)/kernel/drivers/net/wireless/rt2860v2_sta; \
cp -f $(WL_PATH)/rt2860v2_sta/rt2860v2_sta.ko $(FS_PATH)/lib/modules/$(KERNELVERSION)/kernel/drivers/net/wireless/rt2860v2_sta/ ; \
fi

Then i try to run Make again

Code: [Select]
root@ubuntu:/home/AthSDK# make
#rm -rf /home/AthSDK/platform/WASP/drivers
#tar -xvf normal_driver.tar
#tar -xvf normal_wireless.tar
cp -r /home/AthSDK/NA.config .config
cp -r /home/AthSDK/NA.kernel.config /home/AthSDK/platform/MT7620/kernels/mips-linux-2.6.36.x/.config
=================== building rootfs ===================
=================== building platform ===================
=================== building apps ===================
=================== building wireless ===================
make -C wireless
make[1]: Entering directory `/home/AthSDK/wireless'
cd /home/AthSDK/wireless/MT7620/rt2860v2_ap && make -C /home/AthSDK/platform/MT7620/kernels/mips-linux-2.6.36.x SUBDIRS=/home/AthSDK/wireless/MT7620/rt2860v2_ap modules
make[2]: Entering directory `/home/AthSDK/platform/MT7620/kernels/mips-linux-2.6.36.x'
make[3]: *** No rule to make target `/home/AthSDK/wireless/MT7620/rt2860v2_ap/../rt2860v2/common/crypt_md5.o', needed by `/home/AthSDK/wireless/MT7620/rt2860v2_ap/rt2860v2_ap.o'.  Stop.
make[2]: *** [_module_/home/AthSDK/wireless/MT7620/rt2860v2_ap] Error 2
make[2]: Leaving directory `/home/AthSDK/platform/MT7620/kernels/mips-linux-2.6.36.x'
make[1]: *** [mt7620_build] Error 2
make[1]: Leaving directory `/home/AthSDK/wireless'
make: *** [build] Error 2

After building rootfs, platform and apps it tries to build wireless and fails.

Then i checked the folder that should contain RT2860 source files, and for my surprise the files aren't there, instead, there are a couple of ".o.cmd" files (corresponding to the names of the C files that should be there)

Code: [Select]
root@ubuntu:/home/AthSDK# ls /home/AthSDK/wireless/MT7620/rt2860v2/common -nath
total 2.1M
drwxrwxrwx  2 0 0 4.0K Apr 27 17:34 .
-rw-r--r--  1 0 0    0 Apr 27 17:32 .crypt_md5.o.d
drwxrwxrwx 12 0 0 4.0K Jun 19  2017 ..
-rw-r--r--  1 0 0  42K Jun 19  2017 .cmm_mat_ipv6.o.cmd
-rw-r--r--  1 0 0  42K Jun 19  2017 .igmp_snoop.o.cmd
-rw-r--r--  1 0 0  42K Jun 19  2017 .cmm_mat_iparp.o.cmd
-rw-r--r--  1 0 0  42K Jun 19  2017 .cmm_mat.o.cmd
-rw-r--r--  1 0 0  42K Jun 19  2017 .cmm_mat_pppoe.o.cmd
-rw-r--r--  1 0 0  42K Jun 19  2017 .wsc_ufd.o.cmd
-rw-r--r--  1 0 0  42K Jun 19  2017 .wsc_v2.o.cmd
-rw-r--r--  1 0 0  42K Jun 19  2017 .crypt_biginteger.o.cmd
-rw-r--r--  1 0 0  42K Jun 19  2017 .crypt_dh.o.cmd
-rw-r--r--  1 0 0  42K Jun 19  2017 .wsc_tlv.o.cmd
-rw-r--r--  1 0 0  42K Jun 19  2017 .wsc.o.cmd
-rw-r--r--  1 0 0  42K Jun 19  2017 .rt_rf.o.cmd
-rw-r--r--  1 0 0  37K Jun 19  2017 .rt_os_util.o.cmd
-rw-r--r--  1 0 0  42K Jun 19  2017 .cmm_loft_cal.o.cmd
-rw-r--r--  1 0 0  42K Jun 19  2017 .cmm_rf_cal.o.cmd
-rw-r--r--  1 0 0  42K Jun 19  2017 .cmm_data_pci.o.cmd
-rw-r--r--  1 0 0  42K Jun 19  2017 .cmm_mac_pci.o.cmd
-rw-r--r--  1 0 0  42K Jun 19  2017 .ee_flash.o.cmd
-rw-r--r--  1 0 0  42K Jun 19  2017 .cmm_asic.o.cmd
-rw-r--r--  1 0 0  42K Jun 19  2017 .cmm_cmd.o.cmd
-rw-r--r--  1 0 0  42K Jun 19  2017 .eeprom.o.cmd
-rw-r--r--  1 0 0  42K Jun 19  2017 .rtmp_swmcu.o.cmd
-rw-r--r--  1 0 0  42K Jun 19  2017 .cmm_profile.o.cmd
-rw-r--r--  1 0 0  42K Jun 19  2017 .rt_channel.o.cmd
-rw-r--r--  1 0 0  42K Jun 19  2017 .rtmp_timer.o.cmd
-rw-r--r--  1 0 0  42K Jun 19  2017 .uapsd.o.cmd
-rw-r--r--  1 0 0  42K Jun 19  2017 .cmm_wpa.o.cmd
-rw-r--r--  1 0 0  42K Jun 19  2017 .ps.o.cmd
-rw-r--r--  1 0 0  42K Jun 19  2017 .spectrum.o.cmd
-rw-r--r--  1 0 0  42K Jun 19  2017 .cmm_cfg.o.cmd
-rw-r--r--  1 0 0  42K Jun 19  2017 .cmm_radar.o.cmd
-rw-r--r--  1 0 0  42K Jun 19  2017 .cmm_info.o.cmd
-rw-r--r--  1 0 0  42K Jun 19  2017 .cmm_sanity.o.cmd
-rw-r--r--  1 0 0  42K Jun 19  2017 .cmm_sync.o.cmd
-rw-r--r--  1 0 0  42K Jun 19  2017 .cmm_aes.o.cmd
-rw-r--r--  1 0 0  42K Jun 19  2017 .cmm_tkip.o.cmd
-rw-r--r--  1 0 0  42K Jun 19  2017 .rtmp_init_inf.o.cmd
-rw-r--r--  1 0 0  42K Jun 19  2017 .rtmp_init.o.cmd
-rw-r--r--  1 0 0  42K Jun 19  2017 .cmm_data.o.cmd
-rw-r--r--  1 0 0  42K Jun 19  2017 .action.o.cmd
-rw-r--r--  1 0 0  42K Jun 19  2017 .ba_action.o.cmd
-rw-r--r--  1 0 0  42K Jun 19  2017 .cmm_wep.o.cmd
-rw-r--r--  1 0 0  42K Jun 19  2017 .mlme.o.cmd
-rw-r--r--  1 0 0  42K Jun 19  2017 .crypt_aes.o.cmd
-rw-r--r--  1 0 0  42K Jun 19  2017 .crypt_arc4.o.cmd
-rw-r--r--  1 0 0  42K Jun 19  2017 .crypt_hmac.o.cmd
-rw-r--r--  1 0 0  42K Jun 19  2017 .crypt_md5.o.cmd
-rw-r--r--  1 0 0  42K Jun 19  2017 .crypt_sha2.o.cmd
-rwxrwxrwx  1 0 0 8.0K Jun 19  2017 rt2860.bin
-rwxrwxrwx  1 0 0 8.0K Jun 19  2017 rt2860.bin.dfs

and this is the content of one of these files (.action.o.cmd for example):

https://pastebin.com/qVJpmGHF

Still don't give up, so i grab all .C files from RT2860 driver source downloaded from here https://github.com/qualiabyte/install-rt2860 and place them on the corresponding folders

Code: [Select]
/home/AthSDK/wireless/MT7620/rt2860v2/common
/home/AthSDK/wireless/MT7620/rt2860v2/include
/home/AthSDK/wireless/MT7620/rt2860v2/os
/home/AthSDK/wireless/MT7620/rt2860v2/sta

Now, content of "common" folder for example, is:

Code: [Select]
root@ubuntu:/home/ubuntu# ls /home/AthSDK/wireless/MT7620/rt2860v2/common -nath
total 3.8M
drwxrwxrwx  2    0    0 4.0K Apr 27 17:49 .
-rw-r--r--  1    0    0    0 Apr 27 17:32 .crypt_md5.o.d
drwxrwxrwx 12    0    0 4.0K Jun 19  2017 ..
-rw-r--r--  1    0    0  42K Jun 19  2017 .cmm_mat_ipv6.o.cmd
-rw-r--r--  1    0    0  42K Jun 19  2017 .igmp_snoop.o.cmd
-rw-r--r--  1    0    0  42K Jun 19  2017 .cmm_mat_iparp.o.cmd
-rw-r--r--  1    0    0  42K Jun 19  2017 .cmm_mat.o.cmd
-rw-r--r--  1    0    0  42K Jun 19  2017 .cmm_mat_pppoe.o.cmd
-rw-r--r--  1    0    0  42K Jun 19  2017 .wsc_ufd.o.cmd
-rw-r--r--  1    0    0  42K Jun 19  2017 .wsc_v2.o.cmd
-rw-r--r--  1    0    0  42K Jun 19  2017 .crypt_biginteger.o.cmd
-rw-r--r--  1    0    0  42K Jun 19  2017 .crypt_dh.o.cmd
-rw-r--r--  1    0    0  42K Jun 19  2017 .wsc_tlv.o.cmd
-rw-r--r--  1    0    0  42K Jun 19  2017 .wsc.o.cmd
-rw-r--r--  1    0    0  42K Jun 19  2017 .rt_rf.o.cmd
-rw-r--r--  1    0    0  37K Jun 19  2017 .rt_os_util.o.cmd
-rw-r--r--  1    0    0  42K Jun 19  2017 .cmm_loft_cal.o.cmd
-rw-r--r--  1    0    0  42K Jun 19  2017 .cmm_rf_cal.o.cmd
-rw-r--r--  1    0    0  42K Jun 19  2017 .cmm_data_pci.o.cmd
-rw-r--r--  1    0    0  42K Jun 19  2017 .cmm_mac_pci.o.cmd
-rw-r--r--  1    0    0  42K Jun 19  2017 .ee_flash.o.cmd
-rw-r--r--  1    0    0  42K Jun 19  2017 .cmm_asic.o.cmd
-rw-r--r--  1    0    0  42K Jun 19  2017 .cmm_cmd.o.cmd
-rw-r--r--  1    0    0  42K Jun 19  2017 .eeprom.o.cmd
-rw-r--r--  1    0    0  42K Jun 19  2017 .rtmp_swmcu.o.cmd
-rw-r--r--  1    0    0  42K Jun 19  2017 .cmm_profile.o.cmd
-rw-r--r--  1    0    0  42K Jun 19  2017 .rt_channel.o.cmd
-rw-r--r--  1    0    0  42K Jun 19  2017 .rtmp_timer.o.cmd
-rw-r--r--  1    0    0  42K Jun 19  2017 .uapsd.o.cmd
-rw-r--r--  1    0    0  42K Jun 19  2017 .cmm_wpa.o.cmd
-rw-r--r--  1    0    0  42K Jun 19  2017 .ps.o.cmd
-rw-r--r--  1    0    0  42K Jun 19  2017 .spectrum.o.cmd
-rw-r--r--  1    0    0  42K Jun 19  2017 .cmm_cfg.o.cmd
-rw-r--r--  1    0    0  42K Jun 19  2017 .cmm_radar.o.cmd
-rw-r--r--  1    0    0  42K Jun 19  2017 .cmm_info.o.cmd
-rw-r--r--  1    0    0  42K Jun 19  2017 .cmm_sanity.o.cmd
-rw-r--r--  1    0    0  42K Jun 19  2017 .cmm_sync.o.cmd
-rw-r--r--  1    0    0  42K Jun 19  2017 .cmm_aes.o.cmd
-rw-r--r--  1    0    0  42K Jun 19  2017 .cmm_tkip.o.cmd
-rw-r--r--  1    0    0  42K Jun 19  2017 .rtmp_init_inf.o.cmd
-rw-r--r--  1    0    0  42K Jun 19  2017 .rtmp_init.o.cmd
-rw-r--r--  1    0    0  42K Jun 19  2017 .cmm_data.o.cmd
-rw-r--r--  1    0    0  42K Jun 19  2017 .action.o.cmd
-rw-r--r--  1    0    0  42K Jun 19  2017 .ba_action.o.cmd
-rw-r--r--  1    0    0  42K Jun 19  2017 .cmm_wep.o.cmd
-rw-r--r--  1    0    0  42K Jun 19  2017 .mlme.o.cmd
-rw-r--r--  1    0    0  42K Jun 19  2017 .crypt_aes.o.cmd
-rw-r--r--  1    0    0  42K Jun 19  2017 .crypt_arc4.o.cmd
-rw-r--r--  1    0    0  42K Jun 19  2017 .crypt_hmac.o.cmd
-rw-r--r--  1    0    0  42K Jun 19  2017 .crypt_md5.o.cmd
-rw-r--r--  1    0    0  42K Jun 19  2017 .crypt_sha2.o.cmd
-rwxrwxrwx  1    0    0 8.0K Jun 19  2017 rt2860.bin
-rwxrwxrwx  1    0    0 8.0K Jun 19  2017 rt2860.bin.dfs
-rw-rw-r--  1 1000 1000 109K Jul  9  2010 rtmp_init.c
-rw-rw-r--  1 1000 1000 231K Jul  8  2010 mlme.c
-rw-rw-r--  1 1000 1000  24K Jul  8  2010 crypt_sha2.c
-rw-rw-r--  1 1000 1000  21K Jul  8  2010 crypt_md5.c
-rw-rw-r--  1 1000 1000 5.1K Jul  8  2010 crypt_hmac.c
-rw-rw-r--  1 1000 1000 148K Jul  8  2010 crypt_aes.c
-rw-rw-r--  1 1000 1000  60K Jul  8  2010 spectrum.c
-rw-rw-r--  1 1000 1000 8.5K Jul  8  2010 rtmp_timer.c
-rw-rw-r--  1 1000 1000  16K Jul  8  2010 rtmp_mcu.c
-rw-rw-r--  1 1000 1000  11K Jul  8  2010 rtmp_init_inf.c
-rw-rw-r--  1 1000 1000  29K Jul  8  2010 rt_channel.c
-rw-rw-r--  1 1000 1000 155K Jul  8  2010 rt_ate.c
-rw-rw-r--  1 1000 1000 4.2K Jul  8  2010 netif_block.c
-rw-rw-r--  1 1000 1000 2.3K Jul  8  2010 eeprom.c
-rw-rw-r--  1 1000 1000 5.7K Jul  8  2010 ee_prom.c
-rw-rw-r--  1 1000 1000 9.3K Jul  8  2010 dfs.c
-rw-rw-r--  1 1000 1000 5.3K Jul  8  2010 crypt_arc4.c
-rw-rw-r--  1 1000 1000 111K Jul  8  2010 cmm_wpa.c
-rw-rw-r--  1 1000 1000  11K Jul  8  2010 cmm_wep.c
-rw-rw-r--  1 1000 1000  23K Jul  8  2010 cmm_tkip.c
-rw-rw-r--  1 1000 1000  31K Jul  8  2010 cmm_sync.c
-rw-rw-r--  1 1000 1000  50K Jul  8  2010 cmm_sanity.c
-rw-rw-r--  1 1000 1000  65K Jul  8  2010 cmm_profile.c
-rw-rw-r--  1 1000 1000  65K Jul  8  2010 cmm_mac_pci.c
-rw-rw-r--  1 1000 1000 108K Jul  8  2010 cmm_info.c
-rw-rw-r--  1 1000 1000  38K Jul  8  2010 cmm_data_pci.c
-rw-rw-r--  1 1000 1000  71K Jul  8  2010 cmm_data.c
-rw-rw-r--  1 1000 1000 4.4K Jul  8  2010 cmm_cmd.c
-rw-rw-r--  1 1000 1000  11K Jul  8  2010 cmm_cfg.c
-rw-rw-r--  1 1000 1000 112K Jul  8  2010 cmm_asic.c
-rw-rw-r--  1 1000 1000  29K Jul  8  2010 cmm_aes.c
-rw-rw-r--  1 1000 1000 5.2K Jul  8  2010 client_wds.c
-rw-rw-r--  1 1000 1000  48K Jul  8  2010 ba_action.c
-rw-rw-r--  1 1000 1000  36K Jul  8  2010 action.c

With the source code in place (C files) i try again

https://pastebin.com/6dXsjZfj

And it throws a lot of errors, what makes me think i'm in the wrong path

any ideas on how to proceed with this ?

Thanks !

« Last Edit: April 28, 2018, 10:41:22 AM by brunoaduarte »
Logged

Gattsu

  • Technical Engineer
  • Level 3 Member
  • *
  • Posts: 139

Yea if files are missing then those are probably propriety or webGUI source codes, which are not included.
Logged