code wiki / _hdl_build / nx_deploy_stage_candidate_t188.nx
nx_deploy_stage_candidate_t188.nx
buildroot/runtime/_hdl_build/nx_deploy_stage_candidate_t188.nx
about
ELF-magic admission and exact-byte staging into a .new slot.
This preserves ordinary source permissions and verifies copied bytes; it does
not establish that an ELF is valid for execution. Legacy1024-byte admission
remains explicit pending format-aware admission; no64MiB content ceiling.
Caller owns trusted stage directories. File and directory sync outcomes are
recorded separately from visibility. Promotion and runtime health are separate.
license_tier: ORIGINAL
dependencies 2 imports · 3 importers
imports: nx_fio.nxnx_descriptor_candidate_t188.nx
imported by: nx_deploy_stage_cli_t188.nxnx_deploy_stage_emitter_gate_t188.nxnx_deploy_stage_gate_t188.nx
structs
| 38 | struct NxDeployStageResult |
consts
| 10 | const DS_MAGIC_1024: i64 = 1024 |
| 11 | const DS_MAGIC_4096: i64 = 4096 |
| 12 | const DS_MAGIC_2000: i64 = 2000 |
| 14 | const DS_MINSZ: i64 = 1024 // smallest plausible ELF; a smaller "binary" is a failed/torn build |
functions
| 16 | func ds_w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } called by 1: main |
| 17 | func ds_len(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 18 | func ds_cat(d: *u8, off: i64, s: *u8) -> i64 { var i: i64=0; var o: i64=off; while s[i]!=(0 as u8){d[o]=s[i]; o=o+1; i=i+1} return o } called by 1: ds_stage_core |
| 19 | func ds_catn(d: *u8, off: i64, v: i64) -> i64 |
| 26 | func ds_dst_is_new(dst: *u8) -> i64 |
| 41 | func ds_stat_word(stat:*u8,offset:i64)->i64 |
| 44 | func ds_stage_result_init(r:*NxDeployStageResult)->i64 |
| 47 | func ds_source_prepare(src:*u8,region:*NxFileReadRegion,stat:*u8,digest:*u8,r:*NxDeployStageResult)->i64 called by 2: ds_src_sizeds_stage_core calls 4: fio_region_opensys_fstat_fdsys_stat_permissionsds_stat_word |
| 82 | func ds_src_size(src:*u8)->i64 |
| 96 | func ds_stage_core(src:*u8,dst:*u8,r:*NxDeployStageResult)->i64 called by 3: ds_stagemainmain calls 13: ds_stage_result_initds_dst_is_newds_lenfio_region_initds_source_prepareds_cat+7 |
| 222 | func ds_stage(src:*u8,dst:*u8)->i64 |
| 230 | func ds_out_fd(fd:i64,s:*u8,n:i64)->i64 |
| 234 | func ds_text_fd(fd:i64,s:*u8)->i64{return ds_out_fd(fd,s,ds_len(s))} |
| 235 | func ds_json_fd(fd:i64,s:*u8)->i64 |
| 253 | func ds_digits_fd(fd:i64,v:i64)->i64 |
| 258 | func ds_num_fd(fd:i64,v:i64)->i64 |
| 261 | func ds_emit_result(fd:i64,src:*u8,dst:*u8,r:*NxDeployStageResult)->i64 |
| 278 | func ds_emit(src:*u8,dst:*u8,rc:i64,sz:i64)->i64 |
| 287 | func ds_selftest() -> i64 |