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.2After 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 installWhen you finished, please add /usr/local/m32r-linux-3.2/bin to the search path.
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 .configEach platform has its own config file. Please use the appropreate config file.
File name | Platform |
---|---|
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 kernelChange 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
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 hostsPlease add the target machine's entry to "hosts" file of the host machine.
vi /etc/hostsPlease 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