1,下载源码
之前github上下载的烧进去死活无法启动。
现在自己下了一套,地址opensource.samsung.com/reception.do
下载了第一个KK。
下载后可得源码文件SHV-E300L_KK_Opensource.zip和说明SHV-E300L_NOTICE.html
解压,查看
2,编译内核
- senrsl@senrsl-ubuntu:~$ cd android/source/SHV-E300L_KK_Opensource/
- senrsl@senrsl-ubuntu:~/android/source/SHV-E300L_KK_Opensource$ ll
- 总用量 847096
- drwxrwxr-x 4 senrsl senrsl 4096 3月 30 13:12 ./
- drwxrwxr-x 8 senrsl senrsl 4096 3月 30 13:08 ../
- drwxrwxr-x 23 senrsl senrsl 4096 3月 30 13:11 Kernel/
- -rw-r--r-- 1 senrsl senrsl 99288698 10月 14 16:47 Kernel.tar.gz
- drwxrwxr-x 5 senrsl senrsl 4096 3月 30 13:10 Platform/
- -rw-r--r-- 1 senrsl senrsl 765711173 10月 14 16:47 Platform.tar.gz
- -rw-r--r-- 1 senrsl senrsl 779 10月 14 16:47 README_Kernel.txt
- -rw-r--r-- 1 senrsl senrsl 1395 10月 14 16:47 README_Platform.txt
- -rw-r----- 1 senrsl senrsl 2380626 3月 30 12:27 SHV-E300L_NOTICE.html
①查看编译内核说明README_Kernel.txt
言简意赅
- 1. How to Build
- - get Toolchain
- From Android Source Download site( http://source.android.com/source/downloading.html )
- Toolchain is included in Android source code(arm-eabi-4.7)
- - edit build_kernel.sh
- edit "CROSS_COMPILE" to right toolchain path(You downloaded).
- ex) CROSS_COMPILE= $(android platform directory you download)/android/prebuilt/linux-x86/toolchain/arm-eabi-4.7/bin/arm-eabi-
- ex) CROSS_COMPILE=/usr/local/toolchain/arm-eabi-4.7/bin/arm-eabi-
- - execute Kernel script
- $ ./build_kernel.sh
- 2. Output files
- - Kernel : Kernel/arch/arm/boot/zImage
- - module : Kernel/drivers/*/*.ko
- 3. How to make .tar binary for downloading into target.
- - change current directory to Kernel/arch/arm/boot
- - type following command
- $ tar cvf Kernel.tar zImage
②然后照此,修改build_kernel.sh
③执行
- #!/bin/bash
- BUILD_TOP_DIR=$(pwd)
- export ARCH=arm
- export CROSS_COMPILE=/home/senrsl/android/source/WORKING_DIRECTORY/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7/bin/arm-eabi-
- make jalteskt_00_defconfig
- make
报错
- senrsl@senrsl-ubuntu:~/android/source/SHV-E300L_KK_Opensource/Kernel$ ./build_kernel.sh
我去,竟然报错了。
- drivers/media/common/tuners/tda18218.c: In function 'tda18218_attach':
- drivers/media/common/tuners/tda18218.c:310:2: error: 'val' may be used uninitialized in this function [-Werror=maybe-uninitialized]
- cc1: all warnings being treated as errors
- make[4]: *** [drivers/media/common/tuners/tda18218.o] 错误 1
- make[3]: *** [drivers/media/common/tuners] 错误 2
- make[2]: *** [drivers/media/common] 错误 2
- make[1]: *** [drivers/media] 错误 2
- make: *** [drivers] 错误 2
然后,试着把build_kernel.sh里的交叉编译换成4.6
换成这样
然后再执行,竟然成功了!
- #!/bin/bash
- BUILD_TOP_DIR=$(pwd)
- export ARCH=arm
- export CROSS_COMPILE=/home/senrsl/android/source/WORKING_DIRECTORY/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-
- make jalteskt_00_defconfig
- make
④打包内核
- OBJCOPY arch/arm/boot/zImage
- Kernel: arch/arm/boot/zImage is ready
- Building modules, stage 2.
- MODPOST 29 modules
- CC crypto/ansi_cprng.mod.o
- LD [M] crypto/ansi_cprng.ko
- CC drivers/media/common/tuners/max2165.mod.o
- LD [M] drivers/media/common/tuners/max2165.ko
- CC drivers/media/common/tuners/mc44s803.mod.o
- LD [M] drivers/media/common/tuners/mc44s803.ko
- CC drivers/media/common/tuners/mt2060.mod.o
- LD [M] drivers/media/common/tuners/mt2060.ko
- CC drivers/media/common/tuners/mt2063.mod.o
- LD [M] drivers/media/common/tuners/mt2063.ko
- CC drivers/media/common/tuners/mt20xx.mod.o
- LD [M] drivers/media/common/tuners/mt20xx.ko
- CC drivers/media/common/tuners/mt2131.mod.o
- LD [M] drivers/media/common/tuners/mt2131.ko
- CC drivers/media/common/tuners/mt2266.mod.o
- LD [M] drivers/media/common/tuners/mt2266.ko
- CC drivers/media/common/tuners/mxl5005s.mod.o
- LD [M] drivers/media/common/tuners/mxl5005s.ko
- CC drivers/media/common/tuners/mxl5007t.mod.o
- LD [M] drivers/media/common/tuners/mxl5007t.ko
- CC drivers/media/common/tuners/qt1010.mod.o
- LD [M] drivers/media/common/tuners/qt1010.ko
- CC drivers/media/common/tuners/tda18212.mod.o
- LD [M] drivers/media/common/tuners/tda18212.ko
- CC drivers/media/common/tuners/tda18218.mod.o
- LD [M] drivers/media/common/tuners/tda18218.ko
- CC drivers/media/common/tuners/tda18271.mod.o
- LD [M] drivers/media/common/tuners/tda18271.ko
- CC drivers/media/common/tuners/tda827x.mod.o
- LD [M] drivers/media/common/tuners/tda827x.ko
- CC drivers/media/common/tuners/tda8290.mod.o
- LD [M] drivers/media/common/tuners/tda8290.ko
- CC drivers/media/common/tuners/tda9887.mod.o
- LD [M] drivers/media/common/tuners/tda9887.ko
- CC drivers/media/common/tuners/tea5761.mod.o
- LD [M] drivers/media/common/tuners/tea5761.ko
- CC drivers/media/common/tuners/tea5767.mod.o
- LD [M] drivers/media/common/tuners/tea5767.ko
- CC drivers/media/common/tuners/tuner-simple.mod.o
- LD [M] drivers/media/common/tuners/tuner-simple.ko
- CC drivers/media/common/tuners/tuner-types.mod.o
- LD [M] drivers/media/common/tuners/tuner-types.ko
- CC drivers/media/common/tuners/tuner-xc2028.mod.o
- LD [M] drivers/media/common/tuners/tuner-xc2028.ko
- CC drivers/media/common/tuners/xc4000.mod.o
- LD [M] drivers/media/common/tuners/xc4000.ko
- CC drivers/media/common/tuners/xc5000.mod.o
- LD [M] drivers/media/common/tuners/xc5000.ko
- CC drivers/media/video/gspca/gspca_main.mod.o
- LD [M] drivers/media/video/gspca/gspca_main.ko
- CC drivers/net/wireless/bcmdhd/dhd.mod.o
- LD [M] drivers/net/wireless/bcmdhd/dhd.ko
- CC drivers/scsi/scsi_wait_scan.mod.o
- LD [M] drivers/scsi/scsi_wait_scan.ko
- CC net/ipv4/tcp_htcp.mod.o
- LD [M] net/ipv4/tcp_htcp.ko
- CC net/ipv4/tcp_westwood.mod.o
- LD [M] net/ipv4/tcp_westwood.ko
- senrsl@senrsl-ubuntu:~/android/source/SHV-E300L_KK_Opensource/Kernel$
三星的odin3工具需要的是tar,里面包含的是boot.img,而不是zImage.
- senrsl@senrsl-ubuntu:~/android/source/SHV-E300L_KK_Opensource/Kernel$ cd arch/arm/boot/
- senrsl@senrsl-ubuntu:~/android/source/SHV-E300L_KK_Opensource/Kernel/arch/arm/boot$ tar cvf Kernel.tar zImage
- zImage
打包工具是/home/senrsl/android/source/WORKING_DIRECTORY/system/core /mkbootimg
编译好麻烦,直接从之前那个github那里面把工具拷过来
把官方包里的boot.img解包查看信息。
查看解开的包
- senrsl@senrsl-ubuntu:~/android/source/SHV-E300L_KK_Opensource/Kernel/bin$ ./unpackbootimg -i boot_old.img -o /home/senrsl/android/source/SHV-E300L_KK_Opensource/Kernel/bin/out/
- Android magic found at: 0
- BOARD_KERNEL_CMDLINE
- BOARD_KERNEL_BASE 10000000
- BOARD_RAMDISK_OFFSET 01000000
- BOARD_SECOND_OFFSET 00f00000
- BOARD_TAGS_OFFSET 00000100
- BOARD_PAGE_SIZE 2048
- BOARD_SECOND_SIZE 0
- BOARD_DT_SIZE 0
打包boot.img
- senrsl@senrsl-ubuntu:~/android/source/SHV-E300L_KK_Opensource/Kernel/bin$ cd out/
- senrsl@senrsl-ubuntu:~/android/source/SHV-E300L_KK_Opensource/Kernel/bin/out$ ll总用量 6688
- drwxrwxr-x 2 senrsl senrsl 4096 3月 30 16:59 ./
- drwxrwxr-x 3 senrsl senrsl 4096 3月 30 16:59 ../
- -rw-rw-r-- 1 senrsl senrsl 9 3月 30 16:59 boot_old.img-base(5mkbootimg base参数)
- -rw-rw-r-- 1 senrsl senrsl 1 3月 30 16:59 boot_old.img-cmdline(3mkbootimg cmdline参数)
- -rw-rw-r-- 1 senrsl senrsl 0 3月 30 16:59 boot_old.img-dt
- -rw-rw-r-- 1 senrsl senrsl 5 3月 30 16:59 boot_old.img-pagesize(4mkbootimg pagesize参数)
- -rw-rw-r-- 1 senrsl senrsl 1405151 3月 30 16:59 boot_old.img-ramdisk.gz(2根文件系统打包文件)
- -rw-rw-r-- 1 senrsl senrsl 9 3月 30 16:59 boot_old.img-ramdisk_offset
- -rw-rw-r-- 1 senrsl senrsl 0 3月 30 16:59 boot_old.img-second
- -rw-rw-r-- 1 senrsl senrsl 9 3月 30 16:59 boot_old.img-second_offset
- -rw-rw-r-- 1 senrsl senrsl 9 3月 30 16:59 boot_old.img-tags_offset
- -rw-rw-r-- 1 senrsl senrsl 5403616 3月 30 16:59 boot_old.img-zImage(1内核文件)
封tar
- senrsl@senrsl-ubuntu:~/android/source/SHV-E300L_KK_Opensource/Kernel/bin$ ./mkbootimg --cmdline '' --kernel zImage --ramdisk ramdisk.img -o boot.img --base 10000000
⑤尝试烧入
- senrsl@senrsl-ubuntu:~/android/source/SHV-E300L_KK_Opensource/Kernel/bin$ tar cvf boot.tar boot.img
- boot.img
烧入成功,重启后显示第一屏厂商后黑屏。
拉出原版的boot.img打包成boot.tar,烧入后启动成功。
初步认为是ramdisk.img问题。
此时,bootimg工具文件夹bin上移为bootimg.
bootimg改为build_bootimg.
解包官方boot.img,提取boot.img-ramdisk.gz,查看结构为
- senrsl@senrsl-ubuntu:~/android/source/SHV-E300L_KK_Opensource/build_bootimg$ ./mkbootimg --cmdline '' --kernel zImage --ramdisk ramdisk.img -o boot.img --base 10000000
- senrsl@senrsl-ubuntu:~/android/source/SHV-E300L_KK_Opensource/build_bootimg$ ./unpackbootimg -i boot.img -o /home/senrsl/android/source/SHV-E300L_KK_Opensource/build_bootimg/out/
重新打包自定义的boot.img,解包,查看boot.img-ramdisk.gz
//TODO 未成功,成功烧入后启动第一屏厂商logo后黑屏。
3,编译ROM
①准备工作
先看说明README_Platform.txt
意思就是说分4部走,后面加了个注释。
- How to build Module for Platform
- - It is only for modules are needed to using Android build system.
- - Please check its own install information under its folder for other module.
- [Step to build]
- 1. Get android open source.
- : version info - Android 4.4
- ( Download site : http://source.android.com )
- 2. Copy module that you want to build - to original android open source
- If same module exist in android open source, you should replace it. (no overwrite)
- # It is possible to build all modules at once.
- 3. You should add module name to 'PRODUCT_PACKAGES' in 'build\target\product\core.mk' as following case.
- case 1) e2fsprog : should add 'e2fsck' to PRODUCT_PACKAGES
- case 2) blkid : should add 'libkeyutils' to PRODUCT_PACKAGES
- case 3) libhyphenation : should add 'libkeyutils' to PRODUCT_PACKAGES
- case 4) KeyUtils : should add 'libkeyutils' to PRODUCT_PACKAGES
- case 5) libexifa : should add 'libexifa' to PRODUCT_PACKAGES
- case 6) libjpega : should add 'libjpega' to PRODUCT_PACKAGES
- ex.) [build\target\product\core.mk] - add all module name for case 1 ~ 5 at once
- PRODUCT_PACKAGES += \
- e2fsck \
- blkid \
- libhyphenation \
- libkeyutils \
- libexifa \
- libjpega \
- ebtables
- 4. excute build command
- ./build_platform.sh
- Note :
- to build SBrowser (vendor/samsung/packages/apps/SBrowser),
- please refer to Buildme.txt at the folder mentioned above.
分别是下载4.4的源码,把包里的要编译的模块拷进去(替换,非覆盖),增加要编译的模块到core.mk进行注册,执行编译脚本。
查看当前源码版本
senrsl@senrsl-ubuntu:~$ cd android/source/WORKING_DIRECTORY/
senrsl@senrsl-ubuntu:~/android/source/WORKING_DIRECTORY$ repo branches
* android-4.4.2_r2 | in all projects
master | in:
abi/cpp
....
所有的版本号里没有叫4.4的,只有4.4.*的。。。。
好吧,就用这个。
②替换模块
1)external目录,把这些目录剪出来
把这些目录放进去
- senrsl@senrsl-ubuntu:~/android/source/test/三星替换 /external$ ll
- 总用量 40
- drwxrwxr-x 10 senrsl senrsl 4096 3月 30 14:53 ./
- drwxrwxr-x 4 senrsl senrsl 4096 3月 30 15:02 ../
- drwxrwxr-x 17 senrsl senrsl 4096 3月 20 13:35 chromium/
- drwxrwxr-x 9 senrsl senrsl 4096 3月 20 13:36 dnsmasq/
- drwxrwxr-x 19 senrsl senrsl 4096 3月 20 13:36 e2fsprogs/
- drwxrwxr-x 3 senrsl senrsl 4096 3月 20 13:36 gcc-demangle/
- drwxrwxr-x 4 senrsl senrsl 4096 3月 20 13:36 hyphenation/
- drwxrwxr-x 15 senrsl senrsl 4096 3月 20 13:36 iproute2/
- drwxrwxr-x 11 senrsl senrsl 4096 3月 20 13:36 iptables/
- drwxrwxr-x 4 senrsl senrsl 4096 3月 20 13:36 junit/
2)vendor目录,把vendor/samsung放进去
- senrsl@senrsl-ubuntu:~$ cd android/source/SHV-E300L_KK_Opensource/Platform/external/
- senrsl@senrsl-ubuntu:~/android/source/SHV-E300L_KK_Opensource/Platform/external$ ll
- 总用量 44
- drwxrwxr-x 11 senrsl senrsl 4096 10月 14 09:23 ./
- drwxrwxr-x 5 senrsl senrsl 4096 3月 30 13:10 ../
- drwxrwxr-x 17 senrsl senrsl 4096 10月 8 12:16 chromium/
- drwxrwxr-x 9 senrsl senrsl 4096 10月 8 09:07 dnsmasq/
- drwxrwxr-x 18 senrsl senrsl 4096 10月 8 09:07 e2fsprogs/
- drwxrwxr-x 2 senrsl senrsl 4096 10月 8 09:07 gcc-demangle/
- drwxrwxr-x 3 senrsl senrsl 4096 10月 8 09:07 hyphenation/
- drwxrwxr-x 14 senrsl senrsl 4096 10月 8 09:07 iproute2/
- drwxrwxr-x 10 senrsl senrsl 4096 10月 8 09:07 iptables/
- drwxrwxr-x 3 senrsl senrsl 4096 10月 8 09:07 junit/
- drwxrwxr-x 10 senrsl senrsl 4096 10月 8 12:23 webkit/
3)build目录,把这俩文件剪出来,把Platform里的放进去
③执行编译
- senrsl@senrsl-ubuntu:~/android/source/SHV-E300L_KK_Opensource/Platform/build$ tree
- .
- └── target
- ├── board
- │ └── generic
- │ └── BoardConfig.mk
- └── product
- └── core.mk
- 4 directories, 2 files
报错
- senrsl@senrsl-ubuntu:~/android/source/WORKING_DIRECTORY$ ./build_platform.sh
在core.mk里把 libwebcore \删掉,再build,报错
- target Generated: libwebcore <= external/webkit/Source/WebCore/dom/make_names.pl
- target Generated: libwebcore <= external/webkit/Source/WebCore/dom/make_names.pl
- target Generated: libwebcore <= external/webkit/Source/WebCore/dom/make_names.pl
- target Generated: libwebcore <= external/webkit/Source/WebCore/dom/make_names.pl
- target Generated: libwebcore <= external/webkit/Source/WebCore/dom/make_names.pl
- target Generated: libwebcore <= external/webkit/Source/WebCore/dom/make_names.pl
- target Generated: libwebcore <= external/webkit/Source/WebCore/dom/make_names.pl
- target Generated: libwebcore <= external/webkit/Source/WebCore/dom/make_names.pl
- target Generated: libwebcore <= external/webkit/Source/WebCore/dom/make_names.pl
- Export includes file: frameworks/opt/emoji/Android.mk -- out/target/product/generic/obj/SHARED_LIBRARIES/libemoji_intermediates/export_includes
- Export includes file: external/harfbuzz/Android.mk -- out/target/product/generic/obj/SHARED_LIBRARIES/libharfbuzz_intermediates/export_includes
- Export includes file: external/webkit/Android.mk -- out/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/export_includes
- Export includes file: external/libxml2/Android.mk -- out/target/product/generic/obj/STATIC_LIBRARIES/libxml2_intermediates/export_includes
- Export includes file: external/libxslt/Android.mk -- out/target/product/generic/obj/STATIC_LIBRARIES/libxslt_intermediates/export_includes
- Export includes file: external/hyphenation/Android.mk -- out/target/product/generic/obj/STATIC_LIBRARIES/libhyphenation_intermediates/export_includes
- Import includes file: out/target/product/generic/obj/SHARED_LIBRARIES/libemoji_intermediates/import_includes
- Import includes file: out/target/product/generic/obj/SHARED_LIBRARIES/libharfbuzz_intermediates/import_includes
- target Generated: libwebcore <= external/webkit/Source/WebCore/html/DocTypeStrings.gperf
- Generating HTMLEntityTable.cpp
- target Generated: libwebcore <= external/webkit/Source/WebCore/platform/ColorData.gperf
- WebCore Yacc: libwebcore <= external/webkit/Source/WebCore/css/CSSGrammar.y
- target Generated: libwebcore <= external/webkit/Source/WebCore/dom/make_names.pl
- WebCore Yacc: libwebcore <= external/webkit/Source/WebCore/xml/XPathGrammar.y
- target Generated: libwebcore <= external/webkit/Source/WebCore/dom/make_names.pl
- Can't locate Switch.pm in @INC (you may need to install the Switch module) (@INC contains: /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at external/webkit/Source/WebCore/make-hash-tools.pl line 23.
- BEGIN failed--compilation aborted at external/webkit/Source/WebCore/make-hash-tools.pl line 23.
- Can't locate Switch.pm in @INC (you may need to install the Switch module) (@INC contains: /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at external/webkit/Source/WebCore/make-hash-tools.pl line 23.
- BEGIN failed--compilation aborted at external/webkit/Source/WebCore/make-hash-tools.pl line 23.
- make: *** [out/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/Source/WebCore/html/DocTypeStrings.cpp] 错误 2
- make: *** 正在等待未完成的任务....
- make: *** [out/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/Source/WebCore/platform/ColorData.cpp] 错误 2
- target Generated: libwebcore <= external/webkit/Source/WebCore/html/parser/HTMLEntityNames.in
- senrsl@senrsl-ubuntu:~/android/source/WORKING_DIRECTORY$ ./build_platform.sh
再把 libexifa \删掉,报错
- Install: out/target/product/generic/system/fonts/NotoSansKhmerUI-Bold.ttf
- Install: out/target/product/generic/system/fonts/NotoSansKhmerUI-Regular.ttf
- Install: out/target/product/generic/system/fonts/NotoSansLao-Bold.ttf
- Install: out/target/product/generic/system/fonts/NotoSansLao-Regular.ttf
- Install: out/target/product/generic/system/fonts/NotoSansLaoUI-Bold.ttf
- Install: out/target/product/generic/system/fonts/NotoSansLaoUI-Regular.ttf
- Install: out/target/product/generic/system/fonts/NotoSansMalayalam-Bold.ttf
- collect2: error: ld returned 1 exit status
- Install: out/target/product/generic/system/fonts/NotoSansMalayalam-Regular.ttf
- make: *** [out/target/product/generic/obj/EXECUTABLES/dnsmasq_intermediates/LINKED/dnsmasq] 错误 1
- make: *** 正在等待未完成的任务....
- Install: out/target/product/generic/system/fonts/NotoSansMalayalamUI-Bold.ttf
- external/e2fsprogs/lib/ext2fs/blkmap64_ba.c:339: error: undefined reference to 'ext2fs_test_bit64'
- external/e2fsprogs/lib/ext2fs/blkmap64_ba.c:390: error: undefined reference to 'ext2fs_test_bit64'
- external/e2fsprogs/lib/ext2fs/blkmap64_ba.c:186: error: undefined reference to 'ext2fs_test_bit64'
- external/e2fsprogs/lib/ext2fs/blkmap64_ba.c:281: error: undefined reference to 'ext2fs_mem_is_zero'
- external/e2fsprogs/lib/ext2fs/blkmap64_ba.c:178: error: undefined reference to 'ext2fs_clear_bit64'
- external/e2fsprogs/lib/ext2fs/blkmap64_ba.c:170: error: undefined reference to 'ext2fs_set_bit64'
- external/e2fsprogs/lib/ext2fs/blkmap64_ba.c:141: error: undefined reference to 'ext2fs_clear_bit64'
- external/e2fsprogs/lib/ext2fs/gen_bitmap64.c:735: error: undefined reference to 'ext2fs_get_bitmap_granularity'
- external/e2fsprogs/lib/ext2fs/gen_bitmap64.c:790: error: undefined reference to 'ext2fs_find_first_zero_generic_bitmap'
- external/e2fsprogs/lib/ext2fs/mmp.c:57: error: undefined reference to 'ext2fs_get_dio_alignment'
- external/e2fsprogs/lib/ext2fs/mmp.c:213: error: undefined reference to 'ext2fs_alloc_block2'
- collect2: error: ld returned 1 exit status
- make: *** [out/target/product/generic/obj/SHARED_LIBRARIES/libext2fs_intermediates/LINKED/libext2fs.so] 错误 1
- senrsl@senrsl-ubuntu:~/android/source/WORKING_DIRECTORY$
然后把之前的core.mk第二部分替换成README里的,报错
- out/host/linux-x86/obj/SHARED_LIBRARIES/libext2fs_host_intermediates/blkmap64_ba.o: In function `ba_find_first_zero':
- /home/senrsl/android/source/WORKING_DIRECTORY/external/e2fsprogs/lib/ext2fs/blkmap64_ba.c:339: undefined reference to `ext2fs_test_bit64'
- /home/senrsl/android/source/WORKING_DIRECTORY/external/e2fsprogs/lib/ext2fs/blkmap64_ba.c:390: undefined reference to `ext2fs_test_bit64'
- out/host/linux-x86/obj/SHARED_LIBRARIES/libext2fs_host_intermediates/blkmap64_ba.o: In function `ba_test_bmap':
- /home/senrsl/android/source/WORKING_DIRECTORY/external/e2fsprogs/lib/ext2fs/blkmap64_ba.c:186: undefined reference to `ext2fs_test_bit64'
- out/host/linux-x86/obj/SHARED_LIBRARIES/libext2fs_host_intermediates/blkmap64_ba.o: In function `ba_test_clear_bmap_extent':
- /home/senrsl/android/source/WORKING_DIRECTORY/external/e2fsprogs/lib/ext2fs/blkmap64_ba.c:281: undefined reference to `ext2fs_mem_is_zero'
- out/host/linux-x86/obj/SHARED_LIBRARIES/libext2fs_host_intermediates/blkmap64_ba.o: In function `ba_unmark_bmap':
- /home/senrsl/android/source/WORKING_DIRECTORY/external/e2fsprogs/lib/ext2fs/blkmap64_ba.c:178: undefined reference to `ext2fs_clear_bit64'
- out/host/linux-x86/obj/SHARED_LIBRARIES/libext2fs_host_intermediates/blkmap64_ba.o: In function `ba_mark_bmap':
- /home/senrsl/android/source/WORKING_DIRECTORY/external/e2fsprogs/lib/ext2fs/blkmap64_ba.c:170: undefined reference to `ext2fs_set_bit64'
- out/host/linux-x86/obj/SHARED_LIBRARIES/libext2fs_host_intermediates/blkmap64_ba.o: In function `ba_resize_bmap':
- /home/senrsl/android/source/WORKING_DIRECTORY/external/e2fsprogs/lib/ext2fs/blkmap64_ba.c:141: undefined reference to `ext2fs_clear_bit64'
- out/host/linux-x86/obj/SHARED_LIBRARIES/libext2fs_host_intermediates/gen_bitmap64.o: In function `ext2fs_convert_subcluster_bitmap':
- /home/senrsl/android/source/WORKING_DIRECTORY/external/e2fsprogs/lib/ext2fs/gen_bitmap64.c:735: undefined reference to `ext2fs_get_bitmap_granularity'
- out/host/linux-x86/obj/SHARED_LIBRARIES/libext2fs_host_intermediates/gen_bitmap64.o: In function `ext2fs_find_first_zero_generic_bmap':
- /home/senrsl/android/source/WORKING_DIRECTORY/external/e2fsprogs/lib/ext2fs/gen_bitmap64.c:790: undefined reference to `ext2fs_find_first_zero_generic_bitmap'
- out/host/linux-x86/obj/SHARED_LIBRARIES/libext2fs_host_intermediates/mmp.o: In function `ext2fs_mmp_read':
- /home/senrsl/android/source/WORKING_DIRECTORY/external/e2fsprogs/lib/ext2fs/mmp.c:57: undefined reference to `ext2fs_get_dio_alignment'
- out/host/linux-x86/obj/SHARED_LIBRARIES/libext2fs_host_intermediates/mmp.o: In function `ext2fs_mmp_init':
- /home/senrsl/android/source/WORKING_DIRECTORY/external/e2fsprogs/lib/ext2fs/mmp.c:213: undefined reference to `ext2fs_alloc_block2'
- collect2: ld returned 1 exit status
- make: *** [out/host/linux-x86/obj/lib/libext2fs_host.so] 错误 1
- make: *** 正在等待未完成的任务....
- 1 warning generated.
- external/openssl/ssl/s2_clnt.c:1027:38: warning: unused parameter 'type' [-Wunused-parameter]
- int ssl2_set_certificate(SSL *s, int type, int len, const unsigned char *data)
- ^
- 1 warning generated.
- external/openssl/ssl/s2_lib.c:385:38: warning: unused parameter 'larg' [-Wunused-parameter]
- long ssl2_ctrl(SSL *s, int cmd, long larg, void *parg)
- ^
- external/openssl/ssl/s2_lib.c:385:50: warning: unused parameter 'parg' [-Wunused-parameter]
- long ssl2_ctrl(SSL *s, int cmd, long larg, void *parg)
- ^
- external/openssl/ssl/s2_lib.c:400:30: warning: unused parameter 's' [-Wunused-parameter]
- long ssl2_callback_ctrl(SSL *s, int cmd, void (*fp)(void))
- ^
- external/openssl/ssl/s2_lib.c:400:37: warning: unused parameter 'cmd' [-Wunused-parameter]
- long ssl2_callback_ctrl(SSL *s, int cmd, void (*fp)(void))
- ^
- external/openssl/ssl/s2_lib.c:400:49: warning: unused parameter 'fp' [-Wunused-parameter]
- long ssl2_callback_ctrl(SSL *s, int cmd, void (*fp)(void))
- ^
- external/openssl/ssl/s2_lib.c:405:29: warning: unused parameter 'ctx' [-Wunused-parameter]
- long ssl2_ctx_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg)
- ^
- external/openssl/ssl/s2_lib.c:405:38: warning: unused parameter 'cmd' [-Wunused-parameter]
- long ssl2_ctx_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg)
- ^
- external/openssl/ssl/s2_lib.c:405:48: warning: unused parameter 'larg' [-Wunused-parameter]
- long ssl2_ctx_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg)
- ^
- external/openssl/ssl/s2_lib.c:405:60: warning: unused parameter 'parg' [-Wunused-parameter]
- long ssl2_ctx_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg)
- ^
- external/openssl/ssl/s2_lib.c:410:38: warning: unused parameter 'ctx' [-Wunused-parameter]
- long ssl2_ctx_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp)(void))
- ^
- external/openssl/ssl/s2_lib.c:410:47: warning: unused parameter 'cmd' [-Wunused-parameter]
- long ssl2_ctx_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp)(void))
- ^
- external/openssl/ssl/s2_lib.c:410:59: warning: unused parameter 'fp' [-Wunused-parameter]
- long ssl2_ctx_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp)(void))
- ^
- 12 warnings generated.
- 1 warning generated.
- make: *** wait: 没有子进程。 停止。
- senrsl@senrsl-ubuntu:~/android/source/WORKING_DIRECTORY$
然后把core.mk里第二部分全都删掉,报的错还是上面那个。
- /home/senrsl/android/source/WORKING_DIRECTORY/external/e2fsprogs/lib/ext2fs/mmp.c:57: undefined reference to `ext2fs_get_dio_alignment'
- out/host/linux-x86/obj/SHARED_LIBRARIES/libext2fs_host_intermediates/mmp.o: In function `ext2fs_mmp_init':
- /home/senrsl/android/source/WORKING_DIRECTORY/external/e2fsprogs/lib/ext2fs/mmp.c:213: undefined reference to `ext2fs_alloc_block2'
- collect2: ld returned 1 exit status
- make: *** [out/host/linux-x86/obj/lib/libext2fs_host.so] 错误 1
- make: *** 正在等待未完成的任务....
- Processing target/product/generic/dex_bootjars/system/framework/core.jar
- Done!
恢复下core.mk重来,
报1:报错external/webkit/Source/WebCore/make-hash-tools.pl line 23.,core.mk砍掉 libwebcore \ 代码砍掉external/webkit.
报2:/home/senrsl/android/source/WORKING_DIRECTORY/external/e2fsprogs/lib/ext2fs/mmp.c:213: undefined reference to `ext2fs_alloc_block2',external/e2fsprogs 代码换回原版。
报3:/home/senrsl/android/source/WORKING_DIRECTORY/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin/../lib/gcc/arm-linux-androideabi/4.7/../../../../arm-linux-androideabi/bin/ld: error: out/target/product/generic/obj/EXECUTABLES/dnsmasq_intermediates/dhcp-common.o: multiple definition of 'option_string'
/home/senrsl/android/source/WORKING_DIRECTORY/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin/../lib/gcc/arm-linux-androideabi/4.7/../../../../arm-linux-androideabi/bin/ld: out/target/product/generic/obj/EXECUTABLES/dnsmasq_intermediates/option.o: previous definition here,external/dnsmasq换回原版。
然后编译
这样竟编译成功
镜像文件输出到了/home/senrsl/android/source/WORKING_DIRECTORY/out/target /product/generic
- Creating filesystem with parameters:
- Size: 576716800
- Block size: 4096
- Blocks per group: 32768
- Inodes per group: 7040
- Inode size: 256
- Journal blocks: 2200
- Label:
- Blocks: 140800
- Block groups: 5
- Reserved block group size: 39
- Created filesystem with 892/35200 inodes and 65272/140800 blocks
- + '[' 0 -ne 0 ']'
- Install system fs image: out/target/product/generic/system.img
- out/target/product/generic/system.img+ maxsize=588791808 blocksize=2112 total=576716800 reserve=5947392
4)封包
查看下官方提供的E300LKLUFNE4_E300LLGTFNE4_E300LKLUFNC1_HOME.tar
依次罗列了这几个img.
尝试封装
然后重启系统去烧。
- senrsl@senrsl-ubuntu:~/android/source/WORKING_DIRECTORY/out/target/product/generic$ tar cvf p.tar cache.img ramdisk.img system.img userdata.img
- cache.img
- ramdisk.img
- system.img
- userdata.img
//TODO 未成功,无法烧入
代码回退,编别的。
2015年03月31日19:09:31
--
senRsl
2015年03月30日13:21:20
2015年03月30日13:21:20
没有评论 :
发表评论