Skip to content

[DONOTMERGE] build: Pass OUTPUT_DIR as argument instead of hardcodi#7178

Open
ewoodev wants to merge 4 commits intoSamsung:masterfrom
ewoodev:WORK-250226_output_dir_as_argument
Open

[DONOTMERGE] build: Pass OUTPUT_DIR as argument instead of hardcodi#7178
ewoodev wants to merge 4 commits intoSamsung:masterfrom
ewoodev:WORK-250226_output_dir_as_argument

Conversation

@ewoodev
Copy link
Contributor

@ewoodev ewoodev commented Mar 4, 2026

Build scripts and tools previously used hardcoded paths or environment variables for the output directory (build/output), making it difficult to customize output locations and causing inconsistency across the build system.

  • Define OUTPUT_DIR in Makefile.unix and pass it to all sub-makes
  • mkbootparam.py, mksamsungheader.py, validate_output.py: require OUTPUT_DIR as mandatory argument
  • trap.py: require -o/--output-dir
  • mksmartfsimg.sh, g_var_profiler.sh: require OUTPUT_DIR as $1 or -d
  • dutils.sh: use fixed build/output (entry script, no user input)
  • Update build configs (bk7239n, rtl8720e, rtl8721csm, rtl8730e) to pass OUTPUT_DIR to mksamsungheader and mkbootparam

@ewoodev ewoodev changed the title build: Pass OUTPUT_DIR as argument instead of hardcodi [DONOTMERGE] build: Pass OUTPUT_DIR as argument instead of hardcodi Mar 4, 2026
Build scripts and tools previously used hardcoded paths or environment
variables for the output directory (build/output), making it difficult
to customize output locations and causing inconsistency across the
build system.

- Define OUTPUT_DIR in Makefile.unix and pass it to all sub-makes
- mkbootparam.py, mksamsungheader.py, validate_output.py: require
  OUTPUT_DIR as mandatory argument
- trap.py: require -o/--output-dir
- mksmartfsimg.sh, g_var_profiler.sh: require OUTPUT_DIR as $1 or -d
- dutils.sh: use fixed build/output (entry script, no user input)
- Update build configs (bk7239n, rtl8720e, rtl8721csm, rtl8730e) to pass
  OUTPUT_DIR to mksamsungheader and mkbootparam
@ewoodev ewoodev force-pushed the WORK-250226_output_dir_as_argument branch from 24af286 to 6bdd726 Compare March 4, 2026 09:11
ewoodev added 3 commits March 5, 2026 18:28
The post-build scripts (set_bininfo.py, convert_binary.py, check_package_size.py)
previously processed all binaries at once, making it difficult to separate
the build process for individual binary types (kernel, app, common, resource).

- Refactor scripts to accept bin_type or binary name as argument
- Add per-binary calls in PREPARE_APP macro for app/common binaries
- Add individual calls for kernel and resource in post target
- Remove check_package_size call from validate_output.py
- Support both explicit bin_type (app1, kernel, etc.) and config binary name
The MEMSTATS variable was not set for armv7-a GNU_EABI toolchain,
causing memory statistics generation to be skipped during build.

- Add MEMSTATS = gnueabil for GNU_EABI toolchain configuration
The monolithic post target made it difficult to build individual
components separately and increased build time when only specific
outputs needed rebuilding.

- post1: Build user binaries (app1, app2, common)
- post2: Build kernel binary and related outputs (bootparam, uImage, etc.)
- post3: Build filesystem images (resource, smartfs)
- Update $(BIN) dependencies to call post1 post2 post3 directly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant