1. Are you ready for the Galaxy S20? Here is everything we know so far!
Thread Status:
Not open for further replies.

Permissions issues during build

Discussion in 'Archived Threads' started by JerryScript, Jul 23, 2013.

  1. JerryScript

    JerryScript Android Expert
    Thread Starter

    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

    1. Download the Forums for Android™ app!


  2. dsmryder

    dsmryder Android Expert

    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"
  3. JerryScript

    JerryScript Android Expert
    Thread Starter

    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.
  4. g60madman

    g60madman Guest

    I have written some kernel makers in the past. May want to check out the following


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

    Line 90 needs to be edited

    Based on the following

    And this commit

    Also you will need to edit the following line based on partitions for the goghvmu

    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
  5. JerryScript

    JerryScript Android Expert
    Thread Starter

    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. ;)
  6. dsmryder

    dsmryder Android Expert

    Get used to it. I, like most, know what it's like to have the feeling the fix is right around the corner.
  7. JerryScript

    JerryScript Android Expert
    Thread Starter

    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
  8. JerryScript

    JerryScript Android Expert
    Thread Starter

    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?
  9. g60madman

    g60madman Guest

    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.
  10. JerryScript

    JerryScript Android Expert
    Thread Starter

    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:
    1. #/bin/sh
    3. echo "Preparing to build VaeVictus"
    4. echo " a kernel for the SPH-L300 goghvmu"
    5. echo " Virgin Mobile Galaxy Victory"
    6. echo " "
    7. echo "Setting environment variables..."
    8. echo " "
    9. export ARCH=arm
    10. export SUBARCH=arm
    11. export CROSS_COMPILE=~/android/arm-eabi-4.6/bin/arm-eabi-
    13. echo " "
    14. echo "Running make clean and make mrproper..."
    15. echo " "
    16. make clean
    17. make mrproper
    19. echo " "
    20. echo "Setting configuration files..."
    21. echo " "
    22. make VaeVictus_defconfig
    23. make oldconfig
    25. echo " "
    26. echo "Repairing filesystem..."
    27. echo " "
    28. sudo chown -R jerryscript:jerryscript ~/android/source/Kernel
    29. sudo chmod a+x -R ~/anrdoid/source/Kernel
    31. echo " "
    32. echo "Beginning actual build..."
    33. echo " "
    34. make ARCH=arm SUBARCH=arm CROSS_COMPILE=~/android/arm-eabi-4.6/bin/arm-eabi- -j4
    36. echo " "
    37. echo "Build complete."
    38. echo " "
    39. echo "If there were no errors, grab /Kernel/arch/arm/boot/zImage"
    40. 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?!?

Share This Page