日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

u-boot分析

發布時間:2025/3/15 编程问答 22 豆豆
生活随笔 收集整理的這篇文章主要介紹了 u-boot分析 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

分makefile最好的方法就是從參照make之后的輸出學習

?

100ask24x0_config?? ?:?? ?unconfig
?? ?@$(MKCONFIG) $(@:_config=) arm arm920t 100ask24x0 NULL s3c24x0

$@代表的是target 100ask24x0_config, 那么$(@:_config=)就是將100ask24x0_config中的_config替換為空!得到100ask24x0; 你可以用echo自己打印出來看看就明白了!?

@$(MKCONFIG) ? @表示在執行命令時不輸出命令本身,只輸出結果
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? $(MKCONFIG)表示(MKCONFIG) 這個變量的值mkconfig
$(@:_config=) ? ? ?這里用到了makefile的變量替換規則,$(VAR:A=B)表示替換變量$VAR中的A為B,
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 即把$@中的_config替換為空變成smdk2410,$@ 目標文件,$^ 所有的依賴文件,$< 第一個依賴文件。

MKCONFIG?? ?:= $(SRCTREE)/mkconfig
export MKCONFIG

@$(MKCONFIG) $(@:_config=) arm arm920t 100ask24x0 NULL s3c24x0分析為:

mkconfig?? 100ask24x0 ? arm?? arm920t?? 100ask24x0? NULL s3c24x0

以下是:Makefile中生成最終u-boot的原句

$(obj)u-boot: depend version $(SUBDIRS) $(OBJS) $(LIBS) $(LDSCRIPT)UNDEF_SYM=`$(OBJDUMP) -x $(LIBS) |sed -n -e 's/.*\(__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\cd $(LNDIR) && $(LD) $(LDFLAGS) $$UNDEF_SYM $(__OBJS) \--start-group $(__LIBS) --end-group $(PLATFORM_LIBS) \-Map u-boot.map -o u-boot

?執行之后輸出的語句是:

make[1]: Leaving directory '/work/svn_linux/u-boot/common' UNDEF_SYM=`arm-linux-objdump -x lib_generic/libgeneric.a board/100ask24x0/lib100ask24x0.a cpu/arm920t/libarm920t.a cpu/arm920t/s3c24x0/libs3c24x0.a lib_arm/libarm.a fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.a net/libnet.a disk/libdisk.a rtc/librtc.a dtt/libdtt.a drivers/libdrivers.a drivers/nand/libnand.a drivers/nand_legacy/libnand_legacy.a drivers/usb/libusb.a drivers/sk98lin/libsk98lin.a common/libcommon.a |sed -n -e 's/.*\(__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\cd /work/svn_linux/u-boot && arm-linux-ld -Bstatic -T /work/svn_linux/u-boot/board/100ask24x0/u-boot.lds -Ttext 0x33F80000 $UNDEF_SYM cpu/arm920t/start.o \--start-group lib_generic/libgeneric.a board/100ask24x0/lib100ask24x0.a cpu/arm920t/libarm920t.a cpu/arm920t/s3c24x0/libs3c24x0.a lib_arm/libarm.a fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.a net/libnet.a disk/libdisk.a rtc/librtc.a dtt/libdtt.a drivers/libdrivers.a drivers/nand/libnand.a drivers/nand_legacy/libnand_legacy.a drivers/usb/libusb.a drivers/sk98lin/libsk98lin.a common/libcommon.a --end-group -L /work/tools/gcc-3.4.5-glibc-2.3.6/lib/gcc/arm-linux/3.4.5 -lgcc \-Map u-boot.map -o u-boot arm-linux-objcopy --gap-fill=0xff -O srec u-boot u-boot.srec arm-linux-objcopy --gap-fill=0xff -O binary u-boot u-boot.bin

make[1]: Leaving directory '/work/svn_linux/u-boot/common'
UNDEF_SYM=`arm-linux-objdump -x lib_generic/libgeneric.a board/100ask24x0/lib100ask24x0.a cpu/arm920t/libarm920t.a cpu/arm920t/s3c24x0/libs3c24x0.a lib_arm/libarm.a fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.a net/libnet.a disk/libdisk.a rtc/librtc.a dtt/libdtt.a drivers/libdrivers.a drivers/nand/libnand.a drivers/nand_legacy/libnand_legacy.a drivers/usb/libusb.a drivers/sk98lin/libsk98lin.a common/libcommon.a |sed ?-n -e 's/.*\(__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
? ? ? ? cd /work/svn_linux/u-boot && arm-linux-ld -Bstatic -T /work/svn_linux/u-boot/board/100ask24x0/u-boot.lds -Ttext 0x33F80000 ?$UNDEF_SYM cpu/arm920t/start.o \
? ? ? ? ? ? ? ? --start-group lib_generic/libgeneric.a board/100ask24x0/lib100ask24x0.a cpu/arm920t/libarm920t.a cpu/arm920t/s3c24x0/libs3c24x0.a lib_arm/libarm.a fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.a net/libnet.a disk/libdisk.a rtc/librtc.a dtt/libdtt.a drivers/libdrivers.a drivers/nand/libnand.a drivers/nand_legacy/libnand_legacy.a drivers/usb/libusb.a drivers/sk98lin/libsk98lin.a common/libcommon.a --end-group -L /work/tools/gcc-3.4.5-glibc-2.3.6/lib/gcc/arm-linux/3.4.5 -lgcc \
? ? ? ? ? ? ? ? -Map u-boot.map -o u-boot
arm-linux-objcopy --gap-fill=0xff -O srec u-boot u-boot.srec
arm-linux-objcopy --gap-fill=0xff -O binary u-boot u-boot.bin
?

?

?

?

?

?

?

總結

以上是生活随笔為你收集整理的u-boot分析的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。