Longse LS-N3525D Bricked

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,952
Reaction score
6,787
Location
Scotland
Download to address: 0x192
That will blow it up for sure!
Trampled all over the vector table and lots more - check out the PC (Program Counter) value in the abort diagnostic.
There is still a chance to test this out given the right load address and start address, as per the original 'printenv' values.

Best not to change the u-boot environment to tell tftp the address of the tftp server - that will need to be intact when / if you get it back running.
From what I recall - something like 'tftp tftp_server_IP_address' on the command line should work if the default name (uImage) and loadaddress are still at defaults. On the assumption yours is the same.

But - your USB boot looks very promising - as you say, it looks like the update scripts is running, and giving all the correct module names.
But why does it fail after apparently reading all that data - all the dots?
That must be the $64 question.
 

bheremans

Young grasshopper
Joined
Nov 11, 2015
Messages
38
Reaction score
5
That will blow it up for sure!
Trampled all over the vector table and lots more - check out the PC (Program Counter) value in the abort diagnostic.
There is still a chance to test this out given the right load address and start address, as per the original 'printenv' values.

Best not to change the u-boot environment to tell tftp the address of the tftp server - that will need to be intact when / if you get it back running.
From what I recall - something like 'tftp tftp_server_IP_address' on the command line should work if the default name (uImage) and loadaddress are still at defaults. On the assumption yours is the same.
The only thing i did was

tftp + enter.
it downloaded uImage from the tft I set up at 192.168.0.2
environment is back to default after command "reset" + enter

No idea why usb flash does nothing. In fact that is how I breicked it totaly, before I had a working webserver, but no working graphical environment....
but not ready to give up. still trying some stuff :)
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,952
Reaction score
6,787
Location
Scotland
Oh, OK. No permanent change then.
It's looking like the load address has been taken from the IP address.

You can see that the tftp download was to the very bottom of memory, which would wipe out u-boot's tables and cause the data abort.

The USB boot is interestingly functional.
And you can see the flash erase which is the cause of all your problems.
I wonder if it would do anything at all if it was just uImage on the USB drive? Optimistic I know.
 

bheremans

Young grasshopper
Joined
Nov 11, 2015
Messages
38
Reaction score
5
Hmmm... yes, but their development board will be quite different from what's in the NVR.
The commands are available. and the memory adresses in the sdk doc seem the same as in printenv.

When renaming uImage from extracted image to HI535_kernel and puting it on usb :

Code:
11111111111111111111111111111111111111111111111111111111111111111111111111111
Interface:  USB
  Device 0: Vendor: takeMS   Rev: 8.07 Prod: colorline
            Type: Removable Hard Disk
            Capacity: 8032.0 MB = 7.8 GB (16449536 x 512)
Partition 1: Filesystem: FAT32 "NO NAME    "
reading Hi3535_Uboot.bin
reading Hi3535_Kernel
reading Hi3535_Kernel
..............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Image Hi3535_Kernel bad total SIZE
reading Hi3535_Rootfs
reading Hi3535_App
reading Hi3535_Www
reading Hi3535_Data
reading Hi3535_Config
reading Hi3535_Logo
reading Hi3535_AutoUpdate.bin
Hit any key to stop autoboot:  0
32768 KiB hi_sfc at 0:0 is now current device



Wrong Image Format for bootm command
ERROR: can't get kernel image!
 

bheremans

Young grasshopper
Joined
Nov 11, 2015
Messages
38
Reaction score
5
OK, so here is a uImage without the trailing garbage from the crude snip:
https://drive.google.com/open?id=0ByOOL4RskWFLb2VDblJxSUh4NVk
thank you verry much .. we are getting somewhere .. I could flash it. and it starts to boot a little bit :

