Fix undefined reference to tmp' in function
load_kernel.constprop.0':
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
206e2a8eec
commit
bc04edecc1
@ -109,7 +109,6 @@ static struct
|
||||
****************************************************************************/
|
||||
|
||||
static char copybuf[512];
|
||||
static void *tmp;
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
@ -265,8 +264,7 @@ err:
|
||||
static void load_kernel(const char *name, const char *devname)
|
||||
{
|
||||
int i;
|
||||
|
||||
tmp = (void *)0x02040000;
|
||||
void *tmp = (void *)0x02040000;
|
||||
|
||||
blk_read(tmp, 512 * 1024, devname, 0);
|
||||
|
||||
@ -287,10 +285,9 @@ static void load_kernel(const char *name, const char *devname)
|
||||
|
||||
__asm__ __volatile__
|
||||
(
|
||||
"ldr r0, =tmp\n"
|
||||
"ldr r1, [r0, #0]\n" /* r1 = 0x02040000 */
|
||||
"ldr sp, [r1, #0]\n" /* set sp */
|
||||
"ldr pc, [r1, #4]" /* set pc, start nuttx */
|
||||
"ldr sp, [%0, #0]\n" /* set sp */
|
||||
"ldr pc, [%0, #4]" /* set pc, start nuttx */
|
||||
: : "r"(tmp)
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user