Ansuel / GUI_ipk

5 stars 2 forks source link

Possible to compile newer packages? #7

Open Flole998 opened 4 years ago

Flole998 commented 4 years ago

Hi Ansuel,

thanks for all the work you did! I was wondering if its possible to compile packages that are normally only available for the latest OpenWRT? I would need asterisk16*.....

Would be great if you could try if that's possible!

nutterthanos commented 4 years ago

You know Ansuel released the toolchain here https://mega.nz/#!V98jBIZQ!KNSVwznEz9mwJG18bkJoY-pLzn_NSvlJRCwMubKLsLs but don't know how to use it tho

Flole998 commented 4 years ago

The toolchain is just the compiler, if you tell me how to integrate that into the openwrt build environment I can give it a try. So far my attempt wasn't successful as there is the whole brcm63xx-tch missing (which is obviously not part of the toolchain)

nutterthanos commented 4 years ago

I don't know how to integrate the toolchain (compiler) into the openwrt build environment. Also i thought that the whole brcm63xx-tch branch is based on mips hardware not arm. Should we Ask Ansuel how to use it like integrate and that?

Flole998 commented 4 years ago

brcm63xx is mips and brcm63xx-tch is arm. For some reason when I select the external build tools it tries to call them with some mips parameters even though I selected another arm neon target as target CPU and obviously that aborts the build.

nutterthanos commented 4 years ago

should i just follow openwrt wiki? because i sorta get stuck with it considering that it does not have a brcm63xx-tch compiler included and make menuconfig does not include anything about brcm63xx-tch only brcm63xx.

Flole998 commented 4 years ago

First of all you can't use the latest version but your version should match the openwrt version used on the device. Then you can do the steps in the wiki, and in the make menuconfig you need to choose an arm target (freescale imx9 for example) and specify the toolchain provided. You should also not "make" everything (just skip that step). Then you can try compiling a single package and you will probably see the same issue I'm seeing.

nutterthanos commented 4 years ago

well the openwrt version on the device is 15.05.1 and i thought you had to use a certain arm target for homeware based devices and how do you specify the toolchain provided? and also you can't use newer packages other than the ones already based for openwrt 15.05.1 maybe?

Flole998 commented 4 years ago

So you need to check out the sources for that. You should also use an older OS for building as some tools are now called differently in newer versions.

The target shouldn't matter if you specify the toolchain manually, it should be very similar though so the external toolchain is called properly. That's why I used an arm_neon based target.

External toolchain can be specified in the make menuconfig dialog.

Edit: Please don't forget that this is not working for me so don't expect it to work for you. Be happy if it is (and please compile something for me then ;) ) but dont be mad if it isn't working.

nutterthanos commented 4 years ago

like what OS should i use? like Ubuntu? and if Ubuntu what version? also uses brcm 63138 which is arm cortex a9 based

nutterthanos commented 4 years ago

I wonder what OS @Ansuel uses for the toolchain (compiler)/ openwrt build system

Flole998 commented 4 years ago

The build instructions in the openwrt archive mention Ubuntu 12.04 LTS, so with that one it should definitely work. I myself used Ubuntu 18 and it had some issues. If you setup a VM I would actually go with 12.04 for this (assuming that the toolchain can run on that).

The brcm63xx target is for mips only, that's why the brcm63xx-tch target was somehow implemented but that changes are not published anywhere or at least I couldn't find them.

nutterthanos commented 4 years ago

weirdly enough the packages before openwrt based on 17.01.0 were compiled for that specific target eg brcm63xx-*. Anything including that release and after have packages compiled for a specific cpu model eg arm-cortex-a9 or arm-cortex-a9_neon. And also could i just use the latest Ubuntu 12.04 LTS iso or which one 12.04.1, 12.04.2 etc? because different iso's has different packages or use the latest Ubuntu 12.04.5 LTS iso and update it fully?

Flole998 commented 4 years ago

The targets were changed, most likely so packages would only have to be built once and then can be re-used. That saves quite some resources.

I would just use the latest 12.04.5 ISO, as the latest release was in 2014 it should be able to build the 2015 openwrt.

nutterthanos commented 4 years ago

