find_squashfs_file: name bin, start_block 0, offset 2676, type 1
find_squashfs_file: name boot, start_block 0, offset 2916, type 1
read inode: name boot, sb 0, of 2916, type 1
find_squashfs_file: name zImage.img, start_block 0, offset 2708, type 2
read inode: name zImage.img, sb 0, of 2708, type 2
### FS load complete: 2821835 bytes loaded to 0x81000000
## Booting kernel from Legacy Image at 81000000 ...
Image Name: Linux-4.9.37
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2821771 Bytes = 2.7 MiB
Load Address: 80008000
Entry Point: 80008000
Loading Kernel Image ... OK
OK
Starting kernel ...
U-Boot 2010.06-svn1009 (Apr 23 2018 - 15:33:45)
Check Flash Memory Controller v100 ... Found
SPI Nor(cs 0) ID: 0xef 0x40 0x18
spi_w25q256fv_qe_enable(193): Error: Disable Quad failed! reg:0x2
Block:64KB Chip:16MB Name:"W25Q128(B/F)V"
CONFIG_CLOSE_SPI_8PIN_4IO = y.
at hifmc100_setTB() mid:0xef,chipsize:0x1000000 <no>.
unlock all.
SPI Nor total size: 16MB
In: serial
Out: serial
Err: serial
USB: scanning bus for devices... 2 USB Device(s) found
usb_stor_get_info->1431,blksz:512
1 Storage Device(s) found
device name usb!
Interface: USB
Device 0: Vendor: SCSI Rev: 1.00 Prod: DISK1.8.4.9.656
Type: Removable Hard Disk
Capacity: 7695.0 MB = 7.5 GB (15759456 x 512)
No valid FAT fs found
file_fat_detectfs failed, name:usb
PHY 0x02: OUI = 0x1374, Model = 0x07, Rev = 0x02
Net PHY: AR8035
at higmac_demux() phy_intf:2 [0:mii,1:rmii,2:rgmii];MAC_TXCKOUT_MUX_REG value:0x1 [1,rgmii;2,mii;3,rmii;]
PHY 0x02: OUI = 0x1374, Model = 0x07, Rev = 0x02
change register for AR8035
CONFIG RGMII <<222>>
at higmac_net_adjust_link() port_mode:45,speed_mode:0
ETH1: PHY(phyaddr=3, rgmii) link UP: DUPLEX=HALF : SPEED=10M
MAC: 00-0B-3F-00-00-01
Press CTRL-C to abort autoboot in 2 seconds16384 KiB hi_fmc at 0:0 is now current device
CFG_BOOT_ADDR:0x0 argc 2 argv[0] logoload
### /UbootLogo/ UbootLogoload complete:bytes oadaddr0x82000000 loaded to 0x9f000000
cramfs: wrong magic
cramfs: wrong magic
### /UbootLogo/ LOAD ERROR<ffffffff> !
jpeg decoding ...
<<addr=0x9f000000, size=0xb85f9, vobuf=0x9f600000>>
addr:0x80870b24,size:755193,logoaddr:0x9f000000,:ff,dd
load jpeg err.
stMaxRect.u32Width:1024, stMaxRect.u32Height:768.
HDMI_INFO:DispFmt2HdmiTiming[383] ,Non CEA video timing:17
HDMI_INFO:Hdmi_PixelFreqSearch[127] ,u32Fmt17.
srcAddr 0x82000000, dstAddr 0x81000000
unknow
read_super_m faile
### FS LOAD ERROR<0> for boot/zImage.img!
Wrong Image Format for bootm command
ERROR: can't get kernel image!
hisilicon #
binwalk user-x.cramfs.img
DECIMAL HEXADECIMAL DESCRIPTION
--------------------------------------------------------------------------------
0 0x0 uImage header, header size: 64 bytes, header CRC: 0x6EF60315, created: 2018-07-19 13:47:28, image size: 4718592 bytes, Data Address: 0x430000, Entry Point: 0xB10000, data CRC: 0x2A278CF8, OS: Linux, CPU: ARM, image type: OS Kernel Image, compression type: gzip, image name: "linux"
64 0x40 Squashfs filesystem, little endian, version 4.0, compression:xz, size: 4717676 bytes, 153 inodes, blocksize: 65536 bytes, created: 2018-07-19 13:47:28
dd if=user-x.cramfs.img bs=1 skip=64 count=4717676 of=user-x.cramfs.img.stripped
4717676+0 records in
4717676+0 records out
4717676 bytes (4,7 MB, 4,5 MiB) copied, 10,593 s, 445 kB/s
cramfs: wrong magic
cramfs: wrong magic
Yeah, you should do that for all the files to get the complete flash. You also could try uboot first and see if that works. Then flash the rest from the uboot shell.so stripping the uImage header off one of my user-x.cramfs.img files as per above should produce a flashable file ?
No, at least not on my firmware and others also not that would be not logical. It would normally always start at 0x0u-boot should be programmed, star starting 0x1000000 i believe?
R
maurice@maurice-N73SM:~/Downloads/extract$ binwalk u-boot.bin.img
DECIMAL HEXADECIMAL DESCRIPTION
--------------------------------------------------------------------------------
0 0x0 uImage header, header size: 64 bytes, header CRC: 0x865B27D3, created: 2018-07-19 13:47:22, image size: 140597 bytes, Data Address: 0x0, Entry Point: 0x40000, data CRC: 0x37220CE3, OS: Linux, CPU: ARM, image type: Firmware Image, compression type: gzip, image name: "linux"
21664 0x54A0 LZMA compressed data, properties: 0x5D, dictionary size: 8388608 bytes, uncompressed size: 330144 bytes
root@odroidxu4:~# dd if=u-boot.bin.img bs=1 skip=64 count=4717676 of=u-boot.bin (strip uimage header 64 byte)
root@odroidxu4:~# dd if=u-boot.bin of=flash-u-boot.bin bs=1 count=1 seek=16777215 (Expand image size to fit Flash size to avoid flashrom error)
root@odroidxu4:~# flashrom -VV -p buspirate_spi:dev=/dev/ttyUSB0 -c W25Q128.V -w flash-u-boot.bin (flash 25q128 with flashrom and buspirate)
This for me will create a file with all zeros. except the last byte --> bs=1 count=1dd if=u-boot.bin of=flash-u-boot.bin bs=1 count=1 seek=16777215
truncate -s 16777215 u-boot.bin