On 30/05/12 23:07, Luka Perkov wrote:
>> 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
I don't mind changing it to that approach, we discussed it and the resulting
solution you suggested is perfectly fine as well.
However, I'll obviously add to what is currently in the tree when adding a new
board instead.
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel