diff --git a/Makefile b/Makefile index c5229b64497..8cd6ad1f2f5 100644 --- a/Makefile +++ b/Makefile @@ -14,9 +14,6 @@ image: noobs: ./scripts/image noobs -amlpkg: - ./scripts/image amlpkg - # legacy sequential build targets system-st: ./scripts/image_st @@ -30,9 +27,6 @@ image-st: noobs-st: ./scripts/image_st noobs -amlpkg-st: - ./scripts/image_st amlpkg - clean: rm -rf $(BUILD_DIRS)/* $(BUILD_DIRS)/.stamps diff --git a/scripts/image b/scripts/image index 93bf4b27194..e38a62bdcbb 100755 --- a/scripts/image +++ b/scripts/image @@ -34,7 +34,6 @@ function do_mkimage() { TARGET_IMG="$TARGET_IMG" \ BUILD_NAME="$IMAGE_NAME" \ IMAGE_NAME="${1:-$IMAGE_NAME}" \ - INSTALL_SRC_DIR="$INSTALL_SRC_DIR" \ BOOTLOADER="$BOOTLOADER" \ KERNEL_NAME="$KERNEL_NAME" \ TARGET_KERNEL_ARCH="$TARGET_KERNEL_ARCH" \ @@ -242,7 +241,7 @@ rm -rf $FAKEROOT_SCRIPT # Set permissions chmod 0644 $TARGET_IMG/$IMAGE_NAME.system -if [ "$1" = "release" -o "$1" = "mkimage" -o "$1" = "amlpkg" -o "$1" = "noobs" ]; then +if [ "$1" = "release" -o "$1" = "mkimage" -o "$1" = "noobs" ]; then RELEASE_DIR="target/$IMAGE_NAME" @@ -305,14 +304,7 @@ if [ "$1" = "release" -o "$1" = "mkimage" -o "$1" = "amlpkg" -o "$1" = "noobs" ] ) # Create image files if requested - if [[ ( "$1" = "amlpkg" || "$1" = "noobs" || "$1" = "mkimage" ) && -n "$BOOTLOADER" ]]; then - # INSTALL_SRC_DIR can be board specific - if [ -n "$DEVICE" -a -d "$PROJECT_DIR/$PROJECT/devices/$DEVICE/install" ]; then - INSTALL_SRC_DIR="$PROJECT_DIR/$PROJECT/devices/$DEVICE/install" - else - INSTALL_SRC_DIR="$PROJECT_DIR/$PROJECT/install" - fi - + if [[ ( "$1" = "noobs" || "$1" = "mkimage" ) && -n "$BOOTLOADER" ]]; then UUID_SYSTEM="$(date '+%d%m')-$(date '+%M%S')" UUID_STORAGE="$(uuidgen)" @@ -341,76 +333,7 @@ if [ "$1" = "release" -o "$1" = "mkimage" -o "$1" = "amlpkg" -o "$1" = "noobs" ] # Cleanup release dir rm -rf $RELEASE_DIR - # Create WeTek Play (Amlogic) ZIP update and auto-install packages if requested - if [ "$1" = "amlpkg" ]; then - echo "Creating Amlogic ZIP update package" - - AML_PKG_DIR="$RELEASE_DIR/ampl-pkg" - - # Create package directory - mkdir -p "$AML_PKG_DIR" - - # Copy system and kernel images - mkdir -p "$AML_PKG_DIR/system" - cp $TARGET_IMG/$IMAGE_NAME.system $AML_PKG_DIR/system/SYSTEM - cp $TARGET_IMG/$IMAGE_NAME.kernel $AML_PKG_DIR/KERNEL - - # Copy update-binary and updater-script - META_INF_DIR="$AML_PKG_DIR/META-INF/com/google/android" - mkdir -p "$META_INF_DIR" - cp $INSTALL_SRC_DIR/update-binary $META_INF_DIR - cp $INSTALL_SRC_DIR/updater-script $META_INF_DIR - - # Copy other files if any - if [ -d "$INSTALL_SRC_DIR/files" ]; then - cp -PR $INSTALL_SRC_DIR/files/* $AML_PKG_DIR - fi - - # Copy device tree image if any - if [ -f "$INSTALL/usr/share/bootloader/dtb.img" ]; then - cp "$INSTALL/usr/share/bootloader/dtb.img" $AML_PKG_DIR/dtb.img - fi - - # Create the update package - pushd "$AML_PKG_DIR" > /dev/null - zip -rq update.zip * - - # Sign the update package - echo "Signing the update package" - mkdir -p sign - SIGNAPK_DIR="$ROOT/tools/signapk" - java -Xmx1024m -jar $SIGNAPK_DIR/signapk.jar -w $SIGNAPK_DIR/testkey.x509.pem $SIGNAPK_DIR/testkey.pk8 update.zip sign/$IMAGE_NAME-update.zip - - # Create the auto-install package - echo "Creating Amlogic ZIP auto-install package" - pushd sign > /dev/null - echo --update_package=/sdcard/$IMAGE_NAME-update.zip > factory_update_param.aml - echo --wipe_data >> factory_update_param.aml - echo --wipe_cache >> factory_update_param.aml - if [ -f "$INSTALL_SRC_DIR/files/recovery.img" ]; then - cp $INSTALL_SRC_DIR/files/recovery.img . - fi - - if [ -f $INSTALL_SRC_DIR/files/aml_autoscript ]; then - cp $INSTALL_SRC_DIR/files/aml_autoscript . - fi - - # Copy device tree image if any - if [ -f "$INSTALL/usr/share/bootloader/dtb.img" ]; then - cp "$INSTALL/usr/share/bootloader/dtb.img" . - fi - - zip -q $TARGET_IMG/$IMAGE_NAME.zip * - - # Create sha256 checksum of zip - ( cd $TARGET_IMG - sha256sum ${IMAGE_NAME}.zip > ${IMAGE_NAME}.zip.sha256 - ) - - popd > /dev/null - popd > /dev/null - - elif [ "$1" = "noobs" ]; then + if [ "$1" = "noobs" ]; then echo "Creating \"$1\" release tarball..." RELEASE_DIR="$TARGET_IMG/${IMAGE_NAME}-$1" diff --git a/scripts/image_st b/scripts/image_st index c2275176e1b..60989ecfa7e 100755 --- a/scripts/image_st +++ b/scripts/image_st @@ -37,7 +37,6 @@ function do_mkimage() { TARGET_IMG="$TARGET_IMG" \ BUILD_NAME="$IMAGE_NAME" \ IMAGE_NAME="${1:-$IMAGE_NAME}" \ - INSTALL_SRC_DIR="$INSTALL_SRC_DIR" \ BOOTLOADER="$BOOTLOADER" \ KERNEL_NAME="$KERNEL_NAME" \ TARGET_KERNEL_ARCH="$TARGET_KERNEL_ARCH" \ @@ -292,7 +291,7 @@ rm -rf $FAKEROOT_SCRIPT # set permissions chmod 0644 $TARGET_IMG/$IMAGE_NAME.system -if [ "$1" = "release" -o "$1" = "mkimage" -o "$1" = "amlpkg" -o "$1" = "noobs" ]; then +if [ "$1" = "release" -o "$1" = "mkimage" -o "$1" = "noobs" ]; then RELEASE_DIR="target/$IMAGE_NAME" @@ -355,14 +354,7 @@ if [ "$1" = "release" -o "$1" = "mkimage" -o "$1" = "amlpkg" -o "$1" = "noobs" ] ) # create image files if requested - if [[ ( "$1" = "amlpkg" || "$1" = "noobs" || "$1" = "mkimage" ) && -n "$BOOTLOADER" ]]; then - # INSTALL_SRC_DIR can be board specific - if [ -n "$DEVICE" -a -d "$PROJECT_DIR/$PROJECT/devices/$DEVICE/install" ]; then - INSTALL_SRC_DIR="$PROJECT_DIR/$PROJECT/devices/$DEVICE/install" - else - INSTALL_SRC_DIR="$PROJECT_DIR/$PROJECT/install" - fi - + if [[ ( "$1" = "noobs" || "$1" = "mkimage" ) && -n "$BOOTLOADER" ]]; then UUID_SYSTEM="$(date '+%d%m')-$(date '+%M%S')" UUID_STORAGE="$(uuidgen)" @@ -391,76 +383,7 @@ if [ "$1" = "release" -o "$1" = "mkimage" -o "$1" = "amlpkg" -o "$1" = "noobs" ] # cleanup release dir rm -rf $RELEASE_DIR - # create WeTek Play (Amlogic) ZIP update and auto-install packages if requested - if [ "$1" = "amlpkg" ]; then - echo "Creating Amlogic ZIP update package" - - AML_PKG_DIR="$RELEASE_DIR/ampl-pkg" - - # create package directory - mkdir -p "$AML_PKG_DIR" - - # copy system and kernel images - mkdir -p "$AML_PKG_DIR/system" - cp $TARGET_IMG/$IMAGE_NAME.system $AML_PKG_DIR/system/SYSTEM - cp $TARGET_IMG/$IMAGE_NAME.kernel $AML_PKG_DIR/KERNEL - - # copy update-binary and updater-script - META_INF_DIR="$AML_PKG_DIR/META-INF/com/google/android" - mkdir -p "$META_INF_DIR" - cp $INSTALL_SRC_DIR/update-binary $META_INF_DIR - cp $INSTALL_SRC_DIR/updater-script $META_INF_DIR - - # copy other files if any - if [ -d "$INSTALL_SRC_DIR/files" ]; then - cp -PR $INSTALL_SRC_DIR/files/* $AML_PKG_DIR - fi - - # copy device tree image if any - if [ -f "$INSTALL/usr/share/bootloader/dtb.img" ]; then - cp "$INSTALL/usr/share/bootloader/dtb.img" $AML_PKG_DIR/dtb.img - fi - - # create the update package - pushd "$AML_PKG_DIR" > /dev/null - zip -rq update.zip * - - # sign the update package - echo "Signing the update package" - mkdir -p sign - SIGNAPK_DIR="$ROOT/tools/signapk" - java -Xmx1024m -jar $SIGNAPK_DIR/signapk.jar -w $SIGNAPK_DIR/testkey.x509.pem $SIGNAPK_DIR/testkey.pk8 update.zip sign/$IMAGE_NAME-update.zip - - # create the auto-install package - echo "Creating Amlogic ZIP auto-install package" - pushd sign > /dev/null - echo --update_package=/sdcard/$IMAGE_NAME-update.zip > factory_update_param.aml - echo --wipe_data >> factory_update_param.aml - echo --wipe_cache >> factory_update_param.aml - if [ -f "$INSTALL_SRC_DIR/files/recovery.img" ]; then - cp $INSTALL_SRC_DIR/files/recovery.img . - fi - - if [ -f $INSTALL_SRC_DIR/files/aml_autoscript ]; then - cp $INSTALL_SRC_DIR/files/aml_autoscript . - fi - - # copy device tree image if any - if [ -f "$INSTALL/usr/share/bootloader/dtb.img" ]; then - cp "$INSTALL/usr/share/bootloader/dtb.img" . - fi - - zip -q $TARGET_IMG/$IMAGE_NAME.zip * - - # create sha256 checksum of zip - ( cd $TARGET_IMG - sha256sum ${IMAGE_NAME}.zip > ${IMAGE_NAME}.zip.sha256 - ) - - popd > /dev/null - popd > /dev/null - - elif [ "$1" = "noobs" ]; then + if [ "$1" = "noobs" ]; then echo "Creating \"$1\" release tarball..." RELEASE_DIR="$TARGET_IMG/${IMAGE_NAME}-$1" diff --git a/tools/signapk/signapk.jar b/tools/signapk/signapk.jar deleted file mode 100755 index b050dd4dc5a..00000000000 Binary files a/tools/signapk/signapk.jar and /dev/null differ diff --git a/tools/signapk/testkey.pk8 b/tools/signapk/testkey.pk8 deleted file mode 100644 index 586c1bd5cf9..00000000000 Binary files a/tools/signapk/testkey.pk8 and /dev/null differ diff --git a/tools/signapk/testkey.x509.pem b/tools/signapk/testkey.x509.pem deleted file mode 100644 index e242d83e2bf..00000000000 --- a/tools/signapk/testkey.x509.pem +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIEqDCCA5CgAwIBAgIJAJNurL4H8gHfMA0GCSqGSIb3DQEBBQUAMIGUMQswCQYD -VQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYT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