• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Permissions issues during build

Status
Not open for further replies.

JerryScript

Android Expert
I just started building a kernel for the SPH-L300 from Samsung's JB-MC1 source. This is my first time building a kernel, in my other projects I left kernel development to other team members and concentrate on device folders and UI imrpovements, never had the issue I'm dealing with now.

The only way I can get a build to complete is by running the following list of commands:

export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=~/android/arm-eabi-4.6/bin/arm-eabi-
make clean
make mrproper
make VaeVictus_defconfig
make oldconfig
sudo chown -R jerryscript:jerryscript ~/android/source/Kernel
sudo chmod a+x -R ~/anrdoid/source/Kernel
make ARCH=arm SUBARCH=arm CROSS_COMPILE=~/android/arm-eabi-4.6/bin/arm-eabi-

If I don't chown and chmod before the final make, I get errors where python says no such file or directory. Looking through the folders, I noticed that all the files were locked, and the only way to make changes is via sudo gedit.

Which part of my build environment might I have a owner/permissions problem with, if everytime I run a buid, the files generated by the build process are not accessible due to owner/permission problems? Any ideas how to fix it? For now, at least the build is finishing, and the kernel runs smooth as silk.

BTW- I'm using Ubuntu 12.04 and the Linaro4.6 toolchain if that makes any difference. Github is JerryScript/VaeVictus
 
I just started building a kernel for the SPH-L300 from Samsung's JB-MC1 source. This is my first time building a kernel, in my other projects I left kernel development to other team members and concentrate on device folders and UI imrpovements, never had the issue I'm dealing with now.

The only way I can get a build to complete is by running the following list of commands:

export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=~/android/arm-eabi-4.6/bin/arm-eabi-
make clean
make mrproper
make VaeVictus_defconfig
make oldconfig
sudo chown -R jerryscript:jerryscript ~/android/source/Kernel
sudo chmod a+x -R ~/anrdoid/source/Kernel
make ARCH=arm SUBARCH=arm CROSS_COMPILE=~/android/arm-eabi-4.6/bin/arm-eabi-

If I don't chown and chmod before the final make, I get errors where python says no such file or directory. Looking through the folders, I noticed that all the files were locked, and the only way to make changes is via sudo gedit.

Which part of my build environment might I have a owner/permissions problem with, if everytime I run a buid, the files generated by the build process are not accessible due to owner/permission problems? Any ideas how to fix it? For now, at least the build is finishing, and the kernel runs smooth as silk.

BTW- I'm using Ubuntu 12.04 and the Linaro4.6 toolchain if that makes any difference. Github is JerryScript/VaeVictus

Look at the ~android/source/kernel with "ls -l" and see who is the listed owner of the directory. I bet there is some setup process that's causing it to be owned by another user. I bet it's root by using "sudo"
 
I've checked over and over, before, during, and after, and it always shows my username as the owner. There's got to be a process, python is my suspect right now because it throws the errors, that is messing with owners or permissions on files. Otherwise, why would a chown/chmod solve the issue?

My theory is that it has to do with the temp files, still trying to catch the bug in the act.
 
I have written some kernel makers in the past. May want to check out the following

https://github.com/g60madman/htcdev_kernel_builder

Its an easy script you just need to change some settings based on the kernel for goghvmu

Line 90 needs to be edited
https://github.com/g60madman/htcdev_kernel_builder/blob/master/buildkernel.sh#L90

Based on the following
https://github.com/vmobi-goghvmu/an...ommon/blob/jellybean/BoardConfigCommon.mk#L68

And this commit
https://github.com/vmobi-goghvmu/an...ommon/blob/jellybean/BoardConfigCommon.mk#L69

Also you will need to edit the following line based on partitions for the goghvmu
https://github.com/g60madman/htcdev...META-INF/com/google/android/updater-script#L3

Once you get that edited should be a breeze to build a kernel and kick out a flashable zip. If you run into issues let me know. Since I'm not deving as Steve from cm is working on the S4 I have some free time these days :D
 
Thanks, I'll check that out. I'm new to building kernels, had other team members do it on other phones in the past. I appreciate the help. I'm currently using AndroidKitchen to pack the boot.img, the rest is just in a shell script to build the kernel (I hate typing commands over and over).

