mirror of
https://github.com/t2linux/T2-Ubuntu.git
synced 2024-10-05 17:27:21 +03:00
Create multiple releases
This commit is contained in:
parent
c0a929ef5a
commit
ba065dd371
@ -21,7 +21,7 @@ cp "${ROOT_PATH}/files/grub/grub.cfg" "${IMAGE_PATH}"/isolinux/grub.cfg
|
|||||||
|
|
||||||
echo >&2 "===]> Info: Compress the chroot... "
|
echo >&2 "===]> Info: Compress the chroot... "
|
||||||
cd "${WORKING_PATH}"
|
cd "${WORKING_PATH}"
|
||||||
mksquashfs chroot "${IMAGE_PATH}"/casper/filesystem.squashfs
|
mksquashfs "${CHROOT_PATH}" "${IMAGE_PATH}"/casper/filesystem.squashfs
|
||||||
printf "%s" "$(du -sx --block-size=1 "${CHROOT_PATH}" | cut -f1)" >"${IMAGE_PATH}"/casper/filesystem.size
|
printf "%s" "$(du -sx --block-size=1 "${CHROOT_PATH}" | cut -f1)" >"${IMAGE_PATH}"/casper/filesystem.size
|
||||||
|
|
||||||
echo >&2 "===]> Info: Create manifest... "
|
echo >&2 "===]> Info: Create manifest... "
|
24
README.md
24
README.md
@ -1,12 +1,12 @@
|
|||||||
# mbp-ubuntu
|
# mbp-ubuntu
|
||||||
|
|
||||||
The ISO in from this repo should allow you to install ubuntu without using an external keyboard or mouse on a MacBook Pro 16,1. It work in my MacBook Pro 16,1.
|
The ISO in from this repo should allow you to install ubuntu without using an external keyboard or mouse on a MacBook Pro. It work in my MacBook Pro 16,1.
|
||||||
|
|
||||||
[![Build Status](https://travis-ci.com/marcosfad/mbp-ubuntu.svg?branch=master)](https://travis-ci.com/marcosfad/mbp-ubuntu)
|
[![Build Status](https://travis-ci.com/marcosfad/mbp-ubuntu.svg?branch=master)](https://travis-ci.com/marcosfad/mbp-ubuntu)
|
||||||
|
|
||||||
**If this repo helped you in any way, consider inviting a coffee to the people in the [credits](https://github.com/marcosfad/mbp-ubuntu#credits) or [me](https://paypal.me/marcosfad)**
|
**If this repo helped you in any way, consider inviting a coffee to the people in the [credits](https://github.com/marcosfad/mbp-ubuntu#credits) or [me](https://paypal.me/marcosfad)**
|
||||||
|
|
||||||
UBUNTU 20.04 ISO with Apple T2 patches built-in (Macbooks produced >= 2018).
|
UBUNTU 20.04 ISO with Apple T2 patches built-in.
|
||||||
|
|
||||||
Apple T2 drivers are integrated with this iso.
|
Apple T2 drivers are integrated with this iso.
|
||||||
|
|
||||||
@ -20,6 +20,19 @@ Using additional drivers:
|
|||||||
|
|
||||||
Bootloader is configure correctly out of the box. No workaround needed.
|
Bootloader is configure correctly out of the box. No workaround needed.
|
||||||
|
|
||||||
|
## Before I begin, what version should I use "mbp" or "mbp-alt"?
|
||||||
|
|
||||||
|
The difference between the two is that the mbp-alt includes the kernel with the 2001 Patch from the great Aunali1.
|
||||||
|
This patch made my screen blank, but it helped others to get rid of the blank screen.
|
||||||
|
So, here is a list, with what I know through discord members:
|
||||||
|
|
||||||
|
MBP | mbp | mbp-alt
|
||||||
|
--- | --- | ---
|
||||||
|
16,1| x |
|
||||||
|
15,4| x |
|
||||||
|
|
||||||
|
If your mbp is not listed, please try both version and tell me which one is working for you on the issue [Blank screen](https://github.com/marcosfad/mbp-ubuntu/issues/7)
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
1. Reduce the size of the mac partition in MacOS
|
1. Reduce the size of the mac partition in MacOS
|
||||||
@ -65,6 +78,11 @@ options hid_apple swap_opt_cmd=1
|
|||||||
**IF YOU UPDATE THE KERNEL, REMEMBER TO ADD THE REQUIRED DRIVERS AGAIN.**
|
**IF YOU UPDATE THE KERNEL, REMEMBER TO ADD THE REQUIRED DRIVERS AGAIN.**
|
||||||
|
|
||||||
### The easy way:
|
### The easy way:
|
||||||
|
|
||||||
|
The live cd includes dkms and will automatically run when a new kernel is installed. You can use `dkms status` to see it.
|
||||||
|
|
||||||
|
The step to install it from scratch would be:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo apt install dkms
|
sudo apt install dkms
|
||||||
sudo apt install linux-headers-<mbp-kernel-release>-mbp linux-image-<mbp-kernel-release>-mbp
|
sudo apt install linux-headers-<mbp-kernel-release>-mbp linux-image-<mbp-kernel-release>-mbp
|
||||||
@ -78,8 +96,8 @@ modprobe apple-bce
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Another way:
|
### Another way:
|
||||||
Check <https://github.com/marcosfad/mbp-ubuntu/blob/master/files/chroot_build.sh> to see how it is done.
|
|
||||||
|
|
||||||
|
Check <https://github.com/marcosfad/mbp-ubuntu/blob/master/files/chroot_build.sh> to see how it is done.
|
||||||
|
|
||||||
## Know issues
|
## Know issues
|
||||||
|
|
||||||
|
95
build.sh
95
build.sh
@ -5,13 +5,16 @@ ROOT_PATH=$(pwd)
|
|||||||
WORKING_PATH=/root/work
|
WORKING_PATH=/root/work
|
||||||
CHROOT_PATH="${WORKING_PATH}/chroot"
|
CHROOT_PATH="${WORKING_PATH}/chroot"
|
||||||
IMAGE_PATH="${WORKING_PATH}/image"
|
IMAGE_PATH="${WORKING_PATH}/image"
|
||||||
#KERNEL_VERSION=5.4.0-29-generic
|
KERNEL_VERSION=5.7.9
|
||||||
KERNEL_VERSION=5.6.19-mbp
|
|
||||||
|
|
||||||
if [ -d "$WORKING_PATH" ]; then
|
if [ -d "$WORKING_PATH" ]; then
|
||||||
rm -rf "$WORKING_PATH"
|
rm -rf "$WORKING_PATH"
|
||||||
fi
|
fi
|
||||||
mkdir -p "$WORKING_PATH"
|
mkdir -p "$WORKING_PATH"
|
||||||
|
if [ -d "${ROOT_PATH}/output" ]; then
|
||||||
|
rm -rf "${ROOT_PATH}/output"
|
||||||
|
fi
|
||||||
|
mkdir -p "${ROOT_PATH}/output"
|
||||||
|
|
||||||
echo >&2 "===]> Info: Build dependencies... "
|
echo >&2 "===]> Info: Build dependencies... "
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
@ -29,55 +32,59 @@ apt-get install -y -qq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="
|
|||||||
isolinux \
|
isolinux \
|
||||||
syslinux
|
syslinux
|
||||||
|
|
||||||
echo >&2 "===]> Info: Build Ubuntu FS... "
|
echo >&2 "===]> Info: Start loop... "
|
||||||
/bin/bash -c "
|
for ALTERNATIVE in mbp mbp-alt
|
||||||
ROOT_PATH=${ROOT_PATH} \\
|
do
|
||||||
WORKING_PATH=${WORKING_PATH} \\
|
echo >&2 "===]> Info: Start building ${ALTERNATIVE}... "
|
||||||
CHROOT_PATH=${CHROOT_PATH} \\
|
|
||||||
IMAGE_PATH=${IMAGE_PATH} \\
|
|
||||||
KERNEL_VERSION=${KERNEL_VERSION} \\
|
|
||||||
${ROOT_PATH}/build_file_system.sh
|
|
||||||
"
|
|
||||||
|
|
||||||
echo >&2 "===]> Info: Build Image FS... "
|
echo >&2 "===]> Info: Build Ubuntu FS... "
|
||||||
/bin/bash -c "
|
/bin/bash -c "
|
||||||
ROOT_PATH=${ROOT_PATH} \\
|
ROOT_PATH=${ROOT_PATH} \\
|
||||||
WORKING_PATH=${WORKING_PATH} \\
|
WORKING_PATH=${WORKING_PATH} \\
|
||||||
CHROOT_PATH=${CHROOT_PATH} \\
|
CHROOT_PATH=${CHROOT_PATH}_${ALTERNATIVE} \\
|
||||||
IMAGE_PATH=${IMAGE_PATH} \\
|
IMAGE_PATH=${IMAGE_PATH} \\
|
||||||
KERNEL_VERSION=${KERNEL_VERSION} \\
|
KERNEL_VERSION=${KERNEL_VERSION}-${ALTERNATIVE} \\
|
||||||
${ROOT_PATH}/build_image.sh
|
${ROOT_PATH}/01_build_file_system.sh
|
||||||
"
|
"
|
||||||
|
|
||||||
echo >&2 "===]> Info: Prepare Boot for ISO... "
|
echo >&2 "===]> Info: Build Image FS... "
|
||||||
/bin/bash -c "
|
/bin/bash -c "
|
||||||
IMAGE_PATH=${IMAGE_PATH} \\
|
ROOT_PATH=${ROOT_PATH} \\
|
||||||
CHROOT_PATH=${CHROOT_PATH} \\
|
WORKING_PATH=${WORKING_PATH} \\
|
||||||
${ROOT_PATH}/prepare_iso.sh
|
CHROOT_PATH=${CHROOT_PATH}_${ALTERNATIVE} \\
|
||||||
"
|
IMAGE_PATH=${IMAGE_PATH} \\
|
||||||
|
KERNEL_VERSION=${KERNEL_VERSION}-${ALTERNATIVE} \\
|
||||||
|
${ROOT_PATH}/02_build_image.sh
|
||||||
|
"
|
||||||
|
|
||||||
echo >&2 "===]> Info: Create ISO... "
|
echo >&2 "===]> Info: Prepare Boot for ISO... "
|
||||||
/bin/bash -c "
|
/bin/bash -c "
|
||||||
ROOT_PATH=${ROOT_PATH} \\
|
IMAGE_PATH=${IMAGE_PATH} \\
|
||||||
IMAGE_PATH=${IMAGE_PATH} \\
|
CHROOT_PATH=${CHROOT_PATH}_${ALTERNATIVE} \\
|
||||||
CHROOT_PATH=${CHROOT_PATH} \\
|
${ROOT_PATH}/03_prepare_iso.sh
|
||||||
KERNEL_VERSION=${KERNEL_VERSION} \\
|
"
|
||||||
${ROOT_PATH}/create_iso.sh
|
|
||||||
"
|
|
||||||
livecd_exitcode=$?
|
|
||||||
|
|
||||||
### Zip iso and split it into multiple parts - github max size of release attachment is 2GB, where ISO is sometimes bigger than that
|
|
||||||
cd "${ROOT_PATH}"
|
|
||||||
if [ -d "${ROOT_PATH}/output" ]; then
|
|
||||||
rm -rf "${ROOT_PATH}/output"
|
|
||||||
fi
|
|
||||||
mkdir -p "${ROOT_PATH}/output"
|
|
||||||
zip -s 1500m "${ROOT_PATH}/output/livecd.zip" ./*.iso
|
|
||||||
|
|
||||||
|
echo >&2 "===]> Info: Create ISO... "
|
||||||
|
/bin/bash -c "
|
||||||
|
ROOT_PATH=${ROOT_PATH} \\
|
||||||
|
IMAGE_PATH=${IMAGE_PATH} \\
|
||||||
|
CHROOT_PATH=${CHROOT_PATH}_${ALTERNATIVE} \\
|
||||||
|
KERNEL_VERSION=${KERNEL_VERSION}-${ALTERNATIVE} \\
|
||||||
|
${ROOT_PATH}/04_create_iso.sh
|
||||||
|
"
|
||||||
|
livecd_exitcode=$?
|
||||||
|
if [ "${livecd_exitcode}" -ne 0 ]; then
|
||||||
|
echo "Error building ${KERNEL_VERSION}-${ALTERNATIVE}"
|
||||||
|
exit "${livecd_exitcode}"
|
||||||
|
fi
|
||||||
|
### Zip iso and split it into multiple parts - github max size of release attachment is 2GB, where ISO is sometimes bigger than that
|
||||||
|
cd "${ROOT_PATH}"
|
||||||
|
zip -s 1500m "${ROOT_PATH}/output/livecd-${KERNEL_VERSION}-${ALTERNATIVE}.zip" "${ROOT_PATH}/ubuntu-20.04-${KERNEL_VERSION}-${ALTERNATIVE}.iso"
|
||||||
|
done
|
||||||
### Calculate sha256 sums of built ISO
|
### Calculate sha256 sums of built ISO
|
||||||
sha256sum "${ROOT_PATH}"/*.iso >"${ROOT_PATH}/output/sha256"
|
sha256sum "${ROOT_PATH}"/*.iso >"${ROOT_PATH}/output/sha256"
|
||||||
|
|
||||||
find ./ | grep ".iso"
|
find ./ | grep ".iso"
|
||||||
find ./ | grep ".zip"
|
find ./ | grep ".zip"
|
||||||
|
|
||||||
exit "$livecd_exitcode"
|
exit "${livecd_exitcode}"
|
||||||
|
Loading…
Reference in New Issue
Block a user