|
Subscribers Factorite (Elite) Posts: | 208 |
Location: | Austria | Status: | |
| Hello!
My recommendations are:
- learn C
- learn to understand the Linux kernel
- Try to write your own code and learn from the errors
- Have a look at other driver sources, there is many stuff you can learn/use or adapt!
I can also recommend this book (in German): "Linux-Treiber entwickeln: Eine systematische Einführung in die Gerätetreiber- und Kernelprogrammierung"
Stefan
Edited by _dev-null 2020-02-21 1:42 PM
|
|
|
|
Subscribers Factorite (Elite) Posts: | 208 |
Location: | Austria | Status: | |
| Short update on the Kernel 4.8.7 and Debian 9 on the Jornada:
- I think i found out why the system is always freezing under load. It is a bug: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1833281
If i disable swap, the system doesnt crash or freeze. But due to very low RAM on the Jornada, the OOM killer runs quite often and kills applications. I try to find a solution for this.
- 128MB RAM does not work, i have to rewrite the linexec to access all 128MB. The mem=128 is only a kernel option, it shows 128MB available, but never uses it ... (looking for someone with WinCE/C++ and Assembler knowledge )
-APM (Battery/Charger status ) is now working properly
What is on my todo list:
- Backlight control
- USB
- Sound
- Suspend (no real suspend, but something like a sleep mode )
Bye
Stefan |
|
|
|
Subscribers Factorite (Elite) Posts: | 208 |
Location: | Austria | Status: | |
| Hi!
I was not able to find this information on the Internet, so I write it down here and hope it will be usefull for someone else!
To use newer CF Cards with Linux, we have to add a few lines to the IDE and PATA PCMCIA driver source code. I managed to get a 64GB Transcend CF working.
You need a Linux notebook with a PCMCIA Slot (you can use the Jornada booted into Linux with a working CF card and a PMCIC-CF adapter). And a build machine for your Kernel.
My example with the 64GB Transcend card:
On the machine with PCMCIA run these commands and note the output (in my case on the Jornada itself, with the CF card in the PCMCIA slot):
# cat /sys/bus/pcmcia/devices/0.0/prod_id1
# cat /sys/bus/pcmcia/devices/0.0/prod_id2
Output here was TRANSCEND and TS64GCF800 for my card.
On your build machine for the Linux Kernel change into the Kernel source directory. There is a source file in ./Documentation/pcmcia/ called "crc32hash.c".
Compile it:
# gcc crc32hash.c -o crc32hash
Now we have the hash generator that we need for our driver modification.
Run it with the information from the CF card:
# ./crc32hash "TRANSCEND"
# ./crc32hash "TS64GCF800"
The output for my card is 0x709b1bf1 and 0x84382de1.
We have to insert this information into two driver source files: ./drivers/ide/ide-cs.c and ./drivers/ata/pata_pcmcia.c
Scroll inside these files to the section with known cards and add yours in this format:
PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS64GCF800", 0x709b1bf1, 0x84382de1),
After that you can compile your kernel and have a working CF card!
Bye
Stefan
|
|
|
|
Subscribers Factorite (Elite) Posts: | 208 |
Location: | Austria | Status: | |
| Hello!
I uploaded the kernel and bootloader here http://www.sp-net.at/nextcloud/s/5qBbkaXaZtiypbP
I work on a Debian 9 userland package and a detailed installation instruction.
-APM (Battery/Charger status ) is now working properly (with apmd installed )
- Screen contrast and brightness adjustment works.
You can adjust it with (0-255 ):
echo 255 > /sys/class/backlight/s1d13xxxfb/brightness
echo 115 > /sys/devices/platform/jornada_lcd/lcd/s1d13xxxfb/contrast
Bye
Stefan
|
|
|
|
Factorite (Elite) Posts: | 210 |
Location: | United States | Status: | |
| Thanks, down loaded them this morning. Now I guess I have an excuse to pickup a 720, lol. |
|
|
|
Subscribers Factorite (Elite) Posts: | 208 |
Location: | Austria | Status: | |
| Remember: There is still much to do. Touchscreen has to be configured properly with x, i had no time to try it! Apt doesnt work on the jornada, due to lack of RAM, i try to find a workaround for this.
Adapt the params.txt. You need to set the amount of RAM your machine has with mem=32 or mem=64.
I uploaded compressed root filesystems in various flavors. I just debootstraped the rootfs and packed it, I didn't test the packages! If it doesn't work, please tell me. If you have uncompressed it to your CF card you can chroot into it (first install qemu-user-static ) and installl additional packages:
$ LANG=C.UTF-8 chroot /mountpoint_of_your_cf qemu-arm-static /bin/bash
Partition layout has to be:
hda1: vfat for Kernel/Bootloader etc. 10MB
hda2: ext4 for userspace/rootfs
hda3: swap (as you like, I use 600 MB )
http://www.sp-net.at/nextcloud/s/5qBbkaXaZtiypbP
- j7xxrootfs_mini: just a naked Debian 9 with SysVinit
- j7xxrootfs_maxi: Debian 9 with all "standard" packages and SysVinit
- j7xxrootfs_xorg: Debian 9 with all "standard" packages and SysVinit and Xorg and fluxbox and apmd
Username: user
Password: user
Root Password: root
Bye
Stefan |
|
|
|
Factorite (Elite) Posts: | 210 |
Location: | United States | Status: | |
| It'll be a while before I get that far, all I currently have are a few J820s. I also don't currently have anything that will write to a CF card. The desktop I used when I was running Debian Sarge on my 820 broke on me sometime ago and has been relegated to the 'junk' pile.
I'm sure the apt problem is a temporary bug, it worked quite well for me at post #28 below. Thanks for the hard work you've done.
https://www.hpcfactor.com/forums/forums/thread-view.asp?tid=17185&st...
https://www.hpcfactor.com/forums/forums/thread-view.asp?tid=17185&st... |
|
|
|
Subscribers Factorite (Elite) Posts: | 208 |
Location: | Austria | Status: | |
| Hello.
Nice J820 you have there!
I updated the kernel image (zImage) and the linexec bootloader on my website.
I got the backlight off function working. You can switch the backlight off with:
echo 4 > /sys/devices/platform/jornada_lcd/lcd/s1d13xxxfb/bl_power
and on with:
echo 0 > /sys/devices/platform/jornada_lcd/lcd/s1d13xxxfb/bl_power
In the last days i experimented with a new Linux distribution: "Devuan"
It is basically Debian without systemd! It uses the good old SysVinit and runs very smooth on the Jornada! With Fluxbox as window manager the Jornada is very usable for note taking and all basic tasks.
I upload new rootfs images with "Devuan Ascii" in the next days.
Next steps are the cpufreq driver and "sleep", so we can downclock the CPU properly and save energy.
Stefan
|
|
|
|
H/PC Sensei Posts: | 1,160 |
Location: | Russia | Status: | |
| Is Windows CE 3.0 downclocking the CPU? Or do you want to have low power mode until you get sleep working?
Edited by Alt Bass 2020-03-24 5:06 PM
|
|
|
|
Subscribers Factorite (Elite) Posts: | 208 |
Location: | Austria | Status: | |
| Hello!
Windows CE puts the CPU into real sleep mode. Sadly this is not possible in Linux without a flashboard, because if you wake up the CPU, by pressing the on/off button, it jumps to a memory location in ROM.
The only thing we can do in Linux without a flashboard is a "fake sleep" mode by downclock the CPU, shut off the backlight and PCMCIA slot.
|
|
|
|
H/PC Sensei Posts: | 1,160 |
Location: | Russia | Status: | |
| Could you dump the ROM and replace chip with something you can reprogram to hack it? |
|
|
|
H/PC Elite Posts: | 658 |
Location: | Florida, US | Status: | |
| That’s exactly what the flashboard is... |
|
|
|
Subscribers Factorite (Elite) Posts: | 208 |
Location: | Austria | Status: | |
| Hi!
Short update:
The Jornada is running well with Linux. I switched over to Devuan Linux, it has sysvinit as init system and uses less resources. I will upload rootfs images with Devuan soon.
I use my Jornada daily for note taking, as SSH/serial terminal, write code in Python or C and for other small tasks!
Sadly i had no time to work on the Swap Bug and the 128MB RAM (linexec bootloader), i hope i can manage that in the near future.
Recently i acquired a PCMCIA to parallel card (Quatech SPP-100). For this card is a linux driver available! I like to use it for JTAG programming. I keep you updated if i got it working.
Regards
Stefan |
|
|
|
H/PC Elite Posts: | 658 |
Location: | Florida, US | Status: | |
| Hi Stefan,
On this devuan version, did you manage to fix the swap issues you were experiencing? What about your 128MB upgrade? Is it working now? |
|
|
|
Subscribers Factorite (Elite) Posts: | 208 |
Location: | Austria | Status: | |
| Hi!
This is a bug in the Linux kernel, sadly it also affects Devuan. I had no time to work on this. I also had no time to work on the 128MB upgrade ...
Maybe there is someone out there who can help me ... i have several RAM chips and boards ready to be upgraded. The only part left is the software part, where we have to set two CPU registers before we load the Linux kernel.
I can offer one 128MB board for the person who gets it working! Send me a PM if you are interested, i can send you the source code for linexec and the kernel.
Regards
Stefan |
|
|