Commit graph

162 commits

Author SHA1 Message Date
Sean Cross
fb11e7f241 Merge pull request #31 from ajaybhargav/master
Update README.md with hw block information
2016-01-25 12:32:01 +08:00
Ajay Bhargav
8c4d1badfc Update README.md with some information
Added description for some of the blocks I know.
2015-12-01 17:34:31 +05:30
Sean Cross
2422d1ca63 Merge pull request #30 from pfalcon/flashrom-docs
Add instructions and patch to use "flashrom" tool to backup onboard flash.
2015-11-04 16:49:16 +08:00
Paul Sokolovsky
f345568b27 Add instructions and patch to use "flashrom" tool to backup onboard flash. 2015-11-03 19:00:25 +03:00
Sean Cross
0faf02871c Merge pull request #29 from pfalcon/3rdparty-dev
README.md: Add instructions how to enter bootloader for 3rd-party devices.
2015-11-02 13:50:44 +08:00
Paul Sokolovsky
4752125299 README.md: Add instructions how to enter bootloader for 3rd-party devices. 2015-11-01 21:59:51 +03:00
Sean Cross
506705fa86 parse-commands: Add program to parse program from pcap
Signed-off-by: Sean Cross <xobs@kosagi.com>
2015-10-28 15:20:33 +08:00
Sean Cross
26b5b0ead0 Merge pull request #27 from pfalcon/readme-more-hw
README: Add some more HW block addresses.
2015-07-22 11:28:28 +08:00
Paul Sokolovsky
826b89c1cc README: Add some more HW block addresses.
Based on browsing various code and information publicly avalable on the
Internet.
2015-06-11 10:55:43 +03:00
Sean Cross
0e1eb9a346 fernly-usb-loader: Correct whitespace
Replace eight spaces with one tab.

Signed-off-by: Sean Cross <xobs@kosagi.com>
2015-06-08 09:07:39 +08:00
Sean Cross
cc7d6df46c Merge branch 'master' of github.com:xobs/fernly 2015-06-05 10:50:31 +08:00
Sean Cross
548b3e6263 udev: Add fernly rules file
Signed-off-by: Sean Cross <xobs@kosagi.com>
2015-06-05 10:49:43 +08:00
Sean Cross
c8ff6c5f36 fernly-usb-loader: Add factory test code
Signed-off-by: Sean Cross <xobs@kosagi.com>
2015-06-03 18:43:05 +08:00
Sean Cross
9c9af6ca80 cmd-keypad: Run only once when an arg is passed
Signed-off-by: Sean Cross <xobs@kosagi.com>
2015-06-03 18:40:28 +08:00
Sean Cross
f8d8454fea Makefile: add -fno-stack-protector
Signed-off-by: Sean Cross <xobs@kosagi.com>
2015-04-26 14:51:29 +08:00
Sean Cross
2a81feb153 README: Add -s to example
Without the -s, it simply runs in the background.  Add
-s to the example string.

Signed-off-by: Sean Cross <xobs@kosagi.com>
2015-04-26 14:48:11 +08:00
Sean Cross
15b6ba4507 Merge pull request #25 from pfalcon/typo-fix
lcd.c: Typo fix in comment.
2015-04-12 20:06:50 +08:00
Paul Sokolovsky
c3284916c0 lcd.c: Typo fix in comment. 2015-04-07 20:13:45 +03:00
Sean Cross
516c74096d fernly: fix gcc warnings
Several GCC warnings were getting generated on various compilers.  This
patch solves those warnings.

For various platforms, a uint32_t is not the same as an unsigned int. On
these platforms, printf("%x", (uint32_t)0) generates a warning.  Use the
<inttypes.h> formats (i.e. PRIx32) as formatters to silence these warnings.

There was also a security warning picked up by certain compilers when
calling printf(msg) in fernly-usb-loader.  This has been fixed.

Finally, lcd.c was refactored to fold the unused lcd_dat_slot() function
into the lcd_cmd_slot() function as a brand-new unified lcd_slot().

Signed-off-by: Sean Cross <xobs@kosagi.com>
2015-04-07 18:17:26 +08:00
Sean Cross
deced0717a Revert "Silenced GCC warnings"
This reverts commit 11ac2200ff.
2015-04-07 18:17:26 +08:00
Sean Cross
2df4be2da3 Merge pull request #24 from pfalcon/gfh-comments
fernly-usb-loader: Add comments about GFH file headers.
2015-04-07 17:51:37 +08:00
Sean Cross
ed30df482f Merge pull request #23 from pfalcon/scriptic-psram-typo
enable-psram.S: Fix typo in comment.
2015-04-07 17:51:07 +08:00
Sean Cross
49c0de1b02 Merge pull request #22 from pfalcon/readme-bootrom
README: Add Boot ROM to memory map.
2015-04-07 17:50:47 +08:00
Sean Cross
176f914b51 Merge pull request #19 from pfalcon/keypad-uart-exit
cmd-keypad: Exit also on key press on serial/USB connection.
2015-04-07 17:49:01 +08:00
Sean Cross
7402d86909 Merge pull request #20 from pfalcon/hex-abs-addr
cmd-hex: Dump absolute memory address.

