mirror of
https://github.com/brain-hackers/buildbrain
synced 2026-03-29 09:11:08 +09:00
Compare commits
105 Commits
2021-01-17
...
emmc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9134d2b25c | ||
|
|
575b450af9 | ||
|
|
5852372b9b | ||
|
|
3817fc5eeb | ||
|
|
462651541a | ||
|
|
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 | ||
|
|
c133c10be3 | ||
|
|
7c9634349f | ||
|
|
48f1a6cb57 | ||
|
|
5e84e8719a | ||
|
|
177e60d3ce | ||
|
|
039a0f2868 | ||
|
|
2e0d446f9c | ||
|
|
7b96c4dfb4 | ||
|
|
9fe585f2e1 | ||
|
|
5a62bc1858 | ||
|
|
b5c7a41797 | ||
|
|
38bf49bd68 | ||
|
|
88ee1a04fc | ||
|
|
08e8a5a316 | ||
|
|
8930b5f3f3 | ||
|
|
da73a4f413 | ||
|
|
6120889990 | ||
|
|
52cb032a89 | ||
|
|
884623144f | ||
|
|
98505fbd1d | ||
|
|
d455d582b8 | ||
|
|
d25815ff52 | ||
|
|
3b26348a09 | ||
|
|
b1b57ed394 | ||
|
|
76838eb82a | ||
|
|
af6774678c | ||
|
|
e6e2d04a92 | ||
|
|
1ebd86c1a2 | ||
|
|
6a001a15df | ||
|
|
ab77561ec7 | ||
|
|
fc61df79b6 | ||
|
|
a0a58f83c6 |
289
.gitchangelog.rc
Normal file
289
.gitchangelog.rc
Normal file
@@ -0,0 +1,289 @@
|
|||||||
|
# -*- coding: utf-8; mode: python -*-
|
||||||
|
##
|
||||||
|
## Format
|
||||||
|
##
|
||||||
|
## ACTION: [AUDIENCE:] COMMIT_MSG [!TAG ...]
|
||||||
|
##
|
||||||
|
## Description
|
||||||
|
##
|
||||||
|
## ACTION is one of 'chg', 'fix', 'new'
|
||||||
|
##
|
||||||
|
## Is WHAT the change is about.
|
||||||
|
##
|
||||||
|
## 'chg' is for refactor, small improvement, cosmetic changes...
|
||||||
|
## 'fix' is for bug fixes
|
||||||
|
## 'new' is for new features, big improvement
|
||||||
|
##
|
||||||
|
## AUDIENCE is optional and one of 'dev', 'usr', 'pkg', 'test', 'doc'
|
||||||
|
##
|
||||||
|
## Is WHO is concerned by the change.
|
||||||
|
##
|
||||||
|
## 'dev' is for developpers (API changes, refactors...)
|
||||||
|
## 'usr' is for final users (UI changes)
|
||||||
|
## 'pkg' is for packagers (packaging changes)
|
||||||
|
## 'test' is for testers (test only related changes)
|
||||||
|
## 'doc' is for doc guys (doc only changes)
|
||||||
|
##
|
||||||
|
## COMMIT_MSG is ... well ... the commit message itself.
|
||||||
|
##
|
||||||
|
## TAGs are additionnal adjective as 'refactor' 'minor' 'cosmetic'
|
||||||
|
##
|
||||||
|
## They are preceded with a '!' or a '@' (prefer the former, as the
|
||||||
|
## latter is wrongly interpreted in github.) Commonly used tags are:
|
||||||
|
##
|
||||||
|
## 'refactor' is obviously for refactoring code only
|
||||||
|
## 'minor' is for a very meaningless change (a typo, adding a comment)
|
||||||
|
## 'cosmetic' is for cosmetic driven change (re-indentation, 80-col...)
|
||||||
|
## 'wip' is for partial functionality but complete subfunctionality.
|
||||||
|
##
|
||||||
|
## Example:
|
||||||
|
##
|
||||||
|
## new: usr: support of bazaar implemented
|
||||||
|
## chg: re-indentend some lines !cosmetic
|
||||||
|
## new: dev: updated code to be compatible with last version of killer lib.
|
||||||
|
## fix: pkg: updated year of licence coverage.
|
||||||
|
## new: test: added a bunch of test around user usability of feature X.
|
||||||
|
## fix: typo in spelling my name in comment. !minor
|
||||||
|
##
|
||||||
|
## Please note that multi-line commit message are supported, and only the
|
||||||
|
## first line will be considered as the "summary" of the commit message. So
|
||||||
|
## tags, and other rules only applies to the summary. The body of the commit
|
||||||
|
## message will be displayed in the changelog without reformatting.
|
||||||
|
|
||||||
|
|
||||||
|
##
|
||||||
|
## ``ignore_regexps`` is a line of regexps
|
||||||
|
##
|
||||||
|
## Any commit having its full commit message matching any regexp listed here
|
||||||
|
## will be ignored and won't be reported in the changelog.
|
||||||
|
##
|
||||||
|
ignore_regexps = [
|
||||||
|
r'@minor', r'!minor',
|
||||||
|
r'@cosmetic', r'!cosmetic',
|
||||||
|
r'@refactor', r'!refactor',
|
||||||
|
r'@wip', r'!wip',
|
||||||
|
r'^([cC]hg|[fF]ix|[nN]ew)\s*:\s*[p|P]kg:',
|
||||||
|
r'^([cC]hg|[fF]ix|[nN]ew)\s*:\s*[d|D]ev:',
|
||||||
|
r'^(.{3,3}\s*:)?\s*[fF]irst commit.?\s*$',
|
||||||
|
r'^$', ## ignore commits with empty messages
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
## ``section_regexps`` is a list of 2-tuples associating a string label and a
|
||||||
|
## list of regexp
|
||||||
|
##
|
||||||
|
## Commit messages will be classified in sections thanks to this. Section
|
||||||
|
## titles are the label, and a commit is classified under this section if any
|
||||||
|
## of the regexps associated is matching.
|
||||||
|
##
|
||||||
|
## Please note that ``section_regexps`` will only classify commits and won't
|
||||||
|
## make any changes to the contents. So you'll probably want to go check
|
||||||
|
## ``subject_process`` (or ``body_process``) to do some changes to the subject,
|
||||||
|
## whenever you are tweaking this variable.
|
||||||
|
##
|
||||||
|
section_regexps = [
|
||||||
|
('New', [
|
||||||
|
r'^[nN]ew\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$',
|
||||||
|
]),
|
||||||
|
('Changes', [
|
||||||
|
r'^[cC]hg\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$',
|
||||||
|
]),
|
||||||
|
('Fix', [
|
||||||
|
r'^[fF]ix\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$',
|
||||||
|
]),
|
||||||
|
|
||||||
|
('Other', None ## Match all lines
|
||||||
|
),
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
## ``body_process`` is a callable
|
||||||
|
##
|
||||||
|
## This callable will be given the original body and result will
|
||||||
|
## be used in the changelog.
|
||||||
|
##
|
||||||
|
## Available constructs are:
|
||||||
|
##
|
||||||
|
## - any python callable that take one txt argument and return txt argument.
|
||||||
|
##
|
||||||
|
## - ReSub(pattern, replacement): will apply regexp substitution.
|
||||||
|
##
|
||||||
|
## - Indent(chars=" "): will indent the text with the prefix
|
||||||
|
## Please remember that template engines gets also to modify the text and
|
||||||
|
## will usually indent themselves the text if needed.
|
||||||
|
##
|
||||||
|
## - Wrap(regexp=r"\n\n"): re-wrap text in separate paragraph to fill 80-Columns
|
||||||
|
##
|
||||||
|
## - noop: do nothing
|
||||||
|
##
|
||||||
|
## - ucfirst: ensure the first letter is uppercase.
|
||||||
|
## (usually used in the ``subject_process`` pipeline)
|
||||||
|
##
|
||||||
|
## - final_dot: ensure text finishes with a dot
|
||||||
|
## (usually used in the ``subject_process`` pipeline)
|
||||||
|
##
|
||||||
|
## - strip: remove any spaces before or after the content of the string
|
||||||
|
##
|
||||||
|
## - SetIfEmpty(msg="No commit message."): will set the text to
|
||||||
|
## whatever given ``msg`` if the current text is empty.
|
||||||
|
##
|
||||||
|
## Additionally, you can `pipe` the provided filters, for instance:
|
||||||
|
#body_process = Wrap(regexp=r'\n(?=\w+\s*:)') | Indent(chars=" ")
|
||||||
|
#body_process = Wrap(regexp=r'\n(?=\w+\s*:)')
|
||||||
|
#body_process = noop
|
||||||
|
body_process = ReSub(r'((^|\n)[A-Z]\w+(-\w+)*: .*(\n\s+.*)*)+$', r'') | strip
|
||||||
|
|
||||||
|
|
||||||
|
## ``subject_process`` is a callable
|
||||||
|
##
|
||||||
|
## This callable will be given the original subject and result will
|
||||||
|
## be used in the changelog.
|
||||||
|
##
|
||||||
|
## Available constructs are those listed in ``body_process`` doc.
|
||||||
|
subject_process = (strip |
|
||||||
|
ReSub(r'^([cC]hg|[fF]ix|[nN]ew)\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n@]*)(@[a-z]+\s+)*$', r'\4') |
|
||||||
|
SetIfEmpty("No commit message.") | ucfirst | final_dot)
|
||||||
|
|
||||||
|
|
||||||
|
## ``tag_filter_regexp`` is a regexp
|
||||||
|
##
|
||||||
|
## Tags that will be used for the changelog must match this regexp.
|
||||||
|
##
|
||||||
|
tag_filter_regexp = r'^[0-9-]+$'
|
||||||
|
|
||||||
|
|
||||||
|
## ``unreleased_version_label`` is a string or a callable that outputs a string
|
||||||
|
##
|
||||||
|
## This label will be used as the changelog Title of the last set of changes
|
||||||
|
## between last valid tag and HEAD if any.
|
||||||
|
unreleased_version_label = "(unreleased)"
|
||||||
|
|
||||||
|
|
||||||
|
## ``output_engine`` is a callable
|
||||||
|
##
|
||||||
|
## This will change the output format of the generated changelog file
|
||||||
|
##
|
||||||
|
## Available choices are:
|
||||||
|
##
|
||||||
|
## - rest_py
|
||||||
|
##
|
||||||
|
## Legacy pure python engine, outputs ReSTructured text.
|
||||||
|
## This is the default.
|
||||||
|
##
|
||||||
|
## - mustache(<template_name>)
|
||||||
|
##
|
||||||
|
## Template name could be any of the available templates in
|
||||||
|
## ``templates/mustache/*.tpl``.
|
||||||
|
## Requires python package ``pystache``.
|
||||||
|
## Examples:
|
||||||
|
## - mustache("markdown")
|
||||||
|
## - mustache("restructuredtext")
|
||||||
|
##
|
||||||
|
## - makotemplate(<template_name>)
|
||||||
|
##
|
||||||
|
## Template name could be any of the available templates in
|
||||||
|
## ``templates/mako/*.tpl``.
|
||||||
|
## Requires python package ``mako``.
|
||||||
|
## Examples:
|
||||||
|
## - makotemplate("restructuredtext")
|
||||||
|
##
|
||||||
|
output_engine = rest_py
|
||||||
|
#output_engine = mustache("restructuredtext")
|
||||||
|
#output_engine = mustache("markdown")
|
||||||
|
#output_engine = makotemplate("restructuredtext")
|
||||||
|
|
||||||
|
|
||||||
|
## ``include_merge`` is a boolean
|
||||||
|
##
|
||||||
|
## This option tells git-log whether to include merge commits in the log.
|
||||||
|
## The default is to include them.
|
||||||
|
include_merge = True
|
||||||
|
|
||||||
|
|
||||||
|
## ``log_encoding`` is a string identifier
|
||||||
|
##
|
||||||
|
## This option tells gitchangelog what encoding is outputed by ``git log``.
|
||||||
|
## The default is to be clever about it: it checks ``git config`` for
|
||||||
|
## ``i18n.logOutputEncoding``, and if not found will default to git's own
|
||||||
|
## default: ``utf-8``.
|
||||||
|
#log_encoding = 'utf-8'
|
||||||
|
|
||||||
|
|
||||||
|
## ``publish`` is a callable
|
||||||
|
##
|
||||||
|
## Sets what ``gitchangelog`` should do with the output generated by
|
||||||
|
## the output engine. ``publish`` is a callable taking one argument
|
||||||
|
## that is an interator on lines from the output engine.
|
||||||
|
##
|
||||||
|
## Some helper callable are provided:
|
||||||
|
##
|
||||||
|
## Available choices are:
|
||||||
|
##
|
||||||
|
## - stdout
|
||||||
|
##
|
||||||
|
## Outputs directly to standard output
|
||||||
|
## (This is the default)
|
||||||
|
##
|
||||||
|
## - FileInsertAtFirstRegexMatch(file, pattern, idx=lamda m: m.start())
|
||||||
|
##
|
||||||
|
## Creates a callable that will parse given file for the given
|
||||||
|
## regex pattern and will insert the output in the file.
|
||||||
|
## ``idx`` is a callable that receive the matching object and
|
||||||
|
## must return a integer index point where to insert the
|
||||||
|
## the output in the file. Default is to return the position of
|
||||||
|
## the start of the matched string.
|
||||||
|
##
|
||||||
|
## - FileRegexSubst(file, pattern, replace, flags)
|
||||||
|
##
|
||||||
|
## Apply a replace inplace in the given file. Your regex pattern must
|
||||||
|
## take care of everything and might be more complex. Check the README
|
||||||
|
## for a complete copy-pastable example.
|
||||||
|
##
|
||||||
|
# publish = FileInsertIntoFirstRegexMatch(
|
||||||
|
# "CHANGELOG.rst",
|
||||||
|
# r'/(?P<rev>[0-9]+\.[0-9]+(\.[0-9]+)?)\s+\([0-9]+-[0-9]{2}-[0-9]{2}\)\n--+\n/',
|
||||||
|
# idx=lambda m: m.start(1)
|
||||||
|
# )
|
||||||
|
#publish = stdout
|
||||||
|
|
||||||
|
|
||||||
|
## ``revs`` is a list of callable or a list of string
|
||||||
|
##
|
||||||
|
## callable will be called to resolve as strings and allow dynamical
|
||||||
|
## computation of these. The result will be used as revisions for
|
||||||
|
## gitchangelog (as if directly stated on the command line). This allows
|
||||||
|
## to filter exaclty which commits will be read by gitchangelog.
|
||||||
|
##
|
||||||
|
## To get a full documentation on the format of these strings, please
|
||||||
|
## refer to the ``git rev-list`` arguments. There are many examples.
|
||||||
|
##
|
||||||
|
## Using callables is especially useful, for instance, if you
|
||||||
|
## are using gitchangelog to generate incrementally your changelog.
|
||||||
|
##
|
||||||
|
## Some helpers are provided, you can use them::
|
||||||
|
##
|
||||||
|
## - FileFirstRegexMatch(file, pattern): will return a callable that will
|
||||||
|
## return the first string match for the given pattern in the given file.
|
||||||
|
## If you use named sub-patterns in your regex pattern, it'll output only
|
||||||
|
## the string matching the regex pattern named "rev".
|
||||||
|
##
|
||||||
|
## - Caret(rev): will return the rev prefixed by a "^", which is a
|
||||||
|
## way to remove the given revision and all its ancestor.
|
||||||
|
##
|
||||||
|
## Please note that if you provide a rev-list on the command line, it'll
|
||||||
|
## replace this value (which will then be ignored).
|
||||||
|
##
|
||||||
|
## If empty, then ``gitchangelog`` will act as it had to generate a full
|
||||||
|
## changelog.
|
||||||
|
##
|
||||||
|
## The default is to use all commits to make the changelog.
|
||||||
|
#revs = ["^1.0.3", ]
|
||||||
|
#revs = [
|
||||||
|
# Caret(
|
||||||
|
# FileFirstRegexMatch(
|
||||||
|
# "CHANGELOG.rst",
|
||||||
|
# r"(?P<rev>[0-9]+\.[0-9]+(\.[0-9]+)?)\s+\([0-9]+-[0-9]{2}-[0-9]{2}\)\n--+\n")),
|
||||||
|
# "HEAD"
|
||||||
|
#]
|
||||||
|
revs = []
|
||||||
259
.github/workflows/build.yml
vendored
259
.github/workflows/build.yml
vendored
@@ -12,41 +12,146 @@ 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
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
submodules: false
|
||||||
- name: Generate release name
|
- name: Generate release name
|
||||||
id: release_name
|
id: release_name
|
||||||
# https://github.community/t/how-to-get-just-the-tag-name/16241/4
|
# https://github.community/t/how-to-get-just-the-tag-name/16241/4
|
||||||
run: echo ::set-output name=name::${GITHUB_REF/refs\/*s\//}
|
run: echo ::set-output name=name::${GITHUB_REF/refs\/*s\//}
|
||||||
|
- name: Generate changes file
|
||||||
|
uses: sarnold/gitchangelog-action@master
|
||||||
|
with:
|
||||||
|
config_file: .gitchangelog.rc
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Create release
|
- name: Create release
|
||||||
id: create_release
|
id: create_release
|
||||||
uses: actions/create-release@v1
|
uses: actions/create-release@v1
|
||||||
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: |
|
body_path: CHANGES.md
|
||||||
Build ${{ steps.release_name.outputs.name }}
|
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: true
|
prerelease: true
|
||||||
|
|
||||||
build:
|
build-linux:
|
||||||
|
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-gnueabi qemu-user-static debootstrap python3-pip
|
||||||
|
- name: Upgrade pip and setuptools
|
||||||
|
run: pip3 install -U pip setuptools
|
||||||
|
- name: Install listconfig
|
||||||
|
run: pip3 install listconfig
|
||||||
|
- name: Configure for Linux
|
||||||
|
run: make ldefconfig
|
||||||
|
- name: Build Linux
|
||||||
|
run: make lbuild
|
||||||
|
- name: Setup releases
|
||||||
|
id: release_name
|
||||||
|
run: |
|
||||||
|
mkdir release
|
||||||
|
cp ./linux-brain/arch/arm/boot/dts/imx28-pwsh*.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-${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
|
||||||
|
- name: Generate listconfig
|
||||||
|
run: listconfig ./linux-brain/Kconfig ./linux-brain/.config > listconfig
|
||||||
|
- name: Upload listconfig
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ needs.create_release.outputs.upload_url }}
|
||||||
|
asset_path: listconfig
|
||||||
|
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
|
runs-on: ubuntu-20.04
|
||||||
needs: [create_release]
|
needs: [create_release]
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
- model: g5300
|
||||||
|
nk: edna3exe.bin
|
||||||
|
lilo: gen2.bin
|
||||||
- model: sh1
|
- model: sh1
|
||||||
nk: edsa1exe.bin
|
nk: edsa1exe.bin
|
||||||
|
lilo: gen3_1.bin
|
||||||
- model: sh2
|
- model: sh2
|
||||||
nk: edsa2exe.bin
|
nk: edsa2exe.bin
|
||||||
|
lilo: gen3_2.bin
|
||||||
- model: sh3
|
- model: sh3
|
||||||
nk: edsa3exe.bin
|
nk: edsa3exe.bin
|
||||||
|
lilo: gen3_3.bin
|
||||||
- model: sh4
|
- model: sh4
|
||||||
nk: edsh4exe.bin
|
nk: edsh4exe.bin
|
||||||
|
lilo: gen3_4.bin
|
||||||
- model: sh5
|
- model: sh5
|
||||||
nk: edsh5exe.bin
|
nk: edsh5exe.bin
|
||||||
|
lilo: gen3_5.bin
|
||||||
- model: sh6
|
- model: sh6
|
||||||
nk: edsh6exe.bin
|
nk: edsh6exe.bin
|
||||||
|
lilo: gen3_6.bin
|
||||||
|
- model: sh7
|
||||||
|
nk: edsh7exe.bin
|
||||||
|
lilo: gen3_7.bin
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
@@ -64,28 +169,18 @@ jobs:
|
|||||||
run: make ubuild
|
run: make ubuild
|
||||||
- name: Generate NK.bin
|
- name: Generate NK.bin
|
||||||
run: make nk.bin
|
run: make nk.bin
|
||||||
- name: Configure for Linux
|
|
||||||
run: make ldefconfig
|
|
||||||
- name: Build Linux
|
|
||||||
run: make lbuild
|
|
||||||
|
|
||||||
# - name: Build Debian Root # Wait for buildroot
|
|
||||||
# run: |
|
|
||||||
# ./tools/aptcache_linux_amd64 \
|
|
||||||
# -rule 'local=localhost:65432, remote=ftp.us.debian.org' \
|
|
||||||
# -rule 'local=localhost:65433, remote=security.debian.org' &
|
|
||||||
# make debian
|
|
||||||
|
|
||||||
- name: Setup releases
|
- name: Setup releases
|
||||||
id: release_name
|
id: release_name
|
||||||
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 }}
|
||||||
cp ./linux-brain/arch/arm/boot/dts/imx28-pw${{ matrix.model }}.dtb release/imx28-pw${{ matrix.model }}.dtb
|
|
||||||
cp ./linux-brain/arch/arm/boot/zImage release/zImage
|
|
||||||
zip -r release.zip release/
|
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
|
- name: Upload release.zip
|
||||||
uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
env:
|
env:
|
||||||
@@ -93,5 +188,131 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
upload_url: ${{ needs.create_release.outputs.upload_url }}
|
upload_url: ${{ needs.create_release.outputs.upload_url }}
|
||||||
asset_path: release.zip
|
asset_path: release.zip
|
||||||
asset_name: ${{ matrix.model }}-boot.zip
|
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]
|
||||||
|
steps:
|
||||||
|
- 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
|
||||||
|
run: sudo apt update && sudo apt install kpartx build-essential bison flex libncurses5-dev gcc-arm-linux-gnueabi qemu-user-static debootstrap
|
||||||
|
- name: Configure for Linux
|
||||||
|
run: make ldefconfig
|
||||||
|
- name: Build Linux
|
||||||
|
run: make lbuild
|
||||||
|
- name: Build Debian Root
|
||||||
|
run: make brainux
|
||||||
|
- name: Build bsd-ce
|
||||||
|
run: make -C nkbin_maker bsd-ce
|
||||||
|
- name: Generate image name
|
||||||
|
id: image_name
|
||||||
|
run: echo ::set-output name=name::sdimage-${GITHUB_REF/refs\/*s\//}
|
||||||
|
- name: Build SD image
|
||||||
|
run: make image/sd.img && mv image/sd.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
|
||||||
|
|
||||||
|
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
|
asset_content_type: application/zip
|
||||||
|
|||||||
5
.gitignore
vendored
5
.gitignore
vendored
@@ -1,4 +1,7 @@
|
|||||||
env
|
env
|
||||||
debian
|
brainux
|
||||||
cache/*
|
cache/*
|
||||||
!cache/.gitkeep
|
!cache/.gitkeep
|
||||||
|
nk.bin
|
||||||
|
image/sd.img
|
||||||
|
image/work
|
||||||
|
|||||||
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
|
||||||
|
|||||||
106
Makefile
106
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,19 +119,60 @@ 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
|
||||||
|
|
||||||
debian:
|
.PHONY:
|
||||||
|
boot4ubuild:
|
||||||
|
make -C ./boot4u
|
||||||
|
|
||||||
|
.PHONY:
|
||||||
|
boot4uclean:
|
||||||
|
make -C ./boot4u clean
|
||||||
|
|
||||||
|
.PHONY:
|
||||||
|
lilobuild:
|
||||||
|
make -C ./brainlilo
|
||||||
|
|
||||||
|
.PHONY:
|
||||||
|
liloclean:
|
||||||
|
make -C ./brainlilo clean
|
||||||
|
|
||||||
|
|
||||||
|
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 debian
|
sudo mkdir -p brainux
|
||||||
sudo debootstrap --arch=armel --foreign buster debian/ http://localhost:65432/debian/
|
@if [ "$(CI)" = "true" ]; then \
|
||||||
sudo cp /usr/bin/qemu-arm-static debian/usr/bin/
|
echo "I'm in CI and debootstrap without cache."; \
|
||||||
sudo cp ./tools/setup_debian.sh debian/
|
sudo debootstrap --arch=$(ROOTFS_CROSS) --foreign buster brainux/; \
|
||||||
sudo chroot debian /setup_debian.sh
|
else \
|
||||||
|
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/
|
||||||
|
sudo -E chroot brainux /setup_brainux.sh
|
||||||
|
sudo rm brainux/setup_brainux.sh
|
||||||
|
sudo ./os-brainux/override.sh ./os-brainux/override ./brainux
|
||||||
|
|
||||||
|
image/sd.img: clean_work
|
||||||
|
./image/build_image.sh
|
||||||
|
|
||||||
|
image/emmc.img: clean_work
|
||||||
|
./image/build_image_emmc.sh
|
||||||
|
|
||||||
|
image/sd_x1.img: clean_work
|
||||||
|
./image/build_image_x1.sh
|
||||||
|
|
||||||
|
.PHONY:
|
||||||
|
clean_work:
|
||||||
|
sudo rm -rf image/work
|
||||||
|
|
||||||
.PHONY:
|
.PHONY:
|
||||||
aptcache:
|
aptcache:
|
||||||
./tools/aptcache_linux_amd64 \
|
./tools/aptcache_linux_amd64 \
|
||||||
-rule 'local=localhost:65432, remote=ftp.jaist.ac.jp' \
|
-rule 'local=localhost:65432, remote=ftp.jaist.ac.jp' \
|
||||||
-rule 'local=localhost:65433, remote=security.debian.org'
|
-rule 'local=localhost:65433, remote=security.debian.org'
|
||||||
|
|
||||||
|
.PHONY:
|
||||||
|
datetag:
|
||||||
|
git tag $(shell ./tools/version)
|
||||||
|
|||||||
60
README.md
60
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,13 +21,13 @@ 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.
|
||||||
|
|
||||||
```
|
```
|
||||||
$ git clone --recursive git@github.com:puhitaku/buildbrain.git
|
$ git clone --recursive git@github.com:brain-hackers/buildbrain.git
|
||||||
```
|
```
|
||||||
|
|
||||||
- If you've cloned it without `--recursive`, run following command:
|
- If you've cloned it without `--recursive`, run following command:
|
||||||
@@ -41,32 +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. To make `nk.bin`, run `make nkbin`.
|
1. 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
|
||||||
-----------
|
-----------
|
||||||
@@ -78,28 +94,23 @@ 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. Partition an SD card into two partitions.
|
1. Run `make ldefconfig lbuild`.
|
||||||
|
|
||||||
- 1st: FAT32 (vfat), about 100MB
|
|
||||||
- 2st: ext4, fill the remaining area
|
|
||||||
|
|
||||||
1. Build and copy the Linux kernel.
|
|
||||||
|
|
||||||
- Run `make ldefconfig lbuild`.
|
|
||||||
- Copy `/linux-brain/arch/arm/boot/zImage` and `/linux-brain/arch/arm/boot/dts/imx28-evk.dtb` into the 1st partition.
|
|
||||||
|
|
||||||
1. Run APT cache in background (mandatory): `make aptcache`.
|
1. Run APT cache in background (mandatory): `make aptcache`.
|
||||||
|
|
||||||
1. Run `make debian`.
|
1. Run `make brainux`.
|
||||||
|
|
||||||
1. Copy all contents in `./debian` into the 2nd partition.
|
1. Run `make image/sd.img`
|
||||||
|
|
||||||
- `sudo cp -ar ./debian/* /path/to/your/sd/2nd/partition/`
|
1. Confirm that `image/sd.img` is built and burn it to an SD card.
|
||||||
- Please make sure that all attributes are preserved with `-a` flag.
|
|
||||||
|
|
||||||
|
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
|
||||||
----------------------------------------
|
----------------------------------------
|
||||||
@@ -116,4 +127,3 @@ What's r3build?
|
|||||||
---------------
|
---------------
|
||||||
|
|
||||||
[r3build](https://github.com/puhitaku/r3build) is a smart file watcher that aims to provide hot-reloading feature like Web frontend development.
|
[r3build](https://github.com/puhitaku/r3build) is a smart file watcher that aims to provide hot-reloading feature like Web frontend development.
|
||||||
|
|
||||||
|
|||||||
1
boot4u
Submodule
1
boot4u
Submodule
Submodule boot4u added at 3f916a0cf7
1
brainlilo
Submodule
1
brainlilo
Submodule
Submodule brainlilo added at c826f2581e
94
image/build_image.sh
Executable file
94
image/build_image.sh
Executable file
@@ -0,0 +1,94 @@
|
|||||||
|
#!/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.img
|
||||||
|
export CROSS_COMPILE=arm-linux-gnueabi-
|
||||||
|
|
||||||
|
mkdir -p ${WORK}
|
||||||
|
mkdir -p ${WORK}/lilobin
|
||||||
|
|
||||||
|
# for i in "g5300" "sh1" "sh2" "sh3" "sh4" "sh5" "sh6" "sh7"; do
|
||||||
|
for i in "sh1"; 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.sb
|
||||||
|
#${REPO}/nkbin_maker/bsd-ce ${REPO}/u-boot-brain/u-boot.bin
|
||||||
|
|
||||||
|
case $i in
|
||||||
|
"g5300")
|
||||||
|
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.sb ${WORK}/lilobin/gen3_${NUM}.sb;;
|
||||||
|
"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;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
dd if=/dev/zero of=${IMG} bs=1M count=2048
|
||||||
|
|
||||||
|
START1=2048
|
||||||
|
SECTORS1=$((1024 * 1024 * 64 / 512))
|
||||||
|
START2=$((2048 + ${SECTORS1}))
|
||||||
|
SECTORS1=$((1024 * 1024 * 8 / 512))
|
||||||
|
START2=$((2048 + ${SECTORS1} + ${SECTORS2}))
|
||||||
|
|
||||||
|
cat <<EOF > ${WORK}/part.sfdisk
|
||||||
|
${IMG}1 : start=${START1}, size=${SECTORS1}, type=b
|
||||||
|
${IMG}2 : start=${START2}, size=${SECTORS2}, type=53
|
||||||
|
${IMG}3 : start=${START3}, type=83
|
||||||
|
EOF
|
||||||
|
|
||||||
|
sfdisk ${IMG} < ${WORK}/part.sfdisk
|
||||||
|
|
||||||
|
sudo kpartx -av ${IMG}
|
||||||
|
|
||||||
|
LOOPDEV=$(losetup -l | grep sd.img | grep -o 'loop.' | tail -n 1)
|
||||||
|
|
||||||
|
${REPO}/image/mk_hdr.sh `fdisk -lu /dev/${LOOPDEV} | awk '$6==53 {print $2}'` 1 > ${WORK}/header.bin
|
||||||
|
dd if=${WORK}/header.bin of=/dev/${LOOPDEV}p2 ibs=512 conv=sync
|
||||||
|
dd if=${WORK}/lilobin/gen3_1.sb of=/dev/${LOOPDEV}p2 ibs=512 obs=512 seek=1 conv=sync
|
||||||
|
|
||||||
|
sudo mkfs.fat -n boot -F32 -v -I /dev/mapper/${LOOPDEV}p1
|
||||||
|
sudo mkfs.ext4 -L rootfs /dev/mapper/${LOOPDEV}p3
|
||||||
|
|
||||||
|
mkdir -p ${WORK}/p1 ${WORK}/p3
|
||||||
|
sudo mount -o utf8=true /dev/mapper/${LOOPDEV}p1 ${WORK}/p1
|
||||||
|
sudo mount /dev/mapper/${LOOPDEV}p3 ${WORK}/p3
|
||||||
|
|
||||||
|
sudo cp ${LINUX}/arch/arm/boot/zImage ${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}/p3/
|
||||||
|
|
||||||
|
sudo umount ${WORK}/p1 ${WORK}/p3
|
||||||
|
sudo kpartx -d ${IMG}
|
||||||
|
|
||||||
|
rmdir ${WORK}/p1 ${WORK}/p3
|
||||||
|
|
||||||
57
image/build_image_emmc.sh
Executable file
57
image/build_image_emmc.sh
Executable file
@@ -0,0 +1,57 @@
|
|||||||
|
#!/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.img
|
||||||
|
export CROSS_COMPILE=${CROSS_COMPILE:="arm-linux-gnueabi-"}
|
||||||
|
|
||||||
|
mkdir -p ${WORK}
|
||||||
|
mkdir -p ${WORK}/lilobin
|
||||||
|
|
||||||
|
for i in "sh1"; 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.sb u-boot.bin
|
||||||
|
|
||||||
|
case $i in
|
||||||
|
"sh1" | "sh2" | "sh3")
|
||||||
|
mv ${REPO}/u-boot-brain/u-boot.sb ${WORK}/lilobin/gen3_${NUM}.sb
|
||||||
|
mv ${REPO}/u-boot-brain/u-boot.bin ${WORK}/lilobin/gen3_${NUM}.bin;;
|
||||||
|
*)
|
||||||
|
echo "WTF: $i"
|
||||||
|
exit 1;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
dd if=/dev/zero of=${IMG} bs=1M count=96
|
||||||
|
|
||||||
|
START1=2048
|
||||||
|
SECTORS1=$((1024 * 1024 * 64 / 512))
|
||||||
|
START2=$((2048 + ${SECTORS1}))
|
||||||
|
SECTORS2=$((1024 * 1024 * 8 / 512))
|
||||||
|
START3=$((2048 + ${SECTORS1} + ${SECTORS2}))
|
||||||
|
|
||||||
|
cat <<EOF > ${WORK}/part.sfdisk
|
||||||
|
${IMG}1 : start=${START1}, size=${SECTORS1}, type=b
|
||||||
|
${IMG}2 : start=${START2}, size=${SECTORS2}, type=53
|
||||||
|
${IMG}3 : start=${START3}, type=83
|
||||||
|
EOF
|
||||||
|
|
||||||
|
sfdisk ${IMG} < ${WORK}/part.sfdisk
|
||||||
|
|
||||||
|
sudo kpartx -av ${IMG}
|
||||||
|
|
||||||
|
LOOPDEV=$(losetup -l | grep sd.img | grep -o 'loop.' | tail -n 1)
|
||||||
|
${REPO}/image/mk_hdr.sh `fdisk -lu /dev/${LOOPDEV} | awk '$6==53 {print $2}'` 1 > ${WORK}/header.bin
|
||||||
|
dd if=${WORK}/header.bin of=/dev/${LOOPDEV}p2 ibs=512 conv=sync
|
||||||
|
dd if=${WORK}/lilobin/gen3_1.sb of=/dev/${LOOPDEV}p2 ibs=512 obs=512 seek=1 conv=sync
|
||||||
|
|
||||||
|
# sudo mount -o utf8=true /dev/mapper/${LOOPDEV}p1 ${WORK}/p1
|
||||||
|
# sudo mount /dev/mapper/${LOOPDEV}p2 ${WORK}/p2
|
||||||
|
|
||||||
|
sudo kpartx -d ${IMG}
|
||||||
|
|
||||||
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.
148
image/mk_hdr.sh
Executable file
148
image/mk_hdr.sh
Executable file
@@ -0,0 +1,148 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# mk_hdr.sh
|
||||||
|
# Redistributed URL: https://github.com/embeddedTS/linux-2.6.35.3-imx28/blob/master/mk_hdr.sh
|
||||||
|
#
|
||||||
|
# This program is distributed with mk_mx28_sd that has the text of 3-Clause BSD License.
|
||||||
|
# Both are considered to be licenced under the same agreement so we put the text here.
|
||||||
|
|
||||||
|
# Copyright (c) 2010 Freescale Semiconductor, Inc.
|
||||||
|
# All rights reserved.
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without modification,
|
||||||
|
# are permitted provided that the following conditions are met:
|
||||||
|
#
|
||||||
|
# o Redistributions of source code must retain the above copyright notice, this list
|
||||||
|
# of conditions and the following disclaimer.
|
||||||
|
#
|
||||||
|
# o Redistributions in binary form must reproduce the above copyright notice, this
|
||||||
|
# list of conditions and the following disclaimer in the documentation and/or
|
||||||
|
# other materials provided with the distribution.
|
||||||
|
#
|
||||||
|
# o Neither the name of Freescale Semiconductor, Inc. nor the names of its
|
||||||
|
# contributors may be used to endorse or promote products derived from this
|
||||||
|
# software without specific prior written permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
|
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
# Usage: make_boot <base_sector> <num_sb_files>
|
||||||
|
#
|
||||||
|
# where
|
||||||
|
#
|
||||||
|
# <base_sector> is the first sector _of the boot stream partition (i.e. /sd#2 or /sd#3, etc)
|
||||||
|
# <num_sb_files> is the # of boot stream blocks (currently only 1 supported)
|
||||||
|
|
||||||
|
#[ $1 = ] && { echo -e " error - boot partition start sector missing" ; exit };
|
||||||
|
#[ $2 = ] && { echo -e " error - # of bootable images in .sb file missing" ; exit };
|
||||||
|
|
||||||
|
# Future usage: make_boot <dev_partition> <sb_file_tag,sb_sector_offset> <sb_file_tag2, base_addr2> ...
|
||||||
|
#
|
||||||
|
# Where base sector comes from MBR, and sb_sector_offset is an offset from start of boot-partition, not absolute sector.
|
||||||
|
|
||||||
|
|
||||||
|
#Script Vars
|
||||||
|
base_sector=$1
|
||||||
|
numbootstreams=$2
|
||||||
|
primary=0
|
||||||
|
secondary=0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#########################################
|
||||||
|
# out_byte args...
|
||||||
|
#
|
||||||
|
# this function writes the binary value to stdout of each argument in the order given
|
||||||
|
# i.e. out_byte 0 1 2 3 will echo "\x00\x01\x02\x03" to stdout (w/o terminating null )
|
||||||
|
|
||||||
|
function out_byte(){
|
||||||
|
for val in $*
|
||||||
|
do
|
||||||
|
# echo -e "byte=$val"
|
||||||
|
echo -en "\\x$(printf %02x $val)"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function out_u32_le()
|
||||||
|
{
|
||||||
|
for val32 in $*
|
||||||
|
do
|
||||||
|
|
||||||
|
val=$(($val32))
|
||||||
|
b0=$((val % (2**8)))
|
||||||
|
val=$((val / (2**8)))
|
||||||
|
b1=$((val % (2**8)))
|
||||||
|
val=$((val / (2**8)))
|
||||||
|
b2=$((val % (2**8)))
|
||||||
|
val=$((val / (2**8)))
|
||||||
|
b3=$((val % (2**8)))
|
||||||
|
|
||||||
|
### Keep around for debug/verbose output
|
||||||
|
# printf "$val32 ==> %02x%02x%02x%02x\n" $b0 $b1 $b2 $b3
|
||||||
|
|
||||||
|
### Output the bytes in binary form
|
||||||
|
#
|
||||||
|
out_byte $b0 $b1 $b2 $b3
|
||||||
|
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function out_bcb ()
|
||||||
|
{
|
||||||
|
signature=0x00112233
|
||||||
|
primary_tag=$1
|
||||||
|
secondary_tag=$2
|
||||||
|
num_bsb=$3
|
||||||
|
out_u32_le signature primary_tag secondary_tag num_bsb
|
||||||
|
}
|
||||||
|
|
||||||
|
# usage: out_bsb tag base_sector
|
||||||
|
# where base_sector is relative to partition
|
||||||
|
# i.e. if partition starts on lba 63 & first boot stream, base_sector = 1, not 64
|
||||||
|
# This function will automatically compute the absolute base sector.
|
||||||
|
function out_bsb
|
||||||
|
{
|
||||||
|
abs_sector=$(($2 + $base_sector))
|
||||||
|
# unused0
|
||||||
|
out_u32_le 0
|
||||||
|
# unused1
|
||||||
|
out_u32_le 0
|
||||||
|
# tag boot stream tag
|
||||||
|
out_u32_le $1
|
||||||
|
# boot stream base sector (absolute)
|
||||||
|
out_u32_le $abs_sector
|
||||||
|
# unused2
|
||||||
|
out_u32_le 0
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
###############################
|
||||||
|
# Send header output to std out
|
||||||
|
###############################
|
||||||
|
|
||||||
|
|
||||||
|
# Output boot stream signature & info
|
||||||
|
# out_u32_le signature primary secondary numbootstreams
|
||||||
|
out_bcb primary secondary numbootstreams
|
||||||
|
|
||||||
|
# Output .sb starting sector info
|
||||||
|
# out_u32_le unused0 unused1 tag base_sector unused2
|
||||||
|
out_bsb primary 1
|
||||||
|
|
||||||
|
# Output bsb for sb #2
|
||||||
|
#out_bsb tag_[p|s] base_sector_2
|
||||||
|
|
||||||
|
# Output bsb for sb #n
|
||||||
|
# out_bsb tag_[p|s] base_sector_n
|
||||||
|
#
|
||||||
|
|
||||||
Submodule linux-brain updated: 5d954828ce...09cc34a56d
23
os-brainux/override.sh
Executable file
23
os-brainux/override.sh
Executable file
@@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
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 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 -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
|
||||||
|
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
|
||||||
4
os-brainux/override/etc/X11/Xsession.d/96calibrate
Normal file
4
os-brainux/override/etc/X11/Xsession.d/96calibrate
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
if [ ! -e /etc/X11/xorg.conf.d/99-calibrator.conf ]; then
|
||||||
|
xinput_calibrator --output-filename /etc/X11/xorg.conf.d/99-calibrator.conf
|
||||||
|
fi
|
||||||
|
|
||||||
8
os-brainux/override/etc/X11/xorg.conf
Normal file
8
os-brainux/override/etc/X11/xorg.conf
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
Section "Device"
|
||||||
|
Identifier "device"
|
||||||
|
Driver "fbdev"
|
||||||
|
EndSection
|
||||||
|
Section "Screen"
|
||||||
|
Identifier "screen"
|
||||||
|
Device "device"
|
||||||
|
EndSection
|
||||||
2
os-brainux/override/etc/issue
Normal file
2
os-brainux/override/etc/issue
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
Brainux GNU/Linux 10 \n \l
|
||||||
|
|
||||||
1
os-brainux/override/etc/issue.net
Normal file
1
os-brainux/override/etc/issue.net
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Brainux GNU/Linux 10
|
||||||
216
os-brainux/override/etc/jwm/system.jwmrc
Normal file
216
os-brainux/override/etc/jwm/system.jwmrc
Normal file
@@ -0,0 +1,216 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<JWM>
|
||||||
|
|
||||||
|
<!-- The root menu. -->
|
||||||
|
<RootMenu onroot="12">
|
||||||
|
<Include>/etc/jwm/debian-menu</Include>
|
||||||
|
<Program icon="terminal.png" label="Terminal">lxterminal</Program>
|
||||||
|
<Separator/>
|
||||||
|
<Program icon="lock.png" label="Lock">
|
||||||
|
xlock -mode blank
|
||||||
|
</Program>
|
||||||
|
<Separator/>
|
||||||
|
<Restart label="Restart" icon="restart.png"/>
|
||||||
|
<Exit label="Exit" confirm="true" icon="quit.png"/>
|
||||||
|
</RootMenu>
|
||||||
|
|
||||||
|
<!-- Options for program groups. -->
|
||||||
|
<Group>
|
||||||
|
<Option>tiled</Option>
|
||||||
|
<Option>aerosnap</Option>
|
||||||
|
</Group>
|
||||||
|
<Group>
|
||||||
|
<Class>Pidgin</Class>
|
||||||
|
<Option>sticky</Option>
|
||||||
|
</Group>
|
||||||
|
<Group>
|
||||||
|
<Name>xterm</Name>
|
||||||
|
<Option>vmax</Option>
|
||||||
|
</Group>
|
||||||
|
<Group>
|
||||||
|
<Name>xclock</Name>
|
||||||
|
<Option>drag</Option>
|
||||||
|
<Option>notitle</Option>
|
||||||
|
</Group>
|
||||||
|
|
||||||
|
<!-- Tray at the bottom. -->
|
||||||
|
<Tray x="0" y="-1" height="20" autohide="off">
|
||||||
|
|
||||||
|
<TrayButton icon="/usr/share/jwm/jwm-red.svg">root:1</TrayButton>
|
||||||
|
<Spacer width="2"/>
|
||||||
|
|
||||||
|
<Pager labeled="true"/>
|
||||||
|
|
||||||
|
<TaskList maxwidth="192"/>
|
||||||
|
|
||||||
|
<Dock/>
|
||||||
|
<Clock format="%H:%M"><Button mask="123">exec:xclock</Button></Clock>
|
||||||
|
|
||||||
|
</Tray>
|
||||||
|
|
||||||
|
<!-- Visual Styles -->
|
||||||
|
<WindowStyle>
|
||||||
|
<Font>Sans-9:bold</Font>
|
||||||
|
<Width>4</Width>
|
||||||
|
<Height>21</Height>
|
||||||
|
<Corner>3</Corner>
|
||||||
|
<Foreground>#FFFFFF</Foreground>
|
||||||
|
<Background>#555555</Background>
|
||||||
|
<Outline>#777777</Outline>
|
||||||
|
<Opacity>0.5</Opacity>
|
||||||
|
<Active>
|
||||||
|
<Foreground>#FFFFFF</Foreground>
|
||||||
|
<Background>#0077CC</Background>
|
||||||
|
<Outline>#1AA0FF</Outline>
|
||||||
|
<Opacity>1.0</Opacity>
|
||||||
|
</Active>
|
||||||
|
</WindowStyle>
|
||||||
|
<TrayStyle group="true" list="all">
|
||||||
|
<Font>Sans-9</Font>
|
||||||
|
<Background>#222222</Background>
|
||||||
|
<Foreground>#FFFFFF</Foreground>
|
||||||
|
<Outline>#222222</Outline>
|
||||||
|
<Opacity>0.75</Opacity>
|
||||||
|
</TrayStyle>
|
||||||
|
<TaskListStyle>
|
||||||
|
<Font>Sans-9</Font>
|
||||||
|
<Active>
|
||||||
|
<Foreground>#FFFFFF</Foreground>
|
||||||
|
<Background>#333333</Background>
|
||||||
|
</Active>
|
||||||
|
<Foreground>#FFFFFF</Foreground>
|
||||||
|
<Background>#222222</Background>
|
||||||
|
</TaskListStyle>
|
||||||
|
<PagerStyle>
|
||||||
|
<Outline>#3B3B3B</Outline>
|
||||||
|
<Foreground>#555555</Foreground>
|
||||||
|
<Background>#333333</Background>
|
||||||
|
<Text>#FFFFFF</Text>
|
||||||
|
<Active>
|
||||||
|
<Foreground>#0077CC</Foreground>
|
||||||
|
<Background>#004488</Background>
|
||||||
|
</Active>
|
||||||
|
</PagerStyle>
|
||||||
|
<MenuStyle>
|
||||||
|
<Font>Sans-9</Font>
|
||||||
|
<Foreground>#FFFFFF</Foreground>
|
||||||
|
<Background>#333333</Background>
|
||||||
|
<Outline>#000000</Outline>
|
||||||
|
<Active>
|
||||||
|
<Foreground>#FFFFFF</Foreground>
|
||||||
|
<Background>#0077CC</Background>
|
||||||
|
</Active>
|
||||||
|
<Opacity>0.85</Opacity>
|
||||||
|
</MenuStyle>
|
||||||
|
<PopupStyle>
|
||||||
|
<Font>Sans-9</Font>
|
||||||
|
<Foreground>#000000</Foreground>
|
||||||
|
<Background>#999999</Background>
|
||||||
|
</PopupStyle>
|
||||||
|
|
||||||
|
<!-- Path where icons can be found.
|
||||||
|
IconPath can be listed multiple times to allow searching
|
||||||
|
for icons in multiple paths.
|
||||||
|
-->
|
||||||
|
<IconPath>/usr/share/icons/gnome/256x256/actions</IconPath>
|
||||||
|
<IconPath>/usr/share/icons/gnome/256x256/apps</IconPath>
|
||||||
|
<IconPath>/usr/share/icons/gnome/256x256/categories</IconPath>
|
||||||
|
<IconPath>/usr/share/icons/gnome/256x256/devices</IconPath>
|
||||||
|
<IconPath>/usr/share/icons/gnome/256x256/emblems</IconPath>
|
||||||
|
<IconPath>/usr/share/icons/gnome/256x256/mimetypes</IconPath>
|
||||||
|
<IconPath>/usr/share/icons/gnome/256x256/places</IconPath>
|
||||||
|
<IconPath>/usr/share/icons/gnome/256x256/status</IconPath>
|
||||||
|
<IconPath>/usr/share/icons/gnome/32x32/actions</IconPath>
|
||||||
|
<IconPath>/usr/share/icons/gnome/32x32/animations</IconPath>
|
||||||
|
<IconPath>/usr/share/icons/gnome/32x32/apps</IconPath>
|
||||||
|
<IconPath>/usr/share/icons/gnome/32x32/categories</IconPath>
|
||||||
|
<IconPath>/usr/share/icons/gnome/32x32/devices</IconPath>
|
||||||
|
<IconPath>/usr/share/icons/gnome/32x32/emblems</IconPath>
|
||||||
|
<IconPath>/usr/share/icons/gnome/32x32/mimetypes</IconPath>
|
||||||
|
<IconPath>/usr/share/icons/gnome/32x32/places</IconPath>
|
||||||
|
<IconPath>/usr/share/icons/gnome/32x32/status</IconPath>
|
||||||
|
<IconPath>/usr/share/icons/gnome/scalable/actions</IconPath>
|
||||||
|
<IconPath>/usr/share/icons/gnome/scalable/apps</IconPath>
|
||||||
|
<IconPath>/usr/share/icons/gnome/scalable/categories</IconPath>
|
||||||
|
<IconPath>/usr/share/icons/gnome/scalable/devices</IconPath>
|
||||||
|
<IconPath>/usr/share/icons/gnome/scalable/emblems</IconPath>
|
||||||
|
<IconPath>/usr/share/icons/gnome/scalable/mimetypes</IconPath>
|
||||||
|
<IconPath>/usr/share/icons/gnome/scalable/places</IconPath>
|
||||||
|
<IconPath>/usr/share/icons/gnome/scalable/status</IconPath>
|
||||||
|
<IconPath>/usr/share/icons/hicolor/256x256/apps</IconPath>
|
||||||
|
<IconPath>/usr/share/icons/hicolor/256x256/mimetypes</IconPath>
|
||||||
|
<IconPath>/usr/share/icons/hicolor/32x32/actions</IconPath>
|
||||||
|
<IconPath>/usr/share/icons/hicolor/32x32/apps</IconPath>
|
||||||
|
<IconPath>/usr/share/icons/hicolor/32x32/categories</IconPath>
|
||||||
|
<IconPath>/usr/share/icons/hicolor/32x32/devices</IconPath>
|
||||||
|
<IconPath>/usr/share/icons/hicolor/32x32/emblems</IconPath>
|
||||||
|
<IconPath>/usr/share/icons/hicolor/32x32/mimetypes</IconPath>
|
||||||
|
<IconPath>/usr/share/icons/hicolor/32x32/status</IconPath>
|
||||||
|
<IconPath>/usr/share/icons/hicolor/512x512/apps</IconPath>
|
||||||
|
<IconPath>/usr/share/icons/hicolor/512x512/mimetypes</IconPath>
|
||||||
|
<IconPath>/usr/share/icons/hicolor/scalable/actions</IconPath>
|
||||||
|
<IconPath>/usr/share/icons/hicolor/scalable/apps</IconPath>
|
||||||
|
<IconPath>/usr/share/icons/hicolor/scalable/categories</IconPath>
|
||||||
|
<IconPath>/usr/share/icons/hicolor/scalable/devices</IconPath>
|
||||||
|
<IconPath>/usr/share/icons/hicolor/scalable/emblems</IconPath>
|
||||||
|
<IconPath>/usr/share/icons/hicolor/scalable/mimetypes</IconPath>
|
||||||
|
<IconPath>/usr/share/icons/hicolor/scalable/places</IconPath>
|
||||||
|
<IconPath>/usr/share/icons/hicolor/scalable/status</IconPath>
|
||||||
|
<IconPath>/usr/share/icons</IconPath>
|
||||||
|
<IconPath>/usr/share/pixmaps</IconPath>
|
||||||
|
<IconPath>
|
||||||
|
/usr/local/share/jwm
|
||||||
|
</IconPath>
|
||||||
|
|
||||||
|
<!-- Virtual Desktops -->
|
||||||
|
<!-- Desktop tags can be contained within Desktops for desktop names. -->
|
||||||
|
<Desktops width="4" height="1">
|
||||||
|
<!-- Default background. Note that a Background tag can be
|
||||||
|
contained within a Desktop tag to give a specific background
|
||||||
|
for that desktop.
|
||||||
|
-->
|
||||||
|
<Background type="solid">#111111</Background>
|
||||||
|
</Desktops>
|
||||||
|
|
||||||
|
<!-- Double click speed (in milliseconds) -->
|
||||||
|
<DoubleClickSpeed>400</DoubleClickSpeed>
|
||||||
|
|
||||||
|
<!-- Double click delta (in pixels) -->
|
||||||
|
<DoubleClickDelta>2</DoubleClickDelta>
|
||||||
|
|
||||||
|
<!-- The focus model (sloppy or click) -->
|
||||||
|
<FocusModel>sloppy</FocusModel>
|
||||||
|
|
||||||
|
<!-- The snap mode (none, screen, or border) -->
|
||||||
|
<SnapMode distance="10">border</SnapMode>
|
||||||
|
|
||||||
|
<!-- The move mode (outline or opaque) -->
|
||||||
|
<MoveMode>opaque</MoveMode>
|
||||||
|
|
||||||
|
<!-- The resize mode (outline or opaque) -->
|
||||||
|
<ResizeMode>opaque</ResizeMode>
|
||||||
|
|
||||||
|
<!-- Key bindings -->
|
||||||
|
<Key key="Up">up</Key>
|
||||||
|
<Key key="Down">down</Key>
|
||||||
|
<Key key="Right">right</Key>
|
||||||
|
<Key key="Left">left</Key>
|
||||||
|
<Key key="h">left</Key>
|
||||||
|
<Key key="j">down</Key>
|
||||||
|
<Key key="k">up</Key>
|
||||||
|
<Key key="l">right</Key>
|
||||||
|
<Key key="Return">select</Key>
|
||||||
|
<Key key="Escape">escape</Key>
|
||||||
|
|
||||||
|
<Key mask="A" key="Tab">nextstacked</Key>
|
||||||
|
<Key mask="A" key="F4">close</Key>
|
||||||
|
<Key mask="A" key="#">desktop#</Key>
|
||||||
|
<Key mask="A" key="F1">root:1</Key>
|
||||||
|
<Key mask="A" key="F2">window</Key>
|
||||||
|
<Key mask="A" key="F10">maximize</Key>
|
||||||
|
<Key mask="A" key="Right">rdesktop</Key>
|
||||||
|
<Key mask="A" key="Left">ldesktop</Key>
|
||||||
|
<Key mask="A" key="Up">udesktop</Key>
|
||||||
|
<Key mask="A" key="Down">ddesktop</Key>
|
||||||
|
|
||||||
|
</JWM>
|
||||||
12
os-brainux/override/etc/motd
Normal file
12
os-brainux/override/etc/motd
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
____ _
|
||||||
|
| _ \ (_)
|
||||||
|
| |_) |_ __ __ _ _ _ __ _ ___ __
|
||||||
|
| _ <| '__/ _` | | '_ \| | | \ \/ /
|
||||||
|
| |_) | | | (_| | | | | | |_| |> <
|
||||||
|
|____/|_| \__,_|_|_| |_|\__,_/_/\_\
|
||||||
|
|
||||||
|
by Brain Hackers
|
||||||
|
|
||||||
|
https://github.com/brain-hackers
|
||||||
|
|
||||||
4
os-brainux/override/etc/xdg/weston/weston.ini
Normal file
4
os-brainux/override/etc/xdg/weston/weston.ini
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
[core]
|
||||||
|
xwayland=true
|
||||||
|
backend=fbdev-backend.so
|
||||||
|
|
||||||
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 &
|
||||||
|
|
||||||
53
os-brainux/override/home/user/lxterminal/lxterminal.conf
Normal file
53
os-brainux/override/home/user/lxterminal/lxterminal.conf
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
[general]
|
||||||
|
fontname=Noto Sans Mono CJK JP 10
|
||||||
|
selchars=-A-Za-z0-9,./?%&#:_
|
||||||
|
scrollback=1000
|
||||||
|
bgcolor=rgb(0,0,0)
|
||||||
|
fgcolor=rgb(211,215,207)
|
||||||
|
palette_color_0=rgb(0,0,0)
|
||||||
|
palette_color_1=rgb(205,0,0)
|
||||||
|
palette_color_2=rgb(78,154,6)
|
||||||
|
palette_color_3=rgb(196,160,0)
|
||||||
|
palette_color_4=rgb(52,101,164)
|
||||||
|
palette_color_5=rgb(117,80,123)
|
||||||
|
palette_color_6=rgb(6,152,154)
|
||||||
|
palette_color_7=rgb(211,215,207)
|
||||||
|
palette_color_8=rgb(85,87,83)
|
||||||
|
palette_color_9=rgb(239,41,41)
|
||||||
|
palette_color_10=rgb(138,226,52)
|
||||||
|
palette_color_11=rgb(252,233,79)
|
||||||
|
palette_color_12=rgb(114,159,207)
|
||||||
|
palette_color_13=rgb(173,127,168)
|
||||||
|
palette_color_14=rgb(52,226,226)
|
||||||
|
palette_color_15=rgb(238,238,236)
|
||||||
|
color_preset=Tango
|
||||||
|
disallowbold=false
|
||||||
|
cursorblinks=false
|
||||||
|
cursorunderline=false
|
||||||
|
audiblebell=false
|
||||||
|
tabpos=top
|
||||||
|
geometry_columns=80
|
||||||
|
geometry_rows=24
|
||||||
|
hidescrollbar=false
|
||||||
|
hidemenubar=false
|
||||||
|
hideclosebutton=false
|
||||||
|
hidepointer=false
|
||||||
|
disablef10=false
|
||||||
|
disablealt=false
|
||||||
|
disableconfirm=false
|
||||||
|
|
||||||
|
[shortcut]
|
||||||
|
new_window_accel=<Primary><Shift>n
|
||||||
|
new_tab_accel=<Primary><Shift>t
|
||||||
|
close_tab_accel=<Primary><Shift>w
|
||||||
|
close_window_accel=<Primary><Shift>q
|
||||||
|
copy_accel=<Primary><Shift>c
|
||||||
|
paste_accel=<Primary><Shift>v
|
||||||
|
name_tab_accel=<Primary><Shift>i
|
||||||
|
previous_tab_accel=<Primary>Page_Up
|
||||||
|
next_tab_accel=<Primary>Page_Down
|
||||||
|
move_tab_left_accel=<Primary><Shift>Page_Up
|
||||||
|
move_tab_right_accel=<Primary><Shift>Page_Down
|
||||||
|
zoom_in_accel=<Primary><Shift>plus
|
||||||
|
zoom_out_accel=<Primary><Shift>underscore
|
||||||
|
zoom_reset_accel=<Primary><Shift>parenright
|
||||||
9
os-brainux/override/usr/lib/os-release
Normal file
9
os-brainux/override/usr/lib/os-release
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
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"
|
||||||
147
os-brainux/setup_brainux.sh
Executable file
147
os-brainux/setup_brainux.sh
Executable file
@@ -0,0 +1,147 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -uex -o pipefail
|
||||||
|
|
||||||
|
if [ ! -v TIMEZONE ]; then
|
||||||
|
TIMEZONE=Asia/Tokyo
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -v CI ]; then
|
||||||
|
CI=false
|
||||||
|
fi
|
||||||
|
|
||||||
|
/debootstrap/debootstrap --second-stage
|
||||||
|
|
||||||
|
if [ "${CI}" == "true" ]; then
|
||||||
|
REPO=deb.debian.org
|
||||||
|
REPO_SECURITY=deb.debian.org
|
||||||
|
else
|
||||||
|
REPO=localhost:65432
|
||||||
|
REPO_SECURITY=localhost:65433
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat <<EOF > /etc/apt/sources.list
|
||||||
|
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
|
||||||
|
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
|
||||||
|
|
||||||
|
echo "$TIMEZONE" > /etc/timezone && \
|
||||||
|
dpkg-reconfigure -f noninteractive tzdata && \
|
||||||
|
sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
|
||||||
|
echo 'LANG="en_US.UTF-8"' > /etc/default/locale && \
|
||||||
|
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
|
||||||
|
|
||||||
|
# Install packagecloud repository
|
||||||
|
# Reference: https://packagecloud.io/brainhackers/brainux/install
|
||||||
|
|
||||||
|
# curl: downloads the GPG key from packagecloud
|
||||||
|
# gnupg, debian-archive-keyring: packagecloud verification dependency
|
||||||
|
DEBIAN_FRONTEND=noninteractive \
|
||||||
|
apt install -y curl 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 \
|
||||||
|
xserver-xorg xserver-xorg-video-fbdev xserver-xorg-dev xserver-xorg-input-evdev xinput-calibrator xorg-dev x11-apps xinit \
|
||||||
|
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 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 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
|
||||||
|
DEBIAN_FRONTEND=noninteractive \
|
||||||
|
apt install -y libpam0g-dev libxcb-xkb-dev
|
||||||
|
cd /
|
||||||
|
git clone --recurse-submodules https://github.com/nullgemm/ly.git
|
||||||
|
cd ly
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
cd /
|
||||||
|
rm -r ly
|
||||||
|
systemctl enable ly
|
||||||
|
|
||||||
|
# Create editable xorg.conf.d
|
||||||
|
install -m 0777 -d /etc/X11/xorg.conf.d
|
||||||
|
|
||||||
|
# Fix Midori launch failure
|
||||||
|
sudo update-mime-database /usr/share/mime
|
||||||
|
|
||||||
|
# Setup users
|
||||||
|
adduser --gecos "" --disabled-password --home /home/user user
|
||||||
|
echo user:brain | chpasswd
|
||||||
|
echo "user ALL=(ALL:ALL) ALL" > /etc/sudoers.d/user
|
||||||
|
echo -e "127.0.1.1\tbrain" >> /etc/hosts
|
||||||
|
|
||||||
|
echo root:root | chpasswd
|
||||||
|
|
||||||
|
# Fix Xorg permission for non-root users
|
||||||
|
# https://unix.stackexchange.com/questions/315169/how-can-i-run-usr-bin-xorg-without-sudo
|
||||||
|
chown root:input /usr/lib/xorg/Xorg
|
||||||
|
chmod g+s /usr/lib/xorg/Xorg
|
||||||
|
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 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
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
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
TIMEZONE="Asia/Tokyo"
|
|
||||||
|
|
||||||
/debootstrap/debootstrap --second-stage
|
|
||||||
|
|
||||||
# Use local APT cache during debootstrap
|
|
||||||
cat <<EOF > /etc/apt/sources.list
|
|
||||||
deb http://localhost:65432/debian buster main contrib non-free
|
|
||||||
deb-src http://localhost:65432/debian buster main contrib non-free
|
|
||||||
deb http://localhost:65432/debian buster-updates main contrib non-free
|
|
||||||
deb-src http://localhost:65432/debian buster-updates main contrib non-free
|
|
||||||
deb http://localhost:65433/debian-security buster/updates main contrib non-free
|
|
||||||
deb-src http://localhost:65433/debian-security buster/updates main contrib non-free
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat <<EOF > /etc/apt/apt.conf.d/90-norecommend
|
|
||||||
APT::Install-Recommends "0";
|
|
||||||
APT::Install-Suggests "0";
|
|
||||||
EOF
|
|
||||||
|
|
||||||
apt update -y
|
|
||||||
apt install -y locales
|
|
||||||
|
|
||||||
echo "$TIMEZONE" > /etc/timezone && \
|
|
||||||
dpkg-reconfigure -f noninteractive tzdata && \
|
|
||||||
sed -i -e 's/# en_US.UTF-8 UTF-8/en_us.UTF-8 UTF-8/' /etc/locale.gen && \
|
|
||||||
echo 'LANG="en_US.UTF-8"' > /etc/default/locale && \
|
|
||||||
dpkg-reconfigure -f noninteractive locales && \
|
|
||||||
update-locale LANG=en_US.UTF-8
|
|
||||||
|
|
||||||
echo "brain" > /etc/hostname
|
|
||||||
|
|
||||||
|
|
||||||
echo root:root | chpasswd
|
|
||||||
|
|
||||||
cat <<EOF >> /etc/securetty
|
|
||||||
ttymxc0
|
|
||||||
EOF
|
|
||||||
|
|
||||||
DEBIAN_FRONTEND=noninteractive \
|
|
||||||
apt install -y dialog sudo \
|
|
||||||
libjpeg-dev libfreetype6 libfreetype6-dev zlib1g-dev \
|
|
||||||
xserver-xorg xserver-xorg-video-fbdev xserver-xorg-dev xorg-dev x11-apps \
|
|
||||||
openbox obconf obmenu \
|
|
||||||
weston xwayland \
|
|
||||||
bash tmux vim htop \
|
|
||||||
midori pcmanfm lxterminal xterm gnome-terminal fonts-noto-cjk \
|
|
||||||
dbus udev build-essential flex bison pkg-config autotools-dev libtool autoconf automake \
|
|
||||||
python3 python3-dev python3-setuptools python3-wheel python3-pip python3-smbus \
|
|
||||||
resolvconf net-tools ssh openssh-client avahi-daemon
|
|
||||||
|
|
||||||
# Get wild
|
|
||||||
cat <<EOF > /etc/apt/sources.list
|
|
||||||
deb http://ftp.jaist.ac.jp/debian buster main contrib non-free
|
|
||||||
deb-src http://ftp.jaist.ac.jp/debian buster main contrib non-free
|
|
||||||
deb http://ftp.jaist.ac.jp/debian buster-updates main contrib non-free
|
|
||||||
deb-src http://ftp.jaist.ac.jp/debian buster-updates main contrib non-free
|
|
||||||
deb http://security.debian.org/debian-security buster/updates main contrib non-free
|
|
||||||
deb-src http://security.debian.org/debian-security buster/updates main contrib non-free
|
|
||||||
EOF
|
|
||||||
|
|
||||||
3
tools/version
Executable file
3
tools/version
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
date +"%Y-%m-%d-%H%M%S"
|
||||||
Submodule u-boot-brain updated: 8f3049f7dc...2696eb4b8d
Reference in New Issue
Block a user