[OLPC-devel] Re: good news

Jordan Crouse jordan.crouse at amd.com
Mon Jul 31 12:30:16 EDT 2006


On 31/07/06 17:36 +0200, Carl-Daniel U. Hailfinger wrote:
> I need some help fighting the buildrom makefiles.

> LZMA_URL=http://switch.dl.sourceforge.net/sourceforge/sevenzip
> LZMA_SOURCE=lzma443.tar.bz2
> LZMA_DIR=$(BUILD_DIR)/lzma
> LZMA_SRC_DIR=$(LZMA_DIR)/lzma
> LZMA_STAMP_DIR=$(LZMA_DIR)/stamps
> LZMA_LOG_DIR=$(LZMA_DIR)/logs
>
> ifeq ($(VERBOSE),y)
> LZMA_BUILD_LOG=/dev/stdout
> LZMA_INSTALL_LOG=/dev/stdout
> else
> LZMA_BUILD_LOG=$(LZMA_LOG_DIR)/build.log
> LZMA_INSTALL_LOG=$(LZMA_LOG_DIR)/install.log
> endif
>
> $(SOURCE_DIR)/$(LZMA_SOURCE):
>	@ mkdir -p $(SOURCE_DIR)
>	@ wget -P $(SOURCE_DIR) $(LZMA_URL)/$(LZMA_SOURCE)
>
> $(LZMA_STAMP_DIR)/.unpacked: $(SOURCE_DIR)/$(LZMA_SOURCE)
>	@ echo "Unpacking lzma compressor..."

Just say "Unpacking lzma..." - we understand what it is.

>	@ tar -C $(LZMA_DIR) -jxf $(SOURCE_DIR)/$(LZMA_SOURCE)
>	@ touch $@	
>
> $(LZMA_STAMP_DIR)/.patched: $(LZMA_STAMP_DIR)/.unpacked
>	@ touch $@

Get rid of this target - its not needed.

> $(LZMA_SRC_DIR)/olpc-boot-loader: $(LZMA_STAMP_DIR)/.patched

I doublt that your final deliverable is called olpc-boot-loader.  Change
this target to whatever the built binary is.  Also, make the dependency 
$(LZMA_STAMP_DIR)/.unpacked instead.

>	@ echo "Building lzma compressor..."
>	@ $(MAKE) -C $(LZMA_SRC_DIR)/C/7zip/Compress/LZMA_Alone -f makefile.gcc LDFLAGS="$(LZMA_LDFLAGS) $(HOST_LDFLAGS)" all > $(LZMA_BUILD_LOG) 2>&1

This is a "local" binary right (i.e. not uclibc based) - you'll want to make
sure the right CFLAGS and LDFLAGS is used - check mkelfimage.mk for an
example of that.

>$(LZMA_TARGET): $(LZMA_SRC_DIR)/olpc-boot-loader

This is obviously not the right dependency (see above).  Also, I don't see
$(LZMA_TARGET) defined anywhere.  You should change that to whatever the
final name of the tools is (probably $(INITRD_DIR)/sbin/lzma).

>	@ install -d $(INITRD_DIR)/sbin
>	@ install -m 0755 $< $@
>	@ $(STRIP) $@

> $(LZMA_STAMP_DIR) $(LZMA_LOG_DIR):
>	@ mkdir -p $@

> lzma: $(LZMA_STAMP_DIR) $(LZMA_LOG_DIR) $(LZMA_TARGET)

Again, replace LZMA_TARGET with the right target

> lzma-clean:
>	@ echo "Cleaning lzma..."
>	@ $(MAKE) -C $(LZMA_SRC_DIR) clean > /dev/null 2>&1

> lzma-distclean:
>	@ rm -rf $(LZMA_DIR)/*

> .PHONY: lzma-message

This isn't needed anymore - its an old relic from way back






More information about the Devel mailing list