首页 > 其他分享 >AmlogicKitchen使用

AmlogicKitchen使用

时间:2023-04-19 22:01:42浏览次数:51  
标签:15 PARTITION level1 使用 Msg root AmlogicKitchen size

环境

# cat /etc/issue
Ubuntu 22.04.1 LTS \n \l

下载AmlogicKitchen

# git clone https://github.com/xKern/AmlogicKitchen.git
# cd AmlogicKitchen
# git submodule update --init --recursive

unpack固件

上传img

# mkdir in
# cp update-YS-A98-AP6212-11.0-20230310.img in

运行脚本

# ./unpack.sh

level 1

.....................
Amlogic Kitchen
.....................
.....................
Select level 1,2,3 or q/Q to exit: 
1
Deleting existing level1
.....................
Amlogic Kitchen
.....................
Files in input dir (*.img)
1 - update-YS-A98-AP6212-11.0-20230310
.....................
Enter a file name :
update-YS-A98-AP6212-11.0-20230310
[Msg]Image package version 0x2
[Msg]Unpack item [USB         ,              DDR] to (level1/DDR.USB) size:3158016 bytes
[Msg]Backup item [USB         ,            UBOOT] backItemId[0][USB, DDR]
[Msg]Unpack item [PARTITION   ,         _aml_dtb] to (level1/_aml_dtb.PARTITION) size:258048 bytes
[Msg]Unpack item [UBOOT       ,     aml_sdc_burn] to (level1/aml_sdc_burn.UBOOT) size:3158528 bytes
[Msg]Unpack item [ini         ,     aml_sdc_burn] to (level1/aml_sdc_burn.ini) size:602 bytes
[Msg]Unpack item [PARTITION   ,           boot_a] to (level1/boot_a.PARTITION) size:67108864 bytes
[Msg]Unpack item [PARTITION   ,       bootloader] to (level1/bootloader.PARTITION) size:3158016 bytes
[Msg]Unpack item [PARTITION   ,           dtbo_a] to (level1/dtbo_a.PARTITION) size:2097152 bytes
[Msg]Unpack item [conf        ,             keys] to (level1/keys.conf) size:11 bytes
[Msg]Unpack item [PARTITION   ,             logo] to (level1/logo.PARTITION) size:1621872 bytes
[Msg]Backup item [dtb         ,           meson1] backItemId[2][PARTITION, _aml_dtb]
[Msg]Unpack item [PARTITION   ,        odm_ext_a] to (level1/odm_ext_a.PARTITION) size:8056908 bytes
[Msg]Unpack item [PARTITION   ,            oem_a] to (level1/oem_a.PARTITION) size:33554432 bytes
[Msg]Backup item [PARTITION   ,            oem_b] backItemId[18][PARTITION, oem_a]
[Msg]Unpack item [conf        ,         platform] to (level1/platform.conf) size:28 bytes
[Msg]Unpack item [PARTITION   ,            super] to (level1/super.PARTITION) size:1407186640 bytes
[Msg]Unpack item [aml         ,         usb_flow] to (level1/usb_flow.aml) size:189024 bytes
[Msg]Unpack item [PARTITION   ,         vbmeta_a] to (level1/vbmeta_a.PARTITION) size:8192 bytes
[Msg]Unpack item [PARTITION   ,    vendor_boot_a] to (level1/vendor_boot_a.PARTITION) size:25165824 bytes
[Msg]Write config file "level1/image.cfg" OK!
Image unpack OK!
Done.
.....................
Amlogic Kitchen
.....................
.....................
# ls -l level1
总用量 1518289
-rwxrwxrwx 1 root root     258048 3月  15 15:00 _aml_dtb.PARTITION
-rwxrwxrwx 1 root root        602 3月  15 15:00 aml_sdc_burn.ini
-rwxrwxrwx 1 root root    3158528 3月  15 15:00 aml_sdc_burn.UBOOT
-rwxrwxrwx 1 root root   67108864 3月  15 15:00 boot_a.PARTITION
-rwxrwxrwx 1 root root    3158016 3月  15 15:00 bootloader.PARTITION
-rwxrwxrwx 1 root root    3158016 3月  15 15:00 DDR.USB
-rwxrwxrwx 1 root root    2097152 3月  15 15:00 dtbo_a.PARTITION
-rwxrwxrwx 1 root root       1608 3月  15 15:00 image.cfg
-rwxrwxrwx 1 root root         11 3月  15 15:00 keys.conf
-rwxrwxrwx 1 root root    1621872 3月  15 15:00 logo.PARTITION
-rwxrwxrwx 1 root root    8056908 3月  15 15:00 odm_ext_a.PARTITION
-rwxrwxrwx 1 root root   33554432 3月  15 15:00 oem_a.PARTITION
-rwxrwxrwx 1 root root         28 3月  15 15:00 platform.conf
-rwxrwxrwx 1 root root         35 3月  15 15:00 projectname.txt
-rwxrwxrwx 1 root root 1407186640 3月  15 15:00 super.PARTITION
-rwxrwxrwx 1 root root     189024 3月  15 15:00 usb_flow.aml
-rwxrwxrwx 1 root root       8192 3月  15 15:00 vbmeta_a.PARTITION
-rwxrwxrwx 1 root root   25165824 3月  15 15:00 vendor_boot_a.PARTITION

