Altera: How can I limit the amount of memory passed to Linux when booting from u-boot?
Embedded SW (OS)
SoC EDS/DS-5
SoC FPGA
This can be achieved by adding parameters to the u-boot environment variables.
(Step 1) Display the U-boot prompt
- Enter any key within 5 seconds to activate the u-boot console.
(Step 2) Edit u-boot environment variables
- Execute the following command to edit "mmcboot".
The following example shows a setting that passes only 512MB to Linux.
#editenv mmcboot
setenv bootargs console=ttyS0,57600 root=${mmcroot} rw rootwait mem=512M;bootm ${loadaddr} - ${fdtaddr}
(mem=512M parameter added)
*You can check whether the settings have been reflected by using the printenv command.
* Parameters can be saved by using the saveenv command.
(Step 3) Starting Linux
- Run the boot command to boot Linux.
Technical resources useful for Linux design
Experienced FAE
Free consultation is available.
From specific product specifications to parts selection, the Company FAE will answer your technical concerns free of charge. Please feel free to contact us.