2020-09-28 00:58:06 +09:00
|
|
|
JOBS=$(shell grep -c '^processor' /proc/cpuinfo)
|
|
|
|
|
2020-09-28 00:49:26 +09:00
|
|
|
export ARCH=arm
|
|
|
|
export CROSS_COMPILE=arm-linux-gnueabi-
|
|
|
|
|
|
|
|
.PHONY:
|
|
|
|
setup:
|
|
|
|
@echo "Updating submodules"
|
|
|
|
@git submodule update --init --recursive
|
2020-10-18 13:52:20 +09:00
|
|
|
|
|
|
|
.PHONY:
|
|
|
|
setup-dev:
|
2020-09-28 00:49:26 +09:00
|
|
|
@echo "Creating venv"
|
|
|
|
@python3 -m venv env
|
|
|
|
@echo "Installing r3build"
|
|
|
|
@. ./env/bin/activate; \
|
2020-10-18 13:52:20 +09:00
|
|
|
pip install wheel; \
|
2020-09-28 00:49:26 +09:00
|
|
|
pip install r3build
|
|
|
|
|
|
|
|
.PHONY:
|
|
|
|
watch:
|
|
|
|
@echo "Watching changes in linux-brain and u-boot-brain"
|
|
|
|
@. ./env/bin/activate; \
|
|
|
|
@python3 -m r3build
|
|
|
|
|
|
|
|
.PHONY:
|
|
|
|
udefconfig:
|
2020-10-26 04:19:44 +09:00
|
|
|
make -C ./u-boot-brain pwsh1_defconfig
|
2020-09-28 00:49:26 +09:00
|
|
|
|
2020-11-01 22:46:19 +09:00
|
|
|
.PHONY:
|
|
|
|
udefconfig-%:
|
|
|
|
make -C ./u-boot-brain pw$*_defconfig
|
|
|
|
|
2020-10-12 06:09:17 +09:00
|
|
|
.PHONY:
|
|
|
|
usavedefconfig:
|
|
|
|
make -C ./u-boot-brain savedefconfig
|
|
|
|
|
2020-09-28 00:49:26 +09:00
|
|
|
.PHONY:
|
|
|
|
umenuconfig:
|
|
|
|
make -C ./u-boot-brain menuconfig
|
|
|
|
|
2020-10-26 04:19:51 +09:00
|
|
|
.PHONY:
|
|
|
|
uclean:
|
|
|
|
make -C ./u-boot-brain distclean
|
|
|
|
|
2020-09-28 00:49:26 +09:00
|
|
|
.PHONY:
|
|
|
|
ubuild:
|
2020-09-28 00:58:06 +09:00
|
|
|
make -j$(JOBS) -C ./u-boot-brain u-boot.sb
|
2020-09-28 00:49:26 +09:00
|
|
|
|
|
|
|
.PHONY:
|
|
|
|
ldefconfig:
|
2020-11-24 03:08:57 +09:00
|
|
|
make -C ./linux-brain brain_defconfig
|
2020-09-28 00:49:26 +09:00
|
|
|
|
|
|
|
.PHONY:
|
|
|
|
lmenuconfig:
|
|
|
|
make -C ./linux-brain menuconfig
|
|
|
|
|
|
|
|
.PHONY:
|
|
|
|
lsavedefconfig:
|
|
|
|
make -C ./linux-brain savedefconfig
|
2020-11-24 03:08:57 +09:00
|
|
|
mv ./linux-brain/defconfig ./linux-brain/arch/arm/configs/brain_defconfig
|
2020-09-28 00:49:26 +09:00
|
|
|
|
2020-11-24 03:13:28 +09:00
|
|
|
.PHONY:
|
|
|
|
lclean:
|
|
|
|
make -C ./linux-brain distclean
|
|
|
|
|
2020-09-28 00:49:26 +09:00
|
|
|
.PHONY:
|
|
|
|
lbuild:
|
2020-09-28 00:58:06 +09:00
|
|
|
make -j$(JOBS) -C ./linux-brain
|
2020-09-28 00:49:26 +09:00
|
|
|
|
|
|
|
.PHONY:
|
|
|
|
uuu:
|
|
|
|
sudo uuu ./u-boot-brain/u-boot.sb
|
|
|
|
|
2020-10-18 15:27:28 +09:00
|
|
|
.PHONY:
|
2020-10-18 17:21:33 +09:00
|
|
|
nkbin-maker:
|
2020-10-18 15:27:28 +09:00
|
|
|
make -C ./nkbin_maker
|
2020-10-18 17:21:33 +09:00
|
|
|
|
|
|
|
.PHONY:
|
|
|
|
nk.bin:
|
2020-10-18 15:27:28 +09:00
|
|
|
./nkbin_maker/bsd-ce ./u-boot-brain/u-boot.bin
|
|
|
|
|
2020-09-28 00:49:26 +09:00
|
|
|
debian:
|
2020-10-27 19:53:25 +09:00
|
|
|
@if [ "$(shell uname)" != "Linux" ]; then \
|
|
|
|
echo "Debootstrap is only available in Linux!"; \
|
|
|
|
exit 1; \
|
|
|
|
fi
|
2020-11-04 19:39:09 +09:00
|
|
|
mkdir -p debian
|
2020-10-27 20:14:29 +09:00
|
|
|
sudo debootstrap --arch=armel --foreign buster debian/ http://localhost:65432/debian/
|
2020-09-28 00:49:26 +09:00
|
|
|
sudo cp /usr/bin/qemu-arm-static debian/usr/bin/
|
2020-10-27 19:27:27 +09:00
|
|
|
sudo cp ./tools/setup_debian.sh debian/
|
2020-09-28 00:49:26 +09:00
|
|
|
sudo chroot debian /setup_debian.sh
|
2020-10-27 20:14:29 +09:00
|
|
|
|
|
|
|
.PHONY:
|
|
|
|
aptcache:
|
|
|
|
./tools/aptcache_linux_amd64 \
|
|
|
|
-rule 'local=localhost:65432, remote=ftp.jaist.ac.jp' \
|
|
|
|
-rule 'local=localhost:65433, remote=security.debian.org'
|