level 2

Select level 1,2,3 or q/Q to exit: 
2
Extracting odm_ext_a
.....Extraction from odm_ext_a.raw.img to odm_ext_a
.....Done! All extraction in odm_ext_a
.....Extraction from system_a.img to system_a
.....Done! All extraction in system_a
.....Extraction from system_ext_a.img to system_ext_a
.....Done! All extraction in system_ext_a
.....Extraction from vendor_a.img to vendor_a
.....Done! All extraction in vendor_a
.....Extraction from product_a.img to product_a
.....Done! All extraction in product_a
.....Extraction from odm_a.img to odm_a
.....Done! All extraction in odm_a
Done.
.....................
Amlogic Kitchen
.....................
.....................
# ls -l level2/
total 1374048
drwxr-xr-x  2 root root      4096 Mar 15 16:07 config
drwxr-xr-x  6 root root      4096 Mar 15 16:07 odm_a
-rw-r--r--  1 root root   1605632 Mar 15 16:07 odm_a.img
-rw-r--r--  1 root root         0 Mar 15 16:07 odm_b.img
drwxr-xr-x  5 root root      4096 Mar 15 16:07 odm_ext_a
drwxr-xr-x  9 root root      4096 Mar 15 16:07 product_a
-rw-r--r--  1 root root 103866368 Mar 15 16:07 product_a.img
-rw-r--r--  1 root root         0 Mar 15 16:07 product_b.img
drwxr-xr-x 23 root root      4096 Mar 15 16:07 system_a
-rw-r--r--  1 root root 813899776 Mar 15 16:07 system_a.img
-rw-r--r--  1 root root         0 Mar 15 16:07 system_b.img
drwxr-xr-x  8 root root      4096 Mar 15 16:07 system_ext_a
-rw-r--r--  1 root root 163942400 Mar 15 16:07 system_ext_a.img
-rw-r--r--  1 root root         0 Mar 15 16:07 system_ext_b.img
drwxr-xr-x 12 root root      4096 Mar 15 16:07 vendor_a
-rw-r--r--  1 root root 328515584 Mar 15 16:07 vendor_a.img
-rw-r--r--  1 root root         0 Mar 15 16:07 vendor_b.img

pack 固件

修改包名称

# echo update-YS-A98-AP6212-11.0-20230315 level1/projectname.txt

新增文件

system_a.img

# cd level2/system_a/system/app/t982prod/
# touch 1.txt

system_a_file_contexts

# echo "/system_a/system/app/t982prod/1\.txt u:object_r:system_file:s0" >> level2/config/system_a_file_contexts

system_a_fs_config

# echo "system_a/system/app/t982prod/1.txt 0 0 0644" >> level2/config/system_a_fs_config

运行脚本

# ./pack.sh

level 2

.....................
Amlogic Kitchen
.....................
.....................
Select level 1,2,3 or q/Q to exit: 
2
Creating odm_ext_a image
loaded 146 fs_config entries
Creating filesystem with parameters:
    Size: 134217728
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 8192
    Inode size: 256
    Journal blocks: 0
    Label: odm_ext_a
    Blocks: 32768
    Block groups: 1
    Reserved block group size: 7
Created filesystem with 155/8192 inodes and 2535/32768 blocks
Done.
Creating system_a image
loaded 2967 fs_config entries
Creating filesystem with parameters:
    Size: 981266432
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 7488
    Inode size: 256
    Journal blocks: 0
    Label: system_a
    Blocks: 239567
    Block groups: 8
    Reserved block group size: 63
Created filesystem with 2976/59904 inodes and 225901/239567 blocks
resize2fs 1.46.5 (30-Dec-2021)
Resizing the filesystem on level2/system_a.img to 225394 (4k) blocks.
The filesystem on level2/system_a.img is now 225394 (4k) blocks long.

Done.
Creating system_ext_a image
loaded 113 fs_config entries
Creating filesystem with parameters:
    Size: 177954816
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 5440
    Inode size: 256
    Journal blocks: 0
    Label: system_ext_a
    Blocks: 43446
    Block groups: 2
    Reserved block group size: 15
Created filesystem with 122/10880 inodes and 40947/43446 blocks
resize2fs 1.46.5 (30-Dec-2021)
Resizing the filesystem on level2/system_ext_a.img to 40951 (4k) blocks.
The filesystem on level2/system_ext_a.img is now 40951 (4k) blocks long.

Done.
Creating vendor_a image
loaded 1121 fs_config entries
Creating filesystem with parameters:
    Size: 396664832
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 8080
    Inode size: 256
    Journal blocks: 0
    Label: vendor_a
    Blocks: 96842
    Block groups: 3
    Reserved block group size: 23
Created filesystem with 1130/24240 inodes and 91240/96842 blocks
resize2fs 1.46.5 (30-Dec-2021)
Resizing the filesystem on level2/vendor_a.img to 91251 (4k) blocks.
The filesystem on level2/vendor_a.img is now 91251 (4k) blocks long.

Done.
Creating product_a image
loaded 108 fs_config entries
Creating filesystem with parameters:
    Size: 109948928
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 6720
    Inode size: 256
    Journal blocks: 0
    Label: product_a
    Blocks: 26843
    Block groups: 1
    Reserved block group size: 7
Created filesystem with 117/6720 inodes and 25287/26843 blocks
resize2fs 1.46.5 (30-Dec-2021)
Resizing the filesystem on level2/product_a.img to 25290 (4k) blocks.
The filesystem on level2/product_a.img is now 25290 (4k) blocks long.

Done.
Creating odm_a image
loaded 24 fs_config entries
Creating filesystem with parameters:
    Size: 1560576
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 96
    Inode size: 256
    Journal blocks: 0
    Label: odm_a
    Blocks: 381
    Block groups: 1
    Reserved block group size: 7
Created filesystem with 32/96 inodes and 371/381 blocks
resize2fs 1.46.5 (30-Dec-2021)
Resizing the filesystem on level2/odm_a.img to 371 (4k) blocks.
The filesystem on level2/odm_a.img is now 371 (4k) blocks long.

Done.
lpmake I 03-15 16:52:48  1860  1860 builder.cpp:1031] [liblp]Partition system_ext_a will resize from 0 bytes to 167735296 bytes
lpmake I 03-15 16:52:48  1860  1860 builder.cpp:1031] [liblp]Partition system_a will resize from 0 bytes to 923213824 bytes
lpmake I 03-15 16:52:48  1860  1860 builder.cpp:1031] [liblp]Partition odm_a will resize from 0 bytes to 1519616 bytes
lpmake I 03-15 16:52:48  1860  1860 builder.cpp:1031] [liblp]Partition product_a will resize from 0 bytes to 103587840 bytes
lpmake I 03-15 16:52:48  1860  1860 builder.cpp:1031] [liblp]Partition vendor_a will resize from 0 bytes to 373764096 bytes
Invalid sparse file format at header magic
Invalid sparse file format at header magic
Invalid sparse file format at header magic
Invalid sparse file format at header magic
Invalid sparse file format at header magic
.....................

level 1

.....................
Amlogic Kitchen
.....................
.....................
Select level 1,2,3 or q/Q to exit: 
1
Can't find out folder
Created out folder
[Msg]Pack Item[USB         ,              DDR] from (level1/DDR.USB),sz[0x303000]B,fileType[normal]	
[Msg]Pack Item[USB         ,            UBOOT] from (level1/DDR.USB),Duplicated for DDR.USB

