【目的】
把我的mplayer的vbr的patch加到buildroot的mplayer中
【方法】
1.确定buildroot中的mplayer的patch的命名规则,这个可以在
先去删除buildroot中的mplayer:
rm build_arm/MPlayer-1.0rc1/ -r
然后直接make,编译输出过程中就有对应信息:
[root@linux-41lh buildroot]$>make
Checking build system dependencies:
BUILDROOT_DL_DIR clean: Ok
CC clean: Ok
。。。。。。。。
rm -rf /root/buildroot/buildroot/project_build_arm/uclibc/buildroot-config
mkdir -p /root/buildroot/buildroot/project_build_arm/uclibc
cp -dpRf package/config/buildroot-config /root/buildroot/buildroot/project_build_arm/uclibc/buildroot-config
bzcat /root/buildroot/buildroot/dl/MPlayer-1.0rc1.tar.bz2 | tar -C /root/buildroot/buildroot/build_arm -xf –
toolchain/patch-kernel.sh /root/buildroot/buildroot/build_arm/MPlayer-1.0rc1 package/mplayer/ mplayer-1.0rc1*.patch*
Applying mplayer-1.0rc1-atmel.3.patch using plaintext:
patching file cfg-common.h
patching file cfg-mencoder.h
patching file cfg-mplayer.h
patching file configure
patching file libaf/af_format.c
patching file libavcodec/Makefile
patching file libavcodec/avr32/dsputil_avr32.c
patching file libavcodec/avr32/fdct.S
patching file libavcodec/avr32/h264idct.S
patching file libavcodec/avr32/idct.S
patching file libavcodec/avr32/mc.S
patching file libavcodec/avr32/pico.h
patching file libavcodec/bitstream.h
patching file libavcodec/dsputil.c
patching file libavcodec/h264.c
patching file libavutil/common.h
patching file libavutil/internal.h
patching file libfaad2/common.h
patching file libmpcodecs/ad_libmad.c
patching file libswscale/pico-avr32.h
patching file libswscale/swscale_internal.h
patching file libswscale/yuv2rgb.c
patching file libswscale/yuv2rgb_avr32.c
patching file libvo/vo_fbdev2.c
patching file version.sh
Applying mplayer-1.0rc1-index.patch using plaintext:
patching file stream/stream_dvb.c
touch /root/buildroot/buildroot/build_arm/MPlayer-1.0rc1/.unpacked
(cd /root/buildroot/buildroot/build_arm/MPlayer-1.0rc1; rm -rf config.cache;
说明patch名字符合 mplayer-1.0rc1*.patch* 即可。
所以,把自己patch改名符合条件的:mplayer-1.0rc1_vbr_fixedMad.patch
2.把patch拷贝到对应文件夹下:
拷贝mplayer-1.0rc1_vbr_fixedMad.patch到 package/mplayer/ 下面。
这样,make的时候,就会自动找到该patch,并执行它:
。。。。。。。。
rm -rf /root/buildroot/buildroot/project_build_arm/uclibc/buildroot-config
mkdir -p /root/buildroot/buildroot/project_build_arm/uclibc
cp -dpRf package/config/buildroot-config /root/buildroot/buildroot/project_build_arm/uclibc/buildroot-config
bzcat /root/buildroot/buildroot/dl/MPlayer-1.0rc1.tar.bz2 | tar -C /root/buildroot/buildroot/build_arm -xf –
toolchain/patch-kernel.sh /root/buildroot/buildroot/build_arm/MPlayer-1.0rc1 package/mplayer/ mplayer-1.0rc1*.patch*
。。。。
Applying mplayer-1.0rc1-index.patch using plaintext:
patching file stream/stream_dvb.c
Applying mplayer-1.0rc1_vbr_fixedMad.patch using plaintext:
patching file libmpcodecs/ad_hwmpa.c
patching file libmpcodecs/ad_libmad.c
patching file libmpcodecs/ad_mp3lib.c
patching file libmpdemux/demux_audio.c
patching file libmpdemux/mp3_hdr.c
patching file libmpdemux/mp3_hdr.h
patching file libmpdemux/muxer_mpeg.c
touch /root/buildroot/buildroot/build_arm/MPlayer-1.0rc1/.unpacked
(cd /root/buildroot/buildroot/build_arm/MPlayer-1.0rc1; rm -rf config.cache;
PATH="/root/buildroot/buildroot/toolchain_build_arm/bin:/root/buildroot/buildroot/build_arm/staging_dir/bin:/root/buildroot/buildroot/build_arm/staging_dir/usr/bin:/usr/lib/mpi/gcc/openmpi/bin:/usr/local/bin:/usr/bin:/sbin:/usr/sbin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/kde3/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/root/buildroot/buildroot/build_arm/staging_dir/include:/root/buildroot/buildroot/build_arm/staging_dir/usr/include:/root/buildroot/buildroot/build_arm/staging_dir/usr/bin" AR="/root/buildroot/buildroot/build_arm/staging_dir/usr/bin/arm-linux-uclibc-ar" 。。。。。。。。
另外要说明一点是,为了确保你的patch正常工作了,你要保证出来的patch,是用-p1去使用的。
因为,buildroot中就是去根据
package/mplayer/mplayer.mk
中的要求,调用toolchain/patch-kernel.sh去应用patch的,而toolchain/patch-kernel.sh里面,是用-p1的:
echo "Applying ${i} using ${type}: "
${uncomp} ${patchdir}/${i} | patch -p1 -E -d ${targetdir}
转载请注明:在路上 » 如何把patch加到buildroot中