Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Dec 2023 18:57:55 +0200
From:      Stanislav Silnicki <stanislav.silnicki@mailgate.us>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: How to boot FreeBSD for arm 32 bit as DomU with u-boot on my ARM Chromebook
Message-ID:  <54b70672-9ea4-40e2-b346-b579536c0e5c@mailgate.us>
In-Reply-To: <CA%2B1FSiib3uu9Ky8N5rSSt%2BH1nfzUnChKhGs2ERWmsbp2T4=2uA@mail.gmail.com>
References:  <CA%2B1FSiit5NJ_W7f5mssivkGGLevXh_XmSB7ZxZbQe1dgev0_Pg@mail.gmail.com> <97aa980b9b44.6eb7f9d5c54e7@mailgate.us> <CA%2B1FSiheSwrO7Tz3F3Nmu4vcC2E=ONRX8nF3bhQGV0UDOFTrww@mail.gmail.com> <da024d1687f3a.2f0c601bba502@mailgate.us> <CA%2B1FSih7C0HEun99LHEwvyYRiH0PaLwwgnoQLHB69TWz2ykDZg@mail.gmail.com> <CA%2B1FSijoPkRZRaU6tujaMJZeFd3CSyUN%2Bh4y0_NrrB5VWLgwpA@mail.gmail.com> <CA%2B1FSiib3uu9Ky8N5rSSt%2BH1nfzUnChKhGs2ERWmsbp2T4=2uA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
------VCBWAXETIA7O4UQHSJNV7WPWZ88ZGZ
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
 charset=UTF-8

Mario, you can not edit =2Econfig byhand=2E You have to consider these opti=
ons in some _defconfig and then reconfigure/tecompile

=E2=81=A3Get BlueMai=
l for Android =E2=80=8B

On Dec 19, 2023, 5:29 PM, at 5:29 PM, Mario Mariet=
to <marietto2008@gmail=2Ecom> wrote:
>Hello to everyone=2E
>
>I have compil=
ed the needed u-boot=2Ebin from scratch using this procedure
>:
>
># git cl=
one https://github=2Ecom/u-boot/u-boot=2Egit
># cd u-boot
># ARCH=3Darm CRO=
SS_COMPILE=3Darm-linux-gnueabihf- make snow_defconfig :
>this
>line generat=
es the file =2Econfig
># nano =2Econfig and I've added these parameters :
>=

>CONFIG_ARMV7_NONSEC=3Dn
>CONFIG_EFI_GRUB_ARM32_WORKAROUND=3Dy
>
>the uboo=
t-bin file is generated with this command :
>
># ARCH=3Darm CROSS_COMPILE=
=3Darm-linux-gnueabihf- make
>
>At this point,I took a look inside the =2Ec=
onfig file and I saw that the
>parameter "CONFIG_ARMV7_NONSEC=3Dn" has been=
 removed=2E So,for some
>reason,it
>is not accepted and this could be a pro=
blem=2E=2E=2E=2E
>
>These are the xen config files that I've used :
>
>nano=
 freebsd=2Ecfg
