[Firefox OS General] astronfestmon:
Hi there xda-developers.

I'm facing errors on porting i9300 firefox os on GonkHal.cpp.

I'm trying also porting for armv6-vfp.

So, I'll explain how i've done the things until now.

Also too for rockchip mk3066.

i9300 GonkHal.cpp error:

G/gecko/hal/gonk/GonkHal.cpp
make[6]: *** [GonkHal.o] Error 1
make[5]: *** [hal/compile] Error 2
make[4]: *** [compile] Error 2
make[3]: *** [default] Error 2
make[2]: *** [realbuild] Error 2
make[1]: *** [build] Error 2
make: *** [out/target/product/i9300/obj/DATA/gecko_intermediates/gecko] Error 2
Something went wrong. Try building manually with -j1 to get human-readable messages.

I cannot find the issue on it.

I need help.

git clone https://github.com/feherneoh/B2G.git B2G_samsung

cd B2G_samsung

replace config.sh for the following down code.

rm config.sh

./config.sh i9300

or
./config.sh spica

then

./build.sh

config.sh new file code inside:

#!/bin/bash

REPO=${REPO:-./repo}
sync_flags=""

repo_sync() {
if [ -e .repo/project.list ]
then
DIRLIST=$(cat .repo/project.list)
for PROJECT in $DIRLIST;
do
rm -rf $PROJECT
done
fi
rm -rf .repo/manifest* &&
$REPO init -u $GITREPO -b $BRANCH -m $1.xml &&
$REPO sync $sync_flags
ret=$?
if [ "$GITREPO" = "$GIT_TEMP_REPO" ]; then
rm -rf $GIT_TEMP_REPO
fi
if [ $ret -ne 0 ]; then
echo Repo sync failed
exit -1
fi
}

case `uname` in
"Darwin")
# Should also work on other BSDs
CORE_COUNT=`sysctl -n hw.ncpu`
;;
"Linux")
CORE_COUNT=`grep processor /proc/cpuinfo | wc -l`
;;
*)
echo Unsupported platform: `uname`
exit -1
esac

GITREPO=${GITREPO:-"git://github.com/vic3t3chn0/repo-manifests"}
BRANCH=${BRANCH:-b2g-cm9}

while [ $# -ge 1 ]; do
case $1 in
-d|-l|-f|-n|-c|-q)
sync_flags="$sync_flags $1"
shift
;;
--help|-h)
# The main case statement will give a usage message.
break
;;
-*)
echo "$0: unrecognized option $1" >&2
exit 1
;;
*)
break
;;
esac
done

GIT_TEMP_REPO="tmp_manifest_repo"
if [ -n "$2" ]; then
GITREPO=$GIT_TEMP_REPO
rm -rf $GITREPO &&
git init $GITREPO &&
cp $2 $GITREPO/$1.xml &&
cd $GITREPO &&
git add $1.xml &&
git commit -m "manifest" &&
git branch -m $BRANCH &&
cd ..
fi

echo MAKE_FLAGS=-j$((CORE_COUNT + 2)) > .tmp-config
echo GECKO_OBJDIR=$PWD/objdir-gecko >> .tmp-config
echo DEVICE_NAME=$1 >> .tmp-config

case "$1" in
"anzu")
echo DEVICE=anzu >> .tmp-config &&
echo LUNCH=full_anzu-eng >> .tmp-config &&
repo_sync $1
;;
"aoba")
echo DEVICE=aoba >> .tmp-config &&
echo LUNCH=full_aoba-eng >> .tmp-config &&
repo_sync $1
;;
"c800")
echo DEVICE=c800 >> .tmp-config &&
echo LUNCH=full_c800-eng >> .tmp-config &&
repo_sync $1
;;
"coconut")
echo DEVICE=coconut >> .tmp-config &&
echo LUNCH=full_coconut-eng >> .tmp-config &&
repo_sync $1
;;
"e400")
echo DEVICE=e400 >> .tmp-config &&
echo LUNCH=full_e400-eng >> .tmp-config &&
repo_sync $1
;;
"e739")
echo DEVICE=e739 >> .tmp-config &&
echo LUNCH=full_e739-eng >> .tmp-config &&
repo_sync $1
;;
"es209ra")
echo DEVICE=es209ra >> .tmp-config &&
echo LUNCH=es209ra-eng >> .tmp-config &&
repo_sync $1
;;
"haida")
echo DEVICE=haida >> .tmp-config &&
echo LUNCH=full_haida-eng >> .tmp-config &&
repo_sync $1
;;
"hallon")
echo DEVICE=hallon >> .tmp-config &&
echo LUNCH=full_hallon-eng >> .tmp-config &&
repo_sync $1
;;
"hikari")
echo DEVICE=hikari >> .tmp-config &&
echo LUNCH=full_hikari-eng >> .tmp-config &&
repo_sync $1
;;
"iyokan")
echo DEVICE=iyokan >> .tmp-config &&
echo LUNCH=full_iyokan-eng >> .tmp-config &&
repo_sync $1
;;
"i9000")
echo DEVICE=galaxysmtd >> .tmp-config &&
echo LUNCH=full_galaxysmtd-eng >> .tmp-config &&
repo_sync $1
;;
"i9300")
echo DEVICE=i9300 >> .tmp-config &&
echo LUNCH=full_i9300-eng >> .tmp-config &&
repo_sync $1
;;
"kumquat")
echo DEVICE=kumquat >> .tmp-config &&
echo LUNCH=full_kumquat-eng >> .tmp-config &&
repo_sync $1
;;
"kumquat_ste")
echo DEVICE=kumquat >> .tmp-config &&
echo LUNCH=full_kumquat-eng >> .tmp-config &&
repo_sync $1
;;
"lotus")
echo DEVICE=lotus >> .tmp-config &&
echo LUNCH=full_lotus-eng >> .tmp-config &&
repo_sync $1
;;
"lotus_ste")
echo DEVICE=lotus >> .tmp-config &&
echo LUNCH=full_lotus-eng >> .tmp-config &&
repo_sync $1
;;
"mango")
echo DEVICE=mango >> .tmp-config &&
echo LUNCH=full_mango-eng >> .tmp-config &&
repo_sync $1
;;
"nozomi")
echo DEVICE=nozomi >> .tmp-config &&
echo LUNCH=full_nozomi-eng >> .tmp-config &&
repo_sync $1
;;
"nypon")
echo DEVICE=nypon >> .tmp-config &&
echo LUNCH=full_nypon-eng >> .tmp-config &&
repo_sync $1
;;
"nypon_ste")
echo DEVICE=nypon >> .tmp-config &&
echo LUNCH=full_nypon-eng >> .tmp-config &&
repo_sync $1
;;
"p700")
echo DEVICE=p700 >> .tmp-config &&
echo LUNCH=full_p700-eng >> .tmp-config &&
repo_sync $1
;;
"p3110")
echo DEVICE=p3110 >> .tmp-config &&
echo LUNCH=full_p3110-eng >> .tmp-config &&
repo_sync $1
;;
"pepper")
echo DEVICE=pepper >> .tmp-config &&
echo LUNCH=full_pepper-eng >> .tmp-config &&
repo_sync $1
;;
"pepper_ste")
echo DEVICE=pepper >> .tmp-config &&
echo LUNCH=full_pepper-eng >> .tmp-config &&
repo_sync $1
;;
"satsuma")
echo DEVICE=satsuma >> .tmp-config &&
echo LUNCH=full_satsuma-eng >> .tmp-config &&
repo_sync $1
;;
"smultron")
echo DEVICE=smultron >> .tmp-config &&
echo LUNCH=full_smultron-eng >> .tmp-config &&
repo_sync $1
;;
"urushi")
echo DEVICE=urushi >> .tmp-config &&
echo LUNCH=full_urushi-eng >> .tmp-config &&
repo_sync $1
;;
"zeus")
echo DEVICE=zeus >> .tmp-config &&
echo LUNCH=full_zeus-eng >> .tmp-config &&
repo_sync $1
;;
"zeusc")
echo DEVICE=zeusc >> .tmp-config &&
echo LUNCH=full_zeusc-eng >> .tmp-config &&
repo_sync $1
;;

"spica")
echo DEVICE=spica >> .tmp-config &&
echo LUNCH=full_spica-eng >> .tmp-config &&
repo_sync $1
;;
"wave")
echo DEVICE=wave >> .tmp-config &&
echo LUNCH=full_wave-eng >> .tmp-config &&
repo_sync $1
;;
*)
echo "Usage: $0 [-cdflnq] (device name)"
echo "Flags are passed through to |./repo sync|."
echo
echo Valid devices to configure are:
echo +--LG
echo - c800
echo - e400
echo - e739
echo - p700
echo +--Sony Ericsson
echo - anzu
echo - coconut
echo - es209ra
echo - haida
echo - hallon
echo - iyokan
echo - mango
echo - satsuma
echo - smultron
echo - urushi
echo - zeus
echo - zeusc
echo +--Sony
echo - aoba
echo - hikari
echo - kumquat
echo - kumquat_ste
echo - lotus
echo - lotus_ste
echo - nozomi
echo - nypon
echo - nypon_ste
echo - pepper
echo - pepper_ste
echo +--Samsung
echo - i9000
echo - i9300
echo - p3110
echo - spica
echo - wave
exit -1
;;
esac

if [ $? -ne 0 ]; then
echo Configuration failed
exit -1
fi

mv .tmp-config .config
./patch.sh
echo Run \|./build.sh\| to start building

armv6 and armv6-vfp code:

armv6.mk:

# Configuration for Linux on ARM.
# Generating binaries for the ARMv6 architecture and higher
#
ARCH_ARM_HAVE_THUMB_SUPPORT := true
ARCH_ARM_HAVE_FAST_INTERWORKING := true
ARCH_ARM_HAVE_64BIT_DATA := true
ARCH_ARM_HAVE_HALFWORD_MULTIPLY := true
ARCH_ARM_HAVE_CLZ := true
ARCH_ARM_HAVE_FFS := true

# Note: Hard coding the 'tune' value here is probably not ideal,
# and a better solution should be found in the future.
#
arch_variant_cflags := \
-march=armv6 \
-mtune=xscale \
-D__ARM_ARCH_6__ \
-D__ARM_ARCH_6T__ \
-D__ARM_ARCH_6E__ \
-D__ARM_ARCH_6TE__

armv6-vfp code:

# At the moment, use the same settings than the one
# for armv6, since TARGET_ARCH_VARIANT := armv6-vfp
# will only be used to select an optimized VFP-capable assembly
# interpreter loop for Dalvik.
#
include $(BUILD_COMBOS)/arch/arm/armv6.mk

Copy this two .mk files into build/combo/arch/arm

We all need to try to build with my config.sh then reply all issues in this topic thread.

For rockchip rk3066:

git clone https://github.com/vic3t3chn0/radxa_rock_android.git rk3066

cd rk3066

rm -rf device && rm -rf abi

git clone https://github.com/mozilla-b2g/gaia.git gaia

git clone https://github.com/mozilla/gecko-dev.git gecko

then:
git clone https://github.com/vic3t3chn0/b2g_rk3066 b2g_rk3066

move whole folders inside b2g_rk3066 into rk3066

. build/envsetup.sh

lunch rk31sdk-eng

make

Thank you all.