aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ps3/petitboot
diff options
context:
space:
mode:
authorHamish Guthrie <hcg@openwrt.org>2009-04-16 10:40:15 +0000
committerHamish Guthrie <hcg@openwrt.org>2009-04-16 10:40:15 +0000
commitffc86f7e3a5b4be7dfdee2f201cfa4fc2a30a40e (patch)
tree6c6b1de678ad45d1fe93a8126174855f236b895c /target/linux/ps3/petitboot
parenta2457665070d609a457d68c1eeb051b12bf43531 (diff)
downloadupstream-ffc86f7e3a5b4be7dfdee2f201cfa4fc2a30a40e.tar.gz
upstream-ffc86f7e3a5b4be7dfdee2f201cfa4fc2a30a40e.tar.bz2
upstream-ffc86f7e3a5b4be7dfdee2f201cfa4fc2a30a40e.zip
Update default configuration to use profiles
SVN-Revision: 15229
Diffstat (limited to 'target/linux/ps3/petitboot')
-rw-r--r--target/linux/ps3/petitboot/base-files/etc/config/network13
-rwxr-xr-xtarget/linux/ps3/petitboot/base-files/etc/init.d/boot18
-rw-r--r--target/linux/ps3/petitboot/base-files/etc/sysctl.conf11
-rw-r--r--target/linux/ps3/petitboot/profiles/000-Default.mk19
-rw-r--r--target/linux/ps3/petitboot/target.mk2
5 files changed, 52 insertions, 11 deletions
diff --git a/target/linux/ps3/petitboot/base-files/etc/config/network b/target/linux/ps3/petitboot/base-files/etc/config/network
new file mode 100644
index 0000000000..453481e325
--- /dev/null
+++ b/target/linux/ps3/petitboot/base-files/etc/config/network
@@ -0,0 +1,13 @@
+# Copyright (C) 2006 OpenWrt.org
+
+config interface loopback
+ option ifname lo
+ option proto static
+ option ipaddr 127.0.0.1
+ option netmask 255.0.0.0
+
+config interface lan
+ option ifname eth0
+ option proto dhcp
+ option ipaddr 192.168.1.1
+ option netmask 255.255.255.0
diff --git a/target/linux/ps3/petitboot/base-files/etc/init.d/boot b/target/linux/ps3/petitboot/base-files/etc/init.d/boot
index 2897f3a7da..c84c6873d3 100755
--- a/target/linux/ps3/petitboot/base-files/etc/init.d/boot
+++ b/target/linux/ps3/petitboot/base-files/etc/init.d/boot
@@ -19,12 +19,13 @@ system_config() {
config_get log_ip "$cfg" log_ip
config_get log_size "$cfg" log_size
+ config_get log_port "$cfg" log_port
config_get log_file "$cfg" log_file
- # use a shared mem buffer for local default
+
[ -z $log_file -a -z "$log_size" ] && log_size=16
- syslogd ${log_size:+-C $log_size} ${log_file:+-O $log_file} \
- ${log_ip:+-L -R $log_ip}
- klogd
+ [ -x /sbin/syslogd ] && syslogd ${log_size:+-C $log_size} \
+ ${log_file:+-O $log_file} ${log_ip:+-L -R $log_ip}
+ [ -x /sbin/klogd ] && klogd
}
apply_uci_config() {(
@@ -37,16 +38,15 @@ start() {
[ -f /proc/jffs2_bbc ] && echo "S" > /proc/jffs2_bbc
[ -f /proc/net/vlan/config ] && vconfig set_name_type DEV_PLUS_VID_NO_PAD
+ apply_uci_config
+ config_load system
+ config_foreach system_config system
+
mkdir -p /var/run
mkdir -p /var/log
mkdir -p /var/lock
mkdir -p /var/state
mkdir -p /tmp/.uci
-
- apply_uci_config
- config_load system
- config_foreach system_config system
-
chown 0700 /tmp/.uci
touch /var/log/wtmp
touch /var/log/lastlog
diff --git a/target/linux/ps3/petitboot/base-files/etc/sysctl.conf b/target/linux/ps3/petitboot/base-files/etc/sysctl.conf
new file mode 100644
index 0000000000..1af0079251
--- /dev/null
+++ b/target/linux/ps3/petitboot/base-files/etc/sysctl.conf
@@ -0,0 +1,11 @@
+kernel.panic=3
+net.ipv4.conf.default.arp_ignore=1
+net.ipv4.conf.all.arp_ignore=1
+net.ipv4.ip_forward=1
+net.ipv4.icmp_echo_ignore_broadcasts=1
+net.ipv4.icmp_ignore_bogus_error_responses=1
+net.ipv4.tcp_ecn=1
+net.ipv4.tcp_fin_timeout=30
+net.ipv4.tcp_keepalive_time=120
+net.ipv4.tcp_timestamps=0
+net.core.netdev_max_backlog=30
diff --git a/target/linux/ps3/petitboot/profiles/000-Default.mk b/target/linux/ps3/petitboot/profiles/000-Default.mk
new file mode 100644
index 0000000000..5c433e1339
--- /dev/null
+++ b/target/linux/ps3/petitboot/profiles/000-Default.mk
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2009 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/Default
+ NAME:=Default PS3 Petitboot profile
+ PACKAGES:=-dnsmasq -iptables -ppp -ppp-mod-pppoe -kmod-ipt-nathelper \
+ -firewall \
+ kexec-tools petitboot
+endef
+
+define Profile/Default/Description
+ Default PS3 Petitboot profile
+endef
+$(eval $(call Profile,Default))
+
diff --git a/target/linux/ps3/petitboot/target.mk b/target/linux/ps3/petitboot/target.mk
index 4b53f57b6b..04ec11bb3e 100644
--- a/target/linux/ps3/petitboot/target.mk
+++ b/target/linux/ps3/petitboot/target.mk
@@ -1,8 +1,6 @@
BOARDNAME:=Petitboot
FEATURES:=fpu ramdisk
-DEFAULT_PACKAGES+= dnsmasq petitboot
-
define Target/Description
Build Petitboot bootloader
endef