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

« 1 2 3 4 5 6 ... Next »
_dev-null Page Icon Posted 2020-01-20 1:23 PM
#
Avatar image of _dev-null
Subscribers
Factorite (Elite)

Posts:
208
Location:
Austria
Status:
Hi!
I found out that i can use all the 128MB Ram from my modded Ram board in Linux.
So the next step is a newer Linux kernel and Debian armel userland on the Jornada.

I started with a fresh 4.9.210 Kernel. https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.9.210.tar.xz

The problem is that ARMv4 CPUs like the SA-1110 have no BX instruction, which are only available on newer ARMv4t CPUs. So you can not run any newer userland like Debian armel. Some guys from the arm-platforms community found a clever solution and wrote a workaround to emulate this instruction on older ARMv4 CPUs. https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.gi...

After patching the 4.9 kernel with the BX emulator. Everything is set up and i compiled the kernel with the jornada720_defconfig.
The kernel compiled and i got a nice and shiny zimage

The kernel boots and seems happy, until the point where it tries to mount the root fs.
It seems that the Uniform Multi-Platform E-IDE driver (ide-gd driver 1.18) is unable to find the CF card.
Something is broken in this driver between 2.6 and 4.9 ...

Here is the complete dmesg:

 
--------linexec-------- 
LinExec: UART Initialized.
LinExec: UART Initialized.
LinExec: UART Initialized.
LinExec: Beginning boot_linux.
LinExec: Passing the point of no return.. Now.
LinExec: Entering DRAMloader...
Booting Linux on physical CPU 0x0
Linux version 4.9.210 (stefan@spnub1804work) (gcc version 7.4.0 (Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1) ) #1 Mon Jan 20 11:30:01 UTC 2020
CPU: StrongARM-1110 [6901b118] revision 8 (ARMv4), cr=c020717f
CPU: VIVT data cache, VIVT instruction cache
Machine: HP Jornada 720
Memory policy: Data cache writeback
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512
Kernel command line: root=/dev/hda2 mem=128m console=ttySA0,115200n8
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 126100K/131072K available (2846K kernel code, 114K rwdata, 596K rodata, 120K init, 83K bss, 4972K reserved, 0K cma-reserved)
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0xc8800000 - 0xff800000 ( 880 MB)
lowmem : 0xc0000000 - 0xc8000000 ( 128 MB)
modules : 0xbf000000 - 0xc0000000 ( 16 MB)
.text : 0xc0208000 - 0xc04cfc28 (2848 kB)
.init : 0xc0566000 - 0xc0584000 ( 120 kB)
.data : 0xc0584000 - 0xc05a09e0 ( 115 kB)
.bss : 0xc05a09e0 - 0xc05b5868 ( 84 kB)
SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:16 nr_irqs:61 61
irq: Cannot allocate irq_descs @ IRQ1, assuming pre-allocated
irq: Cannot allocate irq_descs @ IRQ33, assuming pre-allocated
sched_clock: 32 bits at 3686kHz, resolution 271ns, wraps every 582542222200ns
clocksource: oscr0: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 518462577799 ns
Console: colour dummy device 30x40
console [ttySA0] enabled
Calibrating delay loop... 136.60 BogoMIPS (lpj=683008)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: Setting up static identity map for 0xc0208240 - 0xc0208298
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 256 (order: -1, 3072 bytes)
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
SA1111 Microprocessor Companion Chip: silicon revision 1, metal revision 1
sa1111 sa1111.0: Providing IRQ61-115
sa1111-rab 0400: dmabounce: registered device
sa1111-rab 0600: dmabounce: registered device
clocksource: Switched to clocksource oscr0
genirq: Setting trigger mode 3 for irq 112 failed (sa1111_type_irq+0x0/0x8c)
genirq: Setting trigger mode 3 for irq 114 failed (sa1111_type_irq+0x0/0x8c)
jornada720_pcmcia_configure_socket(): config socket 0 vcc 0 vpp 0
genirq: Setting trigger mode 3 for irq 113 failed (sa1111_type_irq+0x0/0x8c)
genirq: Setting trigger mode 3 for irq 115 failed (sa1111_type_irq+0x0/0x8c)
jornada720_pcmcia_configure_socket(): config socket 1 vcc 0 vpp 0
NET: Registered protocol family 2
TCP established hash table entries: 1024 (order: 0, 4096 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
NetWinder Floating Point Emulator V0.97 (double precision)
SSP: device initialized with irq
workingset: timestamp_bits=30 max_order=15 bucket_order=0
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Epson S1D13XXX FB Driver
s1d13xxxfb: chip production id 4 = S1D13506
s1d13xxxfb: chip revision 1
s1d13xxxfb: regs mapped at 0xf0000000, fb 512 KiB mapped at 0xf1000000
Console: switching to colour frame buffer device 80x30
fb0: S1D13xxx frame buffer device
Serial: SA11x0 driver
sa11x0-uart.1: ttySA1 at MMIO 0x80010000 (irq = 16, base_baud = 230400) is a SA1100
sa11x0-uart.3: ttySA0 at MMIO 0x80050000 (irq = 18, base_baud = 230400) is a SA1100
loop: module loaded
jornada720_pcmcia_configure_socket(): config socket 0 vcc 33 vpp 33
jornada720_pcmcia_configure_socket(): config socket 1 vcc 33 vpp 33
nbd: registered device at major 43
Uniform Multi-Platform E-IDE driver
ide-gd driver 1.18
mousedev: PS/2 mouse device common for all mice
input: HP Jornada 720 keyboard as /devices/platform/jornada720_kbd/input/input0
input: HP Jornada 7xx Touchscreen as /devices/platform/jornada_ts/input/input1
sa1100-rtc sa1100-rtc: rtc core: registered sa1100-rtc as rtc0
NET: Registered protocol family 17
Registering BX emulation handler
sa1100-rtc sa1100-rtc: setting system clock to 1970-01-01 00:00:39 UTC (39)
VFS: Cannot open root device "hda2" or unknown-block(0,0): error -6
Please append a correct "root=" boot option; here are the available partitions:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
CPU: 0 PID: 1 Comm: swapper Not tainted 4.9.210 #1
Hardware name: HP Jornada 720
Backtrace:
[<c0212f30>] (dump_backtrace) from [<c02131e4>] (show_stack+0x18/0x1c)
r6:00008000 r5:00000000 r4:c05a0c48
[<c02131cc>] (show_stack) from [<c036b604>] (dump_stack+0x20/0x28)
[<c036b5e4>] (dump_stack) from [<c0271640>] (panic+0xb8/0x23c)
[<c027158c>] (panic) from [<c0567204>] (mount_block_root+0x22c/0x310)
r3:00000000 r2:00000000 r1:c0131ee0 r0:c0522a9c
r7:c7a46000
[<c0566fd8>] (mount_block_root) from [<c0567344>] (mount_root+0x5c/0x78)
r10:c057c838 r9:00000009 r8:c0564290 r7:c057c834 r6:00000008 r5:c057c86d
r4:00000000
[<c05672e8>] (mount_root) from [<c0567484>] (prepare_namespace+0x124/0x174)
r4:c05a0a04
[<c0567360>] (prepare_namespace) from [<c0566dfc>] (kernel_init_freeable+0x180/0x1c8)
r5:c05a09e0 r4:00000053
[<c0566c7c>] (kernel_init_freeable) from [<c04cbe78>] (kernel_init+0x10/0xf8)
r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c04cbe68
r4:00000000
[<c04cbe68>] (kernel_init) from [<c0210268>] (ret_from_fork+0x14/0x2c)
r4:00000000
---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
random: fast init done
random: crng init done


The next step is to get this driver working so we can load a userland from CF ...


Bye
Stefan
 Top of the page
ntware Page Icon Posted 2020-01-20 2:52 PM
#
Avatar image of ntware
H/PC Elite

Posts:
660
Location:
Florida, US
Status:
Hi Stefan, nice work! I've tried to play around with the mainline kernel on the Jornada as well but gave up at some point. I remember back in the day when JLime was still active that there was something going on with kernel 2.6 and CF cards. If I remember the discussion correctly, on kernel 2.4 any CF card would work because the IDE driver would detect it as a hard disk at /dev/hda1 or hda2, whatever. Apparently there was a change on the driver in 2.6 that detected the card as external media so that userland couldn't be booted from there. JLime folks made a work-around for this where they manually inserted the DEV ID of several CF Cards into the IDE driver (or somewhere else, I don't remember) forcing the CF Card to be detected as a hard disk. So, kernel 2.6 only worked on CF Cards that had the ID hardcoded on the kernel. I remember being stuck on 2.4 for a while until I bought a card that was supported. So, maybe, I guess the same thing needs to happen with the current driver.
 Top of the page
_dev-null Page Icon Posted 2020-01-22 8:18 AM
#
Avatar image of _dev-null
Subscribers
Factorite (Elite)

Posts:
208
Location:
Austria
Status:
Hello!
Yeah i have already checked that and my device ID is already in the source code. I think the kernel doesnt recognize any PCMCIA or CF card at all.
jornada720_pcmcia_configure_socket() powers up the cards but thats all.
I think it has something to do with the pcmcia/cf driver. I wrote to the Linux ARM mailing list. Maybe someone over there has a clue whats wrong here.

Bye
Stefan
 Top of the page
_dev-null Page Icon Posted 2020-01-22 1:07 PM
#
Avatar image of _dev-null
Subscribers
Factorite (Elite)

Posts:
208
Location:
Austria
Status:
Update: the kernel is up and running!

Russell King from the linux-arm mailing list told me to put "rootdelay=2" on the kernel command line so it has more time to run other threads to probe the card.
And bingo! We have now access to the CF card. I need to set up a Debian 9 rootfs with debootstrap to get things going.

Console output now:

 
--------linexec-------- 
LinExec: UART Initialized.
LinExec: UART Initialized.
LinExec: UART Initialized.
LinExec: Beginning boot_linux.
LinExec: Passing the point of no return.. Now.
LinExec: Entering DRAMloader...
Booting Linux on physical CPU 0x0
Linux version 4.9.210 (stefan@spnub1804work) (gcc version 7.4.0 (Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1) ) #4 Tue Jan 21 15:00:20 UTC 2020
CPU: StrongARM-1110 [6901b118] revision 8 (ARMv4), cr=c020717f
CPU: VIVT data cache, VIVT instruction cache
Machine: HP Jornada 720
Memory policy: Data cache writeback
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512
Kernel command line: root=/dev/hda2 mem=128m rootdelay=2 console=ttySA0,115200n8 sa11xx_core.pc_debug=7
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 125928K/131072K available (2980K kernel code, 117K rwdata, 628K rodata, 120K init, 84K bss, 5144K reserved, 0K cma-reserved)
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0xc8800000 - 0xff800000 ( 880 MB)
lowmem : 0xc0000000 - 0xc8000000 ( 128 MB)
modules : 0xbf000000 - 0xc0000000 ( 16 MB)
.text : 0xc0208000 - 0xc04f1250 (2981 kB)
.init : 0xc0590000 - 0xc05ae000 ( 120 kB)
.data : 0xc05ae000 - 0xc05cb420 ( 118 kB)
.bss : 0xc05cb420 - 0xc05e0748 ( 85 kB)
SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:16 nr_irqs:61 61
irq: Cannot allocate irq_descs @ IRQ1, assuming pre-allocated
irq: Cannot allocate irq_descs @ IRQ33, assuming pre-allocated
sched_clock: 32 bits at 3686kHz, resolution 271ns, wraps every 582542222200ns
clocksource: oscr0: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 518462577799 ns
Console: colour dummy device 30x40
console [ttySA0] enabled
Calibrating delay loop... 136.60 BogoMIPS (lpj=683008)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0xc0208240 - 0xc0208298
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 256 (order: -1, 3072 bytes)
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
SA1111 Microprocessor Companion Chip: silicon revision 1, metal revision 1
sa1111 sa1111.0: Providing IRQ61-115
sa1111-rab 0400: dmabounce: registered device
sa1111-rab 0600: dmabounce: registered device
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
clocksource: Switched to clocksource oscr0
genirq: Setting trigger mode 3 for irq 112 failed (sa1111_type_irq+0x0/0x8c)
genirq: Setting trigger mode 3 for irq 114 failed (sa1111_type_irq+0x0/0x8c)
jornada720_pcmcia_configure_socket(): config socket 0 vcc 0 vpp 0
genirq: Setting trigger mode 3 for irq 113 failed (sa1111_type_irq+0x0/0x8c)
genirq: Setting trigger mode 3 for irq 115 failed (sa1111_type_irq+0x0/0x8c)
jornada720_pcmcia_configure_socket(): config socket 1 vcc 0 vpp 0
NET: Registered protocol family 2
TCP established hash table entries: 1024 (order: 0, 4096 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
NetWinder Floating Point Emulator V0.97 (double precision)
SSP: device initialized with irq
workingset: timestamp_bits=30 max_order=15 bucket_order=0
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Epson S1D13XXX FB Driver
s1d13xxxfb: chip production id 4 = S1D13506
s1d13xxxfb: chip revision 1
s1d13xxxfb: regs mapped at 0xf0000000, fb 512 KiB mapped at 0xf1000000
Console: switching to colour frame buffer device 80x30
fb0: S1D13xxx frame buffer device
Serial: SA11x0 driver
sa11x0-uart.1: ttySA1 at MMIO 0x80010000 (irq = 16, base_baud = 230400) is a SA1100
sa11x0-uart.3: ttySA0 at MMIO 0x80050000 (irq = 18, base_baud = 230400) is a SA1100
loop: module loaded
jornada720_pcmcia_configure_socket(): config socket 1 vcc 33 vpp 33
nbd: registered device at major 43
Uniform Multi-Platform E-IDE driver
ide-gd driver 1.18
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
sa1111-ohci 0400: SA-1111 OHCI
sa1111-ohci 0400: new USB bus registered, assigned bus number 1
sa1111-ohci 0400: irq 105, io mem 0x40000400
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
mousedev: PS/2 mouse device common for all mice
input: HP Jornada 720 keyboard as /devices/platform/jornada720_kbd/input/input0
input: HP Jornada 7xx Touchscreen as /devices/platform/jornada_ts/input/input1
sa1100-rtc sa1100-rtc: rtc core: registered sa1100-rtc as rtc0
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
NET: Registered protocol family 17
Registering BX emulation handler
sa1100-rtc sa1100-rtc: setting system clock to 1970-01-01 00:00:25 UTC (25)
Waiting 2 sec before mounting root device...
jornada720_pcmcia_configure_socket(): config socket 1 vcc 33 vpp 33
jornada720_pcmcia_configure_socket(): config socket 1 vcc 33 vpp 33
pcmcia_socket pcmcia_socket1: pccard: PCMCIA card inserted into slot 1
pcmcia 1.0: pcmcia: registering new device pcmcia1.0 (IRQ: 111)
jornada720_pcmcia_configure_socket(): config socket 1 vcc 33 vpp 0
jornada720_pcmcia_configure_socket(): config socket 1 vcc 33 vpp 0
hda: CF Card, CFA DISK drive
random: fast init done
ide0 at 0xc8870000-0xc8870007,0xc887000e on irq 111
bounce: isa pool size: 16 pages
hda: max request size: 1024KiB
hda: 7806960 sectors (3997 MB) w/1KiB Cache, CHS=7745/255/63
hda: cache flushes supported
hda: hda1 hda2 hda3
ide-cs 1.0: ide-cs: hda: Vpp = 0.0
EXT2-fs (hda2): warning: mounting unchecked fs, running e2fsck is recommended
VFS: Mounted root (ext2 filesystem) on device 3:2.
Freeing unused kernel memory: 120K
This architecture does not have kernel memory protection.
random: crng init done


 Top of the page
ntware Page Icon Posted 2020-01-22 6:22 PM
#
Avatar image of ntware
H/PC Elite

Posts:
660
Location:
Florida, US
Status:
Holy crap! That was a genius fix! I would never have thought about that... I see from the logs that the modules for the hardware (epson display driver, keyboard, touchscreen, etc) have also been loaded. Are they compiled with the kernel or are they being loaded dynamically? I'm eager to try it out on my machine as well (although I only have 32MB of RAM). Do you mind uploading your binaries? Or maybe if you can highlight the major points on how you compiled the kernel, I can try to compile the kernel myself.
 Top of the page
stingraze Page Icon Posted 2020-01-23 12:52 AM
#
Avatar image of stingraze
H/PC Vanguard

Posts:
3,656
Location:
Japan
Status:
Simply awesome.

I didn't realize Linux kernels are now in the latter part of Version 4...
 Top of the page
_dev-null Page Icon Posted 2020-01-23 6:16 AM
#
Avatar image of _dev-null
Subscribers
Factorite (Elite)

Posts:
208
Location:
Austria
Status:
Hi!
I wrote a quick summary of the steps to compile the kernel. http://www.sp-net.at/wiki/doku.php?id=jornada_j720_linux49

If everything is working i can upload the kernel image and a base rootfs.

Stefan
 Top of the page
Mjolnir Page Icon Posted 2020-01-23 11:44 AM
#
Avatar image of Mjolnir
Factorite (Elite)

Posts:
210
Location:
United States
Status:
Good luck - have bookmarked your wiki.
 Top of the page
_dev-null Page Icon Posted 2020-01-29 12:55 AM
#
Avatar image of _dev-null
Subscribers
Factorite (Elite)

Posts:
208
Location:
Austria
Status:
Update:
Had to go back to Kernel 4.8.7, but we have now a "full" working Debian 9 on this little beast!
There is still a lot to do, like APM and backlight adjustment. But i am happy that it works.

 Top of the page
C:Amie Page Icon Posted 2020-01-29 9:30 AM
#
Avatar image of C:Amie
Administrator
H/PC Oracle

Posts:
17,950
Location:
United Kingdom
Status:
Wow! Sensational work there _dev_null. Top notch!

Will you consider writing this up in a newbie's guide, how to get it onto the device and get it booting etc?
 Top of the page
Karpour Page Icon Posted 2020-02-04 11:47 AM
#
Avatar image of Karpour
Subscribers
H/PC Philosopher

Posts:
439
Location:
Austria
Status:
Absolutely fantastic work! I can't wait to try this out when work gets a little less busy!

 Top of the page
ntware Page Icon Posted 2020-02-06 9:12 PM
#
Avatar image of ntware
H/PC Elite

Posts:
660
Location:
Florida, US
Status:
Same thing! Every day I look at my Jornada and think "today I'm gonna make you run Debian" but then work gets me all busy and the day passes by without me even touching the Jornada. I'm excited to try it out and see how much I can do with just 32MB of RAM. Later on I might upgrade it to 128MB as well and compare.
 Top of the page
Jake Page Icon Posted 2020-02-06 10:09 PM
#
Avatar image of Jake
Moderator
H/PC Vanguard

Posts:
2,812
Location:
Choking on the stench of ambition in Washington DC
Status:
Hats off to you. What kind of apps are you running? Word processor?

Jake
 Top of the page
_dev-null Page Icon Posted 2020-02-15 9:26 PM
#
Avatar image of _dev-null
Subscribers
Factorite (Elite)

Posts:
208
Location:
Austria
Status:
Hi!
Currently i work on the kernel and the base system. The whole system is not as stable as i like to have it.
(RAM Upgrade isnt working so well and the linexec needs some modifications, on top of that i try to get USB Host working on the SA-1111 Chip).
If the basic problems sorted out i start with testing applications and write a little summary ...

If I make any progress i will comment it here.

Bye
Stefan
 Top of the page
Karpour Page Icon Posted 2020-02-15 9:59 PM
#
Avatar image of Karpour
Subscribers
H/PC Philosopher

Posts:
439
Location:
Austria
Status:
I was wondering, can you recommend any reading material to get into porting linux, writing drivers, etc?
I have a lot of experience programming very low level on microcontrollers, and then very high level and I administrate linux servers all the time, but I have a knowledge gap there
 Top of the page
« 1 2 3 4 5 6 ... Next »
Jump to forum:
Seconds to generate: 0.281 - Cached queries : 69 - Executed queries : 12