User Tools

Site Tools


boot_process

Boot Process

This boot process is universal to all PROXmobil3 units as best we can tell with existing data.

  1. U-Boot starts from the 16 MB SPI flash (mtd0). It is 2018.03-INIT-004, built in March 2019. Its bootcmd runs sdboot, then failover, then sdboot again, then panicboot.
  2. U-Boot loads the kernel and DTB from sda1:/boot or from the SPI copy. The .old kernel and DTB are the rollback path. The kernel command line is root=/dev/sda1 ro rootfstype=ext4 rootwait cma=128M.
  3. The root filesystem mounts read-only at /. systemd is PID 1.
  4. init.mount mounts the partition labelled init at /init, using /dev/disk/by-label/init. The label cannot be changed. The mount unit has the normal 90-second timeout; if the init partition is missing, the boot does not complete.
  5. init-rc.service runs /init/tools/initexec.sh startup. If the startup argument is missing, the script prints its usage and exits.
  6. initexec.sh sources /init/tools/initenv.sh if it exists, which can set environment variables and aliases. It exports INIT_ROOT=/init, NX_EXE=NxExe, and REBOOT_FLAG, and creates the runtime directories. It reads the distribution channel from efad/pgm/env.ini (VertriebsWeg=72 by default).
  7. It calls do_startup, which installs any pending archives from /init/install/archive. It processes the X72/x72 files in name order, skips downgrades against BaseVersion in efad/pgm/arcinfo.dat, skips archives that already have a log, runs each _install.sh, and keeps the log on success. The stock log line has a typo: installed archvie.
  8. If /init/tmp/reboot.flg exists, it removes the flag and reboots.
  9. It runs every executable in /init/autorun/ in filename order. The stock scripts are:
    • 10-eeprom.sh reads the mounting-plate or dongle EEPROM into /tmp/eeprom.dat.
    • 20-ext-sdcard.sh mounts the external SD/USB at /init/efad/mp_sd.
    • 90-testmode.sh stops nx, disables the PIC32 watchdog, extracts the [TestMode] block from /tmp/eeprom.dat, and runs it as a shell script.
    • 99-devmode.sh stops nx and disables the watchdog if NxProx is missing.
  10. initexec.sh prints Startup completed. The autorun scripts themselves do not launch NxProx. NxProx is a systemd service. init-abtproxy.service is enabled on the stock image; nx.service is enabled or started by the unit configuration. If enabled, nx starts after init-rc.service.

nx.service has FailureAction=poweroff. If nx is stopped or crashes in the wrong way, the unit can power off. If you are working on the unit, disable the PIC32 watchdog in the same step you stop nx:

systemctl stop nx init-abtproxy
NxExe watchdog 0

The PIC32 watchdog is external to the SoC. It power-cycles the unit about 60 seconds after boot unless something feeds it. nx normally feeds it.

The init sequence is easy to change on purpose. Edit initexec.sh, or drop a script into /init/autorun/. The supported way to do that without opening the case is the [TestMode] dongle payload or an autorun script on the init SD card.

Serial console

The U-Boot and kernel console is ttymxc1 on the four-pin ARMcons header. Settings are 115200 8N1. Interrupt U-Boot there if you need the bootloader prompt.

boot_process.txt · Last modified: by qkb