This chapter is designed to get you up and running on the ACCESS Linux Platform. These instructions assume that you are installing on a Linux machine running Ubuntu version 6.10 that doesn't already contain a version of the ACCESS Linux Platform. If you install the SDK on Ubuntu version 7.10, the installation procedure might be slightly different.
NOTE: Although Ubuntu 6.10 is not listed on Ubuntu's main download page (http://www.ubuntu.com/getubuntu/download), it can be found at http://releases.ubuntu.com/edgy/ (if you are in the United States) or at http://www.ubuntu.com/getubuntu/downloadmirrors.
This chapter describes how to install and configure Scratchbox and the ACCESS Linux Platform SDK. Scratchbox provides a form of host simulation so that the cross compiler can be called simply as "gcc". This greatly simplifies your environment as your configuration appears to be a native configuration rather than a cross configuration.
This chapter contains the following sections:
- "Prerequisites"
- "Installing the Development Environment"
- "Configuring Scratchbox"
- "Uninstalling the Development Environment"
Prerequisites
You can install ACCESS Linux Platform on Ubuntu 6.10 or 7.10.
NOTE: See Chapter 3, "Scratchbox Build Environment," for detailed documentation on Scratchbox and the ACCESS Linux Platform build environment. We highly recommend that you review and understand at least the section "About "chrooted" Environments" before continuing with the setup described in this chapter. Further documentation can also be found in the
ReadMe files in the SDK.
Make sure that both the main and the universe sections of the repository are enabled:
- From the Ubuntu menu, choose System > Administration > Software Sources.
- Make sure that both of the following options are enabled on the Ubuntu 6.10 tab:
Installing the Development Environment
This section describes how to install and configure the SDK and Scratchbox, which is the development environment used for developing ACCESS Linux Platform and ACCESS Linux Platform applications.
How you install depends upon how the packages were delivered to you. If you have a CD that has a directory named binary-i386 at its root, begin with "Installation from CD-ROM", below. If not, you should have a single file named sdk.tgz (whether or not it is delivered on a CD-ROM is not important). In this case you'll need to start with the instructions under "Installation from Files."
NOTE: If you have an existing installation, ACCESS recommends that you first remove that installation before proceeding. Also, if you encounter any problems during or after installation on top of an existing installation, try removing the existing installation and reinstalling. For instructions on backing up your work and removing an existing installation, see "Uninstalling the Development Environment."
Installation from CD-ROM
To install directly from the CD, complete the following steps.
- Insert the CD and verify that it contains
Packages.gzas well as the following folders: - From the Ubuntu menu, choose System > Administration > Synaptic Package Manager and enter your password.
- In the Synaptic Package Manager menu, choose Edit > Add CD-ROM.
This adds the packages that are listed on the CD to the list of packages available for installation.
- Verify that the
alp-sdkpackage is available in Synaptic Package Manager, then proceed to Step 7f in the next section, "Installation from Files."
Installation from Files
If the files are supplied as a single tar file (typically named sdk.tgz), you can install from a local directory.
- Double-click the
sdk.tgzfile to uncompress it. - Click the
SDKfolder, then click the Extract button. - Navigate to the to
/tmpin the Extract in folder field and verify that the All files option is selected. - Click the Extract button.
- Close the Extract window.
- Check the contents of the
/tmpdirectory to verify that it contains theSDKfolder:
ls /tmp
- Now it is time to install the packages. In general, you should install the alp-sdk package to get all of the needed packages at once. If you prefer, you can install the packages individually.
- From the Ubuntu menu, choose System > Administration > Synaptic Package Manager and enter your password.
- From the Synaptic Package Manager, choose Settings > Repositories.
- Click the Third Party tab, then click the Add button.
- Enter the path name to the directory where the
SDKdirectory is located, then click Add Source. Note that you must enter the name exactly as shown below: - Close the Software Sources dialog, and then click the Synaptic Package Manager Reload button.
- Right-click the alp-sdk package and choose Mark for Installation from the menu.
This marks multiple packages for installation in addition to the alp-sdk package. You might see a warning that the software cannot be authenticated. You can ignore the warning and click the Mark button.
- Click the Apply button.
This displays a dialog that summarizes the list of packages to be installed.
- Review the list of packages, then click the Apply button at the bottom of the dialog.
- Close the Changes Applied dialog and then close Synaptic Package Manager.
- If you want to be able to access the network from within the ACCESS Linux Platform Simulator, choose the
bridge-utilspackage in Synaptic Package Manager and install it the same way you installed the alp-sdk package.Alternatively, you can install it with the following line command:
sudo apt-get install bridge-utils
Note that if you do not install it at this time and try to start the Simulator with the Create host network bridge option enabled (or using the --net option), an error message displays, telling you to install this package. You can wait to install it until you need it, if you prefer; it is not needed for Simulator operations that do not involve the network.
NOTE: You can also install the ACCESS Linux Platform package from the command line. Verify that your sources.list file contains the location of the packages you downloaded, then enter the following command:
sudo apt-get install alp-sdk
If
apt-get asks to "Install these packages without verification [y/N]?", enter y.
Configuring Scratchbox
NOTE: The following procedure assumes that Scratchbox is installed at
/scratchbox (or that a symbolic link exists so that it appears that Scratchbox is installed there).
- Add yourself as a Scratchbox user with this command (note that you must use back-quotes, these are not single quotes):
sudo /scratchbox/sbin/sbox_adduser `whoami` yes
If prompted, press Enter at each prompt to accept the default answer.
- Either log out and then log back in, or use the
sucommand as follows. This allows the group changes (made bysbox_adduser) to take effect:
su `whoami`
- Run the
groupscommand to confirm that you are now in the "sbox" group. - Test your install by logging in to Scratchbox by simply typing
scratchbox(which links to/scratchbox/login):
scratchbox
NOTE: Scratchbox will tell you that you have no targets defined. This is not an error; you'll define them in the next step.
- If you see the Scratchbox login prompt (the prompt looks something like:
[sbox-alp-simulator: ~] >), proceed to "Configuring Your Scratchbox Target".If Scratchbox throws an error when you log in, such as:
ERROR: Scratchbox is not properly set up!Check to see if the Scratchbox process is running. Do this by issuing the following commands to stop and re-start Scratchbox:
sudo /scratchbox/sbin/sbox_ctl stop
sudo /scratchbox/sbin/sbox_ctl start
If all is working correctly, the following should be displayed:
Starting Scratchbox: binfmt_misc, mount.
Now you should be able to log in by simply typing:
scratchbox
Configuring Your Scratchbox Target
Once Scratchbox has been configured, you need to set up one or more Scratchbox targets.
Configuring a Simulator Target
- All of the commands used to configure a target need to be run from within Scratchbox. If you aren't already logged in to Scratchbox, do so with:
- Set up the target by running the following command:
sb-conf setup alp-simulator -c i686-linux-gnu
If the command produces the message "sb-conf: No current target", ignore it; the next command selects the simulator target.
sb-conf select alp-simulator
At this point, the screen clears as the shell restarts.
sb-conf show
It should produce the following:
Compiler: i686-linux-gnu Devkits: none CPU-transparency: none
ls /scratchbox/ALP/rootstrap/alp-x86-dbg-*
This rootstrap file is used to load the target with prebuilt binaries. Note that because each release of the SDK contains new binaries, the rootstrap name is not static. You need the exact name of this rootstrap file for the next step.
- Enter the following command to "rootstrap" the target, substituting the actual name of the rootstrap file for the filename (here,
alp-x86-dbg-GCC4-main-123456.tar.gz):
sb-conf rootstrap /scratchbox/ALP/rootstrap/\
alp-x86-dbg-GCC4-main-123456.tar.gz
You should see the following message:
Unpacking rootstrap...
The scratchbox environment is now configured, and you can proceed to "Testing the Installation".
If you encountered problems during the installation process, you can find additional information in Chapter 4, "Troubleshooting."
Uninstalling the Development Environment
In the event you need to uninstall the ACCESS Linux Platform Development Suite, these instructions take you through the procedure.
Back Up Your Work
Uninstallation requires you to remove the entire /scratchbox directory. Before performing the appropriate uninstallation procedure, back up any work inside Scratchbox that you want to save. If you are using a source control system such as Perforce, be sure to confirm that you do not have any open (that is, pending or unsubmitted) edits.
Copy or move /scratchbox/users/$USER to some place outside of the /scratchbox directory to keep it safe.
Uninstall
- Exit all of your Scratchbox sessions. (Type
exitto exit a Scratchbox session.) - Stop the Scratchbox process with:
- You can either remove the packages using the GUI or from the command line:
- Start the Synaptic Package Manager with:
- Select all of the packages whose names begin with
alp-. Note that you can quickly isolate the relevant packages by performing a search from within the Synaptic Package Manager. Then you can select all of the ones whose names begin withalp-. - From the Package menu, select Mark for Complete Removal.
- Select all of the packages whose names begin with
scratchbox-. - From the Package menu, select Mark for Complete Removal.
- From the Edit menu, select Apply Marked Changes. In the dialog that is displayed confirming the operation, click Apply.
- Quit the Synaptic Package Manager.
If you prefer to use the command line, remove the packages with the following commands:
sudo dpkg --get-selections | grep 'alp-' \ # just to see what will be removed
sudo dpkg --purge `dpkg --get-selections | \ grep 'alp-' | cut -f1`
sudo dpkg --get-selections | \ grep 'scratchbox-' \ # just to see what will be removed
sudo dpkg --purge `dpkg --get-selections | \ grep 'scratchbox-' | cut -f1`
- If the
/tmp/SDKdirectory has not been removed by the uninstall procedure, remove it by entering the following command in a shell window:
sudo rm -fr /tmp/SDK
sudo rm -fr /scratchbox/*
- Navigate to your home directory and remove the hidden
.alp-devdirectory with the following command:
rm -rf .alp-dev
The SDK is completely uninstalled and the system is ready for reinstallation.











Nowhere in the painful download process I was warned that this software was working only in Ubuntu Edgy. It\'s only after going through the registration process and downloading/extracted 500+mb that I saw \"edgy\" in the package name, this *really* sucks.