Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Dec 2023 19:26:06 +0100
From:      Mario Marietto <marietto2008@gmail.com>
To:        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:  <CA%2B1FSiicYZ55OTRV7v%2BCS5rc6K7NnFaePHzwHjF4KZPRvkNGdQ@mail.gmail.com>
In-Reply-To: <54b70672-9ea4-40e2-b346-b579536c0e5c@mailgate.us>
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> <54b70672-9ea4-40e2-b346-b579536c0e5c@mailgate.us>

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

---> Mario, you can not edit .config by hand. You have to consider these
options in some _defconfig and then reconfigure / recompile

ok. I did as you have suggested,but I've got the same exact error. I've
added the parameter "CONFIG_ARMV7_NONSEC=3Dn" inside the file snow_defconfi=
g
and then :

# ARCH=3Darm CROSS_COMPILE=3Darm-linux-gnueabihf- make snow_defconfig
# ARCH=3Darm CROSS_COMPILE=3Darm-linux-gnueabihf- make

The u-boot.bin file generated has a different size than that generated
before,but the error when I try to boot FreeBSD is the same.

On Wed, Dec 20, 2023 at 6:00=E2=80=AFPM Stanislav Silnicki <
stanislav.silnicki@mailgate.us> wrote:

> Mario, you can not edit .config byhand. You have to consider these option=
s
> in some _defconfig and then reconfigure/tecompile
>
> Get BlueMail for Android <https://bluemail.me>;
> On Dec 19, 2023, at 5:29 PM, Mario Marietto <marietto2008@gmail.com>
> wrote:
>>
>> Hello to everyone.
>>
>> I have compiled the needed u-boot.bin from scratch using this procedure =
:
>>
>> # git clone https://github.com/u-boot/u-boot.git
>> # cd u-boot
>> # ARCH=3Darm CROSS_COMPILE=3Darm-linux-gnueabihf- make snow_defconfig : =
this
>> line generates the file .config
>> # nano .config and I've added these parameters :
>>
>> CONFIG_ARMV7_NONSEC=3Dn
>> CONFIG_EFI_GRUB_ARM32_WORKAROUND=3Dy
>>
>> the uboot-bin file is generated with this command :
>>
>> # ARCH=3Darm CROSS_COMPILE=3Darm-linux-gnueabihf- make
>>
>> At this point,I took a look inside the .config file and I saw that the
>> parameter "CONFIG_ARMV7_NONSEC=3Dn" has been removed. So,for some reason=
,it
>> is not accepted and this could be a problem....
>>
>> These are the xen config files that I've used :
>>
>> nano freebsd.cfg
>>
>> name=3D"test"
>> kernel=3D"u-boot.bin"
>> extra =3D "console=3Dhvc0"
>> memory=3D256
>> vcpus=3D1
>> disk =3D [ 'FreeBSD-13.2-RELEASE-armv7.img,raw,xvda' ]
>>
>> nano start-freebsd
>>
>> xl create freebsd.cfg
>> xl console freebsd
>>
>> This is what happens when I launch the vm :
>>
>> # ./start-freebsd
>>
>> Parsing config from freebsd.cfg
>> xc: error: panic: xg_dom_core.c:689: xc_dom_find_loader: no loader found=
:
>> Invalid kernel
>> libxl: error: libxl_dom.c:571:libxl__build_dom: xc_dom_parse_image faile=
d
>> libxl: error: libxl_create.c:1640:domcreate_rebuild_done: Domain 1:canno=
t
>> (re-)build domain: -3
>> libxl: error: libxl_domain.c:1183:libxl__destroy_domid: Domain
>> 1:Non-existent domain
>> libxl: error: libxl_domain.c:1137:domain_destroy_callback: Domain
>> 1:Unable to destroy guest
>> libxl: error: libxl_domain.c:1064:domain_destroy_cb: Domain 1:Destructio=
n
>> of domain failed
>> freebsd is an invalid domain identifier (rc=3D-6)
>>
>>
>> On Mon, Dec 18, 2023 at 12:39=E2=80=AFPM Mario Marietto <marietto2008@gm=
ail.com>
>> wrote:
>>
>>> So,ok,I should have said "the second u-boot" ; since the first u-boot
>>> binary is the "u-boot binary located in the RO memory" of the Chromeboo=
k".
>>> Sorry for the confusion.
>>>
>>> On Mon, Dec 18, 2023 at 12:35=E2=80=AFPM Mario Marietto <marietto2008@g=
mail.com>
>>> wrote:
>>>
>>>> ---> There are no specific options in u-boot devoted to FreeBSD
>>>>
>>>> This is an important factor. 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 created by the virtual open system in 2014,that sho=
uld
>>>> be installed on the first partition ? It could work if there are no
>>>> differences between the u-boot that should boot Linux and the u-boot t=
hat
>>>> should boot FreeBSD.
>>>>
>>>> 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.google.com/file/d/1eAaZMfd6CU0xiqQfH7sq5wGVzzO09BRm/view=
?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-boot.bin to boot FreeB=
SD as
>>>> domU under Xen,as explained by Stefano Stabellini,the xen developer th=
at
>>>> suggested to me what I could do to have FreeBSD virtualized under Xen =
on my
>>>> Arm Chromebook) ; otherwise the risk is to find later problems that wi=
ll
>>>> make me troubles and that I will not able to fix.
>>>>
>>>> I gave a look at the virtual open system u-boot and I didn't see any a=
rndale_defconfig
>>>> inside. So,If I have understood correctly,I should put that file insid=
e the
>>>> root of the u-boot source code,let's say here :
>>>>
>>>> marietto:/home/marietto/Desktop/Files/u-boot_FreeBSD/u-boot-vos # ls
>>>>
>>>> .checkpatch.conf        README                  doc
>>>>                     net
>>>> .git                    api                     drivers
>>>>                 onenand_ipl
>>>> .gitignore              arch                    dts
>>>>                     post
>>>> COPYING                 board                   examples
>>>> rules.mk
>>>> CREDITS                 boards.cfg              fs
>>>>                      scripts
>>>> MAINTAINERS             common                  include
>>>>                 snapshot.commit
>>>> MAKEALL                 config.mk               lib
>>>>                     spl
>>>> Makefile                cros                    mkconfig
>>>>                test
>>>> PRESUBMIT.cfg           disk                    nand_spl
>>>>                tools
>>>>
>>>> and I should do : make and make install ? and the file I
>>>> need,u-boot.bin will be generated ?
>>>>
>>>> I didn't find any pre made configuration file inside :
>>>>
>>>> u-boot-vos # find . -type f -name "exynos*"
>>>>
>>>> ./include/exynos-fb.h
>>>> ./include/configs/exynos5-common.h
>>>> ./doc/device-tree-bindings/spi/exynos-spi.txt
>>>> ./doc/device-tree-bindings/usb/exynos-usb.txt
>>>> ./drivers/power/exynos-tmu.c
>>>> ./drivers/power/exynos-cpufreq.c
>>>> ./drivers/video/exynos-fb.c
>>>> ./drivers/spi/exynos_spi.c
>>>> ./board/samsung/dts/exynos5250-spring.dts
>>>> ./board/samsung/dts/exynos5250-smdk5250.dts
>>>> ./board/samsung/dts/exynos5250-snow.dts
>>>> ./board/samsung/dts/exynos5250-daisy.dts
>>>> ./arch/arm/include/asm/arch-exynos5/exynos-cpufreq.h
>>>> ./arch/arm/include/asm/arch-exynos5/exynos-tmu.h
>>>> ./arch/arm/dts/exynos5250.dtsi
>>>> ./arch/arm/dts/exynos-periph-id.dtsi
>>>> ./arch/arm/cpu/armv7/exynos5/exynos_cache.c
>>>>
>>>> u-boot-vos # find . -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 protections of the Arm Chromeb=
ook
>>>> (such as a lot of different patches needed to boot correctly Linux) wi=
ll be
>>>> broken ; anyway,since it works,I don't need to use an updated version =
of
>>>> u-boot.
>>>>
>>>> ----> As per my experience, you have to respect these two options,
>>>> compiling u-boot for FreeBSD:
>>>> https://github.com/freebsd/freebsd-ports/blob/main/sysutils/u-boot-mas=
ter/files/FreeBSD_Fragment
>>>>
>>>> It says that I should use these parameters :
>>>>
>>>> CONFIG_ARMV7_NONSEC=3Dn
>>>> CONFIG_EFI_GRUB_ARM32_WORKAROUND=3Dy
>>>>
>>>> These are the parameters used to configure a Linux kernel. I don't
>>>> understand what's the relation between the compilation of a linux kern=
el
>>>> and u-boot. 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 kn=
ow
>>>> how to recompile a Linux kernel).
>>>>
>>>>
>>>> ---> I'm not sure that I'm getting you right, as I don't understand
>>>> what you mean under "the first u-boot".
>>>>
>>>>
>>>> I'm talking about first u-boot because the whole procedure to boot
>>>> Linux on the ARM Chromebook,that's explained here :
>>>>
>>>> http://www.virtualopensystems.com/en/solutions/guides/kvm-on-chromeboo=
k/
>>>>
>>>>
>>>> at some point they say :
>>>>
>>>>
>>>> To be able to run KVM on ARM platforms, the kernel has to be booted in
>>>> hypervisor mode. Because of this relatively recent requirement (due to=
 the
>>>> introduction of the virtualization extensions), up until now all booti=
ng
>>>> methods would boot the kernel in the standard Supervisor mode.
>>>>
>>>> For the ARM Chromebook the default boot procedure doesn't allow us to
>>>> boot in hypervisor mode. Although the laptop's boot mechanism is based=
 on
