[uClinux-dev] BusyBox issues

Cory T. Tusar ctusar at videon-central.com
Fri Feb 23 11:50:29 EST 2007


David McCullough wrote:
> Jivin John Williams lays it down ...
>> Hi David,
>>
>> David McCullough wrote:
>>> Jivin John Williams lays it down ...
>>>
>>>> David McCullough wrote:
>>>>
>>>>> Jivin Steve Bennett lays it down ...
>>>>>
>>>>>
>>>>>> This often (always?) happens if you reconfigure busybox and rebuild.
>>>>>> The solution is simply to clean out busybox after reconfiguring to  
>>>>>> ensure
>>>>>> that everything is rebuilt.
>>>>>>
>>>>>> $ make user/busybox_clean
>>>>> The code in user/busbox/Makefile is supposed to do a clean whenever
>>>>> the config is changed.
>>>>>
>>>>> I think we should change:
>>>>>
>>>>> 	.config.mkconfig: $(ROOTDIR)/config/.config
>>>>> 		...
>>>>> 		$(MAKE) clean; \
>>>>> 		...
>>>>>
>>>>> to a "distclean" perhaps to ensure everything is truly cleaned out.
>>>>> Someone want to try it :-) :-)
>>>> I've found that if you change the busybox config, you have to rebuild it 
>>>> (make user_only) *twice* before doing a make romfs, to ensure all new 
>>>> applets are built and properly symlinked.  Never taken the time to 
>>>> figure out why, just a gotcha.
>>>>
>>>> Anyone else seen this?
>>>
>>> Most likely because there is no Makefile seperation,  as in the
>>> Makefile that builds the config has probably got dependancies
>>> on the config that do not get fixed.
>>>
>>> I am guessing a good solution will be:
>>>
>>>  create a "makefile" that generates the config,  checks the config
>>>  cleans the old build and rebuilds using the "Makefile" as needed.
>> I'm a bit wary of mixing lowercase and uppercase [mM]akefiles in the 
>> same dir, for the reason that one day I'll have to stop putting off 
>> supporting cygwin for MicroBlaze builds!  I know this is already done 
>> extensively, but no point in adding to it!
>>
>> On that note, a while ago a Makefile.uc concept was proposed - 
>> user/Makefile would look for a .uc" makefile first and make -f on that, 
>> if possible.
> 
> There is always the GNUMakefile option as well.  Just seems uglier to
> me.
> 
> The .uc would at least make it uc-specific I guess and able to be
> included with source distros etc in a non-intrusive way.

We've support in our local uClinux repository for "Makefile.uClinux" files, 
which take precedence when building.  It's worked out quite nicely, and solved 
several gotchas for us (particularly with autoconf-based packages). 
Unfortunately, I'm long overdue for a sync to the main uClinux repository, so 
generating a patch for submission is not just a simple 'cvs diff'.  It only 
took me a few minutes to add though, so should be easy enough if someone feels 
up to it.

Something along the lines of...

all: config
	for i in $(sort $(dir_y)) $(dir_v) $(dir_p); do \
		if [ -d $$i ]; then \
			if [ -f $$i/Makefile.uClinux ]; then \
				make -C $$i -f Makefile.uClinux || exit $$?; \
			else \
				make -C $$i || exit $$?; \
			fi; \
		fi; \
	done

...from my current user/Makefile.

-Cory


-- 
Cory T. Tusar
Embedded Systems Engineer
Videon Central, Inc.
2171 Sandy Drive
State College, PA 16801
(814) 235-1111 x316
(814) 235-1118 fax


"Debugging is twice as hard as writing the code in the first place.
   Therefore, if you write the code as cleverly as possible, you are,
     by definition, not smart enough to debug it."  --Brian W. Kernighan



More information about the uClinux-dev mailing list