I'm still not sure what my permissions issue is. All the documents in my Kernel source tree are locked, even after running sudo chown and chmod. I've overlooked something, been missing too much sleep learning to build the kernel. ;)
 
Thanks, I'll check that out. I'm new to building kernels, had other team members do it on other phones in the past. I appreciate the help. I'm currently using AndroidKitchen to pack the boot.img, the rest is just in a shell script to build the kernel (I hate typing commands over and over).

I'm still not sure what my permissions issue is. All the documents in my Kernel source tree are locked, even after running sudo chown and chmod. I've overlooked something, been missing too much sleep learning to build the kernel. ;)

Get used to it. I, like most, know what it's like to have the feeling the fix is right around the corner.
 
Get used to it. I, like most, know what it's like to have the feeling the fix is right around the corner.
I know exactly what you mean. I remember a couple of years back when I was working with the InferiorHumanOrgans dev team, we couldn't get charging to work right on CM7 for the OptimusV. Five of us worked on it for more than a week, then I noticed we had a service out of order in init.rc (was checking against stock when I finally noticed). It was a big deal because the OV suffered from kernel panic, and if you had a reboot when charging, it would go into offline charging mode, which sucked if you charged overnight and had a crash.

Sometimes I wish there was a manual to follow, but then dev'ing wouldn't be so fun! :p
 
Foggy memory fragments coming through....visions of my computer screen glowing in the dark late at night...."I'll download everything for the build environment while still in Windows and burn the Ubuntu ISO"...."mthrfkr why does upgrading mesa always bork my ununtu desktop?!?"...."ok, gotta enable networking and switch terminals at boot, try startx, check error message, apt-get install ubuntu-desktop, reboot, Finally!!!"...."Why the fk can't I copy those download files from my Windows mount?!?"...sudo cp /media/10924....13429/users/jerry/desktop/victory/downloads/*...."Why is python not able to view those build files?!?"...."WTF all the files are locked, sudo chown -R jerryscript:jerryscript /source && chmod a+x -R /source"...."again?!?, sudo chown -R jerryscript:jerryscript /source && chmod a+x -R /source"...."ok, what the hell?!? again?!? sudo chown -R jerryscript:jerryscript /source && chmod a+x -R /source"....

Do I have to open a root terminal to fix this?
 
Where is kernel at? Is it on github? I can take a look at it and also set you up with a the build kernel app and get it working for the Victory.
 
I don't have any issues building the kernel, so long as I chown and chmod my entire /Kernel tree before running a build, after make clean and mrproper. If I don't chown/chmod, the build errors out due to file access.

The git is JerryScript/VaeVictus. You can see the diff between the last two huge commits, though I'm not sure it will point to my issue with my /Kernel tree.

Here's my build script:
PHP:
#/bin/sh 

echo "Preparing to build VaeVictus"
echo " a kernel for the SPH-L300 goghvmu"
echo " Virgin Mobile Galaxy Victory"
echo " "
echo "Setting environment variables..."
echo " "
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=~/android/arm-eabi-4.6/bin/arm-eabi-

echo " "
echo "Running make clean and make mrproper..."
echo " "
make clean
make mrproper

echo " "
echo "Setting configuration files..."
echo " "
make VaeVictus_defconfig
make oldconfig

echo " "
echo "Repairing filesystem..."
echo " "
sudo chown -R jerryscript:jerryscript ~/android/source/Kernel
sudo chmod a+x -R ~/anrdoid/source/Kernel

echo " "
echo "Beginning actual build..."
echo " "
make ARCH=arm SUBARCH=arm CROSS_COMPILE=~/android/arm-eabi-4.6/bin/arm-eabi- -j4

echo " "
echo "Build complete."
echo " "
echo "If there were no errors, grab /Kernel/arch/arm/boot/zImage"
echo " "
Users are loving the kernel, thanks in large part to rbheromax helping me figure out the frequency tables for overclocking. Even the builds before adding OC modules had reports from users of being much smoother than stock (Linaro maybe?). ;)

I'm just stumped on why most of the files remain locked and I have to chown/chmod the Kernel tree before each build?!?
 
Status
Not open for further replies.
Back
Top Bottom