hc
2024-11-01 2f529f9b558ca1c1bd74be7437a84e4711743404
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
This is the RTnet driver for the MPC 52xx FEC for the Linux kernel
2.4.25 (DENX linuxppc_2_4_devel tree). Unfortunately, the kernel
requires a small patch to permit kernel modules accessing BESTCOMM
functions (the FEC driver is not supported as module). The patch
linuxppc_2_4_devel-fec.patch is available in this directory.
 
Apply the FEC module patch mentioned above and then prepare and
build the Linux kernel and Xenomai as usual:
 
  $ export CROSS_COMPILE=ppc_6xx-
  $ export QUILT_PATCHES=quilt_patches
  $ export DESTDIR=/opt/eldk/ppc_6xx
 
  $ cd linuxppc_2_4_devel
  $ export KERNELDIR=$PWD
  $ patch -p1 < <path>/linuxppc_2_4_devel-fec.patch
  $ make TQM5200_config
 
  $ cd ../xenomai
  $ export XENODIR=$PWD
  $ ./scripts/prepare-kernel.sh --linux=../linuxppc_2_4_devel --arch=ppc
 
  $ cd $KERNELDIR
  $ make menuconfig
    ... check loadable module support ...
    ... exit and save default configuration ...
  $ make dep
  $ make uImage
  $ cp -pv arch/ppc/boot/images/uImage /tftpboot
 
  $ $XENODIR
  $ ./configure --host=ppc-linux --prefix=/usr/xenomai
  $ make
  $ make install
 
This is the build process for the TQM5200-Board using the ELDK 3.1.1.
 
The file rt_mpc52xx_fec.h contains a few configuration option.
Please customize them according to your needs (according to your
standard Linux kernel configuration):
 
  $ cat rt_mpc52xx_fec.h
  ...
  /* Define board specific options */
  #define CONFIG_RTNET_USE_MDIO
  #define CONFIG_RTNET_FEC_GENERIC_PHY
  #define CONFIG_RTNET_FEC_LXT971
  #undef CONFIG_RTNET_FEC_DP83847
 
Then configure and cross compile RTnet as shown:
 
  $ ./configure --host=ppc-linux --with-linux=$KERNELDIR \
    --with-rtext-config=$DESTDIR/usr/xenomai/bin/xeno-config \
    --disable-e1000 --disable-8139  --disable-8139too \
    --enable-mpc52xx-fec --enable-eepro100 \
    --prefix=/usr/xenomai --enable-proxy
  $ make
  $ make install
 
Note that RTnet gets installed into $DESTDIR/usr/xenomai, including
the kernel modules.
 
Also be aware that the MPC52xx has only one on-chip ethernet port.
Driver development using a ram-disk based system might be cumbersome.
It is convenient to use a supported PCI ethernet card, e.g. an
EEPRO100, and to mount the root file-system via NFS.