linux: add support to specify $KERNEL_UBOOT_TARGET, $KERNEL_UBOOT_EXTRA_TARGET, $KERNEL_MAKE_EXTRACMD, so we support kernels new devicetree support and support building zImage kernels with u-boot

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2014-03-03 13:43:08 +01:00
parent 3ddb4cec35
commit cbe2743e2e
8 changed files with 69 additions and 3 deletions

View File

@ -50,7 +50,7 @@ fi
PKG_MAKE_OPTS_HOST="ARCH=$TARGET_ARCH headers_check" PKG_MAKE_OPTS_HOST="ARCH=$TARGET_ARCH headers_check"
if [ "$BOOTLOADER" = "u-boot" ]; then if [ "$BOOTLOADER" = "u-boot" ]; then
KERNEL_IMAGE="uImage" KERNEL_IMAGE="$KERNEL_UBOOT_TARGET"
else else
KERNEL_IMAGE="bzImage" KERNEL_IMAGE="bzImage"
fi fi
@ -133,7 +133,13 @@ make_target() {
$SCRIPTS/install initramfs $SCRIPTS/install initramfs
) )
LDFLAGS="" make $KERNEL_IMAGE LDFLAGS="" make $KERNEL_IMAGE $KERNEL_MAKE_EXTRACMD
if [ "$BOOTLOADER" = "u-boot" -a -n "$KERNEL_UBOOT_EXTRA_TARGET" ]; then
for extra_target in "$KERNEL_UBOOT_EXTRA_TARGET"; do
LDFLAGS="" make $extra_target
done
fi
if [ "$PERF_SUPPORT" = "yes" -a "$DEVTOOLS" = "yes" ]; then if [ "$PERF_SUPPORT" = "yes" -a "$DEVTOOLS" = "yes" ]; then
( cd tools/perf ( cd tools/perf
@ -164,6 +170,13 @@ make_target() {
} }
makeinstall_target() { makeinstall_target() {
if [ "$BOOTLOADER" = "u-boot" ]; then
mkdir -p $INSTALL/usr/share/u-boot
for dtb in arch/arm/boot/dts/*.dtb; do
cp $dtb $INSTALL/usr/share/u-boot
done
fi
if [ "$PERF_SUPPORT" = "yes" -a "$DEVTOOLS" = "yes" ]; then if [ "$PERF_SUPPORT" = "yes" -a "$DEVTOOLS" = "yes" ]; then
mkdir -p $INSTALL/usr/bin mkdir -p $INSTALL/usr/bin
cp -P tools/perf/perf $INSTALL/usr/bin/ cp -P tools/perf/perf $INSTALL/usr/bin/

View File

@ -83,10 +83,18 @@ makeinstall_target() {
mkdir -p $INSTALL/usr/share/u-boot mkdir -p $INSTALL/usr/share/u-boot
cp ./u-boot.bin $INSTALL/usr/share/u-boot cp ./u-boot.bin $INSTALL/usr/share/u-boot
if [ -f "./u-boot.img" ]; then
cp ./u-boot.img $INSTALL/usr/share/u-boot
fi
if [ -f "./MLO" ]; then if [ -f "./MLO" ]; then
cp ./MLO $INSTALL/usr/share/u-boot cp ./MLO $INSTALL/usr/share/u-boot
fi fi
if [ -f "./SPL" ]; then
cp ./SPL $INSTALL/usr/share/u-boot
fi
if [ -f "./boot.cfg" ]; then if [ -f "./boot.cfg" ]; then
cp ./boot.cfg $INSTALL/usr/share/u-boot cp ./boot.cfg $INSTALL/usr/share/u-boot
fi fi

View File

@ -91,6 +91,15 @@
# Target Configfile for u-boot # Target Configfile for u-boot
UBOOT_CONFIGFILE="" UBOOT_CONFIGFILE=""
# Kernel target for u-boot (default 'uImage' if BOOTLOADER=u-boot) (uImage / zImage)
KERNEL_UBOOT_TARGET=""
# Kernel extra targets to build
KERNEL_UBOOT_EXTRA_TARGET=""
# Additional kernel make parameters (for example to specify the u-boot loadaddress)
KERNEL_MAKE_EXTRACMD=""
# GCC to use. values can be: # GCC to use. values can be:
# default: default mainline gcc # default: default mainline gcc
GCC_VERSION="default" GCC_VERSION="default"

View File

@ -91,6 +91,15 @@
# Target Configfile for u-boot # Target Configfile for u-boot
UBOOT_CONFIGFILE="" UBOOT_CONFIGFILE=""
# Kernel target for u-boot (default 'uImage' if BOOTLOADER=u-boot) (uImage / zImage)
KERNEL_UBOOT_TARGET="zImage"
# Kernel extra targets to build
KERNEL_UBOOT_EXTRA_TARGET="imx6q-cubox-i.dtb imx6dl-cubox-i.dtb imx6dl-hummingboard.dtb"
# Additional kernel make parameters (for example to specify the u-boot loadaddress)
KERNEL_MAKE_EXTRACMD=""
# GCC to use. values can be: # GCC to use. values can be:
# default: default mainline gcc # default: default mainline gcc
GCC_VERSION="4.7" GCC_VERSION="4.7"

View File

@ -91,6 +91,15 @@
# Target Configfile for u-boot # Target Configfile for u-boot
UBOOT_CONFIGFILE="" UBOOT_CONFIGFILE=""
# Kernel target for u-boot (default 'uImage' if BOOTLOADER=u-boot) (uImage / zImage)
KERNEL_UBOOT_TARGET=""
# Kernel extra targets to build
KERNEL_UBOOT_EXTRA_TARGET=""
# Additional kernel make parameters (for example to specify the u-boot loadaddress)
KERNEL_MAKE_EXTRACMD=""
# GCC to use. values can be: # GCC to use. values can be:
# default: default mainline gcc # default: default mainline gcc
GCC_VERSION="default" GCC_VERSION="default"

View File

@ -91,6 +91,15 @@
# Target Configfile for u-boot # Target Configfile for u-boot
UBOOT_CONFIGFILE="" UBOOT_CONFIGFILE=""
# Kernel target for u-boot (default 'uImage' if BOOTLOADER=u-boot) (uImage / zImage)
KERNEL_UBOOT_TARGET=""
# Kernel extra targets to build
KERNEL_UBOOT_EXTRA_TARGET=""
# Additional kernel make parameters (for example to specify the u-boot loadaddress)
KERNEL_MAKE_EXTRACMD=""
# GCC to use. values can be: # GCC to use. values can be:
# default: default mainline gcc # default: default mainline gcc
GCC_VERSION="4.7" GCC_VERSION="4.7"

View File

@ -86,6 +86,15 @@
# Target Configfile for u-boot # Target Configfile for u-boot
UBOOT_CONFIGFILE="" UBOOT_CONFIGFILE=""
# Kernel target for u-boot (default 'uImage' if BOOTLOADER=u-boot) (uImage / zImage)
KERNEL_UBOOT_TARGET=""
# Kernel extra targets to build
KERNEL_UBOOT_EXTRA_TARGET=""
# Additional kernel make parameters (for example to specify the u-boot loadaddress)
KERNEL_MAKE_EXTRACMD=""
# GCC to use. values can be: # GCC to use. values can be:
# default: default mainline gcc # default: default mainline gcc
GCC_VERSION="default" GCC_VERSION="default"

View File

@ -176,7 +176,7 @@ IMAGE_NAME="$DISTRONAME-$TARGET_VERSION"
# copy kernel to target dir # copy kernel to target dir
if [ "$BOOTLOADER" = "u-boot" ]; then if [ "$BOOTLOADER" = "u-boot" ]; then
KERNEL_IMAGE="uImage" KERNEL_IMAGE="$KERNEL_UBOOT_TARGET"
elif [ "$BOOTLOADER" = "bcm2835-bootloader" ]; then elif [ "$BOOTLOADER" = "bcm2835-bootloader" ]; then
KERNEL_IMAGE="zImage" KERNEL_IMAGE="zImage"
else else