2023-03-15 04:55 AM
Is possible to install ppp tools to connect internet using a GPRS modem ?
We need pppd/chat and kernel support to get network interface, but I can't found them on OpenStLinux resources.
Solved! Go to Solution.
2023-03-20 01:08 AM
Hi JM,
I've added PPP to kernel:
CONFIG_PPP=m
CONFIG_PPP_BSDCOMP=m
CONFIG_PPP_DEFLATE=m
CONFIG_PPP_FILTER=y
CONFIG_PPP_MPPE=m
CONFIG_PPTP=m
CONFIG_PPP_ASYNC=m
I follow st links to compile and modify and finally have copied modules to image.
Used links were:
Modify, rebuild and reload the Linux® kernel - stm32mpu
Menuconfig or how to configure kernel - stm32mpu
My OpenStLinux version and developer package are:
Linux stm32mp1 5.15.24
Process to generate kernel and copy modules works fine, but new image does not start a expected.
On booting, I get next messages on network start up (errors in bold font):
[ OK ] Stopped Network Configuration.
Starting Network Configuration...
[ *** ] (1 of 3) A start job is running for…ton configuration (23s / no limit)
[** ] (1 of 3) A start job is running for…ton configuration (33s / no limit)
[ 44.359760] Time out check galcore device expired
[ OK ] Finished Check if the gpu … correct weston configuration.
[FAILED] Failed to start Network Name Resolution.
See 'systemctl status systemd-resolved.service' for details.
[ OK ] Stopped Network Name Resolution.
[FAILED] Failed to start Network Configuration.
See 'systemctl status systemd-networkd.service' for details.
[ OK ] Stopped Network Configuration.
Starting Network Configuration...
[ **] A start job is running for Network Configuration (1min 34s / 3min)
Last message does not end never, so I can't access to systemd-resolved.service and systemd-network.service to debuig them.
I think cause may be first error (galcore device timeout). Searching at web, I can read error may be realted to modules version, but developer-package and linux image is the same.
Can you help me ?
2023-03-20 01:17 AM
Hi @JPrad.2
For the galcore module, this post may be helpful: https://community.st.com/s/question/0D53W00001KSSAoSAP/time-out-check-load-galcore-module-expired-how-to-solve-it
For the network problem, you could try without connecting the board to ethernet.
Best regards,
--JM
2023-03-20 01:59 AM
Hi,
I'm working to solve galcore module.
I prepare sources at:
/home/selba/DevOpenSTLinux/tmp/gcnano-binaries/gcnano-driver-6.4.9
In folder I can see Makefile, Kbuild, and so on...
I define variable GALCORE_DIR with value the previous path.
Next, I change to my linux kernel source code which is:
~/DevOpenSTLinux/Developer-Package/en.SOURCES-stm32mp1-openstlinux-5.15-yocto-kirkstone-mp1-v22.06.15/stm32mp1-openstlinux-5.15-yocto-kirkstone-mp1-v22.06.15/sources/arm-ostl-linux-gnueabi/linux-stm32mp-5.15.24-stm32mp1-r1-r0/linux-5.15.24
From this I run your link detailed command to compile the driver:
make -C ${PWD} AQROOT=${GALCORE_DIR} M=${GALCORE_DIR} modules
Compilation fails. I've reviewed paths but I can't view what's happen.
output is:
make -C ${PWD} AQROOT=${GALCORE_DIR} M=${GALCORE_DIR} modules
make: Entering directory '/home/selba/DevOpenSTLinux/Developer-Package/en.SOURCES-stm32mp1-openstlinux-5.15-yocto-kirkstone-mp1-v22.06.15/stm32mp1-openstlinux-5.15-yocto-kirkstone-mp1-v22.06.15/sources/arm-ostl-linux-gnueabi/linux-stm32mp-5.15.24-stm32mp1-r1-r0/linux-5.15.24'
make[1]: *** No rule to make target '/home/selba/DevOpenSTLinux/tmp/gcnano-binaries/gcnano-driver-6.4.9/hal/os/linux/kernel/platform/st/gc_hal_kernel_platform_st.o', needed by '/home/selba/DevOpenSTLinux/tmp/gcnano-binaries/gcnano-driver-6.4.9/galcore.o'. Stop.
make: *** [Makefile:1868: /home/selba/DevOpenSTLinux/tmp/gcnano-binaries/gcnano-driver-6.4.9] Error 2
make: Leaving directory '/home/selba/DevOpenSTLinux/Developer-Package/en.SOURCES-stm32mp1-openstlinux-5.15-yocto-kirkstone-mp1-v22.06.15/stm32mp1-openstlinux-5.15-yocto-kirkstone-mp1-v22.06.15/sources/arm-ostl-linux-gnueabi/linux-stm32mp-5.15.24-stm32mp1-r1-r0/linux-5.15.24'
2023-03-20 02:17 AM
Hi @JPrad.2 ,
gcnano-driver-6.4.9 is not compatible with linux-5.15.24 but linux-5-15.67.
To be compatible with linux-5.15.24 you have to use gcnano V6.4.7.
Refer to STM32 MPU ecosystem release note - stm32mpu to get consistent set of component.
Hope it help
Olivier
2023-03-20 09:21 AM
Hi again,
Finally I have added ppp support to my BSP image.
ppp and its drivers has been added as modules (not built int)
After menuconfig execution, I've compiled modules and installed on my board.
(uImage has not been updated)
On system booting I can verify /dev/ppp exists (Mandatory to manage ppp)
So, I can restart my target and try to connect internet using a GPRS modem.
I prepare /etc/ppp/peers and etc/chatscripts to validate connection.
On execute system answer:
root@stm32mp1:/etc/ppp/peers# pon fona
Couldn't open the /dev/ppp device: No such device or address
/usr/sbin/pppd: Please load the ppp_generic kernel module.
I ensure driver exists on its location
root@stm32mp1:/lib/modules/5.15.24/kernel/drivers/net/ppp# ls
bsd_comp.ko ppp_async.ko ppp_deflate.ko ppp_generic.ko ppp_mppe.ko ppp_synctty.ko pppox.ko pptp.ko
I try to load using modprobe:
root@stm32mp1:/etc/ppp/peers# modprobe ppp_generic
modprobe: ERROR: could not insert 'ppp_generic': Exec format error
I change to modules folder and try to load it:
root@stm32mp1:/lib/modules/5.15.24/kernel/drivers/net/ppp# modprobe ppp_generic.ko
modprobe: FATAL: Module ppp_generic.ko not found in directory /lib/modules/5.15.24
Why ppp_generic can't be loaded ?
Updating modules with menuconfig, is mandatoy to update uImage file on /boot ?
2023-03-20 10:18 AM
Hi @JPrad.2
Yes, you need to update uImage in /boot and all the kernel modules. From your PC:
PC $> scp <path>/arch/arm/boot/uImage root@<board IP @>:/boot
PC $> scp -r <path>/install_artifact/lib/modules/* root@<board IP @>:/lib/modules
Then from your board:
root@stm32mp: ~# /sbin/depmod -a
root@stm32mp: ~# sync
root@stm32mp: ~# reboot
Finally, load your modules once the board is rebooted.
Best regards,
--JM
2023-03-21 12:59 AM
Hi,
Making process (uImage+Modules) on DK2 demo board ppp works.
Now, I'm trying to apply on my board..
1.- if we copied uImage+ Module the booting process does not end never. It remains on below sequence (running always command in bold font). Network configuration never ends.
[ OK ] Stopped Network Configuration.
Starting Network Configuration...
[** ] (2 of 3) A start job is running for…k Name Resolution (23s / 1min 43s)
[ **] (3 of 3) A start job is running for…ton configuration (33s / no limit)
[ 44.407822] Time out check galcore device expired
[ OK ] Finished Check if the gpu … correct weston configuration.
[ ***] (2 of 2) A start job is running for…me Resolution (1min 5s / 1min 43s)
2.- If we copied only new modules (all new menuconfig ppp options has been added as modules) then
system boot is good, but not execution of ppp.
root@stm32mp1:/etc/ppp/peers# pon fona
[ 616.701662] slhc: version magic '5.15.24 preempt mod_unload modversions ARMv7 p2v8 ' should be '5.15.24 SMP preempt mod_unload ARMv7 p2v8 '
Couldn't open the /dev/ppp device: No such device or address
/usr/sbin/pppd: Please load the ppp_generic kernel module.
We supose that exist a relationship betwwen kernel and kernel modules, but we can understand the message
[ 616.701662] slhc: version magic '5.15.24 preempt mod_unload modversions ARMv7 p2v8 ' should be '5.15.24 SMP preempt mod_unload ARMv7 p2v8 '
Our current linux version is
Linux stm32mp1 5.15.24 #108 SMP PREEMPT Mon Oct 17 12:22:15 UTC 2022 armv7l armv7l armv7l GNU/Linux
3.- To manage hardward differences we modified uBoot and dtbs.
When we generate new uImage + ppp modules, is necessary make some modification during kernel generation using our custom uBoot/dtbs, or hardware is not related to uImage generation ?
2023-03-21 01:41 AM
Hi @JPrad.2
First of all, I see that your demo is running fine with a STM32MP DK2 board.
About your following points with your own board:
1/ network configuration: I have no clue why the systemd-network service is not starting correctly. Does your board differ from DK2 at network level?
2/ it seems to me the compilations of the kernel from one side and the modules from the other side are run with two different configurations as SMP is missing (CONFIG_SMP) in modules while expected by the kernel.
3/ yes dtb files should be also updated in the /boot directory.
Best regards,
--JM
2023-03-21 05:28 AM
Hi,
To make modules compatibles with our kernel version (SMP) we want to set CONFIG_SMP enabled to get an SMP kernel, but I can't find option at menuconfig.
If we execute 'cat .config' we can see the flag and value.
CONFIG_BROKEN_ON_SMP=y
CONFIG_HAVE_SMP=y
# CONFIG_SMP is not set
CONFIG_GENERIC_SMP_IDLE_THREAD=y
# CONFIG_VIDEO_VP27SMPX is not set
How can we proceed to enable CONFIG_SMP ?
In menuconfig, finding using /SMP we get:
Symbol: SMP [=n] │
│ Type : bool │
│ Defined at arch/arm/Kconfig:1126 │
│ Prompt: Symmetric Multi-Processing │
│ Depends on: (CPU_V6K [=n] || CPU_V7 [=y]) && HAVE_SMP [=y] && (MMU [=y] || ARM_MPU [=n]) │
│ Location: │
│ (1) -> Kernel Features │
│ Selects: IRQ_WORK [=y]
We apreciate your answer.
2023-03-21 06:22 AM
Hi @JPrad.2
when running bitbake -c menuconfig virtual/kernel, I see the entry «Symmeric Multi-Processing» from the sub-menu «Kernel Features».
Best regards,
--JM