The log claims that I am missing msm_rtb.h from the directory, but when I search it, it appears here. How would I go about fixing this?
The github repo that I have linked is what I got from Samsung Open Source Repository. My device has the codename expressatt, if that is needed. Thanks for your help.
Edited
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items ...
Show closed items
Linked items 0
Link issues together to show that they're related.
Learn more.
Changing the include statement in io.h to #include "../../mach-msm/include/mach/msm_rtb.h" should do the job, although it's arguably quite ugly If you get more errors of this kind, it might be worth to investigate why arch/arm/mach-msm/include isn't put on the include path but if it's just this instance, just patch it out.
I tried posting in Matrix, but it seems most people are active during my sleep time (which I should be doing right now :P). It's hard to scroll up and try to find where I asked my question and find the answer (unless I'm doing something wrong, so feel free to yell at me :P). Thanks for the answer though!
After a few edits to the kernel (I had to fix a few more similar errors), it now gives me this error: log.txt. I guess I'll investigate tomorrow why they aren't including mach-msm, but I am a noob at this and would appreciate any help I can get.
Here is my github repo. There also seems to be a LineageOS kernel, but when I tried it, it seemed to give me the same exact errors.
I'm still struggling to fix this. When looking at the source kernel config files though, I found that there are two def config files, one for the board (msm8960_defconfig) and the other for the device (express_defconfig). Would compiling the msm8940_defconfig first get me the msm_rtb.h file that I am looking for? If so, how would I get pmaports to do one defconfig and then the other?
That LineageOS kernel has version 3.4, yours is 3.0, are you sure it's the same device?
Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at kernel/timeconst.pl line 373.make[1]: *** [/home/pmos/build/src/Samsung-expressatt-OpenSource-Kernel-00c0cb3b84a7c59142d4e7056cfb89a3f0a5783e/kernel/Makefile:140: kernel/timeconst.h] Error 255make: *** [Makefile:953: kernel] Error 2make: *** Waiting for unfinished jobs....
I'm kind of confused on what you mean by the kernel APKBUILD. Is it the APKBUILD under device/linux-samsung-expressatt? If so, I put a config-samsung-expressatt.armv7 in the same directory, if that is what you mean. Sorry, I'm new to porting, so I barely have any idea of what I am doing.
device-specific defconfig is usually better than SoC-generic
Ah alright. I'll just use what I was previously using.
I'm pretty sure the LineageOS kernel and the OpenSource kernel that I have are the same device. The cm.dependencies in LineageOS for expressatt showed that this was the kernel, and it also has the expressatt defconfig. I'm guessing people made some changes to the kernel. I'm going with what I got from Samsung's Open Source Software.
Also, thanks for the fix! I've been trying to learn how to port LineageOS simultaneously (It's going pretty bad), so I forgot I already fixed the msm_rtb.h problem. I got another error after applying this patch, but I think I need to implement symbolic links to fix them. The wiki said that there would be a couple of errors, but I'm getting a ton. Hope I'm not doing anything wrong.
I don't know how those 2 huge diffs can help you, each compile error must be explored individually. Linking errors like that usually mean that function body is not compiled (maybe it is hidden by some #ifdef / config option), so the place where it is called should be hidden by that define/config, too.
So, you copied your express_defconfig to config-samsung-expressatt.armv7 and set all needed values in APKBUILD, right?
Yes, I followed it to the letter. Should I have to set the _flavor variable? The wiki didn't do that, so I didn't either. Please let me know if I do.
BTW why are you sure that this defconfig is a correct one?
I'm not haha... I just thought it was expressatt's defconfig, since that is what the closest thing was to my phone's codename. I thought if the LineageOS kernel was giving me errors, the source code shouldn't. If you recommend me doing with LineageOS's kernel (samsung d2), I'll change to it.
It is usually located in lineageOS's device repo,...
Here is what it says. In the samsung_d2 kernel in the LineageOS repository they changed it. This device tree hasn't been updated since cm 12.
I don't know how those 2 huge diffs can help you...
Oh I see. So do you suggest to change to this kernel? I'll redo the kernel steps again with the change to the LineageOS kernel. Again, sorry for asking stupid questions and thanks so much for your help.
Edit: I'll add my old APKBUILD here. I'm going to update it with the LineageOS 14.1 kernel.APKBUILD
I think yes, if it is not set already. You can look at other kernel APKBUILDs in pmaports repo. Also can you share your APKBUILD somewhere?
recommend me doing with LineageOS's kernel
That's what I would do, take LineageOS's kernel with their defconfig, and don't use gcc8 on old downstream kernel like those, better to use gcc6 from the start, or even gcc4.
I edited my previous comment to include my old APKBUILD.
Alright, so I switched to the LineageOS kernel and I'm getting the original "mach/msm_rtb.h" missing error. I googled "msm_rtb.h missing" and found two links:
https://github.com/sonyxperiadev/kernel/issues/2 -> Tried to apply the patch, but it seems like a really old patch. What was interesting though was that that some of the lines in the patched files were commented out in the LineageOS kernel. I'm not going to fork the LineageOS kernel to make my changes because I have a tendency to mess things up really bad.
Also, just curious, but why can't I extract the kernel that my device is currently using and use that instead of compiling a new kernel? Is it for mainlining?
Alright, so I switched to the LineageOS kernel and I'm getting the original "mach/msm_rtb.h" missing error.
https://github.com/sonyxperiadev/kernel/issues/2 -> Tried to apply the patch, but it seems like a really old patch. What was interesting though was that that some of the lines in the patched files were commented out in the LineageOS kernel. I'm not going to fork the LineageOS kernel to make my changes because I have a tendency to mess things up really bad.
It seems that you will have to patch your kernel to get it to compile. There is not much room for messing up with these include paths though, either it compiles or it does not. You also don't need to fork it. Try this guide:
This will not help, as we are not using the host distribution's compiler and toolchain, but every thing is running in an Alpine Linux chroot with pmbootstrap.
Also, just curious, but why can't I extract the kernel that my device is currently using and use that instead of compiling a new kernel? Is it for mainlining?
Because that does not really follow the free software spirit, of being able to modify everything and compile it from source. But also for practical reasons, you can't change the kernel config, and pretty much all Android kernels don't have everything enabled in their kernel configs, that is required to run postmarketOS. With that being said... using pre-built kernels might be somewhat useful for debugging, if you can't get anything else working. Related guide.
Sorry for the late reply. I haven't done the steps that you recommended yet (planning to do it over the weekend), but I recently built Cyanogenmod 12.0 for my device. When I adb shelled into my device and did uname -a, it showed that my kernel was built the same day as well. Should I continue with the LineageOS kernel, not knowing if it works well, or switch to the 12.0 kernel?
Use a kernel, that is known to be working. So Cyanogenmod 12.0 in your case. (You still need to build it from source with pmbootstrap of course, to make sure it has the right kernel config options enabled.)
Just wanted to let you know that I didn't give up on this project, but I have to take a detour and go with other projects. Hopefully I can get back to this in the future. Stay awesome!
@ollieparanoid I don't know if I should continue here or create a new one. Let me know!
Alright, so today I decided to look into why msm_rtb.h was giving me a problem. I switched to Manjaro (from Ubuntu), and still got the same problem. The only thing I changed was that I switched to the latest kernel in the repo (from 12.0 to 14.1). I decided to check pmOS's devices to see if there were devices with my SOC, and I found these two: HTC_One_XL and HTC_One_SV (Hunting and pecking for the same SOC was a chore though :P). I think there is some problem with the defconfig conversion (Idk what it's actually called. I'm still a noob :P)
HTC_One_XL. Didn't use HTC_One_SV because HTC_One_XL has the same GPU and SOC (so more similarities hopefully) and /arch/arm/include/asm/io.h (the place I was getting the error) wasn't modified, unlike HTC_One_SV.
1) CONFIG_ARCH_MSM8960=y2) (was missing from the config file :/)3) CONFIG_ARCH_MSM8960=y1) CONFIG_CPU_V7=y2) (was missing from the config file :/)3) CONFIG_CPU_V7=y1) CONFIG_CRYPTO_ECB=y2) # CONFIG_CRYPTO_ECB is not set3) CONFIG_CRYPTO_ECB=y
I'm sure there's more, but you hopefully get the idea. Something I also did was to switch to GCC4 which was mentioned on HTC_One_SV's page, but it still didn't work (I don't think it's neccessary to switch to GCC4, but I'll only switch back if it's giving me errors). HTC_One_XL's See More showed that Simon Utter had no trouble.
I had no issues what so ever building and compiling the kernel, then booting it.
Here's my log.txt (Realized the old one was slightly different). I think the config error starts on line 1463 and ends at 17182. I'm not sure what is causing it and would like some help. Thanks!
Never mind... I was stupid and figured out the last problem. I was using wget wrong and getting the website instead of the text file...
Now that fiasco is done, I started compiling with gcc4 (the up to date gcc was giving me weird errors. I switched to gcc6 and gcc4 and they both stopped on the same error I think. I'll keep it on gcc4 to hammer out the problems out right now, but let me know if this is a bad idea.)
Here are the latest errors. I'm getting a weird error from drivers/usb/gadget/android.c that I don't know what to startpage for. I've looked into the devices with the same SoCs, but they didn't get this problem. This kernel is for 14.1 android. I'm going to try the CM 12.0 right now, but I'm having a bit of trouble trying to get the tar file from a branch. I'll update if I'm successful or not. Edit: figured it out :/
log.txt
Edit: I might try different branches of the kernel later to see if this error can be avoided. For now I'll be awaiting your reply as this is the farthest I've gotten :). Super excited!
I'm now getting this error ERROR: Partition "KERNEL" does not exist in the specified PIT. I'm not sure what to do as Startpage isn't offering much. I installed heimdall, and decided to download the pit. Sure enough there was no KERNEL in the pit. I don't want to mess with it too much without help, as I don't want to brick my device.
I think heimdall print-pit should output the list of partitions on device. In samsungs it is usually called BOOT? Well, yes, boot.img goes to BOOT partition
Thanks for your help!!! It works! There's a weird red tinge on the screen, and it boot loops after a while(Edit: seems to be when I press the power button. Means screen is on 24/7), but it boots! :) Thanks for your guys' help!