[Msg]Pack Item[PARTITION   ,         _aml_dtb] from (level1/_aml_dtb.PARTITION),sz[0x3f000]B,fileType[normal]	
[Msg]Pack Item[VERIFY      ,         _aml_dtb] from (level1/_aml_dtb.PARTITION),vry[sha1sum 29c7f61951fa8e6686601006071997ff3bbbcf9e]	
[Msg]Pack Item[UBOOT       ,     aml_sdc_burn] from (level1/aml_sdc_burn.UBOOT),sz[0x303200]B,fileType[normal]	
[Msg]Pack Item[ini         ,     aml_sdc_burn] from (level1/aml_sdc_burn.ini),sz[0x25a]B,fileType[normal]	
[Msg]Pack Item[PARTITION   ,           boot_a] from (level1/boot_a.PARTITION),sz[0x4000000]B,fileType[normal]	
[Msg]Pack Item[VERIFY      ,           boot_a] from (level1/boot_a.PARTITION),vry[sha1sum 5ec5ee9210ab13d69d7d340ee354ead43397c331]	
[Msg]Pack Item[PARTITION   ,       bootloader] from (level1/bootloader.PARTITION),sz[0x303000]B,fileType[normal]	
[Msg]Pack Item[VERIFY      ,       bootloader] from (level1/bootloader.PARTITION),vry[sha1sum 1d60c16e1e4c11d4f7377a3067230715f6e73542]	
[Msg]Pack Item[PARTITION   ,           dtbo_a] from (level1/dtbo_a.PARTITION),sz[0x200000]B,fileType[normal]	
[Msg]Pack Item[VERIFY      ,           dtbo_a] from (level1/dtbo_a.PARTITION),vry[sha1sum 8f8fa275d688766bd1cc7211eb580a3a939fcf24]	
[Msg]Pack Item[conf        ,             keys] from (level1/keys.conf),sz[0xb]B,fileType[normal]	
[Msg]Pack Item[PARTITION   ,             logo] from (level1/logo.PARTITION),sz[0x18bf70]B,fileType[normal]	
[Msg]Pack Item[VERIFY      ,             logo] from (level1/logo.PARTITION),vry[sha1sum 8fb2ec1405918227095c0a3d92e74ce0c80df0d8]	
[Msg]Pack Item[dtb         ,           meson1] from (level1/_aml_dtb.PARTITION),Duplicated for _aml_dtb.PARTITION

[Msg]Pack Item[PARTITION   ,        odm_ext_a] from (level1/odm_ext_a.PARTITION),sz[0x9e7748]B,fileType[sparse]	
[Msg]Pack Item[VERIFY      ,        odm_ext_a] from (level1/odm_ext_a.PARTITION),vry[sha1sum 823f5f056cee7d0d5a42631b94ff3b227d37f60f]	
[Msg]Pack Item[PARTITION   ,            oem_a] from (level1/oem_a.PARTITION),sz[0x2000000]B,fileType[normal]	
[Msg]Pack Item[VERIFY      ,            oem_a] from (level1/oem_a.PARTITION),vry[sha1sum 056783fd669671c5a3397a989737d25c7bef39f2]	
[Msg]Pack Item[PARTITION   ,            oem_b] from (level1/oem_a.PARTITION),Duplicated for oem_a.PARTITION

[Msg]Pack Item[VERIFY      ,            oem_b] from (level1/oem_a.PARTITION),Duplicated for oem_a.VERIFY

[Msg]Pack Item[conf        ,         platform] from (level1/platform.conf),sz[0x1c]B,fileType[normal]	
[Msg]Pack Item[PARTITION   ,            super] from (level1/super.PARTITION),sz[0x5b6135b8]B,fileType[sparse]	
[Msg]Pack Item[VERIFY      ,            super] from (level1/super.PARTITION),vry[sha1sum 2e1505fbc0d541d0fa7e92a77c9905db9f019547]	
[Msg]Pack Item[aml         ,         usb_flow] from (level1/usb_flow.aml),sz[0x2e260]B,fileType[normal]	
[Msg]Pack Item[PARTITION   ,         vbmeta_a] from (level1/vbmeta_a.PARTITION),sz[0x2000]B,fileType[normal]	
[Msg]Pack Item[VERIFY      ,         vbmeta_a] from (level1/vbmeta_a.PARTITION),vry[sha1sum 37c3e844310cdc298d38f7fa53f3e54c4a85d430]	
[Msg]Pack Item[PARTITION   ,    vendor_boot_a] from (level1/vendor_boot_a.PARTITION),sz[0x1800000]B,fileType[normal]	
[Msg]Pack Item[VERIFY      ,    vendor_boot_a] from (level1/vendor_boot_a.PARTITION),vry[sha1sum 0dc1d5b8fdf630eb92e50c843072ab2bfb0cad7e]	
[Msg]version:0x2 crc:0x15a32916 size:1682979060 bytes[1605MB]
Pack image[out/update-YS-A98-AP6212-11.0-20230315.img] OK
Done.
.....................
Amlogic Kitchen
.....................
.....................

