📄 adjust.sh
字号:
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] copy STB relative file if [ "$sup_stb" = "1" ] then cp ./STB/Overlap_Files/* . fi}CT909G(){ ## [1] copy relative folder echo "Copying 909G folder" cp -f ./909G/* . ## [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 ## [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.*20043131.*\)/\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.*0009001b.*)\)/\1/' \ -e 's/#\(prom_config.*20541010.*909G\)/\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.*00090018.*)\)/\1/' \ -e 's/#\(prom_config.*20541010.*909G\)/\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.*00090018.*)\)/\1/' \ -e 's/#\(prom_config.*20043131.*\)/\1/' \ > address.txt.tmp fi mv address.txt.tmp address.txt ## [7] copy OSDString echo "Removing OSDString/*.c" rm -f ./OSDString/*.c echo "Copy OSD${osd_lan}_${dram_size}M folder" cp -f ./OSDString/OSD${osd_lan}_${dram_size}M/* ./OSDString/ ## [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 mv Makefile.tmp Makefile}Get_IC_Version(){## referece Winav.h ic_type_array=(IC_VERSION_RESERVED \ IC_VERSION_909R \ IC_VERSION_219 \ IC_VERSION_909P_A_W \ IC_VERSION_909P_B_X \ IC_VERSION_909G \ IC_VERSION_950A \ IC_VERSION_952A \ IC_VERSION_955A \ IC_VERSION_956A \ IC_VERSION_956A_DEV \ IC_VERSION_951 \ IC_VERSION_908G)# ic_num_array=(0x0001 \# 0x0010 \# 0x0011 \# 0x0020 \# 0x0021 \# 0x0030 \# 0x0040 \# 0x0041 \# 0x0042 \# 0x0043 \# 0x0044 \# 0x0045 \# 0x00f0) ic_num_array=(1 \ 16 \ 17 \ 32 \ 33 \ 48 \ 64 \ 65 \ 66 \ 67 \ 68 \ 69 \ 180) platform=$(cat internal.h | sed -ne 's/^ *#define *DECODER_SYSTEM *\([^ ]*\)/\1/p') str1="ic_type=\`cat Winav.h | sed -ne '/^#if (DECODER_SYSTEM == $platform)/,/#endif.*$platform/s/^#define *IC_VERSION_ID *\([^ ]*\)/\1/p'\`" eval $str1 echo "IC_TYPE:" $ic_type str2="upgname=\`cat Winav.h | sed -ne '/^#if (DECODER_SYSTEM == $platform)/,/#endif.*$platform/s/^#define *CS_UPGAP_NAME *\"\([^ ]*\)\"/\1/p'\`" eval $str2 echo "UPG_NAME:" $upgname for ((i=0;i<13;i++)) do #echo $i : ${ic_type_array[i]} #echo $i : ${ic_num_array[i]} if [ "$ic_type" = "${ic_type_array[i]}" ] then #echo $i ic_version=${ic_num_array[i]} #echo $ic_version fi done cat Makefile | sed \ -e "s/^\(IC_VERSION[ \t]*= *\).*/\1${ic_version}/" \ -e "s/^\(UPG_NAME[ \t]*= *\).*/\1${upgname}/" \ > Makefile.tmp mv Makefile.tmp Makefile}CTK_platform(){#Get_IC_Version case "$ic_system" in #DVD909[SR]_EVAL ) CT909R_IC_SYSTEM ) CT909R ;; #DVD909P_[AB]_EVAL | DMP95[256]A_EVAL | DVD956A_DEV ) CT909P_IC_SYSTEM ) CT909P ;; #DVD909G_EVAL ) CT909G_IC_SYSTEM ) CT909G ;; esac}while getopts ":d:hwc" opt; do case $opt in d ) case $OPTARG in 16 | 32 | 64 ) dramtype="DRAM_SIZE_$OPTARG" dram_size=$OPTARG ;; 16r ) dramtype="DRAM_SIZE_16" dram_size=16 real_16m=TRUE ;; 16d ) dramtype="DRAM_SIZE_16" dram_size=16 debug_en=_DBG ;; esac ;; c ) Get_IC_Version exit 0 ;; w ) GET_PLATFORM_INFO exit 1 ;; v ) exit 1 ;; h | \? ) usage exit 1 ;; esacdoneshift $(( $OPTIND - 1 ))## Get initial setting informationplatform=$(cat internal.h | sed -ne 's/^ *#define *DECODER_SYSTEM *\([^ ]*\)/\1/p')ic_system=$(cat platform.h | sed -ne 's/^ *#define *\(CT909[RPG]_IC_SYSTEM\)/\1/p')sup_stb=$(cat internal.h | sed -ne '/^ *#define *SUPPORT_STB/p')if [ -n "$sup_stb" ]; then sup_stb=1 stbcfg=_DVBelse sup_stb=0fisup_dmp=$(cat internal.h | sed -ne '/^ *#define *SUPPORT_DMP/p')if [ -n "$sup_dmp" ]; then sup_dmp=1 dmpcfg=_DMPelse sup_dmp=0 dmpcfg=_DVDfiflash_size=$(cat internal.h | sed -ne 's/^ *#define *FLASH_SIZE *FLASH_SIZE_\([0-9]*\)/\1/p')osd_lan=$(cat internal.h | sed -ne 's/^#define *SELL_DESTINATION *\([^ ]*\)/\1/p')get_initial_settings## Get user input, 'y' to continue, 'n' to abortecho -n "Do you want to continue? (y/n): "read inputuntil [ "$input" = "y" -o "$input" = "Y" -o "$input" = "N" -o "$input" = "n" ]do echo -n "Do you want to continue? (y/n): " read inputdone#if [ "$input" = "y" -o "$input" = "Y" ]if echo "$input" | grep -q '^[Yy]$'then ## continue CTK_platform echo ""else ## abort exit 1fi
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -