Quantcast
Channel: MobileRead Forums - Kindle Developer's Corner
Viewing all articles
Browse latest Browse all 4457

Tools Virtual Development

$
0
0
Over the years there have been a number of threads published on the subject of creating a development system for Kindle software.

Two of the most recently commented on:
https://www.mobileread.com/forums/sh...d.php?t=277236
https://www.mobileread.com/forums/sh...d.php?t=286561
twobob also posted the systems that he made for porting software to the Kindles.

I need such a thing on my own (newly installed) system, so I am trying a different approach.

A "Virtual Appliance" approach that contains a ready to use developement system for this specific purpose.
This system is built by a friend of mine, JaneTizzy, who is not a member here (her field is chemistry, not computers).
The appliance is posted in a number of file formats, which should cover most of the virtualizations in common use.

This is a WIP, like all of my projects (most of which never get finished).

What we have in version 0.0.2 is just the virtual development host.
It is not (yet) equip'd with ARM emulation or ARM chroot environments. Although qemu is present and binfmt_misc is mounted and enabled but here are no assignments registered with binfmt_misc (yet).
Ref: Binfmt_Misc Doc.
The usual native development tools are installed.

It does have the SuSE package management installed (zypper), for adding the things that I forgot.
But I would like some feedback on what people find (missing, wrong, incomplete, etc.).

An example of the feedback I am hoping to get:
I forgot to install any text editor other than VIM (which I hate).
I did remember to install OpenSSH, which (along with scp, sshfs, etc.) communicates with the host system (outside of VirtualBox) just fine.
Spoiler:

You fix the missing nano (or anything else) by:
Code:

$ su -
password:
# zypper in nano
# exit


The images are all built to run on an Intel, 64bit, single core, host (not the IA64, give me some slack).
The downloads are about 400Mbyte and when uncompressed the system file is about 1.4Gbyte.
The virtual hard disk is defined as an 8Gbyte drive, so leave it room to grow.

Both the root and the home directories are installed on LVM logical volumes.
The intent is to allow the user to shift free space around as required.
The build system defaulted all of the free space to the system tree. Not exactly what I intended, I wanted the free space left 'free'. Phooey, one more thing to fix in a later version (I'll tell the build system to make three logical volumes, and then delete one of them. ;) ).

The above plan addresses a common question in a new system layout:
"How much will the 'system' section grow?"
and
"How much will the 'user home directory' grow?".
Part of the answer to those questions depend on the user's work habits and where they like to keep files (in home directory, or in system option directories).

Since both are under LVM control, it is possible to use LVM and the file system tools to resize the logical volumes and their file systems as required (you can do that 'hot' from inside the running machine).

The hard drive layout looks like this (/dev/sda1 is swap):
Spoiler:
Code:

  --- Physical volume ---
  PV Name              /dev/sda2
  VG Name              systemVG
  PV Size              7.77 GiB / not usable 0 
  Allocatable          yes (but full)
  PE Size              4.00 MiB
  Total PE              1988
  Free PE              0
  Allocated PE          1988
  PV UUID              iEQh2c-U01y-Nfq1-gY7g-wm6Y-3GNG-ftgD4e
 
  --- Volume group ---
  VG Name              systemVG
  System ID           
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  4
  VG Access            read/write
  VG Status            resizable
  MAX LV                0
  Cur LV                2
  Open LV              2
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size              7.77 GiB
  PE Size              4.00 MiB
  Total PE              1988
  Alloc PE / Size      1988 / 7.77 GiB
  Free  PE / Size      0 / 0 
  VG UUID              EpnR72-OLnP-7cn2-dnfR-NGxC-Q6eZ-3BS978
 
  --- Logical volume ---
  LV Path                /dev/systemVG/LVhome
  LV Name                LVhome
  VG Name                systemVG
  LV UUID                75Ckw9-bJvo-WM6n-WUn2-WJ5L-YyoG-sUwk7D
  LV Write Access        read/write
  LV Creation host, time (none), 2017-07-12 13:21:17 -0500
  LV Status              available
  # open                1
  LV Size                1.95 GiB
  Current LE            500
  Segments              1
  Allocation            inherit
  Read ahead sectors    auto
  - currently set to    1024
  Block device          254:0
 
  --- Logical volume ---
  LV Path                /dev/systemVG/LVRoot
  LV Name                LVRoot
  VG Name                systemVG
  LV UUID                rq2cGd-nGFM-x4Ds-QOYs-Xl8T-JlgV-z8ofbh
  LV Write Access        read/write
  LV Creation host, time (none), 2017-07-12 13:21:17 -0500
  LV Status              available
  # open                1
  LV Size                5.81 GiB
  Current LE            1488
  Segments              1
  Allocation            inherit
  Read ahead sectors    auto
  - currently set to    1024
  Block device          254:1



Note:
The VirtualBox, Linux, guest additions have not been installed in this image.
See: https://www.virtualbox.org/manual/ch04.html
You will want to install those into the image in order to access files on the host system and to make the display window a reasonable size.
An even bigger: NOTE:
The kernel is too new, or the module in GuestAdditions is too old to install.
Well, I wanted to install alternate kernels anyway (I know it will install in 3.6.x) ...

Directions for installing the appliance in a VirtualBox instance:
https://susestudio.com/help/use/virtualbox.html
Those are a bit out of date. VB version 5.x only imports *.ovf images.
For the 5.x version of the image, just point the 'Import Appliance' thingy at the file and turn it loose.
The older versions of VB import the *.vdmk images.

Directions for installing the appliance in a VMware instance:
https://susestudio.com/help/use/vmware.html
Somebody that owns VMware will have to try that out and report back.

I have never seen VMware, but I assume it is similar to VirtualBox -
A folder in the host system can be assigned to another virtual hard disk drive and that used for additional workspace (or added to LVM's collection of physical storage volumes).
(Once you install the 'Guest Additions' mentioned above.)

The low-down on the image formats:
https://susestudio.com/help/create/a...e-formats.html

And for those situations that are not covered by the above, there is also a LiveCD version available.

The full course menu:
https://susestudio.com/help/use/index.html

For the curious, the appliance was built using the SuSE Studio build system (which took all of 8 minutes to build it). The system is based on the current OpenSuse stable release.

There are only two users:
User: root
Pass: linux
Auto-login is enabled, but just in case:
User: tux
Pass: linux

The first boot is rather slow, but don't panic, it is not hung up, it is doing "run once" chores.
Recent VirtualBox and VMware (ovf)
Older VirtualBox and VMware
LiveCD

And on a final note, how to get out of it (there isn't any sudo installed):
Code:

$> su -
password:
#> shutdown -h now
bye, bye world


Viewing all articles
Browse latest Browse all 4457

Trending Articles