Skip to main content

Raspberry Pi 3 secure image building process

Here we will experiment with Raspberry Pi  3 Model B+ board. I have built some image for it using OPTEE manifest. I am currently using Ubuntu 16.04 OS. I have faced some dependency issue while building the complete set of images.

Hardware required:

1. Raspberry Pi 3 Model B+
2. USB to serial cable (BaudRate = 115200)
3. Power Cable or MicroUSB cable (I have drawn power from my PC)
4. Micro SD card formatted in FAT32 format.

Serial Cable Connection with PI

Refer to this diagram. PIN 6, 8 & 9 shall be used. In my case I have drawn power from my PC, hence I didn't required any GND connection.


How to Build images:

Prerequisite: Following dependencies need to be installed.:

$ sudo apt-get install android-tools-fastboot autoconf bison cscope curl  flex gdisk libc6:i386 libfdt-dev libglib2.0-dev  libpixman-1-dev libstdc++6:i386 libz1:i386 netcat  python-crypto python-serial uuid-dev xz-utils zlib1g-dev libssl-dev curl repo vim

$ sudo apt install python3-pip
$ sudo -H pip3 install --upgrade pip
$ sudo -H pip3 install pycryptodomex

Repo init and building the final image:

$ mkdir rpi
$ cd rpi
$ repo init -u https://github.com/OP-TEE/manifest.git -m rpi3.xml -b 3.8.0
$ repo sync

$ cd build
$ make toolchains
$ make all

The build procedure will take some time. For my case with 4 cores it took nearly 1 - 2 hours.
The final image will present inside : rpi/out-br/target/boot/

Copy those in the micro SD card.


Raspberry Pi Boot Logs:

# NOTICE: Booting Trusted Firmware
NOTICE: BL1: v2.2(debug):v2.2
NOTICE: BL1: Built : 22:42:06, Feb 12 2020
INFO: BL1: RAM 0x100ee000 - 0x100f7000
INFO: BL1: cortex_a53: CPU workaround for 843419 was applied
INFO: BL1: cortex_a53: CPU workaround for 855873 was applied
NOTICE: rpi3: Detected: Raspberry Pi 3 Model B+ (1GB, Sony, UK) [0x00a020d3]
INFO: BL1: Loading BL2
INFO: Loading image id=1 at address 0x100b4000
INFO: Image id=1 loaded: 0x100b4000 - 0x100bc410
NOTICE: BL1: Booting BL2
INFO: Entry point address = 0x100b4000
INFO: SPSR = 0x3c5
NOTICE: BL2: v2.2(debug):v2.2
NOTICE: BL2: Built : 22:42:09, Feb 12 2020
INFO: BL2: Doing platform setup
INFO: BL2: Loading image id 3
INFO: Loading image id=3 at address 0x100e0000
INFO: Image id=3 loaded: 0x100e0000 - 0x100ea078
INFO: BL2: Loading image id 4
INFO: Loading image id=4 at address 0x10100000
INFO: Image id=4 loaded: 0x10100000 - 0x1010001c
INFO: OPTEE ep=0x10100000
INFO: OPTEE header info:
INFO: magic=0x4554504f
INFO: version=0x2
INFO: arch=0x1
INFO: flags=0x0
INFO: nb_images=0x1
INFO: BL2: Loading image id 21
INFO: Loading image id=21 at address 0x10100000
INFO: Image id=21 loaded: 0x10100000 - 0x1015d7d8
INFO: BL2: Skip loading image id 22
INFO: BL2: Loading image id 5
INFO: Loading image id=5 at address 0x11000000
INFO: Image id=5 loaded: 0x11000000 - 0x11076490
NOTICE: BL1: Booting BL31
INFO: Entry point address = 0x100e0000
INFO: SPSR = 0x3cd
NOTICE: BL31: v2.2(debug):v2.2
NOTICE: BL31: Built : 22:42:14, Feb 12 2020
INFO: rpi3: Checking DTB...
INFO: BL31: Initializing runtime services
INFO: BL31: cortex_a53: CPU workaround for 843419 was applied
INFO: BL31: cortex_a53: CPU workaround for 855873 was applied
INFO: BL31: Initializing BL32
D/TC:0 0 get_aslr_seed:1307 Warning: no ASLR seed
D/TC:0 0 add_phys_mem:583 TEE_SHMEM_START type NSEC_SHM 0x08000000 size 0x00400000
D/TC:0 0 add_phys_mem:583 TA_RAM_START type TA_RAM 0x10800000 size 0x00800000
D/TC:0 0 add_phys_mem:583 VCORE_UNPG_RW_PA type TEE_RAM_RW 0x1015a000 size 0x006a6000
D/TC:0 0 add_phys_mem:583 VCORE_UNPG_RX_PA type TEE_RAM_RX 0x10100000 size 0x0005a000
D/TC:0 0 add_phys_mem:583 ROUNDDOWN(0x3f215040, CORE_MMU_PGDIR_SIZE) type IO_NSEC 0x3f200000 size 0x00200000
D/TC:0 0 verify_special_mem_areas:521 No NSEC DDR memory area defined
D/TC:0 0 add_va_space:622 type RES_VASPACE size 0x00a00000
D/TC:0 0 add_va_space:622 type SHM_VASPACE size 0x02000000
D/TC:0 0 dump_mmap_table:734 type TEE_RAM_RX va 0x10100000..0x10159fff pa 0x10100000..0x10159fff size 0x0005a000 (smallpg)
D/TC:0 0 dump_mmap_table:734 type TEE_RAM_RW va 0x1015a000..0x107fffff pa 0x1015a000..0x107fffff size 0x006a6000 (smallpg)
D/TC:0 0 dump_mmap_table:734 type RES_VASPACE va 0x10800000..0x111fffff pa 0x00000000..0x009fffff size 0x00a00000 (pgdir)
D/TC:0 0 dump_mmap_table:734 type SHM_VASPACE va 0x11200000..0x131fffff pa 0x00000000..0x01ffffff size 0x02000000 (pgdir)
D/TC:0 0 dump_mmap_table:734 type NSEC_SHM va 0x13200000..0x135fffff pa 0x08000000..0x083fffff size 0x00400000 (pgdir)
D/TC:0 0 dump_mmap_table:734 type TA_RAM va 0x13600000..0x13dfffff pa 0x10800000..0x10ffffff size 0x00800000 (pgdir)
D/TC:0 0 dump_mmap_table:734 type IO_NSEC va 0x13e00000..0x13ffffff pa 0x3f200000..0x3f3fffff size 0x00200000 (pgdir)
D/TC:0 0 core_mmu_entry_to_finer_grained:763 xlat tables used 1 / 7
D/TC:0 0 core_mmu_entry_to_finer_grained:763 xlat tables used 2 / 7
I/TC:
D/TC:0 0 init_canaries:164 #Stack canaries for stack_tmp[0] with top at 0x10199b38
D/TC:0 0 init_canaries:164 watch *0x10199b3c
D/TC:0 0 init_canaries:164 #Stack canaries for stack_tmp[1] with top at 0x1019a378
D/TC:0 0 init_canaries:164 watch *0x1019a37c
D/TC:0 0 init_canaries:164 #Stack canaries for stack_tmp[2] with top at 0x1019abb8
D/TC:0 0 init_canaries:164 watch *0x1019abbc
D/TC:0 0 init_canaries:164 #Stack canaries for stack_tmp[3] with top at 0x1019b3f8
D/TC:0 0 init_canaries:164 watch *0x1019b3fc
D/TC:0 0 init_canaries:165 #Stack canaries for stack_abt[0] with top at 0x1018ed38
D/TC:0 0 init_canaries:165 watch *0x1018ed3c
D/TC:0 0 init_canaries:165 #Stack canaries for stack_abt[1] with top at 0x1018f978
D/TC:0 0 init_canaries:165 watch *0x1018f97c
D/TC:0 0 init_canaries:165 #Stack canaries for stack_abt[2] with top at 0x101905b8
D/TC:0 0 init_canaries:165 watch *0x101905bc
D/TC:0 0 init_canaries:165 #Stack canaries for stack_abt[3] with top at 0x101911f8
D/TC:0 0 init_canaries:165 watch *0x101911fc
D/TC:0 0 init_canaries:167 #Stack canaries for stack_thread[0] with top at 0x10193238
D/TC:0 0 init_canaries:167 watch *0x1019323c
D/TC:0 0 init_canaries:167 #Stack canaries for stack_thread[1] with top at 0x10195278
D/TC:0 0 init_canaries:167 watch *0x1019527c
D/TC:0 0 init_canaries:167 #Stack canaries for stack_thread[2] with top at 0x101972b8
D/TC:0 0 init_canaries:167 watch *0x101972bc
D/TC:0 0 init_canaries:167 #Stack canaries for stack_thread[3] with top at 0x101992f8
D/TC:0 0 init_canaries:167 watch *0x101992fc
I/TC: OP-TEE version: 3.8.0-37-g9df63cd7 (gcc version 8.3.0 (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36))) #1 Wed Feb 12 20:35:29 UTC 2020 aarch64
D/TC:0 0 init_primary_helper:1169 Executing at offset 0 with virtual load address 0x10100000
D/TC:0 0 check_ta_store:636 TA store: "Secure Storage TA"
D/TC:0 0 check_ta_store:636 TA store: "REE"
D/TC:0 0 mobj_mapped_shm_init:447 Shared memory address range: 11200000, 13200000
I/TC: Initialized
D/TC:0 0 init_primary_helper:1182 Primary CPU switching to normal world boot
INFO: BL31: Preparing for EL3 exit to normal world
INFO: Entry point address = 0x11000000
INFO: SPSR = 0x3c9
U-Boot 2019.01-00093-gaac0c29d4b (Feb 13 2020 - 01:32:08 -0800)
DRAM: 948 MiB
RPI 3 Model B+ (0xa020d3)
MMC: mmc@7e202000: 0, sdhci@7e300000: 1
Loading Environment from FAT... OK
In: serial
Out: serial
Err: serial
Net: No ethernet found.
starting USB...
USB0: scanning bus 0 for devices... 4 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot: 0
15071744 bytes read in 627 ms (22.9 MiB/s)
## Flattened Device Tree blob at 01000000
Booting using the fdt blob at 0x1000000
reserving fdt memory region: addr=0 size=1000
Loading Device Tree to 000000003af3e000, end 000000003af477d2 ... OK
Starting kernel ...
D/TC:1 generic_boot_cpu_on_handler:1225 cpu 1: a0 0x0
D/TC:1 init_secondary_helper:1206 Secondary CPU Switching to normal world boot
D/TC:2 generic_boot_cpu_on_handler:1225 cpu 2: a0 0x0
D/TC:2 init_secondary_helper:1206 Secondary CPU Switching to normal world boot
D/TC:3 generic_boot_cpu_on_handler:1225 cpu 3: a0 0x0
D/TC:3 init_secondary_helper:1206 Secondary CPU Switching to normal world boot
D/TC:0 tee_entry_exchange_capabilities:101 Dynamic shared memory is disabled
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.14.56-v8 (sourabh@ubuntu) (gcc version 8.3.0 (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36))) #1 SMP PREEMPT Wed Feb 12 23:52:04 PST 2020
[ 0.000000] Boot CPU: AArch64 Processor [410fd034]
[ 0.000000] Machine model: Raspberry Pi 3 Model B Plus Rev 1.3
[ 0.000000] debug: ignoring loglevel setting.
[ 0.000000] efi: Getting EFI parameters from FDT:
[ 0.000000] efi: UEFI not found.
[ 0.000000] cma: Reserved 8 MiB at 0x000000003a400000
[ 0.000000] On node 0 totalpages: 242688
[ 0.000000] DMA zone: 3792 pages used for memmap
[ 0.000000] DMA zone: 0 pages reserved
[ 0.000000] DMA zone: 242688 pages, LIFO batch:31
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv1.1 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: Trusted OS migration not required
[ 0.000000] psci: SMC Calling Convention v1.1
[ 0.000000] percpu: Embedded 22 pages/cpu @ffffffd67b379000 s50456 r8192 d31464 u90112
[ 0.000000] pcpu-alloc: s50456 r8192 d31464 u90112 alloc=22*4096
[ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[ 0.000000] Detected VIPT I-cache on CPU0
[ 0.000000] CPU features: enabling workaround for ARM erratum 845719
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 238896
[ 0.000000] Kernel command line: console=tty0 console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootfs=ext4 smsc95xx.macaddr=b8:27:eb:39:87:4f ignore_loglevel dma.dmachans=0x7f35 rootwait 8250.nr_uarts=1 elevator=deadline fsck.repair=yes bcm2708_fb.fbwidth=1920 bcm2708_fb.fbheight=1080 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 dwc_otg.fiq_enable=0 dwc_otg.fiq_fsm_enable=0 dwc_otg.nak_holdoff=0
[ 0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
[ 0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes)
[ 0.000000] Memory: 928604K/970752K available (7036K kernel code, 894K rwdata, 4056K rodata, 2688K init, 686K bss, 33956K reserved, 8192K cma-reserved)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] modules : 0xffffff8000000000 - 0xffffff8008000000 ( 128 MB)
[ 0.000000] vmalloc : 0xffffff8008000000 - 0xffffffbebfff0000 ( 250 GB)
[ 0.000000] .text : 0xffffff8609680000 - 0xffffff8609d60000 ( 7040 KB)
[ 0.000000] .rodata : 0xffffff8609d60000 - 0xffffff860a160000 ( 4096 KB)
[ 0.000000] .init : 0xffffff860a160000 - 0xffffff860a400000 ( 2688 KB)
[ 0.000000] .data : 0xffffff860a400000 - 0xffffff860a4dfa00 ( 895 KB)
[ 0.000000] .bss : 0xffffff860a4dfa00 - 0xffffff860a58b4e8 ( 687 KB)
[ 0.000000] fixed : 0xffffffbefe7fb000 - 0xffffffbefec00000 ( 4116 KB)
[ 0.000000] PCI I/O : 0xffffffbefee00000 - 0xffffffbeffe00000 ( 16 MB)
[ 0.000000] vmemmap : 0xffffffbf00000000 - 0xffffffc000000000 ( 4 GB maximum)
[ 0.000000] 0xffffffbf59000000 - 0xffffffbf59ed0000 ( 14 MB actual)
[ 0.000000] memory : 0xffffffd640000000 - 0xffffffd67b400000 ( 948 MB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] ftrace: allocating 25420 entries in 100 pages
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000000] Tasks RCU enabled.
[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[ 0.000000] arch_timer: cp15 timer(s) running at 19.20MHz (phys).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x46d987e47, max_idle_ns: 440795202767 ns
[ 0.000006] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 4398046511078ns
[ 0.000236] Console: colour dummy device 80x25
[ 0.001257] console [tty0] enabled
[ 0.001298] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=19200)
[ 0.001343] pid_max: default: 32768 minimum: 301
[ 0.001691] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes)
[ 0.001737] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes)
[ 0.002767] Disabling memory control group subsystem
[ 0.007076] ASID allocator initialised with 32768 entries
[ 0.009073] Hierarchical SRCU implementation.
[ 0.011328] EFI services will not be available.
[ 0.013138] smp: Bringing up secondary CPUs ...
[ 0.032675] Detected VIPT I-cache on CPU1
[ 0.032745] CPU1: Booted secondary processor [410fd034]
[ 0.051855] Detected VIPT I-cache on CPU2
[ 0.051905] CPU2: Booted secondary processor [410fd034]
[ 0.071072] Detected VIPT I-cache on CPU3
[ 0.071115] CPU3: Booted secondary processor [410fd034]
[ 0.071253] smp: Brought up 1 node, 4 CPUs
[ 0.071378] SMP: Total of 4 processors activated.
[ 0.071406] CPU features: detected feature: 32-bit EL0 Support
[ 0.071434] CPU features: detected feature: Kernel page table isolation (KPTI)
[ 0.074776] CPU: All CPU(s) started at EL2
[ 0.074827] alternatives: patching kernel code
[ 0.076134] devtmpfs: initialized
[ 0.088538] random: get_random_u32 called from bucket_table_alloc+0x108/0x270 with crng_init=0
[ 0.089335] Enabled cp15_barrier support
[ 0.089379] Enabled setend support
[ 0.089690] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275000 ns
[ 0.089743] futex hash table entries: 1024 (order: 5, 131072 bytes)
[ 0.090417] pinctrl core: initialized pinctrl subsystem
[ 0.090667] DMI not present or invalid.
[ 0.091000] NET: Registered protocol family 16
[ 0.096088] cpuidle: using governor menu
[ 0.096613] vdso: 2 pages (1 code @ ffffff8609d67000, 1 data @ ffffff860a404000)
[ 0.096662] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[ 0.099675] DMA: preallocated 256 KiB pool for atomic allocations
[ 0.099852] Serial: AMBA PL011 UART driver
[ 0.102390] bcm2835-mbox 3f00b880.mailbox: mailbox enabled
[ 0.103022] uart-pl011 3f201000.serial: could not find pctldev for node /soc/gpio@7e200000/uart0_pins, deferring probe
[ 0.137313] bcm2835-dma 3f007000.dma: DMA legacy API manager at ffffff800801d000, dmachans=0x1
[ 0.139121] SCSI subsystem initialized
[ 0.139385] usbcore: registered new interface driver usbfs
[ 0.139498] usbcore: registered new interface driver hub
[ 0.139633] usbcore: registered new device driver usb
[ 0.139863] dmi: Firmware registration failed.
[ 0.140502] raspberrypi-firmware soc:firmware: Attached to firmware from 2019-03-27 15:45
[ 0.142049] clocksource: Switched to clocksource arch_sys_counter
[ 0.242006] VFS: Disk quotas dquot_6.6.0
[ 0.242158] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 0.242366] FS-Cache: Loaded
[ 0.242618] CacheFiles: Loaded
[ 0.253269] NET: Registered protocol family 2
[ 0.254027] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
[ 0.254190] TCP bind hash table entries: 8192 (order: 5, 131072 bytes)
[ 0.254411] TCP: Hash tabl 0.255017] NET: Registered protocol family 1
[ 0.255629] RPC: Registered named UNIX socket transport module.
[ 0.255657] RPC: Registered udp transport module.
[ 0.255679] RPC: Registered tcp transport module.
[ 0.255701] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.257677] hw perfevents: enabled with armv8_pmuv3 PMU driver, 7 counters available
[ 0.259624] workingset: timestamp_bits=46 max_order=18 bucket_order=0
[ 0.270285] FS-Cache: Netfs 'nfs' registered for caching
[ 0.271066] NFS: Registering the id_resolver key type
[ 0.271120] Key type id_resolv7140] BCM2708FB: allocated DMA channel 0 @ ffffff800801d000
[ 0.322403] Console: switching to colour frame buffer device 240x67
[ 0.344488] Serial: 8250/16550 driver, 1 ports, IRQ sharing enabled
[ 0.346337] bcm2835-rng 3f104000.rng: hwrng registered
[ 0.346598] vc-mem: phys_addr:0x00000000 mem_base=0x3ec00000 mem_size:0x40000000(1024 MiB)
[ 0.347522] gpiomem-bcm2835 3f200000.gpiomem: Initialised: Registers at 0x3f200000
[ 0.347918] cacheinfo: Unable to detect cache hierarchy for CPU 0
[ 0.360669] brd: module loaded
[ 0.372694] loop: module loaded
[ 0.372797]t - disabled
[ 0.775902] Multiprocessor Interrupt Enhancement - disabled
[ 0.776017] OTG VER PARAM: 0, OTG VER FLAG: 0
[ 0.776138] Dedicated Tx FIFOs mode
[ 0.776596] dwc_otg: Microframe scheduler enabled
[ 0.776823] dwc_otg 3f980000.usb: DWC OTG Controller
[ 0.776979] dwc_otg 3f980000.usb: new USB bus registered, assigned bus number 1
[ 0.777182] dwc_otg 3f980000.usb: irq 41, io mem 0x00000000
[ 0.777339] Init: Port Power? op_state=1
[ 0.777426] Init: Power Port (0)
[ 0.777755] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 0.777900] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 0.778071] usb usb1: Product: DWC OTG Controller
[ 0.778176] usb usb1: Manufacturer: Linux 4.14.56-v8 dwc_otg_hcd
[ 0.778302] u32] IR JVC protocol handler initialized
[ 0.812687] IR Sony protocol handler initialized
[ 0.817254] IR SANYO protocol handler initialized
[ 0.821716] IR Sharp protocol handler initialized
[ 0.826057] IR MCE Keyboard/mouse protocol handler initialized
[ 0.830492] IR XMP protocol handler initialized
[ 0.835793] bcm2835-wdt 3f100000.watchdog: Broadcom BCM2835 watchdog timer
[ 0.840453] bcm2835-cpufreq: min=600000 max=1400000
[ 0.845357] sdhci: Secure Digital Host Controller Interface driver
[ 0.849859] sdhci: Copyright(c) Pierre Ossman
[ 0.854669] mmc-bcm2835 3f300000.mmc: could not get clk, deferring probe
[ 0.859436] sdhost-bcm2835 3f202000.mmc: could not get clk, deferring probe
[ 0.864121] Error: Driver 'sdhost-bcm2835' is already registered, aborting...
[ 0.868715] sdhci-pltfm: SDHCI platform and OF driver helper
[ 0.874762] ledtrig-cpu: registeree_baud = 31250000) is a 16550
[ 2.095339] console [ttyS0] enabled
[ 2.104751] mmc-bcm2835 3f300000.mmc: mmc_debug:0 mmc_debug2:0
[ 2.115470] mmc-bcm2835 3f300000.mmc: DMA channel allocated
[ 2.125910] Indeed it is in host mode hprt0 = 00021501
[ 2.197119] sdhost: log_buf @ ffffff80080a5000 (fa453000)
[ 2.232136] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)
[ 2.243950] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[ 2.255076] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)
[ 2.267300] of_cfs_init
[ 2.274448] of_cfs_init: OK
[ 2.282879] Waiting for root device /dev/mmcblk0p2...
[ 2.285918] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[ 2.304455] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)
[ 2.317084] usb 1-1: new high-speed USB device number 2 using dwc_otg
[ 2.328557] Indeed it is in host mode hprt0 = 00001101
[ 2.387567] mmc0: host does not support reading read-only switch, assuming write-enable
[ 2.387841] random: fast init done
[ 2.417002] mmc1: new high speed SDIO card at address 0001
[ 2.436822] mmc0: new high speed SDHC card at address aaaa
[ 2.447543] bounce: isa pool size: 16 pages
[ 2.456632] mmcblk0: mmc0:aaaa SC32G 29.7 GiB
[ 2.470485] mmcblk0: p1 p2
[ 2.541784] EXT4-fs (mmcblk0p2): recovery complete
[ 2.551824] usb 1-1: New USB device found, idVendor=0424, idProduct=2514
[ 2.563400] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 2.563477] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 2.563557] VFS: Mounted root (ext4 filesystem) on device 179:2.
[ 2.568264] devtmpfs: mounted
[ 2.574028] Freeing unused kernel memory: 2688K
[ 2.618357] hub 1-1:1.0: USB hub found
[ 2.627120] hub 1-1:1.0: 4 ports detected
[ 2.738423] EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered
Starting logging: OK
Initializing random number generator... [ 2.822395] random: dd: uninitialized urandom read (512 bytes read)
done.
Starting tee-supplicant...
Starting network: OK
[ 2.919108] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
Welcome to Buildroot, type root to login
buildroot login: [ 3.019542] usb 1-1.1: New USB device found, idVendor=0424, idProduct=2514
[ 3.031632] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 3.044790] hub 1-1.1:1.0: USB hub found
[ 3.054028] hub 1-1.1:1.0: 3 ports detected
[ 3.416506] dwc_otg_handle_wakeup_detected_intr lxstate = 2
[ 3.918078] usb 1-1.1.1: new high-speed USB device number 4 using dwc_otg
[ 4.018761] usb 1-1.1.1: New USB device found, idVendor=0424, idProduct=7800
[ 4.030906] usb 1-1.1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 4.322660] libphy: lan78xx-mdiobus: probed
[ 4.694597] random: crng init done

