ar71xx: rewrite prom code (based on a patch by Jeff Hansen)
[openwrt.git] / target / linux / olpc / base-files / lib / upgrade / platform.sh
1 platform_check_image() {
2 [ "$ARGC" -gt 1 ] && return 1
3
4 case "$(get_magic_word "$1")" in
5 48eb) return 0;;
6 *)
7 echo "Invalid image type"
8 return 1
9 ;;
10 esac
11 }
12
13 platform_do_upgrade() {
14 get_image "$1" > /dev/hda
15 sync
16 }
17
18 x86_prepare_ext2() {
19 # if we're running from ext2, we need to make sure that we have a mtd
20 # partition that points to the active rootfs partition.
21 # however this only matters if we actually need to preserve the config files
22 [ "$SAVE_CONFIG" -eq 1 ] && return 0
23 grep rootfs /proc/mtd >/dev/null || {
24 echo /dev/hda2,65536,rootfs > /sys/module/block2mtd/parameters/block2mtd
25 }
26 }
27 append sysupgrade_pre_upgrade x86_prepare_ext2
This page took 0.048741 seconds and 5 git commands to generate.