Difference between revisions of "RT5350F-OLinuXino"

(Release-2 (06 JUL 2015))
(Prebuilt files and system restore)
 
(7 intermediate revisions by the same user not shown)
Line 19: Line 19:
 
The original files can be found at this FTP location:  
 
The original files can be found at this FTP location:  
  
ftp://staging.olimex.com/Ralink/RT5350F-OLinuXino/1.latest_images/
+
https://ftp.olimex.com/Ralink/RT5350F-OLinuXino/1.latest_images/
  
The repository contains six (7) files, two (2) binaries for each variant of Olimex-made RT5350 boards and a text file with a link to u-boot+factory binary that serves as a restore.
+
The repository contains six (7) files, two (2) upgrade binaries for each variant of Olimex-made RT5350 boards; and a text file with a link to u-boot+factory binary that serves as a restore point should a serious problem with u-boot or bootloader appears. The upgrade can be performed over different mediums, but the restore requires a programmer.
  
We have three variants of RT5350F-OLinuXino - RT5350F-OLinuXino, RT5350F-OLinuXino-EVB, and RT5350F-OLinuXino-EVB+ (which is the latest revisions of RT5350F-OLinuXino-EVB, starting revision C, with SD card and reset button, among others).  
+
We have three variants of RT5350F-OLinuXino - RT5350F-OLinuXino, RT5350F-OLinuXino-EVB, and RT5350F-OLinuXino-EVB+ (which is the latest revisions of RT5350F-OLinuXino-EVB, starting revision C, with SD card and reset button, among other difference).  
  
One of the files is meant for u-boot upload, while the other is for luci upload. Read more about the OpenWRT upgrading here:
+
One of the two binary files for each board is meant for u-boot upgrade, while the other is meant for LuCI (web browser interface) upgrade. Read about the upgrade procedures the OpenWRT upgrading here:
  
 
https://openwrt.org/docs/guide-user/installation/generic.sysupgrade
 
https://openwrt.org/docs/guide-user/installation/generic.sysupgrade
Line 309: Line 309:
  
 
== Release-2 (06 JUL 2015) ==
 
== Release-2 (06 JUL 2015) ==
* More info about this software release can be found at this GitHub page: https://github.com/OLIMEX/OLINUXINO/tree/master/SOFTWARE/RT5350F/Prebuilt%20images
+
* More info about this software release can be found at this GitHub page:
 +
<br>
 +
https://github.com/OLIMEX/OLINUXINO/tree/master/SOFTWARE/RT5350F/Prebuilt%20images
 +
 
 
* Upgraded kernel version to 3.18.17
 
* Upgraded kernel version to 3.18.17
 
* Inverted wlan led polarity - this way it blink when WiFi is on
 
* Inverted wlan led polarity - this way it blink when WiFi is on
 
* Fixed firmware partition size - https://github.com/OLIMEX/openwrt/issues/1
 
* Fixed firmware partition size - https://github.com/OLIMEX/openwrt/issues/1

Latest revision as of 01:21, 28 July 2023

RT5350F-OLinuXino official images build instructions

Overview

Quick-start

1. Connect USB<->serial cable between the UART0 pins of the board and your personal computer.

2. Open your favourite serial terminal software on the COM port, created by your USB<->serial cable.

3. Set the baud rate for the connection to 57600.

4. Power on RT5350F-OLinuXino-EVB.

Prebuilt files and system restore

RT5350F-OLinuXino comes with an image loaded into the SPI flash memory. If something goes wrong you can restore the original image.

The original files can be found at this FTP location:

https://ftp.olimex.com/Ralink/RT5350F-OLinuXino/1.latest_images/

The repository contains six (7) files, two (2) upgrade binaries for each variant of Olimex-made RT5350 boards; and a text file with a link to u-boot+factory binary that serves as a restore point should a serious problem with u-boot or bootloader appears. The upgrade can be performed over different mediums, but the restore requires a programmer.

We have three variants of RT5350F-OLinuXino - RT5350F-OLinuXino, RT5350F-OLinuXino-EVB, and RT5350F-OLinuXino-EVB+ (which is the latest revisions of RT5350F-OLinuXino-EVB, starting revision C, with SD card and reset button, among other difference).

One of the two binary files for each board is meant for u-boot upgrade, while the other is meant for LuCI (web browser interface) upgrade. Read about the upgrade procedures the OpenWRT upgrading here:

https://openwrt.org/docs/guide-user/installation/generic.sysupgrade

Upload prebuilt images using uboot

Reboot the board and you'll see:

 U-Boot 1.1.3 (Apr 20 2015 - 13:25:55)
 
 Board: RT5350F-OLinuXino DRAM:  32 MB
 relocate_code Pointer at: 81fb4000
 spi_wait_nsec: 42 
 spi device id: 1c 30 17 1c 30 (30171c30)
 find flash: EN25Q64
 raspi_read: from:30000 len:1000 
 .*** Warning - bad CRC, using default environment
 
 ============================================================= 
 RT5350F-OLinuXino UBoot Version: 4.0.0.0
 --------------------------------------------------------------
 ASIC 5350_MP (Port5<->None)
 DRAM_CONF_FROM: Boot-Strapping 
 DRAM_TYPE: SDRAM 
 DRAM_SIZE: 256 Mbits
 DRAM_WIDTH: 16 bits
 DRAM_TOTAL_WIDTH: 16 bits
 TOTAL_MEMORY_SIZE: 32 MBytes
 Flash component: SPI Flash
 Date:Apr 20 2015  Time:13:25:55
 ============================================ 
 icache: sets:256, ways:4, linesz:32 ,total:32768
 dcache: sets:128, ways:4, linesz:32 ,total:16384 
  ##### The CPU freq = 360 MHZ #### 
  estimate memory size =32 Mbytes
 Please choose the operation: 
    1: Load system code to SDRAM via TFTP. 
    2: Load system code then write to Flash via TFTP. 
    3: Boot system code via Flash (default).
    4: Entr boot command line interface.
    7: Load Boot Loader code then write to Flash via Serial. 
    9: Load Boot Loader code then write to Flash via TFTP.

Upload prebuilt OpenWRT using uboot

Press 2, then y and enter some values for ip, server ip and filename:

 You choosed 2
 2: System Load Linux Kernel then write to Flash via TFTP. 
  Warning!! Erase Linux in Flash then burn new one. Are you sure?(Y/N)
  Please Input new ones /or Ctrl-C to discard
         Input device IP (10.10.10.123) ==:10.10.10.123
         Input server IP (10.10.10.3) ==:10.10.10.3
         Input Linux Kernel filename () ==:file.bin

Then your new system will boot.

Upload prebuilt uboot

Press 9, then again enter ip address, server ip and filename to upload:

 You choosed 9
 
  0 
 raspi_read: from:40028 len:6 
 .
    
 9: System Load Boot Loader then write to Flash via TFTP. 
  Warning!! Erase Boot Loader in Flash then burn new one. Are you sure?(Y/N)  

Press Y and continue:

 Input device IP (10.10.10.123) ==:10.10.10.123

Enter some static address for the device, for example 192.168.0.201.

Next enter server address, for example 192.168.0.15:

 Input server IP (10.10.10.3) ==:192.168.0.15

Finally enter filename:

 Input Uboot filename () ==:bootloader.img

Don't forget to plug LAN cable. You should see something like that:

 Got it
 #####################
 done
 Bytes transferred = 106976 (1a1e0 hex)
 NetBootFileXferSize= 0001a1e0
 raspi_erase_write: offs:0, count:1a1e0
 raspi_erase: offs:0 len:10000
 .
 raspi_write: to:0 len:10000 
 .
 raspi_read: from:0 len:10000 
 .raspi_read: from:10000 len:10000 
 .raspi_erase: offs:10000 len:10000
 .
 raspi_write: to:10000 len:10000 
 .
 raspi_read: from:10000 len:10000 
 .Done!