should i use git to clone this https://github.com/openwrt/archive and then switch branch to chaos_calmer or should i use it to clone https://github.com/openwrt/chaos_calmer? because are they both based on just 15.05 or 15.05.1?

Flole998 commented 4 years ago

To me it looks like they are the same.

nutterthanos commented 4 years ago

actually i think the https://github.com/openwrt/chaos_calmer is newer than the other one on branch chaos_calmer

Flole998 commented 4 years ago

Yeah right, I made a mistake comparing. It shouldn't really matter which one we use, I'd use (or try) the newer one first though.

nutterthanos commented 4 years ago

yeah im cloning it right now

nutterthanos commented 4 years ago

but international connections with my isp is crap right now not even 1 MB a second anymore to git clone anything. now its like 200KiB/s

nutterthanos commented 4 years ago

cloning is done but had to leave so back ready to work on it

nutterthanos commented 4 years ago

so i guess i run ./scripts/update -a then ./scripts install -a? or what commands do i run now?

Flole998 commented 4 years ago

"scripts/feed update -a" and "scripts/feed install -a"

Flole998 commented 4 years ago

Apparently I had some "cached" data in the staging and build dir, I cleared both and now it seems to go a lot further.

nutterthanos commented 4 years ago

well actually the commands are scripts/feeds update -a and scripts/feeds install -a not scripts/feed update -a and scripts/feed install -a so now what do i do? oh yeah make menuconfig

Flole998 commented 4 years ago

Select an arm target, specify the external toolchain and then let it build.

To answer my own question: It might be possible to compile newer packages but it's definitely not easy. There has to be a version of openwrt that is new enough to build asterisk (or whatever else you are trying to build) but old enough so the libraries like libuuid are still called libuuid and not libuuid1.

nutterthanos commented 4 years ago

@Flole998 Im getting different errors now make error 1 make error 2 make error 3 make error 4 make error 5 make error 6

Flole998 commented 4 years ago

Yup things like that can happen. I recommend choosing imx6 as architecture by the way.

nutterthanos commented 4 years ago

funny enough it worked now because i ran make menuconfig then make defconfig then make download then make -j10 and it worked

nutterthanos commented 4 years ago

@Ansuel So I tried to compile a single package eg wget and it failed with staging_dir/host/bin/flock: No such file or directory and i am using the toolchain that i downloaded from the mega.nz link in the README.MD file.

Petapton commented 4 years ago

Ok, guys. I managed to get it working. I write it here, since this is the less off-topic issue. I don't know if you @nutterthanos or @Flole998 need it, but it may be useful for other people.

So, I'm assuming you have already installed all stuff needed for openwrt buildroot. If you didn't, go and see Prerequisites. (you have to skip the 'Downloading sources' part, since all source you need has been provided in README)

Now you still don't have ipk files into ./bin/packages. To get them you have to understand Make sequence.

If you have questions don't hesitate. Good night.

Ansuel commented 4 years ago

