Тематическая статья 3

Scratchbox Deployment in Development

Scratchbox organisation
http://www.scratchbox.org/documentation/general/tutorials/development.html

1. Benefits

Current features:

  • You can easily switch between different toolchains (CPU architecture, C-library):

    • You can easily cross-compile your software for several targets with different CPU architectures without changing your code or build system (assuming the code itself is architecture neutral)

    • You can easily test your software on different CPU architectures

  • The compilation is sandboxed and toolchain binaries have transparent wrappers:

    • Everything is compiled automatically with ccache (without changes to software build systems)

    • You can easily deploy distributed compilation (without any changes to software build systems)

  • All the binaries are automatically run on a correct target CPU architecture and the compilation environment looks like the target environment:

    • Cross-compiling Autotools using software works out of box

    • Testing of your software is faster as your test scripts run on your host and tested binaries are automatically run on correct target devices

    • You can control this easily with environment variables

Future features:

  • Normal users can do root operations using "fakeroot" and this is propagated between target machines:

    • allows building and installation of Debian packages inside Scratchbox

    • you can (more) easily create rootimages

Small print: All this assumes you've first setup Scratchbox properly for given targets and it has toolchains for them.

2. Concept Acceptance

The SDK is an environment to facilitate cross-platform Linux development. It attempts to diminish the boundaries between desktop and embedded software development by providing a compilation and configuration environment for the embedded target that closely resembles the one used for traditional desktop development.

As such developers can use many of the tools that they are already familiar with, and get started with productive application development very quickly. Therefore it is likely that the SDK is welcomed by the developer community. The fully open nature of the SDK makes approval ever more likely: as a GPL (General Public License) licensed project it is as free and openly available as Linux itself.

3. Understanding the Concept

It takes 1 to 1.5 man-days to study the SDK documentation for quite an experienced software developer and to get sufficient understanding of the concept by studying the available documentation and running tests in the SDK itself. This time estimate is for a developer having no prior exposure to cross-platform development processes.

4. Prerequisites

The SDK requires software developers to have understanding of the following:

  • C / C++ software development

  • open source software development tools and methods

  • Linux in general (architecture, etc.)

In order to fully benefit of the capabilities of the SDK, one should have fair knowledge of OSS, possibilties it provides, and way of working related to it. This is important in to use existing software that exists in the OSS community. Developers with only Windows background are likely to require a lot of additional training before they can benefit from SDK. Working knowledge of cross-compilation processes is beneficial.

It should be noted that experience in typical embedded software design and implementation is not much use with the SDK and does not help to learn it faster. Instead, it might even be an obstacle. The development toolchain and general procedures are very different from typical embedded software projects (e.g. Symbian).

5. Installation Time

The SDK release package is rather large (150-200 MB) and it may take some time to download it on a typical broadband Internet connection.

Installation of the SDK takes less than half an hour as it is very straightforward. The installation procedure has been verified on SuSE, RedHat and Gentoo Linux distributions.

After base installation the CPU transparency feature needs to be configured and tested. This is a complex procedure and depending on the setup it may take several hours.

6. Total Development Ramp-up Time

Developers with a good knowledge of Linux and software development have a very short learning curve for the SDK, some two weeks. From no prior exposure to cross-development, it takes the typical developer about two weeks to get to know the SDK and its features so that he can start relatively difficult application development work using it.