Maybe some parameter is wrong inside the snow_defconfig file ? Can you
give a look ?

CONFIG_ARM=y
CONFIG_SKIP_LOWLEVEL_INIT=y
CONFIG_SPL_SKIP_LOWLEVEL_INIT=y
CONFIG_ARCH_CPU_INIT=y
# CONFIG_SPL_USE_ARCH_MEMCPY is not set
# CONFIG_SPL_USE_ARCH_MEMSET is not set
CONFIG_ARCH_EXYNOS=y
CONFIG_TEXT_BASE=0x43E00000
CONFIG_SYS_MALLOC_LEN=0x5004000
CONFIG_SYS_MALLOC_F_LEN=0x400
CONFIG_ARCH_EXYNOS5=y
CONFIG_TARGET_SNOW=y
CONFIG_NR_DRAM_BANKS=8
CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x2050000
CONFIG_SF_DEFAULT_SPEED=50000000
CONFIG_ENV_SIZE=0x4000
CONFIG_ENV_OFFSET=0x3FC000
CONFIG_ENV_SECT_SIZE=0x4000
CONFIG_DEFAULT_DEVICE_TREE="exynos5250-snow"
CONFIG_SPL_TEXT_BASE=0x02023400
CONFIG_SPL=y
CONFIG_DEBUG_UART_BASE=0x12c30000
CONFIG_DEBUG_UART_CLOCK=100000000
CONFIG_IDENT_STRING=" for snow"
CONFIG_SYS_LOAD_ADDR=0x43e00000
CONFIG_DEBUG_UART=y
CONFIG_FIT=y
CONFIG_FIT_BEST_MATCH=y
CONFIG_BOOTSTD_FULL=y
CONFIG_BOOTMETH_CROS=y
CONFIG_DISTRO_DEFAULTS=y
CONFIG_SILENT_CONSOLE=y
CONFIG_BLOBLIST=y
# CONFIG_SPL_BLOBLIST is not set
CONFIG_BLOBLIST_ADDR=0x43d00000
# CONFIG_SPL_FRAMEWORK is not set
CONFIG_SPL_FOOTPRINT_LIMIT=y
CONFIG_SPL_MAX_FOOTPRINT=0x3800
CONFIG_SYS_PROMPT="snow # "
CONFIG_SYS_PBSIZE=1024
CONFIG_CMD_GPIO=y
CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=y
CONFIG_CMD_SPI=y
CONFIG_CMD_USB=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_CACHE=y
CONFIG_CMD_TIME=y
CONFIG_CMD_SOUND=y
CONFIG_CMD_PMIC=y
CONFIG_CMD_REGULATOR=y
CONFIG_CMD_TPM=y
CONFIG_CMD_TPM_TEST=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_SPI_FLASH=y
CONFIG_ENV_SPI_BUS=1
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_I2C_CROS_EC_LDO=y
CONFIG_SYS_I2C_S3C24X0=y
CONFIG_I2C_MUX=y
CONFIG_I2C_ARB_GPIO_CHALLENGE=y
CONFIG_CROS_EC_KEYB=y
CONFIG_CROS_EC=y
CONFIG_CROS_EC_I2C=y
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_MMC_DW=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_S5P=y
CONFIG_MTD=y
CONFIG_SPI_FLASH_GIGADEVICE=y
CONFIG_SPI_FLASH_WINBOND=y
CONFIG_SMC911X=y
CONFIG_DM_PMIC=y
CONFIG_DM_PMIC_MAX77686=y
CONFIG_PMIC_S5M8767=y
CONFIG_PMIC_TPS65090=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_MAX77686=y
CONFIG_REGULATOR_S5M8767=y
CONFIG_REGULATOR_TPS65090=y
CONFIG_DM_PWM=y
CONFIG_PWM_EXYNOS=y
CONFIG_SOUND=y
CONFIG_I2S=y
CONFIG_I2S_SAMSUNG=y
CONFIG_SOUND_MAX98095=y
CONFIG_SOUND_WM8994=y
CONFIG_EXYNOS_SPI=y
CONFIG_TPM_TIS_INFINEON=y
CONFIG_USB=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_HOST_ETHER=y
CONFIG_USB_ETHER_ASIX88179=y
CONFIG_VIDEO=y
# CONFIG_VIDEO_BPP8 is not set
CONFIG_VIDCONSOLE_AS_LCD=y
CONFIG_DISPLAY=y
CONFIG_VIDEO_EXYNOS=y
CONFIG_EXYNOS_DP=y
CONFIG_EXYNOS_FB=y
CONFIG_VIDEO_BRIDGE=y
CONFIG_VIDEO_BRIDGE_PARADE_PS862X=y
CONFIG_VIDEO_BRIDGE_NXP_PTN3460=y
CONFIG_TPM=y
CONFIG_ERRNO_STR=y
CONFIG_UNIT_TEST=y
# CONFIG_UT_LIB_ASN1 is not set

