Giter VIP home page Giter VIP logo

openwrt-seeed-carrier-board's Introduction

openwrt-seeed-carrier-board

Warning

This article is actual only for openwrt releases < 22.03.0-rc1.
Newer ones are already have all required drivers and modules out of the box.

This repo contains instructions how to install Current Stable Release - OpenWrt 21.02.1 to seeed carrier board

image

Congratulations ! You are happy owner of Dual Gigabit Mini Router/PC raspberry pi 4 board :)

So what is the problem

This board typically have openwrt firmware preinstalled. The problem is that seeed openwrt versions are built on top of openwrt snapshots.
Snapshot version is often unstable, incompatible with the stable release and quickly changes.
It means that if you need to install some package (for example ebtables) that depends on kernel module kmod-* it is often impossible (due to kernel incompatibility) without rebuilding everything from scratch.

From another side seeed custom builds contains a lot of pre-installed software that you don't need in most of the cases and have to manually remove/uninstall to get stable work of the board.

Why do you need to install official openwrt stable release

This is a stable and well tested openwrt release.
It contains a lot of packages, and you have a freedom to install any software without facing incompatibility issues.

What is the current stable release of openwrt for seeed carrier board

At the moment there is OpenWrt 21.02.1 release for seeed carrier board

How to install official openwrt release to seeed carrier board

How to make the second ethernet adapter working

Once this PR will be merged and new version of openwrt released ethernet adapter will be working after opkg install kmod-usb-net-lan78xx.

Until it's done:

The second ethernet adapter requires lan78xx driver.
The problem is that official release doesn't include it and we have to compile it separately.
The goods news is that I've already done that for you :)

To make it work you need:

  1. Download the driver to your carrier board (remember it's compatible only with the release 21.02.1)
  2. Copy to the /lib/modules/5.4.154/lan78xx.ko
  3. Create a file /etc/modules.d/lan78 with one line lan78xx
  4. Reboot and check dmesg
  5. If you see something like
[    8.563700] 8021q: adding VLAN 0 to HW filter on device eth1

It means that driver is successfully loaded and new adapter is ready to work

ip l show eth1
3: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN qlen 1000```
    link/ether 2c:f7:f1:1b:eb:c5 brd ff:ff:ff:ff:ff:ff

How to make wifi module working

This board has Wi-Fi module, but it doesn't work with the official openwrt release.

Once this PR merged and released in new openwrt version it should be working out of the box.

Until it's done:

  1. Install packages opkg install kmod-brcmfmac cypress-nvram-43455-sdio-rpi-4b
  2. Copy firmware cp /lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt /lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-compute-module.txt
  3. Reboot and check dmesg
  4. If you see something like
[    7.297796] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[    7.456529] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[    7.474797] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Mar 23 2020 02:20:01 version 7.45.206 (r725000 CY) FWID 01-febaba43
[    7.515582] usbcore: registered new interface driver brcmfmac

It means that wlan driver is successfully loaded is ready to work

ip l show wlan0
8: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether e4:5f:01:3d:2c:8e brd ff:ff:ff:ff:ff:ff

Initial /dev/root partition is too small

Indeed, when you install official openwrt firmware by default root partition is only about 104Mb.
But this board has an emmc storage with 32Gb, 104Mb for root partition is ridiculously small.
Let's fix it and increase up to 4Gb.
We need to increase the partition /dev/mmcblk0p2 of /dev/mmcblk0 device and resize ext4 fs on that partition.

To make it possible I recommend installing the following packages:

opkg install lsblk resize2fs tune2fs fdisk

Step by step instructions:

  1. fdisk /dev/mmcblk0 then press p
Disk /dev/mmcblk0: 29.12 GiB, 31268536320 bytes, 61071360 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x26a7c3c5

Device         Boot  Start     End Sectors Size Id Type
/dev/mmcblk0p1 *      8192  139263  131072  64M  c W95 FAT32 (LBA)
/dev/mmcblk0p2      147456  352256  360448  104M 83 Linux

Remember start sector of the second partition (in my case it is 147456) 2) press d then 2

Partition 2 has been deleted.
  1. press n then p then 2 then type first sector 147456 then +4G
Created a new partition 2 of type 'Linux' and of size 4 GiB.
Partition #2 contains a ext4 signature.
  1. If asked Do you want to remove the signature? press N
  2. press w
  3. Reboot
  4. Resize fs on /dev/root by running command resize2fs /dev/mmcblk0p2
  5. If everything goes ok you should see something like
df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 3.9G    108.0M      3.8G   3% /
tmpfs                     1.9G     13.6M      1.8G   1% /tmp
/dev/mmcblk0p1           63.9M     15.7M     48.2M  25% /boot
tmpfs                   512.0K         0    512.0K   0% /dev
  1. Viola :) /dev/root partition has been successfully increased !

If you are experiencing problems and see errors like:

  • resize2fs: Invalid argument While checking for on-line resizing support
  • resize2fs: Invalid argument While trying to add group #1

Try the following steps:

  1. Stop all services using this partition.
  2. mount / -o remount,ro
  3. tune2fs -O^resize_inode /dev/mmcblk0p2
  4. fsck.ext4 /dev/mmcblk0p2
  5. Reboot
  6. resize2fs /dev/mmcblk0p2

openwrt-seeed-carrier-board's People

Contributors

sergey-brutsky avatar

Stargazers

Alvaro Ruiz avatar MDSDTech avatar  avatar  avatar  avatar  avatar

Watchers

James Cloos avatar  avatar stynoo avatar  avatar MDSDTech avatar

openwrt-seeed-carrier-board's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.