How to build flashimage

Started by zgyarmati, November 13, 2016, 12:24:44 PM

Previous topic - Next topic

zgyarmati

 On the olinuxino github site there are pre-built images 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?
--<br />Zoltan Gyarmati


igrinon

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

zgyarmati

 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).
--<br />Zoltan Gyarmati

vinczo

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