On Thu, Dec 28, 2023 at 11:26 PM Mario Marietto <marietto2...@gmail.com> wrote:
>
> I've just built it with Ubuntu 18.04 / gcc 7.5.0 ; I have my
> u-boot.bin and I tried to see if it worked,but unfortunately it
> doesn't.
>
> root@devuan-bunsen:/mnt/zroot2/zroot2/OS/Chromebook/freebsd-xen/domU-freebsd#
> ./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 failed
> libxl: error: libxl_create.c:1640:domcreate_rebuild_done: Domain
> 1:cannot (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:Destruction of domain failed
> freebsd is an invalid domain identifier (rc=-6)
>
> start-freebsd :
>
> xl create freebsd.cfg
> xl console freebsd
>
> freebsd.cfg :
>
> name="freebsd"
> kernel="/mnt/zroot2/zroot2/OS/Chromebook/freebsd-xen/domU-freebsd/bootloaders/u-boot.bin"
> extra = "console=hvc0"
> memory=512
> vcpus=1
> disk = [ 'FreeBSD-13.2-RELEASE-armv7.img,raw,xvda' ]
>
>
> On Thu, Dec 28, 2023 at 10:54 PM Tony Dinh <mibo...@gmail.com> wrote:
> >
> > On Thu, Dec 28, 2023 at 11:48 AM Simon Glass <s...@chromium.org> wrote:
> > >
> > > Hi Mario,
> > >
> > > On Thu, Dec 28, 2023 at 3:48 PM Mario Marietto <marietto2...@gmail.com> 
> > > wrote:
> > > >
> > > > I tried to compile it,but If failed :
> > > >
> > > > /mnt/zroot2/zroot2/OS/Chromebook/freebsd-xen/domU-freebsd/bootloaders/u-boot-2017.05#
> > > > ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make snow_defconfig
> > > >
> > > >   HOSTCC  scripts/basic/fixdep
> > > >   HOSTCC  scripts/kconfig/conf.o
> > > >   HOSTCC  scripts/kconfig/zconf.tab.o
> > > > In file included from scripts/kconfig/zconf.tab.c:2470:
> > > > In function ‘dep_stack_insert’,
> > > >     inlined from ‘sym_check_print_recursive’ at 
> > > > scripts/kconfig/symbol.c:1123:3,
> > > >     inlined from ‘sym_check_deps’ at scripts/kconfig/symbol.c:1300:3:
> > > > scripts/kconfig/symbol.c:1099:19: warning: storing the address of
> > > > local variable ‘cv_stack’ in ‘check_top’ [-Wdangling-pointer=]
> > > >  1099 |         check_top = stack;
> > > >       |         ~~~~~~~~~~^~~~~~~
> > > > scripts/kconfig/symbol.c: In function ‘sym_check_deps’:
> > > > scripts/kconfig/symbol.c:1120:26: note: ‘cv_stack’ declared here
> > > >  1120 |         struct dep_stack cv_stack;
> > > >       |                          ^~~~~~~~
> > > > scripts/kconfig/symbol.c:1090:4: note: ‘check_top’ declared here
> > > >  1090 | } *check_top;
> > > >       |    ^~~~~~~~~
> > > >   HOSTLD  scripts/kconfig/conf
> > > > #
> > > > # configuration written to .config
> > > > #
> > > >
> > > > /mnt/zroot2/zroot2/OS/Chromebook/freebsd-xen/domU-freebsd/bootloaders/u-boot-2017.05#
> > > > ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make
> > > >
> > > > scripts/kconfig/conf  --silentoldconfig Kconfig
> > > >   CHK     include/config.h
> > > >   CFG     u-boot.cfg
> > > >   GEN     include/autoconf.mk
> > > >   GEN     include/autoconf.mk.dep
> > > >   CFG     spl/u-boot.cfg
> > > >   GEN     spl/include/autoconf.mk
> > > >   CHK     include/config/uboot.release
> > > >   CHK     include/generated/version_autogenerated.h
> > > >   CHK     include/generated/timestamp_autogenerated.h
> > > >   UPD     include/generated/timestamp_autogenerated.h
> > > >   CC      lib/asm-offsets.s
> > > > arm-linux-gnueabihf-gcc: error: unrecognized -march target: armv5
> > > > arm-linux-gnueabihf-gcc: note: valid arguments are: armv4 armv4t
> > > > armv5t armv5te armv5tej armv6 armv6j armv6k armv6z armv6kz armv6zk
> > > > armv6t2 armv6-m armv6s-m armv7 armv7-a armv7ve armv7-r armv7-m
> > > > armv7e-m armv8-a armv8.1-a armv8.2-a armv8.3-a armv8.4-a armv8.5-a
> > > > armv8.6-a armv8-m.base armv8-m.main armv8-r armv8.1-m.main armv9-a
> > > > iwmmxt iwmmxt2; did you mean ‘armv4’?
> > > > arm-linux-gnueabihf-gcc: error: missing argument to ‘-march=’
> > > > make[1]: *** [Kbuild:44: lib/asm-offsets.s] Error 1
> > > > make: *** [Makefile:1287: prepare0] Error 2
> > >
> > > You might need to compile with an old toolchain, e.g. gcc 4?
> >
> > I think Simon is right. I could not rebuild that 2017.05 u-boot with
> > gcc 12 now. So I looked at the old log, and it was built with gcc 6.3.
> >
> >   gcc -Wp,-MD,disk/.part_efi.o.d  -nostdinc -isystem
> > /usr/lib/gcc/arm-linux-gnueabi/6/include -Iinclude
> > -I./arch/arm/include -include ./include/linux/kconfig.h -D__KERNEL__
> > -D__UBOOT__ -Wall -Wstrict-prototypes -Wno-format-security
> > -fno-builtin -ffreestanding -Os -fno-stack-protector
> > -fno-delete-null-pointer-checks -g -fstack-usage
> > -Wno-format-nonliteral -Werror=date-time -D__ARM__ -marm
> > -mno-thumb-interwork -mabi=aapcs-linux -mword-relocations -fno-pic
> > -ffunction-sections -fdata-sections -fno-common -ffixed-r9
> > -msoft-float -pipe -march=armv5te -D__LINUX_ARM_ARCH__=5
> > -I./arch/arm/mach-kirkwood/include    -D"KBUILD_STR(s)=#s"
> > -D"KBUILD_BASENAME=KBUILD_STR(part_efi)"
> > -D"KBUILD_MODNAME=KBUILD_STR(part_efi)" -c -o disk/part_efi.o
> > disk/part_efi.c
> >
> > # ll /usr/lib/gcc/arm-linux-gnueabi/6* -d
> > drwxr-xr-x 5 root root 4096 Apr 14  2019 /usr/lib/gcc/arm-linux-gnueabi/6
> > lrwxrwxrwx 1 root root    1 May 16  2017
> > /usr/lib/gcc/arm-linux-gnueabi/6.3.0 -> 6
> >
> > Hope this helps.
> >
> > All the best,
> > Tony
> >
> > >
> > > Regards,
> > > Simon
> > >
> > >
> > > >
> > > > On Thu, Dec 28, 2023 at 3:47 PM Mario Marietto <marietto2...@gmail.com> 
> > > > wrote:
> > > > >
> > > > > Hello.
> > > > >
> > > > > Can someone provide the right link to download u-boot-2017.0.5 , 
> > > > > please ?
> > > > >
> > > > > I've found it here,but I'm not sure that it's the correct version :
> > > > >
> > > > > https://src.fedoraproject.org/repo/pkgs/uboot-tools/u-boot-2017.05.tar.bz2/sha512/be270f9242a72b05463092a022bbabd54996762de1ff23bf7575124ac02e62f49572a4e2f6f571a5019047d40027e56e35593b5cc373c4a5a39b100c3377ba93/
> > > > >
> > > > > Can you confirm it ? thanks.
> > > > >
> > > > > On Thu, Dec 28, 2023 at 1:14 AM Tony Dinh <mibo...@gmail.com> wrote:
> > > > > >
> > > > > > Hi Mario and Heinrich,
> > > > > >
> > > > > > On Wed, Dec 27, 2023 at 12:23 PM Mario Marietto 
> > > > > > <marietto2...@gmail.com> wrote:
> > > > > > >
> > > > > > > Hello.
> > > > > > >
> > > > > > > I'm trying to boot FreeBSD for arm32 bit as DomU on my ARM 
> > > > > > > Chromebook
> > > > > > > SNOW with xen. 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 specific
> > > > > > > file that's on the source code of FreeBSD :
> > > > > > >
> > > > > > >
> > > > > > > https://xenbits.xen.org/gitweb/?p=p...8;hb=0782e25d98cc1391472717035f986c979edef0c9
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > This patch was written by Julien Grall a lot of time ago and now 
> > > > > > > it
> > > > > > > does not work anymore. This is the reason explain by the xen
> > > > > > > developers :
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > 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'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 
> > > > > > > developer :
> > > > > > >
> > > > > > >
> > > > > > > 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 write patches but I don't work with the FreeBSD kernel so I
> > > > > > > wouldn't be able 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 and use the U-Boot binary as Xen 
> > > > > > > guest
> > > > > > > kernel, then U-Boot could load FreeBSD from disk or network and 
> > > > > > > start
> > > > > > > it. For instance as domU config file:
> > > > > > >
> > > > > > > kernel="/home/petalinux/u-boot.bin"
> > > > > > > disk = [ '/home/petalinux/test.img,raw,xvda' ]
> > > > > > >
> > > > > > >
> > > > > > > Actually I'm working on the idea n. 2. Basically I need to find 
> > > > > > > the
> > > > > > > proper u-boot file that's able to boot the image of FreeBSD that I
> > > > > > > have installed (13.2 for arm32 bit). Maybe I found it here :
> > > > > > >
> > > > > > >
> > > > > > > http://commondatastorage.googleapis.com/chromeos-localmirror/distfiles/nv_uboot-snow-simplefb.kpart.bz2
> > > > > > >
> > > > > > >
> > > > > > > I found that link inside this tutorial :
> > > > > > >
> > > > > > >
> > > > > > > https://wiki.freebsd.org/arm/Chromebook
> > > > > > >
> > > > > > >
> > > > > > > the version of u-boot that has been embedded in that file is the 
> > > > > > > following one :
> > > > > > >
> > > > > > >
> > > > > > > # strings nv_uboot-snow-simplefb.kpart | grep U-Boot
> > > > > > > U-Boot 2011.12-gc1f6280 (May 27 2013 - 15:06:59) for SMDK5250
> > > > > > >
> > > > > > >
> > > > > > > So the question is easy : I need to find the source code of that 
> > > > > > > old
> > > > > > > version of u-boot,because once compiled,it will give me the proper
> > > > > > > u-boot.bin kernel / bootloader file that maybe will be able to 
> > > > > > > boot
> > > > > > > FreeBSD.
> > > > > >
> > > > > > Yes, it can boot a 32-bit ARM board. I'm not a FreeBSD person, but
> > > > > > I've helped a FreeBSD user booting a 32-bit ARM box with u-boot
> > > > > > (GoFlexHome Marvell Kirkwood 6281). The u-boot version was 2017.05. 
> > > > > > I
> > > > > > used an out-of-tree u-boot build. This u-boot executed the ubldr to
> > > > > > boot FreeBSD.
> > > > > >
> > > > > > Please see here:
> > > > > > https://forum.doozan.com/read.php?3,49039,82059#msg-82059
> > > > > >
> > > > > > It's been so long, I don't remember the details. Just to confirm 
> > > > > > what
> > > > > > Heinrich said that u-boot can indeed boot 32-bit FreeBSD, since many
> > > > > > years ago.
> > > > > >
> > > > > > All the best,
> > > > > > Tony
> > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > Mario.
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Mario.
> > > >
> > > >
> > > >
> > > > --
> > > > Mario.
>
>
>
> --
> Mario.



-- 
Mario.

Reply via email to