Update of /cvsroot/leaf/src/The_UnNamed_One/apps/buildtool_kernel
In directory 
sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv15949/apps/buildtool_kernel

Added Files:
        buildtool.cfg buildtool.mk 
Log Message:
initial import


--- NEW FILE: buildtool.cfg ---
<File buildtool.mk>
        Server = cvs-sourceforge
        Revision = HEAD
        Directory = buildtool_kernel
</File>

--- NEW FILE: buildtool.mk ---
# buildtool make file for kernel (pseudo package)
# $Id: buildtool.mk,v 1.1 2008/03/01 16:21:39 hejl Exp $
# 
# Note that this is some kind of a hack the linux source
# does not build the kernel, but only unpacks it as the headers 
# are needed by some programs
# 
# so a ./buildtool2.pl build kernel (we in here ) must do it

ifneq ($(strip $(MASTERMAKEFILE)),)
        include $(MASTERMAKEFILE)
endif

alias gcc=$(TARGET_CC)

LINUX_BUILDDIR=$(BT_BUILD_DIR)/kernel

# set some vars
KVERSION:=$(BT_KERNEL_RELEASE)
KIMAGE:=bzimage-$(KVERSION)
UPXIMAGE:=$(KIMAGE)-upx
UPXOPTIONS:=--best -f 

source: 
        echo "already unpacked by linux source"


$(LINUX_BUILDDIR): 
        mkdir -p $(LINUX_BUILDDIR)


.build: $(LINUX_BUILDDIR) chklinuxdir   
        perl -i -p -e 's,^CROSS_COMPILE\s*=.*,CROSS_COMPILE 
=$(BT_STAGING_DIR)/usr/bin/,g' $(BT_LINUX_DIR)/Makefile
        perl -i -p -e 's/CFLAGS\s*\:=\s*.*$$/CFLAGS \:= \$$\(CPPFLAGS\) -Wall 
-Wstrict-prototypes -Wno-trigraphs -Os \\/g' $(BT_LINUX_DIR)/Makefile     
        (cd $(BT_LINUX_DIR) ; ARCH=$(ARCH) make clean && ARCH=$(ARCH) make 
bzImage && ARCH=$(ARCH) make modules)
# install things
#       (cd $(BT_LINUX_DIR) ; ARCH=$(ARCH) ; INSTALL_PATH=$(LINUX_BUILDDIR) 
make install)
# this only works for i386 i suppose
        (cp $(BT_LINUX_DIR)/arch/$(ARCH)/boot/bzImage 
$(LINUX_BUILDDIR)/$(KIMAGE))
        (cp $(BT_LINUX_DIR)/System.map $(LINUX_BUILDDIR)/System.map-$(KVERSION))
        (mkdir -p $(BT_STAGING_DIR)/lib/modules)
        (cp $(BT_LINUX_DIR)/System.map $(BT_STAGING_DIR)/lib/modules/System.map)
        (cd $(BT_LINUX_DIR) ; make  ARCH=$(ARCH) 
INSTALL_MOD_PATH=$(LINUX_BUILDDIR) DEPMOD="$(BT_DEPMOD)" modules_install) 
        (cd $(BT_LINUX_DIR) ; make  ARCH=$(ARCH) 
INSTALL_MOD_PATH=$(BT_STAGING_DIR) DEPMOD="$(BT_DEPMOD)" modules_install) 
        (cd $(LINUX_BUILDDIR); \cp $(KIMAGE) $(UPXIMAGE) ; 
$(BT_TOOLS_DIR)/upx-2.02-i386_linux/upx $(UPXOPTIONS) $(UPXIMAGE))
        

$(BT_TOOLS_DIR)/.upxunpack:
        (cd $(BT_TOOLS_DIR); tar xvzf upx-2.02-i386_linux.tar.gz)
        touch $(BT_TOOLS_DIR)/.upxunpack

build: $(BT_TOOLS_DIR)/.upxunpack .build

chklinuxdir:
ifeq ($(strip $(BT_LINUX_DIR)),)
        $(error "$$BT_LINUX_DIR is not set")
endif
ifeq ($(strip $(BT_BUILDROOT)),)
        $(error "$$BT_BUILDROOT is not set")
endif

clean: chklinuxdir
        (cd $(BT_LINUX_DIR) && ARCH=$(ARCH) make clean)
        rm -rf $(LINUX_BUILDDIR)  
        -rm .build

srcclean:


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
leaf-cvs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/leaf-cvs-commits

Reply via email to