out

# ls -l out
total 1643540
-rw-r--r-- 1 root root 1682979060 Mar 15 16:54 update-YS-A98-AP6212-11.0-20230315.img

参考文档

https://github.com/xKern/AmlogicKitchen



标签:15,PARTITION,level1,使用,Msg,root,AmlogicKitchen,size
From: https://blog.51cto.com/wangguishe/6207502

相关文章

  • 基于simulink的PMSM矢量控制系统的仿真,其中PMSM自己建模设计,不使用simulink自带模型
    1.算法描述        永磁同步马达(permanent-magnetsynchronousmotor),即永磁同步电机,简称PMSM,是指一种转子用永久磁铁代替绕线的同步马达。永磁同步马达可依磁通方式分为径向、轴向或是横向几种,依其元件的布局而定,各种的永磁同步马达在效率、体积、重量及工作速度都有不同的......
  • mac使用Stable Diffusion基础篇
    准备工作提前安装git.python等必要工具 1、git拉取WebUI仓库 gitclonehttps://github.com/AUTOMATIC1111/stable-diffusion-webui2、下载StableDiffusionModelshttps://huggingface.co/CompVis/stable-diffusion-v-1-4-original  3、启动下载完成后,把下载的s......
  • 编译器指令重排序问题(使用编译器屏障)
    环境:Windows平台:win7_64旗舰版、VS2019Linux平台:CentOSLinuxrelase7.2.1511、GCC_4.8.5-4场景:为了提高性能,编译器会对指令进行重新排序,在多线程环境下指令的乱序执行会造成无法预测的行为。开始:一、指令重排序实例inta=0,b=0;voidtest(){a=......
  • 图形验证码 captcha的使用
    使用效果:  使用说明:1、点击图片或者点击看不清换一张,会自动更换。 2、输入错误,也会自动再更换一张。确保安全 验证码文件:common/captcha.go packagecommonimport( "github.com/gin-gonic/gin" "github.com/go-playground/validator/v10" "github.com/mo......
  • Bootstrap模板-使用现成的免费完善模板制作网页
    Bootstrap有一系列现成的免费而优秀的模板,我们可以用于制作前端页面稍加改进就是一个美观的页面 模板代码(源自purpleTemplate):<!DOCTYPEhtml><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=devi......
  • 深入理解NTLK库基本使用方法
    第三章(2):深入理解NTLK库基本使用方法<br><br>本节主要介绍了NLTK库的基本使用方法,其中对NLTK的安装与配置进行了介绍。随后,对文本处理中常用的分词、句子分割和词性标注这三个任务进行了详细讲解。<br><br>如果感觉有用,不妨给博主来个一键三连,白天科研,晚上肝文,实属不易~~拜托了......
  • Fiddler使用技巧
    【Fiddler使用技巧】:弱网测试: 首先打开Fiddler,Rules->Performance->勾选SimulateModemSpeeds然后快捷键Ctrl+R打开设置窗口,设置speeds在if(m_SimulateModem){//Delaysendsby300msperKBuploaded.释义:每1kb上传/下载所需时间为0.3soSession["request-trickle-delay......
  • centos9 redis安装报错(实在无解使用方法)
    报错如下[root@centosbin]#./redis-server./redis-server:errorwhileloadingsharedlibraries:libssl.so.1.1:cannotopensharedobjectfile:Nosuchfileordirectory使用的解决命令yummakecacheyum-yinstall*openssl*原过程root@centosbin]#lsredi......
  • web页面播放spine动画及播放相关使用及总结spine-player.js
    1.官方git,里面有些例子可以参考。https://github.com/EsotericSoftware/spine-runtimes.git2.官方播放器:http://zh.esotericsoftware.com/spine-player目前测试4.0以上的js支持动画模型透明3.最基本的资源初始化html代码里面:<divid="player-container"style="width:640......
  • java - 使用 ProcessBuilder 调 window cmd指令太长导致找不到
     pb.command不可使用一个长字符串指令command,需要把每个指令参数分开,放入集合中Processprocess=null;ProcessBuilderpb=newProcessBuilder();//指令太长会导致无法找到文件,被视为一个完整的指令,应该每个空格都是为一个指令......