Skip to content
This repository has been archived by the owner on Dec 28, 2020. It is now read-only.

Commit

Permalink
first bootable.
Browse files Browse the repository at this point in the history
  • Loading branch information
jjm2473 committed Mar 24, 2019
1 parent 4c067ab commit 8dc3349
Show file tree
Hide file tree
Showing 67 changed files with 2,449 additions and 0 deletions.
Empty file added root/android/.gitkeep
Empty file.
Binary file added root/etc/init
Binary file not shown.
Binary file added root/lib/ld-2.19.so
Binary file not shown.
1 change: 1 addition & 0 deletions root/lib/ld-linux-aarch64.so.1
Binary file added root/lib/libc-2.19.so
Binary file not shown.
1 change: 1 addition & 0 deletions root/lib/libc.so.6
33 changes: 33 additions & 0 deletions root/lib/preinit/45_mount_overlayfs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/sh
# Copyright (C) 2010 OpenWrt.org

do_mount_overlayfs() {
if [ -e /rom/note ]; then
DEV_ETC=`blkid -L nasetc`
if [ -n "$DEV_ETC" ]; then
fsck -t ext4 -y $DEV_ETC || \
fsck.ext4 -y $DEV_ETC
resize2fs $DEV_ETC
sync
mount -t ext4 -L nasetc /overlay && \
echo 'ext4 etc mounted!' > /dev/console || \
echo 'Failed to mount ext4 etc!' > /dev/console
fi

mkdir -p /overlay/upper /overlay/work
mount -o noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work -t overlay "overlayfs:/overlay" /mnt \
|| return -1

# pivot
mount --move /proc /mnt/proc

pivot_root /mnt /mnt/rom || return -1

mount --move /rom/dev /dev
mount --move /rom/tmp /tmp
mount --move /rom/sys /sys
mount --move /rom/overlay /overlay
fi
}

boot_hook_add preinit_mount_root do_mount_overlayfs
Empty file added root/mnt/android/.gitkeep
Empty file.
Empty file added root/mnt/android/.ottwifi
Empty file.
1 change: 1 addition & 0 deletions root/mnt/android/bugreports
1 change: 1 addition & 0 deletions root/mnt/android/charger
1 change: 1 addition & 0 deletions root/mnt/android/d
32 changes: 32 additions & 0 deletions root/mnt/android/default.prop
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#
# ADDITIONAL_DEFAULT_PROPERTIES
#
ro.secure=0
ro.allow.mock.location=1
ro.debuggable=1
ro.zygote=zygote32
pm.dexopt.first-boot=verify-at-runtime
pm.dexopt.boot=verify-at-runtime
pm.dexopt.install=interpret-only
pm.dexopt.bg-dexopt=speed-profile
pm.dexopt.ab-ota=speed-profile
pm.dexopt.nsys-library=speed
pm.dexopt.shared-apk=speed
pm.dexopt.forced-dexopt=speed
pm.dexopt.core-app=speed
dalvik.vm.image-dex2oat-Xms=64m
dalvik.vm.image-dex2oat-Xmx=64m
dalvik.vm.dex2oat-Xms=64m
dalvik.vm.dex2oat-Xmx=512m
ro.dalvik.vm.native.bridge=0
dalvik.vm.usejit=true
dalvik.vm.usejitprofiles=true
dalvik.vm.appimageformat=lz4
debug.atrace.tags.enableflags=0
#
# BOOTIMAGE_BUILD_PROPERTIES
#
ro.bootimage.build.date=2019年 01月 24日 星期四 17:44:33 CST
ro.bootimage.build.date.utc=1548323073
ro.bootimage.build.fingerprint=realtek/rtk_kylin32/kylin32:7.1.1/N9F27C/jiangb01241744:eng/test-keys
persist.sys.usb.config=adb
1 change: 1 addition & 0 deletions root/mnt/android/etc
Binary file added root/mnt/android/file_contexts.bin
Binary file not shown.
30 changes: 30 additions & 0 deletions root/mnt/android/fstab.kylin.emmc
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Android fstab file.
#<src> <mnt_point> <type> <mnt_flags> <fs_mgr_flags>
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK

