Time-Appliances-Project / Time-Appliances-Project/Time-Card

Linux installation related

Open
#120 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
1.5k
Forks
122
Avg merge
12m
Merged PRs (30d)
1

Description

Good day!

New to time card, and wanted help with the following

I was following the installation instructions with Linux and got into the following:

sudo ./remake
Could not locate kernel source for distribution 'ubuntu'

So I tried

make -C /usr/src/linux-headers-$(uname -r) M=$(pwd) modules
make: Entering directory '/usr/src/linux-headers-6.11.0-29-generic'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: x86_64-linux-gnu-gcc-13 (Ubuntu 13.3.0-6ubuntu224.04) 13.3.0
You are using: gcc-13 (Ubuntu 13.3.0-6ubuntu2
24.04) 13.3.0
CC [M] /home/arkbg/Time-Appliance-Project/DRV/ptp_ocp.o
/home/arkbg/Time-Appliance-Project/DRV/ptp_ocp.c: In function ‘ptp_ocp_syncdevicetime’:
/home/arkbg/Time-Appliance-Project/DRV/ptp_ocp.c:1680:30: error: implicit declaration of function ‘convert_art_ns_to_tsc’ [-Werror=implicit-function-declaration]
1680 | *system_counterval = convert_art_ns_to_tsc(ptm_master_time);
| ^~~~~~~~~~~~~~~~~~~~~
/home/arkbg/Time-Appliance-Project/DRV/ptp_ocp.c:1680:30: error: incompatible types when assigning to type ‘struct system_counterval_t’ from type ‘int’
/home/arkbg/Time-Appliance-Project/DRV/ptp_ocp.c: In function ‘ptp_ocp_complete’:
/home/arkbg/Time-Appliance-Project/DRV/ptp_ocp.c:5429:40: error: incompatible type for argument 2 of ‘ptp_ocp_symlink’
5429 | ptp_ocp_symlink(bp, pps->dev, "pps");
| ~~~^~~~~
| |
| struct device
/home/arkbg/Time-Appliance-Project/DRV/ptp_ocp.c:5392:52: note: expected ‘struct device *’ but argument is of type ‘struct device’
5392 | ptp_ocp_symlink(struct ptp_ocp *bp, struct device *child, const char *link)
| ~~~~~~~~~~~~~~~^~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:244: /home/arkbg/Time-Appliance-Project/DRV/ptp_ocp.o] Error 1
make[1]: *** [/usr/src/linux-headers-6.11.0-29-generic/Makefile:1938: /home/arkbg/Time-Appliance-Project/DRV] Error 2
make: *** [Makefile:224: __sub-make] Error 2
make: Leaving directory '/usr/src/linux-headers-6.11.0-29-generic'

Any help appreciated. Thanks.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing remake and the kernel-module build in DRV/ptp_ocp.c, then reproduce the command against /usr/src/linux-headers-$(uname -r). Trace the reported convert_art_ns_to_tsc and ptp_ocp_symlink errors and compare them with the target kernel APIs. Done means the module builds successfully on the reported Ubuntu kernel and the installation instructions work.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux, ubuntu
Domain
build-system, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.