Skip to content

Commit

Permalink
master
Browse files Browse the repository at this point in the history
  • Loading branch information
serhii-nakon committed Oct 16, 2021
0 parents commit 9d59ea1
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lxc.sample.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
lxc.net.0.type = veth
lxc.net.0.link = lxcbr0
lxc.net.0.flags = up
lxc.apparmor.profile = unconfined
lxc.apparmor.allow_nesting = 1

lxc.mount.entry = <ROOTAPP> root none bind,optional,create=dir,rw 0 0

lxc.idmap = u 0 1000 1
lxc.idmap = g 0 1000 1
lxc.idmap = u 1 100001 65535
lxc.idmap = g 1 100001 65535
12 changes: 12 additions & 0 deletions lxcup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

ROOTAPP=$(dirname $(realpath -s $0))
cp -v $ROOTAPP/lxc.sample.conf $ROOTAPP/lxc.conf
sed -i "s@<ROOTAPP>@$ROOTAPP@g" $ROOTAPP/lxc.conf
lxc-create -t download -n u-boot -f $ROOTAPP/lxc.conf -- -d debian -r sid -a amd64 --no-validate
rm -v $ROOTAPP/lxc.conf
lxc-unpriv-start u-boot
sleep 15
lxc-attach u-boot -- /root/uboot.sh
lxc-stop u-boot
lxc-destroy u-boot
26 changes: 26 additions & 0 deletions uboot.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env bash

apt update
apt install gcc-aarch64-linux-gnu bison flex swig python-dev build-essential device-tree-compiler python3 python3-dev libssl-dev git bc python3-setuptools sed gcc-or1k-elf -y

cd /root
git clone --single-branch --branch v2021.10 https://github.com/u-boot/u-boot.git
git clone --single-branch --branch v2.5 https://github.com/ARM-software/arm-trusted-firmware.git
git clone --single-branch --branch v0.4 https://github.com/crust-firmware/crust.git

cd /root/arm-trusted-firmware

make -j 16 CROSS_COMPILE=aarch64-linux-gnu- PLAT=sun50i_h6 bl31

cd /root/crust

make -j 16 CROSS_COMPILE=aarch64-linux-gnu- orangepi_3_defconfig
make -j 16 CROSS_COMPILE=or1k-elf- scp

cd /root/u-boot

echo CONFIG_SUPPORT_EMMC_BOOT=y >> /root/u-boot/configs/orangepi_3_defconfig
make -j 16 CROSS_COMPILE=aarch64-linux-gnu- BL31=/root/arm-trusted-firmware/build/sun50i_h6/release/bl31.bin SCP=/root/crust/build/scp/scp.bin orangepi_3_defconfig
make -j 16 CROSS_COMPILE=aarch64-linux-gnu- BL31=/root/arm-trusted-firmware/build/sun50i_h6/release/bl31.bin SCP=/root/crust/build/scp/scp.bin
cp -v /root/u-boot/u-boot-sunxi-with-spl.bin /root
rm -rf /root/u-boot /root/crust /root/arm-trusted-firmware

0 comments on commit 9d59ea1

Please sign in to comment.