root/openembedded/oe-temp-patches/add-zipit2-machine.patch

Revision 54, 32.5 kB (checked in by bryank, 9 months ago)

Add an oe-temp-patches area to hold patches that need to be applied to the OE tree temporarily. Add Magon's patch to support the zipit2 machine under Angstrom. Also add a line to the Makefile to apply this patch automatically.

  • packages/linux/linux-zipit2_2.6.21.1.bb

    old new  
     1DESCRIPTION = "Linux Kernel" 
     2SECTION = "kernel" 
     3LICENSE = "GPL" 
     4 
     5PR = "r3" 
     6 
     7inherit kernel 
     8 
     9COMPATIBLE_MACHINE = "zipit2" 
     10 
     11SRCREV_FORMAT = "patches" 
     12 
     13SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.21.1.tar.bz2 \ 
     14                        svn://linux.zipitwireless.com/svn/z2kernel/trunk/;module=oe-patches;rev=5;proto=http \ 
     15                        file://defconfig" 
     16 
     17S = "${WORKDIR}/linux-2.6.21.1" 
     18 
     19do_prepatch() { 
     20        mv ${WORKDIR}/oe-patches ${S}/patches && cd ${S} && quilt push -av 
     21        mv patches patches.zipit2 
     22        mv .pc .pc.old 
     23} 
     24 
     25do_configure() { 
     26        mkdir ${WORKDIR}/rfs 
     27        cp ${WORKDIR}/defconfig ${S}/.config 
     28        yes '' | oe_runmake oldconfig    
     29} 
     30 
     31do_postinst_modules () { 
     32if [ -n "$D" ]; then 
     33        ${HOST_PREFIX}depmod-${KERNEL_MAJOR_VERSION} -A -b $D -F $D/boot/System.map-${PV} ${KERNEL_VERSION} 
     34else 
     35        depmod -A 
     36fi 
     37} 
     38 
     39addtask do_postinst_modules after do_build 
     40addtask prepatch after do_unpack before do_patch 
     41 
  • packages/linux-libc-headers/linux-libc-headers_2.6.21.1.bb

    old new  
     1require linux-libc-headers.inc 
     2 
     3INHIBIT_DEFAULT_DEPS = "1" 
     4DEPENDS += "unifdef-native" 
     5PR = "r1" 
     6 
     7SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${PV}.tar.bz2 \ 
     8           file://procinfo.h" 
     9 
     10S = "${WORKDIR}/linux-${PV}" 
     11 
     12set_arch() { 
     13        case ${TARGET_ARCH} in 
     14                alpha*)   ARCH=alpha ;; 
     15                arm*)     ARCH=arm ;; 
     16                cris*)    ARCH=cris ;; 
     17                hppa*)    ARCH=parisc ;; 
     18                i*86*)    ARCH=i386 ;; 
     19                ia64*)    ARCH=ia64 ;; 
     20                mips*)    ARCH=mips ;; 
     21                m68k*)    ARCH=m68k ;; 
     22                powerpc*) ARCH=powerpc ;; 
     23                s390*)    ARCH=s390 ;; 
     24                sh*)      ARCH=sh ;; 
     25                sparc64*) ARCH=sparc64 ;; 
     26                sparc*)   ARCH=sparc ;; 
     27                x86_64*)  ARCH=x86_64 ;; 
     28                avr32*)   ARCH=avr32 ;; 
     29                bfin*)    ARCH=blackfin ;; 
     30        esac 
     31} 
     32 
     33do_configure() { 
     34        set_arch 
     35        oe_runmake allnoconfig ARCH=$ARCH 
     36} 
     37 
     38do_compile () { 
     39} 
     40 
     41do_install() { 
     42        set_arch 
     43        oe_runmake headers_install INSTALL_HDR_PATH=${D}${exec_prefix} ARCH=$ARCH 
     44} 
     45 
     46do_install_append_arm() { 
     47        cp ${WORKDIR}/procinfo.h ${D}${includedir}/asm/ 
     48} 
     49 
     50STAGE_TEMP="${WORKDIR}/temp-staging" 
     51 
     52do_stage () { 
     53        set_arch 
     54        echo $ARCH 
     55        rm -rf ${STAGE_TEMP} 
     56        mkdir -p ${STAGE_TEMP} 
     57        oe_runmake headers_install INSTALL_HDR_PATH=${STAGE_TEMP}${exec_prefix} ARCH=$ARCH 
     58        if [ "$ARCH" = "arm" ]; then 
     59                cp ${WORKDIR}/procinfo.h ${STAGE_TEMP}${includedir}/asm/ 
     60        fi 
     61        install -d ${STAGING_INCDIR} 
     62        rm -rf ${STAGING_INCDIR}/linux ${STAGING_INCDIR}/asm ${STAGING_INCDIR}/asm-generic 
     63        cp -pfLR ${STAGE_TEMP}${includedir}/linux ${STAGING_INCDIR}/ 
     64        cp -pfLR ${STAGE_TEMP}${includedir}/asm ${STAGING_INCDIR}/ 
     65        cp -pfLR ${STAGE_TEMP}${includedir}/asm-generic ${STAGING_INCDIR}/ 
     66} 
  • conf/distro/angstrom-2008.1.conf

    old new  
    186186PREFERRED_PROVIDER_task-bootstrap = "task-bootstrap" 
    187187 
    188188#This is needed to get a correct PACKAGE_ARCH for packages that have PACKAGE_ARCH = ${MACHINE_ARCH} 
    189 ARM_ABI ?= "${@['','oabi'][bb.data.getVar('MACHINE',d) in ['collie','h3600', 'h3800', 'simpad', 'htcwallaby']]}" 
     189ARM_ABI ?= "${@['','oabi'][bb.data.getVar('MACHINE',d) in ['collie','h3600', 'h3800', 'simpad', 'htcwallaby', 'zipit2']]}" 
    190190require conf/distro/include/angstrom${ARM_ABI}.inc 
    191191 
    192192# do some task-base stuff here 
  • conf/distro/include/angstrom-glibc.inc

    old new  
    55PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-initial ?= "glibc-initial" 
    66PREFERRED_PROVIDER_linux-libc-headers ?= "linux-libc-headers" 
    77 
    8 TARGET_OS = "linux${@['','-gnueabi'][bb.data.getVar('TARGET_ARCH',d,1) in ['arm', 'armeb'] and bb.data.getVar('MACHINE',d) not in ['collie','h3600', 'h3800', 'simpad', 'htcwallaby']]}" 
     8TARGET_OS = "linux${@['','-gnueabi'][bb.data.getVar('TARGET_ARCH',d,1) in ['arm', 'armeb'] and bb.data.getVar('MACHINE',d) not in ['collie','h3600', 'h3800', 'simpad', 'htcwallaby', 'zipit2']]}" 
    99 
    1010#mess with compiler flags to use -Os instead of -O2 
    1111#Please see http://free-electrons.com/doc/embedded_linux_optimizations/img47.html for some more info 
  • conf/distro/include/angstrom.inc

    old new  
    207207FEED_ARCH_jornada7xx    = "arm-oabi" 
    208208FEED_ARCH_shark         = "arm-oabi" 
    209209FEED_ARCH_simpad        = "arm-oabi" 
     210FEED_ARCH_zipit2        = "arm-oabi" 
    210211 
    211212 
    212213#Tweak packaging for strongarm machines since they can't use EABI 
     
    216217PACKAGE_EXTRA_ARCHS_h3800  = "arm-oabi" 
    217218PACKAGE_EXTRA_ARCHS_simpad = "arm-oabi" 
    218219PACKAGE_EXTRA_ARCHS_htcwallaby = "arm-oabi" 
     220PACKAGE_EXTRA_ARCHS_zipit2 = "arm-oabi" 
    219221 
    220222 
    221223#Name the generated images in a sane way 
Note: See TracBrowser for help on using the browser.