/dev/block/mmcblk0p1 /system ext4 ro,noatime wait
#/dev/block/mmcblk0p5 /vendor ext4 ro,noatime wait
/dev/block/mmcblk0p3 /cache ext4 rw,noatime,nosuid,nodev,journal_checksum,errors=continue,data_err=ignore,discard wait
#/dev/block/mmcblk0p2 /data ext4 rw,noatime,nosuid,nodev,journal_checksum,errors=continue,data_err=ignore,discard wait,forceencrypt=/cache/data-MD1
/dev/block/mmcblk0p2 /data ext4 rw,noatime,nosuid,nodev,journal_checksum,errors=continue,data_err=ignore,discard wait,encryptable=/cache/data-MD1
#/dev/block/mmcblk0p2 /data ext4 rw,noatime,nosuid,nodev,journal_checksum,errors=continue,data_err=ignore,discard wait
#
# apply emmc_swap first, zram@500MB
/dev/block/zram0 none swap defaults zramsize=524288000,swapprio=30
# mount emmc_swap partition
#
# OHCI
/devices/platform/98013400.ohci/usb* auto auto defaults voldmanaged=usb:auto,encryptable=userdata
# EHCI
/devices/platform/98013000.ehci/usb* auto auto defaults voldmanaged=usb:auto,encryptable=userdata
# XHCI U2
/devices/platform/98013c00.rtk_dwc3_u2host/*/usb* auto auto defaults voldmanaged=usb:auto,encryptable=userdata
# XHCI U3
/devices/platform/98013e00.rtk_dwc3_u3host/*/usb* auto auto defaults voldmanaged=usb:auto,encryptable=userdata
# XHCI Type C
/devices/platform/98013200.rtk_dwc3_drd/*/usb* auto auto defaults voldmanaged=usb:auto,encryptable=userdata
# SD Card
/devices/platform/98000000.sdmmc/*/mmc* auto auto defaults voldmanaged=sdcard1:auto,encryptable=userdata
# SATA
/devices/platform/9803f000.sata/ata* auto auto defaults voldmanaged=sata:auto,encryptable=userdata
26 changes: 26 additions & 0 deletions root/mnt/android/fstab.kylin.sata
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Android fstab file.
#<src> <mnt_point> <type> <mnt_flags> <fs_mgr_flags>
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK

/dev/block/sataa19 /system ext4 ro,noatime wait
#/dev/block/sataa20 /data ext4 rw,noatime,nosuid,nodev,journal_checksum,errors=continue,data_err=ignore,discard wait,forceencrypt=/cache/data-MD1
#/dev/block/sataa20 /data ext4 rw,noatime,nosuid,nodev,journal_checksum,errors=continue,data_err=ignore,discard wait,encryptable=/cache/data-MD1
/dev/block/sataa20 /data ext4 rw,noatime,nosuid,nodev,journal_checksum,errors=continue,data_err=ignore,discard wait
/dev/block/sataa21 /cache ext4 rw,noatime,nosuid,nodev,journal_checksum,errors=continue,data_err=ignore,discard wait
/dev/block/zram0 none swap defaults zramsize=524288000,swapprio=30

# OHCI
/devices/platform/98013400.ohci/usb* auto auto defaults voldmanaged=usb:auto,encryptable=userdata
# EHCI
/devices/platform/98013000.ehci/usb* auto auto defaults voldmanaged=usb:auto,encryptable=userdata
# XHCI U2
/devices/platform/98013c00.rtk_dwc3_u2host/*/usb* auto auto defaults voldmanaged=usb:auto,encryptable=userdata
# XHCI U3
/devices/platform/98013e00.rtk_dwc3_u3host/*/usb* auto auto defaults voldmanaged=usb:auto,encryptable=userdata
# XHCI Type C
/devices/platform/98013200.rtk_dwc3_drd/*/usb* auto auto defaults voldmanaged=usb:auto,encryptable=userdata
# SD Card
/devices/platform/98000000.sdmmc/*/mmc* auto auto defaults voldmanaged=sdcard1:auto,encryptable=userdata
# SATA
/devices/platform/9803f000.sata/ata* auto auto defaults voldmanaged=sata:auto,encryptable=userdata
25 changes: 25 additions & 0 deletions root/mnt/android/fstab.kylin.xen
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Android fstab file.
#<src> <mnt_point> <type> <mnt_flags> <fs_mgr_flags>
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK

/dev/block/xvda1 /system ext4 ro,noatime wait
/dev/block/xvda5 /vendor ext4 ro,noatime wait
/dev/block/xvda3 /cache ext4 rw,noatime,nosuid,nodev,journal_checksum,errors=continue,data_err=ignore,discard wait
/dev/block/xvda2 /data ext4 rw,noatime,nosuid,nodev,journal_checksum,errors=continue,data_err=ignore,discard wait
/dev/block/zram0 none swap defaults zramsize=524288000,swapprio=30

# OHCI
/devices/platform/passthrough/98013400.ohci/usb* auto auto defaults voldmanaged=usb:auto,encryptable=userdata
# EHCI
/devices/platform/passthrough/98013000.ehci/usb* auto auto defaults voldmanaged=usb:auto,encryptable=userdata
# XHCI U2
/devices/platform/passthrough/98013c00.rtk_dwc3_u2host/*/usb* auto auto defaults voldmanaged=usb:auto,encryptable=userdata
# XHCI U3
/devices/platform/passthrough/98013e00.rtk_dwc3_u3host/*/usb* auto auto defaults voldmanaged=usb:auto,encryptable=userdata
# XHCI Type C
/devices/platform/passthrough/98013200.rtk_dwc3_drd/*/usb* auto auto defaults voldmanaged=usb:auto,encryptable=userdata
# SD Card
/devices/platform/passthrough/98000000.sdmmc/*/mmc* auto auto defaults voldmanaged=sdcard1:auto,encryptable=userdata
# SATA
/devices/platform/passthrough/9803f000.sata/ata* auto auto defaults voldmanaged=sata:auto,encryptable=userdata
Binary file added root/mnt/android/init
Binary file not shown.
3 changes: 3 additions & 0 deletions root/mnt/android/init.e2fsck.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/sbin/e2fsck -y -f /dev/block/mmcblk0p1
/sbin/e2fsck -y -f /dev/block/mmcblk0p2
/sbin/e2fsck -y -f /dev/block/mmcblk0p3
18 changes: 18 additions & 0 deletions root/mnt/android/init.emmc.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
on early-init
symlink /fstab.kylin.emmc /fstab.kylin
symlink /sys.part.rc.emmc /sys.part.rc

on init

on early-fs

on fs

on post-fs

on post-fs-data

on early-boot

on boot

12 changes: 12 additions & 0 deletions root/mnt/android/init.environ.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# set up the global environment
on init
export ANDROID_BOOTLOGO 1
export ANDROID_ROOT /system
export ANDROID_ASSETS /system/app
export ANDROID_DATA /data
export ANDROID_STORAGE /storage
export EXTERNAL_STORAGE /sdcard
export ASEC_MOUNTPOINT /mnt/asec
export BOOTCLASSPATH /system/framework/core-oj.jar:/system/framework/core-libart.jar:/system/framework/conscrypt.jar:/system/framework/okhttp.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/ims-common.jar:/system/framework/apache-xml.jar:/system/framework/org.apache.http.legacy.boot.jar
export SYSTEMSERVERCLASSPATH /system/framework/services.jar:/system/framework/ethernet-service.jar:/system/framework/wifi-service.jar

29 changes: 29 additions & 0 deletions root/mnt/android/init.fschk.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

on init
start mk_emmc_swap
start ext4resize
wait /rtk/ext4resize.done 5
#start e2fsck
#wait /rtk/e2fsck.done 60

service mk_emmc_swap /sbin/mk_emmc_swap.sh
class core
user root
group root
disabled
oneshot
seclabel u:r:realtek:s0

service ext4resize /sbin/ext4resize.sh
class core
user root
group root
disabled
oneshot
seclabel u:r:realtek:s0

service e2fsck /sbin/e2fsck.sh
class core
oneshot
disabled
seclabel u:r:realtek:s0
Loading

0 comments on commit 8dc3349

Please sign in to comment.