>>>> the frequently used u-boot, the binary is located in RO memory.
>>>> Fortunately, a chained u-boot mechanism can be used (i.e. starting ano=
ther
>>>> u-boot after the original). We can then enter hypervisor mode from our
>>>> custom iteration of u-boot and subsequently load our kernel and usersp=
ace.
>>>>
>>>> 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 memo=
ry" ,
>>>> that does not boot Chrome OS in hypervisor mode. We don't need it if w=
e
>>>> want to boot Linux with kvm or xen enabled.
>>>>
>>>> On Sun, Dec 17, 2023 at 1:28=E2=80=AFAM Stanislav Silnicki <
>>>> stanislav.silnicki@mailgate.us> wrote:
>>>>
>>>>> I'm not an expert in the topic, I only know, that 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.
>>>>> https://developer.arm.com/documentation/den0013/d/Security/TrustZone-=
hardware-architecture?lang=3Den
>>>>>
>>>>> I'm not sure, that I'm getting you right, as I don't understand what
>>>>> you mean under "the first u-boot".
>>>>>
>>>>> As I understand, virtualization (HYP) is running in non-secure world =
(
>>>>> https://developer.arm.com/documentation/ddi0406/c/System-Level-Archit=
ecture/The-System-Level-Programmers--Model/The-Virtualization-Extensions),
>>>>> so my guess (only guess!!!), virtualization software has to prepare
>>>>> (configure) HW platform in the way, that FreeBSD kernel will not lack=
 any
>>>>> resources, required to configure MPU, VA, etc.
>>>>> So, if you lucky to boot virtualizer, which is aware of target OS,
>>>>> that maybe you can boot the kernel. 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....
>>>>>
>>>>> Stan
>>>>>
>>>>>
>>>>>
>>>>> Mario Marietto wrote:
>>>>>
>>>>>
>>>>> ---> 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.
>>>>>
>>>>> Can you elaborate your sentence more ? I know that the bootloader
>>>>> secure mode is bypassed by the virtual open systems u-boot. Are you s=
aying
>>>>> that when the control passes to the second u-boot,it will happen in s=
ecure
>>>>> mode,so that the bypass that happened loading the first u-boot,is ann=
ulled
>>>>> ? If this is true,maybe can I boot FreeBSD using the virtual-open-sys=
tem
>>>>> custom u-boot ? Is this compatible with FreeBSD ? Where can I find th=
e
>>>>> u-boot.bin that the xen developer talked about ? thanks bro'.
>>>>>
>>>>>
>>>>>
>>>>> On Sun, Dec 17, 2023 at 12:35=E2=80=AFAM Stanislav Silnicki <
>>>>> stanislav.silnicki@mailgate.us> wrote:
>>>>>
>>>>>> Hi Mario,
>>>>>>
>>>>>> U-Boot  beast is hiding in this den:
>>>>>> https://source.denx.de/u-boot/u-boot.git
>>>>>> I took a brief look at your post and it seems to me, that option
>>>>>> CONFIG_CMO_BY_VA_ONLY is irrelevant to your target armv7 32 bit
>>>>>> platform:
>>>>>> https://source.denx.de/u-boot/u-boot/-/blob/master/arch/arm/cpu/armv=
8/Kconfig?ref_type=3Dheads#L3
>>>>>>
>>>>>> As for compiling the u-boot, it is a doable task, given that you
>>>>>> understand what you are doing. There are no specific options in u-bo=
ot
>>>>>> devoted to FreeBSD. It is a boot loader, whose mission to make basic
>>>>>> hardware initialization, read you kernel file from some media into R=
AM and
>>>>>> then pass it control.
>>>>>>
>>>>>> Basically, you can grab some defconfig, prepared for any other
>>>>>> Exynos5250 based board  (say, this one:
>>>>>> https://source.denx.de/u-boot/u-boot/-/blob/master/configs/arndale_d=
efconfig?ref_type=3Dheads)
>>>>>> and adopt it somehow.
>>>>>>
>>>>>> As per my experience, you have to respect these two options,
>>>>>> compiling u-boot for FreeBSD:
>>>>>> https://github.com/freebsd/freebsd-ports/blob/main/sysutils/u-boot-m=
aster/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 FreBSD kernel, =
in that
>>>>>> mode. Otherwise, there a lot of surprises you may realize.
>>>>>>
>>>>>> Hope, this will help to progress you tasks
>>>>>> Stan
>>>>>>
>>>>>> Mario Marietto wrote:
>>>>>>
>>>>>>
>>>>>> Hello.
>>>>>>
>>>>>> I'm trying to boot FreeBSD for arm32 bit as DomU on my ARM
>>>>>> Chromebook. 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. This could be accomplished applying this patch to a spe=
cific
>>>>>> file that's on the source code of FreeBSD :
>>>>>>
>>>>>>
>>>>>>
>>>>>> https://xenbits.xen.org/gitweb/?p=3Dp...8;hb=3D0782e25d98cc139147271=
7035f986c979edef0c9
>>>>>> <https://xenbits.xen.org/gitweb/?p=3Dpeople/julieng/freebsd.git;a=3D=
blob_plain;f=3Dsys/arm/conf/XENVIRT;h=3Dff6433392e6fc2d5fa7c1ad1f7c40155003=
af9a8;hb=3D0782e25d98cc1391472717035f986c979edef0c9>
>>>>>>
>>>>>>
>>>>>> This patch was written by Julien Grall a lot of time ago and now it
>>>>>> does not work anymore. This is the reason :
>>>>>>
>>>>>>
>>>>>> It appears FreeBSD-CURRENT removed the last step converting the
>>>>>> kernel file to kernel.bin. The patch can be readily rebased, but wit=
hout
>>>>>> kernel.bin that doesn't do too much.
>>>>>>
>>>>>>
>>>>>>
>>>>>> So,without a rebase of that patch the first option is not applicable=
.
>>>>>> And I'm not able to fix it.
>>>>>>
>>>>>> 2) booting FreeBSD using U-Boot,as explained to me by a xen develope=
r
>>>>>> :
>>>>>>
>>>>>>
>>>>>> I was trying to explain why and how Julien's patch works so that you
>>>>>> could be the one to re-do something similar or fix the patch on the =
FreeBSD
>>>>>> kernel that you are working with. I am happy to help review and writ=
e
>>>>>> patches but I don't work with the FreeBSD kernel so I wouldn't be ab=
le to
>>>>>> help you quickly. However, I might have a suggestion. Do you know if
>>>>>> FreeBSD can be booted by U-Boot ? Because U-Boot definitely boots as=
 Xen on
>>>>>> ARM guest firmware/bootloader. You should be able to build U-Boot an=
d use
>>>>>> the U-Boot binary as Xen guest kernel, then U-Boot could load FreeBS=
D from
>>>>>> disk or network and start it. For instance as domU config file:
>>>>>>
>>>>>> kernel=3D"/home/petalinux/u-boot.bin"
>>>>>> disk =3D [ '/home/petalinux/test.img,raw,xvda' ]
>>>>>>
>>>>>> I know it is important to build u-boot with the following config to
>>>>>> make it work on Xen.
>>>>>>
>>>>>> CONFIG_CMO_BY_VA_ONLY=3Dy
>>>>>>
>>>>>>
>>>>>>
>>>>>> This option seems more doable to me according to my knowledge. But I
>>>>>> need to understand how to do it.
>>>>>>
>>>>>> Well,let's say that on the ARM Chromebook 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 bootloa=
der
>>>>>> protection. You can find more information here :
>>>>>>
>>>>>>
>>>>>> http://www.virtualopensystems.com/en/solutions/guides/kvm-on-chromeb=
ook/?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://www.virtualopensystems.com/downloads/guides/kvm_on_chromebook=
/nv_u-boot-snow.kpart
>>>>>>
>>>>>>
>>>>>> To be able to run KVM on ARM platforms, the kernel has to be booted
>>>>>> in hypervisor mode. Because of this relatively recent requirement (d=
ue to
>>>>>> the introduction of the virtualization extensions), up until now all
>>>>>> booting methods would boot the kernel in the standard Supervisor mod=
e. For
>>>>>> the ARM Chromebook the default boot procedure doesn't allow us to bo=
ot in
>>>>>> hypervisor mode. Although the laptop's boot mechanism is based on th=
e
>>>>>> frequently used u-boot, the binary is located in RO memory. Fortunat=
ely, a
>>>>>> chained u-boot mechanism can be used (i.e. starting another u-boot a=
fter
>>>>>> the original). We can then enter hypervisor mode from our custom ite=
ration
>>>>>> of u-boot and subsequently load our kernel and userspace.
>>>>>>
>>>>>> Checkout the needed u-boot code :
>>>>>>
>>>>>>
>>>>>> $ git clone git://github.com/virtualopensystems/u-boot.git$ cd
>>>>>> u-boot$ ./scripts/build.sh
>>>>>>
>>>>>>
>>>>>> If successful, a message about how to copy the bootloader on the USB
>>>>>> flash disk or SD card will appear. We will use it later when prepari=
ng the
>>>>>> boot medium to start our system. If you have followed the Setting up=
 the