>
>name=3D"test"
>kernel=3D"u-boot=2Ebin"
>extra =3D "consol=
e=3Dhvc0"
>memory=3D256
>vcpus=3D1
>disk =3D [ 'FreeBSD-13=2E2-RELEASE-armv=
7=2Eimg,raw,xvda' ]
>
>nano start-freebsd
>
>xl create freebsd=2Ecfg
>xl co=
nsole freebsd
>
>This is what happens when I launch the vm :
>
># =2E/start=
-freebsd
>
>Parsing config from freebsd=2Ecfg
>xc: error: panic: xg_dom_cor=
e=2Ec:689: xc_dom_find_loader: no loader
>found:
>Invalid kernel
>libxl: er=
ror: libxl_dom=2Ec:571:libxl__build_dom: xc_dom_parse_image
>failed
>libxl:=
 error: libxl_create=2Ec:1640:domcreate_rebuild_done: Domain
>1:cannot
>(re=
-)build domain: -3
>libxl: error: libxl_domain=2Ec:1183:libxl__destroy_domi=
d: Domain
>1:Non-existent domain
>libxl: error: libxl_domain=2Ec:1137:domai=
n_destroy_callback: Domain
>1:Unable
>to destroy guest
>libxl: error: libxl=
_domain=2Ec:1064:domain_destroy_cb: Domain
>1:Destruction
>of domain failed=

>freebsd is an invalid domain identifier (rc=3D-6)
>
>
>On Mon, Dec 18, 20=
23 at 12:39=E2=80=AFPM Mario Marietto <marietto2008@gmailcom>
>wrote:
>
>> =
So,ok,I should have said "the second u-boot" ; since the first u-boot
>> bi=
nary is the "u-boot binary located in the RO memory" of the
>Chromebook"=2E=

>> Sorry for the confusion=2E
>>
>> On Mon, Dec 18, 2023 at 12:35=E2=80=AF=
PM Mario Marietto
><marietto2008@gmail=2Ecom>
>> wrote:
>>
>>> ---> There a=
re no specific options in u-boot devoted to FreeBSD
>>>
>>> This is an impo=
rtant factor=2E So,what about if,instead of compiling a
>new
>>> version of=
 u-boot on the partition 2,I will recompile the u-boot
>customized
>>> vers=
ion created by the virtual open system in 2014,that should be
>installed
>>=
> on the first partition ? It could work if there are no differences
>betwe=
en
>>> the u-boot that should boot Linux and the u-boot that should boot
>F=
reeBSD=2E
>>>
>>> Can you give a look at the u-boot source code created by =
virtual
>open
>>> systems ? You can find it on my google drive :
>>>
>>>
>>=
>
>https://drive=2Egoogle=2Ecom/file/d/1eAaZMfd6CU0xiqQfH7sq5wGVzzO09BRm/vi=
ew?usp=3Dsharing
>>>
>>> I need to understand if I can recompile it without=
 problem so that
>it can
>>> satisfy my needs (the ability of the file u-bo=
ot=2Ebin to boot FreeBSD
>as
>>> domU under Xen,as explained by Stefano Sta=
bellini,the xen developer
>that
>>> suggested to me what I could do to have=
 FreeBSD virtualized under
>Xen on my
>>> Arm Chromebook) ; otherwise the r=
isk is to find later problems that
>will
>>> make me troubles and that I wi=
ll not able to fix=2E
>>>
>>> I gave a look at the virtual open system u-bo=
ot and I didn't see any
>arndale_defconfig
>>> inside=2E So,If I have under=
stood correctly,I should put that file
>inside the
>>> root of the u-boot s=
ource code,let's say here :
>>>
>>> marietto:/home/marietto/Desktop/Files/u=
-boot_FreeBSD/u-boot-vos # ls
>>>
>>> =2Echeckpatch=2Econf        README   =
               doc
>>>                     net
>>> =2Egit                  =
  api                     drivers
>>>                 onenand_ipl
>>> =2Egi=
tignore              arch                    dts
>>>                     po=
st
>>> COPYING                 board                   examples
>>> rules=
=2Emk
>>> CREDITS                 boards=2Ecfg              fs
>>>         =
             scripts
>>> MAINTAINERS             common                  in=
clude
>>>                 snapshot=2Ecommit
>>> MAKEALL                 con=
fig=2Emk               lib
>>>                     spl
>>> Makefile        =
        cros                    mkconfig
>>>                test
>>> PRESUB=
MIT=2Ecfg           disk                    nand_spl
>>>                too=
ls
>>>
>>> and I should do : make and make install ? and the file I
>need,u=
-boot=2Ebin
>>> will be generated ?
>>>
>>> I didn't find any pre made conf=
iguration file inside :
>>>
>>> u-boot-vos # find =2E -type f -name "exynos=
*"
>>>
>>> =2E/include/exynos-fb=2Eh
>>> =2E/include/configs/exynos5-common=
=2Eh
>>> =2E/doc/device-tree-bindings/spi/exynos-spi=2Etxt
>>> =2E/doc/devi=
ce-tree-bindings/usb/exynos-usb=2Etxt
>>> =2E/drivers/power/exynos-tmu=2Ec
=
>>> =2E/drivers/power/exynos-cpufreq=2Ec
>>> =2E/drivers/video/exynos-fb=2E=
c
>>> =2E/drivers/spi/exynos_spi=2Ec
>>> =2E/board/samsung/dts/exynos5250-s=
pring=2Edts
>>> =2E/board/samsung/dts/exynos5250-smdk5250=2Edts
>>> =2E/boa=
rd/samsung/dts/exynos5250-snow=2Edts
>>> =2E/board/samsung/dts/exynos5250-d=
aisy=2Edts
>>> =2E/arch/arm/include/asm/arch-exynos5/exynos-cpufreq=2Eh
>>>=
 =2E/arch/arm/include/asm/arch-exynos5/exynos-tmu=2Eh
>>> =2E/arch/arm/dts/=
exynos5250=2Edtsi
>>> =2E/arch/arm/dts/exynos-periph-id=2Edtsi
>>> =2E/arch=
/arm/cpu/armv7/exynos5/exynos_cache=2Ec
>>>
>>> u-boot-vos # find =2E -type=
 f -name "arndale*"
>>>
>>> For sure I can't use a newer version of u-boot =
because otherwise the
>>> patches needed to bypass the bootloader protectio=
ns of the Arm
>Chromebook
>>> (such as a lot of different patches needed to=
 boot correctly Linux)
>will be
>>> broken ; anyway,since it works,I don't =
need to use an updated
>version of
>>> u-boot=2E
>>>
>>> ----> As per my ex=
perience, you have to respect these two options,
>>> compiling u-boot for F=
reeBSD:
>>>
>https://github=2Ecom/freebsd/freebsd-ports/blob/main/sysutils/=
u-boot-master/files/FreeBSD_Fragment
>>>
>>> It says that I should use thes=
e parameters :
>>>
>>> CONFIG_ARMV7_NONSEC=3Dn
>>> CONFIG_EFI_GRUB_ARM32_WO=
RKAROUND=3Dy
>>>
>>> These are the parameters used to configure a Linux ker=
nel=2E I don't
>>> understand what's the relation between the compilation o=
f a linux
>kernel
>>> and u-boot=2E In the past I tried to recompile u-boot=
,but I didn't
>have the
>>> need to set up those parameters,so I don't know=
 how to do it (but I
>know
>>> how to recompile a Linux kernel)=2E
>>>
>>>
=
>>> ---> I'm not sure that I'm getting you right, as I don't understand
>wh=
at
>>> you mean under "the first u-boot"=2E
>>>
>>>
>>> I'm talking about f=
irst u-boot because the whole procedure to boot
>Linux
>>> on the ARM Chrom=
ebook,that's explained here :
>>>
>>>
>http://www=2Evirtualopensystems=2Eco=
m/en/solutions/guides/kvm-on-chromebook/
>>>
>>>
>>> at some point they say=
 :
>>>
>>>
>>> To be able to run KVM on ARM platforms, the kernel has to be=
 booted
>in
>>> hypervisor mode=2E Because of this relatively recent requir=
ement (due
>to the
>>> introduction of the virtualization extensions), up u=
ntil now all
>booting
>>> methods would boot the kernel in the standard Sup=
ervisor mode=2E
>>>
>>> For the ARM Chromebook the default boot procedure d=
oesn't allow us
>to
>>> boot in hypervisor mode=2E Although the laptop's bo=
ot mechanism is
>based on
>>> the frequently used u-boot, the binary is loc=
ated in RO memory=2E
>>> Fortunately, a chained u-boot mechanism can be use=
d (i=2Ee=2E starting
>another
>>> u-boot after the original)=2E We can then=
 enter hypervisor mode from
>our
>>> custom iteration of u-boot and subsequ=
ently load our kernel and
>userspace=2E
>>>
>>> So,the first u-boot is the =
u-boot provided by virtual open
>systems,that's
>>> able to chainload the "=
u-boot binary located in RO memory" , that
>does not
>>> boot Chrome OS in =
hypervisor mode=2E We don't need it if we want to
>boot
>>> Linux with kvm =
or xen enabled=2E
>>>
>>> On Sun, Dec 17, 2023 at 1:28=E2=80=AFAM Stanislav=
 Silnicki <
>>> stanislav=2Esilnicki@mailgate=2Eus> wrote:
>>>
>>>> I'm not=
 an expert in the topic, I only know, that ARM has divided
>>>> hardware in=
to two worlds - Secure and Not-So, strictly limiting any
>>>> software, run=
ning in non-secure world with access to functions and
>>>> resources=2E
>>>=
>
>https://developer=2Earm=2Ecom/documentation/den0013/d/Security/TrustZone=
-hardware-architecture?lang=3Den
>>>>
>>>> I'm not sure, that I'm getting y=
ou right, as I don't understand
>what you
>>>> mean under "the first u-boot=
"=2E
>>>>
>>>> As I understand, virtualization (HYP) is running in non-secu=
re
>world (
>>>>
>https://developer=2Earm=2Ecom/documentation/ddi0406/c/Sys=
tem-Level-Architecture/The-System-Level-Programmers--Model/The-Virtualizati=
on-Extensions),
>>>> so my guess (only guess!!!), virtualization software h=
as to prepare
>>>> (configure) HW platform in the way, that FreeBSD kernel =
will not
>lack any
>>>> resources, required to configure MPU, VA, etc=2E
>>=
>> So, if you lucky to boot virtualizer, which is aware of target OS,
>that=

>>>> maybe you can boot the kernel=2E Although, I doubt, that you need to
=
>boot
>>>> 'second' u-boot to boot the kernel - there is simply ubldr, whic=
h
>you can
>>>> hook somehow from virtualizer=2E=2E=2E=2E
>>>>
>>>> Stan
>>=
>>
>>>>
>>>>
>>>> Mario Marietto wrote:
>>>>
>>>>
>>>> ---> As I understand=
, it makes sure that u-boot keeps in secure
>mode
>>>> during boot and pass=
es control to ubldr, which boots FreeBSD
>kernel, in
>>>> that mode=2E
>>>>=

>>>> Can you elaborate your sentence more ? I know that the bootloader
>se=
cure
>>>> mode is bypassed by the virtual open systems u-boot=2E Are you sa=
ying
>that
>>>> when the control passes to the second u-boot,it will happen=
 in
>secure
>>>> mode,so that the bypass that happened loading the first u-=
boot,is
>annulled
>>>> ? If this is true,maybe can I boot FreeBSD using the=

>virtual-open-system
>>>> custom u-boot ? Is this compatible with FreeBSD =
? Where can I find
>the
>>>> u-boot=2Ebin that the xen developer talked abo=
ut ? thanks bro'=2E
>>>>
>>>>
>>>>
>>>> On Sun, Dec 17, 2023 at 12:35=E2=80=
=AFAM Stanislav Silnicki <
>>>> stanislav=2Esilnicki@mailgate=2Eus> wrote:
=
>>>>
>>>>> Hi Mario,
>>>>>
>>>>> U-Boot  beast is hiding in this den:
>>>>>=
 https://source=2Edenx=2Ede/u-boot/u-boot=2Egit
>>>>> I took a brief look a=
t your post and it seems to me, that option
>>>>> CONFIG_CMO_BY_VA_ONLY is =
irrelevant to your target armv7 32 bit
>>>>> platform:
>>>>>
>https://sourc=
e=2Edenx=2Ede/u-boot/u-boot/-/blob/master/arch/arm/cpu/armv8/Kconfig?ref_ty=
pe=3Dheads#L3
>>>>>
>>>>> As for compiling the u-boot, it is a doable task,=
 given that you
>>>>> understand what you are doing=2E There are no specifi=
c options in
>u-boot
>>>>> devoted to FreeBSD=2E It is a boot loader, whose=
 mission to make
>basic
>>>>> hardware initialization, read you kernel file=
 from some media into
>RAM and
>>>>> then pass it control=2E
>>>>>
>>>>> Ba=
sically, you can grab some defconfig, prepared for any other
>>>>> Exynos52=
50 based board  (say, this one:
>>>>>
>https://source=2Edenx=2Ede/u-boot/u-=
boot/-/blob/master/configs/arndale_defconfig?ref_type=3Dheads)
>>>>> and ad=
opt it somehow=2E
>>>>>
>>>>> As per my experience, you have to respect the=
se two options,
>compiling
>>>>> u-boot for FreeBSD:
>>>>>
>https://github=
=2Ecom/freebsd/freebsd-ports/blob/main/sysutils/u-boot-master/files/FreeBSD=
_Fragment
>>>>>
>>>>> As I understand, it makes sure, that u-boot keeps in =
secure mode
>during
>>>>> boot and passes control to ubldr, which boots Fre=
BSD kernel, in
>that mode=2E
>>>>> Otherwise, there a lot of surprises you =
may realize=2E
>>>>>
>>>>> Hope, this will help to progress you tasks
>>>>>=
 Stan
>>>>>
>>>>> Mario Marietto wrote:
>>>>>
>>>>>
>>>>> Hello=2E
>>>>>
>>=
>>> I'm trying to boot FreeBSD for arm32 bit as DomU on my ARM
>Chromebook=
=2E
>>>>> Basically there are two ways to accomplish this task :
>>>>>
>>>>=
> 1) to write a patch that allows the FreeBSD kernel to boot as a
>zImage
>=
>>>> file=2E This could be accomplished applying this patch to a specific
>=
file
>>>>> that's on the source code of FreeBSD :
>>>>>
>>>>>
>>>>>
>>>>>
>=
https://xenbits=2Exen=2Eorg/gitweb/?p=3Dp=2E=2E=2E8;hb=3D0782e25d98cc139147=
2717035f986c979edef0c9
>>>>>
><https://xenbits=2Exen=2Eorg/gitweb/?p=3Dpeop=
le/julieng/freebsd=2Egit;a=3Dblob_plain;f=3Dsys/arm/conf/XENVIRT;h=3Dff6433=
392e6fc2d5fa7c1ad1f7c40155003af9a8;hb=3D0782e25d98cc1391472717035f986c979ed=
ef0c9>
>>>>>
>>>>>
>>>>> This patch was written by Julien Grall a lot of ti=
me ago and now
>it
>>>>> does not work anymore=2E This is the reason :
>>>>=
>
>>>>>
>>>>> It appears FreeBSD-CURRENT removed the last step converting t=
he
>kernel
>>>>> file to kernel=2Ebin=2E The patch can be readily rebased, =
but without
>>>>> kernel=2Ebin that doesn't do too much=2E
>>>>>
>>>>>
>>>>=
>
>>>>> So,without a rebase of that patch the first option is not
>applicab=
le=2E
>>>>> And I'm not able to fix it=2E
>>>>>
>>>>> 2) booting FreeBSD us=
ing U-Boot,as explained to me by a xen
>developer :
>>>>>
>>>>>
>>>>> I was=
 trying to explain why and how Julien's patch works so that
>you
>>>>> coul=
d be the one to re-do something similar or fix the patch on
>the FreeBSD
>>=
>>> kernel that you are working with=2E I am happy to help review and
>writ=
e
>>>>> patches but I don't work with the FreeBSD kernel so I wouldn't be
>=
able to
>>>>> help you quickly=2E However, I might have a suggestion=2E Do =
you know
>if
>>>>> FreeBSD can be booted by U-Boot ? Because U-Boot definit=
ely boots
>as Xen on
>>>>> ARM guest firmware/bootloader=2E You should be a=
ble to build U-Boot
>and use
>>>>> the U-Boot binary as Xen guest kernel, t=
hen U-Boot could load
>FreeBSD from
>>>>> disk or network and start it=2E F=
or instance as domU config file:
>>>>>
>>>>> kernel=3D"/home/petalinux/u-bo=
ot=2Ebin"
>>>>> disk =3D [ '/home/petalinux/test=2Eimg,raw,xvda' ]
>>>>>
>>=
>>> I know it is important to build u-boot with the following config
>to
>>=
>>> make it work on Xen=2E
>>>>>
>>>>> CONFIG_CMO_BY_VA_ONLY=3Dy
>>>>>
>>>>=
>
>>>>>
>>>>> This option seems more doable to me according to my knowledge=
=2E But
>I
>>>>> need to understand how to do it=2E
>>>>>
>>>>> Well,let's =
say that on the ARM Chromebook I'm forced to use and
>install
>>>>> a custo=
mized version of u-boot,created by virtual open
>systems,because it
>>>>> i=
s the only one that allows bypassing its bootloader protection=2E
>You can
=
>>>>> find more information here :
>>>>>
>>>>>
>>>>>
>http://www=2Evirtualo=
pensystems=2Ecom/en/solutions/guides/kvm-on-chromebook/?vos=3Dtech
>>>>>
>>=
>>> This is the relevant section to read :
>>>>>
>>>>>
>>>>> Bootloader :
>=
>>>>
>>>>> If you wish to skip this chapter you can download a pre-compiled=

>binary
>>>>> of the bootloader:
>>>>>
>>>>>
>>>>> $ wget
>>>>>
>http://ww=
w=2Evirtualopensystems=2Ecom/downloads/guides/kvm_on_chromebook/nv_u-boot-s=
now=2Ekpart
>>>>>
>>>>>
>>>>> To be able to run KVM on ARM platforms, the k=
ernel has to be
>booted in
>>>>> hypervisor mode=2E Because of this relativ=
ely recent requirement
>(due to the
>>>>> introduction of the virtualizatio=
n extensions), up until now all
>booting
>>>>> methods would boot the kerne=
l in the standard Supervisor mode=2E For
>the ARM
>>>>> Chromebook the defa=
ult boot procedure doesn't allow us to boot in
>>>>> hypervisor mode=2E Alt=
hough the laptop's boot mechanism is based on
>the
>>>>> frequently used u-=
boot, the binary is located in RO memory=2E
>Fortunately, a
>>>>> chained u=
-boot mechanism can be used (i=2Ee=2E starting another u-boot
>after
>>>>> =
the original)=2E We can then enter hypervisor mode from our custom
>iterati=
on
>>>>> of u-boot and subsequently load our kernel and userspace=2E
>>>>>
=
>>>>> Checkout the needed u-boot code :
>>>>>
>>>>>
>>>>> $ git clone git:/=
/github=2Ecom/virtualopensystems/u-boot=2Egit$ cd
>u-boot$
>>>>> =2E/script=
s/build=2Esh
>>>>>
>>>>>
>>>>> If successful, a message about how to copy t=
he bootloader on the
>USB
>>>>> flash disk or SD card will appear=2E We wil=
l use it later when
>preparing the
>>>>> boot medium to start our system=2E=
 If you have followed the Setting
>up the
>>>>> boot medium chapter and you=
 have a prepared boot device, then you
>can
>>>>> update u-boot by running =
:
>>>>>
>>>>>
>>>>> $ sudo dd if=3Dnv_uboot-snow=2Ekpart of=3D/dev/sdX1
>>>=
>>
>>>>>
>>>>>
>>>>> so,the needed u-boot that we must use should be instal=
led on the
>first
>>>>> partition of the sd card=2E
>>>>>
>>>>> There is an=
other relevant section to read :
>>>>>
>>>>>
>>>>> Setting up the boot medi=
um
>>>>>
>>>>> Now it is time to copy all the relevant files that we create=
d in
>the
>>>>> previous chapters,and use them to boot Chromebook with a di=
fferent
>kernel
>>>>> and OS=2E In all these examples the device /dev/sdX i=
s used=2E Take
>extra care
>>>>> to change the examples to the device that =
you have attached=2E
>Insert the
>>>>> boot medium on your workstation and =
carefully execute the
>following step=2E
>>>>> First we need to properly fo=
rmat the boot medium=2E
>>>>>
>>>>> In the uboot source directory :
>>>>>
>=
>>>>
>>>>> $ sudo =2E/scripts/sdcard=2Esh /dev/sdX
>>>>>
>>>>>
>>>>> This w=
ill erase all data and create 4 partitions in the medium,
>along
>>>>> with=
 copying the u-boot binary to the first partition:
>>>>>
>>>>>
>>>>> Partit=
ion 1 =3D ChromeOS signed binary (V=2EO=2ES chained u-boot)
>>>>> Partition=
 2 =3D not used
