[Letux-kernel] LX20 prototype is booting
H. Nikolaus Schaller
hns at goldelico.com
Fri May 2 16:27:32 CEST 2025
> Am 02.05.2025 um 15:25 schrieb Paul Boddie <paul at boddie.org.uk>:
>
> On Friday, 2 May 2025 12:45:31 CEST H. Nikolaus Schaller wrote:
>>
>> Yes, that looks like what we might need! But it seems to be in place for the
>> x2000:
>> https://github.com/Ingenic-community/linux/blob/v6.1.y/arch/mips/boot/dts/
> ingenic/x2000.dtsi#L113
>
> Admittedly, it was a low-effort suggestion with a potentially high pay-off.
Indeed. If I remember correctly now, this console timer not incrementing was an
jz4730 issue. But I have no jz4730 patch in the sudomaker-kernel. So it is just the
same symptom.
>
>> In the meantime I have analysed further and there is a strange IRQ problem
>> with the gpio-keys. I had to disable the boot button hookup completely
>> and the wakeup button stops the LED from blinking while it is pressed.
>> Seems to be something wrong with the IRQ polarity handling.
>
> [...]
>
>> So I conclude that there is some detail still wrong with interrupt handling,
>> especially for gpio keys (maybe the x1600 code for triggering on both
>> edges).
>
> The code needs a review, I guess, particularly where codebases have been
> combined in some way.
But such problems are the same with the sudomaker code (just adding some
cross-compile fixes and the lx20.dts).
>
>> Of course it is difficult to do a remote and theoretical analysis...
>> Therefore, I should design and build a handful of v0.3 prototypes as soon as
>> possible and share with interested developers, like you.
>
> It might be a more productive approach, although you are making good progress
> even with the occasional suggestion.
>
>> What I also have tried is to understand why we have no µSD at all in Linux.
>> Well, there was no broken-cd property. But with oscilloscope I only could
>> see the MMC clock (~22 MHz) but no other activity.
>>
>> The x2000.dtsi requests an ingenic,x2000-sdhci driver. This is only
>> available in the sudomaker-6.1.28 kernel and missing in our 6.15 - but it
>> is not even confirmed and compiled for the 6.1.28 kernel
>> (CONFIG_MMC_SDHCI_INGENIC=n). This explains why neither kernel has µSD...
>> I'll try to fix in 6.1.28 first and then forward-port.
>
> I think the SD peripheral is one of those that is different in the X2000. I
> just found another mail from February 2024 where I noted this, along with the
> different LCD controller, although that is not something that we are
> exercising in the near future, I imagine.
Indeed. The LCD is of low priority.
But we are short from a breakthrough to "login:".
I now have the ingenic-sdhci doing something (with sudomaker kernel).
It now finds the µSD (I had forgotten to add aliases to get stable mmc numbers).
It is panicking when tryin to start init or sh.
[ 0.000000] Linux version 6.1.28-letux-lx20+ (hns at iMac.local) (mipsel-linux-gnu-gcc (GCC) 6.3.0, GNU ld (GNU Binutils) 2.27) #2461 PREEMPT Fri May 2 15:17:21 CEST 2025
...
[ 0.016978] Loading compiled-in X.509 certificates
[ 0.016978] input: gpio_keys as /devices/platform/gpio_keys/input/input0
[ 0.016978] clk: Not disabling unused clocks
[ 0.016978] Warning: unable to open an initial console.
[ 0.016978] sdhci_ingenic_set_clock, set clk: 400000, get_clk_rate=400000
[ 0.016978] mmc0: SDHCI controller on ingenic-sdhci [13490000.sdhci] using ADMA
[ 0.016978] Waiting for root device /dev/mmcblk0p2...
[ 0.016978] sdhci_ingenic_set_clock, set clk: 400000, get_clk_rate=400000
[ 0.016978] sdhci_ingenic_set_clock, set clk: 400000, get_clk_rate=400000
[ 0.016978] sdhci_ingenic_set_clock, set clk: 400000, get_clk_rate=400000
[ 0.016978] sdhci_ingenic_set_clock, set clk: 400000, get_clk_rate=400000
[ 0.016978] sdhci_ingenic_set_clock, set clk: 400000, get_clk_rate=400000
[ 0.016978] sdhci_ingenic_set_clock, set clk: 25000000, get_clk_rate=25000000
[ 0.016978] sdhci_ingenic_set_clock, set clk: 25000000, get_clk_rate=25000000
[ 0.016978] sdhci_ingenic_set_clock, set clk: 25000000, get_clk_rate=25000000
[ 0.016978] mmc0: new high speed SDHC card at address 59b4
[ 0.016978] mmcblk0: mmc0:59b4 USDU1 28.3 GiB
[ 0.016978] mmcblk0: p1 p2
[ 0.016978] EXT4-fs: Warning: mounting with data=journal disables delayed allocation, dioread_nolock, O_DIRECT and fast_commit support!
[ 0.016978] EXT4-fs (mmcblk0p2): mounted filesystem with journalled data mode. Quota mode: none.
[ 0.016978] VFS: Mounted root (ext4 filesystem) on device 179:2.
[ 0.016978] devtmpfs: mounted
[ 0.016978] Freeing unused kernel image (initmem) memory: 264K
[ 0.016978] This architecture does not have kernel memory protection.
[ 0.016978] Run /sbin/init as init process
[ 0.016978] with arguments:
[ 0.016978] /sbin/init
[ 0.016978] with environment:
[ 0.016978] HOME=/
[ 0.016978] TERM=linux
[ 0.016978] request_module: kmod_concurrent_max (0) close to 0 (max_modprobes: 50), for module binfmt-464c, throttling...
[ 0.016978] request_module: modprobe binfmt-464c cannot be processed, kmod busy with 50 threads for more than 5 seconds now
[ 0.016978] Starting init: /sbin/init exists but couldn't execute it (error -8)
[ 0.016978] Run /etc/init as init process
[ 0.016978] with arguments:
[ 0.016978] /etc/init
[ 0.016978] with environment:
[ 0.016978] HOME=/
[ 0.016978] TERM=linux
[ 0.016978] Starting init: /etc/init exists but couldn't execute it (error -13)
[ 0.016978] Run /bin/init as init process
[ 0.016978] with arguments:
[ 0.016978] /bin/init
[ 0.016978] with environment:
[ 0.016978] HOME=/
[ 0.016978] TERM=linux
[ 0.016978] Run /bin/sh as init process
[ 0.016978] with arguments:
[ 0.016978] /bin/sh
[ 0.016978] with environment:
[ 0.016978] HOME=/
[ 0.016978] TERM=linux
[ 0.016978] request_module: kmod_concurrent_max (0) close to 0 (max_modprobes: 50), for module binfmt-464c, throttling...
[ 0.016978] request_module: modprobe binfmt-464c cannot be processed, kmod busy with 50 threads for more than 5 seconds now
[ 0.016978] Starting init: /bin/sh exists but couldn't execute it (error -8)
[ 0.016978] Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance.
[ 0.016978] Rebooting in 10 seconds..
Also problems loading some binfmt-464c module (what is this?).
For reference:
#define ENOEXEC 8 /* Exec format error */
#define EACCES 13 /* Permission denied */
Hm... Wrong architecture or endianness selected? We run Debian mipsel:
/media/sdb/rootfs/sbin/init: ELF 32-bit LSB executable, MIPS, MIPS-II version 1 (SYSV), dynamically linked, interpreter /lib/ld.so.1, for GNU/Linux 2.6.32, BuildID[sha1]=f8d6f9e684316706d54d215784b00273fa8dc8ba, stripped
There are (additional) auto-choices in the x2000 Kconfig:
config MACH_JZ4780
bool
select GENERIC_CLOCKEVENTS_BROADCAST if SMP
select SYS_HAS_CPU_MIPS32_R2
select SYS_SUPPORTS_HIGHMEM
select SYS_SUPPORTS_SMP
config MACH_X1600
bool
select SYS_HAS_CPU_MIPS32_R2
select SYS_SUPPORTS_HIGHMEM
config MACH_X2000
bool
select GENERIC_CLOCKEVENTS_BROADCAST if SMP
select SYS_HAS_CPU_MIPS32_R5
select SYS_SUPPORTS_HIGHMEM
select SYS_SUPPORTS_SMP
select MIPS_O32_FP64_SUPPORT
select WEAK_ORDERING
select WEAK_REORDERING_BEYOND_LLSC
Especially R2 vs. R5? I'll simply try...
BR,
Nikolaus
More information about the Letux-kernel
mailing list