Installing a Real-Time Linux Kernel for Dummies

Installing a Real-Time Linux Kernel for Dummies

Real-Time Linux for Dummies Jeroen de Best, Roel Merry DCT 2008.103 Eindhoven University of Technology Department of Mechanical Engineering Control Systems Technology group P.O. Box 513, WH -1.126 5600 MB Eindhoven, the Netherlands Phone: +31 40 247 42 27 Fax: +31 40 246 14 18 Email: [email protected], [email protected] Website: http://www.dct.tue.nl Eindhoven, January 5, 2009 Contents 1 Introduction 1 2 Installing a Linux distribution 3 2.1 Ubuntu 7.10 . .3 2.2 Mandriva 2008 ONE . .6 2.3 Knoppix 3.9 . 10 3 Installing a real-time kernel 17 3.1 Automatic (Ubuntu only) . 17 3.1.1 CPU Scaling Settings . 17 3.2 Manually . 18 3.2.1 Startup/shutdown problems . 25 4 EtherCAT for Unix 31 4.1 Build Sources . 38 4.1.1 Alternative timer in the EtherCAT Target . 40 5 TUeDACs 43 5.1 Download software . 43 5.2 Configure and build software . 44 5.3 Test program . 45 6 Miscellaneous 47 6.1 Installing ps2 and ps4 printers . 47 6.1.1 In Ubuntu 7.10 . 47 6.1.2 In Mandriva 2008 ONE . 47 6.2 Configure the internet connection . 48 6.3 Installing Matlab2007b for Unix . 49 6.4 Installing JAVA . 50 6.5 Installing SmartSVN . 50 6.6 Ubuntu 7.10, Gutsy Gibbon freezes every 10 minutes for approximately 10 sec 51 6.7 Installing Syntek Semicon DC1125 Driver . 52 Bibliography 55 A Menu.lst HP desktop computer DCT lab WH -1.13 57 i ii CONTENTS Chapter 1 Introduction This document describes the steps needed in order to obtain a real-time operating system based on a Linux distribution. The installation of three distributions will be discussed, being Ubuntu 7.10, Mandriva 2008 ONE and Knoppix 3.0. Furthermore, it discusses the installation of programs like Matlab and several useful configuration settings are given. The document is written for use in the DCT group of the Mechanical Engineering depart- ment, Eindhoven University of Technology. Some parts are specific for the working environ- ment in mind and are not generally applicable. The installation of the Linux distributions is described in Chapter 2. Two ways of in- stalling a real-time kernel, the automatic way in Ubuntu and a more general way, are given in Chapter 3. How to incorporate EtherCAT or TUeDACs with your real-time Linux is ex- plained in Chapter 4 and Chapter 5 respectively. Finally, the settings and installation of printers, internet, Matlab, Java, SmartSVN and more is contained in Chapter 6. 1 2 CHAPTER 1. INTRODUCTION Chapter 2 Installing a Linux distribution This chapter describes the installation of Ubuntu 7.10 in Section 2.1, Mandriva 2008 ONE in Section 2.2 and Knoppix 3.9 in 2.3 respectively. 2.1 Ubuntu 7.10 This section describes how to install Ubuntu 7.10, Gutsy Gibbon. Therefore, go to the website of Ubuntu [13], and download the distribution. This should be an image file ubuntu-7.10- desktop-i386.iso. Burn the image to a CD and reboot the system. Make sure that it boots from CD. This option can be set in your BIOS settings. During the booting of your system choose `Start or install Ubuntu' which is the default option. After booting the desktop shown in Fig. 2.1 will appear. Figure 2.1: Startup desktop of Ubuntu 7.10. To install Ubuntu onto your harddisk, double-click the Install icon from the desktop. At the first step choose your language (English) and select `Forward'. At the second step choose 3 4 CHAPTER 2. INSTALLING A LINUX DISTRIBUTION your time-zone. The time-zones are sorted by continent. Choose Europe, Amsterdam and select `Forward'. At the third step choose your keyboard settings. You can try the settings in the lower area of the setup screen. Default is U.S. English, U.S. English. Select `Forward'. At the fourth step you are asked to prepare the disks. Choose for the manual option here and select `Forward'. To determine which disks are your windows disks (C:n and D:n) make use of the following programs which can be started by clicking from the top menubar • Places ! Computer • System ! Administration ! System monitor For this case the following holds: • /dev/sda5, which is the same as /media/DATA is the data disk under windows (D:n), see Fig. 2.2. Figure 2.2: Partition /dev/sda5. • /dev/sda2, which is the same as /media/System is the windows disk under windows (C:n), see Fig. 2.3. • /dev/sda1, which is the same as /media/RECOVERY is the recovery disk under windows (not present on all computers). Consecutively, select each partition, other than the windows partitions that should be kept, and delete those partitions by clicking `Delete partition'. In this case that would be the /dev/sda6 and /dev/sda7, see also Fig. 2.4. After deleting select `free space' and click `New partition'. First make a logical partition of 2048 megabytes which is located at the beginning. Use this partition as a swap partition. This can be chosen in the `Use as' drop down menu. See also Fig. 2.5 for the settings. Select `Ok'. 2.1. UBUNTU 7.10 5 Figure 2.3: Partition /dev/sda2. Figure 2.4: After partitions removed. Secondly, make a logical partition of the remaining size which is located also at the beginning. Use this partition as an ext3 partition. This can be chosen in the `Use as' drop down menu. The mount point should be `/'. See also Fig. 2.6 for the settings. Select `Ok'. Now, all disk space is partitioned. Turn on the `Format?' option for the ext3 partition and select `Forward'. At step number five, do not Migrate Documents and Settings and select `Forward'. At the sixth step fill in the form about who you are. Make sure that the name of your computer coincides with the TUE name of the computer, in order to prevent 6 CHAPTER 2. INSTALLING A LINUX DISTRIBUTION Figure 2.5: Settings swap disk partition. Figure 2.6: Settings ext3 disk partition. network problems. Select `Forward'. At the final step make sure that there is no internet connection and click `Install' to install Ubuntu 7.10 to your harddisk. This may take a while, but is approximately 45 minutes depending on the specifications of your computer. During the installation you will get a message about security updates. Simply accept this message by clicking `Ok'. After the installation is completed a screen will pop-up in which you are asked to restart your computer to use the harddisk installed Ubuntu. Therefore click `Restart now'. The system will reboot now. During the restart a menu called GRUB will appear in which you can chose which operating system you would like to boot. In this case select `Ubuntu 7.10, kernel 2.6.22-14-generic', which is the first default option. Use your username and password to log on to Ubuntu. After the startup a similar desktop as the previous startup should appear, see Fig. 2.1. 2.2 Mandriva 2008 ONE The installation of the Mandriva distribution, in this case Mandriva 2008 ONE, will be de- scribed in this section. To download the .ISO file of the live CD go to the website of Man- driva [7]. Burn the image to a CD and boot the system from this CD. On boot you are asked to choose a language: `English (American)' and your country: `Belgium'. Then `Ac- cept' the license agreement and choose `Next'. Select as keyboard layout the `US keyboard (international)', confirm with `Next'. Choose as timezone `Amsterdam' and `Next'. Choose the correct time, followed by `Next'. If the screen stays black, move the mouse. Choose `No 3D desktop effects' and `Next'. Now the system will boot. After booting, the desktop of Fig. 2.7 will appear. The installation of Mandriva on your harddisk can be started by clicking the `Live Install' icon. The Mandriva Live installation wizard, shown in Fig. 2.8, will appear. Choose `Next' to start the installation procedure. 2.2. MANDRIVA 2008 ONE 7 Figure 2.7: Startup desktop of Mandriva 2008 ONE. Figure 2.8: Mandriva Live installation wizard. Since most systems already have a Windows installation, choose `Custom disk partitioning' in the installation options step, as shown in Fig. 2.9. With this option you can resize, delete and create new partitions according to your own needs. You will be asked to backup your data first before proceeding. Choose `Exit' if you want to backup first and do the installation later, otherwise `Continue'. Next the present disk partitioning with sizes and types of the various partitions are shown. See for an example Fig. 2.10, which has two Windows partitions, one ext3 and one swap parti- tion. Select the existing ext3 partition and delete the partition by clicking the button `Delete'. Delete also the existing swap partition. The drive partitioning should now contain only the Windows partitions, as shown in Fig. 2.11. If the system has more than one physical harddisk 8 CHAPTER 2. INSTALLING A LINUX DISTRIBUTION Figure 2.9: Mandriva Live installation options. drive, the different harddisk drives will appear as separate tabs in the disk partitioning screen. Figure 2.10: Example initial disk partitioning. Figure 2.11: Deleted ext3 and swap partitions. The next step is to create a new swap partition and ext3 partition in the free space of the harddisk drive. Start making the swap partition by selecting the free space in the partitioning table and click `Create'.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    63 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us