add support for freescale

This commit is contained in:
Mario Fetka 2012-01-06 05:03:33 +01:00
parent ed3be40196
commit a3ef70e108
1 changed files with 36 additions and 18 deletions

View File

@ -537,24 +537,6 @@ _kernel_src_compile() {
use ccache && GKARGS="${GKARGS} --kernel-cc=/usr/lib/ccache/bin/gcc"
fi
unset LDFLAGS
DEFAULT_KERNEL_SOURCE="${S}" CMD_KERNEL_DIR="${S}" genkernel ${GKARGS} ${K_GENKERNEL_ARGS} \
--kerneldir="${S}" \
--kernel-config="${WORKDIR}"/config \
--cachedir="${WORKDIR}"/cache \
--makeopts="${mkopts}" \
--tempdir="${S}"/temp \
--logfile="${WORKDIR}"/genkernel.log \
--bootdir="${WORKDIR}"/boot \
--mountboot \
--lvm \
--luks \
--iscsi \
--mdadm \
--module-prefix="${WORKDIR}"/lib \
all || die "genkernel failed"
ARCH=${OLDARCH}
# Buffalo anounced a new box named Pro Live (video transcode streaming)
# so the old ls_pro_live has to be split to ls_pro ls_live
# for now let it stay but a move schould be done to ls_pro
@ -615,6 +597,31 @@ _kernel_src_compile() {
K_NASKERNEL_DEVICE="Buffalo LS-XHL Series"
fi
# Freescale
if [ "${K_NASKERNEL_NAME}" = "freescale_mx53_loco" ]; then
K_NASKERNEL_TYPE="default"
K_NASKERNEL_DEVICE="Freescale MX53 LOCO Board"
K_GENKERNEL_ARGS+=" --kernel-target=uImage --kernel-binary=arch/arm/boot/uImage"
fi
unset LDFLAGS
DEFAULT_KERNEL_SOURCE="${S}" CMD_KERNEL_DIR="${S}" genkernel ${GKARGS} ${K_GENKERNEL_ARGS} \
--kerneldir="${S}" \
--kernel-config="${WORKDIR}"/config \
--cachedir="${WORKDIR}"/cache \
--makeopts="${mkopts}" \
--tempdir="${S}"/temp \
--logfile="${WORKDIR}"/genkernel.log \
--bootdir="${WORKDIR}"/boot \
--mountboot \
--lvm \
--luks \
--iscsi \
--mdadm \
--module-prefix="${WORKDIR}"/lib \
all || die "genkernel failed"
ARCH=${OLDARCH}
# Buffalo Boxes have a special naming and start address
if [ "${K_NASKERNEL_TYPE}" = "buffalo" ]; then
cat foo "${WORKDIR}"/boot/kernel-genkernel-${ARCH}-${KV_FULL} > zImage.new
@ -628,6 +635,17 @@ _kernel_src_compile() {
fi
fi
# Default uImage and uInit handling
if [ "${K_NASKERNEL_TYPE}" = "default" ]; then
cp "${WORKDIR}"/boot/kernel-genkernel-${ARCH}-${KV_FULL} "${WORKDIR}"/boot/uImage-genkernel-${ARCH}-${KV_FULL}
mkimage -A arm -O linux -T ramdisk -C none -a 0x00000000 -e 0x00000000 -n initrd-${KV_FULL} \
-d "${WORKDIR}"/boot/initramfs-genkernel-${ARCH}-${KV_FULL} "${WORKDIR}"/boot/initrd-genkernel-${ARCH}-${KV_FULL}
# install u-boot if required
if [ -n "${K_NASKERNEL_UBOOT_VER}" ]; then
cp "${WORKDIR}"/u-boot-${K_NASKERNEL_UBOOT_VER}/u-boot.bin "${WORKDIR}"/boot/u-boot-${ARCH}-${K_NASKERNEL_UBOOT_VER}.${K_NASKERNEL_NAME}
fi
fi
# cleanup
rm foo zImage.new
rm "${WORKDIR}"/boot/kernel-genkernel-${ARCH}-${KV_FULL} "${WORKDIR}"/boot/initramfs-genkernel-${ARCH}-${KV_FULL}