How linux-goxceed/gxipl works
gxipl is a first-stage loader and DDR-resident bootcode for NationalChip GX6702/GX6706. BootROM starts the IPL, which initializes the chip and DDR, then obtains GXBC bootcode through SPI or UART. The bootcode selects USB FAT, SPI BOOT, or UART recovery (with configuration able to alter the order), and transfers control to a loaded executable. The graph also preserves the IPL’s USB/FAT loading path, SPI/table discovery, and shared configuration and hardware-initialization layers. Some subsystem links rely on README descriptions or source-index references; unsampled implementations are not inferred beyond those links.
Main entry points: main.c Boot selection · usb_boot.c USB boot · ipl.c IPL startup · ipl_common.c IPL common flow
Components 21
Stage-one IPL
- IPL startup
ipl/ipl.c - SoC and DDR init
ipl/gx6706_ipl.c - IPL common flow
ipl/ipl_common.c - USB FAT loader
ipl/fat/stage15_usb.c - IPL USB MSC
ipl/usb/usb_msc_min.c - IPL SPI reader
ipl/gx_spi.c
DDR bootcode
- Boot selection
bootcode/main.c - USB boot
bootcode/usb_boot.c - Bootcode USB MSC
bootcode/usb/usb_msc.c - SPI BOOT loader
bootcode/spi_boot.c - Flash table discovery
bootcode/gx_table.c - UART recovery
bootcode/uart_boot.c - ELF loader
bootcode/elf.c - GXBC bootcode
include/bootcode_hdr.h
Storage and filesystems
- Petit FAT
ipl/fat/pff.c - FatFs
fatfs/ff.c - USB disk I/O
bootcode/fat/diskio_usb.c
Platform services
- IPL configuration
ipl/ipl_config.c - Hardware definitions
include/gx_hw.h
Other components
- BootROM
- Loaded executable
Connections 24
- BootROM → IPL startup: loads stage one
- IPL startup → SoC and DDR init: initializes platform
- IPL startup → IPL common flow: runs boot flow
- IPL common flow → IPL SPI reader: reads SPI
- IPL common flow → USB FAT loader: loads over USB
- USB FAT loader → IPL USB MSC: reads USB storage
ipl/fat/stage15_usb.c - USB FAT loader → Petit FAT: reads FAT files
ipl/fat/stage15_usb.c - IPL common flow → GXBC bootcode: loads GXBC
ipl/ipl_common.c - GXBC bootcode → Boot selection: hands off
- Boot selection → IPL configuration: loads settings
bootcode/main.c - Boot selection → USB boot: tries USB first
bootcode/main.c - Boot selection → SPI BOOT loader: tries SPI next
bootcode/main.c - Boot selection → UART recovery: falls back UART
bootcode/main.c - USB boot → Bootcode USB MSC: uses USB MSC
bootcode/usb_boot.c - USB boot → USB disk I/O: reads sectors
bootcode/fat/diskio_usb.c - USB disk I/O → FatFs: serves disk reads
- USB boot → FatFs: reads FAT32
- SPI BOOT loader → Flash table discovery: discovers BOOT
- SPI BOOT loader → ELF loader: loads executable
- USB boot → ELF loader: loads ELF
- UART recovery → Loaded executable: receives program
- ELF loader → Loaded executable: loads into DDR
- IPL startup → Hardware definitions: uses hardware map
ipl/ipl.c - Boot selection → Hardware definitions: uses hardware map
bootcode/main.c