From nobody Wed Dec 20 16:57:55 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SwKYz11RVz5589C for ; Wed, 20 Dec 2023 17:00:23 +0000 (UTC) (envelope-from stanislav.silnicki@mailgate.us) Received: from mailgate.us (mailgate.us [185.72.246.236]) by mx1.freebsd.org (Postfix) with ESMTP id 4SwKYx4G2xz4q5C for ; Wed, 20 Dec 2023 17:00:21 +0000 (UTC) (envelope-from stanislav.silnicki@mailgate.us) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=mailgate.us header.s=mail header.b=ZTHX6AOm; spf=pass (mx1.freebsd.org: domain of stanislav.silnicki@mailgate.us designates 185.72.246.236 as permitted sender) smtp.mailfrom=stanislav.silnicki@mailgate.us; dmarc=none Received: from [10.43.199.91] (api.telegram.org [192.168.2.1]) by mailgate.us (Postfix) with ESMTPSA id 51FA633930 for ; Wed, 20 Dec 2023 20:00:13 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailgate.us; s=mail; t=1703091614; bh=OrwJ+kYVe7fKSg7eDspQxYsUMXtC6QZ7cN5TSUFxrwQ=; h=In-Reply-To:References:Subject:From:Date:CC; b=ZTHX6AOm9aWRjWSlPu7oaaIoklb1QJL9lNC0E6fB+WN6zIxu9whG+4PVf9X2zQovK LlwtEG58kKqNSeyUvX16o5rpELktRHr0GE2Z5bvZNDxxf5VAtYI1R28CWECpy1NruW CkIUkFIze/I2/ik3atEsQmRhB54ay9RoBV3kjsBE= In-Reply-To: References: <97aa980b9b44.6eb7f9d5c54e7@mailgate.us> X-Referenced-Uid: 71554 Thread-Topic: Re: How to boot FreeBSD for arm 32 bit as DomU with u-boot on my ARM Chromebook User-Agent: Android X-Is-Generated-Message-Id: true List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----VCBWAXETIA7O4UQHSJNV7WPWZ88ZGZ" Content-Transfer-Encoding: 7bit Subject: Re: How to boot FreeBSD for arm 32 bit as DomU with u-boot on my ARM Chromebook From: Stanislav Silnicki Date: Wed, 20 Dec 2023 18:57:55 +0200 CC: freebsd-arm@freebsd.org Message-ID: <54b70672-9ea4-40e2-b346-b579536c0e5c@mailgate.us> X-Spamd-Result: default: False [-0.39 / 15.00]; MISSING_TO(2.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; URI_COUNT_ODD(1.00)[69]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[mailgate.us:s=mail]; R_SPF_ALLOW(-0.20)[+ip4:185.72.246.236/32]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCVD_NO_TLS_LAST(0.10)[]; XM_UA_NO_VERSION(0.01)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_COUNT_ONE(0.00)[1]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; DMARC_NA(0.00)[mailgate.us]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; DKIM_TRACE(0.00)[mailgate.us:+]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; ASN(0.00)[asn:47447, ipnet:185.72.246.0/24, country:DE]; MID_RHS_MATCH_FROM(0.00)[] X-Rspamd-Queue-Id: 4SwKYx4G2xz4q5C X-Spamd-Bar: / ------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 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 >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 > >> 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 >>>>> > >>>>> >>>>> >>>>> 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 >>>>> > >>>>> >>>>> >>>>> 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
Mario, you c= an not edit =2Econfig byhand=2E You have to consider these options in some = _defconfig and then reconfigure/tecompile

<= !-- tmjah_g_1299s -->Get BlueMail for Android=
On Dec 19, 2023, at 5:29 PM, Mario Marietto <marietto2008@gmail=2Ecom> wr= ote:
Hello to everyone=2E

I have compiled the needed u-boot=2Ebin from= scratch using this procedure :

= # cd u-boot
# ARCH=3Darm CROSS_COMPILE=3Darm-linux-gnueabihf- make snow_def= config : this line generates the file =2Econfig
= # nano =2Econfig and I've added these par= ameters :

CO= NFIG_ARMV7_NONSEC=3Dn
CONFIG_EFI_GRUB_ARM32_WORKAROUND=3Dy
=

the uboot-b= in file is generated with this command :
=
# ARCH=3Darm CROSS_COMPILE=3Darm-linux-gnueabihf- m= ake

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
=
These are the xen config files that I've used : =

nano freebsd=2Ecfg =

name=3D"test"
kernel=3D"u-boot=2Ebin"
extra =3D "console=3Dhvc0"
memory=3D256
v= cpus=3D1
disk =3D [ 'FreeBSD-13=2E2-RELEASE-armv7=2Eimg,raw,xvda= ' ]
nano st= art-freebsd

xl create freebsd=2Ecfg
xl console= freebsd

This is what happens when I launch the vm :

= # =2E/start-freebsd
=
 
Parsing config from freebsd=2Ecfg
xc: error: panic: x= g_dom_core=2Ec:689: xc_dom_find_loader: no loader found: Invalid kernel libxl: error: libxl_dom=2Ec:571:libxl__build_dom: xc_dom_parse_image= failed
libxl: error: libxl_create=2Ec:1640:domcreate_rebuild_do= ne: Domain 1:cannot (re-)build domain: -3
libxl: error: libxl_doma= in=2Ec:1183:libxl__destroy_domid: Domain 1:Non-existent domain
lib= xl: error: libxl_domain=2Ec:1137:domain_destroy_callback: Domain 1:Unable t= o destroy guest
libxl: error: libxl_domain=2Ec:1064:domain_destroy= _cb: Domain 1:Destruction of domain failed
fre= ebsd is an invalid domain identifier (rc=3D-6)
=

=

On Mon, Dec 18, 2023 at 12:39=E2=80=AFPM= Mario Marietto <marietto200= 8@gmail=2Ecom> wrote:
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

On Mon, Dec 18, 2023 at 12:35=E2=80=AFPM Mario Mariett= o <mariett= o2008@gmail=2Ecom> wrote:
---= > There are no specific options in u-boot devoted to FreeBSD
=

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

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 :


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

I gave a look at the virtual op= en system u-boot and I didn't see any 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 :
<= strong>
marietto:/home/marietto/Desktop/Files/u-boot_FreeBSD= /u-boot-vos # ls
 
=2Echeckpatch=2Ec= onf        README    &nbs= p;            &= nbsp;doc            =          net
=2Egi= t             &= nbsp;      api      =             &nb= sp;  drivers         &nbs= p;       onenand_ipl
=2Egiti= gnore            &nb= sp; arch           &= nbsp;        dts    =             &nb= sp;    post
COPYING     = ;            bo= ard             = ;      examples      = ;          rules=2Emk
CREDITS  =             &nb= sp;  boards=2Ecfg         = ;     fs        = ;            &n= bsp; scripts
MAINTAINERS      &nb= sp;      common      = ;            in= clude            &nb= sp;    snapshot=2Ecommit
MAKEALL  &nbs= p;            &= nbsp; config=2Emk=             &n= bsp; lib           &= nbsp;         spl
= Makefile            =     cros        &nbs= p;           mkconfi= g             &= nbsp;  test
PRESUBMIT=2Ecfg     &= nbsp;     disk       = ;            &n= bsp;nand_spl           &n= bsp;    tools

=
an= d I should do : make and make install ? and the file I need,u-boot=2Ebin wi= ll be generated ? 

= I didn't fin= d any pre made configuration file inside :

u-boot-vos # find =2E -type f -name "exynos*
=
=
=2E/include/e= xynos-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/dr= ivers/video/exynos-fb=2Ec
=2E/drivers/spi/exynos_spi=2Ec
= =2E/board/samsung/dts/exynos5250-spring=2Edts
=2E/board/s= amsung/dts/exynos5250-smdk5250=2Edts
=2E/board/samsung/dts/exyn= os5250-snow=2Edts
=2E/board/samsung/dts/exynos5250-daisy=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-i= d=2Edtsi
=2E/arch/arm/cpu/armv7/exynos5/exynos_cache=2Ec <= /span>

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 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

= ----> As per my experience, you have to respect these two options,= compiling u-boot for FreeBSD: https://github=2Ecom/freebsd/freebsd-ports/blob/main/sysutil= s/u-boot-master/files/FreeBSD_Fragment

=
It says that I should use= these parameters :

CONFIG_ARMV7_NONSEC=3Dn
CONFIG_EFI_GRUB_ARM32_WORK= AROUND=3Dy

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

=

---> 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

=


I'm talking about first u-boot because the whole = procedure to boot Linux on the ARM Chromebook,that's explained here :

http://www=2Evirtualopensystem= s=2Ecom/en/solutions/guides/kvm-on-chromebook/


=

at some point they say :


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

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

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 <stanisl= av=2Esilnicki@mailgate=2Eus> wrote:
=
=
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 https://developer=2Earm=2Ecom/documentation/den0013/d/Security/Trus= tZone-hardware-architecture?lang=3Den

=
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

