System Settings Configuration Menu
The System Settings Configuration Menu is to provide the user with a facility to configure their platform specific settings into the PetaLinux build framework. By using the Kernel Configuration Menu, it allows the user's platform specific settings to be collated into one single location, prevents errors resulting from misconfiguration and enables storage of the configuration settings.
The diagram below is an example of the System Settings Configuration Menu.
────────────────────────────── System Settings ───────────────────────────────
│ Arrow keys navigate the menu. <Enter> selects submenus --->. Highlighted │
│ letters are hotkeys. Pressing <Y> includes, <N> excludes, <M> modularizes │
│ features. Press <Esc><Esc> to exit, <?> for Help. Legend: [*] built-in │
│ [ ] excluded <M> module < > module capable │
│ ┌──────────────────────────────────────────────────────────────────────────┐ │
│ │ Network Addresses ---> │ │
│ │ Default host name: "uclinux" │ │
│ │ Default root password: "root" │ │
│ │ (CRAMFS) Root filesystem type │ │
│ │ [ ] Copy final image to tftpboot │ │
│ │ [ ] Build u-boot │ │
│ │ Flash Partition Table ---> │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ └──────────────────────────────────────────────────────────────────────────┘ │
│ <Select> < Exit > < Help > │
This section provides a detailed description of the different menu options in the System Settings Configuration Menu.
Starting System Settings Configuration Menu
This menu is integrated into the Kernel Configuration Menu framework. To access it simply run the following commands.
$ cd petalinux-dist
$ make menuconfig
There are other configuration method like ' make xconfig ' and ' make config '. Use the option that is most appropriate for the user.
On the Kernel configuration menu, select the 'Vendor/User Settings' option.
┌─────────────────── Kernel/Library/Defaults Selection ───────────────────
│ Arrow keys navigate the menu. <Enter> selects submenus --->. │
│ Highlighted letters are hotkeys. Pressing <Y> includes, <N> excludes, │
│ <M> modularizes features. Press <Esc><Esc> to exit, <?> for Help. │
│ Legend: [*] built-in [ ] excluded <M> module < > module capable │
│ ┌─────────────────────────────────────────────────────────────────────┐ │
│ │ (linux-2.6.x) Kernel Version │ │
│ │ (None) Libc Version │ │
│ │ [ ] Default all settings (lose changes) │ │
│ │ [ ] Customize Kernel Settings │ │
│ │ [*] Customize Vendor/User Settings (NEW) │ │
│ │ [ ] Update Default Vendor Settings │ │
│ │ │ │
│ └─────────────────────────────────────────────────────────────────────┘ │
│ <Select> < Exit > < Help > │
Save and exit the main menu
Do you wish to save your new kernel configuration?
< (Yes) > < No >
After the main menu is saved, the System Settings Configuration Menu should appear.
Network services is often necessary in modern embedded systems, it is used both in product deployment and during product development stage.
Most embedded system development environment will include network services like TFTP, SSH and TELNET. These services are used for communicating more effectively to the target device for purpose of firmware download, testing and debugging.
In most practices these development environments are often found in static subnets within the corporate network, this is because during development stage spurious errors may cause network failures hence, the development subnet needs to be isolated.
The Network Addresses menu is used to set the Ethernet MAC address, IP address (static or DHCP) and server IP address of the target device within the development subnet.
Descriptions of the menu is as per below listed.
|Obtain IP address automatically||Set if the target system is to use DHCP to obtain network information||Disable|
|Static IP address||The static IP address of the target device||192.168.0.10|
|Server IP address||The IP address of the server providing network services||192.168.0.1|
|Ethernet MAC address||The unique MAC address of the target device||00:0a:35:00:22:03|
Default Host Name
When the target system boot up the Linux kernel, the target system needs to identify itself within the network. This is often done by assigning a host name to the system. This option allows the user to set the host name for the target system. This attribute is only used in the Linux environment and is ignore by U-Boot.
|Default Host Name||The system host name on the target device||uclinux|
Default Root Password
On any Linux installation, a root account is required to administer the operating system. The root user has all privileges within the operating system. Hence, it is required that the root account is setup on initial boot so that it can be used to further configure the operation of the device.
The Default root password option sets the initial root account password. The user is encouraged to change the default root password for final product deployment.
|Default root password||The initial root password on the target device||root|
Root Filesystem Type
The Root Filesystem is an essential component of all UNIX based system including Linux. It contains a predefined directory structure with each directory containing specific files for the operating system. A typical top-level directory listing of a Linux based root file system would be similar to the diagram below.
bin dev home lib misc opt root share tmp var
boot etc initrd lost+found mnt proc sbin tftpboot usr
In an embedded system context the root filesystem is usually implemented on solid state memory devices like FLASH or SDRAM, differing from the conventional PC based system , which uses a hard disk. There are often more than one type of root file systems available.
The root filesystem type used is dependent on the purpose of the embedded system, often a trade off between the filesystem's capabilities and the size. Some root filesystem like JFFS2 works on persistent memory such as FLASH device and others works on non-persistent memory like SDRAM.
The ' Root Filesystem Type ' menu allows the user to choose between the supported default root filesystems within PetaLinux. The following list the supported default filesystem types.
|CRAMFS||A simple file system with minimum feature set. It is compressed and read-only implemented on non-volatile memory devices.|
|JFFS2||A FLASH device base filesystem that provides pesistent storage and wear-leveling facilities.|
|ROMFS||A filesystem intended for block devices that provides pesistent storage.|
Copy final image to tftpboot
In most cases, cross compiled images for the embedded platform is download to the target device via the TFTP network service. The TFTP is a lite weight file transfer program that utilises a directory such as the /tftpboot directory for storing the files to be transferred.
This option allows the user to specify if the built images should be copied into the directory used by the TFTPD server. The user can set the directory used or the default /tftpboot directory is set.
|Copy final image to tftpboot||An option if images should be automatically copied to the tftpboot directory.||not selected|
|tftpboot directory||The directory used by the tftpb server||/tftpboot|
U-Boot is a full featured bootloader program that is included in the PetaLinux distribution. U-Boot is an open source bootloader developed by DENX Software Engineering. For more information on U-Boot in PetaLinux refer to the PetaLinux Bootloader Solution chapter.
This option allows the user to include the U-Boot bootloader for their target platform.
|Build U-Boot||Option to include U-Boot support for the target platform||not selected|
Flash Memory Partition Table
In an embedded system the non-volatile storage device used are often solid-state storage devices such as FLASH chips. These storage devices needs to be setup and configured to be used by the bootloader and operating system kernel. The process of configuring the device involves creating separate contiguous partition of storage blocks, each dedicated to storing a certain types of information.
The basic requirements of an embedded system is for it to be able to store the bootloader binary image, operating system kernel image, file system image and configuration data within the FLASH device. This enable the embedded system to be power off and restarted without loosing system data and be able to defaults back to a known state of operation.
Conventionally, partitioning the FLASH requires the flash partition information to be set within the bootloader and Linux kernel. However, this process is complicated and error prone.
The ' Flash Memory Partition Table ' menu allows the user to configure the FLASH device with the partitions that are needed to support their product. This facility captures the partitioning information and propagates them to the U-Boot bootloader and the Linux kernel.
The following list the number of partitions supported and the descriptions of each field.
|Partition Number||Default Name||Default Size||Purpose|
|1||boot||0x40000||This partition is used to store the U-Boot binary image. It is a mandatory partition when Build U-Boot option is selected. The default size is 256K. Setting this value lower may result in non-bootable system. However, this value can be changed provided the user is aware of the implication.|
|2||bootenv||0x40000||The BOOTENV partition is used to store the U-Boot environment variables and configurations. This is a protected readonly partition. It is a mandatory partition when Build U-Boot option is selected. The default size is 256K. Setting this value lower may result in non-bootable system. However, this value can be changed provided the user is aware of the implication.|
|3||config||0x40000||This partition is used by the flatfsd daemon within Linux. Refer to the flatfsd man pages for more information. The default size is 256K. Setting this value lower may result in non-bootable system. However, this value can be changed provided the user is aware of the implication.|
|4||image||0x400000||The IMAGE partition is used to store the Linux kernel and ramdisk image. This partition is the default kernel partition used by the auto-boot framework . It is a mandatory partition when Build U-Boot option is selected.|
|5||spare||0x0||This partition contains the remaining unused space left on the FLASH device. The SIZE parameter is set to '0' to tell the system that the size of this partition is the remaining space left on the FLASH device. This partition is not mandatory, but allow the user to allocate the remaining space to a partition that can be accessed if required by the bootloader and Linux kernel.|
|6||""||0x0||This is a blank partition that can be use to add more partitions into the FLASH device.|
|7 to 10||""||0x0||These partitins are hidden until it is required. Each successive partition will be visiable when the last blank partition is set.|
Auto-Boot FLASH Partitions
Booting of an embedded system often requires no manual intervention, this is to allow the system to get back to its known state after a power-on reset without needing external assistance. This facility is called "auto-boot". PetaLinux provides this inbuilt facility to automatically boot the target system after power-on reset.
The "auto-boot" facility requires a number of known partitions to exist within the FLASH device. These partitions enables U-Boot and the Linux kernel to identify the location of the required information for automatically booting the system.
The auto-boot partitions are as per listed. There is no restriction on the order of the auto-boot partitions within the FLASH device. However, they must all exist within the FLASH partition table if U-Boot is enabled.
- ' boot '
- ' bootenv '
- ' image '
The description of each partition is as per table XXX.
Customising the Partitions
The FLASH partition on the on-board FLASH device can be configured via the Vendors / Users Settings menu.
Partitions can be added, removed or changed as per required.
However, there are a few issues that the user needs to be aware of:
- It is the user's responsibility to ensure that the partition size is specified such that it is within the block boundary of the FLASH device.
- Some FLASH devices has asymatric sector size, meaning some sectors are bigger than then other. The user is responsible to ensure that the size specified is within the sector boundary.
- Only a maximum number of 10 partitions are supported.
- The partition size is specified in hexadecimal notation.
- If Build U-Boot option is enabled, the ' boot ', ' bootenv ' and ' image ' partitions must exist.
- Partition size of zero '0' can only be used in the last partition defined. This instruct the build process to assign the remaining FLASH sectors to this partition.