9
0
Fork 0

highbank: switch to defaultenv-2

this will allow to have boot sequence and later to use PXE

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Jean-Christophe PLAGNIOL-VILLARD 2013-04-06 18:31:57 +02:00 committed by Sascha Hauer
parent 062a2fc2ea
commit 78b72d156d
19 changed files with 178 additions and 33 deletions

View File

@ -0,0 +1 @@
../boot/ahci-boot

View File

@ -0,0 +1 @@
../boot/ahci

View File

@ -0,0 +1 @@
../boot/mmc-boot

View File

@ -0,0 +1 @@
../boot/mmc

View File

@ -0,0 +1 @@
../boot/net

View File

@ -0,0 +1 @@
../boot/net-eth1

21
arch/arm/boards/highbank/env/boot/ahci vendored Normal file
View File

@ -0,0 +1,21 @@
#!/bin/sh
if [ "$1" = menu ]; then
boot-menu-add-entry "$0" "AHCI"
exit
fi
path="/mnt/ahci"
global.bootm.image="${path}/zImage"
. /env/data/oftree
oftree=${path}/oftree
if [ -f $oftree ]; then
global.bootm.oftree="$oftree"
fi
# The rootdevice may actually be mmcblk1p2 if a card
# is inserted to the back MMC slot
global.linux.bootargs.dyn.root="root=/dev/sda2"

View File

@ -0,0 +1,21 @@
#!/bin/sh
if [ "$1" = menu ]; then
boot-menu-add-entry "$0" "AHCI (UEFI boot partiton)"
exit
fi
path="/mnt/ahci-boot"
global.bootm.image="${path}/zImage"
. /env/data/oftree
oftree=${path}/oftree
if [ -f $oftree ]; then
global.bootm.oftree="$oftree"
fi
# The rootdevice may actually be mmcblk1p2 if a card
# is inserted to the back MMC slot
global.linux.bootargs.dyn.root="root=/dev/sda2"

21
arch/arm/boards/highbank/env/boot/mmc vendored Normal file
View File

@ -0,0 +1,21 @@
#!/bin/sh
if [ "$1" = menu ]; then
boot-menu-add-entry "$0" "MMC slot"
exit
fi
path="/mnt/mmc"
global.bootm.image="${path}/zimage"
. /env/data/oftree
oftree=${path}/oftree
if [ -f $oftree ]; then
global.bootm.oftree="$oftree"
fi
# The rootdevice may actually be mmcblk1p2 if a card
# is inserted to the back MMC slot
global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2"

View File

@ -0,0 +1,21 @@
#!/bin/sh
if [ "$1" = menu ]; then
boot-menu-add-entry "$0" "MMC slot (UEFI boot partiton)"
exit
fi
path="/mnt/mmc-boot"
global.bootm.image="${path}/zimage"
. /env/data/oftree
oftree=${path}/oftree
if [ -f $oftree ]; then
global.bootm.oftree="$oftree"
fi
# The rootdevice may actually be mmcblk1p2 if a card
# is inserted to the back MMC slot
global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2"

18
arch/arm/boards/highbank/env/boot/net vendored Normal file
View File

@ -0,0 +1,18 @@
#!/bin/sh
if [ "$1" = menu ]; then
boot-menu-add-entry "$0" "network (tftp, nfs) (eth0)"
exit
fi
ethact eth0
path="/mnt/tftp"
. /env/data/oftree
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
global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=$nfsroot,v3,tcp"

View File

@ -0,0 +1,18 @@
#!/bin/sh
if [ "$1" = menu ]; then
boot-menu-add-entry "$0" "network (tftp, nfs) (eth1)"
exit
fi
ethact eth1
path="/mnt/tftp"
. /env/data/oftree
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
global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=$nfsroot,v3,tcp"

View File

@ -1,33 +0,0 @@
#!/bin/sh
# use 'dhcp' to do dhcp in barebox and in kernel
# use 'none' if you want to skip kernel ip autoconfiguration
ip=dhcp
global.dhcp.vendor_id=barebox-highbank
# or set your networking parameters here
#eth0.ipaddr=a.b.c.d
#eth0.netmask=a.b.c.d
#eth0.gateway=a.b.c.d
#eth0.serverip=a.b.c.d
# can be either 'nfs', 'tftp' or 'nor'
kernel_loc=tftp
# can be either 'net', 'nor' or 'initrd'
rootfs_loc=initrd
# can be either 'jffs2' or 'ubifs'
rootfs_type=ubifs
rootfsimage=root.$rootfs_type
kernelimage=zImage
#kernelimage=uImage
#kernelimage=Image
#kernelimage=Image.lzo
autoboot_timeout=3
bootargs="console=ttyAMA0,115200n8 CONSOLE=/dev/ttyAMA0"
# set a fancy prompt (if support is compiled in)
PS1="\e[1;31m[barebox@\h]:\w\e[0m\n# "

View File

@ -0,0 +1,11 @@
#!/bin/sh
# board defaults, do not change in running system. Change /env/config
# instead
global.hostname=highbank
global.allow_color=true
global.autoboot_timeout=3
global.bootm.oftree="/dev/dtb"
global.linux.bootargs.base="console=ttyAMA0,115200n8 CONSOLE=/dev/ttyAMA0"
global.boot.default=/env/boot.d

View File

@ -0,0 +1,4 @@
#!/bin/sh
#device tree provided by the firmware
global.bootm.oftree="/dev/dtb"

View File

@ -0,0 +1,27 @@
#!/bin/sh
if [ "$1" = menu ]; then
init-menu-add-entry "$0" "Automountpoints"
exit
fi
# automount tftp server based on $eth0.serverip
mkdir -p /mnt/tftp
automount /mnt/tftp 'ifup eth0 && mount -t tftp $eth0.serverip /mnt/tftp'
# SD card slot, boot partition
mkdir -p /mnt/mmc-boot
automount -d /mnt/mmc 'mount /dev/disk0.boot /mnt/mmc-boot'
# SD card slot, first partition
mkdir -p /mnt/mmc
automount -d /mnt/mmc 'mount /dev/disk0.0 /mnt/mmc'
# AHCI, boot partition
mkdir -p /mnt/ahci-boot
automount -d /mnt/ahci 'mount /dev/ata0.boot /mnt/ahci-boot'
# AHCI, first partition
mkdir -p /mnt/ahci
automount -d /mnt/ahci 'mount /dev/ata0.0 /mnt/ahci'

9
arch/arm/boards/highbank/env/init/ps1 vendored Normal file
View File

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

View File

@ -12,6 +12,7 @@ choice
config MACH_HIGHBANK
bool "Calxeda Highbank"
select HAVE_DEFAULT_ENVIRONMENT_NEW
endchoice