mirror of
https://github.com/brain-hackers/buildbrain
synced 2026-03-29 09:11:08 +09:00
Compare commits
45 Commits
2022-04-08
...
suspend
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
35f04a7b11 | ||
|
|
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 |
20
.github/workflows/build.yml
vendored
20
.github/workflows/build.yml
vendored
@@ -31,7 +31,7 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ steps.release_name.outputs.name }}
|
||||
tag_name: ${{ steps.release_name.outputs.name }}-tag
|
||||
release_name: ${{ steps.release_name.outputs.name }}
|
||||
body_path: CHANGES.md
|
||||
draft: false
|
||||
@@ -128,20 +128,30 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- model: a7200
|
||||
nk: edna3exe.bin
|
||||
lilo: gen2.bin
|
||||
- model: sh1
|
||||
nk: edsa1exe.bin
|
||||
lilo: gen3_1.bin
|
||||
- model: sh2
|
||||
nk: edsa2exe.bin
|
||||
lilo: gen3_2.bin
|
||||
- model: sh3
|
||||
nk: edsa3exe.bin
|
||||
lilo: gen3_3.bin
|
||||
- model: sh4
|
||||
nk: edsh4exe.bin
|
||||
lilo: gen3_4.bin
|
||||
- model: sh5
|
||||
nk: edsh5exe.bin
|
||||
lilo: gen3_5.bin
|
||||
- model: sh6
|
||||
nk: edsh6exe.bin
|
||||
lilo: gen3_6.bin
|
||||
- model: sh7
|
||||
nk: edsh7exe.bin
|
||||
lilo: gen3_7.bin
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@@ -164,6 +174,7 @@ jobs:
|
||||
run: |
|
||||
mkdir release
|
||||
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 ./nk.bin release/${{ matrix.nk }}
|
||||
zip -r release.zip release/
|
||||
@@ -226,6 +237,13 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
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
|
||||
run: sudo rm /etc/apt/sources.list.d/github_git-lfs.*
|
||||
- name: Install deps
|
||||
|
||||
7
.gitmodules
vendored
7
.gitmodules
vendored
@@ -3,10 +3,13 @@
|
||||
url = https://github.com/brain-hackers/u-boot-brain.git
|
||||
[submodule "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"]
|
||||
path = nkbin_maker
|
||||
url = https://github.com/brain-hackers/nkbin_maker.git
|
||||
[submodule "boot4u"]
|
||||
path = boot4u
|
||||
url = https://github.com/brain-hackers/boot4u
|
||||
url = https://github.com/brain-hackers/boot4u.git
|
||||
[submodule "brainlilo"]
|
||||
path = brainlilo
|
||||
url = https://github.com/brain-hackers/brainlilo.git
|
||||
|
||||
13
Makefile
13
Makefile
@@ -127,6 +127,15 @@ boot4ubuild:
|
||||
boot4uclean:
|
||||
make -C ./boot4u clean
|
||||
|
||||
.PHONY:
|
||||
lilobuild:
|
||||
make -C ./brainlilo
|
||||
|
||||
.PHONY:
|
||||
liloclean:
|
||||
make -C ./brainlilo clean
|
||||
|
||||
|
||||
brainux:
|
||||
@if [ "$(shell uname)" != "Linux" ]; then \
|
||||
echo "Debootstrap is only available in Linux!"; \
|
||||
@@ -135,9 +144,9 @@ brainux:
|
||||
sudo mkdir -p brainux
|
||||
@if [ "$(CI)" = "true" ]; then \
|
||||
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 \
|
||||
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
|
||||
sudo cp /usr/bin/qemu-arm-static brainux/usr/bin/
|
||||
sudo cp ./os-brainux/setup_brainux.sh brainux/
|
||||
|
||||
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.
|
||||
@@ -9,17 +9,25 @@ IMG=${REPO}/image/sd.img
|
||||
export CROSS_COMPILE=arm-linux-gnueabi-
|
||||
|
||||
mkdir -p ${WORK}
|
||||
mkdir -p ${WORK}/lilobin
|
||||
|
||||
for i in $(seq 1 7); do
|
||||
make -C ${REPO}/u-boot-brain pwsh${i}_defconfig
|
||||
for i in "a7200" "sh1" "sh2" "sh3" "sh4" "sh5" "sh6" "sh7"; do
|
||||
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
|
||||
${REPO}/nkbin_maker/bsd-ce ${REPO}/u-boot-brain/u-boot.bin
|
||||
|
||||
case $i in
|
||||
1|2|3)
|
||||
mv ${REPO}/nk.bin ${WORK}/edsa${i}exe.bin;;
|
||||
4|5|6|7)
|
||||
mv ${REPO}/nk.bin ${WORK}/edsh${i}exe.bin;;
|
||||
"a7200")
|
||||
mv ${REPO}/nk.bin ${WORK}/edna3exe.bin
|
||||
mv ${REPO}/u-boot-brain/u-boot.bin ${WORK}/lilobin/gen2.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"
|
||||
exit 1;;
|
||||
@@ -43,16 +51,31 @@ sudo kpartx -av ${IMG}
|
||||
|
||||
LOOPDEV=$(losetup -l | grep sd.img | grep -o 'loop.' | tail -n 1)
|
||||
|
||||
sudo mkfs.fat -F32 -v -I /dev/mapper/${LOOPDEV}p1
|
||||
sudo mkfs.ext4 /dev/mapper/${LOOPDEV}p2
|
||||
sudo mkfs.fat -n boot -F32 -v -I /dev/mapper/${LOOPDEV}p1
|
||||
sudo mkfs.ext4 -L rootfs /dev/mapper/${LOOPDEV}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 cp ${LINUX}/arch/arm/boot/zImage ${WORK}/p1/
|
||||
sudo cp ${LINUX}/arch/arm/boot/dts/imx28-pwsh*.dtb ${WORK}/p1/
|
||||
sudo cp ${WORK}/*.bin ${WORK}/p1/
|
||||
sudo cp ${LINUX}/arch/arm/boot/dts/imx28-pw*.dtb ${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/
|
||||
|
||||
|
||||
BIN
image/exeopener.exe.gz
Normal file
BIN
image/exeopener.exe.gz
Normal file
Binary file not shown.
Submodule linux-brain updated: 90e75bc2c4...60e1cb92ee
@@ -5,14 +5,14 @@ set -uex -o pipefail
|
||||
SRC=$1
|
||||
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 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/Xsession.d/96calibrate $DST/etc/X11/Xsession.d/96calibrate
|
||||
|
||||
install -g root -o root -m 0644 $SRC/etc/systemd/logind.conf $DST/etc/systemd/logind.conf
|
||||
|
||||
install -g root -o root -m 0644 -D $SRC/etc/xdg/weston/weston.ini $DST/etc/xdg/weston/weston.ini
|
||||
|
||||
install -g 1000 -o 1000 -m 0644 $SRC/home/user/.xprofile $DST/home/user/.xprofile
|
||||
|
||||
@@ -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
|
||||
41
os-brainux/override/etc/systemd/logind.conf
Normal file
41
os-brainux/override/etc/systemd/logind.conf
Normal file
@@ -0,0 +1,41 @@
|
||||
# This file is part of systemd.
|
||||
#
|
||||
# systemd is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# Entries in this file show the compile time defaults.
|
||||
# You can change settings by editing this file.
|
||||
# Defaults can be restored by simply deleting this file.
|
||||
#
|
||||
# See logind.conf(5) for details.
|
||||
|
||||
[Login]
|
||||
#NAutoVTs=6
|
||||
#ReserveVT=6
|
||||
#KillUserProcesses=no
|
||||
#KillOnlyUsers=
|
||||
#KillExcludeUsers=root
|
||||
#InhibitDelayMaxSec=5
|
||||
#UserStopDelaySec=10
|
||||
HandlePowerKey=suspend
|
||||
#HandleSuspendKey=suspend
|
||||
#HandleHibernateKey=hibernate
|
||||
#HandleLidSwitch=suspend
|
||||
#HandleLidSwitchExternalPower=suspend
|
||||
#HandleLidSwitchDocked=ignore
|
||||
#HandleRebootKey=reboot
|
||||
#PowerKeyIgnoreInhibited=no
|
||||
#SuspendKeyIgnoreInhibited=no
|
||||
#HibernateKeyIgnoreInhibited=no
|
||||
#LidSwitchIgnoreInhibited=yes
|
||||
#RebootKeyIgnoreInhibited=no
|
||||
#HoldoffTimeoutSec=30s
|
||||
#IdleAction=ignore
|
||||
#IdleActionSec=30min
|
||||
#RuntimeDirectorySize=10%
|
||||
#RuntimeDirectoryInodes=400k
|
||||
#RemoveIPC=yes
|
||||
#InhibitorsMax=8192
|
||||
#SessionsMax=8192
|
||||
@@ -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";
|
||||
EOF
|
||||
|
||||
# locales: locale has to be set before going any further
|
||||
apt update -y
|
||||
DEBIAN_FRONTEND=noninteractive \
|
||||
apt install -y locales
|
||||
@@ -50,6 +51,32 @@ rm /etc/localtime
|
||||
ln -s /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
|
||||
|
||||
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 \
|
||||
apt install -y dialog sudo \
|
||||
libjpeg-dev libfreetype6 libfreetype6-dev zlib1g-dev \
|
||||
@@ -58,13 +85,15 @@ DEBIAN_FRONTEND=noninteractive \
|
||||
weston xwayland \
|
||||
bash tmux vim htop \
|
||||
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 \
|
||||
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 fcitx-anthy
|
||||
apt install -y --install-recommends brain-config
|
||||
|
||||
systemctl enable fake-hwclock
|
||||
|
||||
@@ -72,10 +101,11 @@ systemctl enable fake-hwclock
|
||||
DEBIAN_FRONTEND=noninteractive \
|
||||
apt install -y libpam0g-dev libxcb-xkb-dev
|
||||
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
|
||||
make
|
||||
make install
|
||||
make installsystemd
|
||||
cd /
|
||||
rm -r ly
|
||||
systemctl enable ly
|
||||
|
||||
Submodule u-boot-brain updated: 0449ff1430...783749833d
Reference in New Issue
Block a user