Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complete dump; Re-enable UART kernel logs with kernel cmdline if able #14

Open
Lyrth opened this issue Jul 10, 2024 · 2 comments
Open

Comments

@Lyrth
Copy link

Lyrth commented Jul 10, 2024

Hello, here's (what I believe) a complete dissection of the NAND dump from hg8045q_raw. I removed the B variants as they're exact mirrors of the A ones. Also trimmed kernel and rootfs so that they can be valid images.

out.zip

file_system.content:   directory
file_system:           UBIfs image, sequence number 176, length 4096, CRC 0xec33e14b
flash_configA:         (XML) data
kernelA:               data
kernelA.trimmed.uboot: u-boot legacy uImage, Linux-3.10.53-HULK2, Linux/ARM, OS Kernel Image (Not compressed), 1780722 bytes, Thu Jan 28 12:15:39 2016, Load Address: 0X80E08000, Entry Point: 0X80E08000, Header CRC: 0X9848BD74, Data CRC: 0XC9FD9B53
rootfsA:               data
rootfsA.trimmed.uboot: u-boot legacy uImage, squashfs, Linux/ARM, RAMDisk Image (Not compressed), 19302876 bytes, Thu Jan 28 12:19:28 2016, Load Address: 00000000, Entry Point: 00000000, Header CRC: 0X65032BAF, Data CRC: 0XF0A7FB7
slave_paramA:          data
system_param:          ISO-8859 text, with very long lines (64181), with CRLF line terminators
ubootA:                (seems to be 32b ARM code) data
wifi_paramA:           (actually just mostly data) ISO-8859 text, with very long lines (65536), with no line terminators

Tools used for it: a custom script to remove NAND spare area; and ubidump.


If changing the kernel command line parameters U-Boot is possible (e.g., u-boot process is interruptible by sending Ctrl+C or Enter through UART -- which is the case for my SD5115 router, non-hua/wei), passing debug_ll=on will produce kernel messages on the UART. The option seems to be applicable to similar kernels for different devices. I'm currently attempting to obtain interactive shell via serial right now, though able to run custom shell commands through modifying init scripts already.

@johnbaker26222
Copy link

Wow any chance you can share this custom script, or the process you used to go about it? I have a full raw dump from my HG8140H5 used in Thailand. Tried cleaning up with nand_tool_dump.py but still getting a lot of errors with binwalk, ubireader, and ubidump (error cannot determine block size)
Any help would be greatly appreciated!

@johnbaker26222
Copy link

johnbaker26222 commented Jul 26, 2024

Here is a full dump from a Dosilicon DS35QGA-1B nand if you want a go at it.
https://file.io/3JRZ2gySFB9Q

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants