ltib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ltib] Additions to pkg.map


From: Stuart Hughes
Subject: Re: [Ltib] Additions to pkg.map
Date: Mon, 18 May 2009 09:03:40 +0100
User-agent: Thunderbird 2.0.0.16 (X11/20080707)

Hi Kevin,

For pkg_map, this package would be better added after the list of bootloaders:

PKG_COLILO                       = colilo
PKG_DBUG                         = dbug
+PKG_APEX                         = apex


You can avoid the need for the Makefile patch if you change the build line to something like (I left the default flags, which look okay):

$ make HOSTCC="$BUILDCC" HOSTCXX="$BUILDCXX" \
  CROSS_COMPILE="$TOOLCHAIN_PREFIX" ARCH="$LINTARCH" apex.bin

After adjusting and uploading to the GPP, please feel free to check in.

Regards, Stuart

Kevin Wells wrote:
We are adding support for the Apex bootloader on several products under LTIB.

Since this is in the common area, it might be a good idea for someone else to quickly review it and make any comments.

Thanks!

******************************

Changes to ./config/userspace/pkg.map below…

******************************

PKG_LM_SENSORS                   = lm_sensors

PKG_SDL                          = sdl

+PKG_APEX                         = apex

******************************

New common spec file in new ./dist/lfs-5.1/apex directory…

******************************

%Build

PKG_APEX_PRECONFIG=$(eval echo $PKG_APEX_PRECONFIG)

: ${PKG_APEX_PRECONFIG:?must be set to the name of your .config file}

SRC_DIR=%{_builddir}/%{buildsubdir}

%{!?showsrcpath: %define showsrcpath 0}

%if %{showsrcpath}

%{echo:%(eval echo %{_builddir})}

%endif

BUILD_DIR=%{_builddir}/%{buildsubdir}

if [ $SRC_DIR != $BUILD_DIR ]

then

    mkdir -p $BUILD_DIR

fi

cd $SRC_DIR

export HOSTCC="$BUILDCC"

export CROSS_COMPILE=$TOOLCHAIN_PREFIX

export ARCH=arm

if [ -n "$LTIB_FULL_REBUILD" ]

then

    make distclean

fi

# Create a local copy of the config and use it instead

PKG_APEX_PRECONFIG_DEV=${PKG_APEX_PRECONFIG}.dev

if [ -f "$PLATFORM_PATH/$PKG_APEX_PRECONFIG_DEV" ]

then

    # Copy file if it exists to Apex directory

    cp $PLATFORM_PATH/$PKG_APEX_PRECONFIG_DEV .config

else

    if [ -f "$PLATFORM_PATH/${PKG_APEX_PRECONFIG}" ]

    then

        # Create temporary copy and copy it to Apex directory

cp $PLATFORM_PATH/${PKG_APEX_PRECONFIG} $PLATFORM_PATH/$PKG_APEX_PRECONFIG_DEV

        cp $PLATFORM_PATH/$PKG_APEX_PRECONFIG_DEV .config

    else

        # An important configuration file was missing,

        # We will force build a local copy

        PKG_APEX_WANT_CF=$(eval echo y)

    fi

fi

# Need an Apex configuration menu?

if [ -n "${PKG_APEX_WANT_CF}" ]

then

    make menuconfig

fi

# Save configuration changes

cp .config $PLATFORM_PATH/$PKG_APEX_PRECONFIG_DEV

# Build apex

make apex.bin

%Install

rm -rf $RPM_BUILD_ROOT

mkdir -p $RPM_BUILD_ROOT/%{pfx}/boot

BUILD_DIR=%{_builddir}/%{buildsubdir}

cd $BUILD_DIR

for i in apex.bin

do

    cp $i $RPM_BUILD_ROOT/%{pfx}/boot

done

%Clean

if [ -n "$PKG_APEX_LEAVESRC" ]

then

    rm -rf $RPM_BUILD_ROOT

fi

%Files

%defattr(-,root,root)

%{pfx}/*

******************************

One of a few new platform specific spec files in new ./dist/lfs-5.1/apex directory…

******************************

# Template = apex-common.tmpl

%define pfx /opt/nxp/rootfs/%{_target_cpu}

Summary         : Apex bootloader

Name            : apex

Version         : 1.6.8

Release         : 1

License         : GPL

Vendor          : NXP

Packager        : Kevin Wells

Group           : Applications/System

Source          : %{name}-%{version}.tar.bz2

Patch0               : apex-1.6.8_mkfix.patch

Patch1               : patch_apex-1.6.8_lpc313x

BuildRoot       : %{_tmppath}/%{name}

Prefix          : %{pfx}

%Description

%{summary}

This specfile attempts to recreate the Apex 1.6.8 binary

needed for the Embedded Artists 3131 board.

%Prep

%setup -n %{name}-%{version}

%patch0 -p1

%patch1 -p1

******************************

Make file patch

******************************

I'm not sure why, but the target compilers selected in LTIB wouldn't be used unless I commented out the

following lines in the main Apex makefile. That's the apex-1.6.8-mkfix.patch patchfile. All it does is

comment out the following lines. I couldn't figure out how to get it to build without that fix so if anyone

knows why and it's fixable, I can remove that patch.

#HOSTCC       = gcc

#HOSTCXX      = g++

#HOSTCFLAGS   = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer

#HOSTCXXFLAGS = -O2

thanks,

Kevin Wells

NXP Semiconductors


------------------------------------------------------------------------

_______________________________________________
LTIB home page: http://bitshrine.org

Ltib mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/ltib




reply via email to

[Prev in Thread] Current Thread [Next in Thread]