您尚未登录。

楼主 #1 2021-03-30 11:00:03

无根浮萍
会员
注册时间: 2021-01-14
已发帖子: 62
积分: 31

全志Tina开发的朋友们, 一个百思不得其解shell脚本问题请教大家

①如果先输入 lunch命令,再输入92回车

ubuntu:/opt/f1c100s/Tina_rel/tina$ source build/envsetup.sh
Setup env done! Please run lunch next.
ubuntu:/opt/f1c100s/Tina_rel/tina$
ubuntu:/opt/f1c100s/Tina_rel/tina$ lunch

You're building on Linux

Lunch menu... pick a combo:
     1. astar_dm2-tina
     2. astar_dm-tina
     3. astar_evb-tina
...
     85. v316_SdvDragonBoard-tina
     86. v316_sdvlpddr-tina
     87. v316_sdv-tina
     88. v536_CdrDragonboard-tina
     89. v536_cdr-tina
     90. v5_dvb-tina
     91. v5_lindeni-tina
     92. violin_F1C200s-tina

Which would you like? [Default violin_F1C200s]: 92
============================================
TINA_BUILD_TOP=/opt/f1c100s/Tina_rel/tina
TINA_TARGET_ARCH=arm
TARGET_PRODUCT=violin_F1C200s
TARGET_PLATFORM=violin
TARGET_BOARD=violin-F1C200s
TARGET_BUILD_VARIANT=tina
TARGET_BUILD_TYPE=release
TARGET_KERNEL_VERSION=3.10
TARGET_UBOOT=u-boot-2014.07
TARGET_CHIP=sun3iw1p1
============================================
ubuntu:/opt/f1c100s/Tina_rel/tina$ 

这样继续 make & pack 都不会出错。





②但是如果执行 echo 92 | lunch:

:/opt/f1c100s/Tina_rel/tina$ echo 92 | lunch

You're building on Linux

Lunch menu... pick a combo:
     1. astar_dm2-tina
     2. astar_dm-tina
     3. astar_evb-tina
...
     90. v5_dvb-tina
     91. v5_lindeni-tina
     92. violin_F1C200s-tina

Which would you like? [Default violin_F1C200s]: ============================================
TINA_BUILD_TOP=/opt/f1c100s/Tina_rel/tina
TINA_TARGET_ARCH=arm
TARGET_PRODUCT=violin_F1C200s
TARGET_PLATFORM=violin
TARGET_BOARD=violin-F1C200s
TARGET_BUILD_VARIANT=tina
TARGET_BUILD_TYPE=release
TARGET_KERNEL_VERSION=3.10
TARGET_UBOOT=u-boot-2014.07
TARGET_CHIP=sun3iw1p1
============================================

make & pack 都不会执行



我上面两步有什么差异吗?

离线

楼主 #2 2021-03-30 11:19:28

无根浮萍
会员
注册时间: 2021-01-14
已发帖子: 62
积分: 31

Re: 全志Tina开发的朋友们, 一个百思不得其解shell脚本问题请教大家

研究了一下,


第①步会生成:

