os/ossrv/lowlevellibsandfws/pluginfw/Framework/MultipleImageTest/tools/scripts/generatenandloader.pl
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
#!perl
sl@0
     2
sl@0
     3
# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     4
# All rights reserved.
sl@0
     5
# This component and the accompanying materials are made available
sl@0
     6
# under the terms of "Eclipse Public License v1.0"
sl@0
     7
# which accompanies this distribution, and is available
sl@0
     8
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     9
#
sl@0
    10
# Initial Contributors:
sl@0
    11
# Nokia Corporation - initial contribution.
sl@0
    12
#
sl@0
    13
# Contributors:
sl@0
    14
#
sl@0
    15
# Description:
sl@0
    16
#
sl@0
    17
sl@0
    18
system("getsource -o base_e32");
sl@0
    19
CreateAutoExeFlash();	
sl@0
    20
system("rename \\epoc32\\rom\\nandloader\\autoexec.bat autoexec_orig.bat")
sl@0
    21
	&& print "rename of autoexec.bat failed\n";
sl@0
    22
system("copy /y \\epoc32\\rom\\nandloader\\autoexec_flash.bat \\epoc32\\rom\\nandloader\\autoexec.bat")
sl@0
    23
	&& die "copy of autoexec_flash.bat failed\n";
sl@0
    24
chdir("\\src\\cedar\\generic\\base\\e32\\rombuild");
sl@0
    25
sl@0
    26
system("rom -v=h4hrp -i=armv5 -b=urel -t=nandloader -m=_NAND2")
sl@0
    27
	&& die "building h4 nandloader rom failed\n";
sl@0
    28
system("copy H4HRP__NAND2ARMV5.IMG \\syslibs_multiimageloader.img")
sl@0
    29
	&& die "copy of H4HRP__NAND2ARMV5.IMG failed\n";
sl@0
    30
system("del \\epoc32\\rom\\nandloader\\autoexec.bat");
sl@0
    31
system("rename \\epoc32\\rom\\nandloader\\autoexec_orig.bat autoexec.bat")
sl@0
    32
	&& print "rename of autoexec_orig.bat failed\n";
sl@0
    33
sl@0
    34
sub CreateAutoExeFlash
sl@0
    35
{
sl@0
    36
	my $sAutoExec = "\\epoc32\\rom\\nandloader\\autoexec_flash.bat";
sl@0
    37
	open(sAUTOFLASH,">$sAutoExec");
sl@0
    38
	print sAUTOFLASH "z:\n";
sl@0
    39
	print sAUTOFLASH "nandloader -f -d 3 -a d: cldr.img core.img rofs1.img rofs2.img -r";
sl@0
    40
	close(sAUTOFLASH);
sl@0
    41
}