[Letux-kernel] jz4730-i2c - clocksource
H. Nikolaus Schaller
hns at goldelico.com
Sun Mar 7 14:37:40 CET 2021
Hi Paul,
> Am 07.03.2021 um 14:05 schrieb Paul Boddie <paul at boddie.org.uk>:
>
> On Sunday, 7 March 2021 00:16:53 CET Paul Boddie wrote:
>> On Saturday, 6 March 2021 23:20:48 CET H. Nikolaus Schaller wrote:
>>> You might try to download my binary builds and replace uImage or modules
>>> or DTB to check where the difference is.
>>>
>>> https://download.goldelico.com/letux-kernel/latest-l400/
>>>
>>> And, which defconfig did you use? I use the letix_mipsbook_defconfig.
>>> The alpha400_defconfig may be incomplete for LCD.
>>
>> I'll try again with letux_mipsbook_defconfig and see if it makes a
>> difference.
>
> Since I suspect that I am making a mistake in deploying the files, where
> should each of these things go on a memory card?
>
> The uImage file should go in the first (FAT) partition, of course.
Yes. Exact names depends on what U-Boot expects. On my system it should be
named "Image" without the "u".
>
> The second partition should contain the root filesystem. I found that unlike
> the legacy configuration, which used ext2, the kernel command line only had
> ext4 and ext3 for the rootfstype. So I changed the command line and stuck with
> the ext2 format for now.
AFAIR you can read ext2 through ext3 driver. But of course you are free to change
that. Kernel would warn/fail if the config doesn't match the SD card.
>
> The modules are presumably installed to the second partition as normal, this
> typically being done using the modules_install Makefile target with
> INSTALL_MOD_PATH set to the base of the mounted partition. They should end up
> at the following location within INSTALL_MOD_PATH:
>
> lib/modules/5.12.0-rc2-letux-l400+
Yes. They go to /lib/modules/5.12.0-rc2-letux-l400+/
>
> The device tree files are typically installed using the dtbs_install Makefile
> target with INSTALL_PATH set to the location of the boot directory. They
> should end up at the following location within INSTALL_PATH:
>
> dtbs/5.12.0-rc2-letux-l400+/ingenic/alpha400.dtb
>
> Normally, this would be the following in the running system:
>
> /boot/dtbs/5.12.0-rc2-letux-l400+/ingenic/alpha400.dtb
>
> This is where I wonder if I am doing something wrong because the device-
> trees.tbz download has one file with this path:
>
> ingenic/alpha400.dtb
>
> Where would this be unpacked? Should it be on the first partition? What
> happened to the dtbs/5.12.0-rc2-letux-l400+ part of the path?
It should go to /boot and dtbs/5.12.0-rc2-letux-l400+ should be stripped
off. The reason is that this is loaded by U-Boot which does not know the
exact kernel name. Only the kernel knows its name and can search modules
in /lib/modules/5.12.0-rc2-letux-l400+/
This means the .dtb must be located where U-Boot (or a boot.scr) is looking
for it.
So I have:
root at letux:~# ls -lR /boot
/boot:
total 5136
-rw-r--r-- 1 root root 5232705 Mar 4 2021 Image
-rw-r--r-- 1 root root 96 Mar 4 2021 Image.info
-rw-r--r-- 1 root root 2108 Mar 4 2021 bootargs.scr
drwxr-xr-x 2 root root 4096 Mar 4 2021 ingenic
/boot/ingenic:
total 12
-rw-r--r-- 1 root root 12078 Mar 3 2021 alpha400.dtb
root at letux:~# ls -l /lib/modules/5.12.0-rc2-letux-l400+/
total 696
drwxr-xr-x 8 1002 root 4096 Mar 7 2021 kernel
-rw-r--r-- 1 root root 107540 Jan 1 00:01 modules.alias
-rw-r--r-- 1 root root 114082 Jan 1 00:01 modules.alias.bin
-rw-r--r-- 1 1002 root 13845 Mar 7 2021 modules.builtin
-rw-r--r-- 1 root root 15600 Jan 1 00:01 modules.builtin.bin
-rw-r--r-- 1 1002 root 69374 Mar 7 2021 modules.builtin.modinfo
-rw-r--r-- 1 1002 root 69 Mar 7 2021 modules.ccwmap
-rw-r--r-- 1 root root 23159 Jan 1 00:01 modules.dep
-rw-r--r-- 1 root root 40380 Jan 1 00:01 modules.dep.bin
-rw-r--r-- 1 root root 134 Jan 1 00:01 modules.devname
-rw-r--r-- 1 1002 root 73 Mar 7 2021 modules.ieee1394map
-rw-r--r-- 1 1002 root 141 Mar 7 2021 modules.inputmap
-rw-r--r-- 1 1002 root 81 Mar 7 2021 modules.isapnpmap
-rw-r--r-- 1 1002 root 74 Mar 7 2021 modules.ofmap
-rw-r--r-- 1 1002 root 14338 Mar 7 2021 modules.order
-rw-r--r-- 1 1002 root 99 Mar 7 2021 modules.pcimap
-rw-r--r-- 1 1002 root 43 Mar 7 2021 modules.seriomap
-rw-r--r-- 1 root root 55 Jan 1 00:01 modules.softdep
-rw-r--r-- 1 root root 105905 Jan 1 00:01 modules.symbols
-rw-r--r-- 1 root root 127270 Jan 1 00:01 modules.symbols.bin
-rw-r--r-- 1 1002 root 189 Mar 7 2021 modules.usbmap
root at letux:~#
Hope this helps!
BR,
Nikolaus
PS: I think one of my fixes for the ingenic-timer for jz4730
did break the jz4770-tcu code which is used by the jz4780.
Have a fix almost tested.
BTW: the jz4780 does NOT use the ingenic-ost timers. It completely
relies on the 16 bit jz4770-ingenic-timer.
PPS: the jz4780.dtsi also defines the timers as "interrupt-controller"
which is IMHO nonsense. It would allow
interrupt-parent = <&tcu>;
This may also affect initialization of the ingenic-timer.
But if I remove it we get:
[ 0.000000] clocksource: ingenic-timer: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 38884100 ns
[ 0.000000] ingenic_tcu_init: Unable to start CPU timers: -19
[ 0.000000] Failed to initialize '/timer at 10002000': -19
[ 0.000000] timer_probe: no matching timers found
More information about the Letux-kernel
mailing list