⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 adjust.sh

📁 ct952 source code use for Digital Frame Photo
💻 SH
📖 第 1 页 / 共 2 页
字号:
#!/bin/bash#===============================================================================##          FILE:  test1.sh# #         USAGE:  ./test1.sh # #   DESCRIPTION:  # #       OPTIONS:  ---#  REQUIREMENTS:  ---#          BUGS:  ---#         NOTES:  ---#        AUTHOR:   (), #       COMPANY:  #       VERSION:  1.0#       CREATED:  03/28/07 19:30:40 TST#      REVISION:  ---#===============================================================================usage(){    echo "================= Usage ================="    echo "make 16   : 16M F/W + 64M DRAM"    echo "make 16r  : 16M F/W + 16M DRAM"    echo "make 16d  : 16M Debug Mode F/W + 64M DRAM"    echo "make 32   : 32M Debug Mode F/W + 64M DRAM"    echo "make 32   : 64M Debug Mode F/W + 64M DRAM"    echo     echo "make help : This help screen"    echo "========================================="}## show initial settings## must be confirmed by userget_initial_settings(){    echo ""    echo "============ CTK Platform Setting ============="    echo "Platform          : $platform"    echo "IC System         : $ic_system"    echo "OSD Language      : $osd_lan"    echo "Support DMP       : $sup_dmp"    echo "Support STB       : $sup_stb"    echo "Dram Solution     : $dram_size"  MB    echo "Flash Solution    : $flash_size" MB    echo "==============================================="    echo ""}CT909R(){    ## [1] copy 909S folder    echo "Copying 909S folder"    cp -f ./909S/* .    ## [2] copy 950_Files folder    if [ "$sup_dmp" = "1" ]; then    echo "Copying 950_Files folder"        cp -f ./950_Files/* .    fi    ## [3] modify internal.h    if [ "$dram_size" = "16" ]; then        cat internal.h | sed                                                                \            -e "s/^\(#define *DRAM_CONFIGURATION_TYPE  *\).*/\1DRAM_SIZE_${dram_size}/"     \            -e 's/^\(#define *CPU_SPEED *\).*/\1CPU_146M/' > internal.h.tmp    else        cat internal.h | sed                                                                \            -e "s/^\(#define *DRAM_CONFIGURATION_TYPE  *\).*/\1DRAM_SIZE_${dram_size}/"     \            -e 's/^\(#define *CPU_SPEED *\).*/\1CPU_133M/' > internal.h.tmp    fi    mv -vf internal.h.tmp internal.h    ## [4] copy DVD909.ld    if [ "$dram_size" = "16" ]; then        if [ "$debug_en" = "_DBG" ]; then            cp -vf DVD909_16MDBG.ld DVD909.ld        else            cp -vf DVD909_16M.ld DVD909.ld        fi    else        cp -vf DVD909_${dram_size}M.ld DVD909.ld    fi        ## [4.1] modify DVD909.ld    if [ "$sup_dmp" = "1" ]    then        cat DVD909.ld | sed                                 \            -e '/ *srv_dram.a.*/d'                          \            > DVD909.ld.tmp        mv -vf DVD909.ld.tmp DVD909.ld    fi        ## [5] copy romcfg.txt    cp -vf romcfg${dmpcfg}${stbcfg}_${flash_size}flash_${dram_size}dram${debug_en}.txt romcfg.txt    ## [6] modify address.txt    if [ "$dram_size" = "16" ]; then        if [ "$real_16m" = "TRUE" ]; then            cat address.txt | sed -e 's/^mclk_config/#&/'   \                -e 's/^#\(mclk_config.*00000092.*\)/\1/'    \                -e 's/^prom_config/#&/'                     \                -e 's/#\(prom_config.*20621031.*\)/\1/'     \                -e 's/^dram_config/#&/'                     \                -e 's/^#\(dram_config.*0004001b.*\)/\1/'    \                > address.txt.tmp        else            cat address.txt | sed -e 's/^mclk_config/#&/'   \                -e 's/^#\(mclk_config.*00000092.*\)/\1/'    \                -e 's/^prom_config/#&/'                     \                -e 's/#\(prom_config.*20621031.*\)/\1/'     \                -e 's/^dram_config/#&/'                     \                -e 's/^#\(dram_config.*0004001e.*\)/\1/'    \                > address.txt.tmp        fi    else        cat address.txt | sed -e 's/^mclk_config/#&/'       \            -e 's/^#\(mclk_config.*00000085.*\)/\1/'        \            -e 's/^prom_config/#&/'                         \            -e 's/#\(prom_config.*00023131.*\)/\1/'         \            -e 's/^dram_config/#&/'                         \            -e 's/^#\(dram_config.*0004001e.*)\)/\1/'       \        > address.txt.tmp    fi    mv -vf address.txt.tmp address.txt    ## [7] copy OSDString    echo "Removing OSDString/*.c"    rm -f ./OSDString/*.c    if [ "$sup_stb" = "1" ]    then        echo "Copy ./STB/OSDString/OSD${osd_lan}_${dram_size}M folder"        cp -f ./STB/OSDString/OSD${osd_lan}_${dram_size}M/* ./OSDString/    else        echo "Copy OSD${osd_lan}_${dram_size}M folder"        cp -f ./OSDString/OSD${osd_lan}_${dram_size}M/* ./OSDString/    fi    ## [8] modify Makefile    cat Makefile | sed                                      \        -e "s/^\(SUPPORT_950[ \t]*= *\)./\1${sup_dmp}/"     \        -e "s/^\(SUPPORT_STB[ \t]*= *\)./\1${sup_stb}/"     \        -e "s/^#\([ \t]*cd usb && \$(MAKE) INSTALL_DIR=\$(INSTALL_DIR)\)/\1/"  \        > Makefile.tmp    mv Makefile.tmp Makefile    ## [9] modify Winav.h    if [ "$sup_dmp" = "1" ]    then        cat Winav.h | sed                                   \            -e "s/\/\/.*\(#define CT950_STYLE\)/\1/"        \            > Winav.h.tmp    else        cat Winav.h | sed                           \            -e "s/^\(#define CT950_STYLE\)/\/\/\1/" \        > Winav.h.tmp    fi    mv -vf Winav.h.tmp Winav.h    ## [10] modify customer.h    if [ "$sup_dmp" = "1" ]    then        cat customer.h | sed                                   \            -e "s/\/\/.*\(#define CT951_PLATFORM\)/\1/"        \            > customer.h.tmp    else        cat customer.h | sed                           \            -e "s/^\(#define CT951_PLATFORM\)/\/\/\1/" \        > customer.h.tmp    fi    mv -vf customer.h.tmp customer.h    ## [11] copy STB relative file    if [ "$sup_stb" = "1" ]    then        cp ./STB/Overlap_Files/* .    fi}CT909P(){    ## [1] copy relative folder    echo "Copying 909P folder"    cp -f ./909P/* .    ## [2] copy 950_Files folder    if [ "$sup_dmp" = "1" ]; then        echo "Copying 950_Files folder"        cp -f ./950_Files/* .    fi    ## [3] modify internal.h    cat internal.h | sed                                                                \        -e "s/^\(#define *DRAM_CONFIGURATION_TYPE  *\).*/\1DRAM_SIZE_${dram_size}/"     \        -e 's/^\(#define *CPU_SPEED *\).*/\1CPU_133M/' > internal.h.tmp    mv -v internal.h.tmp internal.h    ## [4] copy DVD909.ld    if [ "$dram_size" = "16" ]; then        if [ "$debug_en" = "_DBG" ]; then            cp -vf DVD909_16MDBG.ld DVD909.ld        else            cp -vf DVD909_16M.ld DVD909.ld        fi    else        cp -vf DVD909_${dram_size}M.ld DVD909.ld    fi        ## [4.1] modify DVD909.ld    if [ "$sup_dmp" = "1" ]    then        cat DVD909.ld | sed                                 \            -e '/ *srv_dram.a.*/d'                          \            > DVD909.ld.tmp        mv -vf DVD909.ld.tmp DVD909.ld    fi    ## [5] copy romcfg.txt    cp -vf romcfg${dmpcfg}${stbcfg}_${flash_size}flash_${dram_size}dram${debug_en}.txt romcfg.txt    ## [6] modify address.txt#        -e 's/#\(prom_config.*20443131.*\)/\1/'         \    if [ "$dram_size" = "16" ]; then        if [ "$real_16m" = "TRUE" ]; then            cat address.txt | sed -e 's/^mclk_config/#&/'       \                -e 's/^#\(mclk_config.*00000085.*\)/\1/'        \                -e 's/^prom_config/#&/'                         \                -e 's/^dram_config/#&/'                         \                -e 's/^#\(dram_config.*0108011b.*)\)/\1/'       \                -e 's/#\(prom_config.*20541010.*909P\)/\1/'     \            > address.txt.tmp        else            cat address.txt | sed -e 's/^mclk_config/#&/'       \                -e 's/^#\(mclk_config.*00000085.*\)/\1/'        \                -e 's/^prom_config/#&/'                         \                -e 's/^dram_config/#&/'                         \                -e 's/^#\(dram_config.*0108011e.*)\)/\1/'       \                -e 's/#\(prom_config.*20541010.*909P\)/\1/'     \            > address.txt.tmp        fi    else        cat address.txt | sed -e 's/^mclk_config/#&/'       \            -e 's/^#\(mclk_config.*00000085.*\)/\1/'        \            -e 's/^prom_config/#&/'                         \            -e 's/^dram_config/#&/'                         \            -e 's/^#\(dram_config.*0108011e.*)\)/\1/'       \            -e 's/#\(prom_config.*20443131.*\)/\1/'         \        > address.txt.tmp    fi    mv address.txt.tmp address.txt    ## [7] copy OSDString    echo "Removing OSDString/*.c"    rm -f ./OSDString/*.c    if [ "$sup_stb" = "1" ]    then        echo "Copy ./STB/OSDString/OSD${osd_lan}_${dram_size}M folder"        cp -f ./STB/OSDString/OSD${osd_lan}_${dram_size}M/* ./OSDString/    else        echo "Copy OSD${osd_lan}_${dram_size}M folder"        cp -f ./OSDString/OSD${osd_lan}_${dram_size}M/* ./OSDString/    fi    ## [8] modify Makefile    cat Makefile | sed                                      \        -e "s/^\(SUPPORT_950[ \t]*= *\)./\1${sup_dmp}/"     \        -e "s/^\(SUPPORT_STB[ \t]*= *\)./\1${sup_stb}/"     \        -e "s/^[ \t]*cd usb && \$(MAKE) INSTALL_DIR=\$(INSTALL_DIR)/#&/"  \        > Makefile.tmp

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -