ARCLinux GettingStarted
ARCLinux GettingStarted
An NFS-based workflow in ARC Linux provides significant advantages by facilitating development without the need for repetitive kernel rebuilds and reboots. It enables dynamic access to host development environments and resources in real time on the target system . This approach aligns better with typical development workflows as it alleviates constraints associated with limited embedded system resources and processing power, allowing more agile testing and development cycles. By using NFS, developers can route around the limitations of initramfs, such as its static nature and longer debug cycles, focusing instead on leveraging network resources directly from the development machine . Ultimately, it streamlines application development and testing processes by reducing dependencies on the embedded system's local resources.
Building a Linux kernel for DesignWare ARC involves several key steps. Firstly, the ARC GNU tools must be installed, and the PATH environment variable should include paths to the elf32 and uClibc compilers used for kernel and application builds respectively . Next, the initial root file system is prepared using a pre-built binary initramfs that includes basic utilities and startup scripts . Before building, device nodes within the initramfs need to be created using a provided script, requiring superuser privileges . The kernel is configured using commands such as make ARCH=arc defconfig, which builds a configuration specific to ARC architecture . The file .config in the kernel source specifies the path to the initramfs, and if necessary, this path should be adjusted to ensure kernel build completeness . The kernel build is then completed with the command make ARCH=arc, resulting in a vmlinux file ready for simulation or deployment on an ARC board .
Running ARC Linux on hardware, such as the AA4 Board, involves using real physical connections and peripherals, starting the MetaWare debugger, and ensuring configurations such as FPGA bitfiles and JTAG frequencies are correctly set . The primary benefit is testing with actual hardware constraints and performance metrics . Conversely, the Instruction-Set Simulator (ISS) allows ARC Linux to run in a simulated environment that emulates ARC CPU instructions and micro-architecture, as well as emulating peripherals like UART and Ethernet . This method offers a controlled environment ideal for debugging and development, rendering it more flexible for testing changes without deploying to physical hardware . Each method benefits specific stages of development, with hardware tests providing real-world verification and ISS offering convenience and precision in iterative development.
Handling initramfs preloading is critical as it prepares the initial root file system for kernel operations . The document recommends ensuring that initramfs is preloaded with essential scripts and utilities like /etc/init.d/rcS, configuration scripts, and cross-compiled BusyBox binaries . These components provide the necessary environment for system startup and management. Additionally, because initramfs lacks device nodes by default, a helper script must be executed to create these . This preparation ensures that the kernel has a fully functional root environment upon boot, fundamental to initializing system operations and supporting further development and testing processes effectively.
SolvNet serves as an online customer support platform for Synopsys users, providing access to a large database of technical articles and frequently asked questions concerning Synopsys tools . It also hosts a range of online services such as software downloading, documentation viewing, and the ability to enter support calls directly through its interface . Users can access SolvNet by visiting its webpage and entering their Synopsys user credentials . The platform enhances support structure by offering a centralized resource for resolving issues and finding solutions efficiently, easing the user experience with comprehensive support services.
To execute Linux on an ARCangel 4 (AA4) board, the MetaWare debugger is used, starting with a specific command line setup . This involves commands like mdb -gui -OKN -nogoifmain enabling GUI mode and defining configurations such as jtag_frequency, gclk, and the FPGA bitfile for proper system setup . The bitfile will contain ARC 700 and necessary hardware IP blocks, crucial for programming the FPGA . Upon configuring these components, the debugger also runs the vmlinux kernel binary. To interact with the Linux console, a serial connection should be established with the specified host serial port settings . Proper configuration of these various elements, from hardware programming files to debugger settings, is essential for a successful boot and operational debugging session on real hardware.
To build BusyBox for ARC, developers need a recent upstream version of BusyBox, as these versions can be built out-of-the-box for ARC without additional patches . The process involves cloning the BusyBox repository and compiling it using ARC-specific tools with commands like git clone and make CROSS_COMPILE=arc-linux-uclibc-; after which, the resulting binary is installed and copied to the initramfs . Developers can then rebuild the kernel with the updated initramfs to integrate BusyBox into their ARC Linux environment. Incorporating this process into development workflows ensures that they are using the most recent and functional versions of BusyBox utilities, which are crucial for managing interactions and processes within Linux systems . Enhancing workflows with BusyBox also offers streamlined utilities for system initialization and runtime management, aiding overall software development and debugging efforts.
The document cites resolving discrepancies between CPU configurations and kernel settings as crucial to successful booting. One must ensure configuration settings such as cache-line sizes, MMU specifications, and peripheral presence match between the hardware/simulation environment and kernel settings . If configurations do not align, literals in the kernel, such as CONFIG_EARLYPRINTK, can be used to diagnose mismatches by reviewing the output for error reports . Adjustments to these configurations should be synchronized between the MetaWare debugger and the kernel settings within .config to resolve such issues. Additionally, toggles in the simulation environment that disrupt normal operations, like trace_throw, may need adjustment . Precise configuration ensures that all computational and memory handling mechanisms are compatible for smooth operation.
While configuring the ARC kernel build, defining the path to the initramfs within the .config file is essential . The CONFIG_INITRAMFS_SOURCE entry specifies the location of the initramfs folder, and the path should be correct to ensure proper inclusion during the kernel building process . If the initramfs is located relatively or involves symbolic links, these paths require precise definition and might necessitate a trailing '/' as part of the path to avoid configuration errors . Additionally, ensuring the initramfs contains necessary scripts and binaries, such as startup scripts and utilities documented earlier in the process, is crucial for it to serve effectively as a root file system for the kernel . Missing or incorrect configurations can lead to build failures or runtime issues, highlighting the importance of careful configuration setup and verification throughout the build process.
Common troubleshooting issues when starting ARC Linux include failing to boot to the shell prompt or experiencing garbled output on the serial console . These problems can originate from mismatches in CPU configuration and kernel settings, such as cache-line size, MMU page size, or clock frequency discrepancies . To resolve these, one may need to ensure configuration settings in the MetaWare debugger and the kernel are consistent. Additionally, disabling certain toggles in the debugger, such as trace_throw or enable_exceptions, can prevent issues from arising in simulated environments . For serial console output issues, ensuring the UART's baud rate aligns with the kernel configuration can correct communication errors . Thoroughly checking all hardware and software configurations before startup is essential to preemptively address these common issues.