Use external kernel and toolchain

hi. I'm compiling OpenWRT for a device with an unsupported CPU. The CPU manufacture has provided an OpenWRT SDK which is based on OpenWRT 3.10. due to a bug, that version only works on ubuntu 14 (not newer). How can I set it to compile tool-chain, kernel, and u-boot only, and my newer OpenWRT to use that toolchain, kernel, and u-boot?
I'm open to any advice, link or video.

Long story short - you can't easy. If even it's possible!

Now long story - you need to update source code to current OpenWrt. Most important is that you need to check kernel source, kernel patches and kernel drivers. Some of new kernels (in other words all current kernels) doesn't support old drivers. So probably you need to port that patches on new kernels. This can be challenge even for experienced kernel developers. Then you need to update toolchain. There you will hit other issue - sometime new sources refuses to compile on old compilers and vice versa. Even if you compile them then you can hit different issues based on 32 or 64 bit issues and changes on compilers between versions. For example now i'm trying to update library code that works on 32 bit GCC 5.X and after hour work runs on 64 bit GCC 9.3 but crash on library usage.
Next is u-boot... but probably you can connect the dots.

So - can you mix old code with newer OpenWrt... No. It doesn't work on that way. Because kernel have features that OpenWrt actively uses and IF you use old kernel things just doesn't exists or doesn't works as OpenWrt expect.

In result - probably you will waste lot of time back and forth between OpenWrt versions, codes, libraries with very low results.

Why don't you ask them for the source code? It's all GPL....

thanks. I will stick to the old one. I am no kernel developer

good option, we will try.

By the way, what is your device's brand and model?

Unsupported CPU doesn't mean you have to use an SDK or Kernel from the OEM. You'd be surprised what is included in the kernel these days.

As @user31894691 asked, what device? What architecture is the CPU? Who was the OEM? The more details you can give will help give you good answers :slight_smile:

1 Like

Sorry for delay, I was really busy. It's MediaTek MT7628. Apparently it has open source driver but my coworker who is in charge of hardware and low-level software believes it's Buggy.
I do appreciate how you help. Free software has the best community