Would I change a startup service in init.rc?


I want to set up a service when amlogic Khadas VIM board powered on, so I do something below:
(1)mount -o remount,rw /
(2)vi /init.rc
(3)add a service like this in the last line:
service myshell /data/my/myshell.sh
class main
user root
group root
(4)save scucess

But when i reboot the system,the changes which i saved is lost. So,how can I solve this trouble?


Is there somthing tool for unpacking the update.img? I want to unpack the boot.img and ramdisk.img.


Hi FinalFantasy,

You can use aml_image_v2_packer to unpack update.img.

nick@Nick:~/share/VIM/server$ ls update.img 
nick@Nick:~/share/VIM/server$ mkdir out_dir
nick@Nick:~/share/VIM/server$ ~/project/khadas/ubuntu/utils/aml_image_v2_packer -d update.img out_dir
[Msg]Image package version 0x2
[Msg]Unpack item [USB         ,              DDR] to (out_dir/DDR.USB) size:49152 bytes
[Msg]Unpack item [USB         ,            UBOOT] to (out_dir/UBOOT.USB) size:704512 bytes
[Msg]Unpack item [PARTITION   ,         _aml_dtb] to (out_dir/_aml_dtb.PARTITION) size:37061 bytes
[Msg]Unpack item [UBOOT       ,     aml_sdc_burn] to (out_dir/aml_sdc_burn.UBOOT) size:754176 bytes
[Msg]Unpack item [ini         ,     aml_sdc_burn] to (out_dir/aml_sdc_burn.ini) size:589 bytes
[Msg]Unpack item [PARTITION   ,       bootloader] to (out_dir/bootloader.PARTITION) size:753664 bytes
[Msg]Unpack item [PARTITION   ,             logo] to (out_dir/logo.PARTITION) size:907456 bytes
[Msg]Backup item [dtb         ,           meson1] backItemId[2][PARTITION, _aml_dtb]
[Msg]Unpack item [conf        ,         platform] to (out_dir/platform.conf) size:202 bytes
[Msg]Unpack item [PARTITION   ,          ramdisk] to (out_dir/ramdisk.PARTITION) size:20322304 bytes
[Msg]Unpack item [PARTITION   ,           rootfs] to (out_dir/rootfs.PARTITION) size:838860800 bytes
[Msg]Write config file "out_dir/image.cfg" OK!
Image unpack OK!



Hi numbqq,
I have unpacked update.img by aml_image_v2_packer,but the output file is not like such as boot.img system.img recovery.img and so on.


You can refer to this post. Thanks!


Hi terry,I have solved the problem by your methods thanks a lot.