ubuntu 在 R40e 上 還有 Debian 在 Sempron 2600 上

2010年10月14日 星期四

只要重新產生 system.img

system.img 是 從 out/target/product/imx51_bbg/system 做出來的。 如果改了 這個 folder 的內容,想要重新產生 system.img。不要管 system folde 裡面的 file 的 dependency,可以用 snod 這個 target: make snod 在 build/core/Makefile 可以看到 snod 這個 target: .PHONY: systemimage-nodeps snod systemimage-nodeps snod: $(filter-out systemimage-nodeps snod,$(MAKECMDGOALS)) \ | $(INTERNAL_MKUSERFS) @echo "make $@: ignoring dependencies" $(call build-systemimage-target,$(INSTALLED_SYSTEMIMAGE)) $(hide) $(call assert-max-image-size,$(INSTALLED_SYSTEMIMAGE),$(BOARD_SYSTEMIMAGE_PARTITION_SIZE),yaffs) 有說明是: make system.img ignoring depencies. 至於 做出 system.img 的command,可以用 showcommands 這個 target.. make showcommands snod 這樣 就會 show 出所有 build snod 這個target 的 command: make snod: ignoring dependencies Target system fs image: out/target/product/imx51_bbg/system.img num_blocks=`du -sk out/target/product/imx51_bbg/system | tail -n1 | awk '{print $1;}'`; if [ $num_blocks -lt 20480 ]; then extra_blocks=3072; else extra_blocks=20480; fi ; if [ "" != "" ]; then num_blocks=; num_inodes=4096; else num_blocks=`expr $num_blocks + $extra_blocks` ; num_inodes=`find out/target/product/imx51_bbg/system | wc -l` ; num_inodes=`expr $num_inodes + 500`; fi; out/host/linux-x86/bin/genext2fs -a -d out/target/product/imx51_bbg/system -b $num_blocks -N $num_inodes -m 0 out/target/product/imx51_bbg/system.img; tune2fs -L system out/target/product/imx51_bbg/system.img tune2fs 1.41.11 (14-Mar-2010) tune2fs -j out/target/product/imx51_bbg/system.img tune2fs 1.41.11 (14-Mar-2010) Creating journal inode: done This filesystem will be automatically checked every 20 mounts or 0 days, whichever comes first. Use tune2fs -c or -i to override. tune2fs -C 1 out/target/product/imx51_bbg/system.img tune2fs 1.41.11 (14-Mar-2010) Setting current mount count to 1 e2fsck -fy out/target/product/imx51_bbg/system.img ; [ $? -lt 4 ] e2fsck 1.41.11 (14-Mar-2010) Filesystem did not have a UUID; generating one. Filesystem has feature flag(s) set, but is a revision 0 filesystem. Fix? yes Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity /lost+found not found. Create? yes Pass 4: Checking reference counts Pass 5: Checking group summary information system: ***** FILE SYSTEM WAS MODIFIED ***** system: 596/1144 files (1.8% non-contiguous), 86956/103536 blocks true 大概是用 genext2fs 從 system folder 做出一個ext2 的 system.img。 然後再用 tune2fs -j 把 system.img 轉為 ext3。
這個 build-userimage-ext2-target 定義在 external/genext2fs/Config.mk # $(1): src directory # $(2): output file # $(3): label (if any) # $(4): if true, add journal define build-userimage-ext2-target @mkdir -p $(dir $(2)) $(hide) num_blocks=`du -sk $(1) | tail -n1 | awk '{print $$1;}'`;\ if [ $$num_blocks -lt 20480 ]; then extra_blocks=3072; \ else extra_blocks=20480; fi ; \ num_blocks=`expr $$num_blocks + $$extra_blocks` ; \ num_inodes=`find $(1) | wc -l` ; num_inodes=`expr $$num_inodes + 500`; \ $(MKEXT2IMG) -a -d $(1) -b $$num_blocks -N $$num_inodes -m 0 $(2) $(if $(strip $(3)),\ $(hide) $(TUNE2FS) -L $(strip $(3)) $(2)) $(if $(strip $(4)),\ $(hide) $(TUNE2FS) -j $(2)) $(TUNE2FS) -C 1 $(2) $(E2FSCK) -fy $(2) ; [ $$? -lt 4 ] endef 是在 core/Makefile include 近來的: ifeq ($(TARGET_USERIMAGES_USE_EXT2),true) include external/genext2fs/Config.mk INTERNAL_MKUSERFS := $(MKEXT2IMG) ..

沒有留言:

標籤

網誌存檔