mirror of
https://github.com/brain-hackers/buildbrain
synced 2026-03-29 09:11:08 +09:00
Compare commits
47 Commits
2022-05-17
...
2023-07-29
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
611706771f | ||
|
|
2fa3904480 | ||
|
|
3479812f91 | ||
|
|
94d37b1b76 | ||
|
|
d6719fd49f | ||
|
|
1de1747fbb | ||
|
|
d885ca6bc1 | ||
|
|
b242f06d78 | ||
|
|
d534aa7416 | ||
|
|
870363a92e | ||
|
|
8ca8a3ab12 | ||
|
|
33e3afbf13 | ||
|
|
bc2c108d77 | ||
|
|
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 |
18
.github/workflows/build.yml
vendored
18
.github/workflows/build.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
|||||||
outputs:
|
outputs:
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
submodules: false
|
submodules: false
|
||||||
@@ -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
|
||||||
@@ -41,7 +41,7 @@ jobs:
|
|||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
needs: [create_release]
|
needs: [create_release]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Workaround for apt update failure
|
- name: Workaround for apt update failure
|
||||||
@@ -91,7 +91,7 @@ jobs:
|
|||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
needs: [create_release]
|
needs: [create_release]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Workaround for apt update failure
|
- name: Workaround for apt update failure
|
||||||
@@ -128,7 +128,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- model: g5300
|
- model: a7200
|
||||||
nk: edna3exe.bin
|
nk: edna3exe.bin
|
||||||
lilo: gen2.bin
|
lilo: gen2.bin
|
||||||
- model: sh1
|
- model: sh1
|
||||||
@@ -154,7 +154,7 @@ jobs:
|
|||||||
lilo: gen3_7.bin
|
lilo: gen3_7.bin
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Workaround for apt update failure
|
- name: Workaround for apt update failure
|
||||||
@@ -200,7 +200,7 @@ jobs:
|
|||||||
- model: h1
|
- model: h1
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Workaround for apt update failure
|
- name: Workaround for apt update failure
|
||||||
@@ -234,7 +234,7 @@ jobs:
|
|||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
needs: [create_release]
|
needs: [create_release]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Make /opt writable
|
- name: Make /opt writable
|
||||||
@@ -277,7 +277,7 @@ jobs:
|
|||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
needs: [create_release]
|
needs: [create_release]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Workaround for apt update failure
|
- name: Workaround for apt update failure
|
||||||
|
|||||||
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -13,3 +13,6 @@
|
|||||||
[submodule "brainlilo"]
|
[submodule "brainlilo"]
|
||||||
path = brainlilo
|
path = brainlilo
|
||||||
url = https://github.com/brain-hackers/brainlilo.git
|
url = https://github.com/brain-hackers/brainlilo.git
|
||||||
|
[submodule "buildroot"]
|
||||||
|
path = buildroot
|
||||||
|
url = https://github.com/brain-hackers/buildroot.git
|
||||||
|
|||||||
20
Makefile
20
Makefile
@@ -135,7 +135,6 @@ lilobuild:
|
|||||||
liloclean:
|
liloclean:
|
||||||
make -C ./brainlilo clean
|
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!"; \
|
||||||
@@ -144,21 +143,32 @@ brainux:
|
|||||||
sudo 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=$(ROOTFS_CROSS) --foreign buster brainux/; \
|
sudo debootstrap --arch=$(ROOTFS_CROSS) --foreign bullseye brainux/; \
|
||||||
else \
|
else \
|
||||||
sudo debootstrap --arch=$(ROOTFS_CROSS) --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/
|
||||||
|
sudo ./os-brainux/override-pre.sh ./os-brainux/override ./brainux
|
||||||
sudo -E chroot brainux /setup_brainux.sh
|
sudo -E chroot brainux /setup_brainux.sh
|
||||||
sudo rm brainux/setup_brainux.sh
|
sudo rm brainux/setup_brainux.sh
|
||||||
sudo ./os-brainux/override.sh ./os-brainux/override ./brainux
|
sudo ./os-brainux/override.sh ./os-brainux/override ./brainux
|
||||||
|
|
||||||
|
buildroot_rootfs:
|
||||||
|
make -C buildroot brain_imx28_defconfig
|
||||||
|
make -C buildroot -j 12
|
||||||
|
sudo mkdir -p buildroot_rootfs
|
||||||
|
sudo tar -C ./buildroot_rootfs -xf buildroot/output/images/rootfs.tar
|
||||||
|
|
||||||
image/sd.img: clean_work
|
image/sd.img: clean_work
|
||||||
./image/build_image.sh
|
./image/build_image.sh brainux sd.img 3072
|
||||||
|
|
||||||
image/sd_x1.img: clean_work
|
image/sd_x1.img: clean_work
|
||||||
./image/build_image_x1.sh
|
./image/build_image_x1.sh brainux sd_x1.img 3072
|
||||||
|
|
||||||
|
image/sd_buildroot.img: clean_work
|
||||||
|
./image/build_image.sh buildroot_rootfs sd_buildroot.img 128
|
||||||
|
|
||||||
|
|
||||||
.PHONY:
|
.PHONY:
|
||||||
clean_work:
|
clean_work:
|
||||||
|
|||||||
20
README.md
20
README.md
@@ -94,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 11 (bullseye)
|
Build a Debian rootfs
|
||||||
------------------------------
|
---------------------
|
||||||
|
|
||||||
1. Run `make ldefconfig lbuild`.
|
1. Run `make ldefconfig lbuild`.
|
||||||
|
|
||||||
@@ -107,9 +107,23 @@ Bootstrap Debian 11 (bullseye)
|
|||||||
|
|
||||||
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.
|
||||||
|
|
||||||
|
|
||||||
|
Build a Buildroot rootfs
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
Buildroot rootfs aims to be the most lightweight rootfs for experimental use. `make buildroot_rootfs` runs the defconfig target for rootfs-only build and then builds the rootfs tarball and a CPIO archive for initramfs. `make image/sd_buildroot.img` makes a bootable SD image in `image` directory like the typical Brainux SD image.
|
||||||
|
|
||||||
|
If you want to customize the build of Buildroot, `cd` into `buildroot` and use the following targets:
|
||||||
|
|
||||||
|
- `make menuconfig` to change the configuration
|
||||||
|
- `make` to build the rootfs (`-j` option might give you extra speed)
|
||||||
|
|
||||||
|
`image/sd_buildroot.img` target expects presence of the tarball at `buildroot/output/images/rootfs.tar`. You'll have to `clean` and rebuild every time you change the Buildroot's config before making the SD image.
|
||||||
|
|
||||||
|
|
||||||
Known issues
|
Known issues
|
||||||
----------------------------------------
|
----------------------------------------
|
||||||
If you using gcc 10 for host compiler, `make ubuild` may fail.
|
If you use GCC 10 for the 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;`
|
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
|
||||||
|
|||||||
Submodule brainlilo updated: c826f2581e...0ef73cdeb4
1
buildroot
Submodule
1
buildroot
Submodule
Submodule buildroot added at e39044fa44
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.
|
||||||
@@ -5,13 +5,16 @@ JOBS=$(nproc)
|
|||||||
REPO=$(git rev-parse --show-toplevel)
|
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
|
ROOTFS=$1
|
||||||
|
IMG_NAME=$2
|
||||||
|
IMG=${REPO}/image/${IMG_NAME}
|
||||||
|
SIZE_M=$3
|
||||||
export CROSS_COMPILE=arm-linux-gnueabi-
|
export CROSS_COMPILE=arm-linux-gnueabi-
|
||||||
|
|
||||||
mkdir -p ${WORK}
|
mkdir -p ${WORK}
|
||||||
mkdir -p ${WORK}/lilobin
|
mkdir -p ${WORK}/lilobin
|
||||||
|
|
||||||
for i in "g5300" "sh1" "sh2" "sh3" "sh4" "sh5" "sh6" "sh7"; do
|
for i in "a7200" "sh1" "sh2" "sh3" "sh4" "sh5" "sh6" "sh7"; do
|
||||||
NUM=$(echo $i | sed -E 's/sh//g')
|
NUM=$(echo $i | sed -E 's/sh//g')
|
||||||
|
|
||||||
make -C ${REPO}/u-boot-brain distclean pw${i}_defconfig
|
make -C ${REPO}/u-boot-brain distclean pw${i}_defconfig
|
||||||
@@ -19,7 +22,7 @@ for i in "g5300" "sh1" "sh2" "sh3" "sh4" "sh5" "sh6" "sh7"; do
|
|||||||
${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
|
||||||
"g5300")
|
"a7200")
|
||||||
mv ${REPO}/nk.bin ${WORK}/edna3exe.bin
|
mv ${REPO}/nk.bin ${WORK}/edna3exe.bin
|
||||||
mv ${REPO}/u-boot-brain/u-boot.bin ${WORK}/lilobin/gen2.bin;;
|
mv ${REPO}/u-boot-brain/u-boot.bin ${WORK}/lilobin/gen2.bin;;
|
||||||
"sh1" | "sh2" | "sh3")
|
"sh1" | "sh2" | "sh3")
|
||||||
@@ -34,7 +37,7 @@ for i in "g5300" "sh1" "sh2" "sh3" "sh4" "sh5" "sh6" "sh7"; do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
dd if=/dev/zero of=${IMG} bs=1M count=3072
|
dd if=/dev/zero of=${IMG} bs=1M count=${SIZE_M}
|
||||||
|
|
||||||
START1=2048
|
START1=2048
|
||||||
SECTORS1=$((1024 * 1024 * 64 / 512))
|
SECTORS1=$((1024 * 1024 * 64 / 512))
|
||||||
@@ -49,10 +52,10 @@ sfdisk ${IMG} < ${WORK}/part.sfdisk
|
|||||||
|
|
||||||
sudo kpartx -av ${IMG}
|
sudo kpartx -av ${IMG}
|
||||||
|
|
||||||
LOOPDEV=$(losetup -l | grep sd.img | grep -o 'loop.' | tail -n 1)
|
LOOPDEV=$(losetup -l | grep ${IMG_NAME} | 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 -o utf8=true /dev/mapper/${LOOPDEV}p1 ${WORK}/p1
|
sudo mount -o utf8=true /dev/mapper/${LOOPDEV}p1 ${WORK}/p1
|
||||||
@@ -60,7 +63,8 @@ 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-pw*.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
|
make -C ${REPO}/brainlilo
|
||||||
|
|
||||||
@@ -69,12 +73,14 @@ sudo mkdir -p "${LILO}"
|
|||||||
sudo touch "${LILO}/index.din"
|
sudo touch "${LILO}/index.din"
|
||||||
sudo touch "${LILO}/AppMain.cfg"
|
sudo touch "${LILO}/AppMain.cfg"
|
||||||
sudo cp ${REPO}/brainlilo/*.dll "${LILO}/"
|
sudo cp ${REPO}/brainlilo/*.dll "${LILO}/"
|
||||||
sudo cp ${REPO}/brainlilo/BrainLILO.exe "${LILO}/AppMain.exe"
|
sudo cp ${REPO}/brainlilo/BrainLILO.exe "${LILO}/AppMain_.exe"
|
||||||
|
gzip -cd ${REPO}/image/exeopener.exe.gz > ${REPO}/image/exeopener.exe
|
||||||
|
sudo cp ${REPO}/image/exeopener.exe "${LILO}/AppMain.exe"
|
||||||
|
|
||||||
sudo mkdir -p ${WORK}/p1/loader
|
sudo mkdir -p ${WORK}/p1/loader
|
||||||
sudo cp ${WORK}/lilobin/*.bin ${WORK}/p1/loader/
|
sudo cp ${WORK}/lilobin/*.bin ${WORK}/p1/loader/
|
||||||
|
|
||||||
sudo cp -ra ${REPO}/brainux/* ${WORK}/p2/
|
sudo cp -ra ${REPO}/${ROOTFS}/* ${WORK}/p2/
|
||||||
|
|
||||||
sudo umount ${WORK}/p1 ${WORK}/p2
|
sudo umount ${WORK}/p1 ${WORK}/p2
|
||||||
sudo kpartx -d ${IMG}
|
sudo kpartx -d ${IMG}
|
||||||
|
|||||||
BIN
image/exeopener.exe.gz
Normal file
BIN
image/exeopener.exe.gz
Normal file
Binary file not shown.
Submodule linux-brain updated: e342c1c000...60e1cb92ee
10
os-brainux/override-pre.sh
Executable file
10
os-brainux/override-pre.sh
Executable file
@@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -uex -o pipefail
|
||||||
|
|
||||||
|
SRC=$1
|
||||||
|
DST=$2
|
||||||
|
|
||||||
|
install -g root -o root -m 0644 $SRC/lib/systemd/system/boot.mount $DST/lib/systemd/system/boot.mount
|
||||||
|
install -g root -o root -m 0644 $SRC/lib/systemd/system/rndis_gadget.service $DST/lib/systemd/system/rndis_gadget.service
|
||||||
|
install -g root -o root -m 0755 $SRC/usr/bin/enable_rndis_gadget $DST/usr/bin/enable_rndis_gadget
|
||||||
@@ -5,10 +5,8 @@ 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
|
||||||
|
|||||||
@@ -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
|
||||||
10
os-brainux/override/lib/systemd/system/boot.mount
Normal file
10
os-brainux/override/lib/systemd/system/boot.mount
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Mount boot partition
|
||||||
|
|
||||||
|
[Mount]
|
||||||
|
What=/dev/mmcblk1p1
|
||||||
|
Where=/boot
|
||||||
|
Options=ro
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Enable RNDIS USB Gadget
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=/usr/bin/enable_rndis_gadget
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
25
os-brainux/override/usr/bin/enable_rndis_gadget
Executable file
25
os-brainux/override/usr/bin/enable_rndis_gadget
Executable file
@@ -0,0 +1,25 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
g=/sys/kernel/config/usb_gadget/eth
|
||||||
|
|
||||||
|
mkdir ${g}
|
||||||
|
|
||||||
|
echo "0x3066" > ${g}/bcdDevice
|
||||||
|
echo "1" > ${g}/os_desc/use
|
||||||
|
echo "0xcd" > ${g}/os_desc/b_vendor_code
|
||||||
|
echo "MSFT100" > ${g}/os_desc/qw_sign
|
||||||
|
|
||||||
|
mkdir ${g}/functions/rndis.rn0
|
||||||
|
echo "RNDIS" > ${g}/functions/rndis.rn0/os_desc/interface.rndis/compatible_id
|
||||||
|
echo "5162001" > ${g}/functions/rndis.rn0/os_desc/interface.rndis/sub_compatible_id
|
||||||
|
echo "8a:15:8b:44:3a:02" > ${g}/functions/rndis.rn0/dev_addr
|
||||||
|
echo "8a:15:8b:44:3a:01" > ${g}/functions/rndis.rn0/host_addr
|
||||||
|
|
||||||
|
mkdir ${g}/configs/c.1
|
||||||
|
ln -s ${g}/functions/rndis.rn0 ${g}/configs/c.1/
|
||||||
|
|
||||||
|
echo "ci_hdrc.0" > ${g}/UDC
|
||||||
|
|
||||||
|
sleep 1
|
||||||
|
ifconfig usb0 up
|
||||||
|
dhclient
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
PRETTY_NAME="Brainux GNU/Linux 11 (bullseye)"
|
|
||||||
NAME="Brainux GNU/Linux"
|
|
||||||
VERSION_ID="11"
|
|
||||||
VERSION="11 (bullseye)"
|
|
||||||
VERSION_CODENAME=bullseye
|
|
||||||
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"
|
|
||||||
@@ -33,6 +33,7 @@ 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
|
||||||
DEBIAN_FRONTEND=noninteractive \
|
DEBIAN_FRONTEND=noninteractive \
|
||||||
apt install -y locales
|
apt install -y locales
|
||||||
@@ -50,6 +51,32 @@ rm /etc/localtime
|
|||||||
ln -s /usr/share/zoneinfo/Asia/Tokyo /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 \
|
||||||
@@ -58,14 +85,15 @@ DEBIAN_FRONTEND=noninteractive \
|
|||||||
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 fake-hwclock\
|
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
|
network-manager zip neofetch sl python3-numpy ipython3 netsurf-gtk fcitx-anthy
|
||||||
|
|
||||||
|
# Packages from packagecloud
|
||||||
DEBIAN_FRONTEND=noninteractive \
|
DEBIAN_FRONTEND=noninteractive \
|
||||||
apt install -y --install-recommends fcitx-anthy
|
apt install -y --install-recommends brain-config
|
||||||
|
|
||||||
systemctl enable fake-hwclock
|
systemctl enable fake-hwclock
|
||||||
|
|
||||||
@@ -73,10 +101,11 @@ systemctl enable fake-hwclock
|
|||||||
DEBIAN_FRONTEND=noninteractive \
|
DEBIAN_FRONTEND=noninteractive \
|
||||||
apt install -y libpam0g-dev libxcb-xkb-dev
|
apt install -y libpam0g-dev libxcb-xkb-dev
|
||||||
cd /
|
cd /
|
||||||
git clone --recurse-submodules 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
|
make
|
||||||
make install
|
make install
|
||||||
|
make installsystemd
|
||||||
cd /
|
cd /
|
||||||
rm -r ly
|
rm -r ly
|
||||||
systemctl enable ly
|
systemctl enable ly
|
||||||
@@ -107,6 +136,12 @@ ttymxc0
|
|||||||
ttyLP0
|
ttyLP0
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
# Enable /boot mount
|
||||||
|
systemctl enable boot.mount
|
||||||
|
|
||||||
|
# Enable RNDIS gadget
|
||||||
|
systemctl enable rndis_gadget
|
||||||
|
|
||||||
# Get wild
|
# Get wild
|
||||||
cat <<EOF > /etc/apt/sources.list
|
cat <<EOF > /etc/apt/sources.list
|
||||||
deb http://deb.debian.org/debian bullseye main contrib non-free
|
deb http://deb.debian.org/debian bullseye main contrib non-free
|
||||||
|
|||||||
Submodule u-boot-brain updated: 0449ff1430...783749833d
Reference in New Issue
Block a user