#!/bin/sh

mmc_init() {
  base_dir="/media/hostfw"
  ro_dir="${base_dir}/running-ro"
  running_dir="${base_dir}/running"
  prsv_dir="${base_dir}/prsv"
  staging_dir="${base_dir}/staging"

  if [ ! -d "${ro_dir}" ]; then
    mkdir -p "${ro_dir}"
  fi
  if [ ! -d "${running_dir}" ]; then
    mkdir -p ${running_dir}
  fi
  if [ ! -d "${prsv_dir}" ]; then
    mkdir -p "${prsv_dir}"
  fi
  if [ ! -d "${staging_dir}" ]; then
    mkdir -p "${staging_dir}"
  fi

  # Mount the image that corresponds to the boot label as read-only to be used
  # to populate the running directory.
  boot_label="$(fw_printenv -n bootside)"
  if ! grep -q "${ro_dir}" /proc/mounts; then
    mount ${base_dir}/hostfw-"${boot_label}" ${ro_dir} -o ro
  fi

  # Determine if the running dir contains the running version
  running_label=""
  running_label_file="${running_dir}/partlabel"
  if [ -f "${running_label_file}" ]; then
    running_label=$(cat ${running_label_file})
  fi
  if [ "${running_label}" != "${boot_label}" ]; then
    # Copy off the preserved partitions
    # A line in the pnor.toc (81e00994.lid) looks like this:
    # partition05=SECBOOT,0x00381000,0x003a5000,00,ECC,PRESERVED
    rm -f ${prsv_dir}/*
    if [ -f "${ro_dir}/81e00994.lid" ]; then
      prsvs=$(grep PRESERVED "${ro_dir}/81e00994.lid")
      for prsv in ${prsvs}; do
        prsv=${prsv##partition*=}
        prsv=$(echo "${prsv}" | cut -d "," -f 1)
        if [ -L "${running_dir}/${prsv}" ]; then
          # Preserve the symlink target file
          prsv="$(readlink "${running_dir}/${prsv}")"
          cp -p ${running_dir}/"${prsv}" ${prsv_dir}
        fi
      done
    fi

    # Copy lid contents of running image to running dir
    rm -f ${running_dir}/*
    cp -p ${ro_dir}/*.lid ${running_dir}/

    # Restore the preserved partitions. Ignore error, there may be none.
    cp -p ${prsv_dir}/* ${running_dir}/ 2>/dev/null || true
    rm -f "${prsv_dir:?}/"*

    # Clean up the staging dir in case of a failed update
    rm -rf "${staging_dir:?}/"*

    # Save the label
    echo "${boot_label}" > "${running_label_file}"

  fi

  # Mount alternate dir
  if [ "${boot_label}" = "a" ]; then
    alternate_label="b"
  else
    alternate_label="a"
  fi
  alternate_dir="${base_dir}/alternate"
  if [ ! -d "${alternate_dir}" ]; then
    mkdir -p ${alternate_dir}
  fi
  if ! grep -q "${alternate_dir}" /proc/mounts; then
    mount ${base_dir}/hostfw-${alternate_label} ${alternate_dir} -o ro
  fi
}

mmc_patch() {
  # Patching is disabled if field mode is set
  if [ "$(fw_printenv fieldmode 2>/dev/null)" = "fieldmode=true" ]; then
    return 0
  fi

  boot_label="$(fw_printenv -n bootside)"
  if [ "${boot_label}" = "a" ]; then
    alternate_label="b"
  else
    alternate_label="a"
  fi

  # Create patch directories
  patch_dir="/media/hostfw/patch-"
  running_patch_dir="${patch_dir}${boot_label}"
  if [ ! -d "${running_patch_dir}" ]; then
    mkdir -p "${running_patch_dir}"
  fi
  alternate_patch_dir="${patch_dir}${alternate_label}"
  if [ ! -d "${alternate_patch_dir}" ]; then
    mkdir -p "${alternate_patch_dir}"
  fi

  # Create patch symlinks
  symlink_base="/usr/local/share"
  if [ ! -d "${symlink_base}" ]; then
    mkdir -p "${symlink_base}"
  fi
  hostfw_symlink_base="${symlink_base}/hostfw"
  if [ ! -d "${hostfw_symlink_base}" ]; then
    mkdir -p "${hostfw_symlink_base}"
  fi

  if [ "$(readlink -f "${symlink_base}/pnor")" != "${running_patch_dir}" ]; then
    ln -s "${running_patch_dir}" "${symlink_base}/pnor"
  fi
  if [ "$(readlink -f "${hostfw_symlink_base}/running")" != "${running_patch_dir}" ]; then
    ln -s "${running_patch_dir}" "${hostfw_symlink_base}/running"
  fi
  if [ "$(readlink -f "${hostfw_symlink_base}/alternate")" != "${alternate_patch_dir}" ]; then
    ln -s "${alternate_patch_dir}" "${hostfw_symlink_base}/alternate"
  fi
}

case "$1" in
  mmc-init)
    mmc_init
    ;;
  mmc-patch)
    mmc_patch
    ;;
  *)
    echo "Invalid argument"
    exit 1
    ;;
esac
