Commit 00ecac59 authored by Christopher's avatar Christopher
Browse files

add build scripts for basic images

parent 50c9215b
aosp-device-linaro-hikey/ build/
out/ out/
\ No newline at end of file
FROM debian:stretch
LABEL maintainer="Christopher L.D. SHEN (shenleidi@gmail.com)"
RUN apt-get update -qq \
&& apt-get install -qq -y wget xz-utils fakeroot img2simg simg2img make python gcc uuid-dev g++ libssl-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /var/tmp/*
RUN wget -q https://releases.linaro.org/components/toolchain/binaries/latest-7/aarch64-linux-gnu/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu.tar.xz -O /tmp/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu.tar.xz \
&& cd /opt/ && tar -axpf /tmp/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu.tar.xz \
&& rm /tmp/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu.tar.xz \
&& mkdir /opt/toolchain/ \
&& ln -s /opt/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu /opt/toolchain/gcc-linaro-7.1.1-2017.08-x86_64_aarch64-linux-gnu
FROM debian:stretch
LABEL maintainer="Christopher L.D. SHEN (shenleidi@gmail.com)"
RUN apt-get update \
&& apt-get install -y fakeroot simg2img\
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /var/tmp/*
#!/bin/bash
WORKDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"/build
OUTPUTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"/out
if [ -d ${WORKDIR} ]; then
docker run --rm \
-v ${WORKDIR}:/root \
yrzr/hikey970_tools:img \
bash -c "rm -r /root/*"
fi
mkdir -p ${WORKDIR}
cd ${WORKDIR}
git clone -b hikey970_v1.0 --depth=1 https://github.com/96boards-hikey/tools-images-hikey970.git
git clone -b hikey970_v1.0 --depth=1 https://github.com/96boards-hikey/arm-trusted-firmware.git
git clone -b hikey970_v1.0 --depth=1 https://github.com/96boards-hikey/l-loader.git
git clone -b hikey970_v1.0 --depth=1 https://github.com/96boards-hikey/uefi-tools.git
git clone -b hikey970_v1.0 --depth=1 https://github.com/96boards-hikey/edk2.git
git clone -b hikey970_v1.0 --depth=1 https://github.com/96boards-hikey/OpenPlatformPkg.git
ln -s ./OpenPlatformPkg ./edk2/OpenPlatformPkg
cd ${WORKDIR}/l-loader && git apply ${WORKDIR}/../patch/generate_ptable.sh.patch
docker run --rm \
-v ${WORKDIR}:/root \
yrzr/hikey970_tools:img \
bash -c "cd /root/ && ./l-loader/build_uefi.sh hikey970"
mkdir -p ${OUTPUTDIR}
cp -v ${WORKDIR}/tools-images-hikey970/sec_usb_xloader.img ${OUTPUTDIR}
cp -v ${WORKDIR}/tools-images-hikey970/sec_usb_xloader2.img ${OUTPUTDIR}
cp -v ${WORKDIR}/l-loader/l-loader.bin ${OUTPUTDIR}
cp -v ${WORKDIR}/l-loader/prm_ptable.img ${OUTPUTDIR}
cp -v ${WORKDIR}/tools-images-hikey970/sec_xloader.img ${OUTPUTDIR}
cp -v ${WORKDIR}/edk2/Build/HiKey970/RELEASE_GCC5/FV/fip.bin ${OUTPUTDIR}
#!/bin/bash
docker build -t yrzr/hikey970_tools:img ./
#!/bin/bash
WORKDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"/Docker
docker build -t yrzr/hikey970_tools:img ${WORKDIR}
diff --git a/l-loader/generate_ptable.sh b/l-loader/generate_ptable.sh diff --git a/generate_ptable.sh b/generate_ptable.sh
index 88f1d619..88f82b4a 100755 index 88f1d619..88f82b4a 100755
--- a/l-loader/generate_ptable.sh --- a/generate_ptable.sh
+++ b/l-loader/generate_ptable.sh +++ b/generate_ptable.sh
@@ -233,11 +233,13 @@ case ${PTABLE} in @@ -233,11 +233,13 @@ case ${PTABLE} in
#[11: trustfirmware: 417M-419M] #[11: trustfirmware: 417M-419M]
fakeroot ${SGDISK} -n 11:0:+2M -t 11:0700 -u 11:f1e126a6-ceef-45c1-aace-29f33ac9cf13 -c 11:"trustfirmware" ${TEMP_FILE} fakeroot ${SGDISK} -n 11:0:+2M -t 11:0700 -u 11:f1e126a6-ceef-45c1-aace-29f33ac9cf13 -c 11:"trustfirmware" ${TEMP_FILE}
......
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd ${DIR}
if [ ! -d ${DIR}/out/ ]; then
mkdir -p ${DIR}/out/
fi
if [ ! -d ${DIR}/../aosp-device-linaro-hikey ]; then
git clone -b hikey970_v1.0 --depth=1 https://github.com/96boards-hikey/aosp-device-linaro-hikey.git ${DIR}/../aosp-device-linaro-hikey
cd ${DIR}/../aosp-device-linaro-hikey && git apply ${DIR}/generate_ptable.sh.patch
fi
docker run --rm \
-v ${DIR}/../aosp-device-linaro-hikey:/root \
yrzr/hikey970_tools:img \
bash -c "cd /root/l-loader/ && PRODUCT=hikey970 PTABLE=linux-64g SECTOR_SIZE=4096 SGDISK=./sgdisk bash -x ./generate_ptable.sh"
cp -v ${DIR}/../aosp-device-linaro-hikey/l-loader/prm_ptable.img ${DIR}/out/
#!/bin/bash
docker run --rm \
-v /home/chris/git/Hikey970/hikey970-lebuntu-16.04:/root \
yrzr/hikey970_tools:img \
simg2img /root/boot-hikey970.uefi.img /root/raw-boot.img
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment