mirror of
https://github.com/brain-hackers/buildbrain
synced 2026-03-29 09:11:08 +09:00
Compare commits
90 Commits
2021-03-22
...
2023-01-18
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ee93757ff1 | ||
|
|
9f41a0bbd2 | ||
|
|
9671252f5d | ||
|
|
935363d6ac | ||
|
|
25668a72e3 | ||
|
|
d7da4a6e44 | ||
|
|
8f3f63be44 | ||
|
|
a4350f303c | ||
|
|
f7a20f61b7 | ||
|
|
2ecec60001 | ||
|
|
eaa027db98 | ||
|
|
53e39a8bb6 | ||
|
|
453fe8d60f | ||
|
|
e7d3c4629a | ||
|
|
57c5052909 | ||
|
|
84960b1471 | ||
|
|
515aff62be | ||
|
|
6cf0f749d4 | ||
|
|
7ca8ed3cc1 | ||
|
|
f444f68a3b | ||
|
|
f503ef87ef | ||
|
|
3f4afedf45 | ||
|
|
5e92df0600 | ||
|
|
e09c0ba017 | ||
|
|
d74ba8a70f | ||
|
|
ec695f99f0 | ||
|
|
22235e8cf0 | ||
|
|
9529327097 | ||
|
|
7e2b04ce18 | ||
|
|
8c7118f0b2 | ||
|
|
7a34055ef3 | ||
|
|
d64a316b1f | ||
|
|
d5ab036801 | ||
|
|
fe480d7b91 | ||
|
|
e15ce44891 | ||
|
|
0509bbbe6f | ||
|
|
a2295ecb55 | ||
|
|
07c32f712f | ||
|
|
89b4c120a2 | ||
|
|
1a4d1cd39a | ||
|
|
d8aa77a29f | ||
|
|
93de849023 | ||
|
|
0eb94960ca | ||
|
|
7299377004 | ||
|
|
b90386fbd2 | ||
|
|
f7e1dbeadf | ||
|
|
6bc1d44016 | ||
|
|
8bc1c15958 | ||
|
|
ffb3590060 | ||
|
|
45990eac88 | ||
|
|
b9b99be34a | ||
|
|
c3a5dbfe22 | ||
|
|
d30ec39b6b | ||
|
|
152854cd1d | ||
|
|
c8e7e32db5 | ||
|
|
32ba6d3825 | ||
|
|
0a39083d9e | ||
|
|
14275cdb60 | ||
| d5b86adc1c | |||
|
|
621a5e0b9a | ||
|
|
899aac01d9 | ||
|
|
627b8212ec | ||
|
|
e7f9e3f7a5 | ||
|
|
162f065148 | ||
|
|
0ecb9895ac | ||
|
|
2c89ef57d1 | ||
|
|
5689b3a04e | ||
|
|
12a69402c6 | ||
|
|
04987d3792 | ||
|
|
9c56c4175a | ||
|
|
23790bcf20 | ||
|
|
f82168e7b1 | ||
|
|
f77dc68e69 | ||
|
|
c59b6d7738 | ||
|
|
8ca448ad1f | ||
|
|
46100619b0 | ||
|
|
ccd54db033 | ||
|
|
ccd1d72e64 | ||
|
|
219d2ce3c0 | ||
|
|
d8c969cc7e | ||
|
|
682b8a44b4 | ||
|
|
9eee52eef1 | ||
|
|
6fa865562d | ||
|
|
0cb4e30ace | ||
|
|
882ebd83a1 | ||
|
|
07177b6a8e | ||
|
|
5ff900db79 | ||
|
|
0f934753d6 | ||
|
|
b8908199d5 | ||
|
|
0b2f80fe0b |
137
.github/workflows/build.yml
vendored
137
.github/workflows/build.yml
vendored
@@ -31,7 +31,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ steps.release_name.outputs.name }}
|
tag_name: ${{ steps.release_name.outputs.name }}-tag
|
||||||
release_name: ${{ steps.release_name.outputs.name }}
|
release_name: ${{ steps.release_name.outputs.name }}
|
||||||
body_path: CHANGES.md
|
body_path: CHANGES.md
|
||||||
draft: false
|
draft: false
|
||||||
@@ -87,26 +87,71 @@ jobs:
|
|||||||
asset_name: listconfig
|
asset_name: listconfig
|
||||||
asset_content_type: text/plain
|
asset_content_type: text/plain
|
||||||
|
|
||||||
|
build-linux-x1:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
needs: [create_release]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
- name: Workaround for apt update failure
|
||||||
|
run: sudo rm /etc/apt/sources.list.d/github_git-lfs.*
|
||||||
|
- name: Install deps
|
||||||
|
run: sudo apt update && sudo apt install build-essential bison flex libncurses5-dev gcc-arm-linux-gnueabihf libssl-dev lzop qemu-user-static debootstrap
|
||||||
|
- name: Configure for Linux
|
||||||
|
run: make ldefconfig-x1
|
||||||
|
- name: Build Linux
|
||||||
|
run: make lbuild
|
||||||
|
- name: Setup releases
|
||||||
|
id: release_name
|
||||||
|
run: |
|
||||||
|
mkdir release
|
||||||
|
cp ./linux-brain/arch/arm/boot/dts/imx7ulp-pwh*.dtb release/
|
||||||
|
cp ./linux-brain/arch/arm/boot/zImage release/zImage
|
||||||
|
zip -r release.zip release/
|
||||||
|
- name: Generate archive name
|
||||||
|
id: archive_name
|
||||||
|
run: echo ::set-output name=name::linux-x1-${GITHUB_REF/refs\/*s\//}
|
||||||
|
- name: Upload release.zip
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ needs.create_release.outputs.upload_url }}
|
||||||
|
asset_path: release.zip
|
||||||
|
asset_name: ${{ steps.archive_name.outputs.name }}.zip
|
||||||
|
asset_content_type: application/zip
|
||||||
|
|
||||||
build-uboot:
|
build-uboot:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
needs: [create_release]
|
needs: [create_release]
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
- model: a7200
|
||||||
|
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
|
||||||
@@ -129,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/
|
||||||
@@ -145,6 +191,45 @@ jobs:
|
|||||||
asset_name: ${{ steps.archive_name.outputs.name }}.zip
|
asset_name: ${{ steps.archive_name.outputs.name }}.zip
|
||||||
asset_content_type: application/zip
|
asset_content_type: application/zip
|
||||||
|
|
||||||
|
build-uboot-x1:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
needs: [create_release]
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- model: h1
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
- name: Workaround for apt update failure
|
||||||
|
run: sudo rm /etc/apt/sources.list.d/github_git-lfs.*
|
||||||
|
- name: Install deps
|
||||||
|
run: sudo apt update && sudo apt install build-essential bison flex libncurses5-dev gcc-arm-linux-gnueabihf libssl-dev lzop qemu-user-static debootstrap
|
||||||
|
- name: Configure for U-Boot
|
||||||
|
run: make udefconfig-${{ matrix.model }}
|
||||||
|
- name: Build U-Boot
|
||||||
|
run: make ubuild
|
||||||
|
- name: Setup releases
|
||||||
|
id: release_name
|
||||||
|
run: |
|
||||||
|
mkdir release
|
||||||
|
cp ./u-boot-brain/u-boot.bin release/u-boot.bin
|
||||||
|
zip -r release.zip release/
|
||||||
|
- name: Generate archive name
|
||||||
|
id: archive_name
|
||||||
|
run: echo ::set-output name=name::uboot-${{ matrix.model }}-${GITHUB_REF/refs\/*s\//}
|
||||||
|
- name: Upload release.zip
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ needs.create_release.outputs.upload_url }}
|
||||||
|
asset_path: release.zip
|
||||||
|
asset_name: ${{ steps.archive_name.outputs.name }}.zip
|
||||||
|
asset_content_type: application/zip
|
||||||
|
|
||||||
build-sd:
|
build-sd:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
needs: [create_release]
|
needs: [create_release]
|
||||||
@@ -152,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
|
||||||
@@ -181,3 +273,46 @@ jobs:
|
|||||||
asset_name: ${{ steps.image_name.outputs.name }}.zip
|
asset_name: ${{ steps.image_name.outputs.name }}.zip
|
||||||
asset_content_type: application/zip
|
asset_content_type: application/zip
|
||||||
|
|
||||||
|
build-sd-x1:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
needs: [create_release]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
- name: Workaround for apt update failure
|
||||||
|
run: sudo rm /etc/apt/sources.list.d/github_git-lfs.*
|
||||||
|
- name: Install deps
|
||||||
|
run: sudo apt update && sudo apt install kpartx build-essential bison flex libncurses5-dev gcc-arm-linux-gnueabihf libssl-dev lzop qemu-user-static debootstrap
|
||||||
|
- name: Upgrade pip and setuptools
|
||||||
|
run: pip3 install -U pip setuptools
|
||||||
|
- name: Install pyelftools
|
||||||
|
run: pip3 install pyelftools
|
||||||
|
- name: Build Boot4u
|
||||||
|
run: make boot4ubuild
|
||||||
|
- name: Configure for U-Boot
|
||||||
|
run: make udefconfig-h1
|
||||||
|
- name: Build U-Boot
|
||||||
|
run: make ubuild
|
||||||
|
- name: Configure for Linux
|
||||||
|
run: make ldefconfig-x1
|
||||||
|
- name: Build Linux
|
||||||
|
run: make lbuild
|
||||||
|
- name: Build Debian Root
|
||||||
|
run: make brainux
|
||||||
|
- name: Generate image name
|
||||||
|
id: image_name
|
||||||
|
run: echo ::set-output name=name::sdimage-x1-${GITHUB_REF/refs\/*s\//}
|
||||||
|
- name: Build SD image
|
||||||
|
run: make image/sd_x1.img && mv image/sd_x1.img ${{ steps.image_name.outputs.name }}.img
|
||||||
|
- name: Compress
|
||||||
|
run: zip ${{ steps.image_name.outputs.name }}.zip ${{ steps.image_name.outputs.name }}.img
|
||||||
|
- name: Upload the image
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ needs.create_release.outputs.upload_url }}
|
||||||
|
asset_path: ${{ steps.image_name.outputs.name }}.zip
|
||||||
|
asset_name: ${{ steps.image_name.outputs.name }}.zip
|
||||||
|
asset_content_type: application/zip
|
||||||
|
|||||||
8
.gitmodules
vendored
8
.gitmodules
vendored
@@ -3,7 +3,13 @@
|
|||||||
url = https://github.com/brain-hackers/u-boot-brain.git
|
url = https://github.com/brain-hackers/u-boot-brain.git
|
||||||
[submodule "linux-brain"]
|
[submodule "linux-brain"]
|
||||||
path = linux-brain
|
path = linux-brain
|
||||||
url = https://github.com/brain-hackers/linux-brain
|
url = https://github.com/brain-hackers/linux-brain.git
|
||||||
[submodule "nkbin_maker"]
|
[submodule "nkbin_maker"]
|
||||||
path = nkbin_maker
|
path = nkbin_maker
|
||||||
url = https://github.com/brain-hackers/nkbin_maker.git
|
url = https://github.com/brain-hackers/nkbin_maker.git
|
||||||
|
[submodule "boot4u"]
|
||||||
|
path = boot4u
|
||||||
|
url = https://github.com/brain-hackers/boot4u.git
|
||||||
|
[submodule "brainlilo"]
|
||||||
|
path = brainlilo
|
||||||
|
url = https://github.com/brain-hackers/brainlilo.git
|
||||||
|
|||||||
79
Makefile
79
Makefile
@@ -1,7 +1,9 @@
|
|||||||
JOBS=$(shell grep -c '^processor' /proc/cpuinfo)
|
JOBS=$(shell grep -c '^processor' /proc/cpuinfo)
|
||||||
|
|
||||||
|
UBOOT_CROSS=$(shell ./tools/getcross u-boot)
|
||||||
|
LINUX_CROSS=$(shell ./tools/getcross linux)
|
||||||
|
ROOTFS_CROSS=$(shell ./tools/getcross rootfs)
|
||||||
export ARCH=arm
|
export ARCH=arm
|
||||||
export CROSS_COMPILE=arm-linux-gnueabi-
|
|
||||||
|
|
||||||
.PHONY:
|
.PHONY:
|
||||||
setup:
|
setup:
|
||||||
@@ -33,11 +35,11 @@ udefconfig-%:
|
|||||||
|
|
||||||
.PHONY:
|
.PHONY:
|
||||||
usavedefconfig:
|
usavedefconfig:
|
||||||
make -C ./u-boot-brain savedefconfig
|
make CROSS_COMPILE=$(UBOOT_CROSS) -C ./u-boot-brain savedefconfig
|
||||||
|
|
||||||
.PHONY:
|
.PHONY:
|
||||||
umenuconfig:
|
umenuconfig:
|
||||||
make -C ./u-boot-brain menuconfig
|
make CROSS_COMPILE=$(UBOOT_CROSS) -C ./u-boot-brain menuconfig
|
||||||
|
|
||||||
.PHONY:
|
.PHONY:
|
||||||
uclean:
|
uclean:
|
||||||
@@ -45,28 +47,65 @@ uclean:
|
|||||||
|
|
||||||
.PHONY:
|
.PHONY:
|
||||||
ubuild:
|
ubuild:
|
||||||
make -j$(JOBS) -C ./u-boot-brain u-boot.sb
|
if [ "$(UBOOT_CROSS)" = "arm-linux-gnueabi-" ]; then \
|
||||||
|
make CROSS_COMPILE=$(UBOOT_CROSS) -j$(JOBS) -C ./u-boot-brain u-boot.sb; \
|
||||||
|
else \
|
||||||
|
make CROSS_COMPILE=$(UBOOT_CROSS) -j$(JOBS) -C ./u-boot-brain u-boot.imx; \
|
||||||
|
fi
|
||||||
|
|
||||||
.PHONY:
|
.PHONY:
|
||||||
ldefconfig:
|
ldefconfig:
|
||||||
make -C ./linux-brain brain_defconfig
|
make -C ./linux-brain brain_defconfig
|
||||||
|
|
||||||
|
.PHONY:
|
||||||
|
ldefconfig-x1:
|
||||||
|
make -C ./linux-brain imx_v7_defconfig
|
||||||
|
|
||||||
.PHONY:
|
.PHONY:
|
||||||
lmenuconfig:
|
lmenuconfig:
|
||||||
make -C ./linux-brain menuconfig
|
make CROSS_COMPILE=$(LINUX_CROSS) -C ./linux-brain menuconfig
|
||||||
|
|
||||||
.PHONY:
|
.PHONY:
|
||||||
lsavedefconfig:
|
lsavedefconfig:
|
||||||
make -C ./linux-brain savedefconfig
|
make CROSS_COMPILE=$(LINUX_CROSS) -C ./linux-brain savedefconfig
|
||||||
mv ./linux-brain/defconfig ./linux-brain/arch/arm/configs/brain_defconfig
|
mv ./linux-brain/defconfig ./linux-brain/arch/arm/configs/brain_defconfig
|
||||||
|
|
||||||
|
.PHONY:
|
||||||
|
lsavedefconfig-x1:
|
||||||
|
make CROSS_COMPILE=$(LINUX_CROSS) -C ./linux-brain savedefconfig
|
||||||
|
mv ./linux-brain/defconfig ./linux-brain/arch/arm/configs/imx_v7_defconfig
|
||||||
|
|
||||||
.PHONY:
|
.PHONY:
|
||||||
lclean:
|
lclean:
|
||||||
make -C ./linux-brain distclean
|
make -C ./linux-brain distclean
|
||||||
|
|
||||||
.PHONY:
|
.PHONY:
|
||||||
lbuild:
|
lbuild:
|
||||||
make -j$(JOBS) -C ./linux-brain
|
make CROSS_COMPILE=$(LINUX_CROSS) -j$(JOBS) -C ./linux-brain
|
||||||
|
|
||||||
|
.PHONY:
|
||||||
|
ldebpkg:
|
||||||
|
$(MAKE) ldebpkg-build || $(MAKE) ldebpkg-clean
|
||||||
|
mkdir -p debian
|
||||||
|
mv linux-*.buildinfo debian/
|
||||||
|
mv linux-*.changes debian/
|
||||||
|
mv linux-*.diff.gz debian/
|
||||||
|
mv linux-*.dsc debian/
|
||||||
|
mv linux-*.orig.tar.gz debian/
|
||||||
|
mv linux-*.deb debian/
|
||||||
|
|
||||||
|
.PHONY:
|
||||||
|
ldebpkg-build:
|
||||||
|
make -j$(JOBS) -C ./linux-brain deb-pkg
|
||||||
|
|
||||||
|
.PHONY:
|
||||||
|
ldebpkg-clean:
|
||||||
|
rm -f linux-*.buildinfo
|
||||||
|
rm -f linux-*.changes
|
||||||
|
rm -f linux-*.diff.gz
|
||||||
|
rm -f linux-*.dsc
|
||||||
|
rm -f linux-*.orig.tar.gz
|
||||||
|
rm -f linux-*.deb
|
||||||
|
|
||||||
.PHONY:
|
.PHONY:
|
||||||
uuu:
|
uuu:
|
||||||
@@ -80,17 +119,34 @@ nkbin-maker:
|
|||||||
nk.bin:
|
nk.bin:
|
||||||
./nkbin_maker/bsd-ce ./u-boot-brain/u-boot.bin
|
./nkbin_maker/bsd-ce ./u-boot-brain/u-boot.bin
|
||||||
|
|
||||||
|
.PHONY:
|
||||||
|
boot4ubuild:
|
||||||
|
make -C ./boot4u
|
||||||
|
|
||||||
|
.PHONY:
|
||||||
|
boot4uclean:
|
||||||
|
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!"; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
mkdir -p brainux
|
sudo mkdir -p brainux
|
||||||
@if [ "$(CI)" = "true" ]; then \
|
@if [ "$(CI)" = "true" ]; then \
|
||||||
echo "I'm in CI and debootstrap without cache."; \
|
echo "I'm in CI and debootstrap without cache."; \
|
||||||
sudo debootstrap --arch=armel --foreign buster brainux/; \
|
sudo debootstrap --arch=$(ROOTFS_CROSS) --foreign bullseye brainux/; \
|
||||||
else \
|
else \
|
||||||
sudo debootstrap --arch=armel --foreign buster brainux/ http://localhost:65432/debian/; \
|
sudo debootstrap --arch=$(ROOTFS_CROSS) --foreign bullseye brainux/ http://localhost:65432/debian/; \
|
||||||
fi
|
fi
|
||||||
sudo cp /usr/bin/qemu-arm-static brainux/usr/bin/
|
sudo cp /usr/bin/qemu-arm-static brainux/usr/bin/
|
||||||
sudo cp ./os-brainux/setup_brainux.sh brainux/
|
sudo cp ./os-brainux/setup_brainux.sh brainux/
|
||||||
@@ -101,6 +157,9 @@ brainux:
|
|||||||
image/sd.img: clean_work
|
image/sd.img: clean_work
|
||||||
./image/build_image.sh
|
./image/build_image.sh
|
||||||
|
|
||||||
|
image/sd_x1.img: clean_work
|
||||||
|
./image/build_image_x1.sh
|
||||||
|
|
||||||
.PHONY:
|
.PHONY:
|
||||||
clean_work:
|
clean_work:
|
||||||
sudo rm -rf image/work
|
sudo rm -rf image/work
|
||||||
|
|||||||
45
README.md
45
README.md
@@ -3,7 +3,7 @@ buildbrain
|
|||||||
|
|
||||||
This repository includes:
|
This repository includes:
|
||||||
|
|
||||||
- linux-brain, u-boot-brain and nkbin_maker as submodules
|
- linux-brain, u-boot-brain, nkbin_maker and boot4u as submodules
|
||||||
- Useful build targets in Makefile
|
- Useful build targets in Makefile
|
||||||
- r3build.toml to watch changes that occur in submodules
|
- r3build.toml to watch changes that occur in submodules
|
||||||
|
|
||||||
@@ -12,6 +12,7 @@ Confirmed environments
|
|||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
- Debian 10 (buster) amd64
|
- Debian 10 (buster) amd64
|
||||||
|
- Debian 11 (bullseye) amd64
|
||||||
|
|
||||||
|
|
||||||
Getting Started
|
Getting Started
|
||||||
@@ -20,7 +21,7 @@ Getting Started
|
|||||||
1. Install dependencies.
|
1. Install dependencies.
|
||||||
|
|
||||||
```
|
```
|
||||||
$ sudo apt install build-essential bison flex libncurses5-dev gcc-arm-linux-gnueabi
|
$ sudo apt install build-essential bison flex libncurses5-dev gcc-arm-linux-gnueabi gcc-arm-linux-gnueabihf libssl-dev bc lzop qemu-user-static debootstrap kpartx libyaml-dev python3-pyelftools
|
||||||
```
|
```
|
||||||
|
|
||||||
1. Clone this repository with recursive clone enabled.
|
1. Clone this repository with recursive clone enabled.
|
||||||
@@ -41,34 +42,47 @@ Getting Started
|
|||||||
- Put `uuu` where the PATH executable points to.
|
- Put `uuu` where the PATH executable points to.
|
||||||
|
|
||||||
|
|
||||||
Build and inject U-Boot
|
Build U-Boot
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
1. Run `make udefconfig-sh*` to generate `.config`.
|
1. Run `make udefconfig-sh*` to generate `.config`.
|
||||||
|
|
||||||
- For Sx1: `make udefconfig-sh1`
|
- For Sx1: `make udefconfig-sh1`
|
||||||
- For Sx6: `make udefconfig-sh6`
|
- For Sx6: `make udefconfig-sh6`
|
||||||
|
- For x1: `make udefconfig-h1`
|
||||||
|
|
||||||
2. Run `make ubuild` to build whole repository and generate `u-boot.sb`.
|
2. Run `make ubuild` to build whole repository and generate `u-boot.sb` or `u-boot.bin`.
|
||||||
|
|
||||||
- i.MX283 loads a packed U-Boot executable called `u-boot.sb`.
|
- i.MX283 loads a packed U-Boot executable called `u-boot.sb`.
|
||||||
|
|
||||||
3. To inject the executable into i.MX283 in recovery mode, run `make uuu`.
|
|
||||||
|
|
||||||
|
Inject U-Boot into i.MX283 in recovery mode
|
||||||
|
-----------------------
|
||||||
|
1. Follow `Build U-Boot` procedure to make U-Boot binary.
|
||||||
|
|
||||||
|
1. Run `make uuu`
|
||||||
|
|
||||||
Build and make NK.bin
|
Build and make NK.bin
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
1. Run `make udefconfig` to generate `.config`.
|
1. Follow `Build U-Boot` procedure to make U-Boot binary.
|
||||||
|
|
||||||
2. Run `make ubuild` to build whole repository and generate `u-boot.bin`.
|
1. Run `make nkbin-maker`.
|
||||||
|
|
||||||
3. Run `make nkbin-maker`.
|
1. To make `nk.bin`, run `make nk.bin`.
|
||||||
|
|
||||||
4. To make `nk.bin`, run `make nk.bin`.
|
|
||||||
|
|
||||||
- nkbin_maker packs `u-boot.bin` into `nk.bin`.
|
- nkbin_maker packs `u-boot.bin` into `nk.bin`.
|
||||||
|
|
||||||
|
Build and deploy boot4u
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
1. Run `make boot4u`
|
||||||
|
|
||||||
|
1. Create index.din and copy AppMain.bin
|
||||||
|
- `mkdir /path/to/your/sd/1st/partition/App/boot4u`
|
||||||
|
- `touch /path/to/your/sd/1st/partition/App/boot4u/index.din`
|
||||||
|
- `cp boot4u/AppMain.bin /path/to/your/sd/1st/partition/App/boot4u/`
|
||||||
|
|
||||||
|
|
||||||
Build Linux
|
Build Linux
|
||||||
-----------
|
-----------
|
||||||
@@ -80,8 +94,8 @@ Build Linux
|
|||||||
1. Confirm that `linux-brain/arch/arm/boot/zImage` exists.
|
1. Confirm that `linux-brain/arch/arm/boot/zImage` exists.
|
||||||
|
|
||||||
|
|
||||||
Bootstrap Debian 10 (buster)
|
Bootstrap Debian 11 (bullseye)
|
||||||
----------------------------
|
------------------------------
|
||||||
|
|
||||||
1. Run `make ldefconfig lbuild`.
|
1. Run `make ldefconfig lbuild`.
|
||||||
|
|
||||||
@@ -89,10 +103,15 @@ Bootstrap Debian 10 (buster)
|
|||||||
|
|
||||||
1. Run `make brainux`.
|
1. Run `make brainux`.
|
||||||
|
|
||||||
1. Run `make image.sd.img`
|
1. Run `make image/sd.img`
|
||||||
|
|
||||||
1. Confirm that `image/sd.img` is built and burn it to an SD card.
|
1. Confirm that `image/sd.img` is built and burn it to an SD card.
|
||||||
|
|
||||||
|
Known issues
|
||||||
|
----------------------------------------
|
||||||
|
If you using gcc 10 for host compiler, `make ubuild` may fail.
|
||||||
|
To complete build, open `/u-boot-brain/scripts/dtc/dtc-lexer.lex.c` or `/u-boot-brain/scripts/dtc/dtc-parser.tab.c` then comment out `YYLTYPE yylloc;`
|
||||||
|
|
||||||
Watch changes in submodules & auto-build
|
Watch changes in submodules & auto-build
|
||||||
----------------------------------------
|
----------------------------------------
|
||||||
|
|
||||||
|
|||||||
1
boot4u
Submodule
1
boot4u
Submodule
Submodule boot4u added at 3f916a0cf7
1
brainlilo
Submodule
1
brainlilo
Submodule
Submodule brainlilo added at 0ef73cdeb4
23
image/LICENSE
Normal file
23
image/LICENSE
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
*** exeopener ***
|
||||||
|
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2022 Chiharu Shirasaka
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
@@ -6,19 +6,28 @@ REPO=$(git rev-parse --show-toplevel)
|
|||||||
WORK=${REPO}/image/work
|
WORK=${REPO}/image/work
|
||||||
LINUX=${REPO}/linux-brain
|
LINUX=${REPO}/linux-brain
|
||||||
IMG=${REPO}/image/sd.img
|
IMG=${REPO}/image/sd.img
|
||||||
|
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 "a7200" "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)
|
"a7200")
|
||||||
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;;
|
||||||
@@ -40,18 +49,33 @@ sfdisk ${IMG} < ${WORK}/part.sfdisk
|
|||||||
|
|
||||||
sudo kpartx -av ${IMG}
|
sudo kpartx -av ${IMG}
|
||||||
|
|
||||||
LOOPDEV=$(losetup -l | grep sd.img | grep -o 'loop.')
|
LOOPDEV=$(losetup -l | grep sd.img | grep -o 'loop.' | tail -n 1)
|
||||||
|
|
||||||
sudo mkfs.fat -F32 -v -I /dev/mapper/${LOOPDEV}p1
|
sudo mkfs.fat -n boot -F32 -v -I /dev/mapper/${LOOPDEV}p1
|
||||||
sudo mkfs.ext4 /dev/mapper/${LOOPDEV}p2
|
sudo mkfs.ext4 -L rootfs /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 mkdir -p ${WORK}/p1/nk
|
||||||
|
sudo cp ${WORK}/*.bin ${WORK}/p1/nk/
|
||||||
|
|
||||||
|
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"
|
||||||
|
gzip -d ${REPO}/image/exeopener.exe.gz
|
||||||
|
sudo cp ${REPO}/image/exeopener.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/
|
||||||
|
|
||||||
|
|||||||
52
image/build_image_x1.sh
Executable file
52
image/build_image_x1.sh
Executable file
@@ -0,0 +1,52 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -uex -o pipefail
|
||||||
|
|
||||||
|
JOBS=$(nproc)
|
||||||
|
REPO=$(git rev-parse --show-toplevel)
|
||||||
|
WORK=${REPO}/image/work
|
||||||
|
LINUX=${REPO}/linux-brain
|
||||||
|
IMG=${REPO}/image/sd_x1.img
|
||||||
|
export CROSS_COMPILE=arm-linux-gnueabihf-
|
||||||
|
|
||||||
|
mkdir -p ${WORK}
|
||||||
|
|
||||||
|
dd if=/dev/zero of=${IMG} bs=1M count=3072
|
||||||
|
|
||||||
|
START1=2048
|
||||||
|
SECTORS1=$((1024 * 1024 * 64 / 512))
|
||||||
|
START2=$((2048 + ${SECTORS1}))
|
||||||
|
|
||||||
|
cat <<EOF > ${WORK}/part.sfdisk
|
||||||
|
${IMG}1 : start=${START1}, size=${SECTORS1}, type=b
|
||||||
|
${IMG}2 : start=${START2}, type=83
|
||||||
|
EOF
|
||||||
|
|
||||||
|
sfdisk ${IMG} < ${WORK}/part.sfdisk
|
||||||
|
|
||||||
|
sudo kpartx -av ${IMG}
|
||||||
|
|
||||||
|
LOOPDEV=$(losetup -l | grep sd_x1.img | grep -o 'loop.')
|
||||||
|
|
||||||
|
sudo mkfs.fat -F32 -v -I /dev/mapper/${LOOPDEV}p1
|
||||||
|
sudo mkfs.ext4 /dev/mapper/${LOOPDEV}p2
|
||||||
|
|
||||||
|
mkdir -p ${WORK}/p1 ${WORK}/p2
|
||||||
|
sudo mount /dev/mapper/${LOOPDEV}p1 ${WORK}/p1
|
||||||
|
sudo mount /dev/mapper/${LOOPDEV}p2 ${WORK}/p2
|
||||||
|
|
||||||
|
sudo cp ${LINUX}/arch/arm/boot/zImage ${WORK}/p1/
|
||||||
|
sudo cp ${LINUX}/arch/arm/boot/dts/imx7ulp-pwh*.dtb ${WORK}/p1/
|
||||||
|
|
||||||
|
sudo cp ${REPO}/u-boot-brain/u-boot.bin ${WORK}/p1/
|
||||||
|
|
||||||
|
sudo mkdir -p ${WORK}/p1/App/boot4u
|
||||||
|
sudo cp ${REPO}/boot4u/AppMain.bin ${WORK}/p1/App/boot4u/
|
||||||
|
sudo touch ${WORK}/p1/App/boot4u/index.din
|
||||||
|
|
||||||
|
sudo cp -ra ${REPO}/brainux/* ${WORK}/p2/
|
||||||
|
|
||||||
|
sudo umount ${WORK}/p1 ${WORK}/p2
|
||||||
|
sudo kpartx -d ${IMG}
|
||||||
|
|
||||||
|
rmdir ${WORK}/p1 ${WORK}/p2
|
||||||
|
|
||||||
BIN
image/exeopener.exe.gz
Normal file
BIN
image/exeopener.exe.gz
Normal file
Binary file not shown.
Submodule linux-brain updated: 1f760c2230...60e1cb92ee
@@ -5,15 +5,17 @@ set -uex -o pipefail
|
|||||||
SRC=$1
|
SRC=$1
|
||||||
DST=$2
|
DST=$2
|
||||||
|
|
||||||
install -g root -o root -m 0644 $SRC/usr/lib/os-release $DST/usr/lib/os-release
|
|
||||||
install -g root -o root -m 0644 $SRC/etc/issue $DST/etc/issue
|
|
||||||
install -g root -o root -m 0644 $SRC/etc/issue.net $DST/etc/issue.net
|
|
||||||
install -g root -o root -m 0644 $SRC/etc/motd $DST/etc/motd
|
install -g root -o root -m 0644 $SRC/etc/motd $DST/etc/motd
|
||||||
|
install -g root -o root -m 0440 $SRC/etc/sudoers $DST/etc/sudoers
|
||||||
|
|
||||||
install -g root -o root -m 0644 $SRC/etc/X11/xorg.conf $DST/etc/X11/xorg.conf
|
install -g root -o root -m 0644 $SRC/etc/X11/xorg.conf $DST/etc/X11/xorg.conf
|
||||||
install -g root -o root -m 0644 $SRC/etc/X11/Xsession.d/96calibrate $DST/etc/X11/Xsession.d/96calibrate
|
install -g root -o root -m 0644 $SRC/etc/X11/Xsession.d/96calibrate $DST/etc/X11/Xsession.d/96calibrate
|
||||||
|
|
||||||
install -g root -o root -m 0644 -D $SRC/etc/xdg/weston/weston.ini $DST/etc/xdg/weston/weston.ini
|
install -g root -o root -m 0644 -D $SRC/etc/xdg/weston/weston.ini $DST/etc/xdg/weston/weston.ini
|
||||||
|
|
||||||
install -g root -o root -m 0644 -D $SRC/home/user/lxterminal/lxterminal.conf $DST/home/user/lxterminal/lxterminal.conf
|
install -g 1000 -o 1000 -m 0644 $SRC/home/user/.xprofile $DST/home/user/.xprofile
|
||||||
|
sudo -u#1000 -g#1000 mkdir -p $DST/home/user/.config/fcitx
|
||||||
|
install -g 1000 -o 1000 -m 0644 $SRC/home/user/.config/fcitx/profile $DST/home/user/.config/fcitx/profile
|
||||||
|
sudo -u#1000 -g#1000 mkdir -p $DST/home/user/lxterminal
|
||||||
|
install -g 1000 -o 1000 -m 0644 $SRC/home/user/lxterminal/lxterminal.conf $DST/home/user/lxterminal/lxterminal.conf
|
||||||
install -g root -o root -m 0644 -D $SRC/etc/jwm/system.jwmrc $DST/etc/jwm/system.jwmrc
|
install -g root -o root -m 0644 -D $SRC/etc/jwm/system.jwmrc $DST/etc/jwm/system.jwmrc
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
Brainux GNU/Linux 10 \n \l
|
|
||||||
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Brainux GNU/Linux 10
|
|
||||||
27
os-brainux/override/etc/sudoers
Normal file
27
os-brainux/override/etc/sudoers
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
#
|
||||||
|
# This file MUST be edited with the 'visudo' command as root.
|
||||||
|
#
|
||||||
|
# Please consider adding local content in /etc/sudoers.d/ instead of
|
||||||
|
# directly modifying this file.
|
||||||
|
#
|
||||||
|
# See the man page for details on how to write a sudoers file.
|
||||||
|
#
|
||||||
|
Defaults env_reset,pwfeedback
|
||||||
|
Defaults mail_badpass
|
||||||
|
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
||||||
|
|
||||||
|
# Host alias specification
|
||||||
|
|
||||||
|
# User alias specification
|
||||||
|
|
||||||
|
# Cmnd alias specification
|
||||||
|
|
||||||
|
# User privilege specification
|
||||||
|
root ALL=(ALL:ALL) ALL
|
||||||
|
|
||||||
|
# Allow members of group sudo to execute any command
|
||||||
|
%sudo ALL=(ALL:ALL) ALL
|
||||||
|
|
||||||
|
# See sudoers(5) for more information on "@include" directives:
|
||||||
|
|
||||||
|
@includedir /etc/sudoers.d
|
||||||
22
os-brainux/override/home/user/.config/fcitx/profile
Normal file
22
os-brainux/override/home/user/.config/fcitx/profile
Normal file
File diff suppressed because one or more lines are too long
7
os-brainux/override/home/user/.xprofile
Normal file
7
os-brainux/override/home/user/.xprofile
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
export GTK_IM_MODULE=fcitx
|
||||||
|
export QT_IM_MODULE=fcitx
|
||||||
|
export XMODIFIERS=@im=fcitx
|
||||||
|
|
||||||
|
# Uncomment the following line to enable fcitx-mozc
|
||||||
|
# fcitx-autostart &
|
||||||
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
PRETTY_NAME="Brainux GNU/Linux 10 (buster)"
|
|
||||||
NAME="Brainux GNU/Linux"
|
|
||||||
VERSION_ID="10"
|
|
||||||
VERSION="10 (buster)"
|
|
||||||
VERSION_CODENAME=buster
|
|
||||||
ID=debian
|
|
||||||
HOME_URL="https://github.com/brain-hackers/README"
|
|
||||||
SUPPORT_URL="https://github.com/brain-hackers/buildbrain"
|
|
||||||
BUG_REPORT_URL="https://github.com/brain-hackers/buildbrain"
|
|
||||||
@@ -20,12 +20,12 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
cat <<EOF > /etc/apt/sources.list
|
cat <<EOF > /etc/apt/sources.list
|
||||||
deb http://${REPO}/debian buster main contrib non-free
|
deb http://${REPO}/debian bullseye main contrib non-free
|
||||||
deb-src http://${REPO}/debian buster main contrib non-free
|
deb-src http://${REPO}/debian bullseye main contrib non-free
|
||||||
deb http://${REPO}/debian buster-updates main contrib non-free
|
deb http://${REPO}/debian bullseye-updates main contrib non-free
|
||||||
deb-src http://${REPO}/debian buster-updates main contrib non-free
|
deb-src http://${REPO}/debian bullseye-updates main contrib non-free
|
||||||
deb http://${REPO_SECURITY}/debian-security buster/updates main contrib non-free
|
deb http://${REPO_SECURITY}/debian-security bullseye-security/updates main contrib non-free
|
||||||
deb-src http://${REPO_SECURITY}/debian-security buster/updates main contrib non-free
|
deb-src http://${REPO_SECURITY}/debian-security bullseye-security/updates main contrib non-free
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat <<EOF > /etc/apt/apt.conf.d/90-norecommend
|
cat <<EOF > /etc/apt/apt.conf.d/90-norecommend
|
||||||
@@ -33,8 +33,10 @@ APT::Install-Recommends "0";
|
|||||||
APT::Install-Suggests "0";
|
APT::Install-Suggests "0";
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
# locales: locale has to be set before going any further
|
||||||
apt update -y
|
apt update -y
|
||||||
apt install -y locales
|
DEBIAN_FRONTEND=noninteractive \
|
||||||
|
apt install -y locales
|
||||||
|
|
||||||
echo "$TIMEZONE" > /etc/timezone && \
|
echo "$TIMEZONE" > /etc/timezone && \
|
||||||
dpkg-reconfigure -f noninteractive tzdata && \
|
dpkg-reconfigure -f noninteractive tzdata && \
|
||||||
@@ -43,28 +45,67 @@ echo "$TIMEZONE" > /etc/timezone && \
|
|||||||
dpkg-reconfigure -f noninteractive locales && \
|
dpkg-reconfigure -f noninteractive locales && \
|
||||||
update-locale LANG=en_US.UTF-8
|
update-locale LANG=en_US.UTF-8
|
||||||
|
|
||||||
|
LANG=en_US.UTF-8
|
||||||
|
|
||||||
|
rm /etc/localtime
|
||||||
|
ln -s /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
|
||||||
|
|
||||||
echo "brain" > /etc/hostname
|
echo "brain" > /etc/hostname
|
||||||
|
|
||||||
|
# Install packagecloud repository
|
||||||
|
# Reference: https://packagecloud.io/brainhackers/brainux/install
|
||||||
|
|
||||||
|
# curl, ca-certificates: downloads the GPG key from packagecloud
|
||||||
|
# gnupg, debian-archive-keyring: packagecloud verification dependency
|
||||||
|
DEBIAN_FRONTEND=noninteractive \
|
||||||
|
apt install -y curl ca-certificates gnupg debian-archive-keyring
|
||||||
|
|
||||||
|
# apt-transport-https can be installed after debian-archive-keyring being installed
|
||||||
|
DEBIAN_FRONTEND=noninteractive \
|
||||||
|
apt install -y apt-transport-https
|
||||||
|
|
||||||
|
# Install GPG key and packagecloud repository config
|
||||||
|
mkdir -p /etc/apt/keyrings
|
||||||
|
curl -fsSL "https://packagecloud.io/brainhackers/brainux/gpgkey" \
|
||||||
|
| gpg --dearmor > /etc/apt/keyrings/brainhackers_brainux-archive-keyring.gpg
|
||||||
|
|
||||||
|
cat <<EOF > /etc/apt/sources.list.d/packagecloud.list
|
||||||
|
deb [signed-by=/etc/apt/keyrings/brainhackers_brainux-archive-keyring.gpg] https://packagecloud.io/brainhackers/brainux/any/ any main
|
||||||
|
deb-src [signed-by=/etc/apt/keyrings/brainhackers_brainux-archive-keyring.gpg] https://packagecloud.io/brainhackers/brainux/any/ any main
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Fetch packagecloud repository
|
||||||
|
apt update -y
|
||||||
|
|
||||||
DEBIAN_FRONTEND=noninteractive \
|
DEBIAN_FRONTEND=noninteractive \
|
||||||
apt install -y dialog sudo \
|
apt install -y dialog sudo \
|
||||||
libjpeg-dev libfreetype6 libfreetype6-dev zlib1g-dev \
|
libjpeg-dev libfreetype6 libfreetype6-dev zlib1g-dev \
|
||||||
xserver-xorg xserver-xorg-video-fbdev xserver-xorg-dev xserver-xorg-input-evdev xinput-calibrator xorg-dev x11-apps xinit \
|
xserver-xorg xserver-xorg-video-fbdev xserver-xorg-dev xserver-xorg-input-evdev xinput-calibrator xorg-dev x11-apps xinit \
|
||||||
openbox obconf obmenu jwm \
|
jwm \
|
||||||
weston xwayland \
|
weston xwayland \
|
||||||
bash tmux vim htop \
|
bash tmux vim htop \
|
||||||
midori pcmanfm lxterminal xterm gnome-terminal fbterm uim-fep uim-anthy fonts-noto-cjk \
|
midori pcmanfm lxterminal xterm gnome-terminal fbterm uim-fep uim-anthy fonts-noto-cjk \
|
||||||
dbus udev alsa-utils usbutils iw \
|
dbus udev alsa-utils usbutils iw fake-hwclock systemd-timesyncd\
|
||||||
build-essential flex bison pkg-config autotools-dev libtool autoconf automake device-tree-compiler \
|
build-essential flex bison pkg-config autotools-dev libtool autoconf automake device-tree-compiler \
|
||||||
python3 python3-dev python3-setuptools python3-wheel python3-pip python3-smbus \
|
python3 python3-dev python3-setuptools python3-wheel python3-pip python3-smbus \
|
||||||
resolvconf net-tools ssh openssh-client avahi-daemon curl wget git
|
resolvconf net-tools ssh openssh-client avahi-daemon wget git \
|
||||||
|
network-manager zip neofetch sl python3-numpy ipython3 netsurf-gtk fcitx-anthy
|
||||||
|
|
||||||
|
# Packages from packagecloud
|
||||||
|
DEBIAN_FRONTEND=noninteractive \
|
||||||
|
apt install -y --install-recommends brain-config
|
||||||
|
|
||||||
|
systemctl enable fake-hwclock
|
||||||
|
|
||||||
# Ly
|
# Ly
|
||||||
apt install -y libpam0g-dev libxcb-xkb-dev
|
DEBIAN_FRONTEND=noninteractive \
|
||||||
|
apt install -y libpam0g-dev libxcb-xkb-dev
|
||||||
cd /
|
cd /
|
||||||
git clone https://github.com/nullgemm/ly.git
|
git clone --recurse-submodules -b master-24f017e https://github.com/brain-hackers/ly.git
|
||||||
cd ly
|
cd ly
|
||||||
make github
|
|
||||||
make
|
make
|
||||||
make install
|
make install
|
||||||
|
make installsystemd
|
||||||
cd /
|
cd /
|
||||||
rm -r ly
|
rm -r ly
|
||||||
systemctl enable ly
|
systemctl enable ly
|
||||||
@@ -92,15 +133,16 @@ usermod -a -G video user
|
|||||||
# Allow root login via UART
|
# Allow root login via UART
|
||||||
cat <<EOF >> /etc/securetty
|
cat <<EOF >> /etc/securetty
|
||||||
ttymxc0
|
ttymxc0
|
||||||
|
ttyLP0
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Get wild
|
# Get wild
|
||||||
cat <<EOF > /etc/apt/sources.list
|
cat <<EOF > /etc/apt/sources.list
|
||||||
deb http://deb.debian.org/debian buster main contrib non-free
|
deb http://deb.debian.org/debian bullseye main contrib non-free
|
||||||
deb-src http://deb.debian.org/debian buster main contrib non-free
|
deb-src http://deb.debian.org/debian bullseye main contrib non-free
|
||||||
deb http://deb.debian.org/debian buster-updates main contrib non-free
|
deb http://deb.debian.org/debian bullseye-updates main contrib non-free
|
||||||
deb-src http://deb.debian.org/debian buster-updates main contrib non-free
|
deb-src http://deb.debian.org/debian bullseye-updates main contrib non-free
|
||||||
deb http://deb.debian.org/debian-security buster/updates main contrib non-free
|
deb http://deb.debian.org/debian-security bullseye-security/updates main contrib non-free
|
||||||
deb-src http://deb.debian.org/debian-security buster/updates main contrib non-free
|
deb-src http://deb.debian.org/debian-security bullseye-security/updates main contrib non-free
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|||||||
36
tools/getcross
Executable file
36
tools/getcross
Executable file
@@ -0,0 +1,36 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
uboot() {
|
||||||
|
. ./u-boot-brain/.config
|
||||||
|
case "${CONFIG_SYS_CPU}" in
|
||||||
|
arm926ejs) echo -n "arm-linux-gnueabi-"; return;;
|
||||||
|
armv7) echo -n "arm-linux-gnueabihf-"; return;;
|
||||||
|
*) exit 1;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
linux() {
|
||||||
|
. ./linux-brain/.config
|
||||||
|
case "${CONFIG_CPU_ARM926T}_${CONFIG_ARCH_MULTI_V7}" in
|
||||||
|
y_) echo -n "arm-linux-gnueabi-"; return;;
|
||||||
|
_y) echo -n "arm-linux-gnueabihf-"; return;;
|
||||||
|
*) exit 1;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
rootfs() {
|
||||||
|
. ./linux-brain/.config
|
||||||
|
case "${CONFIG_CPU_ARM926T}_${CONFIG_ARCH_MULTI_V7}" in
|
||||||
|
y_) echo -n "armel"; return;;
|
||||||
|
_y) echo -n "armhf"; return;;
|
||||||
|
*) exit 1;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
u-boot) uboot ;;
|
||||||
|
linux) linux ;;
|
||||||
|
rootfs) rootfs ;;
|
||||||
|
*) exit 1; ;;
|
||||||
|
esac
|
||||||
Submodule u-boot-brain updated: 6390f0ed58...783749833d
Reference in New Issue
Block a user