[clug] ARM devices with complete upstream support

Chris Smart clug at christophersmart.com
Wed Nov 2 00:45:04 UTC 2016


On Wed, Nov 02, 2016 at 10:00:22AM +1100, Eyal Lebedinsky wrote:
>On 02/11/16 07:58, Chris Smart wrote:
>>On Tue, Nov 01, 2016 at 08:52:11PM +1100, Eyal Lebedinsky wrote:
>>>
>>>Maybe boot.scr is not fully used?
>>>
>>
>>Oh.. at a guess, the SOC is still executing the initramfs which is still
>>being loaded into memory.
>>
>>The console line there is just for Linux, sooo.. try leaving out the
>>initramfs lines from your boot.cmd before regenerating boot.scr.
>>Something like this:
>>
>>cat > boot.cmd << EOF
>>fatload mmc 0 \${kernel_addr_r} zImage
>>fatload mmc 0 \${fdt_addr_r} bcm2836-rpi-2-b.dtb
>>setenv bootargs console=ttyAMA0,115200 earlyprintk root=/dev/mmcblk0p2 \
>>rootwait panic=10
>>bootz \${kernel_addr_r} - \${fdt_addr_r}
>>EOF
>>
>>
>>Then regenerate with the same command as before, straight to the mounted
>>SD card (if it's mounted at /mnt):
>>
>>sudo mkimage -C none -A arm -T script -d boot.cmd /mnt/boot.scr
>
>Hi Chris,
>
>Great, this works.
>

OK, good. I've removed the reference to mmcblk0p2 from the posts to stop
the confusion. I may add a new post about how to do it all properly,
some time.

>Naturally, since we built without loadable modules, this failed:
>	FAILED Failed to start Load Kernel Modules.
>	See 'systemctl status systemd-modules-load.service' for details.
>Though eth0 did not come up. However
>	sudo dhclient eth0
>brought it up OK.
>

Yep, although you could just enable modules for your kernel if you do
menuconfig before building your kernel, or add the following to
defconfig/.config file:

CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y

And naturally, turn on any modules that you actually want to have.

(While you're at it, you could enable SMP.)

And when you build your kernel, just add modules target:

ARCH=arm CROSS_COMPILE=arm-linux-gnu- make -j$(nproc) \
zImage \
dtbs \
modules

Next, install the modules somewhere temporary, and rsync them onto your
mmcblk0p2 partition (mounted at /mnt):

INSTALL_MOD_PATH="${PWD}/modules" \
ARCH=arm CROSS_COMPILE=arm-linux-gnu- make -j$(nproc) \
modules_install

sudo rsync -Pa modules/ /mnt/

-c



More information about the linux mailing list