add CONFIG_SYS_BOOTM_LEN size error help

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

add CONFIG_SYS_BOOTM_LEN size error help

5,694 Views
fatalfeel
Contributor V

my Image size bigger than 0x800000 so i change CONFIG_SYS_BOOTM_LEN

to increase "max gunzip size"

gedit /root/project_board/lollipop51/myandroid/bootable/bootloader/uboot-imx/common/bootm.c

//#define CONFIG_SYS_BOOTM_LEN    0x800000

//to

#define CONFIG_SYS_BOOTM_LEN 0x1000000

after build and reboot..............................................

Normal Boot

Hit any key to stop autoboot:  0

boota mmc1

kernel   @ 14008000 (8817672)

ramdisk  @ 15000000 (872002)

fdt      @ 14f00000 (47600)

## Booting Android Image at 0x12000000 ...

Kernel load addr 0x14008000 size 8612 KiB

Kernel command line: console=ttymxc0,115200 init=/init video=mxcfb0:dev=ldb,bpp=32 video=mxcfb1:dev=hdmi,1920x1080M@60,if=RGB24,bpp=32 video=mxcfb2:off video=mxcfb3:off vmalloc=400M androidboot.console=ttymxc0 consoleblank=0 androidboot.hardware=freescale cma=384M mem=1G firmware_class.path=/system/etc/firmware androidboot.selinux=disabled androidboot.dm_verity=disabled

## Flattened Device Tree blob at 14f00000

   Booting using the fdt blob at 0x14f00000

   Loading Kernel Image ... OK

   Using Device Tree in place at 14f00000, end 14f0e9ef

switch to ldo_bypass mode!

Starting kernel ...

undefined instruction

pc : [<00010000>]       lr : [<8fef2740>]

reloc pc : [<8791e000>]       lr : [<17800740>]

sp : 8eeeda68  ip : 8eeeda44     fp : 00000000

r10: 00000000  r9 : 8eeedeb8     r8 : 009024b4

r7 : 000000f0  r6 : 00000098     r5 : 17800338  r4 : 00c5087d

r3 : 00000000  r2 : 00000000     r1 : 00000000  r0 : 00000000

Flags: NzCv  IRQs off  FIQs off  Mode SVC_32

Resetting CPU ...

resetting ...

U-Boot 2015.04-svn62 (Mar 30 2016 - 18:03:51)

crash at static void v7_maint_dcache_all(u32 operation)

how to solve this problrm after add CONFIG_SYS_BOOTM_LEN size

0 Kudos
Reply
5 Replies

3,141 Views
b36401
NXP Employee
NXP Employee

Please note that if kernel exceeds 8M it may go beyond the boundaries of its place on SD card.

You need to modify card partition.

Please refer table in "Storage partitions" chapter of Android User's Guide.

And you need to change MFGtool configuration in point of the partitions.

Have a great day,

Victor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

3,141 Views
fatalfeel
Contributor V

do you mean mksdcard-android.sh.tar in mfg tools

# partition size in MB

BOOTLOAD_RESERVE=8

BOOT_ROM_SIZE=16

RECOVERY_ROM_SIZE=20

BOOTLOAD_RESERVE = 8 need bigger?

or the others

//#define CONFIG_SYS_BOOTM_LEN    0x800000

//to

#define CONFIG_SYS_BOOTM_LEN 0xA00000

also undefined instruction error

and my kernel size 8.6 mb

0 Kudos
Reply

3,141 Views
fatalfeel
Contributor V

uboot makefile i use

ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE

#KBUILD_CFLAGS    += -Os

KBUILD_CFLAGS    += -O0

else

KBUILD_CFLAGS    += -O2

endif

when setting

KBUILD_CFLAGS    += -O1 -fno-omit-frame-pointer

then run success

anyway other way setting

KBUILD_CFLAGS+= -O0

and run success?

0 Kudos
Reply

3,141 Views
fatalfeel
Contributor V

I got answer KBUILD_CFLAGS += -O0 and undefined instruction

/root/project_board/lollipop51/myandroid/bootable/bootloader/uboot-imx/Makefile

KBUILD_CFLAGS    += -O0 -fno-omit-frame-pointer

/root/project_board/lollipop51/myandroid/bootable/bootloader/uboot-imx/arch/arm/lib/cache-cp15.c

static void cache_disable(uint32_t cache_bit)

if (cache_bit == (CR_C | CR_M))

    {

        flush_dcache_all();

        /* issue begin */

/*

        set_cr(reg & ~CR_C);

        flush_dcache_all(); //overwrite memory here

*/

    }

0 Kudos
Reply

3,141 Views
fatalfeel
Contributor V

find problem

set_cr(reg & ~CR_C);  //disable data cache

flush_dcache_all(); //will way/set data cacahe

there will be problem on i.mx6

this is add on i.mx7

remove them is ok~~~ on i.mx6 and i.mx7

you can use -O0 build and test code will find this problem

0 Kudos
Reply