|
2013-11-05
, 14:08
|
Posts: 44 |
Thanked: 9 times |
Joined on Apr 2013
|
#692
|
you're not alone, I've had the same issue with ubiboot too. tried a few different harmattan based kernels, all with the same issue. Black screen, but I haven't got around to getting debug logs yet, havent had the time. HW revision 1501
In the meantime, reflash the standard open kernel if you need to get back into harmattan.
sudo flasher -a <yourmainfirmware.bin> -k zImage_2.6.32.54-openmode_l2fix --flash-only=kernel -f -R
|
2013-11-05
, 15:18
|
Posts: 12 |
Thanked: 3 times |
Joined on Dec 2011
@ Beijing
|
#693
|
/dev/mtd0 is the bootloader, so messing with it is generally what you do not want to do, ever.
If you manage to write s**t there your device will not be able to boot, not now and never again.
And they will not be able to fix that in Nokia Care, or in any service shop since it requires equipment present only at the factory and that was closed down a long time ago.
But the question is whether you were able to damage it?
If you are in Open Mode, it depends on how you did the writing. There are some hazardous procedures, but bootloader is locked down against simple intrusion.
If you are in Closed Mode and managed to tamper with it... well, then the odds are pretty badly against you.
#include <stdio.h> #include <fcntl.h> #include <sys/ioctl.h> #include <mtd/mtd-user.h> int main() { mtd_info_t mtd_info; erase_info_t ei; int i; unsigned char data[20] = { 0xAA, 0x55, 0xAA, 0x55,0xAA, 0x55, 0xAA, 0x55,0xAA, 0x55, 0xAA, 0x55,0xAA, 0x55, 0xAA, 0x55,0xAA, 0x55, 0xAA, 0x55}; unsigned char read_buf[20] = {0x00}; int fd = open("/dev/mtd0", O_RDWR); ioctl(fd, MEMGETINFO, &mtd_info); printf("mtd0 type: %x , mtd0 total size: %x bytes , mtd0 erase size: %x bytes\n",mtd_info.type, mtd_info.size, mtd_info.erasesize); ei.length = mtd_info.erasesize; for(ei.start = 0; ei.start < mtd_info.size; ei.start += ei.length){ ioctl(fd, MEMUNLOCK, &ei); printf("Eraseing Block %#x\n", ei.start); ioctl(fd, MEMERASE, &ei); } lseek(fd, 0, SEEK_SET); read(fd, read_buf, sizeof(read_buf)); for(i = 0; i<20; i++) printf("buf[%d] = 0x%02x\n", i, (unsigned int)read_buf[i]); lseek(fd, 0, SEEK_SET); write(fd, data, sizeof(data)); lseek(fd, 0, SEEK_SET); read(fd, read_buf, sizeof(read_buf)); for(i = 0; i<20; i++) printf("buf[%d] = 0x%02x\n", i, (unsigned int)read_buf[i]); close(fd); return 0; }
mtd0 type: 4 , mtd0 total size: 100000 bytes , mtd0 erase size: 40000 bytes Eraseing Block 0 Eraseing Block 0x40000 Eraseing Block 0x80000 Eraseing Block 0xc0000 buf[0] = 0xa0 buf[1] = 0x00 buf[2] = 0x00 buf[3] = 0x00 buf[4] = 0xf0 buf[5] = 0x2d buf[6] = 0x00 buf[7] = 0x00 buf[8] = 0x00 buf[9] = 0x00 buf[10] = 0x00 buf[11] = 0x00 buf[12] = 0x00 buf[13] = 0x00 buf[14] = 0x00 buf[15] = 0x00 buf[16] = 0x00 buf[17] = 0x00 buf[18] = 0x00 buf[19] = 0x00 buf[0] = 0xa0 buf[1] = 0x00 buf[2] = 0x00 buf[3] = 0x00 buf[4] = 0xf0 buf[5] = 0x2d buf[6] = 0x00 buf[7] = 0x00 buf[8] = 0x00 buf[9] = 0x00 buf[10] = 0x00 buf[11] = 0x00 buf[12] = 0x00 buf[13] = 0x00 buf[14] = 0x00 buf[15] = 0x00 buf[16] = 0x00 buf[17] = 0x00 buf[18] = 0x00 buf[19] = 0x00
The Following User Says Thank You to gemfield For This Useful Post: | ||
|
2013-11-05
, 15:38
|
Community Council |
Posts: 4,920 |
Thanked: 12,867 times |
Joined on May 2012
@ Southerrn Finland
|
#694
|
Thanks for your answer.
1, My N9 is in closed mode. in order to use ubiboot, now I am learning to be familiar with the N9 OS
2, Here is my code:
RM696-21-3_PR_003:~# cat mtd.c
3, Here is the result:
RM696-21-3_PR_003:~# gcc mtd.c -o mtd
RM696-21-3_PR_003:~#./mtd
4, Seems that there have no warning or error, but mtd0 data is still old(i.e. write to mtd0 failed in fact).
5, What is the reason that write to mtd0 looks success but in fact failed?
6, If I reboot my N9, any risk here?
Thanks.
|
2013-11-05
, 18:49
|
Posts: 69 |
Thanked: 50 times |
Joined on Mar 2012
|
#695
|
|
2013-11-05
, 19:23
|
Posts: 69 |
Thanked: 50 times |
Joined on Mar 2012
|
#696
|
|
2013-11-05
, 20:17
|
Community Council |
Posts: 4,920 |
Thanked: 12,867 times |
Joined on May 2012
@ Southerrn Finland
|
#697
|
what exactly do you mean by flashing to closed/open mode back to back i don't understand exactly, please elaborate the commands for this if you don't mind, thanks again, i just ref lashed the device using
sudo flasher -F <yourmainfirmware.bin> -F <youremmc.bin> -f and then flashed the open kernel, please correct what I am doing so Aegis does not have issues, thanks again
|
2013-11-05
, 20:20
|
Community Council |
Posts: 4,920 |
Thanked: 12,867 times |
Joined on May 2012
@ Southerrn Finland
|
#698
|
I got ubiboot booting my device by reading the readme file in ubiboot downloads, i didnt get rid of the openmode warning, now that i got this far is there an easy way to do that, i tried and it gave an error, Thanks again
|
2013-11-06
, 14:24
|
Posts: 12 |
Thanked: 3 times |
Joined on Dec 2011
@ Beijing
|
#699
|
@plourde, you do not need to remove sillyboot at all, sillyboot and ubiboot operate at different boot phases.
How sillyboot works:
- boot loader starts up the flashed kernel just as usual
- last part of kernel startup is call to /sbin/preinit which does number of things before launching up /sbin/init
- sillyboot is a modification of /sbin/preinit which allows starting up different init, based on user selection
How ubiboot works:
- boot loader starts up the ubiboot kernel instead of device kernel
- ubiboot runs a self-contained linux minidistro which has many things, including the boot menu selection
- based on user selection, ubiboot loads up the next level kernel and set sup the correct boot environment.
a) for Harmattan, it prepares kernel to run /sbin/preinit_harmattan from mmcblk0p2.
b) for Nitdroid, it prepares kernel to run /sbin/preinit_nitdroid from mmcblk0p2.
c) for Nemo, it prepares kernel to run /sbin/init from mmcblk0p4.
d) for Firefox, it prepares kernel to run /sbin/preinit_firefox from mmcblk0p2.
e) and so on...- last thing what happens, is that ubiboot executes the loaded 2nd level kernel, which goes on and starts the prepared preinit/init file.
So, now you understand that when you use ubiboot, your sillyboot will never be run at all, the modified /sbin/preinit that is sillyboot is sidestepped totally.
To install ubiboot, this is the simple list of things what to do:
1.) copy the file ubiboot.conf to your /home/userMyDocs/boot/ directory
2.) copy the cpio archive to your /home/user/MyDocs/boot/ directory
3.) copy your kernels to /boot/ directory
4.) copy the preinits to /sbin/ directory
5.) flash the ubiboot kernel
That's it. And remember to check that ubiboot.conf has the correct list of kernels that you copied to /boot/
There are dozens of things you could do differently but this is the basic setup.
The Following User Says Thank You to gemfield For This Useful Post: | ||
|
2013-11-06
, 15:08
|
Community Council |
Posts: 4,920 |
Thanked: 12,867 times |
Joined on May 2012
@ Southerrn Finland
|
#700
|
Hi, juiceme, I am really intresting in that how ubiboot works:
1, /dev/mtd0 is the bootloader and locked by Nokia, then why it can start the ubiboot kernel? Isn't it can only load official kernel with Nokia signature? Does ubiboot kernel have such signature?
2, what is the difference between /dev/mtd0 bootloader and the Nolo bootloader? If they are different, then which partion that the Nolo bootloader located?
The Following User Says Thank You to juiceme For This Useful Post: | ||
The Glorious Lady T.Mavica
Twitter https://twitter.com/TMavica