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 Kernel 4.9 and a (not so) happy Jornada 720

Moderators: insurgent

Jump to page : 1 2
Now viewing page 2 [15 messages per page]

_dev-null Page Icon Posted 2020-02-21 1:28 PM
#
Avatar image of _dev-null
Subscribers
Factorite (Junior)

Posts:
39
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
 Top of the page
_dev-null Page Icon Posted 2020-02-21 1:47 PM
#
Avatar image of _dev-null
Subscribers
Factorite (Junior)

Posts:
39
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
 Top of the page
_dev-null Page Icon Posted 2020-02-28 11:07 AM
#
Avatar image of _dev-null
Subscribers
Factorite (Junior)

Posts:
39
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




 Top of the page
_dev-null Page Icon Posted 2020-03-11 8:36 AM
#
Avatar image of _dev-null
Subscribers
Factorite (Junior)

Posts:
39
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

 Top of the page
Mjolnir Page Icon Posted 2020-03-11 11:19 AM
#
Avatar image of Mjolnir
Subscribers
Factorite (Elite)

Posts:
134
Location:
United States
Status:
Thanks, down loaded them this morning. Now I guess I have an excuse to pickup a 720, lol.
 Top of the page
_dev-null Page Icon Posted 2020-03-11 12:57 PM
#
Avatar image of _dev-null
Subscribers
Factorite (Junior)

Posts:
39
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
 Top of the page
Mjolnir Page Icon Posted 2020-03-11 1:37 PM
#
Avatar image of Mjolnir
Subscribers
Factorite (Elite)

Posts:
134
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...
 Top of the page
_dev-null Page Icon Posted 2020-03-24 8:45 AM
#
Avatar image of _dev-null
Subscribers
Factorite (Junior)

Posts:
39
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


 Top of the page
Alt Bass Page Icon Posted 2020-03-24 5:05 PM
#
Avatar image of Alt Bass
H/PC Sensei

Posts:
1,116
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
 Top of the page
_dev-null Page Icon Posted 2020-03-25 8:30 AM
#
Avatar image of _dev-null
Subscribers
Factorite (Junior)

Posts:
39
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.
 Top of the page
Alt Bass Page Icon Posted 2020-03-25 4:44 PM
#
Avatar image of Alt Bass
H/PC Sensei

Posts:
1,116
Location:
Russia
Status:
Could you dump the ROM and replace chip with something you can reprogram to hack it?
 Top of the page
ntware Page Icon Posted 2020-03-25 5:40 PM
#
Avatar image of ntware
H/PC Philosopher

Posts:
409
Location:
Florida, US
Status:
That’s exactly what the flashboard is...
 Top of the page
hpc:factor« View previous thread · H/PC Linux / Unix · View next thread »

Jump to page : 1 2
Now viewing page 2 [15 messages per page]

Jump to forum:
Seconds to generate: 0.125 - Cached queries : 68 - Executed queries : 8
Server Time now is: Saturday, 6 June 2020 - 9:42