About Imx28 HAB IVT

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

About Imx28 HAB IVT

Jump to solution
1,587 Views
bruce_chen
Contributor I

According AN555 pdf description

The Image Vector Table (IVT) is a mandatory part of the boot image, and its structure is defined as:

typedef struct

{

uint32_t header;

uint32_t *entry;

uint32_t reserved1;

uint32_t *dcd;

boot_data_t *boot_data;

uint32_t *self;

uint32_t *csf;

uint32_t reserved2;

} hab_ivt_t;

Where:

uint32_t: A type representing a 32 bit unsigned integer.

Header: Header identifying the type of data structure (0xD1), its size (0x0020), and HAB

version (0x40). For i.MX28, this is D100 2040h.

*entry: Absolute address of the first instruction to execute from the image.

reserved1: Reserved and should be zero.

*dcd: Absolute address of the image Device Configuration Table (DCD). If using

bootlets to configure i.MX28, this field should be set to NULL.

*boot_data: Absolute address of the Boot Data structure. This should be set to NULL for

i.MX28.

*self: Absolute address of the IVT. Used internally by the ROM.

*csf: Absolute address of the Command Sequence File (CSF) used by the HAB library.

This field must be set to NULL when not performing a secure boot.

reserved2: Reserved and should be zero.

"The IVT is a block of data that must reside on the boot device."   this line what's meaning?  The IVT how to reside on the boot device?

Labels (1)
0 Kudos
Reply
1 Solution
1,223 Views
igorpadykov
NXP Employee
NXP Employee

Hi bruce

please look at attached example.

~igor

View solution in original post

0 Kudos
Reply
5 Replies
1,223 Views
igorpadykov
NXP Employee
NXP Employee

Hi bruce

right, ivt should reside on device, image is produced by elftosb tool, please look

at documentation included in package

Snippets, Boot Code, Headers, Monitors, etc. (4)

IMX_ELFTOSB_TOOL

http://www.nxp.com/products/software-and-tools/software-development-tools/i.mx-software-and-tools/i....

Best regards

igor

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

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

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

0 Kudos
Reply
1,223 Views
bruce_chen
Contributor I

Hi igorpadykov:

     I am modify the updater_ivt.bd like below:

options {

        driveTag = 0x00;

        flags = 0x01;

}

sources {

        power_prep="./power_prep/power_prep";

        power_prep_bin = "./power_prep.bin";

        power_prep_hab_data = "./power_prep_hab_data";

        sdram_prep="./boot_prep/boot_prep";

        sdram_prep_bin = "./boot_prep.bin";

        sdram_prep_hab_data = "./boot_prep_hab_data";

        linux_prep="./linux_prep/output-target/linux_prep";

        linux_prep_bin = "./linux_prep.bin";

        linux_prep_hab_data = "./linux_prep_hab_data";

        linux_kernel_hab_data = "./linux_kernel_hab_data";

        zImage="zImage";

        initramfs="initramfs.cpio.gz";

}

section (0) {

        //----------------------------------------------------------

        // Power Supply initialization

        //----------------------------------------------------------

        load power_prep_bin > 0x10;

        load power_prep;

        load power_prep_hab_data > power_prep:__hab_data;

        load ivt (entry = power_prep:input_ivt) > 0x8000;

        hab call 0x8000;

        //----------------------------------------------------------

        // SDRAM initialization

        //----------------------------------------------------------

        load sdram_prep_bin > 0x10;

        load sdram_prep;

        load sdram_prep_hab_data > sdram_prep:__hab_data;

        load ivt (entry = sdram_prep:input_ivt) > 0x8000;

        hab call 0x8000;

        //----------------------------------------------------------

        // Prepare to boot Linux

        //----------------------------------------------------------

        load linux_prep_bin > 0x2000;

        load linux_prep;

        load linux_prep_hab_data > linux_prep:__hab_data;

        load ivt (entry = linux_prep:input_ivt) > 0x8000;

        hab call 0x8000;

        //----------------------------------------------------------

        //  Load ans start Linux kernel

        //----------------------------------------------------------

        load zImage > 0x40008000;

        load 0.b    > 0x40800000..0x40c00000;

        load initramfs > 0x40800000;

        load linux_kernel_hab_data > linux_prep:__hab_data;

        load ivt (entry = linux_prep:input_ivt) > 0x8000;

        hab jump 0x8000;

}

I can't sure this is right, because use mfgtool proggramming get 0x80501001 error code. is my bd file error?

0 Kudos
Reply
1,224 Views
igorpadykov
NXP Employee
NXP Employee

Hi bruce

please look at attached example.

~igor

0 Kudos
Reply
1,223 Views
bruce_chen
Contributor I

Hi igor:

     Thanks your attached example, now I am rebuild for new updater_ivt.sb and use mfgtool programming, get error like below

regulator_init_complete: incomplete constraints, leaving vbus5v on

mxs-rtc mxs-rtc.0: setting system clock to 1970-01-01 00:00:42 UTC (42)

Freeing init memory: 128K

Starting UTP

