On Wed, May 30, 2012 at 11:18:30AM +0300, Daniel Golle wrote:
> This adds userspace support for the ALL6000.
> I'll add sysupgrade, and firstboot/preinit in the next days, so things will
> work smoothly with UBIFS as (rom) rootfs.
>
> Signed-off-by: Daniel Golle <[email protected]>
>
> diff --git a/target/linux/kirkwood/base-files/etc/uci-defaults/network
> b/target/linux/kirkwood/base-files/etc/uci-defaults/network
> index 48c1232..70918ef 100644
> --- a/target/linux/kirkwood/base-files/etc/uci-defaults/network
> +++ b/target/linux/kirkwood/base-files/etc/uci-defaults/network
> @@ -32,6 +32,10 @@ case "$hardware" in
> set_lan_dhcp "eth0"
> ;;
>
> +"Allnet ALL6000")
> + ucidef_set_interface_lan "eth0 eth1"
> + ;;
> +
> *)
> ucidef_set_interface_lan "eth0"
> ;;
ACK.
> diff --git a/target/linux/kirkwood/base-files/etc/uci-defaults/ubootenv
> b/target/linux/kirkwood/base-files/etc/uci-defaults/ubootenv
> new file mode 100644
> index 0000000..a3447e1
> --- /dev/null
> +++ b/target/linux/kirkwood/base-files/etc/uci-defaults/ubootenv
> @@ -0,0 +1,37 @@
> +#!/bin/sh
> +#
> +# Copyright (C) 2012 OpenWrt.org
> +#
> +
> +add_ubootenv() {
> + local dev=$1
> + local offset=$2
> + local envsize=$3
> + local secsize=$4
> + local numsec=$5
> + uci batch <<EOF
> +add ubootenv ubootenv
> +set ubootenv.@ubootenv[-1].dev='$dev'
> +set ubootenv.@ubootenv[-1].offset='$offset'
> +set ubootenv.@ubootenv[-1].envsize='$envsize'
> +set ubootenv.@ubootenv[-1].secsize='$secsize'
> +set ubootenv.@ubootenv[-1].numsec='$numsec'
> +EOF
> +}
> +
> +[ -e /etc/config/ubootenv ] && exit 0
> +
> +touch /etc/config/ubootenv
> +
> +. /lib/kirkwood.sh
> +
> +hardware=$(kirkwood_hardware_name)
> +
> +case "$hardware" in
> +Allnet ALL6000)
> + add_ubootenv /dev/mtd1 0x0 0x20000 0x20000
> + ;;
> +
> +esac
> +
> +uci commit ubootenv
I dont like this one. We should use this approach:
https://lists.openwrt.org/pipermail/openwrt-devel/2012-May/015456.html
Luka
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel