ModelNetworking/setup.sh corrupts routing table
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linaro Fast Models |
New
|
Undecided
|
Unassigned |
Bug Description
I attached a patch to fix following issues for the
FastModelsPor
which is included in
FE000-
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.
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 "ModelNetworkin g_setup_ sh_Linaro_ 1.patch" olio_7. 1/ModelNetworki ng _setup_ sh_Linaro_ 1.patch
$cd FastModelsPortf
$patch -p1 < ModelNetworking
Follow the instruction from chapter 2.13 of ARM's FastModel user guide: infocenter. arm.com/ help/topic/ com.arm. doc.dui0370n/ DUI0370N_ fast_model_ ug.pdf add_adapter_ 64.sh
http://
$./
[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: hostbridge. interfaceName= ARM$USER \ smsc_91c111. enabled= 1 \ smsc_91c111. mac_address= auto
-C motherboard.
-C motherboard.
-C motherboard.
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.