# What is target arch for freebsd rpi4



## Wahaj4311 (May 23, 2021)

I'm trying this 
Script
But I'm not sure what will be target arch.
Can someone tell me please.
And what will be KERNCONF for RPI4.


----------



## kpedersen (May 23, 2021)

This seems fairly overly complex. I think it is quite old.

If you just want to install FreeBSD on a RPI4, then you can download the img from here: https://download.freebsd.org/ftp/releases/arm64/aarch64/ISO-IMAGES/13.0/

And boot from it.


----------



## Wahaj4311 (May 23, 2021)

Well I wanna compile the same image that you compile.
I need the info please give me .
I'm working on porting.
Kindly help me.
Thanks


----------



## T-Daemon (May 23, 2021)

According to the Raspberry PI wiki the PI4 has the same image as PI3. Have you tried the example for the Raspberry Pi 3 in the release(7) manuals EXAMPLES section:


```
To build an image for the Raspberry Pi 3:

           cd /usr/src/release
           sh release.sh -c arm64/RPI3.conf
```


----------



## Wahaj4311 (May 23, 2021)

T-Daemon said:


> According to the Raspberry PI wiki the PI4 has the same image as PI3. Have you tried the example for the Raspberry Pi 3 in the release(7) manuals EXAMPLES section:
> 
> 
> ```
> ...


Ok so let me be clear.
I'm in jails .
And this method didn't seems to work there!
Any latest alternative...


----------



## T-Daemon (May 23, 2021)

What exactly doesn't work? Are there any error messages?

Inspecting /usr/src/release/arm64/RPI3.conf, the shell script is expecting the firmware of the PI 4 B bcm2711-rpi-4-b.dtb and config_rpi4.txt to be present on system.

Both files are provided by port (package) sysutils/rpi-firmware.


----------



## T-Daemon (May 23, 2021)

T-Daemon said:


> Inspecting /usr/src/release/arm64/RPI3.conf, the shell script is expecting the firmware of the PI 4 B bcm2711-rpi-4-b.dtb and config_rpi4.txt to be present on system.



Also u-boot.bin from sysutils/u-boot-rpi


----------



## Wahaj4311 (May 24, 2021)

Any script?


----------



## T-Daemon (May 24, 2021)

No additional script needed. To build a image of a RPI3/RPI4 inside a jail, assuming the jail is running and has a internet connection:


```
# jls                  # jls(8)
JID     IP Address ..
'n'        ....
# jexec 'n' csh        # replace 'n' with JID (jail id), jexec(8)

# pkg install u-boot-rpi rpi-firmware   # follow advice to install pkg(8)
# cd /usr/src/release
# sh release.sh -c arm64/RPI3.conf
```


----------



## Wahaj4311 (May 24, 2021)

Well I got this error.
I typed 
cd release && sh release.sh -c arm64/RPI.conf
That error I got. I waited for 8 hours in front of my laptop.
Dunno what error is that.
And let I try again and compilation succeeded where will be image.


----------



## T-Daemon (May 24, 2021)

Apparently some variable is calling in sysutils/u-boot-rpi-arm64 to get u-boot.bin by building the port, but the build fails for some reason. Try the package:

`pkg install u-boot-rpi-arm64`

Afterwards resume build.



Wahaj4311 said:


> And let I try again and compilation succeeded where will be image.


According to release(7) in '$CHROOTDIR/R' . From release.sh: CHROOTDIR="/scratch" , that would make it /scratch/R.


----------



## Wahaj4311 (May 25, 2021)

I dunno why but  see this.
Errors.
You have new mail?


----------



## T-Daemon (May 25, 2021)

I can't reproduce the error. It builds fine on my system, in a 12.2-RELEASE jail. 

Have you tried `pkg install u-boot-rpi-arm64`?



Wahaj4311 said:


> You have new mail?


Execute 'mail'. To leave mail(1) 'q + Enter'.


----------



## Wahaj4311 (May 25, 2021)

I've also freebsd 12.2
And I'm not in jails 
And I've also installed u-boot-rpi-arm64


----------



## Wahaj4311 (May 25, 2021)

Here the look at mail:
And my source tree is freebsd 13 stable


----------



## SirDice (May 26, 2021)

Please stop posting pictures of _text_. Please just copy/paste the _text_. Pictures are impossible to quote from. Not to mention the fact that a picture is typically several hundreds of kilobytes where as the text it represents is only a few bytes.


----------



## Wahaj4311 (May 27, 2021)

I'm sorry 
I installed Ghostbsd 
I compile the image on it
I got 2 errors
*U-boot-rpi-arm64 depends on executable mkimage not found*
Other error was maybe u-boot-tools 
I install this package (*u-boot-tools)
u-boot-tools/work/u-boot-2020.7/doc/SPI/readme.sh_qspi.test:Bad file descriptor*
But how to get mkimage ?


----------



## Wahaj4311 (May 27, 2021)

I figured it out 
The package u-boot-tools contains mkimage


----------



## Wahaj4311 (May 27, 2021)

What is location of compiled image ?? I couldn't find it using find command.


----------



## Wahaj4311 (May 27, 2021)

Hi, I compiled the image using sh release ---- I've seen that it was compressing image . But I couldn't find image.xz 
Can you please tell me the location. I also try using find command but failed.


----------



## zirias@ (May 27, 2021)

Uhm, just to get straight what you are talking about at all: Is this about release(7), for building installer media of the FreeBSD base system?   Or something completely different?


----------



## SirDice (May 27, 2021)

Wahaj4311 don't open new threads with the same question. Posts merged with existing thread.


----------



## Wahaj4311 (May 27, 2021)

Zirias said:


> Uhm, just to get straight what you are talking about at all: Is this about release(7), for building installer media of the FreeBSD base system?   Or something completely different


Yup it is release 7. I used sh release.sh -c arm64/rpi.conf


----------



## Wahaj4311 (May 27, 2021)

SirDice said:


> Wahaj4311 don't open new threads with the same question. Posts merged with existing thread.


I'm sorry I don't have idea about that.


----------

