How to build Snappy Ubuntu Core from source to binary?

I-Sheng Lin ckjboy2003 at gmail.com
Wed Nov 18 06:30:36 UTC 2015


Hi,

I have created my own device tar ball. ( Thanks a lot to rootsotck project,
it saves my time )

By decompressing the tar ball, I have two directories ( assets, system )
and one file ( hardware.yaml ).

However, when I tried to generate the image file by using
ubuntu-device-flash, the log indicates that it failed to read hardware.yaml
from device part. Please refer to the following log:




*Using a custom device tarballSearching for hardware.yaml in device
partFailed to read harware.yaml from device part, provisioning may fail:
failed to extract a hardware.yaml from the device part: tar: hardware.yaml:
Not found in archivetar: Exiting with failure status due to previous errors*

and in the end it shows this:




*stat /tmp/diskimage271141682/hardware.yaml: no such file or directory*
my command to generate the system image shown below:



*sudo ubuntu-device-flash core 15.04 --oem=generic-amd64 --channel edge
--enable-ssh --device-part=ubuntu-core.device.tar.xz -o custom_snappy.img
--developer-mode --verbose     --clean-cache*

I dont know why the log shows it failed to read hardware.yaml even it is in
my tarball.

Please advise.



Sam Lin

On Mon, Nov 2, 2015 at 10:34 AM, I-Sheng Lin <ckjboy2003 at gmail.com> wrote:

> Hi,
>
> For the step 1 ( debian-cd[1] ),
>
> from waht I have understood so far, I will need to build the debian-cd
> image first in order to build the Snappy Ubuntu Core later on.
>
> In the link you provided [1]
> <https://code.launchpad.net/~ubuntu-cdimage/debian-cd/ubuntu>, the README
> file mentions I need to edit the PATHs for the mirror.
>
> I dont exactly get the "mirror" means but I assume it is here.
>
> Debian_mirror <http://ftp.us.debian.org/debian/>
>
> The CONF.sh has some paths needed to modify, for example:
>
> =====================================================================
>
> # Paths to the mirrors
> export MIRROR=${MIRROR:-$CDIMAGE_ROOT/ftp}
>
> # Path of the temporary directory
> export TDIR=$CDIMAGE_ROOT/scratch/$PROJECT/$DIST/$IMAGE_TYPE/tmp
>
> =====================================================================
> I don't figure out how to configure the path yet.
>
> Kindly let me know:
>
> 1. Does the local package mirror you refer to is the one I paste above ?
>
> 2. How to edit the CONF.sh file in order to fit building requirement ?
>
>
> Thanks
>
>
>
> On Thu, Oct 29, 2015 at 5:57 PM, Oliver Grawert <ogra at ubuntu.com> wrote:
>
>> hi,
>> Am Donnerstag, den 29.10.2015, 16:57 +0800 schrieb I-Sheng Lin:
>>
>> > This means, I want to build an exactly the same image as what I have
>> > downloaded from the website here Link.
>> >
>> > I would go through your link and please let me know if you have any
>> > idea to do it.
>>
>> sure we do, after all we produce these images ;)
>> note though that this isn't actually trivial ...
>>
>> snappy is built from binary deb packages from the ubuntu archive using
>> our general image build infrastructure (debian-cd [1], ubuntu-cdimage
>> [2], live-build (with all the configuration and extra hooks shipped in
>> the livecd-rootfs [3] package))
>>
>> the list of used .deb packages is provided as .manifest file for each
>> rootfs tarball at [4]
>>
>> so to build *everything* from source you would have to use the debian
>> source packages from the archive and change them, have the above
>> infrastructure in place and provide a local package mirror with your
>> changed packages.
>>
>> the fragments on cdimage.ubuntu.com then serve as input for the
>> system-image.ubuntu.com server [5] that takes these build fragments and
>> turns them into delta tarballs (rootfs, device and oem-snap) for image
>> based upgrades.
>> ubuntu-device flash then assembled them into an img file based on the
>> json data for your selected channel on system-image.ubuntu.com. which
>> you can then dd to your harddisk (or SD card).
>>
>> there is a small project called rootstock that allows you to replicate
>> the steps [1] - [4] at [6], but that will only give you the cdimage
>> artifacts, so you need some local system-image server and would need to
>> convince ubuntu-device-flash to make use of it...
>>
>> good luck ;)
>>
>> ciao
>>         oli
>>
>> [1] https://code.launchpad.net/~ubuntu-cdimage/debian-cd/ubuntu
>> [2] https://code.launchpad.net/~ubuntu-cdimage/ubuntu-cdimage/mainline
>> [3] https://code.launchpad.net/~ubuntu-core-dev/livecd-rootfs/trunk
>> [4] http://cdimage.ubuntu.com/ubuntu-core/daily-preinstalled/current/
>> [5]
>> https://code.launchpad.net/~ubuntu-system-image/ubuntu-system-image/server
>> [6] https://code.launchpad.net/~ogra/project-rootstock-ng/trunk
>>
>>
>> --
>> snappy-devel mailing list
>> snappy-devel at lists.ubuntu.com
>> Modify settings or unsubscribe at:
>> https://lists.ubuntu.com/mailman/listinfo/snappy-devel
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snappy-devel/attachments/20151118/252c46fa/attachment-0001.html>


More information about the snappy-devel mailing list