3(2)、uboot根目录下的mkconfig.mk文件代码

来源:互联网 发布:php 检验 excel 编辑:程序博客网 时间:2024/05/23 07:26
#!/bin/sh -e# Script to create header files and links to configure# U-Boot for a specific board.## Parameters:  Target  Architecture  CPU  Board [VENDOR] [SOC]## (C) 2002-2006 DENX Software Engineering, Wolfgang Denk <wd@denx.de>#APPEND=no# Default: Create new config fileBOARD_NAME=""# Name to print in make outputwhile [ $# -gt 0 ] ; docase "$1" in--) shift ; break ;;-a) shift ; APPEND=yes ;;-n) shift ; BOARD_NAME="${1%%_config}" ; shift ;;*)  break ;;esacdone[ "${BOARD_NAME}" ] || BOARD_NAME="$1"[ $# -lt 4 ] && exit 1[ $# -gt 6 ] && exit 1echo "Configuring for ${BOARD_NAME} board..."## Create link to architecture specific headers#if [ "$SRCTREE" != "$OBJTREE" ] ; thenmkdir -p ${OBJTREE}/includemkdir -p ${OBJTREE}/include2cd ${OBJTREE}/include2rm -f asmln -s ${SRCTREE}/include/asm-$2 asmLNPREFIX="../../include2/asm/"cd ../includerm -rf asm-$2rm -f asmmkdir asm-$2ln -s asm-$2 asmelsecd ./includerm -f asmln -s asm-$2 asmfirm -f asm-$2/archif [ -z "$6" -o "$6" = "NULL" ] ; thenln -s ${LNPREFIX}arch-$3 asm-$2/archelseln -s ${LNPREFIX}arch-$6 asm-$2/archfi# create link for s3c24xx SoCif [ "$3" = "s3c24xx" ] ; thenrm -f regs.hln -s $6.h regs.hrm -f asm-$2/archln -s arch-$3 asm-$2/archfi# create link for s3c64xx SoCif [ "$3" = "s3c64xx" ] ; thenrm -f regs.hln -s $6.h regs.hrm -f asm-$2/archln -s arch-$3 asm-$2/archfi# create link for s5pc1xx SoCif [ "$3" = "s5pc1xx" ] ; then        rm -f regs.h        ln -s $6.h regs.h        rm -f asm-$2/arch        ln -s arch-$3 asm-$2/archfi# create link for s5pc11x SoCif [ "$3" = "s5pc11x" ] ; then        rm -f regs.h        ln -s $6.h regs.h        rm -f asm-$2/arch        ln -s arch-$3 asm-$2/archfi# create link for s5p64xx SoCif [ "$3" = "s5p64xx" ] ; thenrm -f regs.hln -s $6.h regs.hrm -f asm-$2/archln -s arch-$3 asm-$2/archfi# create link for s5p644x SoCif [ "$3" = "s5p644x" ] ; thenrm -f regs.hln -s $6.h regs.hrm -f asm-$2/archln -s arch-$3 asm-$2/archfiif [ "$2" = "arm" ] ; thenrm -f asm-$2/procln -s ${LNPREFIX}proc-armv asm-$2/procfi# create link for s3c64xx-mp SoCif [ "$3" = "s3c64xx-mp" ] ; thenrm -f regs.hln -s $6.h regs.hrm -f asm-$2/archln -s arch-$3 asm-$2/archfi## Create include file for Make#echo "ARCH   = $2" >  config.mkecho "CPU    = $3" >> config.mkecho "BOARD  = $4" >> config.mk[ "$5" ] && [ "$5" != "NULL" ] && echo "VENDOR = $5" >> config.mk[ "$6" ] && [ "$6" != "NULL" ] && echo "SOC    = $6" >> config.mk## Create board specific header file#if [ "$APPEND" = "yes" ]# Append to existing config filethenecho >> config.helse> config.h# Create new config filefiecho "/* Automatically generated - do not edit */" >>config.hecho "#include <configs/$1.h>" >>config.hexit 0

原创粉丝点击