From a3ef70e108d0edcf82b93a23f9d32ed2d1f96c48 Mon Sep 17 00:00:00 2001 From: Mario Fetka Date: Fri, 6 Jan 2012 05:03:33 +0100 Subject: [PATCH] add support for freescale --- eclass/nas-kernel.eclass | 54 ++++++++++++++++++++++++++-------------- 1 file changed, 36 insertions(+), 18 deletions(-) diff --git a/eclass/nas-kernel.eclass b/eclass/nas-kernel.eclass index e7965a5..b9c450a 100644 --- a/eclass/nas-kernel.eclass +++ b/eclass/nas-kernel.eclass @@ -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}