Difference between revisions of "AM335x"

(Created page with "==Buiding U-Boot== Make sure you have cross compiler: $ arm-linux-gnueabihf-gcc --version arm-linux-gnueabihf-gcc (Debian 5.4.0-6) 5.4.0 20160609 Copyright (C) 2015 ...")
 
m
Line 1: Line 1:
==Buiding U-Boot==
+
==Prepare card==
 +
 
 +
To make sure everything will run without problem wipe all data on the MMC:
  
 +
$ sudo dd if=/dev/zero of=/dev/sdx bs=1k count=1024
 +
 +
Format the disk:
 +
 +
$ sudo fdisk /dev/sdx << __EOF__
 +
> n
 +
>
 +
>
 +
>
 +
>
 +
> w
 +
> __EOF__
 +
 +
Make ext4 filesystem
 +
 +
$ sudo mkfs.ext4 -F -O ^metadata_csum,^64bit /dev/sdx1
 +
 +
'''NOTE:''' You MUST replace /dev/sdx with your device, e.g. /dev/sdc.
 +
 +
 +
==U-Boot==
 +
 +
===Building U-Boot===
  
 
Make sure you have cross compiler:
 
Make sure you have cross compiler:
Line 37: Line 62:
  
  
==Prepare card==
+
===Writing U-Boot===
 
 
To make sure everything will run without problem wipe all data on the MMC:
 
  
$ sudo dd if=/dev/zero of=/dev/sdx bs=1k count=1024
+
====Writing to MMC====
  
Format the disk:
+
Insert your card and write '''MLO''' and '''u-boot.img''':
  
  $ sudo fdisk /dev/sdx << __EOF__
+
  $ sudo dd if=MLO of=/dev/sdx count=1 seek=1 bs=128k
> n
+
  $ sudo dd if=u-boot.img of=/dev/sdx count=2 seek=1 bs=384k
>
 
>
 
>
 
>
 
> w
 
> __EOF__
 
 
 
Make ext4 filesystem
 
 
 
  $ sudo mkfs.ext4 -F -O ^metadata_csum,^64bit /dev/sdx1
 
 
 
'''NOTE:''' You MUST replace /dev/sdx with your device, e.g. /dev/sdc.
 
 
 
 
 
 
 
==Writing U-Boot==
 
  
===Writing to MMC===
 
  
Insert your card and write '''MLO''' and '''u-boot.img''':
 
  
$ sudo dd if=MLO of=/dev/sdx count=1 seek=1 bs=128k
+
==Kernel==
$ sudo dd if=u-boot.img of=/dev/sdx count=2 seek=1 bs=384k
+
===Building linux kernel===

Revision as of 05:55, 15 September 2016

Prepare card

To make sure everything will run without problem wipe all data on the MMC:

$ sudo dd if=/dev/zero of=/dev/sdx bs=1k count=1024

Format the disk:

$ sudo fdisk /dev/sdx << __EOF__
> n
> 
> 
> 
> 
> w
> __EOF__

Make ext4 filesystem

$ sudo mkfs.ext4 -F -O ^metadata_csum,^64bit /dev/sdx1

NOTE: You MUST replace /dev/sdx with your device, e.g. /dev/sdc.


U-Boot

Building U-Boot

Make sure you have cross compiler:

$ arm-linux-gnueabihf-gcc --version
arm-linux-gnueabihf-gcc (Debian 5.4.0-6) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
   

If you don't have run:

$ sudo apt-get install gcc-5-arm-linux-gnueabihf

Get sources:

$ git clone git://git.denx.de/u-boot.git
$ cd u-boot

The patch is built against specific commit, so reset repository:

$ git reset --hard b89dfcfd926b8224edd24608065eb9bb601c0d3b

Get and apply patch:

$ wget <patch name>
$ git apply <patch name>

Build image, where <board_defconfig> is am335x_olimex_som_defconfig or am335x_olimex_som_nandboot_defconfig:

$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- <board_defconfig>

This will produce two files:

  • MLO
  • u-boot.img


Writing U-Boot

Writing to MMC

Insert your card and write MLO and u-boot.img:

$ sudo dd if=MLO of=/dev/sdx count=1 seek=1 bs=128k
$ sudo dd if=u-boot.img of=/dev/sdx count=2 seek=1 bs=384k 


Kernel

Building linux kernel