Skip to content

Commit c0b60d6

Browse files
committed
configure: make it work from clean repo
1 parent 74b51fc commit c0b60d6

File tree

3 files changed

+41
-9
lines changed

3 files changed

+41
-9
lines changed

README.adoc

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8571,7 +8571,7 @@ parsecmgmt -a run -p splash2x.fmm -i test
85718571

85728572
====== PARSEC uninstall
85738573

8574-
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:
8574+
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:
85758575

85768576
....
85778577
rm -rf \
@@ -9575,6 +9575,14 @@ For how to use that package, see: <<packages-directory>>.
95759575

95769576
Then iterate trying to do what you want and reading the manual until it works: https://buildroot.org/downloads/manual/manual.html
95779577

9578+
=== Remove Buildroot packages
9579+
9580+
Once you've built a package in to the image, there is no easy way to remove it.
9581+
9582+
Documented at: link:https://github.com/buildroot/buildroot/blob/2017.08/docs/manual/rebuilding-packages.txt#L90[]
9583+
9584+
See this for a sample manual workaround: <<parsec-uninstall>>.
9585+
95789586
=== BR2_TARGET_ROOTFS_EXT2_SIZE
95799587

95809588
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:
1094410952

1094510953
==== Release
1094610954

10947-
This is not yet super stable, but one day maybe this script will automatically do a release:
10955+
Create a release:
1094810956

1094910957
....
10958+
git clone https://github.com/cirosantilli/linux-kernel-module-cheat linux-kernel-module-cheat-release
10959+
cd linux-kernel-module-cheat-release
1095010960
./release
1095110961
....
1095210962

1095310963
Source: link:release[].
1095410964

10955-
When ready, that script should:
10965+
This scripts does:
1095610966

10967+
* configure
1095710968
* build
10958-
* test
1095910969
* package with <<release-zip>>
10970+
* creates a tag of form `sha-<sha>`
1096010971
* upload to GitHub with link:release-create-github[]
1096110972

10973+
Cloning a clean tree is ideal as it generates clean images since <<remove-buildroot-packages,it is not possible to remove Buildroot packages>>
10974+
1096210975
This should in particular enable to easily update <<prebuilt>>.
1096310976

10977+
TODO also run tests and only release if they pass.
10978+
1096410979
===== release-zip
1096510980

1096610981
Create a zip containing all files required for <<prebuilt>>

configure

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env bash
22
set -eu
3+
all=false
34
apt_get=true
45
baremetal=false
56
baremetal_given=false
@@ -8,6 +9,7 @@ buildroot_given=false
89
linux=true
910
linux_given=false
1011
interactive_pkgs=libsdl2-dev
12+
parsec_benchmark_given=false
1113
gem5=false
1214
gem5_given=false
1315
qemu=true
@@ -17,8 +19,11 @@ submodules=
1719
y=
1820
while [ $# -gt 0 ]; do
1921
case "$1" in
22+
--all)
23+
all=true
24+
shift
25+
;;
2026
--baremetal)
21-
baremetal=true
2227
baremetal_given=true
2328
shift
2429
;;
@@ -31,7 +36,7 @@ while [ $# -gt 0 ]; do
3136
shift
3237
;;
3338
--parsec-benchmark)
34-
submodules="${submodules} parsec-benchmark"
39+
parsec_benchmark_given=true
3540
shift
3641
;;
3742
--qemu)
@@ -53,15 +58,21 @@ while [ $# -gt 0 ]; do
5358
;;
5459
esac
5560
done
56-
if "$gem5_given" && ! "$qemu_given"; then
61+
if ! "$all" && "$gem5_given" && ! "$qemu_given"; then
5762
qemu=false
5863
fi
59-
if "$gem5_given"; then
64+
if "$all" || "$gem5_given"; then
6065
gem5=true
6166
fi
62-
if "$baremetal_given" && ! "$buildroot_given"; then
67+
if "$all" || "$baremetal_given"; then
68+
baremetal=true
69+
fi
70+
if ! "$all" && "$baremetal_given" && ! "$buildroot_given"; then
6371
buildroot=false
6472
fi
73+
if "$all" || "$parsec_benchmark_given"; then
74+
submodules="${submodules} parsec-benchmark"
75+
fi
6576

6677
if "$apt_get"; then
6778
pkgs="\

release

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ https://upload.com/cirosantilli/linux-kernel-module-cheat#release
77
import imp
88
import os
99
import subprocess
10+
import time
1011

1112
import common
1213
release_zip = imp.load_source('release_zip', os.path.join(common.root_dir, 'release-zip'))
1314
release_upload = imp.load_source('release_upload', os.path.join(common.root_dir, 'release-upload'))
1415

16+
start_time = time.time()
1517
# TODO factor those out so we don't redo the same thing multiple times.
1618
# subprocess.check_call([os.path.join(common.root_dir, 'test')])
1719
# 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,
2123
# installed in random experiments. And with EXT2: we can't easily
2224
# know what the smallest root filesystem size is and use it either...
2325
# https://stackoverflow.com/questions/47320800/how-to-clean-only-target-in-buildroot
26+
subprocess.check_call([os.path.join(common.root_dir, 'configure'), '--all'])
2427
subprocess.check_call([os.path.join(common.root_dir, 'build-all')])
2528
release_zip.main()
29+
subprocess.check_call(['git', 'tag', common.sha])
2630
subprocess.check_call(['git', 'push'])
2731
release_upload.main()
32+
end_time = time.time()
33+
common.print_time(end_time - start_time)

0 commit comments

Comments
 (0)