APU2 homemade imagebuild is different than original image

Dear Openwrt users and devs,

Im trying to build a custom image (ext4) with /dev/mem enabled and optimalisation tags, for a couple of days now.
Everything works with the normal pre-generatred combined.ext4.img but the problem start if I build the 21-02-3 software with the generic or 64 target config.

Wget ...../targets/21.02.3/targets/x86/generic/...../build.config -O .config

Even if I don't change anything else and flash the image I only can reach the device trough serial, it won't recognize the lan cable.

The network options and DHCP are good, I learned from that.

But if I flash the original x86/64 ..... Combined-ext4.img and I plug in a lan cable, some message shows up and tries to connect. Like eth0 .... Up-link:connected.

But if I use the own build image and plug a lan cable in, nothing will show up. When I use Opkg listevery single package thats inside the /x86/64 build.config on y is shows up. So I don't know anymore where to look.

I tried so far

make distclean

Multiple times to clean and restart everything, using diff targets from master to v21.02.3. generic or 64. Without succes.

Each build has the same problem.

Now is the idea, to use the pre-generatred .config file set and change everything from the .config file of generic by hand to mach. And use make defconfig to see if it will take the change. Here I got stuck the config file says:

CONFIG_TARGET_OPTIMALISATION="-O -pipe Intel something something"

And I can't change it, every time I load:

Make defconfig

Everything change back, and I don't know what to change to fix that, i know for sure I don't have a pentium4 but a amd gx412tc and 3 times I210at. From the Openwrt device page it says "to further optimize the produced binaries ... ... SET CONFIG_TARGET_OPTIMIZATION="-Os -pipe -march=btver2"

And if this images doesn't work I probably gonna try to:

  1. Try to create a patch that set the /dev/mem automatically to y, don't even know if that's possible. And try to create a patch that increase automatically the size of the disk online after install.

  2. Try to edit the include/kernel-version.mk to match the newly generated kernel md5 checksum. To use the generated quick image builder. Probably not going to work because somewhere will be a .vermagic file created, and kernel-version.mk doesn't have to do with it.

But if u know why the lan ports (I210xt) won't work with a custom image or know why the cpu target can't change please let me know?

Sorry for my English.

Thanks in advance.

And some afterword:
I just found out that the Openwrt repository easyer can be browsed by using gitk. And wow it's complex and really thanks to all that have some sense what there are doing, and everything they do to make Openwrt great!

I really don't have a clue how everything comes together and works but it's amazing to see and I learn every day something new about Openwrt.

I think i stumble about the hang on boot bug.

After some tinkering around there was no difference between the pre build img.gz and mine build img.gz
the packages installed are the same and logging the boot it happend once at the pre build package.
The modules need to be loaded, but it just wont load the modules propperly or at all the serial console wants a enter to continue, but there is no way to give it that fast at that moment.

Even a reboot wont fix the problem it just give the same problem it will always hangs on boot and stops loading the modules.

A fresh new install is the only solution to recover the device.

The altering of the .config by hand did the trick, also if you are in the make makeconfig menu to enable the optimization options you need the check the box of the link before the options are shown.

thanks to all who tried to help :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.