Code:
jpeg decoding ...
<<addr=0x82000000, size=0xc0000, vobuf=0xc7160000>>
mmu_enable
<<imgwidth=1280, imgheight=720, linebytes=2560>>
decode success!!!!
decode jpeg!
dev 1 opened!
graphic layer 1 opened!
USB:   scanning bus for devices... USB:   Starting the controller
scanning bus for devices... 2 USB Device(s) found
usb_stor_get_info->1433,blksz:512
1 Storage Device(s) found
11111111111111111111111111111111111111111111111111111111111111111111111111111
Interface:  USB
  Device 0: Vendor: takeMS   Rev: 8.07 Prod: colorline
            Type: Removable Hard Disk
            Capacity: 8032.0 MB = 7.8 GB (16449536 x 512)
Partition 1: Filesystem: FAT32 "NO NAME    "
reading Hi3535_Uboot.bin
reading Hi3535_Kernel
reading Hi3535_Kernel
...............................................................................................................................................................................................................................................................................................................................................................
flash erase...
flash write...
reading Hi3535_Rootfs
reading Hi3535_App
reading Hi3535_Www
reading Hi3535_Data
reading Hi3535_Config
reading Hi3535_Logo
reading Hi3535_AutoUpdate.bin
Erasing SPI flash, offset 0x00080000 size 256K ...done
Writing to SPI flash, offset 0x00080000 size 256K ...done
Hit any key to stop autoboot:  0
32768 KiB hi_sfc at 0:0 is now current device




## Booting kernel from Legacy Image at 82000000 ...
   Image Name:   Linux-3.4.35_hi3535
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3604184 Bytes = 3.4 MiB
   Load Address: 80008000
   Entry Point:  80008000
   Loading Kernel Image ... OK
OK


Starting kernel ...


Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0
Linux version 3.4.35_hi3535 (root@ubuntu) (gcc version 4.4.1 (Hisilicon_v200(gcc4.4-290+glibc-2.11+eabi+nptl)) ) #32 SMP Thu Aug 13 16:27:22 CST 2015
CPU: ARMv7 Processor [414fc091] revision 1 (ARMv7), cr=10c53c7d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: hi3535
Truncating memory at 0x80000000 to fit in 32-bit physical address space
Memory policy: ECC disabled, Data cache writealloc
PERCPU: Embedded 7 pages/cpu @c09ef000 s6528 r8192 d13952 u32768
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 106426
Kernel command line: mem=500M console=ttyAMA0,115200 initrd=0x82400000,0xA00000 root=/dev/ram0 init=/linuxrc mtdparts=hi_sfc:1M(boot),4M(kernel),10M(rootfs),10M(app),4M(www),1M(data),1M(config),1M(logo)
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 419MB = 419MB total
Memory: 408176k/408176k available, 20880k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc : 0xda800000 - 0xff000000   ( 584 MB)
    lowmem  : 0xc0000000 - 0xda300000   ( 419 MB)
    pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    modules : 0xbf000000 - 0xbfe00000   (  14 MB)
      .text : 0xc0008000 - 0xc0625000   (6260 kB)
      .init : 0xc0625000 - 0xc0651980   ( 179 kB)
      .data : 0xc0652000 - 0xc0680b60   ( 187 kB)
       .bss : 0xc0680b84 - 0xc06a239c   ( 135 kB)
SLUB: Genslabs=11, HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:128
sched_clock: 32 bits at 62MHz, resolution 16ns, wraps every 68719ms
Console: colour dummy device 80x30
Calibrating delay loop... 1987.37 BogoMIPS (lpj=9936896)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
Initializing cgroup subsys freezer
CPU: Testing write buffer coherency: ok
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters available
Setting up static identity map for 0x804ea2e0 - 0x804ea314
L310 cache controller enabled
l2x0: 16 ways, CACHE_ID 0x410000c9, AUX_CTRL 0x72430001, Cache size: 262144 B
CPU1: Booted secondary processor
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
Brought up 2 CPUs
SMP: Total of 2 processors activated (3981.31 BogoMIPS).
NET: Registered protocol family 16
hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 4 bytes.
Serial: AMBA PL011 UART driver
uart:0: ttyAMA0 at MMIO 0x20080000 (irq = 40) is a PL011 rev2
console [ttyAMA0] enabled
uart:1: ttyAMA1 at MMIO 0x20090000 (irq = 41) is a PL011 rev2
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Switching to clocksource timer0
cfg80211: Calling CRDA to update world regulatory domain
NET: Registered protocol family 2
IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
TCP established hash table entries: 16384 (order: 5, 131072 bytes)
TCP bind hash table entries: 16384 (order: 5, 131072 bytes)
TCP: Hash tables configured (established 16384 bind 16384)
TCP: reno registered
UDP hash table entries: 256 (order: 1, 8192 bytes)
UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
Trying to unpack rootfs image as initramfs...
rootfs image is not initramfs (junk in compressed archive); looks like an initrd
Freeing initrd memory: 10240K
VFS: Disk quotas dquot_6.5.2
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
squashfs: version 4.0 (2009/01/31) Phillip Lougher
NTFS driver 2.1.30 [Flags: R/W DEBUG].
jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
fuse init (API version 7.18)
SGI XFS with security attributes, large block/inode numbers, no debug enabled
msgmni has been set to 817
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
io scheduler noop registered
io scheduler deadline registered (default)
io scheduler cfq registered
brd: module loaded
ahci: SSS flag set, parallel bus scan disabled
ahci ahci.0: AHCI 0001.0300 32 slots 3 ports 6 Gbps 0x7 impl platform mode
ahci ahci.0: flags: ncq sntf stag pm led clo only pmp fbs slum part ccc sxs boh
scsi0 : ahci_platform
scsi1 : ahci_platform
scsi2 : ahci_platform
ata1: SATA max UDMA/133 mmio [mem 0x12010000-0x1201ffff] port 0x100 irq 63
ata2: SATA max UDMA/133 mmio [mem 0x12010000-0x1201ffff] port 0x180 irq 63
ata3: SATA max UDMA/133 mmio [mem 0x12010000-0x1201ffff] port 0x200 irq 63
Spi id table Version 1.22
Spi(cs1) ID: 0xC2 0x20 0x19 0xC2 0x20 0x19
SPI FLASH start_up_mode is 3 Bytes
Spi(cs1):
Block:64KB
Chip:32MB
Name:"MX25L25635E/735E/635F"
spi size: 32MB
chip num: 1
8 cmdlinepart partitions found on MTD device hi_sfc
8 cmdlinepart partitions found on MTD device hi_sfc
Creating 8 MTD partitions on "hi_sfc":
0x000000000000-0x000000100000 : "boot"
0x000000100000-0x000000500000 : "kernel"
0x000000500000-0x000000f00000 : "rootfs"
0x000000f00000-0x000001900000 : "app"
0x000001900000-0x000001d00000 : "www"
0x000001d00000-0x000001e00000 : "data"
0x000001e00000-0x000001f00000 : "config"
0x000001f00000-0x000002000000 : "logo"
Found Nand Flash Controller V504.
Nand ID: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
No NAND device found
PPP generic driver version 2.4.2
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
hiusb-ehci hiusb-ehci.0: HIUSB EHCI
hiusb-ehci hiusb-ehci.0: new USB bus registered, assigned bus number 1
hiusb-ehci hiusb-ehci.0: irq 54, io mem 0x10040000
hiusb-ehci hiusb-ehci.0: USB 0.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
hiusb-ohci hiusb-ohci.0: HIUSB OHCI
hiusb-ohci hiusb-ohci.0: new USB bus registered, assigned bus number 2
hiusb-ohci hiusb-ohci.0: irq 53, io mem 0x10030000
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
xhci-hcd hiusb3.0: xHCI Host Controller
xhci-hcd hiusb3.0: new USB bus registered, assigned bus number 3
xhci-hcd hiusb3.0: irq 64, io mem 0x12000000
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 1 port detected
xhci-hcd hiusb3.0: xHCI Host Controller
xhci-hcd hiusb3.0: new USB bus registered, assigned bus number 4
hub 4-0:1.0: USB hub found
hub 4-0:1.0: 1 port detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
mousedev: PS/2 mouse device common for all mice
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
TCP: cubic registered
Initializing XFRM netlink socket
NET: Registered protocol family 17
NET: Registered protocol family 15
lib80211: common routines for IEEE802.11 drivers
Registering the dns_resolver key type
registered taskstats version 1
ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata1.00: ATA-8: Hitachi HUA723020ALA641, MK7OA840, max UDMA/133
ata1.00: 3907029168 sectors, multi 0: LBA48 NCQ (depth 31/32)
usb 3-1: new high-speed USB device number 2 using xhci-hcd
ata1.00: configured for UDMA/133
scsi 0:0:0:0: Direct-Access     ATA      Hitachi HUA72302 MK7O PQ: 0 ANSI: 5
sd 0:0:0:0: [sda] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)
sd 0:0:0:0: Attached scsi generic sg0 type 0
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
scsi3 : usb-storage 3-1:1.0
 sda: sda1
sd 0:0:0:0: [sda] Attached SCSI disk
ata2: SATA link down (SStatus 0 SControl 300)
ata3: SATA link down (SStatus 0 SControl 300)
RAMDISK: Couldn't find valid RAM disk image starting at 0.
scsi 3:0:0:0: Direct-Access     takeMS   colorline        8.07 PQ: 0 ANSI: 2
sd 3:0:0:0: Attached scsi generic sg1 type 0
sd 3:0:0:0: [sdb] 16449536 512-byte logical blocks: (8.42 GB/7.84 GiB)
sd 3:0:0:0: [sdb] Write Protect is off
sd 3:0:0:0: [sdb] No Caching mode page present
sd 3:0:0:0: [sdb] Assuming drive cache: write through
sd 3:0:0:0: [sdb] No Caching mode page present
sd 3:0:0:0: [sdb] Assuming drive cache: write through
yaffs: dev is 1048576 name is "ram0" rw
yaffs: passed flags ""
yaffs: dev is 1048576 name is "ram0" rw
yaffs: passed flags ""
List of all partitions:
f000            1024 romblock0  (driver?)
1f00            1024 mtdblock0  (driver?)
f001            4096 romblock1  (driver?)
1f01            4096 mtdblock1  (driver?)
f002           10240 romblock2  (driver?)
1f02           10240 mtdblock2  (driver?)
f003           10240 romblock3  (driver?)
1f03           10240 mtdblock3  (driver?)
f004            4096 romblock4  (driver?)
1f04            4096 mtdblock4  (driver?)
f005            1024 romblock5  (driver?)
1f05            1024 mtdblock5  (driver?)
f006            1024 romblock6  (driver?)
 sdb: sdb1
1f06            1024 mtdblock6  (driver?)
f007            1024 romblock7  (driver?)
1f07            1024 mtdblock7
sd 3:0:0:0: [sdb] No Caching mode page present
sd 3:0:0:0: [sdb] Assuming drive cache: write through
sd 3:0:0:0: [sdb] Attached SCSI removable disk
 (driver?)
0800      1953514584 sda  driver: sd
  0801      1953513472 sda1 f37dd3a7-0d66-4ed5-9686-95f835eda640
0810         8224768 sdb  driver: sd
  0811         8223744 sdb1 00000000-0000-0000-0000-000000000000
No filesystem could mount root, tried:  ext3 ext2 ext4 cramfs squashfs vfat msdos iso9660 ntfs fuseblk xfs yaffs yaffs2
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)
CPU0: stopping
Backtrace:
[<c000dbc0>] (dump_backtrace+0x0/0x110) from [<c04e70f8>] (dump_stack+0x18/0x1c)
 r6:c065e4c0 r5:c0652000 r4:00000000 r3:00000000
[<c04e70e0>] (dump_stack+0x0/0x1c) from [<c000eda0>] (handle_IPI+0x1d4/0x1f4)
[<c000ebcc>] (handle_IPI+0x0/0x1f4) from [<c000850c>] (gic_handle_irq+0x64/0x68)
[<c00084a8>] (gic_handle_irq+0x0/0x68) from [<c00090e0>] (__irq_svc+0x40/0x50)
Exception stack(0xc0653f30 to 0xc0653f78)
3f20:                                     00000003 c065e564 00000000 00000000
3f40: c0652000 c0680c88 c04ed0e0 c06617d0 00000000 414fc091 00000000 c0653f84
3f60: c0653f88 c0653f78 c000a788 c000a78c 60000013 ffffffff
 r7:c0653f64 r6:ffffffff r5:60000013 r4:c000a78c
[<c000a758>] (default_idle+0x0/0x38) from [<c000aed4>] (cpu_idle+0xc0/0xf0)
[<c000ae14>] (cpu_idle+0x0/0xf0) from [<c04e2344>] (rest_init+0x78/0x7c)
 r7:bfffffff r6:c064a97c r5:00000000 r4:c065e610
[<c04e22cc>] (rest_init+0x0/0x7c) from [<c06259b8>] (start_kernel+0x2f4/0x300)
[<c06256c4>] (start_kernel+0x0/0x300) from [<80008044>] (0x80008044)
 r8:8000406a r7:c06617c4 r6:c064a978 r5:c065e53c r4:10c53c7d
Now i will need the rootfs. tried to rename extract2.img to Hi3535_Rootfs .. it found the file but wouldn't flash ..

Code:
usb_stor_get_info->1433,blksz:512
1 Storage Device(s) found
11111111111111111111111111111111111111111111111111111111111111111111111111111
Interface:  USB
  Device 0: Vendor: takeMS   Rev: 8.07 Prod: colorline
            Type: Removable Hard Disk
            Capacity: 8032.0 MB = 7.8 GB (16449536 x 512)
Partition 1: Filesystem: FAT32 "NO NAME    "
reading Hi3535_Uboot.bin
reading Hi3535_Kernel
reading Hi3535_Rootfs
[B]Image Hi3535_Rootfs bad MAGIC or ARCH[/B]
reading Hi3535_App
reading Hi3535_Www
reading Hi3535_Data
reading Hi3535_Config
reading Hi3535_Logo
reading Hi3535_AutoUpdate.bin
Hit any key to stop autoboot:  0
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,952
Reaction score
6,787
Location
Scotland
That's coming along quite well.
Let me take a look for the initramfs - there was a gzipped section just after uImage that I thought was the mainbody the uncompressor was going to operate on.
I don't think it's that.
Extract2 is a cramfs, and does look like the rootfs.
What you've tried seems logical - I wonder why it didn't work?
 

bheremans

Young grasshopper
Joined
Nov 11, 2015
Messages
38
Reaction score
5
Extract2 was more logical for me. But tried extract1 now .. Same error.. Bad magic.

Verstuurd vanaf mijn SM-G920F met Tapatalk
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,952
Reaction score
6,787
Location
Scotland
It's probably late where you are - 1hour ahead of Scotland?
Extract_1 is definitely the rootfs - but maybe needs a trim. Or maybe I cut it wrong. But it does expand OK. I'll take a look.
There is a mkimg.rootfs script in extract_2 that covers several different formats - but it would be guesswork which to try.
 

bheremans

Young grasshopper
Joined
Nov 11, 2015
Messages
38
Reaction score
5

bheremans

Young grasshopper
Joined
Nov 11, 2015
Messages
38
Reaction score
5
Found some hashes inside the image file


COREMD5=100700f56c726a1a307afe1f3203dc21
BASEMD5=44bc9510d34793ef10e1bd23374f2005
APP1MD5=0ea161e21c4258fe7c02d84c0dc24dea
WWWMD5=c24cf6b52b8734f293d1a4442e3366ee
LOGOMD5=d2fdaf3f881d448ad82e53113d68abf3
UBOOTMD5=9838d8354db16d5e1d16ef0df57d524d




the md5 hash for the striped down kernel that I could flash was 100700f56c726a1a307afe1f3203dc21


When booting from usb it is looking for one of these files


reading Hi3535_Uboot.bin
reading Hi3535_Kernel
reading Hi3535_Rootfs
reading Hi3535_App
reading Hi3535_Www
reading Hi3535_Data
reading Hi3535_Config
reading Hi3535_Logo
reading Hi3535_AutoUpdate.bin


So I suppose Rootfs = base must be 44bc9510d34793ef10e1bd23374f2005
 

bheremans

Young grasshopper
Joined
Nov 11, 2015
Messages
38
Reaction score
5
Ok. i was able to correctly cut extract 1 .. checksum is the same as APP1MD5 .. or Hi3535_App
Now going try to cut extract2, because for me that realy like slike a root file system :)

screenshot.png

can't flash right now, that will be tonight
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,952
Reaction score
6,787
Location
Scotland
Ok. i was able to correctly cut extract 1 .. checksum is the same as APP1MD5 .. or Hi3535_App
Interesting - as it holds /lib and init and so on it looked like a good rootfs candidate.
So are you thinking the 'bad magic or arch' isn't a header comment but may be a bit misleading and really means bad hash? Could be.
I was going to try that make.rootfs - but it sounds like you're well down that path.

It's strange then that the Hi3535_Autoupdate.bin isn't just properly accepted and fixes the device.
Unless there are different formats of the firmware for USB or web update.
The 110 byte header only mentions APP1.BIN, BASE.BIN, CORE.BIN, LOGO.BIN, WWW.BIN
 

bheremans

Young grasshopper
Joined
Nov 11, 2015
Messages
38
Reaction score
5
I tried to flash the files but same error.. bad magic or arch

I'm pretty sure extract 2 is the rootfs, extract1 are only libs for the ui app. extract1 seems a complete linux rootfs.
but why wrong arch or magic is the question.

The update file is normally to flash via web interface. when flashing it via usb i see an error :

flash erase...
flash write...
hisfc350.c(444): write length is 0.

Thinking what to do next Strange thing is that md5 checksum is correct now ...
 

bheremans

Young grasshopper
Joined
Nov 11, 2015
Messages
38
Reaction score
5
when I see this info

https://translate.google.com/translate?sl=auto&tl=en&js=y&prev=_t&hl=nl&ie=UTF-8&u=http://blog.sina.com.cn/s/blog_63eaeced0102ux4m.html&edit-text=

Code:
[COLOR=#555555][FONT=Microsoft YaHei]2) Writing u-boot[/FONT][/COLOR][COLOR=#555555][FONT=Microsoft YaHei] [/FONT][/COLOR]
[COLOR=#555555][FONT=Microsoft YaHei]sf probe 0[/FONT][/COLOR][COLOR=#555555][FONT=Microsoft YaHei] [/FONT][/COLOR]
[COLOR=#555555][FONT=Microsoft YaHei]mw.b 82000000 ff 100000[/FONT][/COLOR][COLOR=#555555][FONT=Microsoft YaHei] [/FONT][/COLOR]
[COLOR=#555555][FONT=Microsoft YaHei]tftp 0x82000000 u-boot-hi3535.bin[/FONT][/COLOR][COLOR=#555555][FONT=Microsoft YaHei] [/FONT][/COLOR]
[COLOR=#555555][FONT=Microsoft YaHei]sf probe 0[/FONT][/COLOR][COLOR=#555555][FONT=Microsoft YaHei] [/FONT][/COLOR]
[COLOR=#555555][FONT=Microsoft YaHei]sf erase 0 100000[/FONT][/COLOR][COLOR=#555555][FONT=Microsoft YaHei] [/FONT][/COLOR]
[COLOR=#555555][FONT=Microsoft YaHei]sf write 82000000 0 100000[/FONT][/COLOR][COLOR=#555555][FONT=Microsoft YaHei] [/FONT][/COLOR]
[COLOR=#555555][FONT=Microsoft YaHei]reset[/FONT][/COLOR][COLOR=#555555][FONT=Microsoft YaHei] [/FONT][/COLOR]
[COLOR=#555555][FONT=Microsoft YaHei]3) programming kernel[/FONT][/COLOR][COLOR=#555555][FONT=Microsoft YaHei] [/FONT][/COLOR]
[COLOR=#555555][FONT=Microsoft YaHei]mw.b 82000000 ff 400000[/FONT][/COLOR][COLOR=#555555][FONT=Microsoft YaHei] [/FONT][/COLOR]
[COLOR=#555555][FONT=Microsoft YaHei]tftp 82000000 uImage_hi3535[/FONT][/COLOR][COLOR=#555555][FONT=Microsoft YaHei] [/FONT][/COLOR]
[COLOR=#555555][FONT=Microsoft YaHei]sf probe 0[/FONT][/COLOR][COLOR=#555555][FONT=Microsoft YaHei] [/FONT][/COLOR]
[COLOR=#555555][FONT=Microsoft YaHei]sf erase 100000 400000[/FONT][/COLOR][COLOR=#555555][FONT=Microsoft YaHei] [/FONT][/COLOR]
[COLOR=#555555][FONT=Microsoft YaHei]sf write 82000000 100000 400000[/FONT][/COLOR][COLOR=#555555][FONT=Microsoft YaHei] [/FONT][/COLOR]
[COLOR=#555555][FONT=Microsoft YaHei]4) programming file system[/FONT][/COLOR][COLOR=#555555][FONT=Microsoft YaHei] [/FONT][/COLOR]
[COLOR=#555555][FONT=Microsoft YaHei]mw.b 82000000 ff b00000[/FONT][/COLOR][COLOR=#555555][FONT=Microsoft YaHei] [/FONT][/COLOR]
[COLOR=#555555][FONT=Microsoft YaHei]tftp 0x82000000 rootfs_hi3535_64k.jffs2[/FONT][/COLOR][COLOR=#555555][FONT=Microsoft YaHei] [/FONT][/COLOR]
[COLOR=#555555][FONT=Microsoft YaHei]sf erase 500000 b00000[/FONT][/COLOR][COLOR=#555555][FONT=Microsoft YaHei] [/FONT][/COLOR]
[COLOR=#555555][FONT=Microsoft YaHei]sf write 82000000 500000 b00000[/FONT][/COLOR][COLOR=#555555][FONT=Microsoft YaHei] [/FONT][/COLOR]
[COLOR=#555555][FONT=Microsoft YaHei]5) set the startup parameters[/FONT][/COLOR][COLOR=#555555][FONT=Microsoft YaHei] [/FONT][/COLOR]
[COLOR=#555555][FONT=Microsoft YaHei]setenv bootargs 'mem = 64M console = ttyAMA0,115200 root = / dev / mtdblock2 rootfstype = jffs2 mtdparts = hi_sfc: 1M (boot), 4M (kernel), 11M (rootfs)'[/FONT][/COLOR][COLOR=#555555][FONT=Microsoft YaHei] [/FONT][/COLOR]
[COLOR=#555555][FONT=Microsoft YaHei]setenv bootcmd 'sf probe 0; sf read 0x82000000 0x100000 0x400000; bootm 0x82000000'[/FONT][/COLOR][COLOR=#555555][FONT=Microsoft YaHei] [/FONT][/COLOR]
[COLOR=#555555][FONT=Microsoft YaHei]sa[/FONT][/COLOR][COLOR=#555555][FONT=Microsoft YaHei] [/FONT][/COLOR]
then I think rootfs image must be some sort of jffs2 img
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,952
Reaction score
6,787
Location
Scotland
Well, that's a bit disappointing. Especially as the MD5 was a match. That seems wrong.
When you spotted the MD5 way to identify the files it looked like you were on the home straight.
then I think rootfs image must be some sort of jffs2 img
In practice a rootfs can be any type of file system. Whatever the kernel is told to use on the bootup command line.

Your bootargs suggests it should be an initrd compressed archive - which doesn't say explicitly what compression.
Requires inspection, I'll see if I can find what it is.
"bootargs=mem=500M console=ttyAMA0,115200 initrd=0x82400000,0xA00000 root=/dev/ram0 init=/linuxrc mtdparts=hi_sfc:1M(boot),4M(kernel),10M(rootfs),10M(app),4M(www),1M(data),1M(config),1M(logo)
"
 
Top