Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for ARM Dev-board SD-Card Image Generation #23

Closed
obbardc opened this issue Sep 17, 2016 · 7 comments
Closed

Add support for ARM Dev-board SD-Card Image Generation #23

obbardc opened this issue Sep 17, 2016 · 7 comments
Assignees
Milestone

Comments

@obbardc
Copy link
Member

obbardc commented Sep 17, 2016

This issue will track the progress of adding in ARM dev board support to PDK.

@obbardc obbardc added this to the 1.0 milestone Sep 17, 2016
@obbardc obbardc self-assigned this Sep 17, 2016
@obbardc
Copy link
Member Author

obbardc commented Oct 11, 2016

PICAX has been written with only CD media in mind. This will take a bit of thinking about to implement in the cleanest way... but it is definitely doable.

One thing to keep in mind is the mounting of the temporary image files (in the pifactory script) has to be done as root... so the pdk mediagen command probably will have to be run as root, so may post some security risk?

@obbardc
Copy link
Member Author

obbardc commented Oct 12, 2016

One thing to keep in mind is the mounting of the temporary image files (in the pifactory script) has to be done as root... so the pdk mediagen command probably will have to be run as root, so may post some security risk?

Looks like I might have figured this one out with some clever fuse-mount hacking for the image generation and a mixture of fakeroot and fakechroot for the debootstrap. Not a pretty hack by any means; but it will work! So some progress on this.

Next step (after some more testing) is to Pythonize it :)

@obbardc
Copy link
Member Author

obbardc commented Dec 25, 2016

I've been looking into how best to implement this feature today. PDK was originally designed to support CD media, with different installers (e.g d-i and anaconda).

It will be very difficult to modify the existing way the pdk mediagen command works. So, I have come up with a few different ideas which will be a lot easier to implement:

  1. Create a separate command pdk imggen (for Raspberry Pi images) and leave pdk mediagen intact for ISOs.
  2. Create a separate command pdk imggen (for Raspberry Pi images) and a separate command pdk isogen for ISOs as to not confuse users.
  3. Use pdk mediagen as we currently do, but depending on the Metadata in the picax.xml file generate a CD, DVD, USB stick or preinstalled IMG file.
  4. (I did have a fourth option but I forgot it. It couldn't have been that good)

I like option 1 for our current testing, then we can gradually work into option 3. Option 3 allows us to do a lot more in the future as well, for instance pre-installed virtual machine drives.

The picax scripts need significant changes, anyway. A lot has changed since then in terms of how media is created in the Linux land.

I invision a simple re-write of picax (upgraded picax) which solves these issues................. To be continued.

@danielhjames
Copy link
Member

Might be good to have support for creating images with 'holes' that can be written more efficiently with bmaptools: https://source.tizen.org/documentation/reference/bmaptool/introduction

@obbardc
Copy link
Member Author

obbardc commented Dec 27, 2016

I think the best way to achieve this is to generate raw image files, then do any zipping, bmapping, md5summing in the project makefile.

@obbardc
Copy link
Member Author

obbardc commented Feb 9, 2017

Update: This feature is now at 90% complete for the Raspberry Pi Debian Jessie image creation.

Currently, we can generate raw images; partition them; debootstrap from our PDF created APT Repo; then cleanup.

All we now need to be able to do is: get configuration from a preseed file; install custom packages; setup basic Linux stuff so we can boot a system; run a postinst script. We also need to modify our PDK Debian package to have a metapackage to install the required packages on the host system. The pdk imggen command should only run if this metapackage is installed. I estimate another eight hours at most...

Then we will have a working (but rough! Not much error checking) Proof of Concept of version 1.0 ready!

@obbardc
Copy link
Member Author

obbardc commented May 28, 2018

Support for this is now merged into master. See instructions posted in documentation soon. See #36

@obbardc obbardc closed this as completed May 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants