Installation

Installing GNU tools

Linux/M32R requires GNU tools modified for Linux/M32R. You can download them from here.

Installing with binary package

Programs in the binary package are configured to use /usr/local/m32r-linux-3.2 as the default path. So please unpack the binary package and put its contents in /usr/local/m32r-linux-3.2 as the following.

 cd /usr/local
 bzip2 -cd m32r-linux.20040409-3.2.tar.bz2 | tar xf -
 ln -s m32r-linux.20040409-3.2 m32r-linux-3.2
After that, please add /usr/local/m32r-linux-3.2/bin to the search path.
 set path=($path /usr/local/m32r-linux-3.2/bin)

Installing with source package

Please unpack both source and binary packages as the following. (Header files and libraries in the binary package are necessary.)

 mkdir build_m32r_linux
 cd build_m32r_linux
 bzip2 -cd ../gcc-3.2_src_20040409.tar.bz2 | tar xf -
 bzip2 -cd ../binutils-2.13_src_20040409.tar.bz2 | tar xf -
 bzip2 -cd ../m32r-linux.20040409-3.2.tar.bz2 | tar xf -

At first you have to build binutils. We use /usr/local/m32r-linux-3.2 as prefix in the following example.

 cd binutils
 mkdir build
 cd build
 ../src/configure --target=m32r-linux --prefix=/usr/local/m32r-linux-3.2
 make all
 make install
 cd ../..
Now you can build gcc.
 cd gcc-3.2
 mkdir build
 cd build
 ../src/configure --target=m32r-linux --prefix=/usr/local/m32r-linux-3.2 \
   --with-headers=../../m32r-linux.20040409-3.2/m32r-linux/include \
   --with-libs=../../m32r-linux.20040409-3.2/m32r-linux/lib \
   --enable-languages=c,c++
 make all
 make install
When you finished, please add /usr/local/m32r-linux-3.2/bin to the search path.

Installing Linux kernel

M32R GNU tools are necessary to build Linux kernel. So please install GNU tools before trying to build Linux kernel.

The build procedure itself is broken into the following three steps.

(1) Copy config file
Please copy the config file to the root directory of Linux kernel source files as ".config".

cp arch/m32r/mappi2/defconfig.mappi2-vdec2 .config
Each platform has its own config file. Please use the appropreate config file.

File namePlatform
m32700ut/defconfig uT-Engine
mappi2/defconfig.mappi2-vdec2 Mappi-II(M3A-ZA36)

(2) Run make xconfig
Please run make xconfig in order to generate Makefile from the config file.

make ARCH=m32r xconfig                             # 2.4 kernel
make ARCH=m32r CROSS_COMPILE=m32r-linux- xconfig   # 2.6 kernel
Change confgurations if necessary and then select "Save and Exit" button.

(3) Run make
Build vmlinux by make.

make ARCH=m32r                                     # 2.4 kernel
make ARCH=m32r CROSS_COMPILE=m32r-linux-           # 2.6 kernel

Installing user land

Linux/M32R system require that the user land is installed to the host machine and is available through NFS. Please install the user land as the following. You have to use the super user account in order to keep file owners and permissions.
 su
 mkdir /export
 cd /export
 bzip2 -cd ~/rootfs2.4_small_20040205.tar.bz2 | tar xf -
The user land includes "hosts" file. Please modify it for your environment. "nfsserver" entry stands for your host machine. "mappi001" entry stands for your target machine.
 cd rootfs2.4_small/etc/
 vi hosts
Please add the target machine's entry to "hosts" file of the host machine.
 vi /etc/hosts
Please add the following line to /etc/exports of the host machine in order to enable NFS access from the target machine.
 /export *(rw,no_root_squash)
Please restart NFS after you modify /etc/exports.
 /etc/init.d/nfs restart

->Run Linux

[Home]


Last modified: 2004/05/06 webmaster@linux-m32r.org