Re: [OpenWrt-Devel] Cannot flash UBNT Loco M2

2016-03-14 Thread Gerry Rozema



On 2016-03-12 05:08 AM, John Crispin wrote:
Hi Matthias looking at a US and EU image i see only 1 bit changed in 
the header. and reading what you wrote above it sound like a small 
change to our image generation process will make EU unit flashable 
again ? if so do we have a patch or could you tell me which unit to 
order on amazon.de that has the latest uboot with this bug fix so i 
can fix the regression in trunk.


You dont need to order a new unit to create a unit with the issue. Start 
with any unit you have on hand, flash it back to AirOS with an older 
AirOS version, then upgrade it thru the web interface to the latest 5.6 
of AirOS.  Now you will have a unit with the new 'improved' u-boot, 
which leaves the flash as read-only when it starts the kernel.

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Question regarding call python script

2016-03-14 Thread Jason Wu



On 14/03/2016 5:20 PM, John Crispin wrote:



On 14/03/2016 03:55, Jason Wu wrote:



On 13/03/2016 8:41 PM, Bastian Bittorf wrote:

Using n-dimensional arrays in build scripts is
a rare usecase. you can easily switch to AWK if this
fits more. But using Perl or Python should be avoided,
because it adds more complexity to the dependencies
and leads to more headache when maintaining:


Just to be sure, are you saying that we should also avoid indexed array
in bash? It is possible to create n-dimensional arrays with indexed
array. The main reason for this is to be sure that I am on the right track.

IMHO, every script language has it own pros and cons. But for a complex
build system (such as buildroot/openwrt), consistency, compatibility and
dependencies are difficult to maintain and also makes difficult for
testing (the number of possible test required to ensure the
compatibility increases exponential as we add more dependency). For
example, RHEL5 uses bash version 3.x which does not support associated
array. Sometimes some of the dependency can be avoid and best to avoid
from maintainers point of view.

Jason
_


please explain what problem you have that requires arrays to solve it.

John


Hi John

I am creating a Image Tree Source (ITS) generator script which allows 
user to passing to the image properties such as image type 
(kernel/ftd/rootfs) or hash algorithm, signature, compression, entry 
point and load addr, and which configuration properties. Since the ITS 
allows multiple images (multiple kernel/fdt/rootfs) and multiple 
configuration so two dimension array was used to store the data.


The main reason I asked is because the solution can be implemented as 
simple structure (like Bastian suggested) or used indexed arrays. I 
guess my question which is preferred in OpenWrt community.


Jason
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Question regarding call python script

2016-03-14 Thread John Crispin


On 14/03/2016 03:55, Jason Wu wrote:
> 
> 
> On 13/03/2016 8:41 PM, Bastian Bittorf wrote:
>> Using n-dimensional arrays in build scripts is
>> a rare usecase. you can easily switch to AWK if this
>> fits more. But using Perl or Python should be avoided,
>> because it adds more complexity to the dependencies
>> and leads to more headache when maintaining:
> 
> Just to be sure, are you saying that we should also avoid indexed array
> in bash? It is possible to create n-dimensional arrays with indexed
> array. The main reason for this is to be sure that I am on the right track.
> 
> IMHO, every script language has it own pros and cons. But for a complex
> build system (such as buildroot/openwrt), consistency, compatibility and
> dependencies are difficult to maintain and also makes difficult for
> testing (the number of possible test required to ensure the
> compatibility increases exponential as we add more dependency). For
> example, RHEL5 uses bash version 3.x which does not support associated
> array. Sometimes some of the dependency can be avoid and best to avoid
> from maintainers point of view.
> 
> Jason
> _

please explain what problem you have that requires arrays to solve it.

John


__
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Question regarding call python script

2016-03-14 Thread Bastian Bittorf
* Jason Wu  [14.03.2016 07:39]:
> Just to be sure, are you saying that we should also avoid indexed
> array in bash? It is possible to create n-dimensional arrays with
> indexed array. The main reason for this is to be sure that I am on
> the right track.

"Complexity is a cost, spend it wisely."

ofcourse it depends on your usecase. I'am really not in
the position to decide anything, but if you ask me:
stick to portable constructs...

bye, bastian
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel