Skip to content
Snippets Groups Projects
Commit 1d616626 authored by Luis Gerhorst's avatar Luis Gerhorst Committed by Bernhard Heinloth
Browse files

Remove unused flash_kernel script

parent 1178d575
No related branches found
No related tags found
No related merge requests found
#!/bin/sh
SCRIPT_BASE=`dirname $0`
sam-ba -x $SCRIPT_BASE/flash_kernel.qml 2>&1 | tee $SCRIPT_BASE/flash_kernel.log
import SAMBA 3.2
import SAMBA.Connection.Serial 3.2
import SAMBA.Device.SAMA5D3 3.2
SerialConnection {
device: SAMA5D3Xplained {
config {
nandflash {
header: 0xc0902405
}
}
}
function initNand() {
/* Placeholder: Nothing to do */
}
function getEraseSize(size) {
/* get smallest erase block size supported by applet */
var eraseSize
for (var i = 0; i <= 32; i++) {
eraseSize = 1 << i
if ((applet.eraseSupport & eraseSize) !== 0)
break;
}
eraseSize *= applet.pageSize
/* round up file size to erase block size */
return (size + eraseSize - 1) & ~(eraseSize - 1)
}
function eraseWrite(offset, filename, bootfile) {
/* get file size */
var file = File.open(filename, false)
var size = file.size()
file.close()
applet.erase(offset, getEraseSize(size))
applet.write(offset, filename, bootfile)
}
onConnectionOpened: {
var dtbFileName = "at91-sama5d3_xplained.dtb"
var ubootEnvFileName = "u-boot-env.bin"
// initialize Low-Level applet
print("-I- === Initilize low level (system clocks) ===")
initializeApplet("lowlevel")
// intialize extram applet (needed for sam9)
print("-I- === Initialize extram ===")
initializeApplet("extram")
print("-I- === Initialize nandflash access ===")
initializeApplet("nandflash")
print("-I- === Load Kernel image ===")
eraseWrite(0x00200000, "../boot/zImage")
print("-I- === Done. ===")
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment