Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 01 Dec 2019 20:31:49 +0100
From:      =?UTF-8?Q?Jos=C3=A9_P=C3=A9rez?= <fbl@aoek.com>
To:        freebsd-arm@freebsd.org
Subject:   How to build working images for RPI
Message-ID:  <7b0c24213c7f9f0657802978e5ca82f7@mail.yourbox.net>

next in thread | raw e-mail | index | archive | help
Hi,
images built with crochet are not working (no boot,
no nothing) on RPI but images downloaded from
https://download.freebsd.org/ftp/snapshots/arm/armv6/ISO-IMAGES do

How do they build the downloadable images?

The wiki
https://wiki.freebsd.org/arm/Raspberry%20Pi
states that you can build your own images with crochet
but it does not state how THEY build the working images
that are on the FTP site.

I notice that the images built with crochet are VERY different
from the ones you download, for example:

md0 has the crochet image, md1 the downloaded one

crochet # gpart show md0
=>      1  5859374  md0  MBR  (2.8G)
         1       62       - free -  (31K)
        63    34776    1  fat32lba  [active]  (17M)
     34839     1001       - free -  (501K)
     35840  5823488    2  freebsd  (2.8G)
   5859328       47       - free -  (24K)

crochet # gpart show md1
=>     63  6291393  md1  MBR  (3.0G)
        63     1008       - free -  (504K)
      1071   102312    1  fat32lba  [active]  (50M)
    103383  6188049    2  freebsd  (3.0G)
   6291432       24       - free -  (12K)

rochet # ll /mnt/md0/boot/msdos/
total 2448
-rwxr-xr-x  1 root  wheel      765 Nov 23 15:53 README*
-rwxr-xr-x  1 root  wheel      199 Nov 23 15:53 boot.scr*
-rwxr-xr-x  1 root  wheel       75 Nov 23 15:53 config.txt*
-rwxr-xr-x  1 root  wheel       37 Nov 23 15:53 metadata*
-rwxr-xr-x  1 root  wheel    19602 Nov 23 15:53 rpi.dtb*
-rwxr-xr-x  1 root  wheel    21186 Nov 23 15:53 rpi.dts*
-rwxr-xr-x  1 root  wheel   465860 Nov 23 15:53 u-boot.bin*
-rwxr-xr-x  1 root  wheel        0 Nov 23 15:53 uEnv.txt*
-rwxr-xr-x  1 root  wheel  1586895 Nov 23 15:53 ubldr*
-rwxr-xr-x  1 root  wheel   386184 Nov 23 15:53 ubldr.bin*

crochet # ll /mnt/md1/boot/msdos/
total 13460
drwxr-xr-x  1 root  wheel     4096 Nov 21 04:55 EFI/
-rwxr-xr-x  1 root  wheel    23315 Nov 12  2018 bcm2708-rpi-0-w.dtb*
-rwxr-xr-x  1 root  wheel    23071 Nov 12  2018 bcm2708-rpi-b-plus.dtb*
-rwxr-xr-x  1 root  wheel    22812 Nov 12  2018 bcm2708-rpi-b.dtb*
-rwxr-xr-x  1 root  wheel    22589 Nov 12  2018 bcm2708-rpi-cm.dtb*
-rwxr-xr-x  1 root  wheel    52116 Nov 12  2018 bootcode.bin*
-rwxr-xr-x  1 root  wheel       89 Nov 21 03:11 config.txt*
drwxr-xr-x  1 root  wheel     4096 Nov 21 04:55 dtb/
-rwxr-xr-x  1 root  wheel     6666 Nov 12  2018 fixup.dat*
-rwxr-xr-x  1 root  wheel     2621 Nov 12  2018 fixup_cd.dat*
-rwxr-xr-x  1 root  wheel     9895 Nov 12  2018 fixup_db.dat*
-rwxr-xr-x  1 root  wheel     9895 Nov 12  2018 fixup_x.dat*
drwxr-xr-x  1 root  wheel     4096 Nov 21 04:55 overlays/
-rwxr-xr-x  1 root  wheel  2857060 Nov 12  2018 start.elf*
-rwxr-xr-x  1 root  wheel   678532 Nov 12  2018 start_cd.elf*
-rwxr-xr-x  1 root  wheel  5120484 Nov 12  2018 start_db.elf*
-rwxr-xr-x  1 root  wheel  4057956 Nov 12  2018 start_x.elf*
-rwxr-xr-x  1 root  wheel   465868 Nov 21 03:06 u-boot.bin*
-r-xr-xr-x  1 root  wheel   386408 Nov 21 04:48 ubldr.bin*

crochet # cat /mnt/md0/boot/msdos/config.txt
gpu_mem=32
device_tree=rpi.dtb
device_tree_address=0x100
kernel=u-boot.bin

crochet # cat /mnt/md1/boot/msdos/config.txt
init_uart_clock=3000000
enable_uart=1
kernel=u-boot.bin
kernel7=u-boot.bin
dtoverlay=mmc

I had to patch crochet to have the image built, but that's another
story.

Can anyone point me on how to build working images
for RPI?

Thanks in advance.

Regards,

-- 
José Pérez



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7b0c24213c7f9f0657802978e5ca82f7>