Upload prebuilt images using programmer tool

We will use ARM-USB-OCD. It has FT2232 chip which can be used to in SPI master mode. You can also use ARM-USB-TINY; ARM-USB-TINY-H; ARM-USB-OCD-H or any FT2232-based debugger.

Connect ARM-USB-OCD with RT5350F-OLinuXino-EVB according the schematic below (for the blue wire GND you can also use other GND pins available at the board; the GND is common):

Arm-usb-ocd.png

RST_RT jumper MUST be closed. Then power the board to become ready writing.

Download flashrom software and build it using instructions on the site.

To program the SPI flash run:

flashrom -p ft2232_spi:type=arm-usb-ocd -w file.bin

Then wait some minutes for process to complete.

Building uboot

Get the sources from:

 git clone https://github.com/OLIMEX/u-boot_RT5350F-OLinuXino
 cd u-boot_RT5350F-OLinuXino

Target must be build with gcc3.4! This is very important because with another versions of GCC the build process will fail. You can find that version from Ralink SDK. Use Google to find it.

Run

 make menuconfig

You'll see that the default location is /opt/buildroot-gcc342/bin. Change that with your path.

To actually build u-boot run:

 make

At the end of the process you'll see something like this

 ===============<<IMPORTANT>>==================
 Notes:Uboot firmware in flash is uboot.img NOT uboot.bin
 ================================================
 
 ./tools/mkimage -A mips -T standalone -C none \
         -a 0x80200000 -e 0x80200000 \
         -n "SPI Flash Image" \
         -r SDR -s 16 -t 32 -u 16 \
         -y 0x0 -z 0x0 -w 0xFF -d uboot.bin uboot.img
 Image Name:   SPI Flash Image
 Created:      Thu May 14 08:23:19 2015
 Image Type:   MIPS Linux Standalone Program (uncompressed)
 Data Size:    106912 Bytes = 104.41 kB = 0.10 MB
 Load Address: 0x80200000
 Entry Point:  0x80200000
 DRAM Parameter: 6 (Parm0=0 Parm1=0)

The image uboot.img can be uploaded via tftp.

Building OpenWRT

OpenWRT 18.06

Download sources:

git clone https://github.com/OLIMEX/openwrt -b evb+/18.06

Go into openwrt directory:

cd openwrt

Update and install feeds:

./scripts/feeds update -a
./scripts/feeds install -a

Apply config:

