Răsfoiți Sursa

netkexec: raise the sender's image limit to match KEXEC_MAX

The host tool still refused images larger than the old fixed staging
size (0x3C200), so once the ring-3 command ELFs pushed kernel.bin to
290 KB, `make net-dev` failed with "bad size" before sending anything.
The board's limit has been kexec.h's KEXEC_MAX (4 MB) since the staging
buffer became dynamic; the sender now matches it.

Verified on QEMU: netkexec_send pushes the 290248-byte image and the
board boots it (second boot line on the serial log).
Johannes Zellner 1 lună în urmă
părinte
comite
992e7aff10
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      netkexec_send.c

+ 1 - 1
netkexec_send.c

@@ -97,7 +97,7 @@ int main(int argc, char **argv)
 	fseek(f, 0, SEEK_END);
 	size = ftell(f);
 	fseek(f, 0, SEEK_SET);
-	if (size <= 0 || size > 0x3C200) {
+	if (size <= 0 || size > 0x400000) {   /* matches kexec.h KEXEC_MAX */
 		fprintf(stderr, "netkexec_send: bad size %ld\n", size);
 		fclose(f);
 		return 1;