Reply
Thread Tools
Posts: 2 | Thanked: 1 time | Joined on Jul 2007 @ Finland
#1
--- #1 Become root ---
Why is "you may brick your device (read: render it unusable)" said on http://maemo.org/community/wiki/HowDoiBecomeRoot

As far as I know, bricking a device means making it so dead, that one can't usually make it work again, without the manufacturer's repair (in one way or another).

By becoming a root in N800 (and 770?), you can apparently write to the portion of memory where the boot loader is (aka. flashing the boot loader) (umm if you know where this portion of memory is, please tell.. I remember that it was some readily available /dev/ node.. wrong?), and thus if you write there something that can't boot the device and/or flash it (it is the boo tloader that communicates with Nokia's "flasher" program ?), then you could *brick* the device.

Otherwise by becoming a root and messing up all the file systems, the device can be restored by re-flashing those parts with the flasher and NoLo cooperating when the device starts. Correct?

Question: Is there other dangers in becoming a root on N800 (or 770) other than the one I listed ?
If not, a detailed (as I wrote above?) explanation of the danger could be added to the wiki.

Question: Is the "gainroot" script used by anything in the operating system ? (So to know if changing it's content -not to check if in "Research & Develop" mode- doesn't harm anything?)

If there is harm in changing the script, a second script, "rootme" (nothing to do with the default root password, just the same name), could be created in the same directory where gainroot is and /etc/sudoers modified to that it allows "user" to execute the script with command "sudo -H rootme"



--- #2 NoLo (Nokia flasher) options ---
Please correct me when I'm wrong and answer to questions you can, I will fill the places with answers when they are received.

Code:
--fiasco, -F <arg>            Location of a FIASCO image
"Package" file which contains parts or all parts necessary to flash some components (NoLo, kernel, root, etc.) on the device

Code:
--kernel, -k <arg>            Location of kernel image
Where is the kernel image stored on the device ?

Code:
--initfs, -n <arg>            Location of initfs image
Where is the initramfs image stored, on the device ?

Code:
--rootfs, -r <arg>            Location of root JFFS2 image
Where is this stored (and is it unpacked, or as a single file), on the device ?

Code:
--xloader, -x <arg>           Location of X-Loader image
What is X-Loader and where is it stored (unpacked, or as a single file), on the device ?

Code:
--secondary, -s <arg>         Location of NOLO secondary bootloader image
What is NoLo's (Nokia Loader) function, when is it activated and where is it stores (uncompressed or image?)

Code:
--2nd, -2 <arg>               Location of NOLO cold flasher ("2nd") image
What is "NoLo cold flasher", what is it's function, when is it activated and where is it stores (uncompressed or image?)

Code:
--unpack, -u [arg]            Unpack a FIASCO image
Self-explanatory.

Code:
--flash, -f                   Load and flash all supplied images
"Load" ?

Code:
--load, -l                    Only load all supplied images
Siat! Where ?!

Code:
--boot, -b [arg]              Boot the kernel with optional cmdline
Is this option permanent ? If it is, then where is this stored, on the device ?

Code:
--reboot, -R                  Reboot the board (e.g. after flashing NOLO)
Are the parameters processed "orderly", so if I put -R in front of everything else, the device re-boots and flashing doesn't start ?

Code:
--read-board-id, -i           Print out the board type
Some info from the board, yay.

Code:
--serial-port, -S <arg>       Serial port used for cold flashing
Serial port on the host? What is this "cold flashing" ?

Code:
--initialize-port, -I <arg>   Only initialize the serial port
Explain... ?

Code:
--cold-flash, -c              "Cold flash" the device
What is cold flashing ?

Code:
--hw-revision, -h <arg>       Specify product code and HW revision
Why can this be specified ? Function ? Does this change the setting on a device without flashing or with flashing, or both? Where is this written to (when flashing and when directly changing, without flashing) ?

Code:
--enable-rd-mode              Enable R&D mode on the device
(Research & Development mode)
Does this change the flag on a device without flashing or with flashing, or both? Where is this written to (when flashing and when directly changing, without flashing) ?

Code:
--disable-rd-mode             Disable R&D mode on the device
Does this change the flag on a device without flashing or with flashing, or both? Where is this written to (when flashing and when directly changing, without flashing) ?

Code:
--set-rd-flags [arg]          Set R&D mode flags on the device
Possible R&D flags:
  no-omap-wd
  no-retu-wd
  no-lifeguard-reset
  serial-console
  no-usb-timeout
What does each of these flags do? Does this change the flag on a device without flashing or with flashing, or both? Where is this written to (when flashing and when directly changing, without flashing) ?

Code:
--clear-rd-flags [arg]        Clear R&D mode flags on the device
Same as above

Code:
--query-rd-mode               Query the device R&D mode status and flags
Self-explanatory.

Code:
--set-root-device <arg>       Set the default root device
Assuming this is a parameter passed to the kernel when booting, correct ? Does this change the setting on a device without flashing or with flashing, or both? Where is this written to (when flashing and when directly changing, without flashing) ?

Code:
--query-root-device           Query the default root device
Self-explanatory.

Code:
--set-hw-revision [arg]       Set HW revision override on device
Why can this be specified ? Function ? Does this change the setting on a device without flashing or with flashing, or both? Where is this written to (when flashing and when directly changing, without flashing) ?

Code:
--enable-usb-host-mode        Set the device into USB host mode
What does this do ? Function ? Does this change the setting on a device without flashing or with flashing, or both? Where is this written to (when flashing and when directly changing, without flashing) ?

Code:
--disable-usb-host-mode       Set the device into USB peripheral mode
See above.

Code:
--flash-only <arg>            Flash only certain components
What are possible arguments and in which situation (with what switches to flasher) can this be used ?
 
aflegg's Avatar
Posts: 1,463 | Thanked: 81 times | Joined on Oct 2005 @ UK
#2
Some quick answers:

1) I've never heard of anyone bricking their device whilst setting R&D mode, or using becomeroot (a bit easier, TBH)
2) Editing gainroot is fine; nothing built-in relies on it.
3) You may be interested in the 0xFFFF project which is reverse engineering the flasher.
__________________
Andrew Flegg -- mailto:andrew@bleb.org | http://www.bleb.org
Now known as
Jaffa
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 06:03.