aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/orion/image
diff options
context:
space:
mode:
authorImre Kaloz <kaloz@openwrt.org>2008-06-04 13:51:17 +0000
committerImre Kaloz <kaloz@openwrt.org>2008-06-04 13:51:17 +0000
commit7bb65fb9d7860faa4b9b1e07790fb5823a0249e2 (patch)
tree701aabf12d94bdeddafbf8d328dee2492eef9ad5 /target/linux/orion/image
parent0244e57bb9fb9ebd1dd224bd5789ad9cc24b0175 (diff)
downloadupstream-7bb65fb9d7860faa4b9b1e07790fb5823a0249e2.tar.gz
upstream-7bb65fb9d7860faa4b9b1e07790fb5823a0249e2.tar.bz2
upstream-7bb65fb9d7860faa4b9b1e07790fb5823a0249e2.zip
add preliminary Marvell Orion support
SVN-Revision: 11352
Diffstat (limited to 'target/linux/orion/image')
-rw-r--r--target/linux/orion/image/Makefile34
1 files changed, 34 insertions, 0 deletions
diff --git a/target/linux/orion/image/Makefile b/target/linux/orion/image/Makefile
new file mode 100644
index 0000000000..073c24f63e
--- /dev/null
+++ b/target/linux/orion/image/Makefile
@@ -0,0 +1,34 @@
+#
+# Copyright (C) 2008 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/image.mk
+
+define Image/Prepare
+ cp $(LINUX_DIR)/arch/arm/boot/uImage $(KDIR)/uImage
+endef
+
+define Image/BuildKernel
+ cp $(KDIR)/uImage $(BIN_DIR)/openwrt-$(BOARD)-uImage
+#
+# XXX - FIXME
+#
+# BIN_DIR=$(BIN_DIR) $(TOPDIR)/scripts/arm-magic.sh
+endef
+
+define Image/Build
+ $(call Image/Build/$(1),$(1))
+endef
+
+define Image/Build/squashfs
+ $(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
+ ( \
+ dd if=$(LINUX_DIR)/arch/arm/boot/uImage bs=1024k conv=sync; \
+ dd if=$(KDIR)/root.$(1) bs=128k conv=sync; \
+ ) > $(BIN_DIR)/openwrt-$(BOARD)-$(1).img
+endef
+
+$(eval $(call BuildImage))
213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256
/**CFile****************************************************************

  FileName    [mvcCover.c]

  PackageName [MVSIS 2.0: Multi-valued logic synthesis system.]

  Synopsis    [Basic procedures to manipulate unate cube covers.]

  Author      [MVSIS Group]
  
  Affiliation [UC Berkeley]

  Date        [Ver. 1.0. Started - February 1, 2003.]

  Revision    [$Id: mvcCover.c,v 1.5 2003/04/09 18:02:05 alanmi Exp $]

***********************************************************************/

#include "mvc.h"

ABC_NAMESPACE_IMPL_START


////////////////////////////////////////////////////////////////////////
///                        DECLARATIONS                              ///
////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////
///                     FUNCTION DEFINITIONS                         ///
////////////////////////////////////////////////////////////////////////

/**Function*************************************************************

  Synopsis    []

  Description []
               
  SideEffects []

  SeeAlso     []

***********************************************************************/
Mvc_Cover_t * Mvc_CoverAlloc( Mvc_Manager_t * pMem, int nBits )
{
    Mvc_Cover_t * p;
    int nBitsInUnsigned;

    nBitsInUnsigned  = 8 * sizeof(Mvc_CubeWord_t);
#ifdef USE_SYSTEM_MEMORY_MANAGEMENT
    p                = (Mvc_Cover_t *)ABC_ALLOC( char, sizeof(Mvc_Cover_t) );
#else
    p                = (Mvc_Cover_t *)Extra_MmFixedEntryFetch( pMem->pManC );
#endif
    p->pMem          = pMem;
    p->nBits         = nBits;
    p->nWords        = nBits / nBitsInUnsigned + (int)(nBits % nBitsInUnsigned > 0);
    p->nUnused       = p->nWords * nBitsInUnsigned - p->nBits;
    p->lCubes.nItems = 0;
    p->lCubes.pHead  = NULL;
    p->lCubes.pTail  = NULL;
    p->nCubesAlloc   = 0;
    p->pCubes        = NULL;
    p->pMask         = NULL;
    p->pLits         = NULL;
    return p;
}

/**Function*************************************************************

  Synopsis    []

  Description []
               
  SideEffects []

  SeeAlso     []

***********************************************************************/
Mvc_Cover_t * Mvc_CoverClone( Mvc_Cover_t * p )
{
    Mvc_Cover_t * pCover;
#ifdef USE_SYSTEM_MEMORY_MANAGEMENT
    pCover                = (Mvc_Cover_t *)ABC_ALLOC( char, sizeof(Mvc_Cover_t) );
#else
    pCover                = (Mvc_Cover_t *)Extra_MmFixedEntryFetch( p->pMem->pManC );
#endif
    pCover->pMem          = p->pMem;
    pCover->nBits         = p->nBits;
    pCover->nWords        = p->nWords;
    pCover->nUnused       = p->nUnused;
    pCover->lCubes.nItems = 0;
    pCover->lCubes.pHead  = NULL;
    pCover->lCubes.pTail  = NULL;
    pCover->nCubesAlloc   = 0;
    pCover->pCubes        = NULL;
    pCover->pMask         = NULL;
    pCover->pLits         = NULL;
    return pCover;
}

/**Function*************************************************************

  Synopsis    []

  Description []
               
  SideEffects []

  SeeAlso     []

***********************************************************************/
Mvc_Cover_t * Mvc_CoverDup( Mvc_Cover_t * p )
{
    Mvc_Cover_t * pCover;
    Mvc_Cube_t * pCube, * pCubeCopy;
    // clone the cover
    pCover = Mvc_CoverClone( p );
    // copy the cube list
    Mvc_CoverForEachCube( p, pCube )
    {
        pCubeCopy = Mvc_CubeDup( p, pCube );
        Mvc_CoverAddCubeTail( pCover, pCubeCopy );
    }
    return pCover;
}

/**Function*************************************************************

  Synopsis    []

  Description []
               
  SideEffects []

  SeeAlso     []

***********************************************************************/
void Mvc_CoverFree( Mvc_Cover_t * p )
{
    Mvc_Cube_t * pCube, * pCube2;
    // recycle cube list
    Mvc_CoverForEachCubeSafe( p, pCube, pCube2 )
        Mvc_CubeFree( p, pCube );
    // recycle other pointers
    Mvc_CubeFree( p, p->pMask );
    MEM_FREE( p->pMem, Mvc_Cube_t *, p->nCubesAlloc, p->pCubes );
    MEM_FREE( p->pMem, int,          p->nBits,       p->pLits  );

#ifdef USE_SYSTEM_MEMORY_MANAGEMENT
    ABC_FREE( p );
#else
    Extra_MmFixedEntryRecycle( p->pMem->pManC, (char *)p );
#endif
}


/**Function*************************************************************

  Synopsis    []

  Description []
               
  SideEffects []

  SeeAlso     []

***********************************************************************/
void Mvc_CoverAllocateMask( Mvc_Cover_t * pCover ) 
{ 
    if ( pCover->pMask == NULL )
        pCover->pMask = Mvc_CubeAlloc( pCover );
}

/**Function*************************************************************

  Synopsis    []

  Description []
               
  SideEffects []

  SeeAlso     []

***********************************************************************/
void Mvc_CoverAllocateArrayLits( Mvc_Cover_t * pCover ) 
{ 
    if ( pCover->pLits == NULL )
        pCover->pLits = MEM_ALLOC( pCover->pMem, int, pCover->nBits );
}

/**Function*************************************************************

  Synopsis    []

  Description []
               
  SideEffects []

  SeeAlso     []

***********************************************************************/
void Mvc_CoverAllocateArrayCubes( Mvc_Cover_t * pCover ) 
{ 
    if ( pCover->nCubesAlloc < pCover->lCubes.nItems )
    {
        if ( pCover->nCubesAlloc > 0 )
            MEM_FREE( pCover->pMem, Mvc_Cube_t *, pCover->nCubesAlloc, pCover->pCubes );
        pCover->nCubesAlloc = pCover->lCubes.nItems;
        pCover->pCubes = MEM_ALLOC( pCover->pMem, Mvc_Cube_t *, pCover->nCubesAlloc );
    }
}

/**Function*************************************************************

  Synopsis    []

  Description []
               
  SideEffects []

  SeeAlso     []

***********************************************************************/
void Mvc_CoverDeallocateMask( Mvc_Cover_t * pCover ) 
{ 
    Mvc_CubeFree( pCover, pCover->pMask );
    pCover->pMask = NULL;
}

/**Function*************************************************************

  Synopsis    []

  Description []
               
  SideEffects []

  SeeAlso     []

***********************************************************************/
void Mvc_CoverDeallocateArrayLits( Mvc_Cover_t * pCover ) 
{ 
    if ( pCover->pLits )
    {
        MEM_FREE( pCover->pMem, int, pCover->nBits, pCover->pLits );
        pCover->pLits = NULL;
    }
}

////////////////////////////////////////////////////////////////////////
///                       END OF FILE                                ///
////////////////////////////////////////////////////////////////////////


ABC_NAMESPACE_IMPL_END