summaryrefslogtreecommitdiffstats
path: root/defaultenv
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2011-12-14 21:30:58 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2011-12-15 11:07:15 +0100
commit52fac4b1ff5da3deff3e9f0cae681ff23337c1f1 (patch)
treeb6428d6eb2cdabeef48844dd8ef48a5077ee0e1f /defaultenv
parentd9d9c41f776a4b4744592ab0fb64398bb8ff6636 (diff)
downloadbarebox-52fac4b1ff5da3deff3e9f0cae681ff23337c1f1.tar.gz
barebox-52fac4b1ff5da3deff3e9f0cae681ff23337c1f1.tar.xz
defaultenv: simplify boot
Now that we have a bootm command which boots everything we can simplify the defaultenvironment. We can call bootm on every image type and can remove the kernelimage_type variables. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'defaultenv')
-rw-r--r--defaultenv/bin/boot43
-rw-r--r--defaultenv/config5
2 files changed, 4 insertions, 44 deletions
diff --git a/defaultenv/bin/boot b/defaultenv/bin/boot
index 90ebf9a3d..11207573c 100644
--- a/defaultenv/bin/boot
+++ b/defaultenv/bin/boot
@@ -72,35 +72,12 @@ if [ -n $mtdparts ]; then
bootargs="${bootargs} mtdparts=${mtdparts}"
fi
-if [ ! -e /dev/ram0.kernelraw ]; then
- # arm raw kernel images are usually located at sdram start + 0x8000
- addpart /dev/ram0 8M@0x8000(kernelraw)
-fi
-
-if [ ! -e /dev/ram0.kernel ]; then
- # Here we can safely put the kernel without risking of overwriting it
- # while extracting
- addpart /dev/ram0 8M@8M(kernel)
-fi
-
if [ x$kernel_loc = xnfs -o x$kernel_loc = xtftp ]; then
if [ x$ip = xdhcp ]; then
dhcp
fi
- if [ $kernelimage_type = uimage ]; then
- netload="/dev/ram0.kernel"
- elif [ $kernelimage_type = zimage ]; then
- netload="/dev/ram0.kernel"
- elif [ $kernelimage_type = raw ]; then
- netload="/dev/ram0.kernelraw"
- elif [ $kernelimage_type = raw_lzo ]; then
- netload="/dev/ram0.kernel"
- else
- echo "error: set kernelimage_type to one of 'uimage', 'zimage', 'raw' or 'raw_lzo'"
- exit 1
- fi
- $kernel_loc $kernelimage $netload || exit 1
- kdev="$netload"
+ kdev=/image
+ $kernel_loc $kernelimage $kdev || exit 1
elif [ x$kernel_loc = xnor ]; then
kdev="/dev/nor0.kernel"
elif [ x$kernel_loc = xnand ]; then
@@ -112,18 +89,6 @@ else
exit 1
fi
-echo "booting kernel of type $kernelimage_type from $kdev"
+echo "booting kernel from $kdev"
-if [ x$kernelimage_type = xuimage ]; then
- bootm $bootm_opt $kdev
-elif [ x$kernelimage_type = xzimage ]; then
- bootz $kdev
-elif [ x$kernelimage_type = xraw ]; then
- if [ $kernel_loc != net ]; then
- cp $kdev /dev/ram0.kernelraw
- fi
- bootu /dev/ram0.kernelraw
-elif [ x$kernelimage_type = xraw_lzo ]; then
- uncompress $kdev /dev/ram0.kernelraw
- bootu /dev/ram0.kernelraw
-fi
+bootm $bootm_opt $kdev
diff --git a/defaultenv/config b/defaultenv/config
index 0aaead5cc..98662735e 100644
--- a/defaultenv/config
+++ b/defaultenv/config
@@ -31,14 +31,9 @@ rootfsimage=rootfs-${machine}.$rootfs_type
# where is the kernel image in case of 'kernel_loc=disk'
kernel_part=disk0.2
-# The image type of the kernel. Can be uimage, zimage, raw, or raw_lzo
-kernelimage_type=zimage
kernelimage=zImage-$machine
-#kernelimage_type=uimage
#kernelimage=uImage-$machine
-#kernelimage_type=raw
#kernelimage=Image-$machine
-#kernelimage_type=raw_lzo
#kernelimage=Image-$machine.lzo
bareboximage=barebox-${machine}.bin