9
0
Fork 0

Merge branch 'for-next/defenv-2'

This commit is contained in:
Sascha Hauer 2012-11-16 14:00:45 +01:00
commit c914f8aaea
39 changed files with 76 additions and 295 deletions

View File

@ -7,4 +7,4 @@ fi
global.bootm.image="/mnt/disk0.1/zImage-cfa10036"
global.bootm.oftree="/mnt/disk0.1/oftree-cfa10036"
bootargs-root-ext -r 3 -m mmcblk0p3
global.linux.bootargs.dyn.root="root=/dev/mmcblk0p3 rootfstype=ext3 rootwait"

View File

@ -1,8 +0,0 @@
#!/bin/sh
if [ "$1" = menu ]; then
init-menu-add-entry "$0" "Base bootargs"
exit
fi
global.linux.bootargs.base="console=ttyAMA0,115200"

View File

@ -0,0 +1,7 @@
#!/bin/sh
# board defaults, do not change in running system. Change /env/config
# instead
global.hostname=cfa10036
global.linux.bootargs.base="console=ttyAMA0,115200"

View File

@ -1,8 +0,0 @@
#!/bin/sh
if [ "$1" = menu ]; then
init-menu-add-entry "$0" "hostname"
exit
fi
global.hostname=cfa10036

View File

@ -1,8 +0,0 @@
#!/bin/sh
if [ "$1" = menu ]; then
init-menu-add-entry "$0" "Base bootargs"
exit
fi
global.linux.bootargs.base="console=ttymxc0,115200"

View File

@ -0,0 +1,7 @@
#!/bin/sh
# board defaults, do not change in running system. Change /env/config
# instead
global.hostname=babbage
global.linux.bootargs.base="console=ttymxc0,115200"

View File

@ -1,8 +0,0 @@
#!/bin/sh
if [ "$1" = menu ]; then
init-menu-add-entry "$0" "hostname"
exit
fi
global.hostname=babbage

View File

@ -1,8 +0,0 @@
#!/bin/sh
if [ "$1" = menu ]; then
init-menu-add-entry "$0" "Base bootargs"
exit
fi
global.linux.bootargs.base="console=ttymxc1,115200"

View File

@ -0,0 +1,7 @@
#!/bin/sh
# board defaults, do not change in running system. Change /env/config
# instead
global.hostname=SabreLite
global.linux.bootargs.base="console=ttymxc1,115200"

View File

@ -1,8 +0,0 @@
#!/bin/sh
if [ "$1" = menu ]; then
init-menu-add-entry "$0" "hostname"
exit
fi
global.hostname=SabreLite

View File

@ -1,8 +0,0 @@
#!/bin/sh
if [ "$1" = menu ]; then
init-menu-add-entry "$0" "Base bootargs"
exit
fi
global.linux.bootargs.base="console=ttymxc0,115200"

View File

@ -0,0 +1,7 @@
#!/bin/sh
# board defaults, do not change in running system. Change /env/config
# instead
global.hostname=tx53
global.linux.bootargs.base="console=ttymxc0,115200"

View File

@ -1,8 +0,0 @@
#!/bin/sh
if [ "$1" = menu ]; then
init-menu-add-entry "$0" "hostname"
exit
fi
global.hostname=tx53

View File

@ -7,4 +7,4 @@ fi
global.bootm.image="/dev/nand0.kernel.bb"
#global.bootm.oftree="/env/oftree"
bootargs-root-ubi -r root -m nand0.root
global.linux.bootargs.dyn.root="root=ubi0:root ubi.mtd=nand0.root rootfstype=ubifs"

View File

@ -1,8 +0,0 @@
#!/bin/sh
if [ "$1" = menu ]; then
init-menu-add-entry "$0" "Base bootargs"
exit
fi
global.linux.bootargs.base="console=ttymxc0,115200"

View File

@ -0,0 +1,7 @@
#!/bin/sh
# board defaults, do not change in running system. Change /env/config
# instead
global.hostname=pcm038
global.linux.bootargs.base="console=ttymxc0,115200"

View File

@ -1,8 +0,0 @@
#!/bin/sh
if [ "$1" = menu ]; then
init-menu-add-entry "$0" "hostname"
exit
fi
global.hostname=pcm038

View File

@ -1,8 +0,0 @@
#!/bin/sh
if [ "$1" = menu ]; then
init-menu-add-entry "$0" "Base bootargs"
exit
fi
global.linux.bootargs.base="console=ttymxc0,115200"