As I understand, virtu= alization (HYP) is running in non-secure world (h= ttps://developer=2Earm=2Ecom/documentation/ddi0406/c/System-Level-Architect= ure/The-System-Level-Programmers--Model/The-Virtualization-Extensions),= 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
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

Stan

<= br>

= 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=2E
=

= 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
=

=

= On Sun, Dec 17, 2023 at 12:35=E2=80=AFAM Stanislav Silnicki <= sta= nislav=2Esilnicki@mailgate=2Eus> wrote:
=
=
=
Hi Mario, =

=
U-Boot&nbs= p; beast is hiding in this den: https://source=2Edenx=2Ede/u-boot/u-boot= =2Egit
= 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 bi= t platform: h= ttps://source=2Edenx=2Ede/u-boot/u-boot/-/blob/master/arch/arm/cpu/armv8/Kc= onfig?ref_type=3Dheads#L3
=
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 =

Basically, you can grab some defconfig, = prepared for any other Exynos5250 based board  (say, this one: https://source=2Edenx=2Ede/u= -boot/u-boot/-/blob/master/configs/arndale_defconfig?ref_type=3Dheads) = and adopt it somehow=2E
=
As per my exper= ience, you have to respect these 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 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
=
Hope, = this will help to progress you tasks
=
= Stan
Mario Marietto wrote:
=

=
=
Hell= o=2E

= 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 : =

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=3D0782e25d98cc1= 391472717035f986c979edef0c9
=

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 :
=

= 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 =


= So,without a rebase of that patch the first option is not ap= plicable=2E And I'm not able to fix it=2E
=
2) booting FreeBSD using = U-Boot,as explained to me by a xen developer :
=

=
=
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:
=
kernel=3D"/home/petalinux/u-boot=2Ebin" =
disk =3D [ '/ho= me/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
=
=

Th= is option seems more doable to me according to my knowledge=2E But I need t= o understand how to do it=2E
=
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 : =

http://www=2Evirtualopensystems= =2Ecom/en/solutions/guides/kvm-on-chromebook/?vos=3Dtech =

This i= s the relevant section to read :
=

= Bootloader :
=
If you wish to skip thi= s chapter you can download a pre-compiled binary of the bootloader: =

=
$ wget http://www=2Evirtual= opensystems=2Ecom/downloads/guides/kvm_on_chromebook/nv_u-boot-snow=2Ekpart=

=
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
=
Checkout the needed u-boot = code :

=
$ 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$ cd u-boot$ =2E/scripts/build=2Esh =


= 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 :
=

= $ sudo dd if=3Dnv_uboot-snow=2Ekpart of=3D/dev/sdX1 =
=

so,the needed u-boot that we must use should be = installed on the first partition of the sd card=2E =

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,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
=
In the uboot source dir= ectory :

=
$ sudo =2E/script= s/sdcard=2Esh /dev/sdX
=

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>

= Partition 1 =3D ChromeOS signed binary (V=2EO=2ES chai= ned u-boot)
Par= tition 2 =3D not used
= Partition 3 =3D EXT2 partition for u-boot files (uImage and exynos52= 50-snow=2Edtb)
= Partition 4 =3D EXT4 partition for userspace files =


= With u-boot being copied, next is the kernel 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/uI= mage =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 we created earlier: =


= $ sudo mount /dev/sdX4 mnt/$ sudo cp -a =2E/pre= cise/* mnt/$ sudo umount /dev/sdX4
=
=

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 :=

=
Partition 1 =3D ChromeOS signed binar= y (V=2EO=2ES chained u-boot)
= Partition 2 =3D not used (maybe we can install the u-boot for arm 3= 2 bit,compatible with FreeBSD on this partition) Partition 3 =3D EXT2 partition for u-boot files= (uImage and exynos5250-snow=2Edtb)
= Partition 4 =3D EXT4 partition for userspace files =

Take in consideration that default boot string = is hardcoded here,in the snow=2Eh file of the custom u-boot created by VOS = :

=
https://github=2Ecom/virtualo= pensyste=2E=2E=2E18a39b6c177dff58a/include/configs/snow=2Eh#L101 =

=
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 :

=
https://wiki=2Efr= eebsd=2Eorg/arm/Chromebook
=

I have = some questions to ask before I start working on this=2E =

1) The xen = developer said :

=
=
= You should be able to build U-Boot and use the U-Boot binary as Xen g= uest kernel=2E=2E=2E
=

where is the u-boo= t binary,according to this document ?
=
https://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-loca= lmirror/distfiles/nv_uboot-snow-simplefb=2Ekpart=2Ebz2 =

I need t= he source code if I want to recompile u-boot so that it can point to the pa= rtition 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 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> 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
=

5) the = xen developer said that u-boot should be compiled enabling this option : =

=
= Code:
=
<= br>
CONFIG_CMO_BY_VA_ONLY=
=3Dy
<= /div>

= Well,can you provide some good source that can help me to und= erstand how I can recompile u-boot for FreeBSD ? thanks=2E =
=
=
=
= =

=
=
-- =
= Mario=2E
=
=

--
Mario=2E
=
<= /div>

--
Mario=2E
=

--
Mario= =2E


--
Mario=2E
------VCBWAXETIA7O4UQHSJNV7WPWZ88ZGZ--