| Products > Test Equipment |
| Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see! |
| << < (78/134) > >> |
| zelea2:
Hi, I've written a little C program to extract and patch the logo in Hantek HDG and DSO devices. First you need to dump your mtd partitions (do not include the OOB regions in your dumps) on a USB stick with the nandump utility from your serial console. The kernel is stored in mtd2 for DSOs and mtd4 for HDGs. The boot logo is stored in the kernel (directly into the framebuffer code) in mtdX. Once you've got your partition image you can then extract, modify and patch back the start logo. The mtdX has no filesystem it is just the compressed kernel with a stub to decompress it in memory. The logo is stored as 16bit RGB565 values and one can binary patch the kernel without the need to recompile everything. 'dso-logo mtdX' will create logo.ppm which you can edit with the graphic program of your choice. My little program uses the fact that the first and last lines of the logo are of the same uniform color to detect the position of the logo inside the binary. When I recompress the kernel I use 7z instead of gzip because it has a much better compression ratio and you can draw a lot of things on your logo. If you want to load JPEGs on your logo most likely the compressed size will overflow and the patch will fail. The kernel.gz is right at the end of mtdX followed only by a short structure so there is plenty of space there but if it overflows I'll have to patch a few more addresses in the stub and I didn't want to change too many things. 'dso-logo -w mtdX' will encapsulate the modified logo.ppm back into the kernel and will patch the mtdX partition image. If you press 'Space' while your device is booting you enter the following uboot menu: --- Code: ---##### Boot for SKY2416/TQ2416 Main Menu ##### ##### EmbedSky USB download mode ##### [1] Download u-boot or STEPLDR.nb1 or other bootloader to Nand Flash [2] Download LOGO (logo.bin) to Nand Flash [3] Erase the MISC partion [4] Download Kernel (kernel.bin) to Nand Flash [5] Download UBIFS image (rootfs.ubi) to Nand Flash [6] Download Kernel_bk (kernel_bk.bin) to Nand Flash [7] Download UBIFS image (recover.ubi) to Nand Flash [8] normal start! [9] recover start! [0] Set the boot parameters [f] Format the Nand Flash [a] Download User Program [c] Download Config(config.ubi). [n] Enter TFTP download mode menu [r] Reboot u-boot [t] Test Linux Image (zImage) Enter your selection: t Now, Please connect to USB cable and USB interface! USB cable Connected! Now, Waiting for DNW to transmit data. Now, Downloading [ADDRESS:0xc0008000,TOTAL:0x400000] Please waiting ................................................................Download Done!! Download Address: 0xc0008000, Download Filesize:0x400000 Now, Checksum calculation....Checksum O.K !!! Boot with zImage --- End code --- Use the dnw program to send the modified mtdX partition (the zImage kernel) to your function generator. The linux version of this program is here: --- Code: ---git clone https://github.com/changbindu/dnw-linux.git --- End code --- First time press 't' just to test that everything works properly. Once you are happy, after another reboot, you can press '4' to pernanently store the new kernel in flash. Attached is a photo of my new boot logo. |
| rosasharn:
How about using my own background picture for logo? |
| 6E5:
I'm thinking about getting the Hantek just for this purpose, but I never really followed the earlier DSO thread and this thread. With a combined length of 200 pages, it's very overwhelming. Could someone just give me a list of things to do to get this hack to work? How can I make a backup of the NAND flash? |
| rosasharn:
How to output white noise from function generator? |
| Lightages:
I don't see any recent definitive answer after reading everything. Maybe I missed it. Is this still hackable as per the original post? Can it do logarithmic sweeps? |
| Navigation |
| Message Index |
| Next page |
| Previous page |