Tizen OS Local Recovery Guide
From Tizen Wiki
※ Caution : This guide is based on rpi4
Environment Setup
- Fusing image to rpi4
- sudo ./sd_fusing.sh -d /dev/(sdX) --format
- sudo ./sd_fusing.sh -d /dev/(sdX) -b tizen-unified...iot-boot...tar.gz
- sudo ./sd_fusing.sh -d /dev/(sdX) -b tizen-unified...iot-headed...tar.gz
- Connect rpi4 to host computer
- sdb devices
- sdb root on
- Setup local recovery image
- Input recovery image to usb
- Recovery image path : (usb home path)/tizen-recovery.img
- Input recovery image to usb
Test Local Recovery client
※ Below test client is based on Tizen OS Local Recovery Client Guide. If you want to make own client, please refer guide.
- Install test client
- ※ Caution : you should reboot rpi4 after install test client
- sdb install org.example.recovery-manager-client-1.0.0-arm.tpk
- Check that recovery-manager recognize recovery image in usb
- Plug and Unplug setup usb with recovery image to rpi4
- Check that test client is launched
- Plugged event key : recovery-plug, value : (image path)
- Unplugged event key : recovery-unplug, value : (usb home path)
- e.g) Test client LOG_TAG : RECOVERY_MANAGER_CLIENT
root:~> dlogutil RECOVERY_MANAGER_CLIENT I/RECOVERY_MANAGER_CLIENT( 1065): src/recovery-manager-client.c (30) service_app_control : App-control recovery-plug : /opt/media/USBDriveE1/tizen-recovery.img I/RECOVERY_MANAGER_CLIENT( 1065): src/recovery-manager-client.c (30) service_app_control : App-control recovery-unplug : /opt/media/USBDriveE1
- 3. Trigger recovery
- Trigger recovery with client while usb plugged
- sdb shell app_launcher org.example.recovery-manager-client recovery-trigger 0
- Trigger recovery without client (for test)
- sdb root on
- sdb shell reboot recovery
- Trigger recovery with client while usb plugged
- 4. If recovery is successful, the output is shown below.
Starting kernel ... [ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd083] [ 0.000000] Linux version 5.4.50-arm64-rpi4-v8 (abuild@obsnw02) (gcc version 9.2.0 (Tizen GCC 9.20 [ 0.000000] Machine model: Raspberry Pi 4 Model B [ 0.000000] earlycon: uart8250 at MMIO32 0x00000000fe215040 (options '') [ 0.000000] printk: bootconsole [uart8250] enabled [ 0.800352] spi-bcm2835 fe204000.spi: could not get clk: -517 [ 1.743489] bcm2835-i2s fe203000.i2s: could not get clk: -517 [ 1.770596] debugfs: Directory 'fef00700.hdmi' with parent 'vc4-hdmi' already present! [ 1.790787] ac10x i2c_id number: 0 [ 1.794337] ac10x data protocol: 0 [ 1.807874] ac10x-codec 1-003b: fail to write adc1 volume register You entered into /sbin/init on initrd Kernel command line: vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000 8250.nr_uarts=1 dma.dmach4 BOOTMODE is recovery Starting system recovery. mount partitions mount USB partitions SR/INFO Find mountpoint : /opt/media/USBDriveA1 SR/INFO Find recovery image : /opt/media/USBDriveA1/tizen-recovery.img SR/INFO === Image list start === SR/INFO Label(BOOT), Basename(boot.img), Devpath(/dev/mmcblk0p1) SR/INFO Image size : 67108864 SR/INFO Label(rootfs), Basename(rootfs.img), Devpath(/dev/mmcblk0p2) SR/INFO Image size : 1386795008 SR/INFO Label(system-data), Basename(system-data.img), Devpath(/dev/mmcblk0p3) SR/INFO Image size : 78954496 SR/INFO Label(user), Basename(user.img), Devpath(/dev/mmcblk0p5) SR/INFO Image size : 113676288 SR/INFO Label(modules), Basename(modules.img), Devpath(/dev/mmcblk0p6) SR/INFO Image size : 18362368 SR/INFO Label(ramdisk), Basename(ramdisk.img), Devpath(/dev/mmcblk0p7) SR/INFO Image size : 8388608 SR/INFO Label(ramdisk-recovery), Basename(ramdisk-recovery.img), Devpath(/dev/mmcblk0p8) SR/INFO Image size : 14981120 SR/INFO === Image list end === SR/INFO Total image size : 1688266752 bytes SR/INFO === Image writing start === SR/INFO Label(BOOT), Imagepath(/tmp/recovery_image/boot.img), Devpath(/dev/mmcblk0p1) SR/INFO Progress : 1% SR/INFO Progress : 2% ... SR/INFO Progress : 96% SR/INFO Progress : 97% SR/INFO Label(modules), Imagepath(/tmp/recovery_image/modules.img), Devpath(/dev/mmcblk0p6) SR/INFO Progress : 98% SR/INFO Label(ramdisk), Imagepath(/tmp/recovery_image/ramdisk.img), Devpath(/dev/mmcblk0p7) SR/INFO Progress : 99% SR/INFO Label(ramdisk-recovery), Imagepath(/tmp/recovery_image/ramdisk-recovery.img), Devpath(/dev/) SR/INFO Progress : 100% SR/INFO === Image writing end === SR/INFO Succeed in image recovery umount partitions umount USB partitions /usr/bin/ls: cannot access /system/opt/media/USBDrive*: No such file or directory umount: /system/opt: target is busy. umount: /system: target is busy. Reboot Rebooting. [ 91.150702] reboot: Restarting system