如何把patch加到buildroot中
发布网友
发布时间:2022-04-22 18:14
我来回答
共1个回答
热心网友
时间:2023-07-05 09:32
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的:
lvs fullnat 必须编译内核么
cp /usr/local/src/linux-2.6.32-220.23.1.el6.x86_64.lvs/lvs-2.6.32-220.23.1.el6.patch .淘宝将IP_VS改成了22,测试时遇到些麻烦,因此改为20了。vim .config CONFIG_IP_VS_TAB_BITS=20 你可以修改Makefile把内核的名称做下标记(line:4)EXTRAVERSION = .FNAT.shanks.e27.x86...