Image Builder "make info" not working

I've been trying to compile a profile specific image for my DM200, however I am unable to run the make info command without error to retreive the device profile list. Error message reports "no rule to make target info". Oddly, I can run the default make command without passing any variables and it runs successfully and builds the images. I've tried updating the feeds and checking out the branch again to no affect. I am guessing some odd environment variables are not configured correctly in my Debian setup. I am requesting help to resolve this build error as shown

root@debian:/openwrt# make info -j1 V=sc
make[1]: Entering directory '/openwrt'
make[1]: *** No rule to make target 'info'.  Stop.
make[1]: Leaving directory '/openwrt'
make: *** [/openwrt/include/toplevel.mk:227: info] Error 2
root@debian:/openwrt# 

try a regular user account as prescribed ( re-download/unpack new source )

Using a standard user with the sudo prefix I get the same error mesage.

type jason@debian:/openwrt$ sudo make info -j1 V=sc
make[1]: Entering directory '/openwrt'
make[1]: *** No rule to make target 'info'.  Stop.
make[1]: Leaving directory '/openwrt'
make: *** [/openwrt/include/toplevel.mk:227: info] Error 2

When using without sudo prefix I get a load of permission errors.

jason@debian:/openwrt$ make info -j1 V=sc
rm: cannot remove '/openwrt/tmp/info/.overrides-packageinfo-14964': Permission denied
make[3]: *** No rule to make target '/openwrt/tmp/info/.files-packageinfo-15223'.  Stop.
cat: /openwrt/tmp/info/.files-packageinfo-15223: No such file or directory
cat: /openwrt/tmp/info/.overrides-packageinfo-15223: No such file or directory
rm: cannot remove '/openwrt/tmp/info/.files-packageinfo.stamp.205ed691966a059e2fdd44387b2759b8': Permission denied
touch: cannot touch '/openwrt/tmp/info/.files-packageinfo.stamp.d41d8cd98f00b204e9800998ecf8427e': Permission denied
touch: cannot touch '/openwrt/tmp/info/.files-packageinfo.stamp': Permission denied
make[2]: *** [include/scan.mk:98: /openwrt/tmp/info/.files-packageinfo.stamp] Error 1
make[1]: *** [/openwrt/include/toplevel.mk:85: prepare-tmpinfo] Error 2
make: *** [/openwrt/include/toplevel.mk:225: info] Error 2

You should not use root/ uid=0 capabilities at any point for compiling OpenWrt, no root, su, sudo. Remove all that stuff again (as you've messed up the file access permissions by using sudo before) and start over, as ordinary user (and throw sudo away, at least mentally, you don't need it).

1 Like

Try make -i

I actually did this already, I only showed the sudo error messages to supplement the non-root account error messages, the script still throws all the permission errors. It's unclear how the permissions and ownership should be set for the openwrt directory. I was not able to find any reference material on how the permissions should be setup, it's still a bit strange why it can't be run under root (I understand that it's not best practice).

Interestingly this parameter make -i did run without error, unfortunately it didn't return/list the target profile names as expected. My issue must not be specific to the make info command but rather a general Debian setup issues, permissions, etc. I would appreciate some guidance from a some Linux "ninja" on how the directory/file permissions should be configured.

You do not need to care about permissions or ownerships, just download, unpack, and execute, all under a normal user.

So I did that again; removed dir, cloned source, checked out with Git, update feeds and then install, tried the make info command - returns error "No rule to make target 'info'. Stop"

jason@debian:~/openwrt$ make info -j1 V=sc
make[1]: Entering directory '/home/jason/openwrt'
make[1]: *** No rule to make target 'info'.  Stop.
make[1]: Leaving directory '/home/jason/openwrt'
make: *** [/home/jason/openwrt/include/toplevel.mk:227: info] Error 2
jason@debian:~/openwrt$ 

I also tried make image PROFILE=netgear_dm200 -j1 V=sc which fails with the following

jason@debian:~/openwrt$ make image PROFILE=netgear_dm200 -j1 V=sc
make[1]: Entering directory '/home/jason/openwrt'
make[1]: *** No rule to make target 'image'.  Stop.
make[1]: Leaving directory '/home/jason/openwrt'
make: *** [/home/jason/openwrt/include/toplevel.mk:227: image] Error 2
jason@debian:~/openwrt$ 

I think you're confusing imagebuilder syntax with building from source.

3 Likes

You could be right, various Wiki articles tend to overlap instructions which causes some confusion. I am going to abandon the make info and make image PROFILE=netgear_dm200 method and simply use the make menuconfig method which works fine. Thanks for all your feedback.

Looks to me like you are using a git repo here. To use an image builder you need to download a pre-built image builder file, extract it, CD into the directory, and run make info there.
I use the image builder often and it all works.

DM200 download page. There is a special image builder file at the bottom. That is the one you need, not sources. That file changes every build, so you will need a new one every time.

1 Like

Arh, the distinction is clear now which wasn't so reading through the Wiki's. I actually want to build from source therefore I ought to stay with make menuconfig => make method. Thanks again!

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