Giter VIP home page Giter VIP logo

Comments (7)

wigcheng avatar wigcheng commented on August 12, 2024

I think the root cause is in gen_virtual_images command.
Please use this command on host PC side, don't in the container because container cannot access hardware relate nodes.

If still doesn't works, please provide gen_virtual_images output log to me, thanks.

from cookers.

Natr1x avatar Natr1x commented on August 12, 2024

When you say host pc side, you mean not in the docker container right? Not outside of the virtual box I am running it on.

from cookers.

wigcheng avatar wigcheng commented on August 12, 2024

Right, only compile source code in the docker container, and make image outside the container, still doesn’t works?

from cookers.

Natr1x avatar Natr1x commented on August 12, 2024

Unsure, I am going to try it but I am a bit sceptical about this gen_virtual_images function.
Like why does it make the partitions twice, once after it has detached the loop device.

~#@❯  gen_virtual_images
'/srv/sensidose/technexion-android/device/fsl/common/tools/gpt_partition_move' -> '/srv/sensidose/technexion-android/out/target/product/pico_imx7/gpt_partition_move'
Find /srv/sensidose/technexion-android/out/target/product/pico_imx7/fsl-sdcard-partition-virtual-image.sh
3400+0 records in
3400+0 records out
3565158400 bytes (3.6 GB, 3.3 GiB) copied, 7.05305 s, 505 MB/s
./fsl-sdcard-partition-virtual-image.sh: line 116: [: too many arguments
make gpt partition for android: partition-table-3GB.img
dd: unrecognized operand '/dev/loop4'
Try 'dd --help' for more information.
failed to stat() /dev/loop8
/dev/loop4
/dev/loop9
/dev/loop7
losetup: /dev/loop8
/dev/loop4
/dev/loop9
/dev/loop7: failed to use device: No such device
./fsl-sdcard-partition-virtual-image.sh: line 116: [: too many arguments
make gpt partition for android: partition-table-3GB.img
dd: unrecognized operand '/dev/loop4'
Try 'dd --help' for more information.
This is not GUID partition table
Bad Guid partition table
dd: unrecognized operand '/dev/loop4'
Try 'dd --help' for more information.
dd: unrecognized operand '/dev/loop4'
Try 'dd --help' for more information.
failed to stat() /dev/loop8
/dev/loop4
/dev/loop9
/dev/loop7
losetup: /dev/loop8
/dev/loop4
/dev/loop9
/dev/loop7: failed to use device: No such device

Edit:
I did try fixing that function previously but that didn't work either. However if you want I could try that again but running outside of the docker container.

from cookers.

Natr1x avatar Natr1x commented on August 12, 2024

So I made some changes to the gen_virtual_images function and now it works.

I essentially added some syncs, made sure to run loop_dev=$(losetup | grep "test.img" | awk '{print $1}') after each kpartx -av in case it gets assigned to a different loop device, and then I probably went a bit overboard with kpartx -d for both the loop device and img to make absolutely certain that the device is detached before attaching it again.

If you want I can make it into a merge request?

from cookers.

wigcheng avatar wigcheng commented on August 12, 2024

That strange, I remember I tested before.
Anyway, thanks for your test, you can make a PR to this repo of course.

from cookers.

Natr1x avatar Natr1x commented on August 12, 2024

I created a pull request. Thank you very much for the help.

from cookers.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.