Home/Support/Support Forum/How to Firmware Update dey-image-tiny ?
New and improved user forum site going live on 12/6 (All users will need to reset their password when the new forum is active)
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

How to Firmware Update dey-image-tiny ?

0 votes

I'm using a ccimx6ulstarter (dey-2.2-r3) with a customized dey-image-tiny.
I want to perform a firmware update.

For this I created a dey-image-tiny-swu.bb file as the one of core-image-base-swu.bb .
Then I loaded a fw_env.config to the device under /etc containing the following:
# NAND example
# MTD device name Device offset Env. size Flash sector size Number of sectors
#/dev/mtd0 0x4000 0x4000 0x20000 2
/dev/mtd0 0x300000 0x20000 0x20000 1

When I perform this command:
# update-firmware /mnt/update/dey-image-tiny-swu-ccimx6ulstarter.swu

I've got this error:
Too few good blocks within range
Error: getenv 'recovery_command'
Error: update_firmware

Could you please tell me what I'm missing ? Since the firmware update procedure is planned for core-image-base and not for dey-image-tiny.

Thanks in advance.

asked Jul 27, 2018 in Linux by YounesC New to the Community (22 points)

Please log in or register to answer this question.

2 Answers

0 votes
Best answer
Need to include these two packages to the rootfs image:
recovery-utils + u-boot-fw-utils
answered Aug 8, 2018 by YounesC New to the Community (22 points)
0 votes
Please take a look here:
does it look similar?
answered Jul 31, 2018 by LeonidM Veteran of the Digi Community (4,490 points)
Hi Leonid,

Not really similar.

My issue is related to my previous asked question:
Can't apply partition table modifications on U-Boot

Below is how I'm proceeding:

1- Change mtdparts variable and define new indexes on ccimx6ul_common.h U-boot header file

2- Then compiling the new U-boot:
# bitbake -f -c compile u-boot-dey
# bitbake -c deploy u-boot-dey

3- After flashing this new bootloader .imx to the device

4- Reset the board so it boots on this new bootloader

5- # env default -a
And I can see with a printenv that mtdparts changed with new partition table

6- # saveenv

7- Erase partition and flash images of kernel, recovery and rootfs
Till here all is going well

8- When I want to wipe the update partition as the following:
# setenv recovery_command wipe_update
#run recoverycmd

I have an issue when rebooting in recovery mode to wipe the update partition and it's the same issue when trying to perform a software update.

Below is the log:
ubi2: attaching mtd12
ubi2: scanning is finished
ubi2: empty MTD device detected
ubi2: attached mtd12 (name "update", size 85 MiB)
ubi2: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
ubi2: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
ubi2: VID header offset: 2048 (aligned 2048), data offset: 4096
ubi2: good PEBs: 680, bad PEBs: 0, corrupted PEBs: 0
ubi2: user volume: 0, internal volumes: 1, max. volumes count: 128
ubi2: max/mean erase counter: 0/0, WL threshold: 4096, image sequence number: 2412561497
ubi2: available PEBs: 634, total reserved PEBs: 46, PEBs reserved for bad PEB handling: 40
ubi2: background thread "ubi_bgt2d" started, PID 208
ERROR: Could not mount 'update' partition, volume not found
ubi2: detaching mtd12
ubi2: mtd12 is detached
rmdir: '/mnt/update': No such file or directory
/etc/rpm-postinsts/100-u-boot-fw-utils: line 52: arithmetic syntax error
run-parts: /etc/rpm-postinsts/100-u-boot-fw-utils: exit status 2
Error opening /dev/fb0: No such file or directory
[RECOVERY] Starting recovery...
Cannot parse config file '/etc/fw_env.config': Invalid argument
Error: environment not initialized
Cannot parse config file '/etc/fw_env.config': Invalid argument
Error: environment not initialized
[RECOVERY] [ERROR] No command found
[RECOVERY] The system will now reboot in 10 seconds
 reboot: Restarting system

It's sure that I'm missing something in the way to do (change NAND partition table & software update) related to the update partition but I can't find what (Maybe missing to update device tree file after this change ??).

Could you please help to resolve my issue ?

Thanks in advance.