mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-26 11:41:35 +01:00
configure: make it work from clean repo
This commit is contained in:
23
README.adoc
23
README.adoc
@@ -8571,7 +8571,7 @@ parsecmgmt -a run -p splash2x.fmm -i test
|
|||||||
|
|
||||||
====== PARSEC uninstall
|
====== PARSEC uninstall
|
||||||
|
|
||||||
If you want to remove PARSEC later, Buildroot doesn't provide an automated package removal mechanism as documented at: link:https://github.com/buildroot/buildroot/blob/2017.08/docs/manual/rebuilding-packages.txt#L90[], but the following procedure should be satisfactory:
|
If you want to remove PARSEC later, Buildroot doesn't provide an automated package removal mechanism: <<remove-buildroot-packages>>, but the following procedure should be satisfactory:
|
||||||
|
|
||||||
....
|
....
|
||||||
rm -rf \
|
rm -rf \
|
||||||
@@ -9575,6 +9575,14 @@ For how to use that package, see: <<packages-directory>>.
|
|||||||
|
|
||||||
Then iterate trying to do what you want and reading the manual until it works: https://buildroot.org/downloads/manual/manual.html
|
Then iterate trying to do what you want and reading the manual until it works: https://buildroot.org/downloads/manual/manual.html
|
||||||
|
|
||||||
|
=== Remove Buildroot packages
|
||||||
|
|
||||||
|
Once you've built a package in to the image, there is no easy way to remove it.
|
||||||
|
|
||||||
|
Documented at: link:https://github.com/buildroot/buildroot/blob/2017.08/docs/manual/rebuilding-packages.txt#L90[]
|
||||||
|
|
||||||
|
See this for a sample manual workaround: <<parsec-uninstall>>.
|
||||||
|
|
||||||
=== BR2_TARGET_ROOTFS_EXT2_SIZE
|
=== BR2_TARGET_ROOTFS_EXT2_SIZE
|
||||||
|
|
||||||
When adding new large package to the Buildroot root filesystem, it may fail with the message:
|
When adding new large package to the Buildroot root filesystem, it may fail with the message:
|
||||||
@@ -10944,23 +10952,30 @@ This can be used to check the determinism of:
|
|||||||
|
|
||||||
==== Release
|
==== Release
|
||||||
|
|
||||||
This is not yet super stable, but one day maybe this script will automatically do a release:
|
Create a release:
|
||||||
|
|
||||||
....
|
....
|
||||||
|
git clone https://github.com/cirosantilli/linux-kernel-module-cheat linux-kernel-module-cheat-release
|
||||||
|
cd linux-kernel-module-cheat-release
|
||||||
./release
|
./release
|
||||||
....
|
....
|
||||||
|
|
||||||
Source: link:release[].
|
Source: link:release[].
|
||||||
|
|
||||||
When ready, that script should:
|
This scripts does:
|
||||||
|
|
||||||
|
* configure
|
||||||
* build
|
* build
|
||||||
* test
|
|
||||||
* package with <<release-zip>>
|
* package with <<release-zip>>
|
||||||
|
* creates a tag of form `sha-<sha>`
|
||||||
* upload to GitHub with link:release-create-github[]
|
* upload to GitHub with link:release-create-github[]
|
||||||
|
|
||||||
|
Cloning a clean tree is ideal as it generates clean images since <<remove-buildroot-packages,it is not possible to remove Buildroot packages>>
|
||||||
|
|
||||||
This should in particular enable to easily update <<prebuilt>>.
|
This should in particular enable to easily update <<prebuilt>>.
|
||||||
|
|
||||||
|
TODO also run tests and only release if they pass.
|
||||||
|
|
||||||
===== release-zip
|
===== release-zip
|
||||||
|
|
||||||
Create a zip containing all files required for <<prebuilt>>
|
Create a zip containing all files required for <<prebuilt>>
|
||||||
|
|||||||
21
configure
vendored
21
configure
vendored
@@ -1,5 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
|
all=false
|
||||||
apt_get=true
|
apt_get=true
|
||||||
baremetal=false
|
baremetal=false
|
||||||
baremetal_given=false
|
baremetal_given=false
|
||||||
@@ -8,6 +9,7 @@ buildroot_given=false
|
|||||||
linux=true
|
linux=true
|
||||||
linux_given=false
|
linux_given=false
|
||||||
interactive_pkgs=libsdl2-dev
|
interactive_pkgs=libsdl2-dev
|
||||||
|
parsec_benchmark_given=false
|
||||||
gem5=false
|
gem5=false
|
||||||
gem5_given=false
|
gem5_given=false
|
||||||
qemu=true
|
qemu=true
|
||||||
@@ -17,8 +19,11 @@ submodules=
|
|||||||
y=
|
y=
|
||||||
while [ $# -gt 0 ]; do
|
while [ $# -gt 0 ]; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
--all)
|
||||||
|
all=true
|
||||||
|
shift
|
||||||
|
;;
|
||||||
--baremetal)
|
--baremetal)
|
||||||
baremetal=true
|
|
||||||
baremetal_given=true
|
baremetal_given=true
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
@@ -31,7 +36,7 @@ while [ $# -gt 0 ]; do
|
|||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
--parsec-benchmark)
|
--parsec-benchmark)
|
||||||
submodules="${submodules} parsec-benchmark"
|
parsec_benchmark_given=true
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
--qemu)
|
--qemu)
|
||||||
@@ -53,15 +58,21 @@ while [ $# -gt 0 ]; do
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
if "$gem5_given" && ! "$qemu_given"; then
|
if ! "$all" && "$gem5_given" && ! "$qemu_given"; then
|
||||||
qemu=false
|
qemu=false
|
||||||
fi
|
fi
|
||||||
if "$gem5_given"; then
|
if "$all" || "$gem5_given"; then
|
||||||
gem5=true
|
gem5=true
|
||||||
fi
|
fi
|
||||||
if "$baremetal_given" && ! "$buildroot_given"; then
|
if "$all" || "$baremetal_given"; then
|
||||||
|
baremetal=true
|
||||||
|
fi
|
||||||
|
if ! "$all" && "$baremetal_given" && ! "$buildroot_given"; then
|
||||||
buildroot=false
|
buildroot=false
|
||||||
fi
|
fi
|
||||||
|
if "$all" || "$parsec_benchmark_given"; then
|
||||||
|
submodules="${submodules} parsec-benchmark"
|
||||||
|
fi
|
||||||
|
|
||||||
if "$apt_get"; then
|
if "$apt_get"; then
|
||||||
pkgs="\
|
pkgs="\
|
||||||
|
|||||||
6
release
6
release
@@ -7,11 +7,13 @@ https://upload.com/cirosantilli/linux-kernel-module-cheat#release
|
|||||||
import imp
|
import imp
|
||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import time
|
||||||
|
|
||||||
import common
|
import common
|
||||||
release_zip = imp.load_source('release_zip', os.path.join(common.root_dir, 'release-zip'))
|
release_zip = imp.load_source('release_zip', os.path.join(common.root_dir, 'release-zip'))
|
||||||
release_upload = imp.load_source('release_upload', os.path.join(common.root_dir, 'release-upload'))
|
release_upload = imp.load_source('release_upload', os.path.join(common.root_dir, 'release-upload'))
|
||||||
|
|
||||||
|
start_time = time.time()
|
||||||
# TODO factor those out so we don't redo the same thing multiple times.
|
# TODO factor those out so we don't redo the same thing multiple times.
|
||||||
# subprocess.check_call([os.path.join(common.root_dir, 'test')])
|
# subprocess.check_call([os.path.join(common.root_dir, 'test')])
|
||||||
# subprocess.check_call([os.path.join(common.root_dir, ''bench-all', '-A', '-u'])
|
# subprocess.check_call([os.path.join(common.root_dir, ''bench-all', '-A', '-u'])
|
||||||
@@ -21,7 +23,11 @@ release_upload = imp.load_source('release_upload', os.path.join(common.root_dir,
|
|||||||
# installed in random experiments. And with EXT2: we can't easily
|
# installed in random experiments. And with EXT2: we can't easily
|
||||||
# know what the smallest root filesystem size is and use it either...
|
# know what the smallest root filesystem size is and use it either...
|
||||||
# https://stackoverflow.com/questions/47320800/how-to-clean-only-target-in-buildroot
|
# https://stackoverflow.com/questions/47320800/how-to-clean-only-target-in-buildroot
|
||||||
|
subprocess.check_call([os.path.join(common.root_dir, 'configure'), '--all'])
|
||||||
subprocess.check_call([os.path.join(common.root_dir, 'build-all')])
|
subprocess.check_call([os.path.join(common.root_dir, 'build-all')])
|
||||||
release_zip.main()
|
release_zip.main()
|
||||||
|
subprocess.check_call(['git', 'tag', common.sha])
|
||||||
subprocess.check_call(['git', 'push'])
|
subprocess.check_call(['git', 'push'])
|
||||||
release_upload.main()
|
release_upload.main()
|
||||||
|
end_time = time.time()
|
||||||
|
common.print_time(end_time - start_time)
|
||||||
|
|||||||
Reference in New Issue
Block a user