Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
OpenWRT on Orange Pi Zero using Armbian uBoot and Kernel
Guide:
1. Install Armbian_5.24.161216_Orangepizero_Ubuntu_xenial_3.4.113.img onto a uSD card using Win32DiskImager or Ubuntu Disk Image Writer
2. (Optional) Mount the uSD in Ubuntu Laptop and expand the partition using GParted.
3. Delete everything from uSD except /boot, /lib/modules and /lib/firmware.
4. Mount openwrt-15.05.1-sunxi-root.ext4 on Ubuntu using loopback interface on /mnt/openwrt
#mount -o loop openwrt-15.05.1-sunxi-root.ext4 /mnt/openwrt
5. Copy over the contents of /mnt/openwrt to the root of uSD by merging folders when prompted.
6. Modify /etc/init.d/boot and add 'ulimit -n 10000' before '/sbin/kmloader' command (line39).
7. Change directory to /lib/modules/3.4.113-sun8i - "#cd /lib/modules/3.4.113-sun8i"
8. Create link-ko.sh - "#touch link-ko.sh"
9. Edit link-ko.sh - "#nano link-ko.sh"
10. Copy the below contents into that file, save (Ctrl + O) and close (Ctrl + X) file.
for x in `find -name *.ko`
do
ln -s $x .
done
11. Then make link-ko.sh executable - "#chmod +x link-ko.sh"
12. Execute link-ko.sh - "#./link-ko.sh"
13. To enable WiFi - #printf "xradio_wlan\nxradio_wlan" >> /etc/modules.d/xradio_wlan
14. Replace Lan section in /etc/config/network with the below. (You can customize the below to suit you LAN and Router configuration.)
Option 1:
config interface 'lan'
option proto 'static'
option netmask '255.255.255.0'
option ipaddr '192.168.1.1'
option ifname 'eth0'
Option 2:
config interface 'lan'
option proto 'dhcp'
option ifname 'eth0'
15. Transfer the uSD to OPiZero and power up.
16. 'telnet 192.168.1.1', update password using '#passwd root' and then exit.
If you are unable to login,
wait for 10 mins to complete first boot up,
switch off OPiZero,
remove uSD and
repeat steps from network configuration using /etc/config/network
17. 'ssh 192.168.1.1' - peace.
Notes:

dodolloh commented Jan 4, 2017

can u explain about step 7.
i found error in step 7.
it is make file. sh? or just type in terminal
thx 4 attention.
please replay...

dodolloh commented Jan 5, 2017

nice.....
thx bro

Owner

praveenbm5 commented Jan 5, 2017

Hello Dodolloh,

I have elaborated the previous step 7 into finer steps. Let me know if you still run into difficulties.

hillz2 commented Jan 26, 2017

What are the bugs you've found so far ?

Hi @praveenbm5,

I'am stuck at step 14 because there is no file named "network" in the directory of "/etc/config/" on the uSD card.

I think that the only difference I made was using "Armbian5.25Orangepizero_Ubuntu_xenial_default_3.4.113.img" image instead of your image you used in your document "Armbian5.24.161216Orangepizero_Ubuntu_xenial_3.4.113.img"

What do you suggest in this point?

Regards,

capture

darkcurrent commented Feb 18, 2017 edited

Hi again,

  1. I can not find "network" file so I created a file named "network" and put the static and dhcp config rows as you mentioned in step 14.
  2. When i transfer uSD to my orangepi zero and power it, ethernet lights gets off state in a short while and the leds on da orangepi zero board keep itself on (green led).
  3. Telnet and SSH connections wont work neither because there is no ethernet connection after powering up the board as i stated in second article

So what is your opinion @praveenbm5?

If you could help me, I'd appreciate it.

Regards,

would u share the /etc/config/wireless and network files

EUA commented Apr 22, 2017 edited

This also works with LEDE
Only missing thing is WiFi interface at Luci.
Do you know that how to enable it?
PS: Here is how to do. :)

15. Enable wifi radio device, put this into /etc/config/wireless:

config wifi-device radio0
        option type     'mac80211'
        option channel  'auto'
        option path 'platform/soc/1c10000.mmc/mmc_host/mmc1/mmc1:0001/mmc1:0001:1'

Unfortunately, only could scan the WiFi. Not connects or AP mode via Luci, yet...

step 10 : why create a script "link-ko.sh ?
when you run the script "link-ko.sh" > error

Hi Guys, I am dying to know how to use this as AP mode via Luci.. I've already taken a little effort. But still no use. Can somebody help me ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment