Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
86
Issues
86
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Switch - Software
Commits
9d94770d
Commit
9d94770d
authored
Aug 07, 2012
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
barebox script: final minor details
parent
8f8394d9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
32 deletions
+26
-32
boot-script
patches/barebox/env/bin/boot-script
+16
-16
config
patches/barebox/env/config
+10
-16
No files found.
patches/barebox/env/bin/boot-script
View file @
9d94770d
#!/bin/sh
# This script loads a wrboot script from the TFTP server and runs it.
dhcp 5
if
[
"x
$eth0
.ipaddr"
=
"x"
]
;
then
dhcp 5
;
fi
# fetch wrboot-<MAC> script, or <IP>/wrboot or wrboot
tftp wrboot-
$eth0
.ethaddr wrboot
if
[
"
$?
"
-ne
"0"
]
;
then
sleep
1
tftp
$eth0
.ipaddr/wrboot wrboot
fi
if
[
"
$?
"
-ne
"0"
]
;
then
echo
"Cannot obtain IP from DHCP server"
else
# fetch wrboot-<MAC> script
tftp wrboot-
$eth0
.ethaddr wrboot
if
[
"
$?
"
-ne
"0"
]
;
then
sleep
1
tftp
$eth0
.ipaddr/wrboot wrboot
fi
if
[
"
$?
"
-ne
"0"
]
;
then
sleep
1
tftp wrboot wrboot
fi
if
[
"
$?
"
-eq
"0"
]
;
then
./wrboot
fi
sleep
1
tftp wrboot wrboot
fi
if
[
"
$?
"
-eq
"0"
]
;
then
./wrboot
fi
# If the script doesn't boot return to menu after some time to read output
sleep
2
menu
-s
boot
patches/barebox/env/config
View file @
9d94770d
#!/bin/sh
## You must use Ctrl+D to Save & Ctrl+C to Exit
## Please type Ctrl+D to Save-and-exit or Ctrl+C to Exit
##eth0.ethaddr corresponds to the MAC address of the switch, it can also be changes using flasher
eth0.ethaddr
=
02:0B:AD:C0:FF:EE
## use 'dhcp' to do dhcp in barebox and in kernel
ip
=
dhcp
## or set your networking parameters here
#eth0.serverip=a.b.c.d
#eth0.ipaddr=a.b.c.d
#eth0.netmask=a.b.c.d
#eth0.gateway=a.b.c.d
## You can set your networking parameters here
## If unset, then boot-script will use dhcp
## This is shipped as unset ("if false" below)
if
false
;
then
eth0.serverip
=
192.168.1.1
eth0.ipaddr
=
192.168.1.2
eth0.netmask
=
255.255.255.0
eth0.gateway
=
192.168.1.254
fi
## Timeout to autoboot in the pre-selected menu
autoboot_timeout
=
"10"
;
## In case the default boot doesn't work we can use a specified alternative boot
#autoboot_altforced="0";
#autoboot_altmode="2";
## Timeout to show the error Message
#error_timeout="10";
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment