Active Topics

 


Reply
Thread Tools
Posts: 2,802 | Thanked: 4,491 times | Joined on Nov 2007
#281
Testing a random Harmattan binary (bc):

Code:
$ arm-linux-gnueabi-readelf -A bc
Attribute Section: aeabi
File Attributes
  Tag_CPU_name: "7-A"
  Tag_CPU_arch: v7
  Tag_CPU_arch_profile: Application
  Tag_ARM_ISA_use: Yes
  Tag_THUMB_ISA_use: Thumb-2
  Tag_FP_arch: VFPv3
  Tag_Advanced_SIMD_arch: NEONv1
  Tag_ABI_PCS_wchar_t: 4
  Tag_ABI_FP_denormal: Needed
  Tag_ABI_FP_exceptions: Needed
  Tag_ABI_FP_number_model: IEEE 754
  Tag_ABI_align_needed: 8-byte
  Tag_ABI_align_preserved: 8-byte, except leaf SP
  Tag_ABI_enum_size: int
  Tag_ABI_HardFP_use: SP and DP
  Tag_ABI_VFP_args: VFP registers
I'm not sure if the erratum applies also to thumb2.

Last edited by lma; 2011-06-23 at 19:22. Reason: remove irrelevant detail
 
Posts: 94 | Thanked: 28 times | Joined on Oct 2009
#282
Originally Posted by lma View Post
Testing a random Harmattan binary (bc):

Code:
$ arm-linux-gnueabi-readelf -A bc
Attribute Section: aeabi
File Attributes
  Tag_CPU_name: "7-A"
  Tag_CPU_arch: v7
  Tag_CPU_arch_profile: Application
  Tag_ARM_ISA_use: Yes
  Tag_THUMB_ISA_use: Thumb-2
  Tag_FP_arch: VFPv3
  Tag_Advanced_SIMD_arch: NEONv1
  Tag_ABI_PCS_wchar_t: 4
  Tag_ABI_FP_denormal: Needed
  Tag_ABI_FP_exceptions: Needed
  Tag_ABI_FP_number_model: IEEE 754
  Tag_ABI_align_needed: 8-byte
  Tag_ABI_align_preserved: 8-byte, except leaf SP
  Tag_ABI_enum_size: int
  Tag_ABI_HardFP_use: SP and DP
  Tag_ABI_VFP_args: VFP registers
I'm not sure if the erratum applies also to thumb2.
Is that in the sdk or using a real device?
 
Posts: 2,802 | Thanked: 4,491 times | Joined on Nov 2007
#283
Neither, I just manually fetched a .deb from the harmattan repo and extracted it in /tmp. My arm readelf comes from embedian I think, but even plain readelf (this is on an x86_64 Ubuntu 11.04 box) reports the same.
 

The Following 2 Users Say Thank You to lma For This Useful Post:
Posts: 1,225 | Thanked: 1,905 times | Joined on Feb 2011 @ Quezon City, Philippines
#284
Okay, I just verified that the rootfs.lzo file is NOT a UBIFS dump (compare M6-rootfs.lzo with M5-rootfs.ubifs -- you'll see my point.)

Now, it looks like you'll need to do filesystem reconstruction - the EXT4 header (EF53, or when opened in XVI32 53EF) is found after the filesystem label (rootfs apparently). Why Nokia does this is unclear - but they've done numerous ***-backwards things before, this might be one of them.

The good news is that you can directly mount -t vfat the mmc0 image.
Which leads to my next question, how do we mount rootfs.lzo? It "appears" to be compressed, but we can't be certain, as the magic was stripped out. We should be able to directly mount it just like the mmc0 image. But nothing's working. EXT4, nandsim etc. None.

EDIT: rootfs.lzo is a lzo file. However, Nokia has stripped off the header for no reason at all. I've been trying for the past 3 hours to reconstruct the header from other lzo files, with no dice. If anyone can point me to how flasher-3.5.11 handles this thing, that would be much appreciated.
__________________
N9 PR 1.3 Open Mode + kernel-plus for Harmattan
@kenweknot, working on Glacier for Nemo.

Last edited by Hurrian; 2011-06-24 at 05:02.
 
Posts: 94 | Thanked: 28 times | Joined on Oct 2009
#285
Originally Posted by Hurrian View Post
Now, it looks like you'll need to do filesystem reconstruction - the EXT4 header (EF53, or when opened in XVI32 53EF) is found after the filesystem label (rootfs apparently). Why Nokia does this is unclear - but they've done numerous ***-backwards things before, this might be one of them.
I've found the ext4 magic too, but I'm not too sure it's really an ext4 header (but it might be worth trying identifying other fields)

EDIT: rootfs.lzo is a lzo file. However, Nokia has stripped off the header for no reason at all. I've been trying for the past 3 hours to reconstruct the header from other lzo files, with no dice. If anyone can point me to how flasher-3.5.11 handles this thing, that would be much appreciated.
I really don't think it is compressed. Look at the content in hexdump/xxd, you can see some ascii stuff like filenames and file contents, which you wouldn't if it was compressed. Maybe some parts are compressed (the whole rootfs.lzo file is about ~300M while it'll fit on a 4G partition so at least it's sparse) but not everything.
 
Posts: 1,225 | Thanked: 1,905 times | Joined on Feb 2011 @ Quezon City, Philippines
#286
rootfs.lzo is likely a compressed filesystem image - BTW you'll see strings even in other lzo-compressed files
__________________
N9 PR 1.3 Open Mode + kernel-plus for Harmattan
@kenweknot, working on Glacier for Nemo.
 
Posts: 94 | Thanked: 28 times | Joined on Oct 2009
#287
Originally Posted by Hurrian View Post
rootfs.lzo is likely a compressed filesystem image - BTW you'll see strings even in other lzo-compressed files
Thanks, I didn't know that (it puzzles me a little though). So yeah, maybe reconstructing an lzo header might be the solution.
 
Posts: 1,225 | Thanked: 1,905 times | Joined on Feb 2011 @ Quezon City, Philippines
#288
I think we might need someone who knows about how the lzo file is made. I have absolutely no idea what I'm doing here, and am mostly poking in the dark, hoping with crossed fingers that lzop will decompress it.

So far, the results have been:
Code:
lzop: rootfs.lzo: header corrupted (checksum error)
lzop: rootfs.lzo: header corrupted (transmitted in text mode?)
lzop: rootfs.lzo: not a lzop file
lzop: rootfs.lzo: header corrupted
__________________
N9 PR 1.3 Open Mode + kernel-plus for Harmattan
@kenweknot, working on Glacier for Nemo.
 
Posts: 94 | Thanked: 28 times | Joined on Oct 2009
#289
Just to add a little bit more of information, ape-algo looks like a tiny Linux system for flashing.

It's a Linux kernel with a tiny initscript running softupd. The flasher sends it to the device, which boots it and then waits for the flasher connection, which then sends the rest of the firmware.

I don't know how exactly ape-algo system is compacted, it might be lzo to, but I can't extract it.
 
Posts: 1,225 | Thanked: 1,905 times | Joined on Feb 2011 @ Quezon City, Philippines
#290
Originally Posted by corsac View Post
Just to add a little bit more of information, ape-algo looks like a tiny Linux system for flashing.

It's a Linux kernel with a tiny initscript running softupd. The flasher sends it to the device, which boots it and then waits for the flasher connection, which then sends the rest of the firmware.

I don't know how exactly ape-algo system is compacted, it might be lzo to, but I can't extract it.
Look out for the LZO headers. Also, it seems that there are 2 LZO files inside -- or it's just a kludge. Anyways, after extracting the second one, you find a romfs filesystem, but it's mangled. This is quickly turning into a very tedious excercise.
__________________
N9 PR 1.3 Open Mode + kernel-plus for Harmattan
@kenweknot, working on Glacier for Nemo.
 
Reply

Tags
harmattan, meego


 
Forum Jump


All times are GMT. The time now is 19:18.