cat > .config << __EOF__
CONFIG_TARGET_ramips=y
CONFIG_TARGET_ramips_rt305x=y
CONFIG_TARGET_MULTI_PROFILE=y
CONFIG_TARGET_DEVICE_ramips_rt305x_DEVICE_rt5350f-olinuxino=y
CONFIG_TARGET_DEVICE_ramips_rt305x_DEVICE_rt5350f-olinuxino-evb=y
CONFIG_TARGET_DEVICE_ramips_rt305x_DEVICE_rt5350f-olinuxino-evb-plus=y
# CONFIG_FEED_luci is not set
# CONFIG_FEED_packages is not set
# CONFIG_FEED_routing is not set
# CONFIG_FEED_telephony is not set
CONFIG_PACKAGE_block-mount=y
CONFIG_PACKAGE_i2c-tools=y
CONFIG_PACKAGE_kmod-crypto-crc32c=y
CONFIG_PACKAGE_kmod-crypto-hash=y
CONFIG_PACKAGE_kmod-fs-ext4=y
CONFIG_PACKAGE_kmod-fs-ntfs=y
CONFIG_PACKAGE_kmod-fs-vfat=y
CONFIG_PACKAGE_kmod-lib-crc16=y
CONFIG_PACKAGE_kmod-nls-cp437=y
CONFIG_PACKAGE_kmod-nls-iso8859-1=y
CONFIG_PACKAGE_kmod-nls-utf8=y
CONFIG_PACKAGE_kmod-scsi-core=y
CONFIG_PACKAGE_kmod-usb-storage=y
CONFIG_PACKAGE_libiwinfo-lua=y
CONFIG_PACKAGE_liblua=y
CONFIG_PACKAGE_liblucihttp=y
CONFIG_PACKAGE_liblucihttp-lua=y
CONFIG_PACKAGE_libubus-lua=y
CONFIG_PACKAGE_lua=y
CONFIG_PACKAGE_luci=y
CONFIG_PACKAGE_luci-app-firewall=y
CONFIG_PACKAGE_luci-base=y
CONFIG_PACKAGE_luci-lib-ip=y
CONFIG_PACKAGE_luci-lib-jsonc=y
CONFIG_PACKAGE_luci-lib-nixio=y
CONFIG_PACKAGE_luci-mod-admin-full=y
CONFIG_PACKAGE_luci-proto-ipv6=y
CONFIG_PACKAGE_luci-proto-ppp=y
CONFIG_PACKAGE_luci-theme-bootstrap=y
CONFIG_PACKAGE_rpcd=y
CONFIG_PACKAGE_rpcd-mod-rrdns=y
CONFIG_PACKAGE_uhttpd=y
__EOF__

Expand to full config:

make defconfig

Make some modifications with:

make menuconfig

Build the images:

make

Target images can be found in bin/targets/ramips/rt305x/:

tree bin/targets/ramips/rt305x/
bin/targets/ramips/rt305x/
|-- config.seed
|-- openwrt-ramips-rt305x-device-rt5350f-olinuxino-evb-plus.manifest
|-- openwrt-ramips-rt305x.manifest
|-- openwrt-ramips-rt305x-root.squashfs
|-- openwrt-ramips-rt305x-rt5350f-olinuxino-evb-initramfs-kernel.bin
|-- openwrt-ramips-rt305x-rt5350f-olinuxino-evb-plus-initramfs-kernel.bin
|-- openwrt-ramips-rt305x-rt5350f-olinuxino-evb-plus-squashfs-sysupgrade.bin
|-- openwrt-ramips-rt305x-rt5350f-olinuxino-evb-squashfs-sysupgrade.bin
|-- openwrt-ramips-rt305x-rt5350f-olinuxino-initramfs-kernel.bin
|-- openwrt-ramips-rt305x-rt5350f-olinuxino-squashfs-sysupgrade.bin
|-- openwrt-ramips-rt305x-uImage.bin
|-- openwrt-ramips-rt305x-uImage-initramfs.bin
|-- openwrt-ramips-rt305x-vmlinux.bin
|-- openwrt-ramips-rt305x-vmlinux.elf
|-- openwrt-ramips-rt305x-vmlinux-initramfs.bin
|-- openwrt-ramips-rt305x-vmlinux-initramfs.elf

OpenWRT

Make a directory:

 # mkdir some_dir
 # cd some_dir

Download sources:

 # git clone https://github.com/OLIMEX/openwrt -b rt5350f

Go into openwrt directory:

 # cd openwrt

You can use our config:

# make

or if you want to change something:

# make menuconfig
# make

After some time build will finish. The image is found under:

 build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_rt305x/\
 openwrt-ramips-rt305x-olinuxino-rt5350f-squashfs-sysupgrade.bin

Place that file on some tftp server and then upload it to the board.

Demo projects


Images changelog

Release-3 (03 APR 2019)

  • Upgrade OpenWRT to 18.06 (kernel 4.14.x+)
  • Added support for RT5350-OLinuXino-EVB+


Release-2 (06 JUL 2015)

  • More info about this software release can be found at this GitHub page:


https://github.com/OLIMEX/OLINUXINO/tree/master/SOFTWARE/RT5350F/Prebuilt%20images