Env.txt or similar on OpenWrt?


is there a uEnv.txt or simular on openwrt that allow to adjust the boot.scr - I was wanting to enable some uarts on my orange pi


Can you link to the tool and documention youre referring to?


oopsI names it wrong I missed the the "u" uEnv.txt

I wanted to add the overlay=uart1 uart2

example from an armbian uEnv.txt to add extra uarts to it

overlays=usbhost2 usbhost3 uart1 uart2


I think so , but how to achieve what your after is out of my knowledge at present.


out of my knowledge base too - being trying to figure it out all day


While waiting for other people to see this thread, can you elaborate on what you wanted to achieve? Some kind of dual boot option or something?


The openwrt way to access uboot parameters being that most installs are intended to be as non-restrictive as possible...... is to leave the OEM uboot in place.

I don't know about the release for that device...... but there is a fair chance owrt did not overwrite your uboot so it would be in the manufacturer's/seller's docs..... ( uEnv.txt support ), chances are though.... modding friendly devices do.....

What filesystem etc. is another story.

So, in owrt you should find a file ( cat /etc/fw_env.config ) which states the FLASH -UENV ( ART? ) partition location and size.

You can then use the utility fw_printenv / fw_setenv ( if they are installed ) to modify those parameters from within the running linux kernel ready for uboot's next appearance.. Allowing for superior dynamocity.

Here is a half decent half applicable guide on such a topic..... Which might also be of use in figuring out what to set, when where to set it is half clear :wink:

For tinkering..... you can't beat a serial connection and BOOTARGS..... :slight_smile:


hi what I am trying to do is nothing that much as dual boot I was just trying to get my other Uarts to load in to the kernel (ttyS1 and ttyS2 ). but after a little more digging the armbian UEnv.txt mentioned above, is used to load device tree overlays.. which I am not sure openwrt supports..
i tried to figure out how to get those uart to detect in openwrt to no avail..

i tried the armbian/openwrt hybrid method -- but that breaks the wifi for luci - everything else works great that way i have full access to all gpio pins and functions of the board and a can use them in any way i want easily -- but for some reason the armbian/hybrid methods breaks the wireless function of luci .. you can scan and see APs you just can not connect or set up AP via luci ..would be great if I could figure that one out too

I guess you can see I am not using Openwrt in a traditional sense. as a basic router platform.. I am using it as IOT platform.. example I use the the banana R1 as a normal household router. but since it supports a ssd harddrive inside the device i also installed Influxdb, chronograf and kapacitor on the openwrt router platform plus collectd with mqtt, snmp, modbus and others collectd-mods.. and the openwrt router acts a traditional route but also as a database collection, and processing with alert function ( ie temperture too cold or other error condition sent from a Node device an email is sent to my phone alerting me of the problem).

the reason I want to get the built in ttyS1 7 ttyS2 to work on OrangePi device is that I wanted to connect serial GPS to it - it works fine via usb connection already -but as I was building a NoDE for automobiles data tracking either live connection or offline once in range data ( 2.4wifi ) loading .. via influxdb and Rsync to upload Tracks to my openwrt BPI-R1.database sever but also upload OBD information from the cars computer to influxdb.. - i can place the device in the back window of the auto and can get all the data from the auto where it being how fast they traveled the performance of the car and any error condition that might need servicing. something like poormans lojack but with alot more functionality -- you can easily view your live gps postion with JOSM or on google earth
I Like to Use openwrt platform because it light has a nice user interface for connectivity - why reinvent the wheel


and for those who are curious here a live shot from my openwrt -gps tracker that in my car now
viewed on JOSM (JavaOpenStreetMaps)



Seeings as these things are dynamic. An option to consider. ESP8266's run about $6AUD......

There is a firmware for them called esplink. It provides transparent serial over wifi. One per "sensor/input"...... Little coding.... a little more residual power drain but car would be running most of the time anyway. And your not ripping out dashboard every time you gotta tweak.

If the nodes need more features. MQQT libraries + a little custom code later..... Your Openwrt "controller" is now free to deal with assimilation and payload.

I know it's not what you wanted.... and in a purist / containable sense I can see the solidarity in the wires..... ...... some options for you anyway.....


yeah most of my nodes are mostly wemos 2 and wemos 3( arduino/esp hybrid).. that transmit mqqt to my BPI-r1 router where the data in logged..
the orange pi zero is not that expensive only 15$ with case and everything for a quad core 512 memory ( $10 if you do not want the case). to get the cell modem connection for live tracking is very easy on a openwrt device. and to the best of my knowledge gspd does not run on a esp nor gpsd-client which is required for that live gps tracking also python-OBD is required to get and sort data from car computer

ripping out the dash board nothing like that just a bluetooth OBD reader connected to OBD port of the car-- the pi gather the OBS data via a bluetooth serial connection and stores it .. either sends it out live via cell service or batch download once in range of your home wireless.. like I said toss it on the back window and go..


I guess you can see I am not using Openwrt in a traditional sense. as a basic router platform.. I am using it as IOT platform..

No issues at all :slight_smile: if openwrt fits your use case more power to you :+1:. I only asked to help the discussion continue so easier for others to reply knowing full picture .

I agree with you too, i dont think openwrt uses overlays in the same way - changes are typically baked in during compiling phase. So not impossible, but youd probably need to create you own image.


Recently I asked about sth similar Banana Pi R2: Boot partiton, uboot.

If you know how to compile the kernel and you want this arguments to be permanent you can use option Default kernel command... in Boot options of kernel_menuconfig also set Kernel command line type to extend (CONFIG_CMDLINE_EXTEND).


thank you tobix I will give that a try--

but for now if anyone wants to try out gps tracking and sends obd data to database you can try this using usb connected GPS ( verus the all in side one orange pi that i was trying to accomplish here -- but the overall power requirements was to high for the pi to power the wifi gps and Bluetooth all at once ) :frowning:

it design to work with my version of open energy monitor based on openwrt backend

and you can use this howto- to install it to other arm base platforms ( such as BPi-R1)