1 uclinux course day 2 of 5 using configuration tools and the tool chain

Download 1 uClinux course Day 2 of 5 Using configuration tools and the tool chain

If you can't read please download the document

Upload: gillian-barber

Post on 13-Dec-2015

212 views

Category:

Documents


0 download

TRANSCRIPT

  • Slide 1

1 uClinux course Day 2 of 5 Using configuration tools and the tool chain Slide 2 2 Author: D L Johnson Configuration tools u Linux/Unix has a key advantage over windows due to its modularity kernel or application components can be added or removed easily u This makes it very suitable to embedded environments where many typical PC peripherals such as keyboards and screens are not present u The uClinux configuration script allows kernel components and applications to be added and removed u The uClinux environment uses two different menu configuration environments +For X windows environments a graphical menu system make xconfig +For terminal environments a text based menu system Make menuconfig Slide 3 3 Author: D L Johnson Configuration tools Select Target Platform Selection u type make menuconfig from a terminal window +Use, and to navigate through menus and to select check boxes Select (..) Vendor/Product To change the host processor you are compiling for. We will use (GDB/ARMulator) for the simulator and (Atmel/AT91) for the real hardware later in the course Slide 4 4 Author: D L Johnson Configuration tools Selecting Kernel version u linux-2.4.x or linux-2.0.x depending on the size/feature set you need Selecting Libc version u glibc is the original unadapted libc, it is the largest library u uC-libc is the original library for uclinux, APIs not always standard some routines not present u uClibc fixes problems with original uC-libc although it is a little larger than uC-libc u If you want to change Kernel settings select the check box [X] Customise Kernel Settings (NEW) with [X] Customise Kernel Settings (NEW) with u If you want to add or remove user applications select the check box [X] Customise Vendor/User Settings with [X] Customise Vendor/User Settings with u When you are finished highlight Exit and press u When you are finished highlight Exit and press Slide 5 5 Author: D L Johnson Configurations tools You are then brought back to this screen and you ask yourself huh, I chose to change Kernel settings and all I can do is or go back to Target Platform Selection or go back to Target Platform Selection Against all logic Select Against all logic Select Whizz, pop . Slide 6 6 Author: D L Johnson Configurations tools Linux Kernel Configuration screen Linux Kernel Configuration screen u Some important options to set + + to set up RAM and FLASH addresses + + to activate/deactivate networking + + to choose networking protocols u When you are finished highlight Exit and press u When you are finished highlight Exit and press Slide 7 7 Author: D L Johnson Configuration tools u Select to save new kernel configuration Slide 8 8 Author: D L Johnson Configuration tools Customize user settings for uClinux Customize user settings for uClinux u Some important options to set + + contains all the common applications such as gunzip, grep, ln, chown + + contains common network apps such as dhcp, ftp, ifconfig u When you are finished highlight Exit and press u When you are finished highlight Exit and press Slide 9 9 Author: D L Johnson Configuration tools u When you are finished configuring uClinux type the following commands to build the kernel and the userland +make dep&& make u If you only want to build the userland type +make user_only +Make romfs +make image u Go and make coffee or take a jog.. This can take a few minutes Slide 10 10 Author: D L Johnson Adding User applications u Files to edit: u user/Makefile u Add a line to the file like u u dir_$(CONFIG_USER_FOO_FOO) += foo u u This adds the directory 'foo' to the list of directories to be built. I added u mine in alphabetical order. The order doesn't seem to matter. u u config/Configure.help u This file contains the text which is presented on request during the u config. u Add a block like u u CONFIG_USER_FOO_FOO u This program does fooey things to your bars. u u The text must be indented two spaces, and there must be no empty lines. Lines u should be