andreasgal / B2G

Boot to Gecko aims to create a complete, standalone operating system for the open web.
https://wiki.mozilla.org/B2G
909 stars 158 forks source link

make config-galaxy-s2 cp fails #247

Open mikeaich opened 12 years ago

mikeaich commented 12 years ago

With a recent 'make sync', I started seeing the following error on a clean build when running the 'make config-galaxy-s2' step:

cp: cannot create regular file `../../../vendor/samsung/c1-common/proprietary/etc/mdnie_tune_bypass_mode': No such file or directory

I tracked it down to copy_file() in .../gonk/device/samsung/galaxys2/extract-files.sh.

Fix:

diff --git a/extract-files.sh b/extract-files.sh
index 5f6cc0b..69e01af 100755
--- a/extract-files.sh
+++ b/extract-files.sh
@@ -132,14 +132,18 @@ EOF
 # $4 = directory name in $PROPRIETARY_COMMON_DIR
 copy_file()
 {
-    echo Pulling \"$1\"
     if [[ -z "${ANDROIDFS_DIR}" ]]; then
+           echo Pulling \"$1\"
         adb pull /$3/$1 $PROPRIETARY_COMMON_DIR/$4/$2
     else
            # Hint: Uncomment the next line to populate a fresh ANDROIDFS_DIR
            #       (TODO: Make this a command-line option or something.)
            # adb pull /$3/$1 ${ANDROIDFS_DIR}/$3/$1
-        cp ${ANDROIDFS_DIR}/$3/$1 $PROPRIETARY_COMMON_DIR/$4/$2
+               echo Copying \"$1\"
+               local TARGET=$PROPRIETARY_COMMON_DIR/$4/$2
+               local TARGET_DIR=$(dirname "$TARGET")
+               mkdir -p $TARGET_DIR
+        cp ${ANDROIDFS_DIR}/$3/$1 $TARGET
     fi

     if [[ -f $PROPRIETARY_COMMON_DIR/$4/$2 ]]; then
arky commented 12 years ago

Workaround: mkdir glue/gonk/vendor/samsung/c1-common/proprietary/etc

https://github.com/andreasgal/B2G/issues/249#issuecomment-4752818

mikeaich commented 12 years ago

Yeah--I've got a pull-req waiting on a fix: https://github.com/cgjones/android_device_samsung_galaxys2/pull/24