Firefly Open Source Community

   Login   |   Register   |
New_Topic
123
New Topic
Print Previous Topic Next Topic

Making "snapshot"

5

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
5

Making "snapshot"

Posted at 11/19/2014 23:55:41      View:13996 | Replies:23        Print      Only Author   [Copy Link] 1#
I've installed you t-firefly ubuntu and have configured it. Is there a way to make my own image of device (boot, kernel, fs ...) as a backup for "may be" situation of system failure?
Reply

Use props Report

403

Credits

10

Prestige

12

Contribution

intermediate

Rank: 3Rank: 3

Credits
403
Posted at 11/20/2014 09:18:10        Only Author  2#

This is a brief document about this packing process.


1. Copy following files to your packing directory.

a. Control files
- ATTACHMENT/package-file (describes package content of update.img)
- ATTACHMENT/parameter (parameter for Ubuntu, contains eMMC partition info)
- ATTACHMENT/update-script (not used for Linux, for completion only)
- ATTACHMENT/recovery-script (not used for Linux, for completion only)
- ATTACHMENT/misc-zero.img (boot command, zero will lead to normal boot)

b. RKTools
- RKTools/linux/Linux_Upgrade_Tool_v1.2/rockdev/afptool (RK firmware packing tools)
- RKTools/linux/Linux_Upgrade_Tool_v1.2/rockdev/rkImageMaker (RK image maker)

c. Bootloader and your images
- SDK/RKTools/bootloader/uboot-emmc/RK3288Loader_uboot_V2.17.02.bin, renamed to RKLoader.bin
- Your linux-rootfs.img (ext4 filesystem image, for Linux root)
- Your linux-boot.img (See wiki doc http://wiki.t-firefly.com/index.php/Fir ... _kernel/en to create your own)
- Your resource.img (In SDK/kernel, after successful kernel compilation)

2. do the packing
First, cd to your packing directory. Then run the following commands:

./afptool -pack ./ update_tmp.img
./rkImageMaker -RK32 RKLoader.bin update_tmp.img update.img -os_type:androidos
rm -f update_tmp.img

Now, your update.img is ready to serve.

rk-pack-linux-control-files.zip (1.99 KB, Down times: 12)
Reply

Use props Report

175

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
175
Posted at 12/17/2014 01:44:41        Only Author  3#

Hello busybee,

Being a member of Firefly and a support engineer, could you please elaborate more on the procedure?




There are several ambiguous points and some missing files, to start with :




c. Bootloader and your images

- Your linux-rootfs.img (ext4 filesystem image, for Linux root) (What do you mean by Your linux? how can I get it and where from ? especially that I am not using any external storage)
- Your linux-boot.img (See wiki doc [/url][url=http://wiki.t-firefly.com/index.php/Firefly-RK3288/Build_kernel/en]

http://wiki.t-firefly.com/index.php/Fir


... _kernel/en to create your own) (make my own ? but I already have a running system, I am lost here)
- Your resource.img (In SDK/kernel, after successful kernel compilation) (Where from ? and how to?realize?that ?)




Thank you for your earliest reply.


Reply

Use props Report

403

Credits

10

Prestige

12

Contribution

intermediate

Rank: 3Rank: 3

Credits
403
Posted at 12/17/2014 09:39:29        Only Author  4#

Hi tedd77. The op topic is making "snapshot", which involves packing all the image files into one big firmware file (update.img).




All my instructions are for those who would like to compile everything from scratch.




- Your linux-rootfs.img (ext4 filesystem image, for Linux root)

See wiki page:?
http://wiki.t-firefly.com/index.php/Fir ... ntu_rfs/en



- Your linux-boot.img and?resource.img?(In SDK/kernel, after successful kernel compilation)





http://wiki.t-firefly.com/index.php/Fir ... _kernel/en






Of course, you can extract those images from our released firmware file.?

Try to run?AndroidTool (
http://wiki.t-firefly.com/index.php/Fir ... lash_Image

),

switch to "Advanced Function" tab, and you'll find the "Unpack" button.

First browse the firmware file and then click "Unpack".





Reply

Use props Report

175

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
175
Posted at 12/17/2014 19:22:31        Only Author  5#

Hello busybee,




Thank you. Since I am making a snapshot or an image of an existing running system the procedure are not the same.

The hard time I am having is to figure out the way especially downloading the SDK is not a given task, you would spend days trying to get it as it is slow and not reliable.

Could you please be kind enough to help me get the right detailed procedures? my task is the reverse , it is to make an image from my firefly unit.

It is like making an image of an existing windows computer to apply it later to other machines using GHOST or other image making softwares.




Sorry for the troubles, but this is important for me as well as to others I am sure.
Reply

Use props Report

175

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
175
Posted at 12/19/2014 20:35:20        Only Author  6#

Hello busybee,

If Firefly support cannot help, where from can we get it ?

Please let me know if you are willing to support or not! that way I can decide which way to go. Thank you
Reply

Use props Report

42

Credits

6

Prestige

10

Contribution

new registration

Rank: 1

Credits
42
Posted at 12/19/2014 21:06:44        Only Author  7#
If it helps you can make a backup of the individual partitions on the eMMC using rkflashkit, some instructions on the wiki . ?It's not exactly the same as making a complete image of the eMMC but you should be able to restore them.
Reply

Use props Report

175

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
175
Posted at 12/20/2014 08:44:00        Only Author  8#

jas-rk ,?Thank you, unfortunately the rkflashkit is not detecting my firefly board therefore I am unable to test what you suggested.


Reply

Use props Report

403

Credits

10

Prestige

12

Contribution

intermediate

Rank: 3Rank: 3

Credits
403
Posted at 12/20/2014 11:28:30        Only Author  9#

There're many ways of copying out the linux root filesystem.

The easy way, is using rkflashkit or alike to backup the linuxroot partition


Another way,  is copying out the files in linuxroot, by mounting a SD card/usb disk etc:

a. Insert your sd card/usb disk.


b. Check the path (usually under /media/firefly), and cd into that.

    $ cd /media/firefly/your_sd_card


c. Check your rootfs's size:

    $ sudo du -hxs /
    1.8G /

d. Create the ext4fs image file:

    $ sudo dd if=/dev/zero of=new_ubuntu.img bs=1M count=2000

    $ sudo mkfs.ext4 -m0 new_ubuntu.img

NOTE: 1. bs * count should be greater than your size of root partition (add about 200~300M for extra space)

          2. If you're using the vfat filesystem in the sdcard, the vfat has a file limit of 4GiB bytes.


c. Mount the image file:

    $ sudo mkdir -p /mnt/new

    $ sudo mount -o loop new_ubuntu.img /mnt/new


d. Copy files:

    $ sudo cp -ax /  /mnt/new/


e. Umount the image file:

    $ sudo umount /mnt/new


Now your root files are copied into new_ubuntu.img, which can be flashed back later on.

And the first time you flashed the image back, you'd better run a resize2fs on the linuxroot partition:

    $ sudo resize2fs /dev/block/mtd/by-name/system

Reply

Use props Report

403

Credits

10

Prestige

12

Contribution

intermediate

Rank: 3Rank: 3

Credits
403
Posted at 12/20/2014 11:39:37        Only Author  10#

For rkflashkit alike tools to work, the device must be set to "upgrade mode".?

?
http://wiki.t-firefly.com/index.php/Fir ... h_image/en

?has the detail.
Reply

Use props Report

Return to List
123
You need to log in before you can reply Login | Register

This forum Credits Rules

Quick Reply Back to top Back to list