Building, changes to config not saving

I downloaded openwrt SDK and running make menuconfig.
Each time I change something, I save it but the changes aren't all being saved to the config file.

For example, I can add or remove the option to build the image builder and that gets saved. Then again, I'm only looking at the .config file date since I'm not sure what to look for otherwise just yet.

I try to add/remove packages but the changes are never saved or at least, are never in the resulting build.

I noticed that all of the files are owned by root, could this be why and if not, what else could be causing this?

Thanks for any help you can provide.

Image builder or SDK?

Either way, nothing I find in them is root-owned. Everything is buildbot:buildbot

tar tvf openwrt-imagebuilder-ath79-generic.Linux-x86_64.tar.xz | fgrep -v 'buildbot/buildbot'
tar tvf openwrt-sdk-ath79-generic_gcc-7.4.0_musl.Linux-x86_64.tar.xz | fgrep -v 'buildbot/buildbot'

Safest is to remove what you've extracted (after backing up what you might later want of your own changes) and extract again. Likely you used sudo which virtually never needed when building OpenWrt. If you have to ask "when", then the answer is "not with anything you're doing".

Sorry, yes SDK.

Just trying to learn how to build my own using SDK rather than image builder.
Logged in as root, not using sudo, just 'make menuconfig' then saving the changes until final exit then 'make'. The build never changes, never has the packages I've selected in the config.

Don’t log in as root. Use a non-privileged user.

2 Likes

Sorry for not replying, yes, I'm trying that now. For some reason, it won't complete the build. I keep getting this;

make -r world: build failed. Please re-run make with -j1 V=s or V=sc for a higher verbosity level to see what's going on
/clients/openwrt-18.06/include/toplevel.mk:216: recipe for target 'world' failed
make: *** [world] Error 1

Working on solving this first since I've seen it before. Then I'll report what happened.

Update: Nope, cannot get past this for some reason. It is not clear to me if the 'world' thing is a package or if it is failing at hostapd.

make[4]: Entering directory '/clients/openwrt-18.06/build_dir/target-mipsel_24kc_musl/hostapd-full-internal/hostapd-2018-05-21-62566bc2/hostapd'
../src/ap/sta_info.o: In function `ap_sta_add':
sta_info.c:(.text.ap_sta_add+0x12e): undefined reference to `sta_track_claim_taxonomy_info'
collect2: error: ld returned 1 exit status
Makefile:1298: recipe for target 'hostapd' failed
make[4]: *** [hostapd] Error 1
make[4]: Leaving directory '/clients/openwrt-18.06/build_dir/target-mipsel_24kc_musl/hostapd-full-internal/hostapd-2018-05-21-62566bc2/hostapd'
Makefile:577: recipe for target '/clients/openwrt-18.06/build_dir/target-mipsel_24kc_musl/hostapd-full-internal/hostapd-2018-05-21-62566bc2/.built' failed
make[3]: *** [/clients/openwrt-18.06/build_dir/target-mipsel_24kc_musl/hostapd-full-internal/hostapd-2018-05-21-62566bc2/.built] Error 2
make[3]: Leaving directory '/clients/openwrt-18.06/package/network/services/hostapd'
time: package/network/services/hostapd/full-internal/compile#1.18#0.68#1.80
package/Makefile:107: recipe for target 'package/network/services/hostapd/compile' failed
make[2]: *** [package/network/services/hostapd/compile] Error 2
make[2]: Leaving directory '/clients/openwrt-18.06'
package/Makefile:103: recipe for target '/clients/openwrt-18.06/staging_dir/target-mipsel_24kc_musl/stamp/.package_compile' failed
make[1]: *** [/clients/openwrt-18.06/staging_dir/target-mipsel_24kc_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/clients/openwrt-18.06'
/clients/openwrt-18.06/include/toplevel.mk:216: recipe for target 'world' failed
make: *** [world] Error 2
$ make -j1 V=s package/network/services/hostapd
make: 'package/network/services/hostapd' is up to date.

Confusing.

SDK is meant for building individual packages, not the full firmware.

You need the full toolchain for compiling a full firmware.

2 Likes

I think the toolchain is installed. I am able to fully build. This only happens as soon as I change some things while in make menuconfig. I am mainly just removing packages. Mostly, I'm removing wireless and iptables since I don't need those.

I was able to get past this error but now I'm missing something else.

Collected errors:

  • satisfy_dependencies_for: Cannot satisfy the following dependencies for kmod-leds-gpio:
  •  kernel (= 4.14.120-1-15efa45c734b4799baf114b67a74bf8e)
    

Then a lot of other packages show the same complaint and it finally just ends.

package/Makefile:65: recipe for target 'package/install' failed
make[2]: *** [package/install] Error 255
make[2]: Leaving directory '/clients/openwrt-18.06'
package/Makefile:104: recipe for target '/clients/openwrt-18.06/staging_dir/target-mipsel_24kc_musl/stamp/.package_install' failed
make[1]: *** [/clients/openwrt-18.06/staging_dir/target-mipsel_24kc_musl/stamp/.package_install] Error 2
make[1]: Leaving directory '/clients/openwrt-18.06'
/clients/openwrt-18.06/include/toplevel.mk:216: recipe for target 'world' failed
make: *** [world] Error 2

I'm not sure if this is telling me I need a different OS kernel or that the kernel in the openwrt buildroot needs to be updated.

I think I have to manually remove all of the modules for packages I also removed. I thought that would get done automatically. Building now so see how fat I get.

LOL, I got a lot further but...

make[5]: Entering directory '/clients/openwrt-18.06/build_dir/target-mipsel_24kc_musl/linux-ramips_rt305x/linux-4.14.120'
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CHK     include/generated/bounds.h
  CHK     include/generated/timeconst.h
  CHK     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
  CHK     scripts/mod/devicetable-offsets.h
  CHK     include/generated/compile.h
  CC      drivers/net/ethernet/mtk/mtk_eth_soc.o
In file included from drivers/net/ethernet/mtk/mtk_eth_soc.c:34:0:
./include/net/netfilter/nf_flow_table.h:19:2: error: unknown type name 'nf_hookfn'
  nf_hookfn   *hook;
  ^~~~~~~~~
./include/net/netfilter/nf_flow_table.h:149:23: warning: 'struct nf_hook_state' declared inside parameter list will not be visible outside of this definition or declaration
          const struct nf_hook_state *state);
                       ^~~~~~~~~~~~~
