URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
Compare Revisions
- This comparison shows the changes necessary to convert path
/openrisc/trunk
- from Rev 507 to Rev 508
- ↔ Reverse comparison
Rev 507 → Rev 508
/or1ksim/cpu/or1k/sprs.c
163,7 → 163,7
one. */ |
if (config.pic.use_nmi) |
{ |
cpu_state.sprs[SPR_SR] |= 0x00000003; |
cpu_state.sprs[SPR_PICMR] |= 0x00000003; |
} |
|
if(cpu_state.sprs[SPR_SR] & SPR_SR_IEE) |
/or1ksim/configure.ac
28,7 → 28,7
|
# Use a full version number (x.y.z, possibly with "rcn" as a suffix) when |
# preparing a release, otherwise use a the date version (yyyy-mm-dd). |
AC_INIT([or1ksim], [2011-02-24], [openrisc@opencores.org]) |
AC_INIT([or1ksim], [0.5.0rc3], [openrisc@opencores.org]) |
AC_CONFIG_MACRO_DIR([m4]) |
|
# Generically use extensions such as _GNU_SOURCE if available. |
/or1ksim/doc/or1ksim.info
64,7 → 64,7
Unpack the software and create a _separate_ directory in which to build |
it: |
|
tar jxf or1ksim-2011-01-27.tar.bz2 |
tar jxf or1ksim-0.5.0rc3.tar.bz2 |
mkdir builddir_or1ksim |
cd builddir_or1ksim |
|
81,7 → 81,7
OpenRISC 1000 32-bit architecture. If this argument is omitted, it will |
default to OpenRISC 1000 32-bit with a warning |
|
../or1ksim-2011-01-27/configure --target=or32-elf ... |
../or1ksim-0.5.0rc3/configure --target=or32-elf ... |
|
There are several other options available, many of which are standard |
to GNU `configure' scripts. Use `configure --help' to see all the |
1031,7 → 1031,7
|
`l.nop 3' |
In earlier versions of Or1ksim this treated `r3' as a pointer to a |
`printf' style format string, and regsiters `r4' through `r8' as |
`printf' style format string, and registers `r4' through `r8' as |
parameters for that format string. |
|
This opcode is no longer supported, and has no effect if used. |
4848,62 → 4848,62
Node: Top810 |
Node: Installation1220 |
Node: Preparation1467 |
Node: Configuring the Build1762 |
Node: Build and Install7902 |
Node: Known Issues8668 |
Node: Usage9723 |
Node: Standalone Simulator10007 |
Node: Profiling Utility15151 |
Node: Memory Profiling Utility16057 |
Node: Trace Generation17417 |
Node: Simulator Library19602 |
Node: Ethernet TUN/TAP Interface30034 |
Node: Setting Up a Persistent TAP device31139 |
Node: Establishing a Bridge31814 |
Node: Opening the Firewall33497 |
Node: Disabling Ethernet Filtering33988 |
Node: Networking from OpenRISC Linux and BusyBox34613 |
Node: Tearing Down a Bridge36275 |
Node: l.nop Support37018 |
Node: Configuration39180 |
Node: Configuration File Format39792 |
Node: Configuration File Preprocessing40177 |
Node: Configuration File Syntax40474 |
Node: Simulator Configuration43259 |
Node: Simulator Behavior43550 |
Node: Verification API Configuration48131 |
Node: CUC Configuration50071 |
Node: Core OpenRISC Configuration52063 |
Node: CPU Configuration52565 |
Node: Memory Configuration56684 |
Node: Memory Management Configuration63406 |
Node: Cache Configuration65783 |
Node: Interrupt Configuration68169 |
Node: Power Management Configuration70002 |
Node: Branch Prediction Configuration71279 |
Node: Debug Interface Configuration72639 |
Node: Peripheral Configuration74982 |
Node: Memory Controller Configuration75608 |
Node: UART Configuration79388 |
Node: DMA Configuration82907 |
Node: Ethernet Configuration84774 |
Node: GPIO Configuration90053 |
Node: Display Interface Configuration91686 |
Node: Frame Buffer Configuration93995 |
Node: Keyboard Configuration95859 |
Node: Disc Interface Configuration98097 |
Node: Generic Peripheral Configuration103201 |
Node: Interactive Command Line105496 |
Node: Verification API112470 |
Node: Code Internals116900 |
Node: Coding Conventions117483 |
Node: Global Data Structures121910 |
Node: Concepts124567 |
Ref: Output Redirection124712 |
Ref: Interrupts Internal125250 |
Node: Internal Debugging126403 |
Node: Regression Testing126927 |
Node: GNU Free Documentation License130716 |
Node: Index153123 |
Node: Configuring the Build1760 |
Node: Build and Install7898 |
Node: Known Issues8664 |
Node: Usage9719 |
Node: Standalone Simulator10003 |
Node: Profiling Utility15147 |
Node: Memory Profiling Utility16053 |
Node: Trace Generation17413 |
Node: Simulator Library19598 |
Node: Ethernet TUN/TAP Interface30030 |
Node: Setting Up a Persistent TAP device31135 |
Node: Establishing a Bridge31810 |
Node: Opening the Firewall33493 |
Node: Disabling Ethernet Filtering33984 |
Node: Networking from OpenRISC Linux and BusyBox34609 |
Node: Tearing Down a Bridge36271 |
Node: l.nop Support37014 |
Node: Configuration39176 |
Node: Configuration File Format39788 |
Node: Configuration File Preprocessing40173 |
Node: Configuration File Syntax40470 |
Node: Simulator Configuration43255 |
Node: Simulator Behavior43546 |
Node: Verification API Configuration48127 |
Node: CUC Configuration50067 |
Node: Core OpenRISC Configuration52059 |
Node: CPU Configuration52561 |
Node: Memory Configuration56680 |
Node: Memory Management Configuration63402 |
Node: Cache Configuration65779 |
Node: Interrupt Configuration68165 |
Node: Power Management Configuration69998 |
Node: Branch Prediction Configuration71275 |
Node: Debug Interface Configuration72635 |
Node: Peripheral Configuration74978 |
Node: Memory Controller Configuration75604 |
Node: UART Configuration79384 |
Node: DMA Configuration82903 |
Node: Ethernet Configuration84770 |
Node: GPIO Configuration90049 |
Node: Display Interface Configuration91682 |
Node: Frame Buffer Configuration93991 |
Node: Keyboard Configuration95855 |
Node: Disc Interface Configuration98093 |
Node: Generic Peripheral Configuration103197 |
Node: Interactive Command Line105492 |
Node: Verification API112466 |
Node: Code Internals116896 |
Node: Coding Conventions117479 |
Node: Global Data Structures121906 |
Node: Concepts124563 |
Ref: Output Redirection124708 |
Ref: Interrupts Internal125246 |
Node: Internal Debugging126399 |
Node: Regression Testing126923 |
Node: GNU Free Documentation License130712 |
Node: Index153119 |
|
End Tag Table |
/or1ksim/doc/or1ksim.texi
1266,7 → 1266,7
@cindex @code{l.nop 3} (printf, now obsolete) |
|
In earlier versions of @value{OR1KSIM} this treated @code{r3} as a |
pointer to a @code{printf} style format string, and regsiters @code{r4} |
pointer to a @code{printf} style format string, and registers @code{r4} |
through @code{r8} as parameters for that format string. |
|
This opcode is no longer supported, and has no effect if used. |
/or1ksim/NEWS
2,8 → 2,8
================================================== |
|
|
New in top of tree |
================== |
New in release 0.5.0rc3 |
======================= |
|
New features (shouldn't be there during a release cycle, but prompted by debug |
needs elsewhere in the tool chain). |
28,7 → 28,16
New l.nop opcode to identify that this is an Or1ksim session. Allows |
applications to determine if they are running on Or1ksim or hardware. |
|
No bugs are fixed. |
|
The following bugs are outstanding |
* Bug 1973: Or1ksim needs PIC tests. |
* But 1931: Or1ksim needs test for l.nop opcodes. |
* Bug 1823: Configuration file error line numbers are wrong. |
* Bug 1822: ATA configuration is broken. Documented in user guide. |
* Bug 1758: Memory controller issues. Workaround in the user guide. |
|
|
New in release 0.5.0rc2 |
======================= |
|
/or1ksim/ChangeLog
1,3 → 1,18
2011-04-07 Jeremy Bennett <jeremy.bennett@embecosm.com> |
|
* configure: Regenerated. |
* configure.ac: Updated version 0.5.0rc3. |
|
2011-03-29 Jonas Bonn <jonas@southpole.se> |
|
* cpu/or1k/sprs.c (mtspr): Setting PICMR always sets the bottom |
two bits if we have non-maskable interrupts. |
|
2011-03-26 Jeremy Bennett <jeremy.bennett@embecosm.com> |
|
* peripheral/eth.c (eth_open_tap_if): If fail to open the TAP, |
then also report the tap device name. |
|
2011-02-24 Jeremy Bennett <jeremy.bennett@embecosm.com> |
|
* configure: Regenerated. |
/or1ksim/brend-static.sh
0,0 → 1,105
#!/bin/bash |
|
# Copyright (C) 2010 ORSoC AB |
# Copyright (C) 2010 Embecosm Limited |
|
# Contributor Julius Baxter <julius.baxter@orsoc.se> |
# Contributor Jeremy Bennett <jeremy.bennett@embecosm.com> |
|
# This file is a superuser script to close down an Ethernet bridge and restore |
# the simple Ethernet interface. |
|
# This program is free software; you can redistribute it and/or modify it |
# under the terms of the GNU General Public License as published by the Free |
# Software Foundation; either version 3 of the License, or (at your option) |
# any later version. |
|
# This program is distributed in the hope that it will be useful, but WITHOUT |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
# more details. |
|
# You should have received a copy of the GNU General Public License along |
# with this program. If not, see <http://www.gnu.org/licenses/>. |
|
# ------------------------------------------------------------------------------ |
|
# Pre-requisites: bridge-utils must be installed. |
|
# Usage: ./brend-static.sh <bridge> <eth> <tap> |
|
# - <bridge> is the bridge interface to use, e.g. br0 |
# - <eth> is the hardware ethernet interface to use, e.g. eth0 |
# - <tap> is the tap interface to use, e.g. tap0 |
|
# Check we have the right number of arguments |
if [ "x$#" != "x3" ] |
then |
echo "Usage: ./brend-static.sh <bridge> <eth> <tap>" |
exit 1 |
fi |
|
# Check we are root |
euid=`id -un` |
if [ "x${euid}" != "xroot" ] |
then |
echo "Must run as root" |
exit 1 |
fi |
|
# Break out the arguments |
br=$1 |
eth=$2 |
tap=$3 |
|
# Determine the IP address, netmask and broadcast of the bridge. |
eth_ip=`ifconfig $br | \ |
grep "inet addr" | \ |
head -1 | \ |
sed -e 's/^.*inet addr:\([^ \t]*\).*$/\1/'` |
eth_netmask=`ifconfig $br | \ |
grep "Mask" | \ |
head -1 | \ |
sed -e 's/^.*Mask:\([^ \t]*\).*$/\1/'` |
eth_broadcast=`ifconfig $br | \ |
grep "Bcast" | \ |
head -1 | \ |
sed -e 's/^.*Bcast:\([^ \t]*\).*$/\1/'` |
|
# Close the firewall to the tap and bridge |
iptables -D INPUT -i ${tap} -j ACCEPT |
iptables -D INPUT -i ${br} -j ACCEPT |
iptables -D FORWARD -i ${br} -j ACCEPT |
|
# Take down the bridge and delete it |
ifconfig ${br} down |
|
if [ $? != 0 ] |
then |
echo "Failed to take down ${br}" |
exit 1 |
fi |
|
brctl delbr ${br} |
|
if [ $? != 0 ] |
then |
echo "Failed to take delete ${br}" |
exit 1 |
fi |
|
# Delete the TAP interface. Note we mustn't have anything using it. It's |
# rather harsh, but we use fuser to ensure this (it will take out all users of |
# any TAP/TUN interface). |
fuser -k /dev/net/tun |
openvpn --rmtun --dev ${tap} |
|
if [ $? != 0 ] |
then |
echo "Failed to remove ${tap}" |
exit 1 |
fi |
|
# Restore the Ethernet interface, using the IP address, netmask and broadcast |
# mask from earlier. |
ifconfig ${eth} ${eth_ip} netmask ${eth_netmask} broadcast ${eth_broadcast} |
or1ksim/brend-static.sh
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: or1ksim/testsuite/test-code-or1k/configure
===================================================================
--- or1ksim/testsuite/test-code-or1k/configure (revision 507)
+++ or1ksim/testsuite/test-code-or1k/configure (revision 508)
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.65 for or1ksim-testsuite 2011-02-24.
+# Generated by GNU Autoconf 2.65 for or1ksim-testsuite 0.5.0rc3.
#
# Report bugs to .
#
@@ -701,8 +701,8 @@
# Identity of this package.
PACKAGE_NAME='or1ksim-testsuite'
PACKAGE_TARNAME='or1ksim-testsuite'
-PACKAGE_VERSION='2011-02-24'
-PACKAGE_STRING='or1ksim-testsuite 2011-02-24'
+PACKAGE_VERSION='0.5.0rc3'
+PACKAGE_STRING='or1ksim-testsuite 0.5.0rc3'
PACKAGE_BUGREPORT='openrisc@opencores.org'
PACKAGE_URL=''
@@ -1424,7 +1424,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures or1ksim-testsuite 2011-02-24 to adapt to many kinds of systems.
+\`configure' configures or1ksim-testsuite 0.5.0rc3 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1495,7 +1495,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of or1ksim-testsuite 2011-02-24:";;
+ short | recursive ) echo "Configuration of or1ksim-testsuite 0.5.0rc3:";;
esac
cat <<\_ACEOF
@@ -1600,7 +1600,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-or1ksim-testsuite configure 2011-02-24
+or1ksim-testsuite configure 0.5.0rc3
generated by GNU Autoconf 2.65
Copyright (C) 2009 Free Software Foundation, Inc.
@@ -2025,7 +2025,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by or1ksim-testsuite $as_me 2011-02-24, which was
+It was created by or1ksim-testsuite $as_me 0.5.0rc3, which was
generated by GNU Autoconf 2.65. Invocation command line was
$ $0 $@
@@ -10315,7 +10315,7 @@
# Define the identity of the package.
PACKAGE='or1ksim-testsuite'
- VERSION='2011-02-24'
+ VERSION='0.5.0rc3'
cat >>confdefs.h <<_ACEOF
@@ -11742,7 +11742,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by or1ksim-testsuite $as_me 2011-02-24, which was
+This file was extended by or1ksim-testsuite $as_me 0.5.0rc3, which was
generated by GNU Autoconf 2.65. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -11808,7 +11808,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-or1ksim-testsuite config.status 2011-02-24
+or1ksim-testsuite config.status 0.5.0rc3
configured by $0, generated by GNU Autoconf 2.65,
with options \\"\$ac_cs_config\\"
/or1ksim/testsuite/test-code-or1k/configure.ac
23,8 → 23,7
# Configure script for the OpenRISC 1000 simulator test suite OR1K code |
# directory. This uses a different tool chain, so has its own configuration |
# script. Process this file with autoconf to produce a configure script. |
|
AC_INIT([or1ksim-testsuite], [2011-02-24], [openrisc@opencores.org]) |
AC_INIT([or1ksim-testsuite], [0.5.0rc3], [openrisc@opencores.org]) |
AC_CONFIG_MACRO_DIR([m4]) |
|
AC_PROG_LIBTOOL |
/or1ksim/testsuite/test-code-or1k/ChangeLog
1,3 → 1,8
2011-04-07 Jeremy Bennett <jeremy.bennett@embecosm.com> |
|
* configure: Regenerated. |
* configure.ac: Updated version 0.5.0rc3. |
|
2011-02-24 Jeremy Bennett <jeremy.bennett@embecosm.com> |
|
* configure: Regenerated. |
/or1ksim/peripheral/eth.c
1001,8 → 1001,8
|
if (ioctl (eth->rtx_fd, TUNSETIFF, (void *) &ifr) < 0) |
{ |
fprintf (stderr, "Warning: Failed to set TAP device: %s\n", |
strerror (errno)); |
fprintf (stderr, "Warning: Failed to set TAP device %s: %s\n", |
eth->tap_dev, strerror (errno)); |
close (eth->rtx_fd); |
eth->rtx_fd = -1; |
return; |
/or1ksim/configure
1,7 → 1,7
#! /bin/sh |
# From configure.ac Id: configure.ac 1406 2011-01-27 17:17:06Z jeremy using automake version AC_ACVERSION. |
# From configure.ac Id: configure.ac 1507 2011-04-07 10:41:01Z jeremy using automake version AC_ACVERSION. |
# Guess values for system-dependent variables and create Makefiles. |
# Generated by GNU Autoconf 2.65 for or1ksim 2011-02-24. |
# Generated by GNU Autoconf 2.65 for or1ksim 0.5.0rc3. |
# |
# Report bugs to <openrisc@opencores.org>. |
# |
722,8 → 722,8
# Identity of this package. |
PACKAGE_NAME='or1ksim' |
PACKAGE_TARNAME='or1ksim' |
PACKAGE_VERSION='2011-02-24' |
PACKAGE_STRING='or1ksim 2011-02-24' |
PACKAGE_VERSION='0.5.0rc3' |
PACKAGE_STRING='or1ksim 0.5.0rc3' |
PACKAGE_BUGREPORT='openrisc@opencores.org' |
PACKAGE_URL='' |
|
1476,7 → 1476,7
# Omit some internal or obsolete options to make the list less imposing. |
# This message is too long to be a string in the A/UX 3.1 sh. |
cat <<_ACEOF |
\`configure' configures or1ksim 2011-02-24 to adapt to many kinds of systems. |
\`configure' configures or1ksim 0.5.0rc3 to adapt to many kinds of systems. |
|
Usage: $0 [OPTION]... [VAR=VALUE]... |
|
1547,7 → 1547,7
|
if test -n "$ac_init_help"; then |
case $ac_init_help in |
short | recursive ) echo "Configuration of or1ksim 2011-02-24:";; |
short | recursive ) echo "Configuration of or1ksim 0.5.0rc3:";; |
esac |
cat <<\_ACEOF |
|
1654,7 → 1654,7
test -n "$ac_init_help" && exit $ac_status |
if $ac_init_version; then |
cat <<\_ACEOF |
or1ksim configure 2011-02-24 |
or1ksim configure 0.5.0rc3 |
generated by GNU Autoconf 2.65 |
|
Copyright (C) 2009 Free Software Foundation, Inc. |
2316,7 → 2316,7
This file contains any messages produced by compilers while |
running configure, to aid debugging if configure makes a mistake. |
|
It was created by or1ksim $as_me 2011-02-24, which was |
It was created by or1ksim $as_me 0.5.0rc3, which was |
generated by GNU Autoconf 2.65. Invocation command line was |
|
$ $0 $@ |
10717,7 → 10717,7
|
# Define the identity of the package. |
PACKAGE='or1ksim' |
VERSION='2011-02-24' |
VERSION='0.5.0rc3' |
|
|
cat >>confdefs.h <<_ACEOF |
13736,7 → 13736,7
# report actual input values of CONFIG_FILES etc. instead of their |
# values after options handling. |
ac_log=" |
This file was extended by or1ksim $as_me 2011-02-24, which was |
This file was extended by or1ksim $as_me 0.5.0rc3, which was |
generated by GNU Autoconf 2.65. Invocation command line was |
|
CONFIG_FILES = $CONFIG_FILES |
13802,7 → 13802,7
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
ac_cs_version="\\ |
or1ksim config.status 2011-02-24 |
or1ksim config.status 0.5.0rc3 |
configured by $0, generated by GNU Autoconf 2.65, |
with options \\"\$ac_cs_config\\" |
|
/or1ksim/brend.sh
101,11 → 101,9
fi |
|
# Restore the Ethernet interface. We could use ifconfig with the IP address, |
# netmask and broadcast mask from earlier, but this does not seem to work in a |
# DHCP world |
# ifconfig ${eth} ${eth_ip} netmask ${eth_netmask} broadcast ${eth_broadcast} |
# Instead we use a single shot dhcp configuration. In future the extant eth0 |
# dhclient will refresh the lease. |
# netmask and broadcast mask from earlier, but this does not work in a DHCP |
# world (the MAC has changed). Instead we use a single shot dhcp |
# configuration. In future the extant eth0 dhclient will refresh the lease. |
dhclient -1 -d ${eth0} |
|
if [ $? != 0 ] |
/or1ksim/brstart-static.sh
0,0 → 1,122
#!/bin/bash |
|
# Copyright (C) 2010 ORSoC AB |
# Copyright (C) 2010 Embecosm Limited |
|
# Contributor Julius Baxter <julius.baxter@orsoc.se> |
# Contributor Jeremy Bennett <jeremy.bennett@embecosm.com> |
|
# This file is a superuser script to set up an Ethernet bridge that can be |
# used with Or1ksim via the TUN/TAP interface. |
|
# This program is free software; you can redistribute it and/or modify it |
# under the terms of the GNU General Public License as published by the Free |
# Software Foundation; either version 3 of the License, or (at your option) |
# any later version. |
|
# This program is distributed in the hope that it will be useful, but WITHOUT |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
# more details. |
|
# You should have received a copy of the GNU General Public License along |
# with this program. If not, see <http://www.gnu.org/licenses/>. |
|
# ------------------------------------------------------------------------------ |
|
# Pre-requisites: bridge-utils must be installed. |
|
# Usage: ./brstart-static.sh <username> <groupname> <bridge> <eth> <tap> |
|
# - <bridge> is the bridge interface to use, e.g. br0 |
# - <eth> is the hardware ethernet interface to use, e.g. eth0 |
# - <tap> is/are the persistent TAP interface(s) |
|
# Check we have the right number of arguments |
if [ "x$#" != "x5" ] |
then |
echo "Usage: ./brstart-static.sh <username> <groupname> <bridge> <eth> <tap>" |
exit 1 |
fi |
|
# Check we are root |
euid=`id -un` |
if [ "x${euid}" != "xroot" ] |
then |
echo "Must run as root" |
exit 1 |
fi |
|
# Break out the arguments |
username=$1 |
groupname=$2 |
br=$3 |
eth=$4 |
tap=$5 |
|
# Determine the IP address, netmask and broadcast of the current Ethernet |
# interface. This is used if the bridge is set up manually, rather than using |
# DHCP. |
eth_ip=`ifconfig $eth | \ |
grep "inet addr" | \ |
head -1 | \ |
sed -e 's/^.*inet addr:\([^ \t]*\).*$/\1/'` |
eth_netmask=`ifconfig $eth | \ |
grep "Mask" | \ |
head -1 | \ |
sed -e 's/^.*Mask:\([^ \t]*\).*$/\1/'` |
eth_broadcast=`ifconfig $eth | \ |
grep "Bcast" | \ |
head -1 | \ |
sed -e 's/^.*Bcast:\([^ \t]*\).*$/\1/'` |
|
# Create the TAP interface |
openvpn --mktun --dev ${tap} --user ${username} --group ${groupname} |
|
if [ $? != 0 ] |
then |
echo "Failed to create ${tap}" |
exit 1 |
fi |
|
# Create the bridge |
brctl addbr ${br} |
|
if [ $? != 0 ] |
then |
echo "Failed to create ${br}" |
exit 1 |
fi |
|
# Add the host Ethernet and TAP interfaces, removing the IP addresses of the |
# underlying interfaces. |
for i in ${eth} ${tap} |
do |
# Add the interface |
brctl addif ${br} ${i} |
|
if [ $? != 0 ] |
then |
echo "Failed to create ${i}" |
exit 1 |
fi |
|
# Remove the IP address |
ifconfig ${i} 0.0.0.0 promisc up |
|
if [ $? != 0 ] |
then |
echo "Failed to remove IP interface of ${i}" |
exit 1 |
fi |
done |
|
# Reconfigure the bridge to have the original IP address, netmask and |
# broadcast mask |
ifconfig ${br} ${eth_ip} netmask ${eth_netmask} broadcast ${eth_broadcast} |
|
# Open up firewall to the tap and bridge. We have a generic reject at the end |
# of the chain, so we insert these at the start. |
iptables -I INPUT 1 -i ${tap} -j ACCEPT |
iptables -I INPUT 1 -i ${br} -j ACCEPT |
iptables -I FORWARD 1 -i ${br} -j ACCEPT |
or1ksim/brstart-static.sh
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property