Skip to content
This repository was archived by the owner on Jun 21, 2025. It is now read-only.
Luc Verhaegen edited this page Jul 19, 2019 · 15 revisions

We are of course using patches on top of mainline u-boot and mainline kernel.

Table of Contents

sd card

For now, we will use an sd-card as our storage.

Clean the sd-card:

dd if=/dev/zero of=/dev/mmcblk0 bs=1k count=1024

Partition the sd-card:

fdisk /dev/mmcblk0

This is what libv's 16GB sd cards look like:

Device         Boot  Start      End  Sectors  Size Id Type
/dev/mmcblk0p1        2048   264191   262144  128M  c W95 FAT32 (LBA)
/dev/mmcblk0p2      264192 31257599 30993408 14.8G 83 Linux

Now create filesystems:

mkfs.vfat /dev/mmcblk0p1
mkfs.ext4 /dev/mmcblk0p2

toolchain

If you are using a debian based operating system, you can just apt-get install a cross-compiler.

Since libv is using opensuse still, he had to go and get a tarballed toolchain from linaro.

This was untarred to /home/libv/fosdem/gcc-linaro-7.3.1-2018.05-x86_64_arm-linux-gnueabihf/bin/, and it's path was added to PATH:

export PATH="$PATH":/home/libv/fosdem/video-new/gcc-linaro-7.3.1-2018.05-x86_64_arm-linux-gnueabihf/bin/

u-boot

U-boot is current with the latest official release, namely v2019-07.

The changes are:

  • enabling the 3.5" LCD for boot status.
  • adding GMAC_TX_DELAY=3 for the lime2's newer phyceiver
  • disabling hdmi as we want uboot to only show on the lcd.

Clone

Clone the repo, master holds the relevant changes:

git clone https://github.com/libv/fosdem-video-u-boot

Build

make CROSS_COMPILE=arm-linux-gnueabihf- A20-OLinuXino-Lime2-fosdem_defconfig
make -j4 CROSS_COMPILE=arm-linux-gnueabihf-

Install

Clean:

dd if=/dev/zero of=/dev/mmcblk0 bs=1k count=1023 seek=1
Install:
dd if=u-boot-sunxi-with-spl.bin of=/dev/mmcblk0 bs=1k seek=8

Configure

Add the file boot.cmd to the filesytem at /dev/mmcblk0p1:

setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait panic=10 ${extra}

bootz 0x46000000 - 0x49000000

Now run to following to convert boot.cmd to boot.scr:

mkimage -C none -A arm -T script -d boot.cmd boot.scr

kernel

rootfs

hdmi_test

Clone this wiki locally