Make seems to be successful, but cannot find bin file (940n v6)

940n v6 has 4 MB flash I think.
Scroll before generating index for packages, it will probably complain that the size is bigger than the max possible.

You probably need to remove some packages to make it work.

1 Like

$ make V=s should tell you what you need to know.

1 Like

I use "make -j1 V=s " , show no error, just the folder is empty

I only include Luci and wpa-supplicant basic. Removed others already.

If the image is too big it will not be generated. Because I compiled it for more than 1 device I ended up in a somehow similar situation, not exactly the same, from 3 devices only 2 had the image generated. Regarding the device that it had no image generated there was a message somewhere in the log saying something that image... too big (don't remember exactly) (build didn't stopped there, just went on until the end).
Not sure how it's acting when you compile for one single device and the size is bigger than the max possible. I kinda believe that it will fail to create the image, complain in the log about it and go on until the end (because there isn't actually much done after the image is created) and you end up with no .bin files.

By looking at wiki it looks like 940 only has 18.06.9 images. That kinda tells me that 19.07 it's already too big with default configs If you want 19.07 you probably need to remove something you don't need. If you have to add something for your particular use then well you have to remove enough stuff to make enough free space (don't be surprise that you basicaly just can't make enough free space without having to remove stuff like Luci, PPPoE, entire wireless...)
I know it's not exactly what you want to hear, but the situation with 4MB flash 32MB ram devices will not improved. The code just becomes bigger in time...
The 4MB flash is not actually the biggest problem, the 32MB ram is actually the biggest problem, because you might have a spike in ram usage and end up with essential processes being killed cause not enough ram and with your devices just random stopping to work, random resseting, etc...

The complain about image being too big to generate the .bin is not that visible to be honest. You kinda have to look in the area from the log where that part supposed to happen to actually find the message. I'm sorry for not remembering the exact message. (I had my own WTF moment cause all 3 devices were 4MB flash, because 2 happy got the .bin and it was the exactly same .config, same platform, same packages, it just went to check the log area where the .bin is built (I remembered that at some point in time one of the sysupgrade images was bigger than the other 2, think now all are same size due to padding or something like that), this is how i found the complain about the image too big)

L.E.: What OpenWRT version you have running on 940N v6?
L.E. 2: Just an example. You can adapt it to assume how big the image will become/about how many kB you need to remove (to make space) when you add/replace packages:

wpad-mini 253kB

wpad-basic 330kB
So if you decide to replace wpad-mini with wpad-basic you can expect an increase of 77kB. Taking into consideration that you want 19.07 I'd remove stuff of at least 77kB and try to compile. If still no .bin then more stuff needs to be removed...
(This part in the L.E. 2 is just wrote in a raw format and not exactly correct regarding how many kB you need to remove if you add or replace something. But well it's a good starting point that can be adjusted for each particular case...)

You don't have "Build the OpenWRT Image Builder" select that and retry "make"

Thanks so much for very detail explanation. Btw , can manually choose like 18.06 ?

The 940n have been ported to ath79, and there are OWRT 19 images for it at


Bro, what i need is only two things: Luci + wpa-supplicant, so i make my own firmware. Now i have successfully output bin file. But after upgrade over official firmware, the router not boot up (the orange led is on constantly, laptop not get DHCP IP). So, i restored the official firmware, and i noticed that the last login password is still there after restore. Previous my experience is after the official firmware is restored, normally need to make the password again. No idea what is happen.

Them images pretty much only include those two, because of insufficient space for additional packages :wink:

1 Like

This is how I compile from a zero openwrt:

git clone <directory_name>
cd ~/<directory_name>
git fetch origin

to chose openwrt 18.06:

git checkout --track origin/openwrt-18.06

to chose openwrt 19.07:

git checkout --track origin/openwrt-19.07

if you don't use git checkout --track xyz you are bulding master branch and master branch is well WiP, it can run fine or be unstable
next line (git branch -l) is only if you want to check on what branch you are, it's not actually needed

git branch -l
./scripts/feeds update -a
./scripts/feeds install -a
make defconfig
make menuconfig

next line (make download) helps if you run more than 1 thread. i use it even with 1 thread

make download
make V=s

So far I didn't had problems (except one case when well Ubuntu kernel was messed up for months forcing me to move to Manjaro).

If you want to stay with 18.06 you can use the Image Builder ( ), it's easier and to be honest I doubt u will miss many things compared to lastest; taking into consideration that release 18.06.9 is the last one for 18.06 I don't expect much activity in the 18.06 branch. Keep in mind that 18.06 will probably not receive many updates in the future and it might start to have security issues.

If the network switch in 18.06 or ar7xxx 19.07 (no clue how to do it for ath79) is acting up (random hanging) you will probably want to edit the file <openwrt_directory>/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c and remove the following line:

pdata->use_flow_control = 1;

from this area (the below quote is from 18.06, think it's the same in ar7xxx 19.07, if not should be easy to find it)

	case ATH79_SOC_TP9343:
		if (id == 0) {
			pdata->reset_bit = AR933X_RESET_GE0_MAC |
			pdata->set_speed = ath79_set_speed_dummy;

			if (!pdata->phy_mask)
				pdata->phy_mask = BIT(4);
		} else {
			pdata->reset_bit = AR933X_RESET_GE1_MAC |
			pdata->set_speed = ath79_set_speed_dummy;

			pdata->speed = SPEED_1000;
			pdata->duplex = DUPLEX_FULL;
			pdata->switch_data = &ath79_switch_data;
			pdata->use_flow_control = 1;

			ath79_switch_data.phy_poll_mask |= BIT(4);

		pdata->has_gbit = 1;
		pdata->is_ar724x = 1;

You are basicaly removing flow control from lan switch (without that line you might notice some lower speed, for me I prefer to trade performance over stability). In some cases it's causing the switch to not behave properly.
(Open the dev-eth.c in a simple text editor (like Mousepad), search for pdata->use_flow_control = 1; until u find it in the above section and just delete that entire line and save the file. After that you compile openwrt, the file needs to be edited before you run make else it will do nothing.)

I remembered I read some time ago about someone complaining about unstable lan switch and TP9343 SoC. (and i also face a similar problem with ar7240, removing this line makes things better but not perfect :stuck_out_tongue: ; at least in my case the switch with flow control was hanging in less than 6 hours, everything else was happy working just the lan switch was stuck).

If you don't use the lan switch or don't have any problems with the lan switch with openwrt just ignore this L.E. . I wrote it just in case.

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