2014-05-22 13:16 GMT-07:00 André Valentin <[email protected]>:
>
> Signed-off-by: André Valentin <[email protected]>
> ---
>  .../base-files/lib/upgrade/platform.sh             |  108 
> ++++++++++++++++++++
>  1 file changed, 108 insertions(+)
>  create mode 100755 
> target/linux/bcm53xx_brcm/base-files/lib/upgrade/platform.sh
>
> diff --git a/target/linux/bcm53xx_brcm/base-files/lib/upgrade/platform.sh 
> b/target/linux/bcm53xx_brcm/base-files/lib/upgrade/platform.sh
> new file mode 100755
> index 0000000..0c7680e
> --- /dev/null
> +++ b/target/linux/bcm53xx_brcm/base-files/lib/upgrade/platform.sh
> @@ -0,0 +1,108 @@
> +#
> +# Copyright (C) 2011 OpenWrt.org
> +#
> +
> +#. /lib/ar71xx.sh
> +
> +PART_NAME=firmware
> +#RAMFS_COPY_DATA=/lib/ar71xx.sh
> +
> +CI_BLKSZ=131072
> +CI_LDADR=0x80060000

These constants are unused, also I would not use them as they seem to
be from MIPS, ARM has a different memory mapping.

> +
> +platform_find_partitions() {
> +       local first dev size erasesize name
> +       while read dev size erasesize name; do
> +               name=${name#'"'}; name=${name%'"'}
> +               case "$name" in
> +                       
> vmlinux.bin.l7|vmlinux|kernel|linux|linux.bin|rootfs|filesystem)
> +                               if [ -z "$first" ]; then
> +                                       first="$name"
> +                               else
> +                                       echo "$erasesize:$first:$name"
> +                                       break
> +                               fi
> +                       ;;
> +               esac
> +       done < /proc/mtd
> +}
> +
> +platform_find_kernelpart() {
> +       local part
> +       for part in "${1%:*}" "${1#*:}"; do
> +               case "$part" in
> +                       vmlinux.bin.l7|vmlinux|kernel|linux|linux.bin)
> +                               echo "$part"
> +                               break
> +                       ;;
> +               esac
> +       done
> +}
> +
> +platform_do_upgrade_nand() {

Besides this function, everything else looks like it could be shared
in a common location.
-- 
Florian
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to