赞
踩
目录
手动编译 iCore-3568JQ Android 11.0
这笔记是前两年用Windows docker安装Linux Ubuntu镜像,然后编译rk3568的。当时有个问题,比如你电脑32G内存,如果你给docker分配了24G,你启用docker,就算没有编译也会占内存。
- # 拷贝命令
-
- docker cp Android11.0 1c962c6f7c6a70360fd5e731cd6bc5dff09c10efb0d8220899b9979f47c809f2:/sourcecode
-
- # 启动新终端
-
- docker exec --privileged -it 1c962c6f7c6a70360fd5e731cd6bc5dff09c10efb0d8220899b9979f47c809f2 /bin/bash
此处为语雀内容卡片,点击链接查看:https://www.yuque.com/28ln/is90rz/opbn0w
编译 Android 对机器的配置要求较高:
官方建议用ubuntu18.04 版本 , 以上环境电脑如果达不到要求 请停止后续操作!
cmd窗口输入docker pull ubuntu:18.04
- # docker container run -p 8000:3000 -it ubuntu:18.04 /bin/bash
- root@32b7b9ddcaab:/# cat /etc/issue
- Ubuntu 18.04.6 LTS \n \l
- root@32b7b9ddcaab:/# apt update
- root@32b7b9ddcaab:/# apt install byobu vim-gtk inetutils-ping net-tools wget cpio unzip rsync xz-utils bc time
过程中需要配置地区,选择亚洲上海:
- Configuring tzdata
- ------------------
-
- Please select the geographic area in which you live. Subsequent configuration questions will narrow this down by presenting a list of cities,
- representing the time zones in which they are located.
-
- 1. Africa 3. Antarctica 5. Arctic 7. Atlantic 9. Indian 11. SystemV 13. Etc
- 2. America 4. Australia 6. Asia 8. Europe 10. Pacific 12. US
- Geographic area: 6
-
- Please select the city or region corresponding to your time zone.
-
- 1. Aden 13. Barnaul 25. Dushanbe 37. Jerusalem 49. Macau 61. Pyongyang 73. Taipei 85. Vientiane
- 2. Almaty 14. Beirut 26. Famagusta 38. Kabul 50. Magadan 62. Qatar 74. Tashkent 86. Vladivostok
- 3. Amman 15. Bishkek 27. Gaza 39. Kamchatka 51. Makassar 63. Qostanay 75. Tbilisi 87. Yakutsk
- 4. Anadyr 16. Brunei 28. Harbin 40. Karachi 52. Manila 64. Qyzylorda 76. Tehran 88. Yangon
- 5. Aqtau 17. Chita 29. Hebron 41. Kashgar 53. Muscat 65. Rangoon 77. Tel_Aviv 89. Yekaterinburg
- 6. Aqtobe 18. Choibalsan 30. Ho_Chi_Minh 42. Kathmandu 54. Nicosia 66. Riyadh 78. Thimphu 90. Yerevan
- 7. Ashgabat 19. Chongqing 31. Hong_Kong 43. Khandyga 55. Novokuznetsk 67. Sakhalin 79. Tokyo
- 8. Atyrau 20. Colombo 32. Hovd 44. Kolkata 56. Novosibirsk 68. Samarkand 80. Tomsk
- 9. Baghdad 21. Damascus 33. Irkutsk 45. Krasnoyarsk 57. Omsk 69. Seoul 81. Ujung_Pandang
- 10. Bahrain 22. Dhaka 34. Istanbul 46. Kuala_Lumpur 58. Oral 70. Shanghai 82. Ulaanbaatar
- 11. Baku 23. Dili 35. Jakarta 47. Kuching 59. Phnom_Penh 71. Singapore 83. Urumqi
- 12. Bangkok 24. Dubai 36. Jayapura 48. Kuwait 60. Pontianak 72. Srednekolymsk 84. Ust-Nera
- Time zone: 70
-
-
- Current default time zone: 'Asia/Shanghai'
- Local time is now: Tue Nov 30 18:05:30 CST 2021.
- Universal Time is now: Tue Nov 30 10:05:30 UTC 2021.
- Run 'dpkg-reconfigure tzdata' if you wish to change it.
- sudo apt-get update
-
- sudo apt-get install git gnupg flex bison gperf libsdl1.2-dev \
- libesd-java libwxgtk3.0-dev squashfs-tools build-essential zip curl \
- libncurses5-dev zlib1g-dev pngcrush schedtool libxml2 libxml2-utils \
- xsltproc lzop libc6-dev schedtool g++-multilib lib32z1-dev lib32ncurses5-dev \
- lib32readline-dev gcc-multilib libswitch-perl libssl-dev unzip zip device-tree-compiler \
- liblz4-tool python-pyelftools python3-pyelftools -y
- # 设置超级用户:
- root@32b7b9ddcaab:/# apt install sudo
- root@32b7b9ddcaab:/# visudo
- # 添加自己的用户名,!wq保存并退出:
- ln28 ALL=(ALL:ALL) ALL
- # 切换到普通用户:
- root@32b7b9ddcaab:/# adduser ln28
- root@32b7b9ddcaab:/# su ln28
在windows下面安装docker 再安装ubuntu去编译Android源码 :
2.4步骤
新增用户2.3步骤
全部安装了docker exec --privileged -it 1c962c6f7c6a70360fd5e731cd6bc5dff09c10efb0d8220899b9979f47c809f2 /bin/bash。
Resources Advanced You are using the WSL 2 backend, so resource limits are · 语雀
3. 编译 Android11.0 固件 — Firefly Wiki
注意:不要在共享文件夹、挂载文件夹以及非英文目录解压SDK,避免产生不必要的错误
- $ mkdir ~/proj
- $ mv /path/to/Firefly-RK356X_Android11.0_git_20210824.7z.* ~/proj
- $ cd ~/proj/
- $ 7z x ./Firefly-RK356X_Android11.0_git_20210824.7z.001 -oRK356X_Android11.0
- $ cd ./RK356X_Android11.0
- $ git reset --hard
我是直接下载百度云盘里面的, 解压后操作步骤4/5即可。
- #1. 进入 SDK 根目录
- cd ~/proj/RK356X_Android11.0
-
- #2. 下载远程 bundle 仓库
- #git clone https://gitlab.com/TeeFirefly/rk356x-android11-bundle.git .bundle
-
- #3. 若下载仓库失败,目前 bundle 仓库占用空间较大,所以同步的时候可能会出现卡住或失败的问题,
- # 可以从云盘下载 bundle 并解压到 SDK 根目录,解压指令如下:
-
- 7z x rk356x-android11-bundle.7z -r -o. && mv rk356x-android11-bundle/ .bundle/
-
- #4. 更新 SDK,并且后续更新不需要再次拉取远程仓库,直接执行以下命令即可
- .bundle/update
-
- #5. 按照提示已经更新内容到 FETCH_HEAD,同步 FETCH_HEAD 到 firefly 分支
- git rebase FETCH_HEAD
- cd ~/proj/RK356X_Android11.0/kernel/
- make ARCH=arm64 firefly_defconfig android-11.config rk356x.config firefly_wifi.config
- make ARCH=arm64 BOOT_IMG=../rockdev/Image-rk3568_firefly_itx_3568q/boot.img rk3568-firefly-itx-3568q.img -j8
- cd ~/proj/RK356X_Android11.0/u-boot/
- ./make.sh rk3568
- cd ~/proj/RK356X_Android11.0/
- source build/envsetup.sh
- lunch rk3568_firefly_itx_3568q-userdebug
- make installclean
- make -j24
- ./mkimage.sh
./FFTools/mkupdate/mkupdate.sh -l rk3568_firefly_itx_3568q-userdebug
打包完成后将在rockdev/Image-XXX/ 目录下生成统一固件: product名XXX_XXX_日期XXX.img
在 Windows 下打包统一固件 update.img 也很简单,将编译生成的文件拷贝到 AndroidTool 的 rockdev\Image 目录中,然后运行 rockdev 目录下的 mkupdate.bat 批处理文件即可创建 update.img 并存放到 rockdev\Image 目录里。
如果有任何问题,请留言~
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。