Skip to content

Commit

Permalink
Add support for akami (followup: add modifications to existing files)
Browse files Browse the repository at this point in the history
  • Loading branch information
joneschrisg committed Feb 6, 2012
1 parent 3586115 commit 6f1857f
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 7 deletions.
33 changes: 31 additions & 2 deletions Makefile
Expand Up @@ -248,6 +248,16 @@ config-maguro: config-gecko adb-check-version
./extract-files.sh && \
echo OK

.PHONY: config-akami
config-akami: config-gecko
@echo "KERNEL = msm" > .config.mk && \
echo "KERNEL_PATH = ./boot/msm" >> .config.mk && \
echo "GONK = akami" >> .config.mk && \
cd $(GONK_PATH)/device/toro/akami && \
echo Extracting binary blobs from device, which should be plugged in! ... && \
./extract-files.sh && \
echo OK

.PHONY: config-gecko
config-gecko:
@ln -sf $(PWD)/config/gecko-prof-gonk $(GECKO_PATH)/mozconfig
Expand Down Expand Up @@ -331,12 +341,21 @@ flash-only-galaxys2: adb-check-version
flash-maguro: image flash-only-maguro

.PHONY: flash-only-maguro
flash-only-maguro:
flash-only-maguro: flash-only-toro

.PHONY: flash-akami
flash-akami: image flash-only-akami

.PHONY: flash-only-akami
flash-only-akami: flash-only-toro

.PHONY: flash-only-toro
flash-only-toro:
@$(call GONK_CMD, \
adb reboot bootloader && \
$(FASTBOOT) devices && \
$(FASTBOOT) erase userdata && \
$(FASTBOOT) flash userdata ./out/target/product/maguro/userdata.img && \
$(FASTBOOT) flash userdata ./out/target/product/$(GONK)/userdata.img && \
$(FASTBOOT) flashall)

.PHONY: bootimg-hack
Expand All @@ -356,6 +375,7 @@ kernel-%:
@

OUT_DIR := $(GONK_PATH)/out/target/product/$(GONK)/system
DATA_OUT_DIR := $(GONK_PATH)/out/target/product/$(GONK)/data
APP_OUT_DIR := $(OUT_DIR)/app

$(APP_OUT_DIR):
Expand All @@ -374,8 +394,17 @@ gecko-install-hack: gecko
.PHONY: gaia-hack
gaia-hack: gaia
rm -rf $(OUT_DIR)/home
ifneq (akami,$(GONK))
mkdir -p $(OUT_DIR)/home
cp -r gaia/* $(OUT_DIR)/home
else
mkdir -p $(OUT_DIR)
ln -s /data/home $(OUT_DIR)/home
rm -rf $(DATA_OUT_DIR)/home
mkdir -p $(DATA_OUT_DIR)/home
cp -r gaia/* $(DATA_OUT_DIR)/home
mkdir -p $(OUT_DIR)
endif
rm -rf $(OUT_DIR)/b2g/defaults/profile
mkdir -p $(OUT_DIR)/b2g/defaults
cp -r gaia/profile $(OUT_DIR)/b2g/defaults
Expand Down
4 changes: 0 additions & 4 deletions glue/gonk/device/toro/maguro/BoardConfig.mk
Expand Up @@ -74,10 +74,6 @@ BOARD_KERNEL_SPARESIZE := 128
BOARD_HAS_8BIT_BCHECC_SUPPORT := true
BOARD_KERNEL_BCHECC_SPARESIZE := 160

# Support to build images for 2K NAND page
BOARD_SUPPORTS_2KNAND_PAGE := true
BOARD_KERNEL_2KPAGESIZE := 2048
BOARD_KERNEL_2KSPARESIZE := 64
TARGET_USERIMAGES_USE_EXT4 := true
TARGET_USES_UNCOMPRESSED_KERNEL := true

Expand Down
2 changes: 1 addition & 1 deletion glue/gonk/device/toro/maguro/rootdir/init.qcom.rc
Expand Up @@ -156,7 +156,7 @@ service cnd /system/bin/cnd

service rmt_storage /system/bin/rmt_storage /dev/block/mmcblk0p10 /dev/block/mmcblk0p11 /dev/block/mmcblk0p17
user root
# disabled
disabled

on property:ro.emmc=1
start rmt_storage
Expand Down
19 changes: 19 additions & 0 deletions glue/gonk/device/toro/maguro/rootdir/init.rc
Expand Up @@ -90,6 +90,20 @@ loglevel 3
write /dev/cpuctl/bg_non_interactive/cpu.shares 52

on fs
# mount mtd partitions
# Mount /system rw first to give the filesystem a chance to save a checkpoint
mount yaffs2 mtd@system /system
mount yaffs2 mtd@system /system ro remount
mount yaffs2 mtd@userdata /data nosuid nodev
mount yaffs2 mtd@persist /persist nosuid nodev
mount yaffs2 mtd@cache /cache nosuid nodev
mount yaffs2 mtd@persist /persist nosuid nodev
#if we have a fat.img, bind it to loop7
exec /system/xbin/fatimgcheck
losetup /dev/block/loop7 /data/fat.img

on emmc-fs
# mount mmc partitions
wait /dev/block/mmcblk0p12
mount ext4 /dev/block/mmcblk0p12 /system ro barrier=1
wait /dev/block/mmcblk0p13
Expand All @@ -106,6 +120,11 @@ on post-fs
chown system system /data
chmod 0771 /data

# Mounting of persist is moved to 'on emmc-fs' and 'on fs' sections
# We chown/chmod /persist again so because mount is run as root + defaults
chown system system /persist
chmod 0771 /persist

# Create dump dir and collect dumps.
# Do this before we mount cache so eventually we can use cache for
# storing dumps on platforms which do not have a dedicated dump partition.
Expand Down

0 comments on commit 6f1857f

Please sign in to comment.