One can configure a target in scratchbox with either the sb-menu script, or the sb-conf script. The sb-conf script is a command-line tool. The sb-conf script uses "VT-100" terminal graphics as a UI and it may be a bit more confusing to use, or not, depending on one's approach.
sb-conf
- TBD
sb-menu
(This section re-uses images that can be found on the page http://www.scratchbox.org/documentation/user/scratchbox-1.0/html/installdoc.html and there is some extra explanatory text.)
- Start sb-menu:
[sbox-HOST: ~] > sb-menu
- You will enter the main menu:
http://www.scratchbox.org/documentation/user/scratchbox-1.0/html/installdoc_menu_main.png
Select the Setup option. If the screen appears as the one above, hit the down arrow key and then hit the <enter> or <return> key to select <OK>.
- First it will ask if you want to create a new target or change the configuration of a previously created target:
http://www.scratchbox.org/documentation/user/scratchbox-1.0/html/installdoc_menu_setup.png
Select the <NEW> option.
- Since we're creating a new target we need to specify a name:
http://www.scratchbox.org/documentation/user/scratchbox-1.0/html/installdoc_menu_name.png We use "MYTARGET" as the target name in this example.
- Next, the setup will ask which toolchain should be used to compile programs:
http://www.scratchbox.org/documentation/user/scratchbox-1.0/html/installdoc_menu_compiler.png
We selected gcc 3.3 that creates binaries for the ARM architecture and links them against glibc 2.3. Pick one and hit <OK>.
- We can select optional development tools:
http://www.scratchbox.org/documentation/user/scratchbox-1.0/html/installdoc_menu_devkits.png
At this point, if we do not need any, we can just select the <DONE> option to proceed.
If we do want to include some of these, one does so by moving the cursor down to the desired package with the arrow key. If one then hits the <return> or <enter> key, the selected package is added to the list of those to install and it disappears from this screen. In other words, when something has been successfully chosen, it disappears from the list. This can be disconcerting, but it works. For example, if one wants to install all the packages, pick them one by one until the list of available packages is empty. Then, when one selects <DONE>, they will be installed.
- After development kit selection the CPU-transparency method is chosen:
http://www.scratchbox.org/documentation/user/scratchbox-1.0/html/installdoc_menu_transparency.png
The QEMU emulator is sufficient for our example target, so select 'qemu-arm'. Pick one and hit <OK>.
- Now the setup is done, but sb-menu asks: "Do you wish to extract a rootstrap on the target?" Answer "No".
- sb-menu will ask: "Do you wish to install files to the target?" Answer "Yes".
- By default, the "C-library", "/etc", "Devkits", and "fakeroot" choices are checked and the "gdb" and "strace" options are unchecked. This seems to work fine.
If you do want to answer "Yes" to "Do you wish to extract a rootstrap on the target?", you will be taken to another menu. If you want to select or de-select one of the items in the list in that menu, do so by moving the cursor to the item and hitting the <space> key. Hit <enter> or <return> key to proceed.
- Everything is now ready and we can activate the target by answering yes to the last question.
Troubleshooting
After coming out the sb-menu script, you may see:
Hangup Shell restarting... SBOX_DPKG_INST_ARCH not set. $
I had selected only the debian-sarge package. It seemed that dpkg was in all 3 of the available debian packages. Selecting debian-sarge, debian-lenny and debian-etch did not help. Then I saw that I had left off a few of the extra installs. I added gdb and strace to the list. I had also switched the compiler from arm-gcc4.1-uclibc20061004 to cs2005q3.2-glibc2.5-arm, since I recalled having problems building things when I used uclib.