ModelNetworking/setup.sh corrupts routing table

Bug #1039299 reported by Akira Tsukamoto
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro Fast Models
New
Undecided
Unassigned

Bug Description

I attached a patch to fix following issues for the
  FastModelsPortfolio_7.1/ModelNetworking/setup.sh
which is included in
  FE000-KT-00002-r7p1-47rel0.tgz
This patch is to the Fast Models product.

This patch is generic for Linux distribution and I have tested on Ubuntu 12.04 and Fedora 7.

Details of the patch:
(1)
This patch fixes corrupting routing table and arp cache with the current script.
The differences are that before applying this patch, typing 'route' will hang
and time-out but after this patch will be displaying routing table right away.
This means you can do all bellow on the same PC at the same time:
  a) Export NFS rootfs on the host PC
  b) Run the FastModels on the host PC and Nano LEB mounting nfs rootfs
  c) Still the host PC could have internet access, for example, web browsing.
This fix includes inserting sleep for device to go down and waiting for the device go up and routing table to be updated.
Also kills only dhclient for the bridge instead of restarting entire network.
(2)
Fixed hard coded detecting brctl tool installation at /usr/sbin/brctl and made it independent for distributions. The brctl is one of the command of bridge-utils package but some install brctl to /user/sbin/brctl but others install it to /sbin/brctl. This patches makes it detecting brctl installation for both cases.
(3)
Fixed changing tun device permission when udev rules is specified in the distribution. After applying this patch the script will modifies only when the udev rules files exist and updates only the permission string 'MODE=”0666”'.
(4)
Updated obsolete messages for how to setup init script. Rewrite the description for both RedHat/Fedora users and Ubuntu/Debian users.

Revision history for this message
Akira Tsukamoto (akira-tsukamoto) wrote :
Revision history for this message
Ryan Harkin (ryanharkin) wrote :

I had trouble finding Akira's notes on setting up a network bridge, so now I've found it, I want to summarise it here:

Install bridge-utils
    $sudo apt-get install bridge-utils

Before setting-up tap bridge network for the FastModels, apply the attached "ModelNetworking_setup_sh_Linaro_1.patch"
    $cd FastModelsPortfolio_7.1/ModelNetworking
    $patch -p1 < ModelNetworking_setup_sh_Linaro_1.patch

Follow the instruction from chapter 2.13 of ARM's FastModel user guide:
    http://infocenter.arm.com/help/topic/com.arm.doc.dui0370n/DUI0370N_fast_model_ug.pdf
    $./add_adapter_64.sh

[follow the prompts, they should be self explanatory]

You can either start/stop the bridge each time you run the model, or you can start it when you boot your computer and leave it running of you do a lot of model work

$sudo service FMNetwork start

Start FastModels with these extra parameters:
    -C motherboard.hostbridge.interfaceName=ARM$USER \
    -C motherboard.smsc_91c111.enabled=1 \
    -C motherboard.smsc_91c111.mac_address=auto

Then, to shut down the bridge:
    $sudo service FMNetwork stop

If you leave the bridge running, it will not re-start automatically when you reboot your computer.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.