Confirmed users
11
edits
Gerard-majax (talk | contribs) (Update doc for installing) |
Gerard-majax (talk | contribs) (udev rules and bmaptool) |
||
Line 161: | Line 161: | ||
You need a 4Gb SD card at least, if has more space better. Then create partitions and copy the files to let the Raspberry PI boot Firefox OS. | You need a 4Gb SD card at least, if has more space better. Then create partitions and copy the files to let the Raspberry PI boot Firefox OS. | ||
=== Configure UDEV rules for the SD card === | |||
By configuring udev rules for the specific SD card you are going to use for B2G, you will avoid the need to pass via root access (e.g., '''sudo dd''') to be able to copy data. This also limits the risks of doing '''dd''' to the wrong device and mess with everything. This is documented for use with a sd card integrated reader, but this should be able to work elsewhere. | |||
First, plug your sdcard and identify its serial: | |||
$ udisksctl status | |||
MODEL REVISION SERIAL DEVICE | |||
-------------------------------------------------------------------------- | |||
[...] | |||
SL08G 0xa0442a9f mmcblk0 | |||
So in this case, '''/dev/mmcblk0''' has serial number '''0xa0442a9f'''. You can now unplug the card for now. | |||
The populate a file in '''/etc/udev/rules.d/''', let be its name '''52-mmcblk.rules'''. And put the following content: | |||
# µSD B2G | |||
SUBSYSTEM=="block", SUBSYSTEMS=="mmc", DRIVERS=="mmcblk", ATTRS{serial}=="0xa0442a9f", MODE="0666", GROUP="plugdev" | |||
Make sure you have '''ATTRS{serial}=="0xa0442a9f"'''. Rule will match any '''mmcblk''' exposed device whose attribute serial is 0xa0442a9f. If it matches, then it will set permissions 0666 and group plugdev. Save this file, and issue a udev reload: | |||
# udevadm control --reload | |||
Now, if you replug the sdcard, it should be set with the proper permissions in /dev. | |||
=== Partitions for the SD card === | === Partitions for the SD card === | ||
Line 186: | Line 209: | ||
Remember to NOT flash cache and/or userdata images if you are just '''updating''' your system, except if you are sure or instructed to do so. Doing this will result in your data being erased. | Remember to NOT flash cache and/or userdata images if you are just '''updating''' your system, except if you are sure or instructed to do so. Doing this will result in your data being erased. | ||
=== Faster flashing with bmaptool === | |||
You can also make use of '''bmaptool''' to flash faster than with '''dd'''. [http://git.infradead.org/users/dedekind/bmap-tools.git bmaptool repo]. | |||
==== Produce bmap files ==== | |||
Once you have built the system, produce bmap files: | |||
$ bmaptool create -o out/target/product/rpi2b/PARTITION.bmap out/target/product/rpi2b/PARTITION.img | |||
You can do this for each '''PARTITION''' that we have: boot, system, cache and userdata. | |||
Then flash using bmaptool (here only boot partition): | |||
$ sudo bmaptool copy out/target/product/rpi2b/boot.img /dev/mmcblk0p1 | |||
bmaptool: info: discovered bmap file 'out/target/product/rpi2b/boot.bmap' | |||
bmaptool: info: block map format version 2.0 | |||
bmaptool: info: 12288 blocks of size 4096 (48.0 MiB), mapped 2358 blocks (9.2 MiB or 19.2%) | |||
bmaptool: info: copying image 'boot.img' to block device '/dev/mmcblk0p1' using bmap file 'boot.bmap' | |||
bmaptool: info: 100% copied | |||
bmaptool: info: synchronizing '/dev/mmcblk0p1' | |||
bmaptool: info: copying time: 0.6s, copying speed 16.1 MiB/sec | |||
Using '''dd''' on the same partition reports a write speed of 5.0MiB/s. | |||
== Debugging == | == Debugging == |