|
From: | Stuart Hughes |
Subject: | Re: [Ltib] Toolchain error using ltib - M544X coldfire |
Date: | Mon, 11 Jan 2010 14:41:34 +0000 |
User-agent: | Thunderbird 2.0.0.16 (X11/20080707) |
Hi Jon,I didn't try building the BSP, so hence didn't run into this. Looking into this I can see that Freescale were transitioning this BSP at the time it was merged out. I don't know if they've released a update since on their site, but there's not been anything merged out from them or sent to this list. Basically the problem is they were moving from dBUG bootloader to u-boot and don't look to have completed it.
To work around this I've found the older versions that _should_ work with what you have. To used this do this:
* save both attachments to config/platform/mcf5445x * remove the current composite kernel specfile: rm tmp/* * re-run ./ltibI believe the bootable kernel is vmlinux.bin (in rootfs/boot). I have built this but have not way of testing.
BTW: maybe you could email Freescale and ask them if they have a completed update for this platform and if possibly something they could submit against Savannah CVS.
Regards, Stuart Jon Burke wrote:
Thanks for that Stuart, the install gets further now, but fails on building the kernel. I haven't changed any of the LTIB or kernel configuration settings from defaults. This is the error: *** End of Linux kernel configuration. *** Execute 'make' to build the kernel or try 'make help'. + '[' -f /home/jon/ltib_latest/ltib/config/platform/mcf5445x/linux-2.6.x.config.d ev ']' + diff -q ./.config /home/jon/ltib_latest/ltib/config/platform/mcf5445x/linux-2.6.x.config.d ev + '[' -n '' ']' + '[' '%{kernel_series}' = 2.4 ']' + make ARCH=m68k 'HOSTCC=ccache /usr/bin/gcc -B/usr/bin//' uImage scripts/kconfig/conf -s arch/m68k/Kconfig make: *** No rule to make target `uImage'. Stop. error: Bad exit status from /home/jon/ltib_latest/ltib/tmp/rpm-tmp.40015 (%build) RPM build errors: Bad exit status from /home/jon/ltib_latest/ltib/tmp/rpm-tmp.40015 (%build) Build time for kernel-2.6.20-m5445x: 35 seconds Failed building kernel-2.6.20-m5445x I presume your build was successful, is there something else I'm missing? Jon -----Original Message-----From: Stuart Hughes [mailto:address@hidden Sent: 08 January 2010 13:50To: Jon Burke Cc: address@hidden Subject: Re: [Ltib] Toolchain error using ltib - M544X coldfire Hi Jon,It looks like the merge out from Freescale was inconsistent in some areas the m5445x platform was not in the toolchain config control files.I've updated these now on Savannah to what I _think_ they should be. Ifyou do a cvs update and re-run ./ltib -m config it should find them (remember to save). I get this, please check yours is the same. If it is, build and test.--- Toolchain selection. Toolchain (gcc-4.3.43 eglibc-2.5.43 mk68k toolchain.) ---> (-march=isac -mcpu=54455 -msoft-float) Enter any CFLAGS for gcc/g++ Regards, Stuart Jon Burke wrote:Hello, I've previously successfully used LTIB for the coldfire M54455 usingtheBSP on Freescale's website. But Freescale don't provide updates, anditseems not to work on new Fedora 12. So I figured I would try theversionon Savannah. I followed the instructions in the FAQ, but when running ltib, I always get the following error: You must set configuration values in config/platform/mcf5445x/.config for:TOOLCHAIN_PREFIX TOOLCHAIN_PATH traceback:main::check_platform_config:2215 main::pre_build_checks:1455 main:558 I have "Freescale M544X coldfire/m68k (MMU)" selected as the target. I can see that it has installed various tools in /opt/ltib, but it does not seem to include gcc. The FAQ says toolchains "are stored on theGPPas the binary rpms and will be downloaded and installed as required."Isthis wrong? Does anyone know if I need to install a toolchain myself first, and if so how? Jon. _______________________________________________ LTIB home page: http://ltib.org Ltib mailing list address@hidden http://lists.nongnu.org/mailman/listinfo/ltibThis message has been scanned by MailController - www.MailController.altohiway.com
# Template = kernel-common.tmpl %define pfx /opt/freescale/rootfs/%{_target_cpu} %define dversion 2.6.20 %define pkg_name linux %define dtc_name m54455 Summary : Linux kernel (core of the Linux operating system) Name : kernel Version : 2.6.20 Release : 0 License : GPL Vendor : Kernel.org + freescale patches Packager : Kurt Mahan Group : System Environment/Kernel Source : %{pkg_name}-%{dversion}.tar.bz2 Patch1 : linux-2.6.20-m5445x_core.patch Patch2 : linux-2.6.20-m5445x_fec.patch Patch3 : linux-2.6.20-m5445x_i2c-1.patch Patch4 : linux-2.6.20-m5445x_pci-1.patch Patch5 : linux-2.6.20-m5445x_ssi.patch Patch6 : linux-2.6.20-m5445x_usb.patch Patch7 : linux-2.6.20-m5445x_cau.patch Patch8 : linux-2.6.20-m5445x_ssi-disable-dma.patch Patch9 : linux-2.6.xx-sumversion.patch BuildRoot : %{_tmppath}/%{name} Prefix : %{pfx} %Description %{summary} >From kernel.org plus Freescale patches %Prep %setup -n %{pkg_name}-%{dversion} %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 %patch6 -p1 %patch7 -p1 %patch8 -p1 %patch9 -p1
%Build # Allow variables to be expanded PKG_KERNEL_PATH_PRECONFIG=$(eval echo $PKG_KERNEL_PATH_PRECONFIG) PKG_KERNEL_KBUILD_PRECONFIG=$(eval echo $PKG_KERNEL_KBUILD_PRECONFIG) PKG_KERNEL_PRECONFIG=$(eval echo $PKG_KERNEL_PRECONFIG) KSRC_DIR=${PKG_KERNEL_PATH_PRECONFIG:-%{_builddir}/%{buildsubdir}} %{!?showsrcpath: %define showsrcpath 0} %if %{showsrcpath} %{echo:%(eval echo ${PKG_KERNEL_PATH_PRECONFIG:-%{_builddir}/%{buildsubdir}})} %endif : ${LINTARCH:?must be set to the kernel architecture name} : ${BUILDCC:?must be set to the token for your build machines compiler} : ${PKG_KERNEL_PRECONFIG:?must be set to the name of your .config file} : ${PLATFORM_PATH:?must be set to your ltib platform path} : ${KSRC_DIR:?cannot find source directory (PKG_KERNEL_PATH_PRECONFIG)} # I'm not sure if this bit is right. Do packages need the build # output, or the source tree? rm -f $RPM_BUILD_DIR/linux ln -s $KSRC_DIR $RPM_BUILD_DIR/linux # From now on it won't matter if KBOUT is relative or absolute; # if it's relative it must be relative to KSRC_DIR cd $KSRC_DIR KBOUT=$PKG_KERNEL_KBUILD_PRECONFIG if [ -n "$KBOUT" -a "$KBOUT" != "." ] then # this is to work with symlinked kernel souce trees test -d $KBOUT || mkdir -p $KBOUT export KBUILD_OUTPUT=$KBOUT else KBOUT="." fi case $LINTARCH in m68k*) KTARG=vmlinux ;; ppc*) KTARG=uImage ;; powerpc*) KTARG=uImage ;; *) KTARG=zImage ;; esac SYSCFG_KTARG=${SYSCFG_KTARG:-$KTARG} # # This section makes sure there is a .config in the kernel build directory # if [ "$PKG_KERNEL_PRECONFIG" = "defconfig" ] then # this is mutated to prevent picking up the BSP defconfig PKG_KERNEL_PRECONFIG=kerneldefconfig fi for CFG in "$PLATFORM_PATH/${PKG_KERNEL_PRECONFIG}.dev" "$PLATFORM_PATH/$PKG_KERNEL_PRECONFIG" do if [ -f $CFG ] then CFG_PATH=$CFG break fi done if [ -z "$CFG_PATH" ] then for DIR in "arch/$GNUTARCH/configs/" "arch/$LINTARCH/configs/" do if [ -d $DIR ] then CFG="`find $DIR -name $PKG_KERNEL_PRECONFIG`" if [ -n "$CFG" ] then CFG_PATH=$CFG break fi fi done fi # PPC_MERGE used to be the primary way of detecting whether # arch should be powerpc instead of ppc. Starting in 2.6.28 # this symbol has gone from arch/powerpc/Kconfig and so we # can't use this as the written back .config file has this # symbol removed. Hence the extra checks if [ $LINTARCH = ppc -a -f arch/powerpc/Kconfig ] then if ! grep -q PPC_MERGE arch/powerpc/Kconfig then LINTARCH=powerpc else if [ -n "$CFG_PATH" ] then if grep -q 'CONFIG_PPC_MERGE=y' $CFG_PATH then LINTARCH=powerpc fi else LINTARCH=powerpc fi fi fi # # Check for ltib full rebuilds (e.g. change of toolchain) if so # force a build from scratch # if [ -n "$LTIB_FULL_REBUILD" ] then make ARCH=$LINTARCH HOSTCC="$BUILDCC" mrproper fi if [ -n "$CFG_PATH" ] then cp -f $CFG_PATH $KBOUT/.config else echo "Warning: cannot find a config file for the kernel" fi # # configure # if [ -z "$LTIB_BATCH" -a -n "$PKG_KERNEL_WANT_CF" -o -n "$SCB_WANT_CF" ] then make ARCH=$LINTARCH HOSTCC="$BUILDCC" menuconfig else if [ -n "$CFG_PATH" ] then yes "" | make ARCH=$LINTARCH HOSTCC="$BUILDCC" oldconfig else if [ "$PKG_KERNEL_PRECONFIG" = "kerneldefconfig" ] then PKG_KERNEL_PRECONFIG=defconfig fi yes "" | make ARCH=$LINTARCH HOSTCC="$BUILDCC" $PKG_KERNEL_PRECONFIG fi fi # copy back if there was a config file and it changed if [ -f "$CFG_PATH" ] && ! diff -q $KBOUT/.config $CFG_PATH then cp -f $KBOUT/.config $PLATFORM_PATH/${PKG_KERNEL_PRECONFIG}.dev fi # The first time conf builds, a spurious .config gets made in # the source directory, this gets rid of it otherwise the kernel # will not build complaining that the source tree is not clean if [ -n "$KBUILD_OUTPUT" ] then rm -f .config fi # # Make dep only needs to be done for 2.4 kernels # if [ "%{kernel_series}" = "2.4" ] then make ARCH=$LINTARCH HOSTCC="${BUILDCC}" dep fi # # build the kernel and optionally the modules # make ARCH=$LINTARCH HOSTCC="$BUILDCC" $SYSCFG_KTARG if grep -q '^CONFIG_MODULES=' $KBOUT/.config then make ARCH=$LINTARCH HOSTCC="$BUILDCC" modules fi # cscope index if [ -n "$PKG_KERNEL_WANT_CSCOPE" ] then make ARCH=$LINTARCH cscope fi %Install %define __os_install_post %{nil} # Allow variables to be expanded PKG_KERNEL_PATH_PRECONFIG=$(eval echo $PKG_KERNEL_PATH_PRECONFIG) PKG_KERNEL_KBUILD_PRECONFIG=$(eval echo $PKG_KERNEL_KBUILD_PRECONFIG) DTC_NAMES=$(eval echo $SYSCFG_DTC_NAME) SYSCFG_DTC_PATH=$(eval echo $SYSCFG_DTC_PATH) DTC_PAD=${SYSCFG_DTC_PAD:-%dtc_pad} if [ "$DTC_PAD" = "%%dtc_pad" ] then DTC_PAD=1024 fi KSRC_DIR=${PKG_KERNEL_PATH_PRECONFIG:-%{_builddir}/%{buildsubdir}} # From now on it won't matter if KBOUT is relative or absolute; if it's relative it must be relative # to KSRC_DIR cd $KSRC_DIR KBOUT=$PKG_KERNEL_KBUILD_PRECONFIG if [ -n "$KBOUT" ] then # this is to work with symlinked kernel souce trees test -d $KBOUT || mkdir -p $KBOUT export KBUILD_OUTPUT=$KBOUT else KBOUT="." fi if [ $LINTARCH = ppc -a -f arch/powerpc/Kconfig ] then if ! grep -q PPC_MERGE arch/powerpc/Kconfig then LINTARCH=powerpc elif grep -q 'CONFIG_PPC_MERGE=y' $KBOUT/.config then LINTARCH=powerpc fi fi case $LINTARCH in m68k*) BOOT_KERNEL=vmlinux ;; ppc) BOOT_KERNEL=arch/$LINTARCH/boot/images/uImage ;; powerpc) BOOT_KERNEL=arch/$LINTARCH/boot/uImage ;; *) if grep -q 'CONFIG_XIP_KERNEL=y' $KBOUT/.config then BOOT_KERNEL=arch/$LINTARCH/boot/xipImage else BOOT_KERNEL=arch/$LINTARCH/boot/zImage fi ;; esac rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/%{pfx}/boot if grep -q '^CONFIG_MODULES=' $KBOUT/.config then make ARCH=$LINTARCH HOSTCC="$BUILDCC" DEPMOD=/bin/true INSTALL_MOD_PATH=$RPM_BUILD_ROOT/%{pfx} modules_install KERNEL_VER=`ls $RPM_BUILD_ROOT/%{pfx}/lib/modules` for i in build source do rm -f $RPM_BUILD_ROOT/%{pfx}/lib/modules/$KERNEL_VER/$i ln -s /usr/src/linux $RPM_BUILD_ROOT/%{pfx}/lib/modules/$KERNEL_VER/$i done fi SYSCFG_BOOT_KERNEL=${SYSCFG_BOOT_KERNEL:-$BOOT_KERNEL} if [ -n "$PKG_KERNEL_WANT_OBJCOPY" ] then objcopy -O binary $KBOUT/$SYSCFG_BOOT_KERNEL $KBOUT/${SYSCFG_BOOT_KERNEL}.bin SYSCFG_BOOT_KERNEL=${SYSCFG_BOOT_KERNEL}.bin fi if [ -n "$PKG_KERNEL_WANT_VMLINUX_STRIPPED" ] then strip $KBOUT/vmlinux -o $KBOUT/vmlinux.stripped cp $KBOUT/vmlinux.stripped $RPM_BUILD_ROOT/%{pfx}/boot fi for i in vmlinux System.map $SYSCFG_BOOT_KERNEL do cp $KBOUT/$i $RPM_BUILD_ROOT/%{pfx}/boot done ln -s `basename $SYSCFG_BOOT_KERNEL` $RPM_BUILD_ROOT/%{pfx}/boot/bootable_kernel cp $KBOUT/.config $RPM_BUILD_ROOT/%{pfx}/boot/linux.config # handle m68k uImage needs if [ "$PLATFORM" = "mcf547x_8x" ] then mkimage -A m68k -O linux -T kernel -C none -a 0x00020000 -e 0x00020000 -n "Linux Kernel Image" -d $RPM_BUILD_ROOT/%{pfx}/boot/vmlinux.bin $RPM_BUILD_ROOT/%{pfx}/boot/uImage fi if [ "$PLATFORM" = "mcf5445x" ] then mkimage -A m68k -O linux -T kernel -C none -a 0x40020000 -e 0x40020000 -n "Linux Kernel Image" -d $RPM_BUILD_ROOT/%{pfx}/boot/vmlinux.bin $RPM_BUILD_ROOT/%{pfx}/boot/uImage fi # handle the Flat Device Tree build DTC_PATH=${SYSCFG_DTC_PATH:-arch/$LINTARCH/boot/dts} if [ "$LINTARCH" = "powerpc" -a -d "$DTC_PATH" ] then DTC_LOAD_ADDR=${SYSCFG_DTU_LOAD_ADDR:-0x300000} DTC_NAMES=${DTC_NAMES:-%dtc_name} if [ "$DTC_NAMES" = "%%dtc_name" ] then echo "warning no value has been set for dtc_name, guessing" DTC_NAMES=$PLATFORM fi for DTC_NAME in $DTC_NAMES do dtc -f -b 0 -I dts -O dtb -p $DTC_PAD -o $RPM_BUILD_ROOT/%{pfx}/boot/$(basename ${DTC_NAME}.dtb) $DTC_PATH/${DTC_NAME}.dts if [ -f "$RPM_BUILD_ROOT/%{pfx}/boot/uImage" ] then mkimage -A ppc -O Linux -T flat_dt -C none -a $DTC_LOAD_ADDR -e 0 -d $RPM_BUILD_ROOT/%{pfx}/boot/$(basename ${DTC_NAME}.dtb) $RPM_BUILD_ROOT/%{pfx}/boot/$(basename ${DTC_NAME}.dtu) fi done fi if [ -n "$PKG_KERNEL_WANT_HEADERS" ] then mkdir -p $RPM_BUILD_ROOT/%{pfx}/usr/src/linux/include for i in asm-${LINTARCH} asm-generic config linux math-emu media mtd net pcmcia rxrpc scsi sound video do if [ -d include/$i ] then cp -a include/$i $RPM_BUILD_ROOT/%{pfx}/usr/src/linux/include fi done for i in asm config linux do if [ -d $KBOUT/include/$i ] then cp -a $KBOUT/include/$i $RPM_BUILD_ROOT/%{pfx}/usr/src/linux/include fi done if [ "${LINTARCH}" = "arm" ] then if [ -d "$KBOUT/include/asm/arch" ] then mkdir -p $RPM_BUILD_ROOT/%{pfx}/usr/src/linux/include/asm/arch cp -a $KBOUT/include/asm/arch/* $RPM_BUILD_ROOT/%{pfx}/usr/src/linux/include/asm/arch else echo "Don't know how to copy asm headers for this kernel" fi fi fi %Clean rm -rf $RPM_BUILD_ROOT if [ -z "$PKG_KERNEL_LEAVESRC" ] then rm -f $RPM_BUILD_DIR/linux fi %Files %defattr(-,root,root) %{pfx}/*
[Prev in Thread] | Current Thread | [Next in Thread] |