>>>>>> boot medium chapter and you have a prepared boot device, then you ca=
n
>>>>>> update u-boot by running :
>>>>>>
>>>>>>
>>>>>> $ sudo dd if=3Dnv_uboot-snow.kpart of=3D/dev/sdX1
>>>>>>
>>>>>>
>>>>>>
>>>>>> so,the needed u-boot that we must use should be installed on the
>>>>>> first partition of the sd card.
>>>>>>
>>>>>> There is another relevant section to read :
>>>>>>
>>>>>>
>>>>>> Setting up the boot medium
>>>>>>
>>>>>> Now it is time to copy all the relevant files that we created in the
>>>>>> previous chapters,and use them to boot Chromebook with a different k=
ernel
>>>>>> and OS. In all these examples the device /dev/sdX is used. Take extr=
a care
>>>>>> to change the examples to the device that you have attached. Insert =
the
>>>>>> boot medium on your workstation and carefully execute the following =
step.
>>>>>> First we need to properly format the boot medium.
>>>>>>
>>>>>> In the uboot source directory :
>>>>>>
>>>>>>
>>>>>> $ sudo ./scripts/sdcard.sh /dev/sdX
>>>>>>
>>>>>>
>>>>>> This will erase all data and create 4 partitions in the medium, alon=
g
>>>>>> with copying the u-boot binary to the first partition:
>>>>>>
>>>>>>
>>>>>> Partition 1 =3D ChromeOS signed binary (V.O.S chained u-boot)
>>>>>> Partition 2 =3D not used
>>>>>> Partition 3 =3D EXT2 partition for u-boot files (uImage and
>>>>>> exynos5250-snow.dtb)
>>>>>> Partition 4 =3D EXT4 partition for userspace files
>>>>>>
>>>>>>
>>>>>> With u-boot being copied, next is the kernel image and DTB file. Fro=
m
>>>>>> the kernel source execute :
>>>>>>
>>>>>>
>>>>>> $ mkdir ../mnt/
>>>>>> $ sudo mount /dev/sdX3 ../mnt/
>>>>>> $ sudo cp arch/arm/boot/uImage ../mnt/
>>>>>> $ sudo cp arch/arm/boot/dts/exynos5250-snow.dtb ../mnt/
>>>>>> $ sudo umount /dev/sdX3
>>>>>>
>>>>>>
>>>>>> Finally, we have to copy the Ubuntu userspace filesystem that we
>>>>>> created earlier:
>>>>>>
>>>>>>
>>>>>> $ sudo mount /dev/sdX4 mnt/$ sudo cp -a ./precise/* mnt/$ sudo umoun=
t
>>>>>> /dev/sdX4
>>>>>>
>>>>>>
>>>>>>
>>>>>> Now,my idea is to chainload the already chain loaded u-boot created
>>>>>> by V.O.S to the new u-boot that we need for booting FreeBSD and that=
 can be
>>>>>> installed in the partition n.2,as shown in this scheme,because it is=
 not
>>>>>> used :
>>>>>>
>>>>>>
>>>>>> Partition 1 =3D ChromeOS signed binary (V.O.S chained u-boot)
>>>>>> Partition 2 =3D not used (maybe 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 (uImage and
>>>>>> exynos5250-snow.dtb)
>>>>>> Partition 4 =3D EXT4 partition for userspace files
>>>>>>
>>>>>>
>>>>>> Take in consideration that default boot string is hardcoded here,in
>>>>>> the snow.h file of the custom u-boot created by VOS :
>>>>>>
>>>>>>
>>>>>>
>>>>>> https://github.com/virtualopensyste...18a39b6c177dff58a/include/conf=
igs/snow.h#L101
>>>>>> <https://github.com/virtualopensystems/u-boot/blob/eecfeb578e296ef3b=
739ac918a39b6c177dff58a/include/configs/snow.h#L101>
>>>>>>
>>>>>>
>>>>>> and it needs to be recompiled because it should point to the
>>>>>> partition n.2,where I will install the u-boot files as explained her=
e :
>>>>>>
>>>>>>
>>>>>> https://wiki.freebsd.org/arm/Chromebook
>>>>>>
>>>>>>
>>>>>> I have some questions to ask before I start working on this.
>>>>>>
>>>>>> 1) The xen developer said :
>>>>>>
>>>>>>
>>>>>> You should be able to build U-Boot and use the U-Boot binary as Xen
>>>>>> guest kernel...
>>>>>>
>>>>>>
>>>>>>
>>>>>> where is the u-boot binary,according to this document ?
>>>>>>
>>>>>> https://wiki.freebsd.org/arm/Chromebook
>>>>>>
>>>>>> I don't see it.
>>>>>>
>>>>>>
>>>>>> 2) where is the source code of the file that I can get here :
>>>>>>
>>>>>>
>>>>>> http://commondatastorage.googleapis.com/chromeos-localmirror/distfil=
es/nv_uboot-snow-simplefb.kpart.bz2
>>>>>>
>>>>>> I need the source code if I want to recompile u-boot so that it can
>>>>>> point to the partition 4.
>>>>>>
>>>>>> Maybe it can be found on this link :
>>>>>>
>>>>>> http://linux-exynos.org/dist/chromebook/nv_uboot/
>>>>>>
>>>>>> but it can't be opened....
>>>>>>
>>>>>>
>>>>>> 3) in this specific scenario 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 powered by a Samsung Exynos 5250 (ARMv7 32 bit Corte=
x A15)
>>>>>> Soc.
>>>>>>
>>>>>>
>>>>>> 4) I'm not sure if I can chainload the customized u-boot created by
>>>>>> V.O.S that should be installed on the first partition with the u-boo=
t
>>>>>> tailored for booting FreeBSD that should be installed on the partiti=
on
>>>>>> 2....
>>>>>>
>>>>>>
>>>>>> 5) the xen developer said that u-boot should be compiled enabling
>>>>>> this option :
>>>>>>
>>>>>>
>>>>>> Code:
>>>>>>
>>>>>> CONFIG_CMO_BY_VA_ONLY=3Dy
>>>>>>
>>>>>>
>>>>>>
>>>>>> Well,can you provide some good source that can help me to understand
>>>>>> how I can recompile u-boot for FreeBSD ? thanks.
>>>>>>
>>>>>> --
>>>>>> Mario.
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> Mario.
>>>>>
>>>>>
>>>>
>>>> --
>>>> Mario.
>>>>
>>>
>>>
>>> --
>>> Mario.
>>>
>>
>>
>> --
>> Mario.
>>
>

--=20
Mario.

--0000000000000f32f8060cf520da
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr">---&gt; Mario, you can not edit .config b=
y hand. You have to consider these options in some _defconfig and then reco=
nfigure / recompile</div><div><br></div><div>ok. I did as you have suggeste=
d,but I&#39;ve got the same exact error. I&#39;ve added the parameter &quot=
;CONFIG_ARMV7_NONSEC=3Dn&quot; inside the file snow_defconfig and then :</d=
iv><div><br></div><div><span style=3D"font-family:monospace"><span style=3D=
"color:rgb(0,0,0);background-color:rgb(255,255,255)"># ARCH=3Darm CROS</spa=
n>S_COMPILE=3Darm-linux-gnueabihf- make snow_defconfig<br></span></div><div=
><span style=3D"font-family:monospace"><span style=3D"color:rgb(0,0,0);back=
ground-color:rgb(255,255,255)"></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 CROS</span>S_COMPILE=3Darm-linux-gnueabihf- make<br=
></span></div><div><br></div><div>The u-boot.bin file generated has a diffe=
rent size than that generated before,but the error when I try to boot FreeB=
SD is the same.<br></div><div><br></div><div class=3D"gmail_quote"><div dir=
=3D"ltr" class=3D"gmail_attr">On Wed, Dec 20, 2023 at 6:00=E2=80=AFPM Stani=
slav Silnicki &lt;<a href=3D"mailto:stanislav.silnicki@mailgate.us">stanisl=
av.silnicki@mailgate.us</a>&gt; wrote:<br></div><blockquote class=3D"gmail_=
quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,=
204);padding-left:1ex"><div><div dir=3D"auto">Mario, you can not edit .conf=
ig byhand. You have to consider these options in some _defconfig and then r=
econfigure/tecompile<br><br></div>
<div dir=3D"auto">Get <a href=3D"https://bluemail.me" target=3D"_blank">Blu=
eMail for Android</a> </div>
<div class=3D"gmail_quote">On Dec 19, 2023, at 5:29 PM, Mario Marietto &lt;=
<a href=3D"mailto:marietto2008@gmail.com" target=3D"_blank">marietto2008@gm=
ail.com</a>&gt; wrote:<blockquote class=3D"gmail_quote" style=3D"margin:0pt=
 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir=3D"ltr">
 <div dir=3D"ltr">
  <div>
   Hello to everyone.
  </div>
  <div>
   <br>
  </div>
  <div>
   I have compiled the needed u-boot.bin from scratch using this procedure =
:
  </div>
  <div>
   <br>
  </div>
  <div>
   <span style=3D"font-family:monospace"><span style=3D"color:rgb(0,0,0);ba=
ckground-color:rgb(255,255,255)"># git clone <a href=3D"https://github.com/=
u-boot/u-boot.git" target=3D"_blank">https://github.com/u-boot/u-boot.git</=
a></span></span>
  </div>
  <div>
   <span style=3D"font-family:monospace"><span style=3D"color:rgb(0,0,0);ba=
ckground-color:rgb(255,255,255)"># cd u-boot<br></span></span>
  </div>
  <div>
   <span style=3D"font-family:monospace"><span style=3D"color:rgb(0,0,0);ba=
ckground-color:rgb(255,255,255)"># ARCH=3Darm CROSS_COMPILE=3Darm-linux-gnu=
eabihf- make </span>snow_defconfig : this line generates the file .config<b=
r></span>
  </div>
  <div>
   <span style=3D"font-family:monospace"><span style=3D"color:rgb(0,0,0);ba=
ckground-color:rgb(255,255,255)"># nano .config and I&#39;ve added these pa=
rameters :<br></span></span>
  </div>
  <div>
   <br>
  </div>
  <div>
   CONFIG_ARMV7_NONSEC=3Dn
   <br>
   CONFIG_EFI_GRUB_ARM32_WORKAROUND=3Dy
  </div>
  <div>
   <div>
    <span style=3D"font-family:monospace"><span style=3D"color:rgb(0,0,0);b=
ackground-color:rgb(255,255,255)"> </span></span>
   </div>
  </div>
  <br>
  <div>
   <span style=3D"font-family:monospace"><span style=3D"color:rgb(0,0,0);ba=
ckground-color:rgb(255,255,255)">the uboot-bin file is generated with this =
command :</span></span>
  </div>
  <div>
   <span style=3D"font-family:monospace"><span style=3D"color:rgb(0,0,0);ba=
ckground-color:rgb(255,255,255)"><br></span></span>
  </div>
  <div>
   <span style=3D"font-family:monospace"><span style=3D"color:rgb(0,0,0);ba=
ckground-color:rgb(255,255,255)"># ARCH=3Darm CROSS_COMPILE=3Darm-linux-gnu=
eabihf- make</span><br></span>
  </div>
  <div>
   <br>
  </div>
  <div>
   At this point,I took a look inside the .config file and I saw that the p=
arameter &quot;CONFIG_ARMV7_NONSEC=3Dn&quot; has been removed. So,for some =
reason,it is not accepted and this could be a problem....
   <br>
  </div>
  <div>
   <br>
  </div>
  <div>
   These are the xen config files that I&#39;ve used :
   <br>
  </div>
  <div>
   <br>
  </div>
  <div>
   nano freebsd.cfg
   <br>
  </div>
  <div>
   <br>
  </div>
  <div>
   <span style=3D"font-family:monospace"><span style=3D"color:rgb(0,0,0);ba=
ckground-color:rgb(255,255,255)">name=3D&quot;test&quot; </span><br>
    kernel=3D&quot;u-boot.bin&quot; <br><span>extra =3D &quot;console=3Dhvc=
0&quot; <br>
     memory=3D256 <br>
     vcpus=3D1 <br></span>disk =3D [ &#39;FreeBSD-13.2-RELEASE-armv7.img,ra=
w,xvda&#39; ]<br></span>
  </div>
  <div>
   <span style=3D"font-family:monospace"><br></span>
  </div>
  <div>
   <span style=3D"font-family:monospace">nano start-freebsd <br></span>
  </div><span>
   <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);b=
ackground-color:rgb(255,255,255)">xl create freebsd.cfg </span><br>
     xl console freebsd<br></span>
   </div>
   <div>
    <span style=3D"font-family:monospace"><br></span>
   </div></span>
  <div>
   <span style=3D"font-family:monospace">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);ba=
ckground-color:rgb(255,255,255)"># ./start-freebsd</span></span>
  </div>
  <div>
   <span style=3D"font-family:monospace"><span><span style=3D"color:rgb(0,0=
,0);background-color:rgb(255,255,255)">=C2=A0</span><br>
     Parsing config from freebsd.cfg <br>
     xc: error: panic: xg_dom_core.c:689: xc_dom_find_loader: no loader fou=
nd: Invalid kernel <br>
     libxl: error: libxl_dom.c:571:libxl__build_dom: xc_dom_parse_image fai=
led <br></span>libxl: error: libxl_create.c:1640:domcreate_rebuild_done: Do=
main 1:cannot (re-)build domain: -3 <br>
    libxl: error: libxl_domain.c:1183:libxl__destroy_domid: Domain 1:Non-ex=
istent domain <br>
    libxl: error: libxl_domain.c:1137:domain_destroy_callback: Domain 1:Una=
ble to destroy guest <br>
    libxl: error: libxl_domain.c:1064:domain_destroy_cb: Domain 1:Destructi=
on of domain failed <br><span>freebsd is an invalid domain identifier (rc=
=3D-6)<br></span></span>
  </div>
 </div>
 <div>
  <div>
   <div id=3D"m_-3233212502647317945gmail-q_364">
    <div>
     <br>
    </div>
   </div>
  </div>
 </div>
</div>
<br>
<div class=3D"gmail_quote">
 <div dir=3D"ltr" class=3D"gmail_attr">
  On Mon, Dec 18, 2023 at 12:39=E2=80=AFPM Mario Marietto &lt;<a href=3D"ma=
ilto:marietto2008@gmail.com" target=3D"_blank">marietto2008@gmail.com</a>&g=
t; wrote:
  <br>
 </div>
 <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border=
-left:1px solid rgb(204,204,204);padding-left:1ex">
  <div dir=3D"ltr">
   So,ok,I should have said &quot;the second u-boot&quot; ; since the first=
 u-boot binary is the &quot;u-boot binary located in the RO memory&quot; of=
 the Chromebook&quot;. Sorry for the confusion.
   <br>
  </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 Marietto &lt;<a href=3D"=
mailto:marietto2008@gmail.com" target=3D"_blank">marietto2008@gmail.com</a>=
&gt; wrote:
    <br>
   </div>
   <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;bord=
er-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=20
      <br>
     </div>
     <div>
      <br>
     </div>
     <div>
      This is an important factor. So,what about if,instead of compiling a =
new version of u-boot on the partition 2,I will recompile the u-boot custom=
ized version created by the virtual open system in 2014,that should be inst=
alled on the first partition ? It could work if there are no differences be=
tween the u-boot that should boot Linux and the u-boot that should boot Fre=
eBSD.
     </div>
     <div>
      <br>
     </div>
     <div>
      Can you give a look at the u-boot source code created by virtual open=
 systems ? You can find it on my google drive :
      <br>
     </div>
     <div>
      <br>
     </div>
     <div>
      <a href=3D"https://drive.google.com/file/d/1eAaZMfd6CU0xiqQfH7sq5wGVz=
zO09BRm/view?usp=3Dsharing" target=3D"_blank">https://drive.google.com/file=
/d/1eAaZMfd6CU0xiqQfH7sq5wGVzzO09BRm/view?usp=3Dsharing</a>
     </div>
     <div>
      <br>
     </div>
     <div>
      I need to understand if I can recompile it without problem so that it=
 can satisfy my needs (the ability of the file u-boot.bin to boot FreeBSD a=
s domU under Xen,as explained by Stefano Stabellini,the xen developer that =
suggested to me what I could do to have FreeBSD virtualized under Xen on my=
 Arm Chromebook) ; otherwise the risk is to find later problems that will m=
ake me troubles and that I will not able to fix.=20
      <br>
     </div>
     <div>
      <br>
     </div>
     <div>
      I gave a look at the virtual open system u-boot and I didn&#39;t see =
any <span>arndale_defconfig inside. So,If I have understood correctly,I sho=
uld put that file inside the root of the u-boot source code,let&#39;s say h=
ere :</span>
     </div>
     <div>
      <b><br></b>
     </div>
     <div>
      <font style=3D"font-family:arial,sans-serif" size=3D"2"><span style=
=3D"color:rgb(0,0,0);background-color:rgb(255,255,255)">marietto:/home/mari=
etto/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);background-color:rgb(255,255,255)">=C2=A0</span><br>
       .checkpatch.conf =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0README =
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0doc =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0net <br>
       .git =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0api =C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0drivers =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0onenand_ipl <br>
       .gitignore =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0arch =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0dts =C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0post <br>
       COPYING =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0board =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
examples =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0<a href=3D"http://rules.mk" target=3D"_blank">rules=
.mk</a> <br>
       CREDITS =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0boards.cfg =C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0fs =C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0scripts <br>
       MAINTAINERS =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0common =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0include =C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0snapshot.commit <br>
       MAKEALL =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0<a href=3D"http://config.mk" target=3D"=
_blank">config.mk</a> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0lib =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0spl <br>
       Makefile =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0cros =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0mkconfig =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0test <br>
       PRESUBMIT.cfg =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0disk =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0nand_spl =C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
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">and I should =
do : make and make install ? and the file I need,u-boot.bin will be generat=
ed ?=C2=A0</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&#39;t =
find any pre made configuration file inside :<br></font>
     </div>
     <div>
      <span style=3D"color:rgb(0,0,0);background-color:rgb(255,255,255);fon=
t-family:arial,sans-serif"><br></span>
     </div>
     <div>
      <span style=3D"color:rgb(0,0,0);background-color:rgb(255,255,255);fon=
t-family:arial,sans-serif">u-boot-vos # find . -type f -name &quot;exynos*<=
/span><span style=3D"font-family:arial,sans-serif">&quot;=C2=A0</span>
     </div>
     <div>
      <span style=3D"font-family:arial,sans-serif"><br></span>
     </div>
     <div>
      <span style=3D"font-family:arial,sans-serif">./include/exynos-fb.h <b=
r>
       ./include/configs/exynos5-common.h <br>
       ./doc/device-tree-bindings/spi/exynos-spi.txt <br>
       ./doc/device-tree-bindings/usb/exynos-usb.txt <br>
       ./drivers/power/exynos-tmu.c <br>
       ./drivers/power/exynos-cpufreq.c <br>
       ./drivers/video/exynos-fb.c <br>
       ./drivers/spi/exynos_spi.c <br>
       ./board/samsung/dts/exynos5250-spring.dts <br>
       ./board/samsung/dts/exynos5250-smdk5250.dts <br>
       ./board/samsung/dts/exynos5250-snow.dts <br>
       ./board/samsung/dts/exynos5250-daisy.dts <br>
       ./arch/arm/include/asm/arch-exynos5/exynos-cpufreq.h <br>
       ./arch/arm/include/asm/arch-exynos5/exynos-tmu.h <br>
       ./arch/arm/dts/exynos5250.dtsi <br>
       ./arch/arm/dts/exynos-periph-id.dtsi <br>
       ./arch/arm/cpu/armv7/exynos5/exynos_cache.c=C2=A0</span>
     </div>
     <div>
      <span style=3D"font-family:arial,sans-serif"><br></span>
     </div>
     <div>
      <span style=3D"font-family:arial,sans-serif">u-boot-vos # find . -typ=
e f -name &quot;arndale*&quot;</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 ca=
n&#39;t use a newer version of u-boot because otherwise the patches needed =
to bypass the bootloader protections of the Arm Chromebook (such as a lot o=
f different patches needed to boot correctly Linux) will be broken ; anyway=
,since it works,I don&#39;t need to use an updated version of u-boot.</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_-3233212502647317945m_-6449202736562147260m=
_-2747878036369583702m_-2225904292843896452tmjah_g_1299">
       ----&gt; As per my experience, you have to respect these two options=
, compiling u-boot for FreeBSD:=C2=A0<a href=3D"https://github.com/freebsd/=
freebsd-ports/blob/main/sysutils/u-boot-master/files/FreeBSD_Fragment" targ=
et=3D"_blank">https://github.com/freebsd/freebsd-ports/blob/main/sysutils/u=
-boot-master/files/FreeBSD_Fragment</a>
      </div><font style=3D"font-family:arial,sans-serif" size=3D"2"></font>
     </div>
     <div>
      <font size=3D"4"><span style=3D"font-family:monospace"><br></span></f=
ont>
     </div>
     <div>
      <font size=3D"4"><span style=3D"font-family:monospace"></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_WORKAROUND=3Dy<font size=3D"4"><br></font>
     </div>
     <div>
      <font size=3D"4"><br></font>
     </div>
     <div>
      <font size=3D"2">These are the parameters used to configure a Linux k=
ernel. I don&#39;t understand what&#39;s the relation between the compilati=
on of a linux kernel and u-boot. In the past I tried to recompile u-boot,bu=
t I didn&#39;t have the need to set up those parameters,so I don&#39;t know=
 how to do it (but I know how to recompile a Linux kernel).</font>
      <div dir=3D"auto" id=3D"m_-3233212502647317945m_-6449202736562147260m=
_-2747878036369583702m_-962663937491960362tmjah_g_1299">
       <br>
      </div>
      <div dir=3D"auto">
       <br>
      </div>
      <div dir=3D"auto">
       ---&gt; I&#39;m not sure that I&#39;m getting you right, as I don&#3=
9;t understand what you mean under &quot;the first u-boot&quot;.
       <p></p>
       <p><br></p>
       <p>I&#39;m talking about first u-boot because the whole procedure to=
 boot Linux on the ARM Chromebook,that&#39;s explained here :<br></p>
       <p><a href=3D"http://www.virtualopensystems.com/en/solutions/guides/=
kvm-on-chromebook/" target=3D"_blank">http://www.virtualopensystems.com/en/=
solutions/guides/kvm-on-chromebook/</a></p>
       <p><br></p>
       <p>at some point they say :</p>
       <p><br></p>
       <p>To be able to run KVM on ARM platforms, the kernel has to be boot=
ed in hypervisor mode. Because of this relatively recent requirement (due t=
o the introduction of the virtualization extensions), up until now all boot=
ing methods would boot the kernel in the standard Supervisor mode.</p>
       <p>For the ARM Chromebook the default boot procedure doesn&#39;t all=
ow us to boot in hypervisor mode. Although the laptop&#39;s boot mechanism =
is based on the frequently used u-boot, the binary is located in RO memory.=
 Fortunately, a chained u-boot mechanism can be used (i.e. starting another=
 u-boot after the original). We can then enter hypervisor mode from our cus=
tom iteration of u-boot and subsequently load our kernel and userspace.</p>
       <p>So,the first u-boot is the u-boot provided by virtual open system=
s,that&#39;s able to chainload the &quot;u-boot binary located in RO memory=
&quot; , that does not boot Chrome OS in hypervisor mode. We don&#39;t need=
 it if we want to boot Linux with kvm or xen enabled.</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 hre=
f=3D"mailto:stanislav.silnicki@mailgate.us" target=3D"_blank">stanislav.sil=
nicki@mailgate.us</a>&gt; wrote:
      <br>
     </div>
     <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;bo=
rder-left:1px solid rgb(204,204,204);padding-left:1ex">
      <div>
       <div>
        <div id=3D"m_-3233212502647317945m_-6449202736562147260m_-274787803=
6369583702m_-5077711917547611557m_-962663937491960362compose-body-wrapper" =
dir=3D"auto">
         <div dir=3D"auto">
          I&#39;m not an expert in the topic, I only know, that ARM has div=
ided hardware into two worlds - Secure and Not-So, strictly limiting any so=
ftware, running in non-secure world with access to functions and resources.=
=C2=A0<a href=3D"https://developer.arm.com/documentation/den0013/d/Security=
/TrustZone-hardware-architecture?lang=3Den" target=3D"_blank">https://devel=
oper.arm.com/documentation/den0013/d/Security/TrustZone-hardware-architectu=
re?lang=3Den</a>
         </div>
         <div dir=3D"auto" id=3D"m_-3233212502647317945m_-64492027365621472=
60m_-2747878036369583702m_-5077711917547611557m_-962663937491960362tmjah_g_=
1299">
          <br>
         </div>
         <div dir=3D"auto" id=3D"m_-3233212502647317945m_-64492027365621472=
60m_-2747878036369583702m_-5077711917547611557m_-962663937491960362tmjah_g_=
1299">
          I&#39;m not sure, that I&#39;m getting you right, as I don&#39;t =
understand what you mean under &quot;the first u-boot&quot;.
         </div>
         <div dir=3D"auto" id=3D"m_-3233212502647317945m_-64492027365621472=
60m_-2747878036369583702m_-5077711917547611557m_-962663937491960362tmjah_g_=
1299">
          <br>
         </div>
         <div dir=3D"auto" id=3D"m_-3233212502647317945m_-64492027365621472=
60m_-2747878036369583702m_-5077711917547611557m_-962663937491960362tmjah_g_=
1299">
          As I understand, virtualization (HYP) is running in non-secure wo=
rld (<a href=3D"https://developer.arm.com/documentation/ddi0406/c/System-Le=
vel-Architecture/The-System-Level-Programmers--Model/The-Virtualization-Ext=
ensions" target=3D"_blank">https://developer.arm.com/documentation/ddi0406/=
c/System-Level-Architecture/The-System-Level-Programmers--Model/The-Virtual=
ization-Extensions</a>), so my guess (only guess!!!), virtualization softwa=
re has to prepare (configure) HW platform in the way, that FreeBSD kernel w=
ill not lack any resources, required to configure MPU, VA, etc.
         </div>
         <div dir=3D"auto" id=3D"m_-3233212502647317945m_-64492027365621472=
60m_-2747878036369583702m_-5077711917547611557m_-962663937491960362tmjah_g_=
1299">
          So, if you lucky to boot virtualizer, which is aware of target OS=
, that maybe you can boot the kernel. Although, I doubt, that you need to b=
oot &#39;second&#39; u-boot to boot the kernel - there is simply ubldr, whi=
ch you can hook somehow from virtualizer....
         </div>
         <div dir=3D"auto" id=3D"m_-3233212502647317945m_-64492027365621472=
60m_-2747878036369583702m_-5077711917547611557m_-962663937491960362tmjah_g_=
1299">
          <br>
         </div>
         <div dir=3D"auto" id=3D"m_-3233212502647317945m_-64492027365621472=
60m_-2747878036369583702m_-5077711917547611557m_-962663937491960362tmjah_g_=
1299">
          Stan
         </div>
         <div dir=3D"auto" id=3D"m_-3233212502647317945m_-64492027365621472=
60m_-2747878036369583702m_-5077711917547611557m_-962663937491960362tmjah_g_=
1299">
          <br>
         </div>
         <div dir=3D"auto" id=3D"m_-3233212502647317945m_-64492027365621472=
60m_-2747878036369583702m_-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.8ex;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 sec=
ure mode during boot and passes control to ubldr, which boots FreeBSD kerne=
l, in that mode.
           </div>
           <div>
            <br>
           </div>
           <div>
            Can you elaborate your sentence more ? I know that the bootload=
er secure mode is bypassed by the virtual open systems u-boot. Are you sayi=
ng that when the control passes to the second u-boot,it will happen in secu=
re mode,so that the bypass that happened loading the first u-boot,is annull=
ed ? 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-b=
oot.bin that the xen developer talked about ? thanks bro&#39;.
           </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.silnicki@mailgate.us" target=3D"_blank">stanis=
lav.silnicki@mailgate.us</a>&gt; wrote:
            <br>
           </div>
           <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.=
8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
            <div>
             <div>
              <div>
               <div id=3D"m_-3233212502647317945m_-6449202736562147260m_-27=
47878036369583702m_-5077711917547611557m_-962663937491960362m_5085590471051=
268986compose-body-wrapper" dir=3D"auto">
                <div dir=3D"auto">
                 Hi Mario,
                </div>
                <div dir=3D"auto">
                 <br>
                </div>
                <div dir=3D"auto">
                 U-Boot=C2=A0 beast is hiding in this den: <a href=3D"https=
://source.denx.de/u-boot/u-boot.git" target=3D"_blank">https://source.denx.=
de/u-boot/u-boot.git</a>
                </div>
                <div dir=3D"auto">
                 I took a brief look at your post and it seems to me, that =
option=C2=A0<span style=3D"font-family:SFMono-Regular,Menlo,Monaco,Consolas=
,&quot;Liberation Mono&quot;,&quot;Courier New&quot;,monospace;font-size:in=
herit">CONFIG_CMO_BY_VA_ONLY</span>=C2=A0is irrelevant to your target armv7=
 32 bit platform:=C2=A0<a href=3D"https://source.denx.de/u-boot/u-boot/-/bl=
ob/master/arch/arm/cpu/armv8/Kconfig?ref_type=3Dheads#L3" target=3D"_blank"=
>https://source.denx.de/u-boot/u-boot/-/blob/master/arch/arm/cpu/armv8/Kcon=
fig?ref_type=3Dheads#L3</a>
                </div>
                <div dir=3D"auto" id=3D"m_-3233212502647317945m_-6449202736=
562147260m_-2747878036369583702m_-5077711917547611557m_-962663937491960362m=
_5085590471051268986tmjah_g_1299">
                 <br>
                </div>
                <div dir=3D"auto" id=3D"m_-3233212502647317945m_-6449202736=
562147260m_-2747878036369583702m_-5077711917547611557m_-962663937491960362m=
_5085590471051268986tmjah_g_1299">
                 As for compiling the u-boot, it is a doable task, given th=
at you understand what you are doing. There are no specific options in u-bo=
ot devoted to FreeBSD. It is a boot loader, whose mission to make basic har=
dware initialization, read you kernel file from some media into RAM and the=
n pass it control.
                </div>
                <div dir=3D"auto" id=3D"m_-3233212502647317945m_-6449202736=
562147260m_-2747878036369583702m_-5077711917547611557m_-962663937491960362m=
_5085590471051268986tmjah_g_1299">
                 <br>
                </div>
                <div dir=3D"auto" id=3D"m_-3233212502647317945m_-6449202736=
562147260m_-2747878036369583702m_-5077711917547611557m_-962663937491960362m=
_5085590471051268986tmjah_g_1299">
                 Basically, you can grab some defconfig, prepared for any o=
ther Exynos5250 based board=C2=A0 (say, this one: <a href=3D"https://source=
.denx.de/u-boot/u-boot/-/blob/master/configs/arndale_defconfig?ref_type=3Dh=
eads)" target=3D"_blank">https://source.denx.de/u-boot/u-boot/-/blob/master=
/configs/arndale_defconfig?ref_type=3Dheads)</a> and adopt it somehow.
                </div>
                <div dir=3D"auto" id=3D"m_-3233212502647317945m_-6449202736=
562147260m_-2747878036369583702m_-5077711917547611557m_-962663937491960362m=
_5085590471051268986tmjah_g_1299">
                 <br>
                </div>
                <div dir=3D"auto" id=3D"m_-3233212502647317945m_-6449202736=
562147260m_-2747878036369583702m_-5077711917547611557m_-962663937491960362m=
_5085590471051268986tmjah_g_1299">
                 As per my experience, you have to respect these two option=
s, compiling u-boot for FreeBSD:=C2=A0<a href=3D"https://github.com/freebsd=
/freebsd-ports/blob/main/sysutils/u-boot-master/files/FreeBSD_Fragment" tar=
get=3D"_blank">https://github.com/freebsd/freebsd-ports/blob/main/sysutils/=
u-boot-master/files/FreeBSD_Fragment</a>
                </div>
                <div dir=3D"auto" id=3D"m_-3233212502647317945m_-6449202736=
562147260m_-2747878036369583702m_-5077711917547611557m_-962663937491960362m=
_5085590471051268986tmjah_g_1299">
                 <br>
                </div>
                <div dir=3D"auto" id=3D"m_-3233212502647317945m_-6449202736=
562147260m_-2747878036369583702m_-5077711917547611557m_-962663937491960362m=
_5085590471051268986tmjah_g_1299">
                 As I understand, it makes sure, that u-boot keeps in secur=
e mode during boot and passes control to ubldr, which boots FreBSD kernel, =
in that mode. Otherwise, there a lot of surprises you may realize.
                </div>
                <div dir=3D"auto" id=3D"m_-3233212502647317945m_-6449202736=
562147260m_-2747878036369583702m_-5077711917547611557m_-962663937491960362m=
_5085590471051268986tmjah_g_1299">
                 <br>
                </div>
                <div dir=3D"auto" id=3D"m_-3233212502647317945m_-6449202736=
562147260m_-2747878036369583702m_-5077711917547611557m_-962663937491960362m=
_5085590471051268986tmjah_g_1299">
                 Hope, this will help to progress you tasks
                </div>
                <div dir=3D"auto" id=3D"m_-3233212502647317945m_-6449202736=
562147260m_-2747878036369583702m_-5077711917547611557m_-962663937491960362m=
_5085590471051268986tmjah_g_1299">
                 Stan
                </div>
                <div dir=3D"auto" id=3D"m_-3233212502647317945m_-6449202736=
562147260m_-2747878036369583702m_-5077711917547611557m_-962663937491960362m=
_5085590471051268986tmjah_g_1299">
                 <br>
                </div>
               </div>
               <div dir=3D"auto">
                Mario Marietto wrote:
               </div>
               <br>
               <br>
               <div>
                <blockquote type=3D"cite" style=3D"margin:0px 0px 0px 0.8ex=
;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                 <div dir=3D"ltr">
                  <div>
                   <div>
                    <div>
                     <div id=3D"m_-3233212502647317945m_-644920273656214726=
0m_-2747878036369583702m_-5077711917547611557m_-962663937491960362m_5085590=
471051268986gmail-:1fg">
                      <div id=3D"m_-3233212502647317945m_-64492027365621472=
60m_-2747878036369583702m_-5077711917547611557m_-962663937491960362m_508559=
0471051268986gmail-:1ay">
                       <div dir=3D"ltr">
                        Hello.
                        <br>
                        <br>
                         I&#39;m trying to boot FreeBSD for arm32 bit as Do=
mU on my ARM Chromebook. Basically there are two ways to accomplish this ta=
sk :
                        <br>
                        <br>
                         1) to write a patch that allows the FreeBSD kernel=
 to boot as a zImage file. This could be accomplished applying this patch t=
o a specific file that&#39;s on the source code of FreeBSD :
                        <br>
                        <br>
                        <br><a href=3D"https://xenbits.xen.org/gitweb/?p=3D=
people/julieng/freebsd.git;a=3Dblob_plain;f=3Dsys/arm/conf/XENVIRT;h=3Dff64=
33392e6fc2d5fa7c1ad1f7c40155003af9a8;hb=3D0782e25d98cc1391472717035f986c979=
edef0c9" rel=3D"nofollow ugc noopener" target=3D"_blank">https://xenbits.xe=
n.org/gitweb/?p=3Dp...8;hb=3D0782e25d98cc1391472717035f986c979edef0c9</a>
                        <br>
                        <br>
                        <br>
                         This patch was written by Julien Grall a lot of ti=
me ago and now it does not work anymore. This is the reason :
                        <br>
                        <br>
                        <br>
                        <blockquote>
                         <div>
                          <div>
                           It appears FreeBSD-CURRENT removed the last step=
 converting the kernel file to kernel.bin. The patch can be readily rebased=
, but without kernel.bin that doesn&#39;t do too much.
                          </div>
                         </div>
                        </blockquote>
                        <br>
                        <br>
                         So,without a rebase of that patch the first option=
 is not applicable. And I&#39;m not able to fix it.
                        <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 Julien&#39;s=
 patch works so that you could be the one to re-do something similar or fix=
 the patch on the FreeBSD kernel that you are working with. I am happy to h=
elp review and write patches but I don&#39;t work with the FreeBSD kernel s=
o I wouldn&#39;t be able to help you quickly. However, I might have a sugge=
stion. Do you know if FreeBSD can be booted by U-Boot ? Because U-Boot defi=
nitely boots as Xen on ARM guest firmware/bootloader. You should be able to=
 build U-Boot and use the U-Boot binary as Xen guest kernel, then U-Boot co=
uld load FreeBSD from disk or network and start it. For instance as domU co=
nfig file:
                           <br>
                           <br>
                            kernel=3D&quot;/home/petalinux/u-boot.bin&quot;
                           <br>
                            disk =3D [ &#39;/home/petalinux/test.img,raw,xv=
da&#39; ]
                           <br>
                           <br>
                            I know it is important to build u-boot with the=
 following config to make it work on Xen.
                           <br>
                           <br>
                            CONFIG_CMO_BY_VA_ONLY=3Dy
                          </div>
                         </div>
                        </blockquote>
                        <br>
                        <br>
                         This option seems more doable to me according to m=
y knowledge. But I need to understand how to do it.
                        <br>
                        <br>
                         Well,let&#39;s say that on the ARM Chromebook I&#3=
9;m forced to use and install a customized version of u-boot,created by vir=
tual open systems,because it is the only one that allows bypassing its boot=
loader protection. You can find more information here :
                        <br>
                        <br><a href=3D"http://www.virtualopensystems.com/en=
/solutions/guides/kvm-on-chromebook/?vos=3Dtech" rel=3D"nofollow ugc noopen=
er" target=3D"_blank">http://www.virtualopensystems.com/en/solutions/guides=
/kvm-on-chromebook/?vos=3Dtech</a>
                        <br>
                        <br>
                         This is the relevant section to read :
                        <br>
                        <br>
                        <br>
                        <blockquote>
                         <div>
                          <div>
                           Bootloader :
                           <br>
                           <br>
                            If you wish to skip this chapter you can downlo=
ad a pre-compiled binary of the bootloader:
                           <br>
                           <br>
                           <br>
                            $ wget <a href=3D"http://www.virtualopensystems=
.com/downloads/guides/kvm_on_chromebook/nv_u-boot-snow.kpart" rel=3D"nofoll=
ow ugc noopener" target=3D"_blank">http://www.virtualopensystems.com/downlo=
ads/guides/kvm_on_chromebook/nv_u-boot-snow.kpart</a>
                           <br>
                           <br>
                           <br>
                            To be able to run KVM on ARM platforms, the ker=
nel has to be booted in hypervisor mode. Because of this relatively recent =
requirement (due to the introduction of the virtualization extensions), up =
until now all booting methods would boot the kernel in the standard Supervi=
sor mode. For the ARM Chromebook the default boot procedure doesn&#39;t all=
ow us to boot in hypervisor mode. Although the laptop&#39;s boot mechanism =
is based on the frequently used u-boot, the binary is located in RO memory.=
 Fortunately, a chained u-boot mechanism can be used (i.e. starting another=
 u-boot after the original). We can then enter hypervisor mode from our cus=
tom iteration of u-boot and subsequently load our kernel and userspace.
                           <br>
                           <br>
                            Checkout the needed u-boot code :
                           <br>
                           <br>
                           <br>
                            $ git clone git://<a href=3D"http://github.com/=
virtualopensystems/u-boot.git$" rel=3D"nofollow ugc   noopener" target=3D"_=
blank">github.com/virtualopensystems/u-boot.git$</a> cd u-boot$ ./scripts/b=
uild.sh
                           <br>
                           <br>
                           <br>
                            If successful, a message about how to copy the =
bootloader on the USB flash disk or SD card will appear. We will use it lat=
er when preparing the boot medium to start our system. 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 :
                           <br>
                           <br>
                           <br>
                            $ sudo dd if=3Dnv_uboot-snow.kpart of=3D/dev/sd=
X1
                          </div>
                         </div>
                        </blockquote>
                        <br>
                        <br>
                         so,the needed u-boot that we must use should be in=
stalled on the first partition of the sd card.
                        <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 t=
hat we created in the previous chapters,and use them to boot Chromebook wit=
h a different kernel and OS. In all these examples the device /dev/sdX is u=
sed. Take extra care to change the examples to the device that you have att=
ached. Insert the boot medium on your workstation and carefully execute the=
 following step. First we need to properly format the boot medium.
                           <br>
                           <br>
                            In the uboot source directory :
                           <br>
                           <br>
                           <br>
                            $ sudo ./scripts/sdcard.sh /dev/sdX
                           <br>
                           <br>
                           <br>
                            This will erase all data and create 4 partition=
s in the medium, along with copying the u-boot binary to the first partitio=
n:
                           <br>
                           <br>
                           <br>
                            Partition 1 =3D ChromeOS signed binary (V.O.S c=
hained u-boot)
                           <br>
                            Partition 2 =3D not used
                           <br>
                            Partition 3 =3D EXT2 partition for u-boot files=
 (uImage and exynos5250-snow.dtb)
                           <br>
                            Partition 4 =3D EXT4 partition for userspace fi=
les
                           <br>
                           <br>
                           <br>
                            With u-boot being copied, next is the kernel im=
age and DTB file. From the kernel source execute :
                           <br>
                           <br>
                           <br>
                            $ mkdir ../mnt/
                           <br>
                            $ sudo mount /dev/sdX3 ../mnt/
                           <br>
                            $ sudo cp arch/arm/boot/uImage ../mnt/
                           <br>
                            $ sudo cp arch/arm/boot/dts/exynos5250-snow.dtb=
 ../mnt/
                           <br>
                            $ sudo umount /dev/sdX3
                           <br>
                           <br>
                           <br>
                            Finally, we have to copy the Ubuntu userspace f=
ilesystem that we created earlier:
                           <br>
                           <br>
                           <br>
                            $ sudo mount /dev/sdX4 mnt/$ sudo cp -a ./preci=
se/* mnt/$ sudo umount /dev/sdX4
                          </div>
                         </div>
                        </blockquote>
                        <br>
                        <br>
                         Now,my idea is to chainload the already chain load=
ed u-boot created by V.O.S to the new u-boot that we need for booting FreeB=
SD and that can be installed in the partition n.2,as shown in this scheme,b=
ecause it is not used :
                        <br>
                        <br>
                        <br>
                         Partition 1 =3D ChromeOS signed binary (V.O.S chai=
ned u-boot)
                        <br>
                         Partition 2 =3D not used (maybe we can install the=
 u-boot for arm 32 bit,compatible with FreeBSD on this partition)
                        <br>
                         Partition 3 =3D EXT2 partition for u-boot files (u=
Image and exynos5250-snow.dtb)
                        <br>
                         Partition 4 =3D EXT4 partition for userspace files
                        <br>
                        <br>
                        <br>
                         Take in consideration that default boot string is =
hardcoded here,in the snow.h file of the custom u-boot created by VOS :
                        <br>
                        <br>
                        <br><a href=3D"https://github.com/virtualopensystem=
s/u-boot/blob/eecfeb578e296ef3b739ac918a39b6c177dff58a/include/configs/snow=
.h#L101" rel=3D"nofollow ugc noopener" target=3D"_blank">https://github.com=
/virtualopensyste...18a39b6c177dff58a/include/configs/snow.h#L101</a>
                        <br>
                        <br>
                        <br>
                         and it needs to be recompiled because it should po=
int to the partition n.2,where I will install the u-boot files as explained=
 here :
                        <br>
                        <br>
                        <br><a href=3D"https://wiki.freebsd.org/arm/Chromeb=
ook" rel=3D"nofollow ugc   noopener" target=3D"_blank">https://wiki.freebsd=
.org/arm/Chromebook</a>
                        <br>
                        <br>
                        <br>
                         I have some questions to ask before I start workin=
g on this.
                        <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 guest kernel...
                          </div>
                         </div>
                        </blockquote>
                        <br>
                        <br>
                         where is the u-boot binary,according to this docum=
ent ?
                        <br>
                        <br><a href=3D"https://wiki.freebsd.org/arm/Chromeb=
ook" rel=3D"nofollow ugc   noopener" target=3D"_blank">https://wiki.freebsd=
.org/arm/Chromebook</a>
                        <br>
                        <br>
                         I don&#39;t see it.
                        <br>
                        <br>
                        <br>
                         2) where is the source code of the file that I can=
 get here :
                        <br>
                        <br><a rel=3D"nofollow ugc   noopener">http://commo=
ndatastorage.googleapis.com/chromeos-localmirror/distfiles/nv_uboot-snow-si=
mplefb.kpart.bz2</a>
                        <br>
                        <br>
                         I need the source code if I want to recompile u-bo=
ot so that it can point to the partition 4.
                        <br>
                        <br>
                         Maybe it can be found on this link :
                        <br>
                        <br><a href=3D"http://linux-exynos.org/dist/chromeb=
ook/nv_uboot/" rel=3D"nofollow   ugc noopener" target=3D"_blank">http://lin=
ux-exynos.org/dist/chromebook/nv_uboot/</a>
                        <br>
                        <br>
                         but it can&#39;t be opened....
                        <br>
                        <br>
                        <br>
                         3) in this specific scenario the source code of u-=
boot should run on arm 32 bit,not on arm 64,because I have the Samsung Chro=
mebook &quot;SNOW&quot; model XE303C12,that&#39;s powered by a Samsung Exyn=
os 5250 (ARMv7 32 bit Cortex A15) Soc.
                        <br>
                        <br>
                        <br>
                         4) I&#39;m not sure if I can chainload the customi=
zed u-boot created by V.O.S that should be installed on the first partition=
 with the u-boot tailored for booting FreeBSD that should be installed on t=
he partition 2....
                        <br>
                        <br>
                        <br>
                         5) the xen developer said that u-boot should be co=
mpiled enabling this option :
                        <br>
                        <br>
                        <br>
                        <div>
                         <div>
                          Code:=20
                          <br>
                         </div>
                         <div>
                          <br>
                         </div>
                         <div dir=3D"ltr">
                          <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 hel=
p me to understand how I can recompile u-boot for FreeBSD ? thanks.
                       </div>
                      </div>
                     </div>
                    </div>
                   </div>
                  </div>
                  <div>
                   <div>
                    <div>
                     <div id=3D"m_-3233212502647317945m_-644920273656214726=
0m_-2747878036369583702m_-5077711917547611557m_-962663937491960362m_5085590=
471051268986gmail-:1fh">
                      <table role=3D"presentation">
                       <tbody>
                        <tr>
                         <td><br></td>
                         <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.
                   <br>
                  </div>
                 </div>
                </blockquote>
               </div>
              </div>
             </div>
            </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.
           <br>
          </div>
         </blockquote>
        </div>
       </div>
      </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.
     <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.
   <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.
 <br>
</div></blockquote></div></div></blockquote></div><br clear=3D"all"><br><sp=
an class=3D"gmail_signature_prefix">-- </span><br><div dir=3D"ltr" class=3D=
"gmail_signature">Mario.<br></div></div>

--0000000000000f32f8060cf520da--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2B1FSiicYZ55OTRV7v%2BCS5rc6K7NnFaePHzwHjF4KZPRvkNGdQ>