AnsweredAssumed Answered

Possible to flash bootloader from Linux on i.MX536?

Question asked by Michael John on Sep 20, 2017
Latest reply on Oct 10, 2017 by Toby Collett

Hello,

I'm attempting to flash the bootloader to NAND from Linux Userspace. I can do this successfully if I'm running off MMC, but if I'm running off NAND I get errors. My NAND partitions are the following:

1 - Bootloader

2 - Kernel

3 - RootFS

 

Linux kernel 2.6.35 and u-boot 2009.08.

 

This is the error I get when attempting to flash while running from NAND:

# flash_erase /dev/mtd0 0 0
Erasing 128 Kibyte @ fe0000 -- 100 % complete
# kobs-ng init --chip_0_device_path=/dev/mtd0 ./u-boot.bin
UBIFS error (pid 856): ubifs_check_node: bad CRC: calculated 0x54b729d9, read 0x89df9781
UBIFS error (pid 856): ubifs_check_node: bad node at LEB 530:8016
UBIFS error (pid 856): ubifs_read_node: expected node type 1
UBIFS error (pid 856): do_readpage: cannot read page 3 of inode 6759, error -117
UBIFS error (pid 856): ubifs_check_node: bad CRC: calculated 0x54b729d9, read 0x89df9781
UBIFS error (pid 856): ubifs_check_node: bad node at LEB 530:8016
UBIFS error (pid 856): ubifs_read_node: expected node type 1
UBIFS error (pid 856): do_readpage: cannot read page 3 of inode 6759, error -117
zsh: bus error  kobs-ng init --chip_0_device_path=/dev/mtd0 ./u-boot.bin
# UBIFS error (pid 800): ubifs_check_node: bad CRC: calculated 0x175bdab8, read 0x283fd80a
UBIFS error (pid 800): ubifs_check_node: bad node at LEB 2785:5616
UBIFS error (pid 800): ubifs_read_node: expected node type 1
UBIFS error (pid 800): do_readpage: cannot read page 44 of inode 8679, error -117
UBIFS error (pid 800): ubifs_check_node: bad CRC: calculated 0x175bdab8, read 0x283fd80a
UBIFS error (pid 800): ubifs_check_node: bad node at LEB 2785:5616
UBIFS error (pid 800): ubifs_read_node: expected node type 1
UBIFS error (pid 800): do_readpage: cannot read page 44 of inode 8679, error -117
UBIFS error (pid 800): ubifs_check_node: bad CRC: calculated 0x175bdab8, read 0x283fd80a
UBIFS error (pid 800): ubifs_check_node: bad node at LEB 2785:5616
UBIFS error (pid 800): ubifs_read_node: expected node type 1

It continues to print UBIFS errors till a power cycle, at which point there is no bootloader.

 

Is it possible to write the bootloader to NAND from Linux userspace if you booted from NAND?

 

Thanks,

-Michael

Outcomes