All of lore.kernel.org
 help / color / mirror / Atom feed
* Cleaning up the "linux" directory
@ 2009-08-22  9:38 Ulf Samuelsson
  2009-08-22 13:59 ` Ulf Samuelsson
  2009-08-23 10:35 ` Cleaning up the "linux" directory Marcin Juszkiewicz
  0 siblings, 2 replies; 5+ messages in thread
From: Ulf Samuelsson @ 2009-08-22  9:38 UTC (permalink / raw)
  To: openembedded-devel

As everyone knows, the kernel directory is a mess:
I have been thinking about what to do about this,
and with the ability to include files in subdirectories,
I think I have found a nice solution.

New variables

CPU_FAMILY
KERNEL_MAJOR
KERNEL_MINOR

For future kernels,

Did not try this, yet but this looks promising...

-----------------------------------------------------------------------------
# linux-2.6.30.bb (replacing the old one)
# New style recipe for kernel builds
# Hopefully no need to have custom recipies in the top directory
# Mark archs/machines that this kernel supports
DEFAULT_PREFERENCE = "-1"
require linux-v2.inc
PR = "r0"
# Yes, that's all!

-----------------------------------------------------------------------------
# "linux-v2.inc" Contains
require linux.inc

CPU_FAMILY ?= "dummy-arch"
KERNEL_MAJOR  = "${PV}"
KERNEL_DIR = "${FILE_DIRNAME}/linux-${KERNEL_MAJOR}"
require ${KERNEL_DIR}/version.inc

KERNEL_MINOR_DIR = ${KERNEL_DIR}/${KERNEL_VERSION}
KERNEL_CPU_FAMILY_DIR=${KERNEL_DIR}/${CPU_FAMILY}

S = "${WORKDIR}/linux-${KERNEL_MAJOR}"

KERNEL_SOURCE_DIR="${KERNELORG_MIRROR}/pub/linux/kernel/v2.6"
SRC_URI = "${KERNEL_SOURCE_DIR}/linux-${KERNEL_MAJOR}.tar.bz2 "
MINOR_PATCH=${KERNEL_SOURCE_DIR}/patch-${KERNEL_MAJOR}.${KERNEL_MINOR}.bz2

# Include ${MINOR_PATCH}
# Include any other common patches for this minor version
require	${KERNEL_MINOR_DIR}/patches/SRC_URI_append.inc
# Any customizations for this minor version
require	${KERNEL_MINOR_DIR}/linux-${KERNEL_VERSION}.inc

# Customize for the CPU_FAMILY
# Note that this can contain further includes for minor versions
require	${KERNEL_CPU_FAMILY_DIR}/patches/SRC_URI_append.inc
require	${KERNEL_CPU_FAMILY_DIR}/common/linux-${KERNEL_VERSION}.inc
include
${KERNEL_CPU_FAMILY_DIR}/boards/${MACHINE}/linux-${KERNEL_VERSION}.inc
#
-----------------------------------------------------------------------------
# "${KERNEL_DIR}/version.inc" contains
KERNEL_LATEST_MINOR = "5"
KERNEL_MINOR ?= "${KERNEL_LATEST_MINOR}"
KERNEL_VERSION = "${KERNEL_MAJOR}.${KERNEL_MINOR}"



-----------------------------------------------------------------------------
# Possible contents of ${KERNEL_CPU_FAMILY_DIR}/patches/SRC_URI_append.inc
require {KERNEL_CPU_FAMILY_DIR}/patches/${KERNEL_VERSION}/SRC_URI_append.inc

#
-- 
Best Regards
Ulf Samuelsson




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-08-23 12:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-22  9:38 Cleaning up the "linux" directory Ulf Samuelsson
2009-08-22 13:59 ` Ulf Samuelsson
2009-08-22 14:59   ` Cleaning up the "linux" directory - Available in origin/ulf/linux-2.6.30.2 Ulf Samuelsson
2009-08-23 10:35 ` Cleaning up the "linux" directory Marcin Juszkiewicz
2009-08-23 12:33   ` Ulf Samuelsson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.