View File

@ -0,0 +1,7 @@
#!/bin/sh
# board defaults, do not change in running system. Change /env/config
# instead
global.hostname=tqma53
global.linux.bootargs.base="console=ttymxc0,115200"

View File

@ -1,8 +0,0 @@
#!/bin/sh
if [ "$1" = menu ]; then
init-menu-add-entry "$0" "hostname"
exit
fi
global.hostname=tqma53

View File

@ -1,7 +0,0 @@
#!/bin/sh
# pass barebox ip settings for eth0 to Linux
ifup eth0
global.linux.bootargs.dyn.ip="ip=$eth0.ipaddr:$eth0.serverip:$eth0.gateway:$eth0.netmask::eth0:"

View File

@ -1,5 +0,0 @@
#!/bin/sh
# Do dhcp in Linux
global.linux.bootargs.dyn.ip="ip=dhcp"

View File

@ -1,5 +0,0 @@
#!/bin/sh
# disable ip setup in Linux
global.linux.bootargs.dyn.ip="ip=none"

View File

@ -1,26 +0,0 @@
#!/bin/sh
usage="$0 [OPTIONS]\n -p <partition>\n -t <fstype>"
while getopt "p:t:h" opt; do
if [ ${opt} = p ]; then
part=${OPTARG}
elif [ ${opt} = t ]; then
fstype=${OPTARG}
elif [ ${opt} = h ]; then
echo -e "$usage"
exit 0
fi
done
if [ -z "${part}" ]; then
echo "$0: no partition given"
exit 1
fi
if [ -z "${fstype}" ]; then
echo "$0: no filesystem type given"
exit 1
fi
global.linux.bootargs.dyn.root="root=/dev/$part rootfstype=$fstype rootwait"

View File

@ -1,12 +0,0 @@
#!/bin/sh
while getopt "m:r:" opt; do
if [ ${opt} = m ]; then
part=${OPTARG}
fi
if [ ${opt} = r ]; then
type=${OPTARG}
fi
done
global.linux.bootargs.dyn.root="root=/dev/$part rootfstype=ext$type rootwait"

View File

@ -1,16 +0,0 @@
#!/bin/sh
rdinit="/sbin/init"
usage="$0 [OPTIONS]\n -i <rdinitpath> (/sbin/init)"
while getopt "i:h" opt; do
if [ ${opt} = i ]; then
rdinit=${OPTARG}
elif [ ${opt} = h ]; then
echo -e "$usage"
exit 0
fi
done
global.linux.bootargs.dyn.root="root=/dev/ram0 rdinit=${rdinit}"

View File

@ -1,21 +0,0 @@
#!/bin/sh
mtd=
usage="$0 [OPTIONS]\n -m <mtd>"
while getopt "m:h" opt; do
if [ ${opt} = m ]; then
mtd=${OPTARG}
elif [ ${opt} = h ]; then
echo -e "$usage"
exit 0
fi
done
if [ -z "$mtd" ]; then
echo -e "$usage"
exit 1
fi
global.linux.bootargs.dyn.root="root=$mtd rootfstype=jffs2"

View File

@ -1,20 +0,0 @@
#!/bin/sh
usage="$0 [OPTIONS]\n -n <nfspath>\n -s <serverip>"
while getopt "n:s:h" opt; do
if [ ${opt} = n ]; then
nfsroot=${OPTARG}
elif [ ${opt} = s ]; then
serverip=${OPTARG}
elif [ ${opt} = h ]; then
echo -e "$usage"
exit 0
fi
done
if [ -n ${serverip} ]; then
nfsroot="$serverip:$nfsroot"
fi
global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=$nfsroot,v3,tcp"

View File

@ -1,24 +0,0 @@
#!/bin/sh
ubiroot=root
mtd=
usage="$0 [OPTIONS]\n -r <ubiroot> (root)\n -m <mtd>"
while getopt "m:r:h" opt; do
if [ ${opt} = r ]; then
ubiroot=${OPTARG}
elif [ ${opt} = m ]; then
mtd=${OPTARG}
elif [ ${opt} = h ]; then
echo -e "$usage"
exit 0
fi
done
if [ -z "$mtd" ]; then
echo -e "$usage"
exit 1
fi
global.linux.bootargs.dyn.root="root=ubi0:$ubiroot ubi.mtd=$mtd rootfstype=ubifs"