>>>>> Partition 3 =3D EXT2 partition for u-boot files (uIma=
ge and
>>>>> exynos5250-snow=2Edtb)
>>>>> Partition 4 =3D EXT4 partition fo=
r userspace files
>>>>>
>>>>>
>>>>> With u-boot being copied, next is the k=
ernel image and DTB file=2E
>From
>>>>> the kernel source execute :
>>>>>
>=
>>>>
>>>>> $ mkdir =2E=2E/mnt/
>>>>> $ sudo mount /dev/sdX3 =2E=2E/mnt/
>>>=
>> $ sudo cp arch/arm/boot/uImage =2E=2E/mnt/
>>>>> $ sudo cp arch/arm/boot=
/dts/exynos5250-snow=2Edtb =2E=2E/mnt/
>>>>> $ sudo umount /dev/sdX3
>>>>>
=
>>>>>
>>>>> Finally, we have to copy the Ubuntu userspace filesystem that w=
e
>>>>> created earlier:
>>>>>
>>>>>
>>>>> $ sudo mount /dev/sdX4 mnt/$ sud=
o cp -a =2E/precise/* mnt/$ sudo
>umount
>>>>> /dev/sdX4
>>>>>
>>>>>
>>>>>
=
>>>>> Now,my idea is to chainload the already chain loaded u-boot
>created =
by
>>>>> V=2EO=2ES to the new u-boot that we need for booting FreeBSD and t=
hat
>can be
>>>>> installed in the partition n=2E2,as shown in this scheme,=
because it
>is not
>>>>> used :
>>>>>
>>>>>
>>>>> Partition 1 =3D ChromeOS =
signed binary (V=2EO=2ES chained u-boot)
>>>>> Partition 2 =3D not used (ma=
ybe we can install the u-boot for arm 32
>>>>> bit,compatible with FreeBSD =
on this partition)
>>>>> Partition 3 =3D EXT2 partition for u-boot files (u=
Image and
>>>>> exynos5250-snow=2Edtb)
>>>>> Partition 4 =3D EXT4 partition=
 for userspace files
>>>>>
>>>>>
>>>>> Take in consideration that default b=
oot string is hardcoded
>here,in the
>>>>> snow=2Eh file of the custom u-bo=
ot created by VOS :
>>>>>
>>>>>
>>>>>
>>>>>
>https://github=2Ecom/virtualop=
ensyste=2E=2E=2E18a39b6c177dff58a/include/configs/snow=2Eh#L101
>>>>>
><htt=
ps://github=2Ecom/virtualopensystems/u-boot/blob/eecfeb578e296ef3b739ac918a=
39b6c177dff58a/include/configs/snow=2Eh#L101>
>>>>>
>>>>>
>>>>> and it need=
s to be recompiled because it should point to the
>partition
>>>>> n=2E2,wh=
ere I will install the u-boot files as explained here :
>>>>>
>>>>>
>>>>> h=
ttps://wiki=2Efreebsd=2Eorg/arm/Chromebook
>>>>>
>>>>>
>>>>> I have some qu=
estions to ask before I start working on this=2E
>>>>>
>>>>> 1) The xen dev=
eloper said :
>>>>>
>>>>>
>>>>> You should be able to build U-Boot and use =
the U-Boot binary as
>Xen
>>>>> guest kernel=2E=2E=2E
>>>>>
>>>>>
>>>>>
>>>=
>> where is the u-boot binary,according to this document ?
>>>>>
>>>>> http=
s://wiki=2Efreebsd=2Eorg/arm/Chromebook
>>>>>
>>>>> I don't see it=2E
>>>>>=

>>>>>
>>>>> 2) where is the source code of the file that I can get here :
=
>>>>>
>>>>>
>>>>>
>http://commondatastorage=2Egoogleapis=2Ecom/chromeos-loc=
almirror/distfiles/nv_uboot-snow-simplefb=2Ekpart=2Ebz2
>>>>>
>>>>> I need =
the source code if I want to recompile u-boot so that it
>can
>>>>> point t=
o the partition 4=2E
>>>>>
>>>>> Maybe it can be found on this link :
>>>>>=

>>>>> http://linux-exynos=2Eorg/dist/chromebook/nv_uboot/
>>>>>
>>>>> but =
it can't be opened=2E=2E=2E=2E
>>>>>
>>>>>
>>>>> 3) in this specific scenar=
io the source code of u-boot should run
>on
>>>>> arm 32 bit,not on arm 64,=
because I have the Samsung Chromebook
>"SNOW" model
>>>>> XE303C12,that's p=
owered by a Samsung Exynos 5250 (ARMv7 32 bit
>Cortex A15)
>>>>> Soc=2E
>>>=
>>
>>>>>
>>>>> 4) I'm not sure if I can chainload the customized u-boot cre=
ated
>by
>>>>> V=2EO=2ES that should be installed on the first partition wi=
th the
>u-boot
>>>>> tailored for booting FreeBSD that should be installed =
on the
>partition 2=2E=2E=2E=2E
>>>>>
>>>>>
>>>>> 5) the xen developer said=
 that u-boot should be compiled enabling
>this
>>>>> option :
>>>>>
>>>>>
>=
>>>> Code:
>>>>>
>>>>> CONFIG_CMO_BY_VA_ONLY=3Dy
>>>>>
>>>>>
>>>>>
>>>>> We=
ll,can you provide some good source that can help me to
>understand
>>>>> h=
ow I can recompile u-boot for FreeBSD ? thanks=2E
>>>>>
>>>>> --
>>>>> Mari=
o=2E
>>>>>
>>>>>
>>>>
>>>> --
>>>> Mario=2E
>>>>
>>>>
>>>
>>> --
>>> Mario=
=2E
>>>
>>
>>
>> --
>> Mario=2E
>>
>
>
>-- 
>Mario=2E

------VCBWAXETIA7O4UQHSJNV7WPWZ88ZGZ
Content-Type: text/html;
 charset=utf-8
Content-Transfer-Encoding: quoted-printable

<html><head></head><body style=3D"zoom: 0%;"><div dir=3D"auto">Mario, you c=
an not edit =2Econfig byhand=2E You have to consider these options in some =
_defconfig and then reconfigure/tecompile<br><br></div>
<div dir=3D"auto"><=
!-- tmjah_g_1299s -->Get <!-- tmjah_g_1299e --><a href=3D"https://bluemail=
=2Eme"><!-- tmjah_g_1299s -->BlueMail for Android<!-- tmjah_g_1299e --></a>=
<!-- tmjah_g_1299s --> <!-- tmjah_g_1299e --></div>
<div class=3D"gmail_quo=
te" >On Dec 19, 2023, at 5:29 PM, Mario Marietto &lt;<a href=3D"mailto:mari=
etto2008@gmail=2Ecom" target=3D"_blank">marietto2008@gmail=2Ecom</a>&gt; wr=
ote:<blockquote class=3D"gmail_quote" style=3D"margin: 0pt 0pt 0pt 0=2E8ex;=
 border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div dir=
=3D"ltr">
 <div dir=3D"ltr">
  <div>
   Hello to everyone=2E
  </div>
  <di=
v>
   <br>
  </div>
  <div>
   I have compiled the needed u-boot=2Ebin from=
 scratch using this procedure :
  </div>
  <div>
   <br>
  </div>
  <div>
 =
  <span style=3D"font-family:monospace"><span style=3D"color:rgb(0,0,0);bac=
kground-color:rgb(255,255,255)"># git clone <a href=3D"https://github=2Ecom=
/u-boot/u-boot=2Egit" target=3D"_blank">https://github=2Ecom/u-boot/u-boot=
=2Egit</a></span></span>
  </div>
  <div>
   <span style=3D"font-family:mon=
ospace"><span style=3D"color:rgb(0,0,0);background-color:rgb(255,255,255)">=
# cd u-boot<br></span></span>
  </div>
  <div>
   <span style=3D"font-famil=
y:monospace"><span style=3D"color:rgb(0,0,0);background-color:rgb(255,255,2=
55)"># ARCH=3Darm CROSS_COMPILE=3Darm-linux-gnueabihf- make </span>snow_def=
config : this line generates the file =2Econfig<br></span>
  </div>
  <div>=

   <span style=3D"font-family:monospace"><span style=3D"color:rgb(0,0,0);b=
ackground-color:rgb(255,255,255)"># nano =2Econfig and I've added these par=
ameters :<br></span></span>
  </div>
  <div>
   <br>
  </div>
  <div>
   CO=
NFIG_ARMV7_NONSEC=3Dn
   <br>
   CONFIG_EFI_GRUB_ARM32_WORKAROUND=3Dy
  </d=
iv>
  <div>
   <div>
    <span style=3D"font-family:monospace"><span style=
=3D"color:rgb(0,0,0);background-color:rgb(255,255,255)"> </span></span>
   =
</div>
  </div>
  <br>
  <div>
   <span style=3D"font-family:monospace"><sp=
an style=3D"color:rgb(0,0,0);background-color:rgb(255,255,255)">the uboot-b=
in file is generated with this command :</span></span>
  </div>
  <div>
   =
<span style=3D"font-family:monospace"><span style=3D"color:rgb(0,0,0);backg=
round-color:rgb(255,255,255)"><br></span></span>
  </div>
  <div>
   <span =
style=3D"font-family:monospace"><span style=3D"color:rgb(0,0,0);background-=
color:rgb(255,255,255)"># ARCH=3Darm CROSS_COMPILE=3Darm-linux-gnueabihf- m=
ake</span><br></span>
  </div>
  <div>
   <br>
  </div>
  <div>
   At this =
point,I took a look inside the =2Econfig file and I saw that the parameter =
"CONFIG_ARMV7_NONSEC=3Dn" has been removed=2E So,for some reason,it is not =
accepted and this could be a problem=2E=2E=2E=2E
   <br>
  </div>
  <div>
 =
  <br>
  </div>
  <div>
   These are the xen config files that I've used :
=
   <br>
  </div>
  <div>
   <br>
  </div>
  <div>
   nano freebsd=2Ecfg
   =
<br>
  </div>
  <div>
   <br>
  </div>
  <div>
   <span style=3D"font-famil=
y:monospace"><span style=3D"color:rgb(0,0,0);background-color:rgb(255,255,2=
55)">name=3D"test" </span><br>
    kernel=3D"u-boot=2Ebin" <br><span class=
=3D"gmail-im">extra =3D "console=3Dhvc0" <br>
     memory=3D256 <br>
     v=
cpus=3D1 <br></span>disk =3D [ 'FreeBSD-13=2E2-RELEASE-armv7=2Eimg,raw,xvda=
' ]<br></span>
  </div>
  <div>
   <span style=3D"font-family:monospace"><b=
r></span>
  </div>
  <div>
   <span style=3D"font-family:monospace">nano st=
art-freebsd <br></span>
  </div><span class=3D"gmail-im">
   <div>
    <spa=
n style=3D"font-family:monospace"><br></span>
   </div>
   <div>
    <span =
style=3D"font-family:monospace"><span style=3D"color:rgb(0,0,0);background-=
color:rgb(255,255,255)">xl create freebsd=2Ecfg </span><br>
     xl console=
 freebsd<br></span>
   </div>
   <div>
    <span style=3D"font-family:monos=
pace"><br></span>
   </div></span>
  <div>
   <span style=3D"font-family:mo=
nospace">This is what happens when I launch the vm :</span>
  </div>
  <div=
>
   <span style=3D"font-family:monospace"><br></span>
  </div>
  <div>
   =
<span style=3D"font-family:monospace"><span style=3D"color:rgb(0,0,0);backg=
round-color:rgb(255,255,255)"># =2E/start-freebsd</span></span>
  </div>
  =
<div>
   <span style=3D"font-family:monospace"><span class=3D"gmail-im"><sp=
an style=3D"color:rgb(0,0,0);background-color:rgb(255,255,255)">&nbsp;</spa=
n><br>
     Parsing config from freebsd=2Ecfg <br>
     xc: error: panic: x=
g_dom_core=2Ec:689: xc_dom_find_loader: no loader found: Invalid kernel <br=
>
     libxl: error: libxl_dom=2Ec:571:libxl__build_dom: xc_dom_parse_image=
 failed <br></span>libxl: error: libxl_create=2Ec:1640:domcreate_rebuild_do=
ne: Domain 1:cannot (re-)build domain: -3 <br>
    libxl: error: libxl_doma=
in=2Ec:1183:libxl__destroy_domid: Domain 1:Non-existent domain <br>
    lib=
xl: error: libxl_domain=2Ec:1137:domain_destroy_callback: Domain 1:Unable t=
o destroy guest <br>
    libxl: error: libxl_domain=2Ec:1064:domain_destroy=
_cb: Domain 1:Destruction of domain failed <br><span class=3D"gmail-im">fre=
ebsd is an invalid domain identifier (rc=3D-6)<br></span></span>
  </div>
 =
</div>
 <div>
  <div class=3D"gmail-adm">
   <div id=3D"gmail-q_364" class=
=3D"gmail-ajR gmail-h4">
    <div class=3D"gmail-ajT">
     <br>
    </div>=

   </div>
  </div>
 </div>
</div>
<br>
<div class=3D"gmail_quote">
 <div d=
ir=3D"ltr" class=3D"gmail_attr">
  On Mon, Dec 18, 2023 at 12:39=E2=80=AFPM=
 Mario Marietto &lt;<a href=3D"mailto:marietto2008@gmail=2Ecom">marietto200=
8@gmail=2Ecom</a>&gt; wrote:
  <br>
 </div>
 <blockquote class=3D"gmail_quo=
te" style=3D"margin:0px 0px 0px 0=2E8ex;border-left:1px solid rgb(204,204,2=
04);padding-left:1ex">
  <div dir=3D"ltr">
   So,ok,I should have said "the=
 second u-boot" ; since the first u-boot binary is the "u-boot binary locat=
ed in the RO memory" of the Chromebook"=2E Sorry for the confusion=2E
   <b=
r>
  </div>
  <br>
  <div class=3D"gmail_quote">
   <div dir=3D"ltr" class=
=3D"gmail_attr">
    On Mon, Dec 18, 2023 at 12:35=E2=80=AFPM Mario Mariett=
o &lt;<a href=3D"mailto:marietto2008@gmail=2Ecom" target=3D"_blank">mariett=
o2008@gmail=2Ecom</a>&gt; wrote:
    <br>
   </div>
   <blockquote class=3D=
"gmail_quote" style=3D"margin:0px 0px 0px 0=2E8ex;border-left:1px solid rgb=
(204,204,204);padding-left:1ex">
    <div dir=3D"ltr">
     <div>
      ---=
&gt; There are no specific options in u-boot devoted to FreeBSD 
      <br>=

     </div>
     <div>
      <br>
     </div>
     <div>
      This is an =
important factor=2E So,what about if,instead of compiling a new version of =
u-boot on the partition 2,I will recompile the u-boot customized version cr=
eated by the virtual open system in 2014,that should be installed on the fi=
rst partition ? It could work if there are no differences between the u-boo=
t that should boot Linux and the u-boot that should boot FreeBSD=2E
     </=
div>
     <div>
      <br>
     </div>
     <div>
      Can you give a look=
 at the u-boot source code created by virtual open systems ? You can find i=
t on my google drive :
      <br>
     </div>
     <div>
      <br>
     </=
div>
     <div>
      <a href=3D"https://drive=2Egoogle=2Ecom/file/d/1eAaZM=
fd6CU0xiqQfH7sq5wGVzzO09BRm/view?usp=3Dsharing" target=3D"_blank">https://d=
rive=2Egoogle=2Ecom/file/d/1eAaZMfd6CU0xiqQfH7sq5wGVzzO09BRm/view?usp=3Dsha=
ring</a>
     </div>
     <div>
      <br>
     </div>
     <div>
      I n=
eed to understand if I can recompile it without problem so that it can sati=
sfy my needs (the ability of the file u-boot=2Ebin to boot FreeBSD as domU =
under Xen,as explained by Stefano Stabellini,the xen developer that suggest=
ed to me what I could do to have FreeBSD virtualized under Xen on my Arm Ch=
romebook) ; otherwise the risk is to find later problems that will make me =
troubles and that I will not able to fix=2E 
      <br>
     </div>
     <d=
iv>
      <br>
     </div>
     <div>
      I gave a look at the virtual op=
en system u-boot and I didn't see any <span>arndale_defconfig inside=2E So,=
If I have understood correctly,I should put that file inside the root of th=
e u-boot source code,let's say here :</span>
     </div>
     <div>
      <=
strong><br></strong>
     </div>
     <div>
      <font style=3D"font-famil=
y:arial,sans-serif" size=3D"2"><span style=3D"color:rgb(0,0,0);background-c=
olor:rgb(255,255,255)">marietto:/home/marietto/Desktop/Files/u-boot_FreeBSD=
/u-boot-vos # ls</span></font>
     </div>
     <div>
      <font style=3D"=
font-family:arial,sans-serif" size=3D"2"><span style=3D"color:rgb(0,0,0);ba=
ckground-color:rgb(255,255,255)">&nbsp;</span><br>
       =2Echeckpatch=2Ec=
onf &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;README &nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;doc &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;net <br>
       =2Egi=
t &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;api &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;drivers &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onenand_ipl <br>
       =2Egiti=
gnore &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;arch &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dts &nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;post <br>
       COPYING &nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bo=
ard &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;examples &nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=3D"htt=
p://rules=2Emk" target=3D"_blank">rules=2Emk</a> <br>
       CREDITS &nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;boards=2Ecfg &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fs &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;scripts <br>
       MAINTAINERS &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;common &nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;in=
clude &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;snapshot=2Ecommit <br>
       MAKEALL &nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;<a href=3D"http://config=2Emk" target=3D"_blank">config=2Emk</a>=
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;lib &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;spl <br>
       =
Makefile &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;cros &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mkconfi=
g &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;test <br>
       PRESUBMIT=2Ecfg &nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;disk &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;nand_spl &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;tools</font>
     </div>
     <div>
      <font=
 style=3D"font-family:arial,sans-serif" size=3D"2"><br></font>
     </div>
=
     <div>
      <font style=3D"font-family:arial,sans-serif" size=3D"2">an=
d I should do : make and make install ? and the file I need,u-boot=2Ebin wi=
ll be generated ?&nbsp;</font>
     </div>
     <div>
      <font style=3D"=
font-family:arial,sans-serif" size=3D"2"><br></font>
     </div>
     <div>=

      <font style=3D"font-family:arial,sans-serif" size=3D"2">I didn't fin=
d any pre made configuration file inside :<br></font>
     </div>
     <div=
>
      <span style=3D"color:rgb(0,0,0);background-color:rgb(255,255,255);f=
ont-family:arial,sans-serif"><br></span>
     </div>
     <div>
      <span=
 style=3D"color:rgb(0,0,0);background-color:rgb(255,255,255);font-family:ar=
ial,sans-serif">u-boot-vos # find =2E -type f -name "exynos*</span><span st=
yle=3D"font-family:arial,sans-serif">"&nbsp;</span>
     </div>
     <div>
=
      <span style=3D"font-family:arial,sans-serif"><br></span>
     </div>
=
     <div>
      <span style=3D"font-family:arial,sans-serif">=2E/include/e=
xynos-fb=2Eh <br>
       =2E/include/configs/exynos5-common=2Eh <br>
      =
 =2E/doc/device-tree-bindings/spi/exynos-spi=2Etxt <br>
       =2E/doc/devi=
ce-tree-bindings/usb/exynos-usb=2Etxt <br>
       =2E/drivers/power/exynos-=
tmu=2Ec <br>
       =2E/drivers/power/exynos-cpufreq=2Ec <br>
       =2E/dr=
ivers/video/exynos-fb=2Ec <br>
       =2E/drivers/spi/exynos_spi=2Ec <br>
 =
      =2E/board/samsung/dts/exynos5250-spring=2Edts <br>
       =2E/board/s=
amsung/dts/exynos5250-smdk5250=2Edts <br>
       =2E/board/samsung/dts/exyn=
os5250-snow=2Edts <br>
       =2E/board/samsung/dts/exynos5250-daisy=2Edts =
<br>
       =2E/arch/arm/include/asm/arch-exynos5/exynos-cpufreq=2Eh <br>
 =
      =2E/arch/arm/include/asm/arch-exynos5/exynos-tmu=2Eh <br>
       =2E/=
arch/arm/dts/exynos5250=2Edtsi <br>
       =2E/arch/arm/dts/exynos-periph-i=
d=2Edtsi <br>
       =2E/arch/arm/cpu/armv7/exynos5/exynos_cache=2Ec&nbsp;<=
/span>
     </div>
     <div>
      <span style=3D"font-family:arial,sans-s=
erif"><br></span>
     </div>
     <div>
      <span style=3D"font-family:a=
rial,sans-serif">u-boot-vos # find =2E -type f -name "arndale*"</span><span=
 style=3D"font-family:monospace"><br><br></span>
     </div>
     <div>
   =
   <font style=3D"font-family:arial,sans-serif" size=3D"2">For sure I can't=
 use a newer version of u-boot because otherwise the patches needed to bypa=
ss the bootloader protections of the Arm Chromebook (such as a lot of diffe=
rent patches needed to boot correctly Linux) will be broken ; anyway,since =
it works,I don't need to use an updated version of u-boot=2E</font>
     </=
div>
     <div>
      <font style=3D"font-family:arial,sans-serif" size=3D"=
2"><br></font>
     </div>
     <div>
      <div dir=3D"auto" id=3D"m_-6449=
202736562147260m_-2747878036369583702m_-2225904292843896452tmjah_g_1299">
 =
      ----&gt; As per my experience, you have to respect these two options,=
 compiling u-boot for FreeBSD:&nbsp;<a href=3D"https://github=2Ecom/freebsd=
/freebsd-ports/blob/main/sysutils/u-boot-master/files/FreeBSD_Fragment" tar=
get=3D"_blank">https://github=2Ecom/freebsd/freebsd-ports/blob/main/sysutil=
s/u-boot-master/files/FreeBSD_Fragment</a>
      </div><font style=3D"font-=
family:arial,sans-serif" size=3D"2"></font>
     </div>
     <div>
      <f=
ont size=3D"4"><span style=3D"font-family:monospace"><br></span></font>
   =
  </div>
     <div>
      <font size=3D"4"><span style=3D"font-family:monos=
pace"></span></font>
     </div>
     <div>
      It says that I should use=
 these parameters :
     </div>
     <div>
      <br>
     </div>
     <div=
>
      CONFIG_ARMV7_NONSEC=3Dn
      <br>
      CONFIG_EFI_GRUB_ARM32_WORK=
AROUND=3Dy<font size=3D"4"><br></font>
     </div>
     <div>
      <font s=
ize=3D"4"><br></font>
     </div>
     <div>
      <font size=3D"2">These a=
re the parameters used to configure a Linux kernel=2E I don't understand wh=
at's the relation between the compilation of a linux kernel and u-boot=2E I=
n the past I tried to recompile u-boot,but I didn't have the need to set up=
 those parameters,so I don't know how to do it (but I know how to recompile=
 a Linux kernel)=2E</font>
      <div dir=3D"auto" id=3D"m_-644920273656214=
7260m_-2747878036369583702m_-962663937491960362tmjah_g_1299">
       <br>
 =
     </div>
      <div dir=3D"auto">
       <br>
      </div>
      <div di=
r=3D"auto">
       ---&gt; I'm not sure that I'm getting you right, as I do=
n't understand what you mean under "the first u-boot"=2E
       <p></p>
   =
    <p><br></p>
       <p>I'm talking about first u-boot because the whole =
procedure to boot Linux on the ARM Chromebook,that's explained here :<br></=
p>
       <p><a href=3D"http://www=2Evirtualopensystems=2Ecom/en/solutions/=
guides/kvm-on-chromebook/" target=3D"_blank">http://www=2Evirtualopensystem=
s=2Ecom/en/solutions/guides/kvm-on-chromebook/</a></p>
       <p><br></p>
 =
      <p>at some point they say :</p>
       <p><br></p>
       <p>To be ab=
le to run KVM on ARM platforms, the kernel has to be booted in hypervisor m=
ode=2E Because of this relatively recent requirement (due to the introducti=
on of the virtualization extensions), up until now all booting methods woul=
d boot the kernel in the standard Supervisor mode=2E</p>
       <p>For the =
ARM Chromebook the default boot procedure doesn't allow us to boot in hyper=
visor mode=2E Although the laptop's boot mechanism is based on the frequent=
ly used u-boot, the binary is located in RO memory=2E Fortunately, a chaine=
d u-boot mechanism can be used (i=2Ee=2E starting another u-boot after the =
original)=2E We can then enter hypervisor mode from our custom iteration of=
 u-boot and subsequently load our kernel and userspace=2E</p>
       <p>So,=
the first u-boot is the u-boot provided by virtual open systems,that's able=
 to chainload the "u-boot binary located in RO memory" , that does not boot=
 Chrome OS in hypervisor mode=2E We don't need it if we want to boot Linux =
with kvm or xen enabled=2E</p>
      </div>
     </div>
    </div>
    <br>=

    <div class=3D"gmail_quote">
     <div dir=3D"ltr" class=3D"gmail_attr"=
>
      On Sun, Dec 17, 2023 at 1:28=E2=80=AFAM Stanislav Silnicki &lt;<a h=
ref=3D"mailto:stanislav=2Esilnicki@mailgate=2Eus" target=3D"_blank">stanisl=
av=2Esilnicki@mailgate=2Eus</a>&gt; wrote:
      <br>
     </div>
     <blo=
ckquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0=2E8ex;border-le=
ft:1px solid rgb(204,204,204);padding-left:1ex">
      <div>
       <div>
 =
       <div id=3D"m_-6449202736562147260m_-2747878036369583702m_-5077711917=
547611557m_-962663937491960362compose-body-wrapper" dir=3D"auto">
         =
<div dir=3D"auto">
          I'm not an expert in the topic, I only know, t=
hat ARM has divided hardware into two worlds - Secure and Not-So, strictly =
limiting any software, running in non-secure world with access to functions=
 and resources=2E&nbsp;<a href=3D"https://developer=2Earm=2Ecom/documentati=
on/den0013/d/Security/TrustZone-hardware-architecture?lang=3Den" target=3D"=
_blank">https://developer=2Earm=2Ecom/documentation/den0013/d/Security/Trus=
tZone-hardware-architecture?lang=3Den</a>
         </div>
         <div dir=
=3D"auto" id=3D"m_-6449202736562147260m_-2747878036369583702m_-507771191754=
7611557m_-962663937491960362tmjah_g_1299">
          <br>
         </div>
 =
        <div dir=3D"auto" id=3D"m_-6449202736562147260m_-274787803636958370=
2m_-5077711917547611557m_-962663937491960362tmjah_g_1299">
          I'm no=
t sure, that I'm getting you right, as I don't understand what you mean und=
er "the first u-boot"=2E
         </div>
         <div dir=3D"auto" id=3D"m=
_-6449202736562147260m_-2747878036369583702m_-5077711917547611557m_-9626639=
37491960362tmjah_g_1299">
          <br>
         </div>
         <div dir=
=3D"auto" id=3D"m_-6449202736562147260m_-2747878036369583702m_-507771191754=
7611557m_-962663937491960362tmjah_g_1299">
          As I understand, virtu=
alization (HYP) is running in non-secure world (<a href=3D"https://develope=
r=2Earm=2Ecom/documentation/ddi0406/c/System-Level-Architecture/The-System-=
Level-Programmers--Model/The-Virtualization-Extensions" target=3D"_blank">h=
ttps://developer=2Earm=2Ecom/documentation/ddi0406/c/System-Level-Architect=
ure/The-System-Level-Programmers--Model/The-Virtualization-Extensions</a>),=
 so my guess (only guess!!!), virtualization software has to prepare (confi=
gure) HW platform in the way, that FreeBSD kernel will not lack any resourc=
es, required to configure MPU, VA, etc=2E
         </div>
         <div dir=
=3D"auto" id=3D"m_-6449202736562147260m_-2747878036369583702m_-507771191754=
7611557m_-962663937491960362tmjah_g_1299">
          So, if you lucky to bo=
ot virtualizer, which is aware of target OS, that maybe you can boot the ke=
rnel=2E Although, I doubt, that you need to boot 'second' u-boot to boot th=
e kernel - there is simply ubldr, which you can hook somehow from virtualiz=
er=2E=2E=2E=2E
         </div>
         <div dir=3D"auto" id=3D"m_-64492027=
36562147260m_-2747878036369583702m_-5077711917547611557m_-96266393749196036=
2tmjah_g_1299">
          <br>
         </div>
         <div dir=3D"auto" i=
d=3D"m_-6449202736562147260m_-2747878036369583702m_-5077711917547611557m_-9=
62663937491960362tmjah_g_1299">
          Stan
         </div>
         <di=
v dir=3D"auto" id=3D"m_-6449202736562147260m_-2747878036369583702m_-5077711=
917547611557m_-962663937491960362tmjah_g_1299">
          <br>
         </d=
iv>
         <div dir=3D"auto" id=3D"m_-6449202736562147260m_-2747878036369=
583702m_-5077711917547611557m_-962663937491960362tmjah_g_1299">
          <=
br>
         </div>
         <br>
        </div>
        <div dir=3D"auto">=

         Mario Marietto wrote:
        </div>
        <br>
        <br>
  =
      <div>
         <blockquote type=3D"cite" style=3D"margin:0px 0px 0px =
0=2E8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
         =
 <div dir=3D"ltr">
           <div>
            ---&gt; As I understand, it=
 makes sure that u-boot keeps in secure mode during boot and passes control=
 to ubldr, which boots FreeBSD kernel, in that mode=2E
           </div>
  =
         <div>
            <br>
           </div>
           <div>
        =
    Can you elaborate your sentence more ? I know that the bootloader secur=
e mode is bypassed by the virtual open systems u-boot=2E Are you saying tha=
t when the control passes to the second u-boot,it will happen in secure mod=
e,so that the bypass that happened loading the first u-boot,is annulled ? I=
f this is true,maybe can I boot FreeBSD using the virtual-open-system custo=
m u-boot ? Is this compatible with FreeBSD ? Where can I find the u-boot=2E=
bin that the xen developer talked about ? thanks bro'=2E
           </div>
=
           <div>
            <br>
           </div>
           <div>
      =
      <br>
           </div>
          </div>
          <br>
          <div=
 class=3D"gmail_quote">
           <div dir=3D"ltr" class=3D"gmail_attr">
 =
           On Sun, Dec 17, 2023 at 12:35=E2=80=AFAM Stanislav Silnicki &lt;=
<a href=3D"mailto:stanislav=2Esilnicki@mailgate=2Eus" target=3D"_blank">sta=
nislav=2Esilnicki@mailgate=2Eus</a>&gt; wrote:
            <br>
           =
</div>
           <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px=
 0px 0=2E8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
    =
        <div>
             <div>
              <div>
               <div id=
=3D"m_-6449202736562147260m_-2747878036369583702m_-5077711917547611557m_-96=
2663937491960362m_5085590471051268986compose-body-wrapper" dir=3D"auto">
  =
              <div dir=3D"auto">
                 Hi Mario,
               =
 </div>
                <div dir=3D"auto">
                 <br>
          =
      </div>
                <div dir=3D"auto">
                 U-Boot&nbs=
p; beast is hiding in this den: <a href=3D"https://source=2Edenx=2Ede/u-boo=
t/u-boot=2Egit" target=3D"_blank">https://source=2Edenx=2Ede/u-boot/u-boot=
=2Egit</a>
                </div>
                <div dir=3D"auto">
      =
           I took a brief look at your post and it seems to me, that option=
&nbsp;<span style=3D"font-family:SFMono-Regular,Menlo,Monaco,Consolas,&quot=
;Liberation Mono&quot;,&quot;Courier New&quot;,monospace;font-size:inherit"=
>CONFIG_CMO_BY_VA_ONLY</span>&nbsp;is irrelevant to your target armv7 32 bi=
t platform:&nbsp;<a href=3D"https://source=2Edenx=2Ede/u-boot/u-boot/-/blob=
/master/arch/arm/cpu/armv8/Kconfig?ref_type=3Dheads#L3" target=3D"_blank">h=
ttps://source=2Edenx=2Ede/u-boot/u-boot/-/blob/master/arch/arm/cpu/armv8/Kc=
onfig?ref_type=3Dheads#L3</a>
                </div>
                <div d=
ir=3D"auto" id=3D"m_-6449202736562147260m_-2747878036369583702m_-5077711917=
547611557m_-962663937491960362m_5085590471051268986tmjah_g_1299">
         =
        <br>
                </div>
                <div dir=3D"auto" id=3D=
"m_-6449202736562147260m_-2747878036369583702m_-5077711917547611557m_-96266=
3937491960362m_5085590471051268986tmjah_g_1299">
                 As for co=
mpiling the u-boot, it is a doable task, given that you understand what you=
 are doing=2E There are no specific options in u-boot devoted to FreeBSD=2E=
 It is a boot loader, whose mission to make basic hardware initialization, =
read you kernel file from some media into RAM and then pass it control=2E
 =
               </div>
                <div dir=3D"auto" id=3D"m_-6449202736=
562147260m_-2747878036369583702m_-5077711917547611557m_-962663937491960362m=
_5085590471051268986tmjah_g_1299">
                 <br>
                </=
div>
                <div dir=3D"auto" id=3D"m_-6449202736562147260m_-27478=
78036369583702m_-5077711917547611557m_-962663937491960362m_5085590471051268=
986tmjah_g_1299">
                 Basically, you can grab some defconfig, =
prepared for any other Exynos5250 based board&nbsp; (say, this one: <a href=
=3D"https://source=2Edenx=2Ede/u-boot/u-boot/-/blob/master/configs/arndale_=
defconfig?ref_type=3Dheads)" target=3D"_blank">https://source=2Edenx=2Ede/u=
-boot/u-boot/-/blob/master/configs/arndale_defconfig?ref_type=3Dheads)</a> =
and adopt it somehow=2E
                </div>
                <div dir=3D"=
auto" id=3D"m_-6449202736562147260m_-2747878036369583702m_-5077711917547611=
557m_-962663937491960362m_5085590471051268986tmjah_g_1299">
               =
  <br>
                </div>
                <div dir=3D"auto" id=3D"m_-64=
49202736562147260m_-2747878036369583702m_-5077711917547611557m_-96266393749=
1960362m_5085590471051268986tmjah_g_1299">
                 As per my exper=
ience, you have to respect these two options, compiling u-boot for FreeBSD:=
&nbsp;<a href=3D"https://github=2Ecom/freebsd/freebsd-ports/blob/main/sysut=
ils/u-boot-master/files/FreeBSD_Fragment" target=3D"_blank">https://github=
=2Ecom/freebsd/freebsd-ports/blob/main/sysutils/u-boot-master/files/FreeBSD=
_Fragment</a>
                </div>
                <div dir=3D"auto" id=
=3D"m_-6449202736562147260m_-2747878036369583702m_-5077711917547611557m_-96=
2663937491960362m_5085590471051268986tmjah_g_1299">
                 <br>
 =
               </div>
                <div dir=3D"auto" id=3D"m_-6449202736=
562147260m_-2747878036369583702m_-5077711917547611557m_-962663937491960362m=
_5085590471051268986tmjah_g_1299">
                 As I understand, it mak=
es sure, that u-boot keeps in secure mode during boot and passes control to=
 ubldr, which boots FreBSD kernel, in that mode=2E Otherwise, there a lot o=
f surprises you may realize=2E
                </div>
                <div =
dir=3D"auto" id=3D"m_-6449202736562147260m_-2747878036369583702m_-507771191=
7547611557m_-962663937491960362m_5085590471051268986tmjah_g_1299">
        =
         <br>
                </div>
                <div dir=3D"auto" id=
=3D"m_-6449202736562147260m_-2747878036369583702m_-5077711917547611557m_-96=
2663937491960362m_5085590471051268986tmjah_g_1299">
                 Hope, =
this will help to progress you tasks
                </div>
               =
 <div dir=3D"auto" id=3D"m_-6449202736562147260m_-2747878036369583702m_-507=
7711917547611557m_-962663937491960362m_5085590471051268986tmjah_g_1299">
  =
               Stan
                </div>
                <div dir=3D"auto=
" id=3D"m_-6449202736562147260m_-2747878036369583702m_-5077711917547611557m=
_-962663937491960362m_5085590471051268986tmjah_g_1299">
                 <b=
r>
                </div>
               </div>
               <div dir=3D"=
auto">
                Mario Marietto wrote:
               </div>
        =
       <br>
               <br>
               <div>
                <block=
quote type=3D"cite" style=3D"margin:0px 0px 0px 0=2E8ex;border-left:1px sol=
id rgb(204,204,204);padding-left:1ex">
                 <div dir=3D"ltr">
 =
                 <div>
                   <div>
                    <div>
 =
                    <div id=3D"m_-6449202736562147260m_-2747878036369583702=
m_-5077711917547611557m_-962663937491960362m_5085590471051268986gmail-:1fg"=
>
                      <div id=3D"m_-6449202736562147260m_-274787803636958=
3702m_-5077711917547611557m_-962663937491960362m_5085590471051268986gmail-:=
1ay">
                       <div dir=3D"ltr">
                        Hell=
o=2E
                        <br>
                        <br>
            =
             I'm trying to boot FreeBSD for arm32 bit as DomU on my ARM Chr=
omebook=2E Basically there are two ways to accomplish this task :
         =
               <br>
                        <br>
                         1=
) to write a patch that allows the FreeBSD kernel to boot as a zImage file=
=2E This could be accomplished applying this patch to a specific file that'=
s on the source code of FreeBSD :
                        <br>
            =
            <br>
                        <br><a href=3D"https://xenbits=2Ex=
en=2Eorg/gitweb/?p=3Dpeople/julieng/freebsd=2Egit;a=3Dblob_plain;f=3Dsys/ar=
m/conf/XENVIRT;h=3Dff6433392e6fc2d5fa7c1ad1f7c40155003af9a8;hb=3D0782e25d98=
cc1391472717035f986c979edef0c9" rel=3D"nofollow ugc noopener" target=3D"_bl=
ank">https://xenbits=2Exen=2Eorg/gitweb/?p=3Dp=2E=2E=2E8;hb=3D0782e25d98cc1=
391472717035f986c979edef0c9</a>
                        <br>
              =
          <br>
                        <br>
                         This p=
atch was written by Julien Grall a lot of time ago and now it does not work=
 anymore=2E This is the reason :
                        <br>
             =
           <br>
                        <br>
                        <block=
quote>
                         <div>
                          <div>
     =
                      It appears FreeBSD-CURRENT removed the last step conv=
erting the kernel file to kernel=2Ebin=2E The patch can be readily rebased,=
 but without kernel=2Ebin that doesn't do too much=2E
                     =
     </div>
                         </div>
                        </block=
quote>
                        <br>
                        <br>
          =
               So,without a rebase of that patch the first option is not ap=
plicable=2E And I'm not able to fix it=2E
                        <br>
    =
                    <br>
                         2) booting FreeBSD using =
U-Boot,as explained to me by a xen developer :
                        <br>=

                        <br>
                        <br>
                =
        <blockquote>
                         <div>
                       =
   <div>
                           I was trying to explain why and how Jul=
ien's patch works so that you could be the one to re-do something similar o=
r fix the patch on the FreeBSD kernel that you are working with=2E I am hap=
py to help review and write patches but I don't work with the FreeBSD kerne=
l so I wouldn't be able to help you quickly=2E However, I might have a sugg=
estion=2E Do you know if FreeBSD can be booted by U-Boot ? Because U-Boot d=
efinitely boots as Xen on ARM guest firmware/bootloader=2E You should be ab=
le to build U-Boot and use the U-Boot binary as Xen guest kernel, then U-Bo=
ot could load FreeBSD from disk or network and start it=2E For instance as =
domU config file:
                           <br>
                         =
  <br>
                            kernel=3D"/home/petalinux/u-boot=2Ebin"
=
                           <br>
                            disk =3D [ '/ho=
me/petalinux/test=2Eimg,raw,xvda' ]
                           <br>
       =
                    <br>
                            I know it is important=
 to build u-boot with the following config to make it work on Xen=2E
      =
                     <br>
                           <br>
                 =
           CONFIG_CMO_BY_VA_ONLY=3Dy
                          </div>
     =
                    </div>
                        </blockquote>
          =
              <br>
                        <br>
                         Th=
is option seems more doable to me according to my knowledge=2E But I need t=
o understand how to do it=2E
                        <br>
                 =
       <br>
                         Well,let's say that on the ARM Chromeb=
ook I'm forced to use and install a customized version of u-boot,created by=
 virtual open systems,because it is the only one that allows bypassing its =
bootloader protection=2E You can find more information here :
             =
           <br>
                        <br><a href=3D"http://www=2Evirtual=
opensystems=2Ecom/en/solutions/guides/kvm-on-chromebook/?vos=3Dtech" rel=3D=
"nofollow ugc noopener" target=3D"_blank">http://www=2Evirtualopensystems=
=2Ecom/en/solutions/guides/kvm-on-chromebook/?vos=3Dtech</a>
              =
          <br>
                        <br>
                         This i=
s the relevant section to read :
                        <br>
             =
           <br>
                        <br>
                        <block=
quote>
                         <div>
                          <div>
     =
                      Bootloader :
                           <br>
        =
                   <br>
                            If you wish to skip thi=
s chapter you can download a pre-compiled binary of the bootloader:
       =
                    <br>
                           <br>
                  =
         <br>
                            $ wget <a href=3D"http://www=2Evi=
rtualopensystems=2Ecom/downloads/guides/kvm_on_chromebook/nv_u-boot-snow=2E=
kpart" rel=3D"nofollow ugc noopener" target=3D"_blank">http://www=2Evirtual=
opensystems=2Ecom/downloads/guides/kvm_on_chromebook/nv_u-boot-snow=2Ekpart=
</a>
                           <br>
                           <br>
      =
                     <br>
                            To be able to run KVM=
 on ARM platforms, the kernel has to be booted in hypervisor mode=2E Becaus=
e of this relatively recent requirement (due to the introduction of the vir=
tualization extensions), up until now all booting methods would boot the ke=
rnel in the standard Supervisor mode=2E For the ARM Chromebook the default =
boot procedure doesn't allow us to boot in hypervisor mode=2E Although the =
laptop's boot mechanism is based on the frequently used u-boot, the binary =
is located in RO memory=2E Fortunately, a chained u-boot mechanism can be u=
sed (i=2Ee=2E starting another u-boot after the original)=2E We can then en=
ter hypervisor mode from our custom iteration of u-boot and subsequently lo=
ad our kernel and userspace=2E
                           <br>
            =
               <br>
                            Checkout the needed u-boot =
code :
                           <br>
                           <br>
    =
                       <br>
                            $ git clone git://<=
a href=3D"http://github=2Ecom/virtualopensystems/u-boot=2Egit$" rel=3D"nofo=
llow ugc   noopener" target=3D"_blank">github=2Ecom/virtualopensystems/u-bo=
ot=2Egit$</a> cd u-boot$ =2E/scripts/build=2Esh
                           =
<br>
                           <br>
                           <br>
      =
                      If successful, a message about how to copy the bootlo=
ader on the USB flash disk or SD card will appear=2E We will use it later w=
hen preparing the boot medium to start our system=2E If you have followed t=
he Setting up the boot medium chapter and you have a prepared boot device, =
then you can update u-boot by running :
                           <br>
   =
                        <br>
                           <br>
              =
              $ sudo dd if=3Dnv_uboot-snow=2Ekpart of=3D/dev/sdX1
         =
                 </div>
                         </div>
                   =
     </blockquote>
                        <br>
                        <br=
>
                         so,the needed u-boot that we must use should be =
installed on the first partition of the sd card=2E
                        =
<br>
                        <br>
                         There is another=
 relevant section to read :
                        <br>
                  =
      <br>
                        <br>
                        <blockquote=
>
                         <div>
                          <div>
          =
                 Setting up the boot medium
                           <br>=

                           <br>
                            Now it is time=
 to copy all the relevant files that we created in the previous chapters,an=
d use them to boot Chromebook with a different kernel and OS=2E In all thes=
e examples the device /dev/sdX is used=2E Take extra care to change the exa=
mples to the device that you have attached=2E Insert the boot medium on you=
r workstation and carefully execute the following step=2E First we need to =
properly format the boot medium=2E
                           <br>
        =
                   <br>
                            In the uboot source dir=
ectory :
                           <br>
                           <br>
  =
                         <br>
                            $ sudo =2E/script=
s/sdcard=2Esh /dev/sdX
                           <br>
                    =
       <br>
                           <br>
                            Thi=
s will erase all data and create 4 partitions in the medium, along with cop=
ying the u-boot binary to the first partition:
                           <=
br>
                           <br>
                           <br>
       =
                     Partition 1 =3D ChromeOS signed binary (V=2EO=2ES chai=
ned u-boot)
                           <br>
                            Par=
tition 2 =3D not used
                           <br>
                     =
       Partition 3 =3D EXT2 partition for u-boot files (uImage and exynos52=
50-snow=2Edtb)
                           <br>
                            =
Partition 4 =3D EXT4 partition for userspace files
                        =
   <br>
                           <br>
                           <br>
   =
                         With u-boot being copied, next is the kernel image=
 and DTB file=2E From the kernel source execute :
                         =
  <br>
                           <br>
                           <br>
    =
                        $ mkdir =2E=2E/mnt/
                           <br>=

                            $ sudo mount /dev/sdX3 =2E=2E/mnt/
           =
                <br>
                            $ sudo cp arch/arm/boot/uI=
mage =2E=2E/mnt/
                           <br>
                          =
  $ sudo cp arch/arm/boot/dts/exynos5250-snow=2Edtb =2E=2E/mnt/
           =
                <br>
                            $ sudo umount /dev/sdX3
  =
                         <br>
                           <br>
             =
              <br>
                            Finally, we have to copy the=
 Ubuntu userspace filesystem that we created earlier:
                     =
      <br>
                           <br>
                           <br>
=
                            $ sudo mount /dev/sdX4 mnt/$ sudo cp -a =2E/pre=
cise/* mnt/$ sudo umount /dev/sdX4
                          </div>
       =
                  </div>
                        </blockquote>
            =
            <br>
                        <br>
                         Now,=
my idea is to chainload the already chain loaded u-boot created by V=2EO=2E=
S to the new u-boot that we need for booting FreeBSD and that can be instal=
led in the partition n=2E2,as shown in this scheme,because it is not used :=

                        <br>
                        <br>
                =
        <br>
                         Partition 1 =3D ChromeOS signed binar=
y (V=2EO=2ES chained u-boot)
                        <br>
                 =
        Partition 2 =3D not used (maybe we can install the u-boot for arm 3=
2 bit,compatible with FreeBSD on this partition)
                        <b=
r>
                         Partition 3 =3D EXT2 partition for u-boot files=
 (uImage and exynos5250-snow=2Edtb)
                        <br>
          =
               Partition 4 =3D EXT4 partition for userspace files
         =
               <br>
                        <br>
                        <b=
r>
                         Take in consideration that default boot string =
is hardcoded here,in the snow=2Eh file of the custom u-boot created by VOS =
:
                        <br>
                        <br>
               =
         <br><a href=3D"https://github=2Ecom/virtualopensystems/u-boot/blob=
/eecfeb578e296ef3b739ac918a39b6c177dff58a/include/configs/snow=2Eh#L101" re=
l=3D"nofollow ugc noopener" target=3D"_blank">https://github=2Ecom/virtualo=
pensyste=2E=2E=2E18a39b6c177dff58a/include/configs/snow=2Eh#L101</a>
      =
                  <br>
                        <br>
                       =
 <br>
                         and it needs to be recompiled because it sho=
uld point to the partition n=2E2,where I will install the u-boot files as e=
xplained here :
                        <br>
                        <br>
 =
                       <br><a href=3D"https://wiki=2Efreebsd=2Eorg/arm/Chro=
mebook" rel=3D"nofollow ugc   noopener" target=3D"_blank">https://wiki=2Efr=
eebsd=2Eorg/arm/Chromebook</a>
                        <br>
               =
         <br>
                        <br>
                         I have =
some questions to ask before I start working on this=2E
                   =
     <br>
                        <br>
                         1) The xen =
developer said :
                        <br>
                        <br>
=
                        <br>
                        <blockquote>
         =
                <div>
                          <div>
                     =
      You should be able to build U-Boot and use the U-Boot binary as Xen g=
uest kernel=2E=2E=2E
                          </div>
                     =
    </div>
                        </blockquote>
                        <b=
r>
                        <br>
                         where is the u-boo=
t binary,according to this document ?
                        <br>
        =
                <br><a href=3D"https://wiki=2Efreebsd=2Eorg/arm/Chromebook"=
 rel=3D"nofollow ugc   noopener" target=3D"_blank">https://wiki=2Efreebsd=
=2Eorg/arm/Chromebook</a>
                        <br>
                    =
    <br>
                         I don't see it=2E
                       =
 <br>
                        <br>
                        <br>
           =
              2) where is the source code of the file that I can get here :=

                        <br>
                        <br><a rel=3D"nofollo=
w ugc   noopener">http://commondatastorage=2Egoogleapis=2Ecom/chromeos-loca=
lmirror/distfiles/nv_uboot-snow-simplefb=2Ekpart=2Ebz2</a>
                =
        <br>
                        <br>
                         I need t=
he source code if I want to recompile u-boot so that it can point to the pa=
rtition 4=2E
                        <br>
                        <br>
    =
                     Maybe it can be found on this link :
                 =
       <br>
                        <br><a href=3D"http://linux-exynos=2Eor=
g/dist/chromebook/nv_uboot/" rel=3D"nofollow   ugc noopener" target=3D"_bla=
nk">http://linux-exynos=2Eorg/dist/chromebook/nv_uboot/</a>;
               =
         <br>
                        <br>
                         but it =
can't be opened=2E=2E=2E=2E
                        <br>
                  =
      <br>
                        <br>
                         3) in this=
 specific scenario the source code of u-boot should run on arm 32 bit,not o=
n arm 64,because I have the Samsung Chromebook "SNOW" model XE303C12,that's=
 powered by a Samsung Exynos 5250 (ARMv7 32 bit Cortex A15) Soc=2E
        =
                <br>
                        <br>
                        <=
br>
                         4) I'm not sure if I can chainload the customi=
zed u-boot created by V=2EO=2ES that should be installed on the first parti=
tion with the u-boot tailored for booting FreeBSD that should be installed =
on the partition 2=2E=2E=2E=2E
                        <br>
               =
         <br>
                        <br>
                         5) the =
xen developer said that u-boot should be compiled enabling this option :
  =
                      <br>
                        <br>
                   =
     <br>
                        <div>
                         <div>
    =
                      Code: 
                          <br>
               =
          </div>
                         <div>
                          <=
br>
                         </div>
                         <div dir=3D"lt=
r">
                          <pre dir=3D"ltr"><code>CONFIG_CMO_BY_VA_ONLY=
=3Dy</code></pre>
                         </div>
                        <=
/div>
                        <br>
                        <br>
           =
              Well,can you provide some good source that can help me to und=
erstand how I can recompile u-boot for FreeBSD ? thanks=2E
                =
       </div>
                      </div>
                     </div>
    =
                </div>
                   </div>
                  </div>
 =
                 <div>
                   <div>
                    <div>
 =
                    <div id=3D"m_-6449202736562147260m_-2747878036369583702=
m_-5077711917547611557m_-962663937491960362m_5085590471051268986gmail-:1fh"=
>
                      <table role=3D"presentation">
                     =
  <tbody>
                        <tr>
                         <td><br></t=
d>
                         <td></td>
                        </tr>
       =
                </tbody>
                      </table>
                   =
  </div>
                    </div>
                   </div>
             =
     </div><span class=3D"gmail_signature_prefix">-- </span>
              =
    <br>
                  <div dir=3D"ltr" class=3D"gmail_signature">
    =
               Mario=2E
                   <br>
                  </div>
  =
               </div>
                </blockquote>
               </div>
 =
             </div>
             </div>
            </div>
           </blo=
ckquote>
          </div>
          <br clear=3D"all">
          <br><span =
class=3D"gmail_signature_prefix">-- </span>
          <br>
          <div d=
ir=3D"ltr" class=3D"gmail_signature">
           Mario=2E
           <br>
 =
         </div>
         </blockquote>
        </div>
       </div>
      <=
/div>
     </blockquote>
    </div>
    <br clear=3D"all">
    <br><span cl=
ass=3D"gmail_signature_prefix">-- </span>
    <br>
    <div dir=3D"ltr" cla=
ss=3D"gmail_signature">
     Mario=2E
     <br>
    </div>
   </blockquote>=

  </div>
  <br clear=3D"all">
  <br><span class=3D"gmail_signature_prefix"=
>-- </span>
  <br>
  <div dir=3D"ltr" class=3D"gmail_signature">
   Mario=
=2E
   <br>
  </div>
 </blockquote>
</div>
<br clear=3D"all">
<br><span cla=
ss=3D"gmail_signature_prefix">-- </span>
<br>
<div dir=3D"ltr" class=3D"gma=
il_signature">
 Mario=2E
 <br>
</div></blockquote></div></body></html>
------VCBWAXETIA7O4UQHSJNV7WPWZ88ZGZ--




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?54b70672-9ea4-40e2-b346-b579536c0e5c>