x
This website is using cookies. We use cookies to ensure that we give you the best experience on our website. More info. That's Fine
HPC:Factor Logo 
 
Latest Forum Activity

Linux on the Jornada 720 - Status

1 2 3
_dev-null Page Icon Posted 2021-01-13 10:29 AM
#
Avatar image of _dev-null
Subscribers
Factorite (Elite)

Posts:
173
Location:
Austria
Status:
Hi!
Maybe you guys can help me to get everything working. So here is a little summary of the current status:

We have a working 3.16.81 Linux Kernel (with BX instruction emulation).
Compiled kernel: http://www.sp-net.at/nextcloud/s/5qBbkaXaZtiypbP?path=%2Fkernel3.16...
Source: http://www.sp-net.at/nextcloud/s/5qBbkaXaZtiypbP?path=%2Fkernel3.16...

Hardware that works:

- CF card
- PCMCIA Slot
- Display / Touchscreen (Brightness, Contrast control)
- APM (Battery Status)
- Keyboard - Keymaps (thanks to timob0) https://www.hpcfactor.com/forums/forums/thread-view.asp?tid=20007&po...
- Serial Port
- IrDA
- 128MB RAM upgrade (needs a different bootloader and of course other RAM chips) http://www.sp-net.at/wiki/doku.php?id=jornada_j720:memory_upgrade

What does not work:
- Sound (we need to write a driver, there is already a driver for the uda1341 codec and L3 bus in mainline, so only CPU and machine parts need to be written)
- USB (requires some modifications and soldering on the mainboard and a working driver - with the 3.16.81 kernel USB doesnt work at all) http://www.sp-net.at/wiki/doku.php?id=jornada_j720_usb_host
- CPU frequency scaling ( there is a driver but it has a lot of bugs)

What will never work with the stock ROM/RAM board:
- Suspend (only with flashboard, I have schematics if anyone is interested and a working one - it is also possible to remove the rom and solder flash chips with fine wires in place - initial flashing has to be done with a adapter and a programmer like the RT809H)


It would also be nice to get a more recent Kernel (>4.4) working. My attempts fail at implementing the BX instruction emulation. (Still possible to run only ARMv4 compatible software - but i like to do Linux without recompiling the whole world)


Stefan

Edited by _dev-null 2021-01-13 10:31 AM
 Top of the page
timob0 Page Icon Posted 2021-01-13 4:45 PM
#
Avatar image of timob0
Factor Fanatic

Posts:
51
Location:
Germany
Status:
Hi Stefan,

many thanks for your great work!

Re the features:
- Keymaps - feedback from Mark pending whether the US console keymap acutally works. If so then I can make one for X as well.

- Sound - I think the older JLime distro had it working, so if we can find the 2.6 kernel module sources for that it should be possible to port them

- Suspend - I'm not so sure it can't be made work at all without the FB. Based on this document: http://www.sp-net.at/jlime/development/datasheets/7xx/jornada720_sl... it should be doable. I think technically this would mean to store the return-from-sleep-address at a specific memory location before going to sleep and making sure that memory location isn't used by either the kernel image or applications (could mean to modify the bootloader and/or the kernel). As a POC, we could try to stick the kernel image start adress in there which should boot up Linux after sleep without going through CE.
However, it's probably not exactly easy to do.

- Newer kernel - I guess we need the 3.6.18 patches for Jornada ported to a newer kernel first, I believe you said you made the patches available?

- Also maybe add the mousebutton emulation - I tried out the one driver you suggested and made it work but I'm not happy with it. Would be better to use the volume keys as mouse buttons.

Let's put a backlog somewhere and prioritize work together.

Personally, my top three would be:
1) Mousebuttons
2) Sound
3) Suspend

I'll be happy to help, however with limited time available due to work and studies in parallel.

Kind regards
timo
 Top of the page
munchausen Page Icon Posted 2021-01-14 12:41 PM
#
Avatar image of munchausen
Factorite (Senior)

Posts:
76
Location:
United Kingdom
Status:
I have failed at finding the jornada 720 kernel 2.4 source which had working sound. Unfortunately the jornada 2.6 kernel didn't support sound AFAIK, but I did find a driver for the UDA1341 and SA11xx for 2.6.

arch/arm/common/sa1111.c has some stuff left floating around related to audio PCM configuration, but as far as I can see we need an AC97 driver as well as L3. L3 seems to only half exist in the kernel at present, a bit banged definition exists in sound/soc/codecs/l3.c and omap has a driver, and I note that the uda134x driver uses the l3_write etc functions directly. Russel King posted a SA1100 L3 driver a long time ago (we need a SA1111 one), but notes various problems with the whole concept (since it often shares hardware with I2C).

Perhaps the first step should be getting a 4.x kernel working? You've probably seen it already but I found a ML thread with links to two alternative methods for enabling the BX instruction emulation in 4.8.

Some other links I found on my travels:
About SA1111 interrupts on the assabet
About SA1100 USB _device_ (gadget) drivers (google cache)
Some information about SA1111 USB hardware
App note on SA1111 DMA configuration
 Top of the page
timob0 Page Icon Posted 2021-01-14 6:33 PM
#
Avatar image of timob0
Factor Fanatic

Posts:
51
Location:
Germany
Status:
I found an archive of the JLime site on web.archive.org, below is a link to instructions compiling the kernel which I believe is 2.6.17
It includes the patches/modules that Kristoffer Ericsson made for the J7xx hardware, maybe the sources are still available from git.

https://web.archive.org/web/20160524232532/http://jlime.com/wiki/doc...
 Top of the page
_dev-null Page Icon Posted 2021-01-14 6:55 PM
#
Avatar image of _dev-null
Subscribers
Factorite (Elite)

Posts:
173
Location:
Austria
Status:
The sources are still available. But there never was an audio driver for 2.6.
Some folks at handheld.org managed to get sound working on 2.6 https://jornada.handhelds.narkive.com/7oHp4DUW/sound-debugged
But I never found any sources or modules...

I also found the sound driver source for 2.4. (attached)


Stefan



Attachments
----------------
Attachments sa1111-uda1341.c (6KB - 7 downloads)
 Top of the page
timob0 Page Icon Posted 2021-01-15 7:25 PM
#
Avatar image of timob0
Factor Fanatic

Posts:
51
Location:
Germany
Status:
Ah, my bad. I thought the JLime distro had working sound through kernel 2.6.

Cool you found the 2.4 code. We'd need to add it to the kernel source and give it a try. Would be a good sign if it doesn't fail compilation, if it actually provides a working sound-device remains to be seen.
 Top of the page
munchausen Page Icon Posted 2021-01-15 8:04 PM
#
Avatar image of munchausen
Factorite (Senior)

Posts:
76
Location:
United Kingdom
Status:
The 2.4 driver wont work on a new kernel, or even on 2.6, without significant changes. Back then things like gpio, pinmux, pcm, l3 etc did not have any universal abstraction, you just implemented whatever you saw fit on your platform.
 Top of the page
timob0 Page Icon Posted 2021-01-15 9:04 PM
#
Avatar image of timob0
Factor Fanatic

Posts:
51
Location:
Germany
Status:
Below is a link to 2.6.26 sources for the Jornada and a NEC handheld. There's a sa11xx-uda1341.c in the arm/sound folder, however from eyeballing it looks like its for the iPAQ. Do you think the 2.4 source above and this one can be merged into something working for the Jornada?

https://kernel.googlesource.com/pub/scm/linux/kernel/git/kristoffer/...
https://kernel.googlesource.com/pub/scm/linux/kernel/git/kristoffer/...
 Top of the page
munchausen Page Icon Posted 2021-01-15 9:46 PM
#
Avatar image of munchausen
Factorite (Senior)

Posts:
76
Location:
United Kingdom
Status:
I'm not sure, it does things that you aren't supposed to do any more, e.g. uses sa1111 DMA functions directly (DMA is abstracted these days), and the audio driver API is very different now so it doesn't exactly fit. I think we are supposed to implement L3 and I2S drivers for SA1111, including DMA for I2S, and then use the current UDA134x driver (https://github.com/torvalds/linux/blob/master/sound/soc/codecs/uda134x.c). But the current driver is also a problem because it actually expects L3 to be bit banged, which it shouldn't be on SA1111 (and maybe can't be).

This needs quite some time sinking into it and I'm by no means expert at this. Perhaps best to hit the lower hanging fruit first, like kernel 4.x and frequency scaling?

Edited by munchausen 2021-01-15 9:46 PM
 Top of the page
timob0 Page Icon Posted 2021-01-16 5:14 PM
#
Avatar image of timob0
Factor Fanatic

Posts:
51
Location:
Germany
Status:
Absolutely agree to tackle the quick wins first. Was just probing how difficult this would be, hard for me to judge as I've not done kernel development so far.

So our backlog items (in order of estimated effort) are so far:
- Keymaps - low effort - (de complete, us almost done)
- Mousebuttons - low effort
- Kernel 4.x - medium effort
- CPU clock scaling - medium effort
- Sound - high effort
- USB - high effort
- Suspend - might not be doable at all

Q: anything else to add and who would volunteer for which one? (I'm on the keymaps w. Mark and I'm working on the mousebuttons)
 Top of the page
munchausen Page Icon Posted 2021-01-16 11:01 PM
#
Avatar image of munchausen
Factorite (Senior)

Posts:
76
Location:
United Kingdom
Status:
Due to COVID lockdown here in the UK I'm currently spending half my time doing childcare and the other half catching up on work I can't do when I'm doing childcare, but I'm itching to start hacking on j720 as soon as I can... when I get a chance I'll take a look at running 4.x.

Edited by munchausen 2021-01-16 11:21 PM
 Top of the page
joval Page Icon Posted 2021-01-17 3:35 AM
#
Avatar image of joval
Subscribers
H/PC Elite

Posts:
712
Location:
Northern California
Status:
Hi guys! Wow, what a great team you make...exciting just reading what your focus is. I'm truly a NOOB to linux, but you all have me learning at light speed...I've learned so much just trying to catch up with you...and its been both entertaining and fun.

@Stefan: congrats again on the gold membership and thanks for starting this thread. I'm interested in helping on the USB host front...I can solder the wires but would need help with the driver issue...so I may not be that useful but I'm willing. I will also compare SDCard vs CF card, pros and cons, and partition sizes and types...effect on speed, etc. Did the RasPi Zero W work out at all...being single core? Wifi with wep surprised me by being nearly as fast as ethernet with the RasPi 4.0 (quad core) with bluetooth for sound. I still have to learn / master wpa_supplicant to get WPA working...working on it.

@Timo: that qemu emulator is fantastic...you cooked up a good recipe! You have some great skills and good ideas...on suspend with secure memory allocation, etc. Could that approach help with the white screen on shutdown issue? Key maps are great...still working through on that...installed kbd without the maps and booting stalled...font changed etc. I will review and re attempt...keymap first, kbd install second?

@Munchausen: the ext4 vs ext2 suggestion is a great idea...seems faster to me with the ext2...perhaps I will do a time comparison with equivalent sdcards ( what I am using...not cf cards). How important is jornaling? I think the sdcards might prove better for trying out kernel 4.xxx -- just my hunch/ 2 cents worth...root delay set =0 boots fine on ext4, ext2. for example.

I am not capable of being much help on the nitty gritty linux kernel creation...but let me know if I can do more than be a cheerleader.
Also,I have been on extended holiday vacation...soon to end...so I won't be quite so available to help or annoy or whatever.

Hey, and thanks again for all your great ideas and efforts!

Joval



Edited by joval 2021-01-17 3:45 AM
 Top of the page
munchausen Page Icon Posted 2021-01-18 12:02 PM
#
Avatar image of munchausen
Factorite (Senior)

Posts:
76
Location:
United Kingdom
Status:
I had another idea... if we can find the uart 1 rx/tx pins we could add bluetooth with something like a BT860 module. Max speed 230kbps over uart 1 but it would be a cool upgrade. It could be connected to uart 3 instead but you'd lose the serial connection to the PC.

Not sure how to go about finding the pins though. Maybe set a script to continually transmit "hello world" and then stick a scope around on the board to look for it.

Another idea, I have a dead 720 board, I could take all the components off and scan it which would help with looking for pins like this.

Edited by munchausen 2021-01-18 12:05 PM
 Top of the page
timob0 Page Icon Posted 2021-01-18 5:56 PM
#
Avatar image of timob0
Factor Fanatic

Posts:
51
Location:
Germany
Status:
Yet another idea: What if we pick apart one of these "nano wifi" USB bluetooth dongles (they're tiny, most of the size seems to be the connector) and connect it internally to the USB lines Stefan has identified? That would give us internal WIFI and Bluetooth leaving the PCMCIA socket empty for other uses. I know Stefan reported issues with the USB but I believe a part of it may been attributable to the wiring needed inside the Jornada. Now if we keep wires at a minimal length we might have a chance to make it work.

Re the serial connection - I don't really care. If we can use it for more useful things I'd be happy to sacrifice it.
 Top of the page
timob0 Page Icon Posted 2021-01-18 6:39 PM
#
Avatar image of timob0
Factor Fanatic

Posts:
51
Location:
Germany
Status:
@Joval: I'm not sure if we'll be able to get the suspend working or not. The document I referenced contains a disassembly of the ROM code that runs when the On/Off button wakes up the Jornada. It essentially checks for an address to continue execution at and when it's there it uses it otherwise starts up normally. Now chances are that when at the right memory location an address is stored which points to the Linux kernel (which at that point still is in memory as the RAM is kept refreshing during sleep) then it might be possible to go straight back to Linux. A prerequisite for that is to keep the said memory location clear, however currently I think this space is being used. So the bootloader would have to be modified to move the kernel image a bit "up" in memory to free that location and it would have to be exempted from being used by applications.
Then, some code needs to be put in place as an entrypoint which sets up CPU and coprocessors before jumping into the kernel when coming from sleep, and in order to correctly populate the "continuation memory location" something else would be needed that stops the running kernel, writes CPU state and the entrypoint address to a physical memory location and sends CPU to sleep. All of this is quite sophisticated stuff to do, maybe not impossible but requiring a lot of time and expertise.

Re the "white screen on shutdown issue" - how does that look like? Jornada does not turn off upon the "poweroff" command?
What I'm seeing often when trying to startup again after poweroff is this:
- "White screen" seemingly empty, but in reality the contrast/brightness is all messed up. The Windows CE UI can be seen when tilting the screen enough, then I use "Win-E" to navigate to the linux loader and fire it up. This does not happen when I pull the battery and cut power completely.
- Jornada stuck at black screen after running the linux loader, have to pull battery / power then to clear it
Would suspend / resume help with this - maybe if it can be made reliable enough
 Top of the page
hpc:factor« View previous thread · H/PC Linux / Unix · View next thread »
1 2 3
Jump to forum:
Seconds to generate: 0.155 - Cached queries : 72 - Executed queries : 9
Server Time now is: Monday, 27 September 2021 - 2:33