mirror of
https://github.com/brain-hackers/buildbrain
synced 2024-12-22 12:10:12 +09:00
Pre-install BrainLILO / enable G2 build
This commit is contained in:
parent
0eb94960ca
commit
93de849023
18
.github/workflows/build.yml
vendored
18
.github/workflows/build.yml
vendored
@ -128,20 +128,30 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
- model: g5300
|
||||||
|
nk: edna3exe.bin
|
||||||
|
lilo: gen2.bin
|
||||||
- model: sh1
|
- model: sh1
|
||||||
nk: edsa1exe.bin
|
nk: edsa1exe.bin
|
||||||
|
lilo: gen3_1.bin
|
||||||
- model: sh2
|
- model: sh2
|
||||||
nk: edsa2exe.bin
|
nk: edsa2exe.bin
|
||||||
|
lilo: gen3_2.bin
|
||||||
- model: sh3
|
- model: sh3
|
||||||
nk: edsa3exe.bin
|
nk: edsa3exe.bin
|
||||||
|
lilo: gen3_3.bin
|
||||||
- model: sh4
|
- model: sh4
|
||||||
nk: edsh4exe.bin
|
nk: edsh4exe.bin
|
||||||
|
lilo: gen3_4.bin
|
||||||
- model: sh5
|
- model: sh5
|
||||||
nk: edsh5exe.bin
|
nk: edsh5exe.bin
|
||||||
|
lilo: gen3_5.bin
|
||||||
- model: sh6
|
- model: sh6
|
||||||
nk: edsh6exe.bin
|
nk: edsh6exe.bin
|
||||||
|
lilo: gen3_6.bin
|
||||||
- model: sh7
|
- model: sh7
|
||||||
nk: edsh7exe.bin
|
nk: edsh7exe.bin
|
||||||
|
lilo: gen3_7.bin
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
@ -164,6 +174,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
mkdir release
|
mkdir release
|
||||||
cp ./u-boot-brain/u-boot.bin release/u-boot.bin
|
cp ./u-boot-brain/u-boot.bin release/u-boot.bin
|
||||||
|
cp ./u-boot-brain/u-boot.bin release/${{ matrix.lilo }}
|
||||||
cp ./u-boot-brain/u-boot.sb release/u-boot.sb
|
cp ./u-boot-brain/u-boot.sb release/u-boot.sb
|
||||||
cp ./nk.bin release/${{ matrix.nk }}
|
cp ./nk.bin release/${{ matrix.nk }}
|
||||||
zip -r release.zip release/
|
zip -r release.zip release/
|
||||||
@ -226,6 +237,13 @@ jobs:
|
|||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
- name: Make /opt writable
|
||||||
|
run: sudo chown "$(whoami):$(whoami)" /opt
|
||||||
|
- name: Install cegcc
|
||||||
|
run: |
|
||||||
|
wget -O cegcc.zip https://github.com/brain-hackers/cegcc-build/releases/download/2022-04-11-133546/cegcc-2022-04-11-133546.zip
|
||||||
|
unzip -q cegcc.zip
|
||||||
|
cp -r cegcc /opt/
|
||||||
- name: Workaround for apt update failure
|
- name: Workaround for apt update failure
|
||||||
run: sudo rm /etc/apt/sources.list.d/github_git-lfs.*
|
run: sudo rm /etc/apt/sources.list.d/github_git-lfs.*
|
||||||
- name: Install deps
|
- name: Install deps
|
||||||
|
9
Makefile
9
Makefile
@ -127,6 +127,15 @@ boot4ubuild:
|
|||||||
boot4uclean:
|
boot4uclean:
|
||||||
make -C ./boot4u clean
|
make -C ./boot4u clean
|
||||||
|
|
||||||
|
.PHONY:
|
||||||
|
lilobuild:
|
||||||
|
make -C ./brainlilo
|
||||||
|
|
||||||
|
.PHONY:
|
||||||
|
liloclean:
|
||||||
|
make -C ./brainlilo clean
|
||||||
|
|
||||||
|
|
||||||
brainux:
|
brainux:
|
||||||
@if [ "$(shell uname)" != "Linux" ]; then \
|
@if [ "$(shell uname)" != "Linux" ]; then \
|
||||||
echo "Debootstrap is only available in Linux!"; \
|
echo "Debootstrap is only available in Linux!"; \
|
||||||
|
@ -9,17 +9,25 @@ IMG=${REPO}/image/sd.img
|
|||||||
export CROSS_COMPILE=arm-linux-gnueabi-
|
export CROSS_COMPILE=arm-linux-gnueabi-
|
||||||
|
|
||||||
mkdir -p ${WORK}
|
mkdir -p ${WORK}
|
||||||
|
mkdir -p ${WORK}/lilobin
|
||||||
|
|
||||||
for i in $(seq 1 7); do
|
for i in "g5300" "sh1" "sh2" "sh3" "sh4" "sh5" "sh6" "sh7"; do
|
||||||
make -C ${REPO}/u-boot-brain pwsh${i}_defconfig
|
NUM=$(echo $i | sed -E 's/sh//g')
|
||||||
|
|
||||||
|
make -C ${REPO}/u-boot-brain distclean pw${i}_defconfig
|
||||||
make -j${JOBS} -C ${REPO}/u-boot-brain u-boot.bin
|
make -j${JOBS} -C ${REPO}/u-boot-brain u-boot.bin
|
||||||
${REPO}/nkbin_maker/bsd-ce ${REPO}/u-boot-brain/u-boot.bin
|
${REPO}/nkbin_maker/bsd-ce ${REPO}/u-boot-brain/u-boot.bin
|
||||||
|
|
||||||
case $i in
|
case $i in
|
||||||
1|2|3)
|
"g5300")
|
||||||
mv ${REPO}/nk.bin ${WORK}/edsa${i}exe.bin;;
|
mv ${REPO}/nk.bin ${WORK}/edna3exe.bin
|
||||||
4|5|6|7)
|
mv ${REPO}/u-boot-brain/u-boot.bin ${WORK}/lilobin/gen2.bin;;
|
||||||
mv ${REPO}/nk.bin ${WORK}/edsh${i}exe.bin;;
|
"sh1" | "sh2" | "sh3")
|
||||||
|
mv ${REPO}/nk.bin ${WORK}/edsa${NUM}exe.bin
|
||||||
|
mv ${REPO}/u-boot-brain/u-boot.bin ${WORK}/lilobin/gen3_${NUM}.bin;;
|
||||||
|
"sh4" | "sh5" | "sh6" | "sh7")
|
||||||
|
mv ${REPO}/nk.bin ${WORK}/edsh${NUM}exe.bin
|
||||||
|
mv ${REPO}/u-boot-brain/u-boot.bin ${WORK}/lilobin/gen3_${NUM}.bin;;
|
||||||
*)
|
*)
|
||||||
echo "WTF: $i"
|
echo "WTF: $i"
|
||||||
exit 1;;
|
exit 1;;
|
||||||
@ -47,13 +55,25 @@ sudo mkfs.fat -F32 -v -I /dev/mapper/${LOOPDEV}p1
|
|||||||
sudo mkfs.ext4 /dev/mapper/${LOOPDEV}p2
|
sudo mkfs.ext4 /dev/mapper/${LOOPDEV}p2
|
||||||
|
|
||||||
mkdir -p ${WORK}/p1 ${WORK}/p2
|
mkdir -p ${WORK}/p1 ${WORK}/p2
|
||||||
sudo mount /dev/mapper/${LOOPDEV}p1 ${WORK}/p1
|
sudo mount -o utf8=true /dev/mapper/${LOOPDEV}p1 ${WORK}/p1
|
||||||
sudo mount /dev/mapper/${LOOPDEV}p2 ${WORK}/p2
|
sudo mount /dev/mapper/${LOOPDEV}p2 ${WORK}/p2
|
||||||
|
|
||||||
sudo cp ${LINUX}/arch/arm/boot/zImage ${WORK}/p1/
|
sudo cp ${LINUX}/arch/arm/boot/zImage ${WORK}/p1/
|
||||||
sudo cp ${LINUX}/arch/arm/boot/dts/imx28-pwsh*.dtb ${WORK}/p1/
|
sudo cp ${LINUX}/arch/arm/boot/dts/imx28-pw*.dtb ${WORK}/p1/
|
||||||
sudo cp ${WORK}/*.bin ${WORK}/p1/
|
sudo cp ${WORK}/*.bin ${WORK}/p1/
|
||||||
|
|
||||||
|
make -C ${REPO}/brainlilo
|
||||||
|
|
||||||
|
LILO="${WORK}/p1/アプリ/Launch Linux"
|
||||||
|
sudo mkdir -p "${LILO}"
|
||||||
|
sudo touch "${LILO}/index.din"
|
||||||
|
sudo touch "${LILO}/AppMain.cfg"
|
||||||
|
sudo cp ${REPO}/brainlilo/*.dll "${LILO}/"
|
||||||
|
sudo cp ${REPO}/brainlilo/BrainLILO.exe "${LILO}/AppMain.exe"
|
||||||
|
|
||||||
|
sudo mkdir -p ${WORK}/p1/loader
|
||||||
|
sudo cp ${WORK}/lilobin/*.bin ${WORK}/p1/loader/
|
||||||
|
|
||||||
sudo cp -ra ${REPO}/brainux/* ${WORK}/p2/
|
sudo cp -ra ${REPO}/brainux/* ${WORK}/p2/
|
||||||
|
|
||||||
sudo umount ${WORK}/p1 ${WORK}/p2
|
sudo umount ${WORK}/p1 ${WORK}/p2
|
||||||
|
Loading…
Reference in New Issue
Block a user