/*************** build S32G uboot and TF_A ***************/ /*************** build S32G uboot and TF_A ***************/ /*************** build S32G uboot and TF_A ***************/ eagle@LAPTOP-HG5RLT9J:~$ cd S32G/u-boot/ eeagle@LAPTOP-HG5RLT9J:~/S32G/u-boot$ make CROSS_COMPILE=/opt/S32G/arm-gnu-toolchain-11.3.rel1-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu- s32g274ardb2_defconfig # # configuration written to .config # eagle@LAPTOP-HG5RLT9J:~/S32G/u-boot$ make CROSS_COMPILE=/opt/S32G/arm-gnu-toolchain-11.3.rel1-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu- scripts/kconfig/conf --syncconfig Kconfig CFG u-boot.cfg GEN include/autoconf.mk GEN include/autoconf.mk.dep CFGCHK u-boot.cfg OFCHK .config UPD include/generated/timestamp_autogenerated.h ENVC include/generated/env.txt ENVP include/generated/env.in ENVT include/generated/environment.h CC cmd/version.o AR cmd/built-in.o CC env/common.o AR env/built-in.o CC lib/efi_loader/dtbdump.o LD lib/efi_loader/dtbdump_efi.so OBJCOPY lib/efi_loader/dtbdump.efi CC lib/efi_loader/initrddump.o LD lib/efi_loader/initrddump_efi.so OBJCOPY lib/efi_loader/initrddump.efi LD u-boot OBJCOPY u-boot.srec OBJCOPY u-boot-nodtb.bin RELOC u-boot-nodtb.bin CAT u-boot-dtb.bin COPY u-boot.bin SYM u-boot.sym CFGS u-boot-s32.cfgout eagle@LAPTOP-HG5RLT9J:~/S32G/u-boot$ cd ../arm-trusted-firmware/ eagle@LAPTOP-HG5RLT9J:~/S32G/arm-trusted-firmware$ make CROSS_COMPILE=/opt/S32G/arm-gnu-toolchain-11.3.rel1-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu- ARCH=aarch64 PLAT=s32g274ardb2 BL33=../u-boot/u-boot-nodtb.bin DEBUG=1 Selected OpenSSL version: 1.1.1 FIP /home/eagle/S32G/arm-trusted-firmware/build/s32g274ardb2/debug/dummy_fip MKIMAGE /home/eagle/S32G/arm-trusted-firmware/build/s32g274ardb2/debug/dummy_fip.s32 MKIMAGE /home/eagle/S32G/arm-trusted-firmware/build/s32g274ardb2/debug/ivt_location MKIMAGE /home/eagle/S32G/arm-trusted-firmware/build/s32g274ardb2/debug/fip_offset CREATE /home/eagle/S32G/arm-trusted-firmware/build/s32g274ardb2/debug/fip_mmc_offset_flag CREATE /home/eagle/S32G/arm-trusted-firmware/build/s32g274ardb2/debug/fip_qspi_offset_flag CREATE /home/eagle/S32G/arm-trusted-firmware/build/s32g274ardb2/debug/fip_mem_offset_flag CREATE /home/eagle/S32G/arm-trusted-firmware/build/s32g274ardb2/debug/fip_hdr_size CREATE /home/eagle/S32G/arm-trusted-firmware/build/s32g274ardb2/debug/dtb_size CREATE /home/eagle/S32G/arm-trusted-firmware/build/s32g274ardb2/debug/boot_info.c CC /home/eagle/S32G/arm-trusted-firmware/build/s32g274ardb2/debug/boot_info.c CC /home/eagle/S32G/arm-trusted-firmware/build/s32g274ardb2/debug/boot_info.c LD /home/eagle/S32G/arm-trusted-firmware/build/s32g274ardb2/debug/bl31sram/bl31sram.elf BIN /home/eagle/S32G/arm-trusted-firmware/build/s32g274ardb2/debug/bl31sram.bin Built /home/eagle/S32G/arm-trusted-firmware/build/s32g274ardb2/debug/bl31sram.bin successfully XXD /home/eagle/S32G/arm-trusted-firmware/build/s32g274ardb2/debug/bl31sram.bin CC plat/nxp/s32/s32cc/s32g/bl31_sram/bl31_sram.c PARSE /home/eagle/S32G/arm-trusted-firmware/build/s32g274ardb2/debug/bl31sram/bl31sram.map CC plat/nxp/s32/s32cc/s32g/bl31_sram/bl31_sram_code_reg.c LD /home/eagle/S32G/arm-trusted-firmware/build/s32g274ardb2/debug/bl2/bl2.elf BIN /home/eagle/S32G/arm-trusted-firmware/build/s32g274ardb2/debug/bl2.bin Built /home/eagle/S32G/arm-trusted-firmware/build/s32g274ardb2/debug/bl2.bin successfully OD /home/eagle/S32G/arm-trusted-firmware/build/s32g274ardb2/debug/bl2/bl2.dump CREATE /home/eagle/S32G/arm-trusted-firmware/build/s32g274ardb2/debug/bl2_padding CC /home/eagle/S32G/arm-trusted-firmware/build/s32g274ardb2/debug/boot_info.c CC plat/nxp/s32/s32cc/s32g/bl31_sram/bl31_sram.c CC plat/nxp/s32/s32cc/s32g/bl31_sram/bl31_sram_code_reg.c LD /home/eagle/S32G/arm-trusted-firmware/build/s32g274ardb2/debug/bl31/bl31.elf BIN /home/eagle/S32G/arm-trusted-firmware/build/s32g274ardb2/debug/bl31.bin Built /home/eagle/S32G/arm-trusted-firmware/build/s32g274ardb2/debug/bl31.bin successfully EL3 Runtime Firmware BL31: offset=0x90, size=0x440F5, cmdline="--soc-fw" Non-Trusted Firmware BL33: offset=0x44190, size=0xC27E0, cmdline="--nt-fw" Built /home/eagle/S32G/arm-trusted-firmware/build/s32g274ardb2/debug/fip.bin successfully Added BL2 and DTB to /home/eagle/S32G/arm-trusted-firmware/build/s32g274ardb2/debug/fip.bin successfully Trusted Boot Firmware BL2: offset=0xE0, size=0x4981A, cmdline="--tb-fw" EL3 Runtime Firmware BL31: offset=0x49900, size=0x440F5, cmdline="--soc-fw" Non-Trusted Firmware BL33: offset=0x8DA00, size=0xC27E0, cmdline="--nt-fw" SOC_FW_CONFIG: offset=0x1501E0, size=0x8FE9, cmdline="--soc-fw-config" CREATE /home/eagle/S32G/arm-trusted-firmware/build/s32g274ardb2/debug/bl2_w_dtb_size CREATE /home/eagle/S32G/arm-trusted-firmware/build/s32g274ardb2/debug/fip.cfgout MKIMAGE /home/eagle/S32G/arm-trusted-firmware/build/s32g274ardb2/debug/fip.s32 Image Layout DCD: Offset: 0x200 Size: 0x1c IVT: Offset: 0x1000 Size: 0x100 AppBootCode Header: Offset: 0x1200 Size: 0x40 Application: Offset: 0x1240 Size: 0x49a00 Boot Core: A53_0 IVT Location: SD/eMMC Load address: 0x342f8f30 Entry point: 0x34302000 Generated /home/eagle/S32G/arm-trusted-firmware/build/s32g274ardb2/debug/fip.s32 successfully =================================== Build Configuration =================================== S32GEN1_DRAM_INLINE_ECC = 1 S32CC_DRAM_RW_SPEED_PERF = 1 S32CC_USE_SCP = 0 S32_BL33_AT_EL2 = 1 S32_SAVE_CNTVCT = 1 SCMI_LOGGER = 0 S32CC_USE_SCMI_PINCTRL = 0 S32CC_USE_SCMI_NVMEM = 0 S32CC_SCMI_GPIO_FIXUP = 0 S32CC_SCMI_NVMEM_FIXUP = 0 S32CC_SCMI_SPLIT_CHAN = 0 S32_USE_LINFLEX_IN_BL31 = 0 S32_SET_NEAREST_FREQ = 0 S32_LINFLEX_BAUDRATE = 115200 =================================== OD /home/eagle/S32G/arm-trusted-firmware/build/s32g274ardb2/debug/bl31sram/bl31sram.dump Building s32g274ardb2 OD /home/eagle/S32G/arm-trusted-firmware/build/s32g274ardb2/debug/bl31/bl31.dump eagle@LAPTOP-HG5RLT9J:~/S32G/arm-trusted-firmware$ /*************** Setup SDcard ***************/ /*************** Setup SDcard ***************/ /*************** Setup SDcard ***************/ es@ubuntu:/mnt/hgfs/share/S32G_SD/linux$ ls fip.s32 fsl-image-auto-s32g274ardb2.tar.gz Image s32g274a-rdb2.dtb es@ubuntu:/mnt/hgfs/share/S32G_SD/linux$ es@ubuntu:/mnt/hgfs/share/S32G_SD/linux$ cat /proc/partitions major minor #blocks name 7 0 223632 loop0 7 1 65296 loop1 7 2 633096 loop2 7 3 93888 loop3 7 4 1524 loop4 7 5 354640 loop5 7 6 68404 loop6 7 7 224256 loop7 11 0 1048575 sr0 8 0 262144000 sda 8 1 262141952 sda1 7 8 2100 loop8 7 9 860 loop9 7 10 56820 loop10 7 11 75696 loop11 7 12 603776 loop12 7 13 528392 loop13 7 14 358088 loop14 7 15 9652 loop15 7 16 696 loop16 7 17 144060 loop17 7 18 75728 loop18 7 19 404460 loop19 7 20 106696 loop20 7 21 463256 loop21 7 23 4 loop23 7 24 106728 loop24 7 25 1704 loop25 7 26 2684 loop26 7 27 66776 loop27 7 28 65304 loop28 7 29 297752 loop29 7 30 476 loop30 7 31 144036 loop31 7 32 68448 loop32 7 33 56820 loop33 8 16 3903488 sdb 8 17 261120 sdb1 8 18 3638272 sdb2 es@ubuntu:/mnt/hgfs/share/S32G_SD/linux$ sudo fdisk /dev/sdb [sudo] password for es: Welcome to fdisk (util-linux 2.31.1). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Command (m for help): d Partition number (1,2, default 2): Partition 2 has been deleted. Command (m for help): d Selected partition 1 Partition 1 has been deleted. Command (m for help): d No partition is defined yet! Could not delete partition 94624200838937 Command (m for help): n Partition type p primary (0 primary, 0 extended, 4 free) e extended (container for logical partitions) Select (default p): p Partition number (1-4, default 1): 1 First sector (2048-7806975, default 2048): 8192 Last sector, +sectors or +size{K,M,G,T,P} (8192-7806975, default 7806975): +255M Created a new partition 1 of type 'Linux' and of size 255 MiB. Partition #1 contains a vfat signature. Do you want to remove the signature? [Y]es/[N]o: y The signature will be removed by a write command. Command (m for help): p Disk /dev/sdb: 3.7 GiB, 3997171712 bytes, 7806976 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x7c9fccea Device Boot Start End Sectors Size Id Type /dev/sdb1 8192 530431 522240 255M 83 Linux Filesystem/RAID signature on partition 1 will be wiped. Command (m for help): n Partition type p primary (1 primary, 0 extended, 3 free) e extended (container for logical partitions) Select (default p): p Partition number (2-4, default 2): 2 First sector (2048-7806975, default 2048): 530432 Last sector, +sectors or +size{K,M,G,T,P} (530432-7806975, default 7806975): Created a new partition 2 of type 'Linux' and of size 3.5 GiB. Partition #2 contains a ext4 signature. Do you want to remove the signature? [Y]es/[N]o: y The signature will be removed by a write command. Command (m for help): t Partition number (1,2, default 2): 1 Hex code (type L to list all codes): c Changed type of partition 'Linux' to 'W95 FAT32 (LBA)'. Command (m for help): t Partition number (1,2, default 2): 2 Hex code (type L to list all codes): 83 Changed type of partition 'Linux' to 'Linux'. Command (m for help): w The partition table has been altered. Syncing disks. es@ubuntu:/mnt/hgfs/share/S32G_SD/linux$ lsblk /dev/sdb NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sdb 8:16 1 3.7G 0 disk ├─sdb1 8:17 1 255M 0 part └─sdb2 8:18 1 3.5G 0 part es@ubuntu:/mnt/hgfs/share/S32G_SD/linux$ mkfs.vfat -n boot /dev/sdb1 mkfs.fat 4.1 (2017-01-24) mkfs.fat: warning - lowercase labels might not work properly with DOS or Windows mkfs.vfat: unable to open /dev/sdb1: Permission denied es@ubuntu:/mnt/hgfs/share/S32G_SD/linux$ sudo mkfs.vfat -n boot /dev/sdb1 mkfs.fat 4.1 (2017-01-24) mkfs.fat: warning - lowercase labels might not work properly with DOS or Windows es@ubuntu:/mnt/hgfs/share/S32G_SD/linux$ sudo mkfs.ext4 -L rootfs /dev/sdb2 mke2fs 1.44.1 (24-Mar-2018) Creating filesystem with 909568 4k blocks and 227584 inodes Filesystem UUID: dcc5dd48-feba-4bc6-b043-b125551f7ee9 Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736 Allocating group tables: done Writing inode tables: done Creating journal (16384 blocks): done Writing superblocks and filesystem accounting information: done es@ubuntu:/mnt/hgfs/share/S32G_SD/linux$ sudo mount /dev/sdb1 /media/es/boot mount: /media/es/boot: /dev/sdb1 already mounted on /media/es/boot. es@ubuntu:/mnt/hgfs/share/S32G_SD/linux$ sudo mount /dev/sdb2 /media/es/rootfs mount: /media/es/rootfs: /dev/sdb2 already mounted on /media/es/rootfs. es@ubuntu:/mnt/hgfs/share/S32G_SD/linux$ dd if=fip.s32 of=/dev/sdb conv=notrunc,fsync seek=512 skip=512 oflag=seek_bytes iflag=skip_bytes dd: failed to open '/dev/sdb': Permission denied es@ubuntu:/mnt/hgfs/share/S32G_SD/linux$ sudo dd if=fip.s32 of=/dev/sdb conv=notrunc,fsync seek=512 skip=512 oflag=seek_bytes iflag=skip_bytes 2769+1 records in 2769+1 records out 1417744 bytes (1.4 MB, 1.4 MiB) copied, 4.55228 s, 311 kB/s es@ubuntu:/mnt/hgfs/share/S32G_SD/linux$ sudo cp Image /media/es/boot/ es@ubuntu:/mnt/hgfs/share/S32G_SD/linux$ sudo cp s32g274a-rdb2.dtb /media/es/boot/s32g274a-rdb2.dtb es@ubuntu:/mnt/hgfs/share/S32G_SD/linux$ sudo tar xf fsl-image-auto-s32g274ardb2.tar.gz -C /media/es/rootfs/ es@ubuntu:/mnt/hgfs/share/S32G_SD/linux$ sudo sync es@ubuntu:/mnt/hgfs/share/S32G_SD/linux$