[Backup] Using the DSP on Gumstix with Yocto from SleepyRobot

本文介绍如何使用Yocto构建系统为Gumstix开发板配置数字信号处理器(DSP),包括安装必要软件、配置环境变量、解决构建过程中遇到的问题,并通过测试验证DSP是否正常工作。

Using the DSP on Gumstix with Yocto

Lots of discussion on the mailing list lately on how to get the DSP working using the new yocto build system. This works for me…

Start with the standard instructions and make sure you can build gumstix-console-image.

I’m using 64-bit (AMD64) Ubuntu 12.04 LTS, so I needed to also install ia32-libs for the TI installer. You may not need this, depending on your build host.

sudo apt-get install ia32-libs

Now, add the meta-ti layer:

cd ~/yocto/poky
git clone git://git.yoctoproject.org/meta-ti
cd meta-ti
git checkout denzil

Then edit ~/yocto/build/conf/bblayers.conf to add the meta-ti layer so that it looks something like this:

BBLAYERS ?= " \
  /home/chris/yocto/poky/meta \
  /home/chris/yocto/poky/meta-yocto \
  /home/chris/yocto/poky/meta-openembedded/meta-gnome \
  /home/chris/yocto/poky/meta-openembedded/meta-oe \
  /home/chris/yocto/poky/meta-openembedded/meta-xfce \
  /home/chris/yocto/poky/meta-gumstix \
  /home/chris/yocto/poky/meta-ti \
  "

Edit ~/yocto/build/conf/local.conf and add the following line to ignore some of the meta-ti recipes:

BBMASK ?= ".*/meta-ti/recipes-(misc|bsp/formfactor)/"

Fix up the toolchain_path env variable by editing ~/yocto/poky/meta-gumstix/conf/machine/overo.inc and adding the line below. This fixes the problem finding the compiler when building dsplink.

TOOLCHAIN_PATH ?= "${STAGING_DIR_NATIVE}${prefix_native}/bin/${TUNE_PKGARCH}${HOST_VENDOR}-${HOST_OS}"
TOOLCHAIN_SYSPATH ?= "${TOOLCHAIN_PATH}/${TARGET_SYS}"

Then edit ~/yocto/poky/meta-gumstix/conf/machine/include/omap3.inc and just before the tune-cortexa8.inc line, add the line below. This fixes the problem building the DMAI recipe.

require conf/machine/include/soc-family.inc

Now, download ti_cgt_c6000_7.2.7_setup_linux_x86.bin from TI and place in your ~/yocto/build/downloads directory. Touch ti_cgt_c6000_7.2.7_setup_linux_x86.bin.done in the same directory.

Ok! You should now be able to “bitbake gstreamer-ti”. It will take a bit of time.

If this works, you can build an image that has gstreamer-ti along with other gstreamer-plugins. Here is one such image recipe:gumstix-dsp-image.bb

Once the image is built, create your sd card. When booting for the first time, stop the u-boot countdown and change the env vars to leave a memory hole for cmemk.

setenv mem 'mem=96M@0x80000000 mem=384M@0x88000000'
setenv mpurate 800
setenv mmcargs 'setenv bootargs console=${console} mpurate=${mpurate} vram=${vram} omapfb.mode=dvi:${dvimode} omapfb.debug=y omapfb.vram=${fbvram} omapdss.def_disp=${defaultdisplay} ${mem} root=${mmcroot} rootfstype=${mmcrootfstype}'
saveenv
reset

Go ahead and boot into linux, then edit /lib/systemd/system/gstti-init.service and remove the line which starts “ConditionKernelCommandLine=”. This condition causes the modules to only get loaded if the memory hole is very specific.

Now reboot one more time.

Once booted, check your modules and make sure cmemk loaded for you:

root@overo:~# lsmod                                                             
Module                  Size  Used by                                           
mt9v032                 7237  4294967295                                        
omap3_isp             131955  0                                                 
v4l2_common             8933  2 mt9v032,omap3_isp                               
videodev               99128  3 mt9v032,omap3_isp,v4l2_common                   
media                  12714  3 mt9v032,omap3_isp,videodev                      
ads7846                10488  0                                                 
sdmak                   4076  0                                                 
lpm_omap3530            6797  0                                                 
dsplinkk              131408  1 lpm_omap3530                                    
cmemk                  22005  0                                                 
rfcomm                 56119  0                                                 
hidp                   16251  0                                                 
bluetooth             258745  4 rfcomm,hidp                                     
rfkill                 17524  1 bluetooth                                       
ipv6                  249350  16      

Test out the dsp with a simple pipeline:

gst-launch videotestsrc num-buffers=5 ! TIVidenc1 codecName=mpeg4enc engineName=codecServer ! fakesink

Good luck.

内容概要:本文介绍了基于贝叶斯优化的CNN-LSTM混合神经网络在时间序列预测中的应用,并提供了完整的Matlab代码实现。该模型结合了卷积神经网络(CNN)在特征提取方面的优势与长短期记忆网络(LSTM)在处理时序依赖问题上的强大能力,形成一种高效的混合预测架构。通过贝叶斯优化算法自动调参,提升了模型的预测精度与泛化能力,适用于风电、光伏、负荷、交通流等多种复杂非线性系统的预测任务。文中还展示了模型训练流程、参数优化机制及实际预测效果分析,突出其在科研与工程应用中的实用性。; 适合人群:具备一定机器学习基基于贝叶斯优化CNN-LSTM混合神经网络预测(Matlab代码实现)础和Matlab编程经验的高校研究生、科研人员及从事预测建模的工程技术人员,尤其适合关注深度学习与智能优化算法结合应用的研究者。; 使用场景及目标:①解决各类时间序列预测问题,如能源出力预测、电力负荷预测、环境数据预测等;②学习如何将CNN-LSTM模型与贝叶斯优化相结合,提升模型性能;③掌握Matlab环境下深度学习模型搭建与超参数自动优化的技术路线。; 阅读建议:建议读者结合提供的Matlab代码进行实践操作,重点关注贝叶斯优化模块与混合神经网络结构的设计逻辑,通过调整数据集和参数加深对模型工作机制的理解,同时可将其框架迁移至其他预测场景中验证效果。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值