/opt/f1c100s/Tina_rel/tina$ export
declare -x BUILD_ENV_SEQUENCE_NUMBER="10"
declare -x DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1001/bus"
declare -x DISPLAY="localhost:10.0"
declare -x GCC_COLORS="error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01"
declare -x HOME="/home/cube"
declare -x LANG="en_US.UTF-8"
declare -x LESSCLOSE="/usr/bin/lesspipe %s %s"
declare -x LESSOPEN="| /usr/bin/lesspipe %s"
declare -x LICHEE_CHIP_CONFIG_DIR="/opt/f1c100s/Tina_rel/tina/device/config/chips/violin"
declare -x LICHEE_PACK_OUT_DIR="/opt/f1c100s/Tina_rel/tina/out/violin-F1C200s/image"
declare -x LOGNAME="cube"
declare -x LS_COLORS="rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:"
declare -ax LUNCH_MENU_CHOICES=([0]="astar_dm2-tina" [1]="astar_dm-tina" [2]="astar_evb-tina" [3]="astar_noma-tina" [4]="astar_parrot-tina" [5]="astar_spk-tina" [6]="azalea_evb-tina" [7]="azalea_m2ultraservers-tina" [8]="azalea_m2ultra-tina" [9]="azalea_perf1-tina" [10]="azalea_perf2-tina" [11]="azalea_perf3-tina" [12]="bangu_h300-tina" [13]="banjo_dh-tina" [14]="banjo_GW-tina" [15]="banjo_kudrone-tina" [16]="banjo_mic-tina" [17]="banjo_perf1-tina" [18]="banjo_R11_pref1-tina" [19]="banjo_R11_sc3866r-tina" [20]="banjo_R7_pref1-tina" [21]="bassoon_perf1-tina" [22]="bassoon_std-tina" [23]="boobam_ac100-tina" [24]="boobam_ac101s-tina" [25]="boobam_std-tina" [26]="cello_perf1-tina" [27]="cello_pro-tina" [28]="cowbell_demo-tina" [29]="cowbell_perf1-tina" [30]="cowbell_perf2_xr829-tina" [31]="cowbell_qa-tina" [32]="cowbell_std-tina" [33]="cowbell_ubidemo-tina" [34]="drum_std-tina" [35]="drum_std_xr829-tina" [36]="flute_ac100-tina" [37]="guitar_robots-tina" [38]="harp_robots-tina" [39]="koto_carp-tina" [40]="koto_perf1-tina" [41]="koto_perf2-tina" [42]="koto_std-tina" [43]="lute_R7s-tina" [44]="mandolin_perf1-tina" [45]="nuclear_dev-tina" [46]="octopus_dev-tina" [47]="octopus_sch-tina" [48]="organ_perf1-tina" [49]="organ_robots-tina" [50]="petrel_p1-tina" [51]="piano_chimera-tina" [52]="piano_p1-tina" [53]="piano_perf1-tina" [54]="r328s2_demo-tina" [55]="r328s2_perf1_rt-tina" [56]="r328s2_perf1-tina" [57]="r328s2_perf2_xr829-tina" [58]="r328s2_qa-tina" [59]="r328s2_std-tina" [60]="r328s2_ubidemo-tina" [61]="sitar_cuckoo-tina" [62]="sitar_db-tina" [63]="sitar_evb-tina" [64]="sitar_mic2-tina" [65]="sitar_mic-tina" [66]="sitar_pd4-tina" [67]="sitar_perf1-tina" [68]="sitar_perf2-tina" [69]="sitar_perf3-tina" [70]="t7_chimera-tina" [71]="t7_p1-tina" [72]="t7_perf1-tina" [73]="tulip_d1nor-tina" [74]="tulip_d1-tina" [75]="tulip_hena-tina" [76]="tulip_m64-tina" [77]="tulip_mozart-tina" [78]="tulip_noma-tina" [79]="tulip_perf1-tina" [80]="tulip_pine64-tina" [81]="tulip_sgw-tina" [82]="v313_sdv-tina" [83]="v316_perfnor-tina" [84]="v316_SdvDragonBoard-tina" [85]="v316_sdvlpddr-tina" [86]="v316_sdv-tina" [87]="v536_CdrDragonboard-tina" [88]="v536_cdr-tina" [89]="v5_dvb-tina" [90]="v5_lindeni-tina" [91]="violin_F1C200s-tina")
declare -x MAIL="/var/mail/cube"
declare -x OLDPWD="/opt/f1c100s/Tina_rel/tina/package/add-rootfs-demo"
declare -x PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"
declare -x PLATFORM_CHOICES="astar
azalea
bangu
banjo
bassoon
boobam
cello
cowbell
drum
flute
guitar
harp
koto
lute
mandolin
nuclear
octopus
organ
petrel
piano
r328s2
sitar
t7
tulip
v313
v316
v5
v536
violin"
declare -x PWD="/opt/f1c100s/Tina_rel/tina"
declare -x SHELL="/bin/bash"
declare -x SHLVL="1"
declare -x SSH_CLIENT="127.0.0.1 49258 22"
declare -x SSH_CONNECTION="127.0.0.1 49258 127.0.0.1 22"
declare -x SSH_TTY="/dev/pts/0"
declare -x TARGET_BOARD="violin-F1C200s"
declare -x TARGET_BUILD_TYPE="release"
declare -x TARGET_BUILD_VARIANT="tina"
declare -x TARGET_CHIP="sun3iw1p1"
declare -x TARGET_KERNEL_VERSION="3.10"
declare -x TARGET_PLATFORM="violin"
declare -x TARGET_PRODUCT="violin_F1C200s"
declare -x TARGET_UBOOT="u-boot-2014.07"
declare -x TERM="xterm"
declare -x TINA_BUILD_TOP="/opt/f1c100s/Tina_rel/tina"
declare -x TINA_TARGET_ARCH="arm"
declare -x TINA_TOP="/opt/f1c100s/Tina_rel/tina"
declare -x USER="cube"
declare -x VARIANT_CHOICES="tina"
declare -x XDG_DATA_DIRS="/usr/local/share:/usr/share:/var/lib/snapd/desktop"
declare -x XDG_RUNTIME_DIR="/run/user/1001"
declare -x XDG_SESSION_ID="683"

这些环境变量:

declare -x TARGET_BOARD="violin-F1C200s"
declare -x TARGET_BUILD_TYPE="release"
declare -x TARGET_BUILD_VARIANT="tina"
declare -x TARGET_CHIP="sun3iw1p1"
declare -x TARGET_KERNEL_VERSION="3.10"
declare -x TARGET_PLATFORM="violin"

第②步不会

离线

楼主 #4 2021-04-02 14:48:46

无根浮萍
会员
注册时间: 2021-01-14
已发帖子: 62
积分: 31

Re: 全志Tina开发的朋友们, 一个百思不得其解shell脚本问题请教大家

@哇酷小二 对, 我想了一下, 确实是这个问题, 但是lunch这个是批处理文件里面的一个函数,又不能用source执行, 所以不得不曲线救国:

source build/envsetup.sh;\
echo 92 | lunch;\
export TINA_BUILD_TOP=/opt/f1c100s/tina/tina;\
export TINA_TARGET_ARCH=arm;\
export TARGET_PRODUCT=violin_F1C200s;\
export TARGET_PLATFORM=violin;\
export TARGET_BOARD=violin-F1C200s;\
export TARGET_BUILD_VARIANT=tina;\
export TARGET_BUILD_TYPE=release;\
export TARGET_KERNEL_VERSION=3.10;\
export TARGET_UBOOT=u-boot-2014.07;\
export TARGET_CHIP=sun3iw1p1;\
make -j5;\
pack;\

暂时把问题解(掩)决(盖)了 ...



其他编译问题参考这个帖子:
试一试 Ubuntu 18.04 编译f1c200s tina 3.x
http://whycan.com/t_3270.html

最近编辑记录 无根浮萍 (2021-04-02 14:50:20)

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn