Documentation:AVR32 Linux Development/Building the AVR32 Linux file system for the STK1000
From AVRFreaks Wiki
Contents |
[edit] Introduction
A prebuilt AVR32 Linux image for the STK1000 can be found in the BSP CD at /BSP-CD/builds/stk1000/avr32-linux-image.img.gz.
The BSP CD includes a reference script that builds an AVR32 Linux file system image. The reference script is available from: /BSP-CD/scripts/build-linux-environment.sh. This script assumes that the appropriate host toolchain, build-essential, autoconf, bison, and flex have been installed. Bison and Flex are required for the make of fbset.
NOTE: Windows does not, by default, support the second extended file system (ext2) nor is the Linux kernel guaranteed to build under Cygwin. As such, the instructions below are only guaranteed to work under Linux.
[edit] Script Dependancies
In order to use the build-linux-environment script, some software needs to be installed on the system first (sudo apt install <package name>):
- build-essential
- bison
- flex
- autoconf
[edit] Running build-linux-environment.sh
build-linux-environment.sh can be run as follows:
- Copy source and script from BSP CD to a local folder.
NOTE: You may need to change folder permissions (see chmod):
mkdir /home/stk1000build cd /home/stk1000build cp -r /bsp-cd/scripts . cp -r /bsp-cd/software .
- Copy and unpack the linux reference file system.
cp /bsp-cd/builds/stk1000/stk1000-linux-image-reference.tar.gz . tar -zxf stk1000-linux-image-reference.tar.gz
- Make a build directory
cd scripts mkdir build
- Edit the reference script (adjust configure settings, select modules and so on)
- Run build-linux-environment.sh
bash ./build-linux-environment.sh ../software ../sd-image-reference build
Once you have built the file system image you can write it to an SD card or mount the filesystem over NFS
[edit] Troubleshooting
- Make sure to have installed all the necessary tools. This includes both tools specific for the AVR32 and general build tools. See AVR32 Tools Installation
- If you want to change settings:
- Edit
build-linux-environment.shto remove or add packages. - Edit configure files included in each package to change settings.
- Edit