This code has been copied-and-pasted across multiple projects, hence the split between
hex_offset() and hex().  This is a fine patch for this project.
2015-04-07 17:04:23 +08:00
Paul Sokolovsky
77e6ce9036 fernly-usb-loader: Add comments about GFH file headers. 2015-04-05 15:24:20 +03:00
Paul Sokolovsky
0c2c269242 enable-psram.S: Fix typo in comment. 2015-04-05 15:22:59 +03:00
Paul Sokolovsky
422f7f2bfb README: Add Boot ROM to memory map. 2015-04-05 15:17:27 +03:00
Paul Sokolovsky
69ad4d5eca cmd-hex: Dump absolute memory address.
Seeing zeros is quite confusing - you never know if you mistypes something
(there's not even a number format error reporting), or something else.
2015-04-02 22:12:44 +03:00
Paul Sokolovsky
bacfe8b822 cmd-keypad: Exit also on key press on serial/USB connection.
"keypad" command so far assumes rather adhoc keyboard map, and effectively
locks up otherwise. Allow to break out of it from host connection.
2015-04-02 13:35:34 +03:00
Sean Cross
a02ae82f67 Merge branch 'pfalcon-loader-wait' 2015-04-02 12:39:49 +08:00
Paul Sokolovsky
6020a9248a fernly-usb-loader.c: Add -w option, wait for serial port to appear.
Many MTK devices have bootloader connection available only for few seconds
after power-up. To not try to synchronize all of device connection over USB/
power-on and fernly-usb-loader start up, the latter can be run in this "wait"
mode, and a device connected and bootloader start at leisure.
2015-04-02 12:39:34 +08:00
Sean Cross
005e2d67d5 Merge branch 'master' of github.com:xobs/fernly 2015-04-02 12:34:21 +08:00
Sean Cross
41511b793d LICENSE: Add BSD 2-clause license
Signed-off-by: Sean Cross <xobs@kosagi.com>
2015-04-02 12:33:42 +08:00
Sean Cross
7323c280ce fernly: Remove GPL-2 files, move to libgcc
We used to use source files taken from U-Boot to allow for division and
modular arithmetic.  With the move to a BSD license, this is no longer
acceptible.

As a workaround, use a libgcc taken from a standard gcc distribution.
Add the .a file, which has not been modified in any way.

Signed-off-by: Sean Cross <xobs@kosagi.com>
2015-04-02 12:30:28 +08:00
Sean Cross
9e9bab1ff2 Merge pull request #16 from robertfoss/patch_1
Silenced GCC warnings
2015-03-18 17:15:59 +08:00
Sean Cross
ee08d8395a Merge pull request #15 from notthetup/patch-1
Changing baudrate to 115200
2015-03-18 17:13:55 +08:00
Robert Foss
11ac2200ff Silenced GCC warnings 2015-03-16 11:32:11 +01:00
Chinmay Pendharkar
0a1b9e3cd9 Changing baudrate to 115200
Changing baudrate to `B115200` which is defined in sys/temios.h on OSX.
2015-03-14 13:48:20 +08:00
Sean Cross
38011a7bdc spin: Remove not-very-relevant test script
This script was used early on to run Fernly on very customized hardware.
Remove it, as it's not relevant anymore.

Signed-off-by: Sean Cross <xobs@kosagi.com>
2015-03-11 15:14:11 +08:00
Sean Cross
7d07f8a2f0 serial: Formatting cleanup of old cruft
Remove unreachable code paths and awkward code comments.

Signed-off-by: Sean Cross <xobs@kosagi.com>
2015-03-11 15:03:24 +08:00
Sean Cross
1dc8e8c573 serial: Limit USB fifo to 1 byte
There is some racy condition where multiple bytes can cause a deadlock.
Until this is figured out, limit the FIFO to 1 byte.

Signed-off-by: Sean Cross <xobs@kosagi.com>
2015-03-11 15:00:26 +08:00
Sean Cross
8a4f98b5b1 usb-loader: Explain a little more about magic calls
These calls enter into the MT6260 ROM.  Explain a bit more about where they
come from and what their function prototypes are.

Signed-off-by: Sean Cross <xobs@kosagi.com>
2015-02-19 18:54:34 +08:00
Sean Cross
91d05709fc Makefile: make 'test' and 'shell' depend on 'all'
To ensure everything is rebuilt, have the 'test' and 'shell' targets
depend on the 'all' target.

Signed-off-by: Sean Cross <xobs@kosagi.com>
2015-02-05 16:04:49 +08:00
Sean Cross
16ffca7170 Makefile: Add 'make shell' target
The 'make shell' target loads fernly onto the board, then opens an
interactive shell with it.

Signed-off-by: Sean Cross <xobs@kosagi.com>
2015-02-05 16:03:50 +08:00
Sean Cross
d4283bc9ce fernly-usb-loader: Add 'shell' argument
To interactively communicate with the fernly loader, pass '-s' to the
fernly-usb-loader program.  Otherwise it will wait for the shell to
start and then exit.

Signed-off-by: Sean Cross <xobs@kosagi.com>
2015-02-05 16:02:48 +08:00
Sean Cross
9759e98747 serial: Refactor slightly to improve throughput
It's unclear whether this refactor improves things at all, but it's
still limited to 32-byte buffers.  Still, it results in less code,
which seems like a good thing.

Signed-off-by: Sean Cross <xobs@kosagi.com>
2015-02-05 15:50:28 +08:00
Sean Cross
977ccff309 bionic: Correct \r at the end of puts()
Since puts() calls serial_putc() directly, it needs to supply its own
\r before \n.

Signed-off-by: Sean Cross <xobs@kosagi.com>
2015-02-05 13:03:08 +08:00
Sean Cross
f7207812b4 set-plls: Make script more robust
The set-plls script was running too quickly, and could sometimes
finish before the PLLs were stable.  This patch fixes this problem,
in addition to making it clearer what the various settings do.

Signed-off-by: Sean Cross <xobs@kosagi.com>
2015-02-05 13:00:47 +08:00
Sean Cross
ef9d60df5c emi: Make dqs/dqy values global (for debug)
Make the dqs/dqy values available for printing in other functions, so
we can determine what values were chosen at startup.

Signed-off-by: Sean Cross <xobs@kosagi.com>
2015-02-05 12:59:40 +08:00