diff --git a/README.adoc b/README.adoc index 4f1814d..60eb8b4 100644 --- a/README.adoc +++ b/README.adoc @@ -8571,7 +8571,7 @@ parsecmgmt -a run -p splash2x.fmm -i test ====== 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: <>, but the following procedure should be satisfactory: .... rm -rf \ @@ -9575,6 +9575,14 @@ For how to use that package, see: <>. 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: <>. + === BR2_TARGET_ROOTFS_EXT2_SIZE 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 -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 .... Source: link:release[]. -When ready, that script should: +This scripts does: +* configure * build -* test * package with <> +* creates a tag of form `sha-` * upload to GitHub with link:release-create-github[] +Cloning a clean tree is ideal as it generates clean images since <> + This should in particular enable to easily update <>. +TODO also run tests and only release if they pass. + ===== release-zip Create a zip containing all files required for <> diff --git a/configure b/configure index 465f5e8..e6b7fd5 100755 --- a/configure +++ b/configure @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -eu +all=false apt_get=true baremetal=false baremetal_given=false @@ -8,6 +9,7 @@ buildroot_given=false linux=true linux_given=false interactive_pkgs=libsdl2-dev +parsec_benchmark_given=false gem5=false gem5_given=false qemu=true @@ -17,8 +19,11 @@ submodules= y= while [ $# -gt 0 ]; do case "$1" in + --all) + all=true + shift + ;; --baremetal) - baremetal=true baremetal_given=true shift ;; @@ -31,7 +36,7 @@ while [ $# -gt 0 ]; do shift ;; --parsec-benchmark) - submodules="${submodules} parsec-benchmark" + parsec_benchmark_given=true shift ;; --qemu) @@ -53,15 +58,21 @@ while [ $# -gt 0 ]; do ;; esac done -if "$gem5_given" && ! "$qemu_given"; then +if ! "$all" && "$gem5_given" && ! "$qemu_given"; then qemu=false fi -if "$gem5_given"; then +if "$all" || "$gem5_given"; then gem5=true fi -if "$baremetal_given" && ! "$buildroot_given"; then +if "$all" || "$baremetal_given"; then + baremetal=true +fi +if ! "$all" && "$baremetal_given" && ! "$buildroot_given"; then buildroot=false fi +if "$all" || "$parsec_benchmark_given"; then + submodules="${submodules} parsec-benchmark" +fi if "$apt_get"; then pkgs="\ diff --git a/release b/release index 18de22d..9d1c445 100755 --- a/release +++ b/release @@ -7,11 +7,13 @@ https://upload.com/cirosantilli/linux-kernel-module-cheat#release import imp import os import subprocess +import time import common 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')) +start_time = time.time() # 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, ''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 # know what the smallest root filesystem size is and use it either... # 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')]) release_zip.main() +subprocess.check_call(['git', 'tag', common.sha]) subprocess.check_call(['git', 'push']) release_upload.main() +end_time = time.time() +common.print_time(end_time - start_time)