Comments

Popular posts from this blog

ARM Trustzone - An overview on how SMC calls are handled by the EL3 Monitor

In this write up, we will focus mainly on the ARMv8-A exceptions, the role of ARM Trusted Firmware (that provides Secure Monitor functionality) and how the World Switch happens between Secure and Normal. If we look on the the architectural diagram of ARM Trustzone w.r.t ARMv8-A, the Execution Level is divided into four levels namely: EL0 (Secure & Non-Secure) - User Application EL1 (Secure & Non-Secure) - Kernel EL2 - Hypervisor for running different OS's simuntaneously EL3 - Security Monitor Now, whenever a normal world User Application calls for some Secure Operation, the calls goes via IOCTL call to the Linux Driver, which ultimately calls the smc instruction. To understand what the smc instruction, we have to look on the Exceptions in ARMv8 ARMv8 Exceptions In ARMv8 the exceptions are divided into two categories: Synchronous & Asynchronous.  An exception is described as synchronous if it is generated as a result of execution or attempted executi

Setting my Yocto qemu environment for reverse engineering experimental purpose

In this post I have discussed about, how I set my ARM reverse engineering platform in Yocto Qemu. Generally when we are talking about reverse engineering then we need a target platform where we could exercise our experiments. We Can choose Raspberry pi, Beagle Bone etc. for these kind of experimentation. But what we can do in these platforms, can also be performed in some virtual environments. Only for experimenting on some kind of side channel attacks, we would need the actual hardware. For making the setup, you would need some PC with very good configuration likely atleast 4 GB of RAM, 100 GB of free space, and with atleast Quad Core Processor. I have installed VMWare (non-commercial version) which is running Ubuntu 18.04. If you have ubuntu installed in your PC itself then it is well and good. I have followed this link to install Ubuntu. The following steps would help: 1. First clone the source code of Yocto. You might also require some dependencies to get it installed: $ c

An overview of ARM Memory Management Unit

The scope of this documentation is to understand the Memory Management Unit for ARMv8 Based processor. Memory management Unit converts the virtual Address (in CPU's logical space) into Physical Address. For an example let us suppose in the following program: int variable; printf("Addrss of variable = 0x%x\n", &variable); The address could be anything (Let's assume  0x40000200 ). Now 0x40000200 may or may not the actual memory address in the Physical Memory (RAM). It could be anything thing (lets assume  0xA0000200 ). Thus the CPU produce the logical address 0x40000200 which is converted into the physical address 0xA0000200 by the Memory Management Unit. Now the question remains Why we require an Address Translation, or in other word in the above program why we don't operate on actual physical memory 0xA0000200? Let us suppose a program that requires a huge amount of contagious memory in the RAM. Now our external memory would have that much memory requ