Firefly Open Source Community

   Login   |   Register   |
New_Topic
Print Previous Topic Next Topic

mkimage.sh loops forever

43

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
43

mkimage.sh loops forever

Posted at 8/19/2015 03:25:25      View:3849 | Replies:3        Print      Only Author   [Copy Link] 1#
I'm trying to follow this tutorial and it looks like mkimage.sh loops forever (I stopped watch when processing system.img reached 9.5GB interestingly du show about 470MB).

[16:22:51] pietrushnic:firefly-rk3288 gitmaster*) $ ./mkimage.sh
TARGET_PRODUCT=rk3288
TARGET_HARDWARE=rk30board
system filesysystem is ext4
create boot.img without kernel... done.
create recovery.img with kernel and with out resource... done.
create misc.img.... done.
create system.img...

I'm using e2f2ba5dd349 tag: Firefly-RK3288_Android4.4_201504181055. I wonder what is the purpose of loop in mkimage.sh:

                  while [ "$ok" = "0" ]; do
                          make_ext4fs -l $system_size $MAKE_EXT4FS_ARGS >/dev/null 2>&1 &&
                          tune2fs -c -1 -i 0 $IMAGE_PATH/system.img >/dev/null 2>&1 &&
                          ok=1 || system_size=$(($system_size + 5242880))
                  done  

Looks like I'm looping here forever. My system.img from ./out/target/product/rk3288/system.img file size is 399306712.

Any idea how to pass mkimage.sh script ?


Reply

Use props Report

417

Credits

15

Prestige

16

Contribution

intermediate

Rank: 3Rank: 3

Credits
417
Posted at 8/19/2015 08:33:24        Only Author  recommend
Last edited by sghazagh In 8/19/2015 16:30 Editor

Probably your "losetup" device is busy...
Try restarting your machine an see if it can create the image...
It needs to add a loop back device and mount to copy the system image.
Sometimes the loop back device is occupied and it cannot create other loop back device.
Restart and test...

You can get a list of loop back devices currently in use by command  "losetup -a"   
已有 1评分Prestige +5 Money +6 Contribution +6 Pack up reason
pietrushnic + 5 + 6 + 6

View all ratings

Reply

Use props Report

43

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
43
Posted at 8/19/2015 14:58:59        Only Author  3#
Thanks for reply.

Ok the key information was that it should create loop device. it need root privileges to to do that.

  1. sudo ./mkimage.sh
Copy the code


Did the trick. Thanks for helping out.

BTW to check loop devices
  1. losetup -a
Copy the code
should be used at least for Debian.
Reply

Use props Report

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

This forum Credits Rules

Quick Reply Back to top Back to list