Products > Test Equipment

Possible GW Instek GDS-1000B hack

<< < (41/52) > >>

nctnico:
A guess: You might need to format the NAND with the UBI-fs first (which is a wear levelling layer) and then create the mtd partitions.

danymogh:

--- Quote from: nctnico on January 11, 2021, 04:14:14 pm ---A guess: You might need to format the NAND with the UBI-fs first (which is a wear levelling layer) and then create the mtd partitions.

--- End quote ---

thanks a lot for your reply!

Unfortunately, UBI-fs is only used for Linux. MTD partitions are defined from the bootloader and then passed to Linux.

I found out that I was mistaken and the BBT information is actually in the dump and in the last 4 blocks. I still think this is a software issue but have no clue how it has come to this.

nctnico:

--- Quote from: danymogh on January 11, 2021, 07:35:57 pm ---
--- Quote from: nctnico on January 11, 2021, 04:14:14 pm ---A guess: You might need to format the NAND with the UBI-fs first (which is a wear levelling layer) and then create the mtd partitions.

--- End quote ---

thanks a lot for your reply!

Unfortunately, UBI-fs is only used for Linux. MTD partitions are defined from the bootloader and then passed to Linux.

--- End quote ---
On the system I have worked on both bootloader and the Linux kernel use UBI fs. The bootloader has to in order to read the kernel from the filesystem and boot it. In general it makes no sense to use NAND flash directly unless you have (more expensive and rare) NAND flash with a 'known good' boot area. Having a wear levelling / error correcting layer in between makes a lot more sense. IOW: it would surprise me if the bootloader uses raw NAND flash.

danymogh:

--- Quote from: nctnico on January 11, 2021, 08:11:03 pm ---
--- Quote from: danymogh on January 11, 2021, 07:35:57 pm ---
--- Quote from: nctnico on January 11, 2021, 04:14:14 pm ---A guess: You might need to format the NAND with the UBI-fs first (which is a wear levelling layer) and then create the mtd partitions.

--- End quote ---

thanks a lot for your reply!

Unfortunately, UBI-fs is only used for Linux. MTD partitions are defined from the bootloader and then passed to Linux.

--- End quote ---
On the system I have worked on both bootloader and the Linux kernel use UBI fs. The bootloader has to in order to read the kernel from the filesystem and boot it. In general it makes no sense to use NAND flash directly unless you have (more expensive and rare) NAND flash with a 'known good' boot area. Having a wear levelling / error correcting layer in between makes a lot more sense. IOW: it would surprise me if the bootloader uses raw NAND flash.

--- End quote ---

based on the boot.bin file from the upgrade files and a dump from another scope I'd say the bootloader used raw Nand flash. also in the Zynq 7000 docs, there's no indication of UBI-fs for the bootloader. however, it seems the Zynq first enables the internal ECC and then starts to read the flash. this might be why the boot is failing. I've programmed the bootloader with the ECC disabled which means the OOB area is not the same as in a working scope. that is the last thing that I've found and I'm going to try it and see If it works.

Edit: unfortunately the programmer I have doesn't support enabling the ECC feature. If one of the forum members would be kind to send me the dump of their bootloader including the OOB data i'd be delighted.
the command is : nanddump -f booloader.bin -o /dev/mtd0
any bootloader version would do

Fungus:

--- Quote from: danymogh on January 12, 2021, 06:37:56 am ---based on the boot.bin file from the upgrade files and a dump from another scope I'd say the bootloader used raw Nand flash.

--- End quote ---

You don't really need wear-levelling for firmware and it's a whole layer of extra complexity for a low-level bootloader.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod