Compare commits

...

46 Commits

Author SHA1 Message Date
Takumi Sueda
b90386fbd2 Merge pull request #32 from brain-hackers/ci-build20220125
Fix CI build
2022-04-08 01:11:30 +09:00
Takumi Sueda
f7e1dbeadf Specify DEBIAN_FRONTEND to suppress interactive installation 2022-02-27 22:49:35 +09:00
Takumi Sueda
6bc1d44016 Create parent directories with the correct permission 2022-02-27 22:49:06 +09:00
Takumi Sueda
8bc1c15958 Fix image name 2022-02-19 04:05:33 +09:00
Takumi Sueda
ffb3590060 Build boot4u 2022-02-19 03:26:55 +09:00
Takumi Sueda
45990eac88 Make directory with su privilage 2022-02-19 02:20:38 +09:00
Takumi Sueda
b9b99be34a Specify CROSS_COMPILE 2022-02-19 02:20:01 +09:00
Takumi Sueda
c3a5dbfe22 Update u-boot-brain 2022-02-19 01:30:48 +09:00
Takumi Sueda
d30ec39b6b Fix defconfig target 2022-02-19 01:05:54 +09:00
Takumi Sueda
152854cd1d Merge pull request #31 from brain-hackers/fix-misc
Fix misc
2022-02-14 01:20:29 +09:00
Takumi Sueda
c8e7e32db5 Update linux-brain 2022-02-14 01:17:22 +09:00
Takumi Sueda
32ba6d3825 Brainux: fix invalid Git args 2022-02-14 01:11:40 +09:00
Codex340
0a39083d9e Update how Ly is built. (#30)
Fix ly build.

Co-authored-by: Takumi Sueda <puhitaku@gmail.com>
2022-02-13 18:05:09 +09:00
Takumi Sueda
14275cdb60 Merge pull request #29 from brain-hackers/nkbinmaker_fix
bring back nkbin_maker
2022-01-25 10:51:26 +09:00
d5b86adc1c bring back nkbin_maker 2022-01-25 05:32:19 +09:00
Takumi Sueda
621a5e0b9a Merge pull request #28 from brain-hackers/reishoku/dependency-modification 2022-01-15 14:13:29 +09:00
KOSHIKAWA Kenichi
899aac01d9 README.md: add python3-pip and libyaml to dependency
Signed-off-by: KOSHIKAWA Kenichi <reishoku.misc@pm.me>
2022-01-14 00:29:32 +09:00
Takumi Sueda
627b8212ec Merge pull request #27 from brain-hackers/u-boot-202104
Update u-boot-brain to 2021.04
2021-12-26 20:37:09 +09:00
Takumi Sueda
e7f9e3f7a5 Update u-boot-brain to 2021.04 2021-12-26 20:35:13 +09:00
Takumi Sueda
162f065148 Merge pull request #26 from brain-hackers/x1s
Ready for PW-x1
2021-12-23 03:32:02 +09:00
Takumi Sueda
0ecb9895ac Update linux-brain and u-boot-brain 2021-12-23 03:28:31 +09:00
Takumi Sueda
2c89ef57d1 Brainux for x1 2021-12-07 23:01:31 +09:00
Takumi Sueda
5689b3a04e Merge pull request #25 from brain-hackers/bullseye
Upgrade to Bullseye
2021-12-07 22:26:59 +09:00
Takumi Sueda
12a69402c6 Remove openbox and friends 2021-12-07 21:08:10 +09:00
Takumi Sueda
04987d3792 Specify LANG env to prevent warnings 2021-12-07 21:07:56 +09:00
Takumi Sueda
9c56c4175a Correct repository path 2021-12-07 21:04:28 +09:00
Takumi Sueda
23790bcf20 Fix setup of systemd in chroot-ed environment 2021-12-07 20:35:10 +09:00
Takumi Sueda
f82168e7b1 Merge pull request #21 from 20100074/release-upgrade-bullseye
Upgrade from buster to bullseye
2021-12-07 20:25:06 +09:00
Takumi Sueda
f77dc68e69 Merge pull request #20 from 20100074/update-dependencies
Add debootstrap and kpartx to dependencies
2021-08-28 11:40:34 +09:00
KOSHIKAWA Kenichi
c59b6d7738 fixup! Upgrade from buster to bullseye 2021-08-26 22:05:29 +09:00
KOSHIKAWA Kenichi
8ca448ad1f Upgrade from buster to bullseye 2021-08-26 21:57:59 +09:00
KOSHIKAWA Kenichi
46100619b0 fixup! Add debootstrap and kpartx to dependencies 2021-08-26 21:42:34 +09:00
KOSHIKAWA Kenichi
ccd54db033 Add debootstrap and kpartx to dependencies 2021-08-26 21:23:35 +09:00
Takumi Sueda
ccd1d72e64 Merge pull request #19 from unasuke/update_readme_qemu
Add qemu-user-static to dependencies
2021-05-09 00:55:18 +09:00
Yusuke Nakamura
219d2ce3c0 Add qemu-user-static to dependencies
It is requied but not documented.
2021-05-08 23:52:18 +09:00
Takumi Sueda
d8c969cc7e Merge pull request #18 from unasuke/readme_typo
Fix typo in README
2021-05-08 22:27:19 +09:00
Takumi Sueda
682b8a44b4 Merge pull request #17 from unasuke/loopdev
Use last loop device from `loopdev -l`
2021-05-06 09:14:17 +09:00
Yusuke Nakamura
9eee52eef1 Fix typo in README 2021-05-05 22:14:03 +09:00
Yusuke Nakamura
6fa865562d Use last loop device from loopdev -l
In my env, `make image/sd.img` failed by following error.

```
+ sudo kpartx -av /home/unasuke/src/github.com/brain-hackers/buildbrain/image/sd.img
add map loop6p1 (253:8): 0 131072 linear 7:6 2048
add map loop6p2 (253:9): 0 12154880 linear 7:6 133120
++ losetup -l
++ grep -o loop.
++ grep sd.img
+ LOOPDEV='loop6
loop4
loop5
loop3'
+ sudo mkfs.fat -F32 -v -I /dev/mapper/loop6 loop4 loop5 loop3p1
mkfs.fat 4.1 (2017-01-24)
Bad block count : loop4
Usage: mkfs.fat [-a][-A][-c][-C][-v][-I][-l bad-block-file][-b backup-boot-sector]
       [-m boot-msg-file][-n volume-name][-i volume-id]
       [-s sectors-per-cluster][-S logical-sector-size][-f number-of-FATs]
       [-h hidden-sectors][-F fat-size][-r root-dir-entries][-R reserved-sectors]
       [-M FAT-media-byte][-D drive_number]
       [--invariant]
       [--help]
       /dev/name [blocks]
make: *** [Makefile:126: image/sd.img] エラー 1
```
2021-05-05 22:05:49 +09:00
Takumi Sueda
0cb4e30ace Add linux packaging targets 2021-04-21 03:27:29 +09:00
Takumi Sueda
882ebd83a1 Merge pull request #16 from brain-hackers/ci-next
Next Brainux
2021-04-19 19:54:45 +09:00
Takumi Sueda
07177b6a8e Fix wrong owner and group 2021-04-19 01:38:28 +09:00
Takumi Sueda
5ff900db79 Set timezone to JST 2021-04-05 04:47:13 +09:00
Takumi Sueda
0f934753d6 Install and prepare fcitx 2021-04-05 04:41:41 +09:00
Takumi Sueda
b8908199d5 Install fake-hwclock 2021-04-05 03:20:10 +09:00
Takumi Sueda
0b2f80fe0b Update linux-brain 2021-04-05 03:06:08 +09:00
15 changed files with 373 additions and 49 deletions

View File

@@ -87,6 +87,41 @@ jobs:
asset_name: listconfig
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:
runs-on: ubuntu-20.04
needs: [create_release]
@@ -145,6 +180,45 @@ jobs:
asset_name: ${{ steps.archive_name.outputs.name }}.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:
runs-on: ubuntu-20.04
needs: [create_release]
@@ -181,3 +255,46 @@ jobs:
asset_name: ${{ steps.image_name.outputs.name }}.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

3
.gitmodules vendored
View File

@@ -7,3 +7,6 @@
[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

View File

@@ -1,7 +1,9 @@
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 CROSS_COMPILE=arm-linux-gnueabi-
.PHONY:
setup:
@@ -33,11 +35,11 @@ udefconfig-%:
.PHONY:
usavedefconfig:
make -C ./u-boot-brain savedefconfig
make CROSS_COMPILE=$(UBOOT_CROSS) -C ./u-boot-brain savedefconfig
.PHONY:
umenuconfig:
make -C ./u-boot-brain menuconfig
make CROSS_COMPILE=$(UBOOT_CROSS) -C ./u-boot-brain menuconfig
.PHONY:
uclean:
@@ -45,28 +47,65 @@ uclean:
.PHONY:
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:
ldefconfig:
make -C ./linux-brain brain_defconfig
.PHONY:
ldefconfig-x1:
make -C ./linux-brain imx_v7_defconfig
.PHONY:
lmenuconfig:
make -C ./linux-brain menuconfig
make CROSS_COMPILE=$(LINUX_CROSS) -C ./linux-brain menuconfig
.PHONY:
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
.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:
lclean:
make -C ./linux-brain distclean
.PHONY:
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:
uuu:
@@ -80,17 +119,25 @@ nkbin-maker:
nk.bin:
./nkbin_maker/bsd-ce ./u-boot-brain/u-boot.bin
.PHONY:
boot4ubuild:
make -C ./boot4u
.PHONY:
boot4uclean:
make -C ./boot4u clean
brainux:
@if [ "$(shell uname)" != "Linux" ]; then \
echo "Debootstrap is only available in Linux!"; \
exit 1; \
fi
mkdir -p brainux
sudo mkdir -p brainux
@if [ "$(CI)" = "true" ]; then \
echo "I'm in CI and debootstrap without cache."; \
sudo debootstrap --arch=armel --foreign buster brainux/; \
sudo debootstrap --arch=$(ROOTFS_CROSS) --foreign buster brainux/; \
else \
sudo debootstrap --arch=armel --foreign buster brainux/ http://localhost:65432/debian/; \
sudo debootstrap --arch=$(ROOTFS_CROSS) --foreign buster brainux/ http://localhost:65432/debian/; \
fi
sudo cp /usr/bin/qemu-arm-static brainux/usr/bin/
sudo cp ./os-brainux/setup_brainux.sh brainux/
@@ -101,6 +148,9 @@ brainux:
image/sd.img: clean_work
./image/build_image.sh
image/sd_x1.img: clean_work
./image/build_image_x1.sh
.PHONY:
clean_work:
sudo rm -rf image/work

View File

@@ -3,7 +3,7 @@ buildbrain
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
- r3build.toml to watch changes that occur in submodules
@@ -12,6 +12,7 @@ Confirmed environments
----------------------
- Debian 10 (buster) amd64
- Debian 11 (bullseye) amd64
Getting Started
@@ -20,7 +21,7 @@ Getting Started
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.
@@ -41,34 +42,47 @@ Getting Started
- Put `uuu` where the PATH executable points to.
Build and inject U-Boot
Build U-Boot
-----------------------
1. Run `make udefconfig-sh*` to generate `.config`.
- For Sx1: `make udefconfig-sh1`
- 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`.
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
-----------------------
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`.
4. To make `nk.bin`, run `make nk.bin`.
1. To make `nk.bin`, run `make 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
-----------
@@ -80,8 +94,8 @@ Build Linux
1. Confirm that `linux-brain/arch/arm/boot/zImage` exists.
Bootstrap Debian 10 (buster)
----------------------------
Bootstrap Debian 11 (bullseye)
------------------------------
1. Run `make ldefconfig lbuild`.
@@ -89,10 +103,15 @@ Bootstrap Debian 10 (buster)
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.
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
----------------------------------------

1
boot4u Submodule

Submodule boot4u added at 3f916a0cf7

View File

@@ -6,6 +6,7 @@ REPO=$(git rev-parse --show-toplevel)
WORK=${REPO}/image/work
LINUX=${REPO}/linux-brain
IMG=${REPO}/image/sd.img
export CROSS_COMPILE=arm-linux-gnueabi-
mkdir -p ${WORK}
@@ -40,7 +41,7 @@ sfdisk ${IMG} < ${WORK}/part.sfdisk
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.ext4 /dev/mapper/${LOOPDEV}p2

52
image/build_image_x1.sh Executable file
View 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

View File

@@ -15,5 +15,9 @@ install -g root -o root -m 0644 $SRC/etc/X11/Xsession.d/96calibrate $DST/etc/X11
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

File diff suppressed because one or more lines are too long

View 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 &

View File

@@ -1,8 +1,8 @@
PRETTY_NAME="Brainux GNU/Linux 10 (buster)"
PRETTY_NAME="Brainux GNU/Linux 11 (bullseye)"
NAME="Brainux GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
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"

View File

@@ -20,12 +20,12 @@ else
fi
cat <<EOF > /etc/apt/sources.list
deb http://${REPO}/debian buster main contrib non-free
deb-src http://${REPO}/debian buster main contrib non-free
deb http://${REPO}/debian buster-updates main contrib non-free
deb-src http://${REPO}/debian buster-updates main contrib non-free
deb http://${REPO_SECURITY}/debian-security buster/updates main contrib non-free
deb-src http://${REPO_SECURITY}/debian-security buster/updates main contrib non-free
deb http://${REPO}/debian bullseye main contrib non-free
deb-src http://${REPO}/debian bullseye main contrib non-free
deb http://${REPO}/debian bullseye-updates main contrib non-free
deb-src http://${REPO}/debian bullseye-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 bullseye-security/updates main contrib non-free
EOF
cat <<EOF > /etc/apt/apt.conf.d/90-norecommend
@@ -34,7 +34,8 @@ APT::Install-Suggests "0";
EOF
apt update -y
apt install -y locales
DEBIAN_FRONTEND=noninteractive \
apt install -y locales
echo "$TIMEZONE" > /etc/timezone && \
dpkg-reconfigure -f noninteractive tzdata && \
@@ -43,26 +44,36 @@ echo "$TIMEZONE" > /etc/timezone && \
dpkg-reconfigure -f noninteractive locales && \
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
DEBIAN_FRONTEND=noninteractive \
apt install -y dialog sudo \
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 \
openbox obconf obmenu jwm \
jwm \
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 \
dbus udev alsa-utils usbutils iw fake-hwclock\
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
DEBIAN_FRONTEND=noninteractive \
apt install -y --install-recommends fcitx-anthy
systemctl enable fake-hwclock
# Ly
apt install -y libpam0g-dev libxcb-xkb-dev
DEBIAN_FRONTEND=noninteractive \
apt install -y libpam0g-dev libxcb-xkb-dev
cd /
git clone https://github.com/nullgemm/ly.git
git clone --recurse-submodules https://github.com/nullgemm/ly.git
cd ly
make github
make
make install
cd /
@@ -92,15 +103,16 @@ usermod -a -G video user
# Allow root login via UART
cat <<EOF >> /etc/securetty
ttymxc0
ttyLP0
EOF
# Get wild
cat <<EOF > /etc/apt/sources.list
deb http://deb.debian.org/debian buster main contrib non-free
deb-src http://deb.debian.org/debian buster main contrib non-free
deb http://deb.debian.org/debian buster-updates main contrib non-free
deb-src http://deb.debian.org/debian buster-updates main contrib non-free
deb http://deb.debian.org/debian-security buster/updates main contrib non-free
deb-src http://deb.debian.org/debian-security buster/updates main contrib non-free
deb http://deb.debian.org/debian bullseye main contrib non-free
deb-src http://deb.debian.org/debian bullseye main contrib non-free
deb http://deb.debian.org/debian bullseye-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 bullseye-security/updates main contrib non-free
deb-src http://deb.debian.org/debian-security bullseye-security/updates main contrib non-free
EOF

36
tools/getcross Executable file
View 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