Skip to content

Commit f082b36

Browse files
committed
init.
1 parent 2275075 commit f082b36

14 files changed

Lines changed: 239 additions & 0 deletions

File tree

.gitmodules

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
[submodule "chromite/third_party/pyelftools"]
2+
path = chromite/third_party/pyelftools
3+
url = https://chromium.googlesource.com/chromiumos/third_party/pyelftools
4+
[submodule "src/scripts"]
5+
path = src/scripts
6+
url = https://chromium.googlesource.com/chromiumos/platform/crosutils
7+
[submodule "src/platform/ec"]
8+
path = src/platform/ec
9+
url = https://github.com/FrameworkComputer/EmbeddedController
10+
[submodule "src/third_party/zephyr/cmsis"]
11+
path = src/third_party/zephyr/cmsis
12+
url = https://chromium.googlesource.com/chromiumos/third_party/zephyr/cmsis
13+
[submodule "src/third_party/zephyr/hal_stm32"]
14+
path = src/third_party/zephyr/hal_stm32
15+
url = https://chromium.googlesource.com/chromiumos/third_party/zephyr/hal_stm32
16+
[submodule "src/third_party/zephyr/main"]
17+
path = src/third_party/zephyr/main
18+
url = https://github.com/FrameworkComputer/zephyr
19+
[submodule "src/third_party/zephyr/nanopb"]
20+
path = src/third_party/zephyr/nanopb
21+
url = https://chromium.googlesource.com/chromiumos/third_party/zephyr/nanopb
22+
[submodule "src/third_party/u-boot/files"]
23+
path = src/third_party/u-boot/files
24+
url = https://chromium.googlesource.com/chromiumos/third_party/u-boot
25+
[submodule "src/chromium/depot_tools"]
26+
path = src/chromium/depot_tools
27+
url = https://chromium.googlesource.com/chromium/tools/depot_tools

.repo/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

chromite/third_party/pyelftools

Submodule pyelftools added at c4a49b5

commands.bash

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
python3 -m venv venv
2+
source venv/bin/activate
3+
pip install -U pip
4+
pip install pyyaml pykwalify packaging pyelftools colorama setuptools==68.2.2
5+
6+
sed -e 's_"/bin:/usr/bin"_"/bin:/usr/bin:'"$(dirname "$(which gcc)"):$(dirname "$(which dtc)")"'"_' -i src/platform/ec/zephyr/zmake/zmake/jobserver.py
7+
pip install src/platform/ec/zephyr/zmake
8+
9+
sed -e 's/>=61.0/==68.2.2/' -i src/third_party/u-boot/files/tools/dtoc/pyproject.toml
10+
sed -e 's/"pylibfdt"/"libfdt"/' -i src/third_party/u-boot/files/tools/dtoc/pyproject.toml
11+
pip install src/third_party/u-boot/files/tools/dtoc
12+
13+
sed -e 's/>=61.0/==68.2.2/' -i src/third_party/u-boot/files/tools/binman/pyproject.toml
14+
sed -e 's/"pylibfdt"/"libfdt"/' -i src/third_party/u-boot/files/tools/binman/pyproject.toml
15+
pip install src/third_party/u-boot/files/tools/binman
16+
17+
# WIP:
18+
zmake -j8 build lotus --clobber -DCMAKE_MAKE_PROGRAM=(which ninja) -DGIT_EXECUTABLE=(which git)

flake.lock

Lines changed: 142 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
description = "Framework Laptop Embedded Controller (EC) build environment";
3+
4+
inputs = {
5+
nixpkgs.url = github:NixOS/nixpkgs/nixos-unstable;
6+
7+
zephyr-nix.url = github:adisbladis/zephyr-nix;
8+
zephyr-nix.inputs.nixpkgs.follows = "nixpkgs";
9+
};
10+
11+
outputs = {
12+
self,
13+
nixpkgs,
14+
flake-utils,
15+
zephyr-nix,
16+
}:
17+
flake-utils.lib.eachDefaultSystem (system: let
18+
pkgs = import nixpkgs {inherit system;};
19+
in {
20+
formatter = pkgs.alejandra;
21+
22+
devShells.default = pkgs.mkShell {
23+
buildInputs = with pkgs; [
24+
# pkgsCross.arm-embedded.buildPackages.gcc
25+
(zephyr-nix.packages.${system}.sdk-0_16.override {targets = ["arm-zephyr-eabi"];})
26+
gcc-arm-embedded
27+
gcc
28+
gnumake
29+
git-repo
30+
swig # or swig3?
31+
python312
32+
python312Packages.libfdt # <- 311 version fails to build
33+
dtc
34+
cmake
35+
file
36+
ninja
37+
wget
38+
uv
39+
];
40+
};
41+
});
42+
}

src/chromium/depot_tools

Submodule depot_tools added at 84edf22

src/platform/ec

Submodule ec added at 2275075

src/scripts

Submodule scripts added at 3d1067b

src/third_party/u-boot/files

Submodule files added at df863c4

0 commit comments

Comments
 (0)