Problems with ImageBuilder

Hi,

I trying to use the ImageBuilder to build the firmware for my AR300M but I am having problems.

First of all there does not seem to be a profile for it. What profile should I use?

I tried to use the GL-MT300A profile just to see if I would be able to generate anything, but I got this error:


/home/mh/test/openwrt/OpenWrt-ImageBuilder-ramips-mt7620.Linux-x86_64/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_mt7620/linux-3.18.27/scripts/dtc/bundled/dtc: relocation error: /lib/x86_64-linux-gnu/libpthread.so.0: symbol __libc_vfork, version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference
Makefile:1086: recipe for target 'install' failed

Any ideas on what goes wrong here?

Many thanks!

The profile to use is GL-MT300A.

Can you post the exact command you used. Also what is the system you are using. Seems this problem is due to your own system.

 

So the GL-MT300A profile should also work for the AR300M?

What I did was run “make image PROFILE=GL-MT300A”.

My system is Debian testing.

ah…

No, it doesn’t work with AR300M. This is imagebuilder of Ramips so it only works with MT300A and MT300N

Use AR71xx imagebuilder to build for AR300M 404 Page not found - GL.iNet

I didn’t try to build nand firmware using this imagebuilder though

I now tried the AR71xx ImageBuilder where there is a GL-AR300M profile and tried a “make image PROFILE=GL-AR300M” and get this error:

Collected errors:

  • opkg_install_cmd: Cannot install package mod-usb-storage.
    Makefile:129: recipe for target ‘package_install’ failed
    make[2]: *** [package_install] Error 255
    make[2]: Leaving directory ‘/home/mh/Downloads/OpenWrt-ImageBuilder-ar71xx-generic.Linux-x86_64’
    Makefile:100: recipe for target ‘_call_image’ failed
    make[1]: *** [_call_image] Error 2
    make[1]: Leaving directory ‘/home/mh/Downloads/OpenWrt-ImageBuilder-ar71xx-generic.Linux-x86_64’
    Makefile:178: recipe for target ‘image’ failed
    make: *** [image] Error 2

And even if an image for an MT300A will not run on an AR300M I should be able to compile an image.

So what is the problem that none of the two ImageBuilders actually can be used to compile an image?

Just tried. I found the problem.

Very sorry for this happened.

You can revise target/linux/ar71xx/generic/profiles, line 62, change “mod-usb-storage” to “kmod-usb-storage”

Then try to make the image again. This is a bug introduced before when add target. This is fine if not using the imagebuilder.

To complete your instructions: The file to modify is gli.mk in the directory you mentioned.

With your patch the make runs through, I can find a file “openwrt-ar71xx-generic-gl-ar300m-squashfs-sysupgrade.bin” in “build_dir/target-mips_34kc_uClibc-0.9.33.2/linux-ar71xx_generic/tmp” which I assume is the image.

Can I flash that to the device and if so how?

This makes things a little complicated. The firmware is for Nor so you need to boot into Nor flash.

The device always boot into Nand flash. If you want to boot into nor flash, check the docs Overview - GL.iNet Docs.

When you boot into the firmware, execute the following command and you will boot into Nor firmware. You will then be able to replace the firmware using the its UI. So I suggest that you put first two command in your /etc/rc.local so that it can always boot into Nor flash.

$ fw_printenv $ fw_setenv bootcount 3 $ reboot

So does that mean with the above instructions I can build an image for the nor-flash only and if I want to use it I have to boot into nor-flash from now on forever?

Is there no way to update the nand-flash?

If not why? Is nand-flash not rewritable or is it a limitation of the image-builder?

 

This is not the reason.

The reason is that I need to provide an Imagebuilder for Nand flash. I can build one if you do need.

Yes, if you could provide an imagebuilder for nand flash (along with some instructions on how to flash it) that would be great.

 

Please try this one. 404 Page not found - GL.iNet

Need to fix the mod-usb-storage as well if you met this problem.

Thanks for the package.

As above I changed “mod-usb-storage” to “kmod-usb-storage” on line 62 in target/linux/ar71xx/generic/profiles/gli.mk as above but get this error when I do a “make image PROFILE=GLAR300MNAND”:

Collected errors:

  • opkg_install_cmd: Cannot install package mod-usb-storage.
    Makefile:129: recipe for target ‘package_install’ failed
    make[2]: *** [package_install] Error 255
    make[2]: Leaving directory ‘/home/mh/Downloads/OpenWrt-ImageBuilder-ar71xx-nand.Linux-x86_64’
    Makefile:100: recipe for target ‘_call_image’ failed
    make[1]: *** [_call_image] Error 2
    make[1]: Leaving directory ‘/home/mh/Downloads/OpenWrt-ImageBuilder-ar71xx-nand.Linux-x86_64’
    Makefile:178: recipe for target ‘image’ failed
    make: *** [image] Error 2