build
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| build [2011/08/09 16:02] – original firmware info ray | build [2013/02/19 14:25] (current) – [4. Deploy] added instructions for manual firmware deployment trapicki | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Build environment ====== | ====== Build environment ====== | ||
| + | <note tip> | ||
| + | See point 5 on how to rebuild a near-original firmware for your r0ket. The original firmware that comes with your badge contains secret keys that you will not find in git. If you reflash your firmware, those will be lost - but that's not as bad as it sounds unless you like properitary stuff. WE RECOMMEND THAT YOU READ POINT 5 BELOW BEFORE YOU REFLASH YOUR FIRMWARE THOUGH. Meanwhile the keys are leaked, so rebuilding an original firmware is possible. Guess we will also check them into git soon... </ | ||
| + | |||
| + | |||
| ===== 0. Work in Progress ===== | ===== 0. Work in Progress ===== | ||
| After all it's r0ket science. If you actually start developing something for the r0ket now, we'd recommend to join our Mailing List and IRC channel - see [[contact|contact]]. | After all it's r0ket science. If you actually start developing something for the r0ket now, we'd recommend to join our Mailing List and IRC channel - see [[contact|contact]]. | ||
| Line 6: | Line 10: | ||
| ===== 1. Compiler ===== | ===== 1. Compiler ===== | ||
| + | <note tip> | ||
| + | As of November 2012, CodeSourcery got bought by [[http:// | ||
| + | [[mailto: | ||
| <note tip> | <note tip> | ||
| The CodeSourcery G++ package provides a GNU cross-compiler toolchain for ARM. | The CodeSourcery G++ package provides a GNU cross-compiler toolchain for ARM. | ||
| Line 37: | Line 44: | ||
| bash | bash | ||
| </ | </ | ||
| + | |||
| + | <note tip> | ||
| + | Running on FreeBSD8.2 with gcc4.5.2 | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | cd / | ||
| + | sudo cp -r ./ | ||
| + | cd arm-none-eabi-gcc | ||
| + | vi Makfile | ||
| + | > change line 11 " | ||
| + | > uncommit line 12 " | ||
| + | sudo make install clean | ||
| + | |||
| + | # at me one c-file dont found: " | ||
| + | # fix it in this c-file :"# | ||
| + | </ | ||
| + | |||
| + | Someone asked me to write this down, so [[building_with_a_free_toolchain|here]]' | ||
| ===== 2. Source ===== | ===== 2. Source ===== | ||
| Line 73: | Line 99: | ||
| </ | </ | ||
| + | <note tip> | ||
| + | For FreeBSD | ||
| + | </ | ||
| + | |||
| + | <code bash> | ||
| + | gmake APP=hello | ||
| + | </ | ||
| ===== 4. Deploy ===== | ===== 4. Deploy ===== | ||
| <note tip> | <note tip> | ||
| - | The LPC1343 has a USB-ISP, it can be booted as an USB storage device, and the firmware can be copied as a file. Unfortunately, | + | The LPC1343 has a USB-ISP, it can be booted as an USB storage device, and the firmware can be copied as a file. Unfortunately, |
| </ | </ | ||
| + | |||
| + | ==== automatic ===== | ||
| * Install udev rule | * Install udev rule | ||
| Line 88: | Line 123: | ||
| <note important> | <note important> | ||
| - | On ubuntu, nautilus will automount the USB-Storage device, and our automouter | + | On ubuntu, nautilus will automount the USB-Storage device, and our automounter |
| < | < | ||
| gconf-editor | gconf-editor | ||
| Line 112: | Line 147: | ||
| </ | </ | ||
| + | ==== manual ==== | ||
| + | |||
| + | Due to some incompatibility in the Linux vfat driver, just mounting and copying the firmware does not work. The firmware has to be dd'ed to the r0ket: | ||
| + | - connect r0ket in ISP mode | ||
| + | - make sure that the device is not mounted | ||
| + | - dd if=firmware.bin of=/ | ||
| + | |||
| + | The right device is 34 kiByte in size. | ||
| ===== 5. Building the original Firmware ===== | ===== 5. Building the original Firmware ===== | ||
| To rebuild the original firmware you can use the release-all script in firmware/. It will build the firmware and all additional programs and put them into /release. You have to copy SECRETS to SECRETS.release first. | To rebuild the original firmware you can use the release-all script in firmware/. It will build the firmware and all additional programs and put them into /release. You have to copy SECRETS to SECRETS.release first. | ||
| - | Note: the SECRETS in the git contain different keys like you had on your badge originally. That way the original firmware can only execute l0dables signed by the vendor (us!!), which makes it at least as cool as an iBadge. So if you reflash your badge you will lose this " | + | Note: the SECRETS in the git contain different keys than those you had on your badge originally. That way the original firmware can only execute l0dables signed by the vendor (us!!), which makes it at least as cool as an iBadge. So if you reflash your badge you will lose this " |
| + | |||
| + | After running the release-all script, copy the release/ | ||
| + | < | ||
| + | firmware/ | ||
| + | firmware/ | ||
| + | firmware/ | ||
| + | firmware/ | ||
| + | </ | ||
| + | |||
| + | If you get some message the firmware is too large, it might be an accident in our source, but more probably you were using a different compiler than exactly the version we used. | ||
| + | |||
| + | Now hold joystick to the left and power on, release joystick after a second or so. LEDs will light dim, after about 20 seconds the autoflasher should tell you flashed sdX... | ||
| + | |||
| + | Then start your badge holding joystick down (not press center but down), that starts the USB massstorage. Mount it (should be a 512K volume). Erase all files (except your own ones, like received stuff from others if you have that) and/or copy the files from ../ | ||
| - | After running the release-all script, copy the release/final.bin to firmware/firmware.bin and flash it like written above. Then start your badge, start the USB massstorage and mount it. Erase all files (except your own ones, like received stuff from others) and/or copy the files from / | + | If your filesystem is corrupted, you can download http://y.nu/r0ket-df.dd and dd it onto the device before mounting |
build.1312898567.txt.gz · Last modified: by ray
