[OpenWrt-Devel] [PATCH] build: don't call prereq for any package/symlinks rules

Mathieu Olivari mathieu at codeaurora.org
Mon Apr 27 20:15:36 EDT 2015


I'm actually talking about the command below:
$ make package/symlinks

Right after the git clone, it does open the menuconfig. Which ends-up in
generating a .config, which has to be deleted anyway as any package from
feed would get removed.

Thanks,
Mathieu

-----Original Message-----
From: openwrt-devel [mailto:openwrt-devel-bounces at lists.openwrt.org] On
Behalf Of Toerless Eckert
Sent: Monday, April 27, 2015 4:59 PM
To: Mathieu Olivari
Cc: openwrt-devel at lists.openwrt.org
Subject: Re: [OpenWrt-Devel] [PATCH] build: don't call prereq for any
package/symlinks rules


Mathieu:

I can't quite follow your explanations. I ahve been building what looks to
me perfectly well working 14.07 images by just doing:

git clone git://git.openwrt.org/openwrt.git cd openwrt # Clean workspace now

cp real.config .config
make defconfig
make

Your mail seems to indicate that that supposedly does not work. Can you
please tell me what exactly is breaking when i do that ?

Thanks
    Toerless

On Mon, Apr 27, 2015 at 04:46:49PM -0700, Mathieu Olivari wrote:
> Most of the time, we want to make sure OpenWrt has been configured and 
> setup before start running make. However, in case of package/symlinks, 
> forcing prereq as a dependency creates multiple issues:
> *when executed on a clean workspace, it will prompt for user input  
> and open a menuconfig window before executing the feeds command *the 
> only way around that is to provide a .config. However, the "prereq"
>  target would then run a "make defconfig", which will remove all the  
> packages in the .config but from external feeds, as feeds have not 
> been  installed yet.
> 
> The only way to currently work around this, is to generate a fake 
> config by running "make defconfig", then "make package/symlinks", copy 
> the real config (which at this point disregards the previously 
> generated config), and run make defconfig again. Something like this:
> 
> make defconfig
> make package/symlinks
> cp real.config .config
> make defconfig
> 
> This change is removing the need for the first defconfig, making the 
> process more logical for OpenWrt users using the package/symlinks target.
> 
> Signed-off-by: Mathieu Olivari <mathieu at qca.qualcomm.com>
> ---
>  include/toplevel.mk | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/include/toplevel.mk b/include/toplevel.mk index 
> d8651d9..b3b344d 100644
> --- a/include/toplevel.mk
> +++ b/include/toplevel.mk
> @@ -178,6 +178,7 @@ ifeq ($(SDK),1)
>  else
>  
>  %::
> +ifeq ($(filter package/symlinks%,$(MAKECMDGOALS)),)
>  	@+$(PREP_MK) $(NO_TRACE_MAKE) -r -s prereq
>  	@( \
>  		cp .config tmp/.config; \
> @@ -186,6 +187,7 @@ else
>  			printf "$(_R)WARNING: your configuration is out of
sync. Please run make menuconfig, oldconfig or defconfig!$(_N)\n" >&2; \
>  		fi \
>  	)
> +endif
>  	@+$(ULIMIT_FIX) $(SUBMAKE) -r $@ $(if $(WARN_PARALLEL_ERROR), || { \
>  		printf "$(_R)Build failed - please re-run with -j1 to see
the real error message$(_N)\n" >&2; \
>  		false; \
> --
> 1.9.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list