Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => RT5350F => Topic started by: zgyarmati on November 13, 2016, 12:24:44 PM

Title: How to build flashimage
Post by: zgyarmati on November 13, 2016, 12:24:44 PM
 On the olinuxino github site there are pre-built images (https://github.com/OLIMEX/OLINUXINO/tree/master/SOFTWARE/RT5350F/Prebuilt%20images) which can be loaded directly into the flash memory, but i failed to find any instructions how to build these image from the bootloader, factory and openwrt squashfs partitions. Is there any information available on this somewhere?
Title: Re: How to build flashimage
Post by: JohnS on November 13, 2016, 04:22:43 PM
The wiki and openwrt at least?

E.g. https://www.olimex.com/wiki/RT5350F-OLinuXino
https://wiki.openwrt.org/toh/olimex/rt5350f-olinuxino-evb

John
Title: Re: How to build flashimage
Post by: igrinon on November 13, 2016, 04:28:33 PM
As root and for ubuntu
Get the tools required by compilation
  sudo apt-get install subversion build-essential libncurses5-dev zlib1g-dev gawk git ccache gettext libssl-dev xsltproc zip python

Log in as normal user.
Go to home directory
  cd ~

Create build dir
mkdir olimex
cd olimex
mkdir openwrt
cd openwrt

Get the source
  git clone https://github.com/OLIMEX/openwrt -b rt5350f

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

Clean and select packages
  make distclean
  make menuconfig

Make the project
  make -j1 V=s
Title: Re: How to build flashimage
Post by: zgyarmati on November 13, 2016, 05:16:46 PM
 Thanks for both the responses, although it's not exactly what i'm looking for:
I know how to build the u-boot and the openwrt images, but i'm looking for a way to tailor all the partition images together and be able to flash it directly to the SPI NOR flash memory, as described here: https://www.olimex.com/wiki/RT5350F-OLinuXino#Upload_prebuilt_images_using_programmer_tool

I suppose the partition images has to be concatenated together (for example by using dd) with padding where necessary, and i'm in the hope that somebody has set this up already so i don't have to experiment with this (and risk my HW).
Title: Re: How to build flashimage
Post by: vinczo on July 07, 2017, 04:34:54 PM
I flashed the firmware (no bootloader) : https://www.olimex.com/wiki/File:Arm-usb-ocd.png
with ./flashrom but I had to pad the image to the size of the NOR flash before like so :
dd if=/dev/zero of=image_to_pad.bin seek=(NOR_flash_size_in_bytes - 1) bs=1 count=1