From owner-freebsd-arm@freebsd.org Sun Dec 1 22:36:04 2019 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 323571BB86F for ; Sun, 1 Dec 2019 22:36:04 +0000 (UTC) (envelope-from mike@karels.net) Received: from mail.karels.net (mail.karels.net [216.160.39.52]) by mx1.freebsd.org (Postfix) with ESMTP id 47R34L6W0Dz4LvY for ; Sun, 1 Dec 2019 22:36:02 +0000 (UTC) (envelope-from mike@karels.net) Received: from mail.karels.net (localhost [127.0.0.1]) by mail.karels.net (8.15.2/8.15.2) with ESMTP id xB1MZpai007260; Sun, 1 Dec 2019 16:35:51 -0600 (CST) (envelope-from mike@karels.net) Message-Id: <201912012235.xB1MZpai007260@mail.karels.net> To: Jose Perez cc: freebsd-arm@freebsd.org From: Mike Karels Reply-to: mike@karels.net Subject: Re: How to build working images for RPI In-reply-to: Your message of Sun, 01 Dec 2019 20:31:49 +0100. <7b0c24213c7f9f0657802978e5ca82f7@mail.yourbox.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <7258.1575239751.1@mail.karels.net> Date: Sun, 01 Dec 2019 16:35:51 -0600 X-Rspamd-Queue-Id: 47R34L6W0Dz4LvY X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of mike@karels.net designates 216.160.39.52 as permitted sender) smtp.mailfrom=mike@karels.net X-Spamd-Result: default: False [-4.16 / 15.00]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[mike@karels.net]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:216.160.39.52]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[karels.net]; REPLYTO_ADDR_EQ_FROM(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; IP_SCORE(-1.96)[ip: (-6.53), ipnet: 216.160.0.0/15(-3.21), asn: 209(0.01), country: US(-0.05)]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:209, ipnet:216.160.0.0/15, country:US]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Dec 2019 22:36:04 -0000 (Sorry, I'm using a UTF-8-challenged mailer at the moment...) Jose wrote: > 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? I'm not an expert, having done this for the first time yesterday, but the short answer is like this: cd ^/release/; ./release.sh -c arm64/RPI3.conf Note that this will build a complete chroot for the build system, including ports, with sources that it checks out, and then builds the target system. The chroot is built in /scratch. I built from head on amd64. Mike