./include/net/netfilter/nf_flow_table.h:151:25: warning: 'struct nf_hook_state' declared inside parameter list will not be visible outside of this definition or declaration
            const struct nf_hook_state *state);
                         ^~~~~~~~~~~~~

I'm not sure what that's telling you either. "Collected errors" sounds more like something that would come from the image builder as the full build system builds the kernel with the packages.

I'd start fresh with git clone https://git.openwrt.org/openwrt/openwrt.git into a clean directory and go from there.

1 Like

I cannot start fresh since it was a build with a package that is being built at the same time. It was put together by a friend so I've just been removing the entire build and copying the original every time I get to a point of problems I cannot fix.

I'm not using image builder and don't have it enabled in the menu tree options either.

Then pull that package's sources into your clean, fresh build tree.

Your error messages have repeatedly suggested that you're not following the well-proven path of

git clone https://git.openwrt.org/openwrt/openwrt.git
cd openwrt
./scripts/feeds update -a
./scripts/feeds install -a
make menuconfig
make 

In fact, I'm doing exactly this except for pulling down the newest code each time.

rm -rf openwrt-18.06
cp -r --preserve=links openwrt-18.06.org/ openwrt-18.06/
chown -R devs:devs openwrt (simlink to above)

cd openwrt
./scripts/feeds update -a
./scripts/feeds install -a
make menuconfig
make

yep...

Here's a few more chari so I can respond and agree..

Maybe I'm not understanding something or missing it.
I posted exactly the method I'm using. Other than downloading the source all over, I'm doing the same as you posted no?

Are you exactly on the same platform as your friend?

SDK is build based, so is imagebuilder.

I'm not sure then to be honest. He set it up for me since he uses it to build a package. It has the option to include image builder when it completes so I assume this means SDK?

No, you've got two, very suspect things going on there (past not identifying just what is in openwrt-18.06.org/)

cp -r --preserve=links

and

chown -R devs:devs openwrt

Please take the time to understand how the build system is intended to be used. The build system makes several very reasonable assumptions based on it being a git checkout (or truly equivalent to one) and owned by the user running it.

Please also take the time to understand that neither the SDK nor the Image Builder are intended for compilation of an image.

If you want multiple work trees, you should read and understand man git-worktree. The use of cp --preserve=links, a non-standard argument, seems likely to get you into problems without any benefit.

No, you've got two, very suspect things going on

Ok, let me see if I can clarify some parts.

I made a copy of my builtroot so that if I mess it up, I can simply overwrite it.
The original is openwrt-18.06 and the backup is openwrt-18.06.org.
When I mess up the original, I remove it then copy the .org version again. I only use preserve links in case there are links in the build env.

cp -r --preserve=links openwrt-18.06.org openwrt-18.06

Then, you suggested I not build as root so I use the user I log in as which is 'devs'. Therefore, I change the permissions of the buildroot to that user otherwise, I don't have permission to do anything with it.

chown -R devs:devs openwrt

So, maybe I should simply use sudo when working with the buildroot.

I'm not trying to do anything special. I only want to build a ramips version for a device I'd like to use. A friend set up the build env for me which works just fine but I the resulting firmware has packages I'd like to remove. When I use make menuconfig and remove those packages, that's when things break again. If I don't remove any packages, then I get a full build, it runs all the way through.

This means to me, the build env is ok for the most part I suppose. I don't know since this is all new to me and I'm just trying to learn as I go.

Please also take the time to understand that neither the SDK nor the Image Builder are
intended for compilation of an image.

I'm trying to but am not there yet. When my friend put this together, it was to built a custom package. That resulting package was then installed onto devices where I had built an image using image builder. Recently, he told me that when we build using this env, there is also a resulting firmware file which is why I've been playing with this thinking I could kill two birds with one stone. Build the package and get a custom firmware file.

Obviously, there is something I am not understanding still. Maybe I need to download my own full buildroot using the git method just to play around and learn. However, it is still not clear why I would do that since it seems as mentioned above, I'm missing some understanding of what SDK is used for. For me, image builder was all I've ever needed until now. Now, I need the SDK because using image builder, I cannot get a small enough build to fit on an old device I'd like to use and was told I could get it only using SDK.

Hope this helps to clarify what I'm up to a bit better.