View File

@ -8,12 +8,18 @@ global autoboot_timeout=3
global boot.default=net
global allow_color=true
global linux.bootargs.base
#linux.bootargs.dyn.* will be clearer at the beginning of boot
#linux.bootargs.dyn.* will be cleared at the beginning of boot
global linux.bootargs.dyn.ip
global linux.bootargs.dyn.root
global editcmd=sedit
/env/init/general
/env/config
if [ ${global.allow_color} = "true" ]; then
export PS1="\e[1;32mbarebox@\e[1;36m\h:\w\e[0m "
else
export PS1="barebox@\h:\w "
fi
if [ -e /env/menu ]; then
echo -e -n "\nHit m for menu or any other key to stop autoboot: "

View File

@ -1,17 +0,0 @@
#!/bin/sh
if [ "$1" = menu ]; then
boot-menu-add-entry "$0" "kernel + initrd via tftp"
exit
fi
path="/mnt/tftp"
global.bootm.image="${path}/${global.user}-linux-${global.hostname}"
global.bootm.initrd="${path}/initramfs"
bootargs-root-initrd
#global.bootm.oftree=<path to oftree>
global.linux.bootargs.dyn.root="root=/dev/ram0"
#bootargs-root-nfs -n "<path on server>" -s <serverip>
#bootargs-root-ubi -r <volume> -m <mtdname>

View File

@ -11,4 +11,4 @@ global.bootm.image="${path}/${global.user}-linux-${global.hostname}"
#global.bootm.oftree="${path}/${global.user}-oftree-${global.hostname}"
nfsroot="/home/${global.user}/nfsroot/${global.hostname}"
bootargs-ip
bootargs-root-nfs -n "$nfsroot"
global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=$nfsroot,v3,tcp"

21
defaultenv-2/base/config Normal file
View File

@ -0,0 +1,21 @@
#!/bin/sh
# change network settings in /env/network/eth0
# change mtd partition settings and automountpoints in /env/init/*
#global.hostname=
# set to false if you do not want to have colors
global.allow_color=true
# user (used for network filenames)
global.user=none
# timeout in seconds before the default boot entry is started
global.autoboot_timeout=3
# default boot entry (one of /env/boot/*)
global.boot.default=net
# base bootargs
#global.linux.bootargs.base="console=ttyS0,115200"

View File

@ -11,6 +11,4 @@ global.bootm.image=<path to image>
#bootargs-ip
#bootargs-root-nfs -n "<path on server>" -s <serverip>
#bootargs-root-jffs2 -m <mtdname>
#bootargs-root-ubi -r <volume> -m <mtdname>
global.linux.bootargs.dyn.root="root=<rootfs here>"

View File

@ -1,8 +0,0 @@
#!/bin/sh
if [ "$1" = menu ]; then
init-menu-add-entry "$0" "Base bootargs"
exit
fi
global.linux.bootargs.base="console=ttyS0,115200"

View File

@ -1,15 +0,0 @@
#!/bin/sh
if [ "$1" = menu ]; then
init-menu-add-entry "$0" "general config settings"
exit
fi
# user (used for network filenames)
global.user=none
# timeout in seconds before the default boot entry is started
global.autoboot_timeout=3
# default boot entry (one of /env/boot/*)
global.boot.default=net

View File

@ -1,8 +0,0 @@
#!/bin/sh
if [ "$1" = menu ]; then
init-menu-add-entry "$0" "hostname"
exit
fi
global.hostname=generic

View File

@ -1,7 +0,0 @@
#!/bin/sh
if [ ${global.allow_color} = "true" ]; then
export PS1="\e[1;32mbarebox@\e[1;36m\h:\w\e[0m "
else
export PS1="barebox@\h:\w "
fi

View File

@ -15,6 +15,7 @@ while true; do
boot-entries-collect
menu -e -a -R -m boot -c "$global.editcmd /env/network/eth0" -d "Network settings"
menu -e -a -R -m boot -c "$global.editcmd /env/config" -d "Config settings"
menu -e -a -m boot -c "boot-entries-edit" -d "Edit boot entries"
menu -e -a -m boot -c "init-entries-edit" -d "Edit init entries"
menu -e -a -R -m boot -c "saveenv || echo \"failed to save environment\" && sleep 2" -d "Save settings"