View Single Post
Old 05-21-2010, 03:39 PM   #80
Xaphiosis
Connoisseur
Xaphiosis doesn't litterXaphiosis doesn't litterXaphiosis doesn't litter
 
Posts: 52
Karma: 216
Join Date: Apr 2010
Device: PRS-T1
If you're interested in arbitrary code execution, please check out my threads in the sony reader dev section, especially this one, which has explanations of how to get it all to work inside the attachment, as well as a silly video:
https://www.mobileread.com/forums/showthread.php?t=82714

I've also got another way of doing it. I modified the cramfs image provided with the boroda firmware to check if /reader/main_boot.sh exists on an SD card and run that before trying to run the default sony interface. I have implemented and tested it today, and it works fine. I've also put in the EXT2 kernel module, so if you format your SD card to be EXT2 rather than FAT, it'll still work.

Also today, I managed to get QEMU going, emulating an ARM board running debian, because I got sick of unpacking .deb files manually. I have a silly dream of putting python on the device.

I'm at the stage where I'm wondering if anyone is interested in an openinkpot port to the 600.

I think most stuff should work except for DRM / sony book store (I have the feeling I could break it, but I have no time for it nor do I really care a lot about it), audio (simply because I haven't looked at it at all) and AC power (possibly in the future). Charging via USB will definitely work for 100mA trickle charging, and though I currently can't detect whether the host supports 500mA charging, I can still force it manually.

As usual, if you have questions, ask. The more specific they are, the faster I'll answer :P

Actually, here is a list of stuff I've figured out vs what I wanted to figure out:
Code:
Components:
USB
  + detect being plugged in
  + loading g_serial and pretending to be a serial port
  + loading g_file_storage and pretending to be a storage device
    (only works when /proc/usbtg were cleanly removed, i.e. nothing was using
     it at the time the last module that provided it (e.g. g_file_storage) was
     removed)
SD card
  + detecting insertion
  + detecting removal
  - suspending scan/power if possible (I think not possible directly)
MS card
  + detecting insertion
  + detecting removal
  - suspending scan/power if possible (I think not possible directly)
Buttons
  + detecting button press/release
  + deactivating button scanning if possible
Touchscreen
  + turn scanning on/off
  . set sampling rate (figured out, code not written yet)
  . set break threshold whatever it is (investigating what it is)
  . calibration (easy, simple linear interpolation, just have to do it)
  + getting raw x/y
  - figuring out junk whatever it is
  - figuring out pressure if necessary
  - pressure -> what is it, what does "caliculate[sic] pressure" do?
LED
  - red (set automatically from arcotg driver I think)
  + amber: fading, pulsing, on
Audio
  - play audio
  - adjust volume
  - check if audio is playing / busy
  - stop audio
  - power down audio system if possible
EInk
  + drawing to the framebuffer
  + changing orientation (set, changing at drawing time doesn't work so great)
  + figuring out the difference between flip modes 0,1,2,3
  + checking if device is busy drawing (/proc/e-ink, fb ioctl GET_DISP_STATUS)
  + does it block or queue (it blocks)
  + checking temperature
Battery
  + checking battery level
  . interpreting battery level to something useful 
    (levels defined in config.xml in /opt/sony/.../application, use those)
  ? telling device to charge from USB (/proc/usbtg/usbcharge should do it?)
    (doesn't work when g_serial is installed since I haven't fully hacked in
     sony's modifications to the usbtg interface)
    (I can do it by talking to the wm8350 chip, but I'm not sure how to do it
     safely)
Misc
  + power off (poweroff, or subcpu power off signal)
  . get and set the time from RTC (via wm8350, just not done yet)
  - alarms/timers for waking up 
    (wm8350 alarm, I know how to set it, just don't know what it's used for)
  - checking plugged into AC
  - charging from AC? (wm8350 will do it, but does it do it automatically
    or does it have to be told?)
  + suspend usb via /proc/usbtg/suspend (not when g_serial installed)
   
Maybe
  - being able to flash by modifying the mtd blocks directly

Last edited by Xaphiosis; 05-21-2010 at 03:43 PM. Reason: QEMU:armel:debian
Xaphiosis is offline   Reply With Quote