File: kernel/linux/Makefile
base-0 patch-1
Line 19Line 19
This is the Linux kernel version $(GARVERSION)
endef

This is the Linux kernel version $(GARVERSION)
endef

BUILDDEPS = devel/gcc
#BUILDDEPS = devel/gcc

DEPENDS = kernel/linux-image kernel/linux-modules kernel/linux-source
# Differentiate kernel builds by GARCH, rather than DESTIMG
WORKDIR = $(WORKROOTDIR)/$(GARCH)
COOKIEDIR = $(COOKIEROOTDIR)/$(GARCH)

# Differentiate kernel builds by GARCH, rather than DESTIMG
WORKDIR = $(WORKROOTDIR)/$(GARCH)
COOKIEDIR = $(COOKIEROOTDIR)/$(GARCH)

BUILD_ARGS = bzImage modules HOSTCC="$(build_CC)" CC="$(CC)" LD="$(LD)"
INSTALL_ARGS = modules_install
#BUILD_ARGS = bzImage modules HOSTCC="$(build_CC)" CC="$(CC)" LD="$(LD)"
#INSTALL_ARGS = modules_install
# this tells the kernel makefile that we want to put our kernels
# elsewhere.
# this tells the kernel makefile that we want to put our kernels
# elsewhere.
INSTALL_PATH = $(DESTDIR)$(prefix)/boot
INSTALL_MOD_PATH = $(DESTDIR)$(prefix)
INSTALL_ENV = INSTALL_PATH="$(INSTALL_PATH)" INSTALL_MOD_PATH="$(INSTALL_MOD_PATH)"
INSTALL_ARGS = modules_install
#INSTALL_PATH = $(DESTDIR)$(prefix)/boot
#INSTALL_MOD_PATH = $(DESTDIR)$(prefix)
#INSTALL_ENV = INSTALL_PATH="$(INSTALL_PATH)" INSTALL_MOD_PATH="$(INSTALL_MOD_PATH)"
#INSTALL_ARGS = modules_install
CONFIGURE_SCRIPTS = $(WORKSRC)/Makefile
BUILD_SCRIPTS = $(WORKSRC)/Makefile
#CONFIGURE_SCRIPTS = $(WORKSRC)/Makefile
#BUILD_SCRIPTS = $(WORKSRC)/Makefile
# Installations need to be done on a DESTIMG by DESTIMG basis.
# Since the kernel builds only once per GARCH, and that's what
# COOKIEDIR and WORKDIR are based on, the install scripts need
# to change with the DESTIMG. version is an exception because
# it does all of its work in $(STAGINGDIR)
# Installations need to be done on a DESTIMG by DESTIMG basis.
# Since the kernel builds only once per GARCH, and that's what
# COOKIEDIR and WORKDIR are based on, the install scripts need
# to change with the DESTIMG. version is an exception because
# it does all of its work in $(STAGINGDIR)
INSTALL_SCRIPTS = $(addprefix $(DESTIMG)-,$(WORKSRC)/arch/i386/boot/bzImage $(WORKSRC)/Makefile source) version
#INSTALL_SCRIPTS = $(addprefix $(DESTIMG)-,$(WORKSRC)/arch/i386/boot/bzImage $(WORKSRC)/Makefile source) version
EXTURVERSION = $(shell grep ^EXTRAVERSION $(WORKSRC)/Makefile | cut -d' ' -f3)
#EXTURVERSION = $(shell grep ^EXTRAVERSION $(WORKSRC)/Makefile | cut -d' ' -f3)
PATCHDIR=$(WORKSRC)
PATCHDIRFUZZ=3

# The above WORKDIR and COOKIEDIR munging make this package incompatible with
# BUILD_CLEAN
PATCHDIR=$(WORKSRC)
PATCHDIRFUZZ=3

# The above WORKDIR and COOKIEDIR munging make this package incompatible with
# BUILD_CLEAN
BUILD_CLEAN :=
export BUILD_CLEAN
#BUILD_CLEAN :=
#export BUILD_CLEAN
include ../../gar.mk

# export the current value of GARTARGET to the environment. When GAR gets
# around to building devel/gcc as a BUILDDEPS, that value will tell gcc to be a
# cross-compiler (or not, if GARBUILD == GARHOST).
include ../../gar.mk