disable turn off display

uuc 0.4 [built Jun 22 2016 11:43:50]

UTP: Waiting for device to appear

utp_mk_devnode: creating node '/dev/utp' with 10+222

cpu_id is 28

g_file_storage gadget: high speed config #1

g_file_storage gadget: high speed config #1

UTP: received command 'mknod class/mtd,mtd0,/dev/mtd0'

class = 'class/mtd'

item = 'mtd0'

node = /dev/mtd0

type = (null)

UTP: running utp_mk_devnode(class/mtd,mtd0,/dev/mtd0,0x2000)

utp_mk_devnode: creating node '/dev/mtd0' with 90+0

UTP: sending Success

UTP: received command 'mknod class/mtd,mtd1,/dev/mtd1'

class = 'class/mtd'

item = 'mtd1'

node = /dev/mtd1

type = (null)

UTP: running utp_mk_devnode(class/mtd,mtd1,/dev/mtd1,0x2000)

utp_mk_devnode: creating node '/dev/mtd1' with 90+2

UTP: sending Success

UTP: received command 'mknod class/misc,ubi_ctrl,/dev/ubi_ctrl'

class = 'class/misc'

item = 'ubi_ctrl'

node = /dev/ubi_ctrl

type = (null)

UTP: running utp_mk_devnode(class/misc,ubi_ctrl,/dev/ubi_ctrl,0x2000)

utp_mk_devnode: creating node '/dev/ubi_ctrl' with 10+56

UTP: sending Success

UTP: received command '$ flash_eraseall /dev/mtd0'

UTP: sending Busy

UTP: executing "flash_eraseall /dev/mtd0"

Erasing 128 Kibyte @ 1400000 -- 100% complete.

UTP: sending Success

utp_poll: pass returned.

UTP: received command '$ flash_eraseall /dev/mtd1'

UTP: sending Busy

UTP: executing "flash_eraseall /dev/mtd1"

Erasing 128 Kibyte @ 1cc80000 -- 93 % complete.

Skipping bad block at 0x1cca0000

Erasingutp_poll: pass returned.- 99 % complete.

Erasing 128 Kibyte @ 1ec00000 -- 100% complete.

UTP: sending Success

UTP: received command 'send'

UTP: sending Success

g_file_storage gadget: high speed config #1

g_file_storage gadget: high speed config #1

g_file_storage gadget: high speed config #1

UTP: received command '$ kobs-ng init $FILE'

UTP: sending Busy

UTP: executing "kobs-ng init $FILE"

Unable to find a matching key dictionary

ERROR: bootstream '/tmp/file.utp' is invalid

ROM Version 1

usage: kobs-ng [COMMAND] [ARGS]

Where [COMMAND] is one of:

  dump [-v] [KOBS] ........................ Verify/dump boot structures

    -v .................................... Verbose mode

  imgverify [-v] [KEY] <file> ............. Verify image validity

    -v .................................... Verbose mode

  init [-v] [KEY] [KOBS] <file> ........... Initialize boot structure &

                                            install bootstreams

    -v .................................... Verbose mode

    -n .................................... Dry run (don't commit to flash)

    -w .................................... Commit to flash

  update [-v] [KEY] [KOBS] [-0|1] <file> .. Update a single bootstream

    -v .................................... Verbose mode

    -0|1 .................................. Update specified bootstream #

  extract [-v] [KEY] [KOBS] [-0|1] <file> . Extract a bootstream from flash

    -v .................................... Verbose mode

    -0|1 .................................. Extract specified bootstream #

  [KOBS] boot structures config options

    --chip_0_device_path=<path> .......... Device of boot (default /dev/mtd0)

    --chip_1_device_path=<path> .......... The second chip in case of multichip NAND

    --search_exponent=<value> ............ NCB field (default 2)

    --data_setup_time=<value> ............ NCB field (default 80)

    --data_hold_time=<value> ............. NCB field (default 60)

    --address_setup_time=<value> ......... NCB field (default 25)

    --data_sample_time=<value> ........... NCB field (default 6)

    --row_address_size=<value> ........... NCB field (default 3)

    --column_address_size=<value> ........ NCB field (default 2)

    --read_command_code1=<value> ......... NCB field (default 0x00)

    --read_command_code2=<value> ......... NCB field (default 0x30)

    --boot_stream_major_version=<value> .. NCB field (default 1)

    --boot_stream_minor_version=<value> .. NCB field (default 0)

    --boot_stream_sub_version=<value> .... NCB field (default 0)

    --ncb_version=<value> ................ NCB field (default 3)

   [KEY] key management related options

        -d ............................... Use device key (OTP) (not yet supported)

        -z ............................... Use key of all zeroes (default)

        -k<hexadecimalkey> ............... Use hex key of 16 bytes

UTP: sending Non-success

utp_poll: exit with status 1280

I don't know what's meaning, thanks.

0 Kudos
Reply
1,223 Views
bruce_chen
Contributor I

Hi igor:

     I am very thanks for your support, I am will check your attached,  thanks, thanks.

0 Kudos
Reply