Also take notice that to actually compile a package you need to select it in make menuconfig (or make package/NAME/compile won't do anything)

Flole998 commented 4 years ago

The buildroot was added after our attempts, that's why we had some issues ;) . Unfortunately my DGA broke so I no longer need this. I'm sure others will appreciate your guide, maybe it should be added to the readme file.

Petapton commented 4 years ago

Also take notice that to actually compile a package you need to select it in make menuconfig (or make package/NAME/compile won't do anything)

I'm not sure about this. For sure you get the sources compiled, but not packaged. At this point you have them compiled in build_dir sub-folders and you can copy them directly onto your router as normal executables.

tecufanujacu commented 4 years ago

Hi @Petapton , I'm trying to compile but I have an error in the make tools/compile, and precisely in the make tools/missing-macros/compile:

make tools/missing-macros/compile -j1 V=s
WARNING: Makefile 'package/feeds/packages/acme/Makefile' has a dependency on 'gnu-wget', which does not exist
WARNING: Makefile 'package/kernel/linux/Makefile' has a dependency on 'kmod-br-netfilter', which does not exist
WARNING: Makefile 'package/kernel/linux/Makefile' has a dependency on 'r8188eu-firmware', which does not exist
WARNING: Makefile 'package/kernel/linux/Makefile' has a dependency on 'kmod-drm', which does not exist
WARNING: Makefile 'package/feeds/luci/luci-app-https-dns-proxy/Makefile' has a dependency on 'https-dns-proxy', which does not exist
WARNING: Makefile 'package/feeds/packages/openvswitch/Makefile' has a dependency on 'kmod-mpls', which does not exist
WARNING: Makefile 'package/feeds/packages/openvswitch/Makefile' has a dependency on 'kmod-geneve', which does not exist
WARNING: Makefile 'package/kernel/ripdrv/Makefile' has a dependency on 'kmod-platform', which does not exist
WARNING: Makefile 'package/network/config/vti/Makefile' has a dependency on 'kmod-ip-vti', which does not exist
WARNING: Makefile 'package/network/config/vti/Makefile' has a dependency on 'kmod-ip6-vti', which does not exist
make[2]: Entering directory '/home/marvel/DGA4132/openwrt_18.x_tch_buildroot_based_custom/scripts/config'
make[2]: Leaving directory '/home/marvel/DGA4132/openwrt_18.x_tch_buildroot_based_custom/scripts/config'
make[1]: Entering directory '/home/marvel/DGA4132/openwrt_18.x_tch_buildroot_based_custom'
+ mkdir -p /home/marvel/DGA4132/openwrt_18.x_tch_buildroot_based_custom/staging_dir/target-arm-openwrt-linux-gnueabi_glibc
+ cd /home/marvel/DGA4132/openwrt_18.x_tch_buildroot_based_custom/staging_dir/target-arm-openwrt-linux-gnueabi_glibc
+ mkdir -p bin lib include stamp
mkdir -p /home/marvel/DGA4132/openwrt_18.x_tch_buildroot_based_custom/build_dir/target-arm-openwrt-linux-gnueabi_glibc/stamp
touch /home/marvel/DGA4132/openwrt_18.x_tch_buildroot_based_custom/staging_dir/target-arm-openwrt-linux-gnueabi_glibc/.prepared
+ mkdir -p /home/marvel/DGA4132/openwrt_18.x_tch_buildroot_based_custom/staging_dir/host
+ cd /home/marvel/DGA4132/openwrt_18.x_tch_buildroot_based_custom/staging_dir/host
+ mkdir -p bin lib include stamp
mkdir -p /home/marvel/DGA4132/openwrt_18.x_tch_buildroot_based_custom/build_dir/host/stamp /home/marvel/DGA4132/openwrt_18.x_tch_buildroot_based_custom/staging_dir/host/include/sys
install -m0644 /home/marvel/DGA4132/openwrt_18.x_tch_buildroot_based_custom/tools/include/*.h /home/marvel/DGA4132/openwrt_18.x_tch_buildroot_based_custom/staging_dir/host/include/
install -m0644 /home/marvel/DGA4132/openwrt_18.x_tch_buildroot_based_custom/tools/include/sys/*.h /home/marvel/DGA4132/openwrt_18.x_tch_buildroot_based_custom/staging_dir/host/include/sys/
ln -sf lib /home/marvel/DGA4132/openwrt_18.x_tch_buildroot_based_custom/staging_dir/host/lib64
touch /home/marvel/DGA4132/openwrt_18.x_tch_buildroot_based_custom/staging_dir/host/.prepared
make[2]: Entering directory '/home/marvel/DGA4132/openwrt_18.x_tch_buildroot_based_custom/tools/flock'
make[2]: Leaving directory '/home/marvel/DGA4132/openwrt_18.x_tch_buildroot_based_custom/tools/flock'
time: tools/flock/compile#0.01#0.00#0.10
make[2]: Entering directory '/home/marvel/DGA4132/openwrt_18.x_tch_buildroot_based_custom/tools/sed'
make[2]: Leaving directory '/home/marvel/DGA4132/openwrt_18.x_tch_buildroot_based_custom/tools/sed'
time: tools/sed/compile#0.02#0.01#0.11
make[2]: Entering directory '/home/marvel/DGA4132/openwrt_18.x_tch_buildroot_based_custom/tools/patch'
make[2]: Leaving directory '/home/marvel/DGA4132/openwrt_18.x_tch_buildroot_based_custom/tools/patch'
time: tools/patch/compile#0.02#0.01#0.12
make[2]: Entering directory '/home/marvel/DGA4132/openwrt_18.x_tch_buildroot_based_custom/tools/xz'
make[2]: Leaving directory '/home/marvel/DGA4132/openwrt_18.x_tch_buildroot_based_custom/tools/xz'
time: tools/xz/compile#0.02#0.00#0.13
make[2]: Entering directory '/home/marvel/DGA4132/openwrt_18.x_tch_buildroot_based_custom/tools/tar'
make[2]: Leaving directory '/home/marvel/DGA4132/openwrt_18.x_tch_buildroot_based_custom/tools/tar'
time: tools/tar/compile#0.03#0.00#0.16
make[2]: Entering directory '/home/marvel/DGA4132/openwrt_18.x_tch_buildroot_based_custom/tools/m4'
make[2]: Leaving directory '/home/marvel/DGA4132/openwrt_18.x_tch_buildroot_based_custom/tools/m4'
time: tools/m4/compile#0.02#0.01#0.12
make[2]: Entering directory '/home/marvel/DGA4132/openwrt_18.x_tch_buildroot_based_custom/tools/autoconf'
make[2]: Leaving directory '/home/marvel/DGA4132/openwrt_18.x_tch_buildroot_based_custom/tools/autoconf'
time: tools/autoconf/compile#0.01#0.01#0.10
make[2]: Entering directory '/home/marvel/DGA4132/openwrt_18.x_tch_buildroot_based_custom/tools/missing-macros'
install -d -m0755 /home/marvel/DGA4132/openwrt_18.x_tch_buildroot_based_custom/staging_dir/host/share/aclocal
install -m0644 ./src/m4/*.m4 /home/marvel/DGA4132/openwrt_18.x_tch_buildroot_based_custom/staging_dir/host/share/aclocal/
install -d -m0755 /home/marvel/DGA4132/openwrt_18.x_tch_buildroot_based_custom/staging_dir/host/bin
install -m0755 ./src/bin/* /home/marvel/DGA4132/openwrt_18.x_tch_buildroot_based_custom/staging_dir/host/bin/
install: cannot stat './src/bin/*': No such file or directory
Makefile:28: recipe for target '/home/marvel/DGA4132/openwrt_18.x_tch_buildroot_based_custom/staging_dir/host/stamp/.missing-macros_installed' failed
make[2]: *** [/home/marvel/DGA4132/openwrt_18.x_tch_buildroot_based_custom/staging_dir/host/stamp/.missing-macros_installed] Error 1
make[2]: Leaving directory '/home/marvel/DGA4132/openwrt_18.x_tch_buildroot_based_custom/tools/missing-macros'
time: tools/missing-macros/compile#0.00#0.01#0.11
tools/Makefile:152: recipe for target 'tools/missing-macros/compile' failed
make[1]: *** [tools/missing-macros/compile] Error 2
make[1]: Leaving directory '/home/marvel/DGA4132/openwrt_18.x_tch_buildroot_based_custom'
/home/marvel/DGA4132/openwrt_18.x_tch_buildroot_based_custom/include/toplevel.mk:216: set di istruzioni per l'obiettivo "tools/missing-macros/compile" non riuscito
make: *** [tools/missing-macros/compile] Errore 2

Do yoou have some suggestion?

Anyway I have some dubts:

* Then ran `make menuconfig` and selected target (`brcm63xx arm (technicolor)`) and target profile (based on my router model).

As target do you mean brcm63xx_tch, right?

Toolchain root: `/path/to/toolchain/staging_dir/toolchain-arm_cortex-a9+neon_gcc-4.8-linaro_glibc_eabi`

What do you mean for "/path/to/toolchain/staging_dir"? The toolchain root path isn't simply the path to the toolchain? Why do you indicate the stagin_dir? Should I extract the toolchain in the stagind_dir in the buildroot?

Thanks in advance.

Petapton commented 4 years ago

Do yoou have some suggestion?

Yes, I do. It also happened to me. There's something corrupt (missing-macro sources are... missing -_-). Anyway, just download missing-macro sources (see original OpenWrt buildroot; mind the 18.06) and then resume compiling.

Anyway I have some dubts:

* Then ran `make menuconfig` and selected target (`brcm63xx arm (technicolor)`) and target profile (based on my router model).

As target do you mean brcm63xx_tch, right?

When I wrote that post I didn't have the buildroot close to hand, so I had to remember. In target you have to select brcm63xx with tch option (or technicolor). I don't remember underscores. In subtarget select your router and in profile leave Generic, or at least this is what I did.

Toolchain root: `/path/to/toolchain/staging_dir/toolchain-arm_cortex-a9+neon_gcc-4.8-linaro_glibc_eabi`

What do you mean for "/path/to/toolchain/staging_dir"? The toolchain root path isn't simply the path to the toolchain? Why do you indicate the stagin_dir? Should I extract the toolchain in the stagind_dir in the buildroot?

Right, my fault. I pasted it from OpenWrt page (because I still didn't have my buildroot), but I forgot to adjust all details. Here the page.

tecufanujacu commented 4 years ago

@Petapton , thanks for answering me :-) immediately after writing to you I solved the problem but I forgot to update my previous post, me too I noticed that are missing the bin in missing-macro. I was been able to compile almost all my packages, but I have some problem with packages as mwan3 that wants the module ipv6.ko.

Petapton commented 4 years ago

@tecufanujacu, sorry for the delay. I get emails when I'm in bed and I'm too lazy to get up and reply. After two weeks I remember that I had pending threads and so I take care of them.

So, I think that's a problem with sources. It's hard to say without any log. Anyway, if you don't really need that package you could just disable it (go and uncheck into package list in menuconfig) and go ahead with your business.

tecufanujacu commented 4 years ago

@Petapton , unfortunately it surely is a problem caused by missing sources, you can try yourself to compile some package as mwan3 or openvpn.

Anyway also without disabling that package in menuconfig I'm able to compile others packages without problems.

Suxsem commented 4 years ago

hi @Petapton thank you for your useful post! I'm building my favourite packages right now.

I want to point a minor mistake in your post, "script/feeds install mypackage" should be "scripts/feeds install mypackage"

Just a question: I'm trying to make packages for my tg789vac v2 aka VANT-6 but I cannot find it in the subtarget list (i think becuase it's not supported). What i should use? I imagine VANT-F, right? Thank you!

Petapton commented 4 years ago

hi @Petapton thank you for your useful post! I'm building my favourite packages right now.

I want to point a minor mistake in your post, "script/feeds install mypackage" should be "scripts/feeds install mypackage"

Yes, thank you. Fixed.

Just a question: I'm trying to make packages for my tg789vac v2 aka VANT-6 but I cannot find it in the subtarget list (i think becuase it's not supported). What i should use? I imagine VANT-F, right? Thank you!

As long as I know VANT-6 is based on MIPS architecture, while VANT-F (and more in general all the boards covered by this buildenv) are based on ARM. For this board I'm using OpenWrt official repo and the ones provided by FrancYescO here on GitHub. I post my opkg.conf so you can copy it.

dest root /
dest ram /tmp
lists_dir ext /var/opkg-lists
option overlay_root /overlay
src/gz base https://raw.githubusercontent.com/FrancYescO/789vacv2_opkg/master/base
src/gz packages https://raw.githubusercontent.com/FrancYescO/789vacv2_opkg/master/packages
src/gz luci https://raw.githubusercontent.com/FrancYescO/789vacv2_opkg/master/luci
src/gz routing https://raw.githubusercontent.com/FrancYescO/789vacv2_opkg/master/routing
src/gz telephony https://raw.githubusercontent.com/FrancYescO/789vacv2_opkg/master/telephony
src/gz management https://raw.githubusercontent.com/FrancYescO/789vacv2_opkg/master/management

src/gz chaos_calmer_base http://archive.openwrt.org/chaos_calmer/15.05.1/brcm63xx/smp/packages/base
src/gz chaos_calmer_packages http://archive.openwrt.org/chaos_calmer/15.05.1/brcm63xx/smp/packages/packages
src/gz chaos_calmer_luci http://archive.openwrt.org/chaos_calmer/15.05.1/brcm63xx/smp/packages/luci
src/gz chaos_calmer_routing http://archive.openwrt.org/chaos_calmer/15.05.1/brcm63xx/smp/packages/routing
src/gz chaos_calmer_telephony http://archive.openwrt.org/chaos_calmer/15.05.1/brcm63xx/smp/packages/telephony
src/gz chaos_calmer_management http://archive.openwrt.org/chaos_calmer/15.05.1/brcm63xx/smp/packages/management

arch all 100
arch mips_mips32 400
arch brcm63xx 200
arch brcm63xx-tch 300

PS: I'm not 100% sure of what I said, so I would be glad if someone either confirmed it or proved it wrong. Nevertheless it actually works and doesn't allow to install incompatible kmods, so it should not brick your system.

Suxsem commented 4 years ago

@Petapton thank you for your very useful list. Unfortunately, https-dns-proxy is not present in chaos_calmer

I successfully built it selecting VANT-F as target and I installed it on my VANT-6. But when I try to run it I got this error: root@dsldevice:/etc/init.d# /usr/sbin/https_dns_proxy /usr/sbin/https_dns_proxy: line 1: syntax error: unexpected word (expecting ")")

Do you think it's related to a wrong architecture?

In this case, how can I build packages for VANT-6?

Thank you guys

Petapton commented 4 years ago

I successfully built it selecting VANT-F as target and I installed it on my VANT-6. But when I try to run it I got this error: root@dsldevice:/etc/init.d# /usr/sbin/https_dns_proxy /usr/sbin/https_dns_proxy: line 1: syntax error: unexpected word (expecting ")")

Do you think it's related to a wrong architecture?

I don't know. Try to inspect /usr/sbin/http_dns_proxy at line 1. What is raising that error?

In this case, how can I build packages for VANT-6?

Again, I don't know. As you can read from FrancYescO's repo README (you definitely should before using his repo), it is

Actually mirrored from https://pietrotti97.com/repo/OpenWrt/repo/Tg-789vac_V2/ with just few fixes to Packages(.gz) files

So I would try to ask them for an hypothetical buildenv. Good luck.

Suxsem commented 4 years ago

I will, thank you!!

Il 22 apr 2020 20:49, Petapton notifications@github.com ha scritto:

I successfully built it selecting VANT-F as target and I installed it on my VANT-6. But when I try to run it I got this error: root@dsldevice:/etc/init.d# /usr/sbin/https_dns_proxy /usr/sbin/https_dns_proxy: line 1: syntax error: unexpected word (expecting ")")

Do you think it's related to a wrong architecture?

I don't know. Try to inspect /usr/sbin/http_dns_proxy at line 1. What is raising that error?

In this case, how can I build packages for VANT-6?

Again, I don't know. As you can read from FrancYescO's repo READMEhttps://github.com/FrancYescO/789vacv2_opkg/blob/master/README.md (you definitely should before using his repo), it is

Actually mirrored from https://pietrotti97.com/repo/OpenWrt/repo/Tg-789vac_V2/ with just few fixes to Packages(.gz) files

So I would try to ask them for an hypothetical buildenv. Good luck.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/Ansuel/GUI_ipk/issues/7#issuecomment-617963608, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAGK2NPGRKQDZR5QJALPQYDRN434TANCNFSM4KIY5DNA.

fa1rid commented 4 years ago

Ok, guys. I managed to get it working. I write it here, since this is the less off-topic issue. I don't know if you @nutterthanos or @Flole998 need it, but it may be useful for other people.

So, I'm assuming you have already installed all stuff needed for openwrt buildroot. If you didn't, go and see Prerequisites. (you have to skip the 'Downloading sources' part, since all source you need has been provided in README)

  • So, first thing I did was to download both toolchain and building from README and unpacked them.
  • Then changed into buildenv directory and ran make clean and make dirclean. They're not necessary, but they clean the buildenv from all cache and results of past builds (that Ansuel did before packing and uploading it). More information
  • Then ran make menuconfig and selected target (brcm63xx arm (technicolor)) and subtarget (based on my router model). Then, went back to main menu and edited as below:

[] Advanced configuration options (for developers)   [] Use external toolchain     Target name: arm-openwrt-linux-gnueabi     Toolchain prefix: arm-openwrt-linux-gnueabi- (mind the dash at the end)     Toolchain root: /path/to/toolchain/toolchain-arm_cortex-a9+neon_gcc-4.8-linaro_glibc_eabi     Toolchain used: glibc

  • Saved and went back to terminal.
  • Next, I ran scripts/feeds update && scripts/feeds install -a (you may want to download only specific packages, so, after having updated, run scripts/feeds install mypackage)
  • Last I compiled tools. make tools/compile (if you get errors, solve them and re-run; keep in mind you can always launch make tools/mytool/compile to build only a specific tool, but it's better to compile the whole set)
  • At this point I was ready to compile. make package/mypackage/download, make package/mypackage/prepare and make package/mypackage/compile

Now you still don't have ipk files into ./bin/packages. To get them you have to understand Make sequence.

If you have questions don't hesitate. Good night.

You didn't mention which OS to use, for example Debian X? The guys mentioned Ubuntu 12. Secondly can you please tell me how folder structure should look like when I extract the toolchain and buildroot?

I want to install USB WiFi driver on my devices. I found the name of it to be Atheros AR9271, AR7010 devices (ath9k_htc)

https://wireless.wiki.kernel.org/en/users/drivers/ath9k_htc

But still I don't know how download the driver and install it. My devices is brcm63xx-tch Linux version 4.1.38.

Please help me. Thanks.

Petapton commented 4 years ago

You didn't mention which OS to use, for example Debian X? The guys mentioned Ubuntu 12.

I used Debian 9, but it should work on any linux-based OS without big problems. Be sure to have installed all the necessary stuffs. More about it here.

Secondly can you please tell me how folder structure should look like when I extract the toolchain and buildroot?

Extract toolchain in a folder. Extract buildroot in another one. Follow my "guide" from point 2.

I want to install USB WiFi driver on my devices. I found the name of it to be Atheros AR9271, AR7010 devices (ath9k_htc)

https://wireless.wiki.kernel.org/en/users/drivers/ath9k_htc

But still I don't know how download the driver and install it.

Better chances if you look for a pre-configured package in OpenWrt packages repo. Doing a little research you find there's already a package named kmod-ath9k-htc in the openwrt repo. You only need to compile it.

WARNING!

I never tried to compile kmods and, since these routers use a custom kernel, which we obviously don't have access to, installing self-compiled kmods could be a VERY DANGEROUS (and almost stupid) choice. You could end up bricking your router. Please be sure to be on optimal bank plan and to be able to recover your router in the case you brick it. If you don't know what I'm talking about, then take your time to read https://hack-technicolor.readthedocs.io/, to understand how TCH gateways work and how to deal with them to prevent permanent bricks.

Good luck and don't be too lazy.

fa1rid commented 4 years ago

Thanks for the reply. I know what you are talking about and I'm not lazy. I have read all the docs about hacking technicolor. Also I have been weeks searching for this driver and I'm really tired and exhausted ,that's I'm seeking the help from experts. I'm a very technical person but some of these stuff is still new to me. So what can be the solution? It will not work because of the custom kernel? Can you please compile it for me if you have the time and environment ready so I can test it?

I really appreciate your help and support!

Petapton commented 4 years ago

So what can be the solution? It will not work because of the custom kernel?

It's very likely going to be this way.

Can you please compile it for me if you have the time and environment ready so I can test it?

Yes, I should be able to give you at least a response until tomorrow.

fa1rid commented 4 years ago

Alright Thanks!

nutterthanos commented 4 years ago

Ok Thanks!

Petapton commented 4 years ago

@fa1rid and by "tomorrow" he actually meant "next month if you're lucky". Please forgive me, I'm late. Anyway, you're not lucky at all. I assumed your model is VANT-W, which is not supported by this toolchain. I'm sorry to bring you such a bad new after more than a month. Hope you found a workaround or a solution. If you didn't, I suggest you to do more investigation on that model/cpu architecture, but I think you won't find anything relevant. As far as I know, kernel modules (kmods) are built against the target kernel, meaning that you don't only need to match cpu architecture, but also kernel hash, which is actually impossible, so your only option is to find a suitable toolchain and build them yourself, which is very very unlikely to happen since technicolor is very very unlikely to release it.