# export the current value of GARTARGET to the environment. When GAR gets
# around to building devel/gcc as a BUILDDEPS, that value will tell gcc to be a
# cross-compiler (or not, if GARBUILD == GARHOST).
export GARTARGET
#export GARTARGET
extract-$(LINUX_DOTCONFIG):
        ln -sf $(CURDIR)/$(DOWNLOADDIR)/$(LINUX_DOTCONFIG) $(WORKDIR)/$(GARNAME)-$(GARVERSION)/.config
extract-$(LINUX_DOTCONFIG):
        ln -sf $(CURDIR)/$(DOWNLOADDIR)/$(LINUX_DOTCONFIG) $(WORKDIR)/$(GARNAME)-$(GARVERSION)/.config
Line 73Line 75
        cd $(WORKDIR)/$(GARNAME)-$(GARVERSION) && tar -zxvf $(CURDIR)/$(DOWNLOADDIR)/$(JFSCORE)
        $(MAKECOOKIE)

        cd $(WORKDIR)/$(GARNAME)-$(GARVERSION) && tar -zxvf $(CURDIR)/$(DOWNLOADDIR)/$(JFSCORE)
        $(MAKECOOKIE)

configure-$(WORKSRC)/Makefile:
        yes "" | $(MAKE) -C $(WORKSRC) oldconfig
        $(MAKE) -C $(WORKSRC) dep
        $(MAKE) -C $(WORKSRC) clean
        $(MAKECOOKIE)
#configure-$(WORKSRC)/Makefile:
#        yes "" | $(MAKE) -C $(WORKSRC) oldconfig
#        $(MAKE) -C $(WORKSRC) dep
#        $(MAKE) -C $(WORKSRC) clean
#        $(MAKECOOKIE)
install-$(DESTIMG)-%/bzImage:
        mkdir -p $(INSTALL_PATH)
        cp $*/bzImage $(WORKSRC)/System.map $(INSTALL_PATH)
        $(MAKECOOKIE)
#install-$(DESTIMG)-%/bzImage:
#        mkdir -p $(INSTALL_PATH)
#        cp $*/bzImage $(WORKSRC)/System.map $(INSTALL_PATH)
#        $(MAKECOOKIE)
install-$(DESTIMG)-$(WORKSRC)/Makefile:
        $(MAKE) $(INSTALL_ENV) -C $(WORKSRC) $(INSTALL_ARGS)
        $(MAKECOOKIE)
#install-$(DESTIMG)-$(WORKSRC)/Makefile:
#        $(MAKE) $(INSTALL_ENV) -C $(WORKSRC) $(INSTALL_ARGS)
#        $(MAKECOOKIE)
install-$(DESTIMG)-source:
        mkdir -p $(KERNEL_SOURCEDIR)
        rsync -pav $(WORKSRC)/ $(KERNEL_SOURCEDIR)/
        make -C $(KERNEL_SOURCEDIR) clean
        $(MAKECOOKIE)
#install-$(DESTIMG)-source:
#        mkdir -p $(KERNEL_SOURCEDIR)
#        rsync -pav $(WORKSRC)/ $(KERNEL_SOURCEDIR)/
#        make -C $(KERNEL_SOURCEDIR) clean
#        $(MAKECOOKIE)
install-version:
        install -d $(STAGINGDIR)/linux
        echo $(EXTURVERSION) > $(STAGINGDIR)/linux/extraversion
        echo $(GARVERSION) > $(STAGINGDIR)/linux/version
        echo $(GARVERSION)$(EXTURVERSION) > $(STAGINGDIR)/linux/full-version
        $(MAKECOOKIE)
#install-version:
#        install -d $(STAGINGDIR)/linux
#        echo $(EXTURVERSION) > $(STAGINGDIR)/linux/extraversion
#        echo $(GARVERSION) > $(STAGINGDIR)/linux/version
#        echo $(GARVERSION)$(EXTURVERSION) > $(STAGINGDIR)/linux/full-version
#        $(MAKECOOKIE)
# This is bad and wrong. DO NOT UNCOMMENT!!
#post-install:
# This is bad and wrong. DO NOT UNCOMMENT!!
#post-install: