Sound on the RockPro64

I have never included a patch, so I am not sure what to do exactly. Does this mean I have to recompile the kernel? So if I come from the readme here,


what steps do I need before I even get to the first point here?

make buildenv TARGET_ARCH=aarch64 BUILDENV_SHELL=/bin/sh

Also guessing from the URL above, I assume I would need to install a amd64 15-current version first on that laptop and not 15.1-RELEASE?
 
make buildenv TARGET_ARCH=aarch64 BUILDENV_SHELL=/bin/sh
You do not need that command. You are compiling on AMD64 correct?

Look at adding new module to FreeBSD Kernel. Basically copy the C file to new directory under /usr/src/sys/dev/*
Then add details that a new module is present in sys/dev and make a new kernel.

I have a laptop with an Intel Atom Z3735F CPU which also includes the es8316 sound chip.
do not know if it will work on non arm..

The name of the patch should help you place it.

sys_dev_iicbus_es8316.c = new file /usr/src/sys/dev/iicbus/es8316.c

Then you must add the module name to config or manually compile the module.
For a caveman like me I just cut and paste the text and delete all the plus signs. Figuring out diff/patch sometimes takes me longer.
 
You do not need that command. You are compiling on AMD64 correct?
Correct.
Look at adding new module to FreeBSD Kernel. Basically copy the C file to new directory under /usr/src/sys/dev/*
Then add details that a new module is present in sys/dev and make a new kernel.
OK, I need some help here, as I don't fully understand. So, first I copy the C file into /usr/src/sys/dev/iicbus/? I take directory iicbus from what you are saying afterwards and as I found that directory in /usr/src/sys/dev/ which contains other C files?
If correct, once the C file is copied into that directory, then what exactly? I don't fully understand
Then add details that a new module is present in sys/dev and make a new kernel.
I have never made a new kernel, so could you please give me the exact steps after copying the C file?
 
I take directory iicbus from what you are saying afterwards
I started off the post wrong. I said make new directory blah bla blah.
Once I looked at the patch I saw the directory is an existing one with other i2c drivers.
The patch is raw text and you can easily read the header part. The file name and directory are right there.
Copy and paste into new file named in patch and work on it.

That or figure out how to properly apply the patch.
I am a hamersmith. No technical savvy. I can make it work.
So can you.

I can not handwalk you though building kernel. There is plenty of documentation for that.
You want to make a new KERNCONF for this work. Your custom kernel.
Then compile.

Other way is just run make in the patch directory. Locally compiling for testing. Compile and kldload $patch. If it works then make a KERNCONF.
And the brittle method.
 
Since this patch file is a "New file" it should not be hard to figure out how to use patch. I am pretty sure this is a uni-type so you need -u
Sometimes when a patch is old or complicated you need to hand patch. In this case it is very easy patch.

Should be something like this patch -u $patch_name and that would be done in the directory in the patch.
/usr/src/sys/dev/iicbus/
 
OK I figured out patch. You must run it from /usr/src.
So step one cd /usr/src.
Create this patchfile: /usr/src/es8316.c.patch from @jrm 's github link.

Now run this: patch -p1 < es8316.c.patch

Now check that es8316.c is in place. ls /usr/src/sys/dev/iicbus
 
Back
Top