xref: /openbmc/u-boot/board/freescale/mx6sabreauto/README (revision a0d12cd2392af52000790739df3fc8ddbd4db460)
1d7c11502SVanessa MaegimaHow to use and build U-Boot on mx6sabreauto
2d7c11502SVanessa Maegima-------------------------------------------
3d7c11502SVanessa Maegima
4d7c11502SVanessa Maegimamx6sabreauto_defconfig target supports mx6q/mx6dl/mx6qp sabreauto variants.
5d7c11502SVanessa Maegima
6d7c11502SVanessa MaegimaIn order to build it:
7d7c11502SVanessa Maegima
8d7c11502SVanessa Maegima$ make mx6sabreauto_defconfig
9d7c11502SVanessa Maegima
10d7c11502SVanessa Maegima$ make
11d7c11502SVanessa Maegima
12*1e46d0bcSFabio EstevamThis will generate the SPL and u-boot-dtb.img binaries.
13d7c11502SVanessa Maegima
14d7c11502SVanessa Maegima- Flash the SPL binary into the SD card:
15d7c11502SVanessa Maegima
16d7c11502SVanessa Maegima$ sudo dd if=SPL of=/dev/sdX bs=1K seek=1 && sync
17d7c11502SVanessa Maegima
18*1e46d0bcSFabio Estevam- Flash the u-boot-dtb.img binary into the SD card:
19d7c11502SVanessa Maegima
20*1e46d0bcSFabio Estevam$ sudo dd if=u-boot-dtb.img of=/dev/sdX bs=1K seek=69 && sync
2107f6ddb6SDiego Dorta
2207f6ddb6SDiego DortaBooting via Falcon mode
2307f6ddb6SDiego Dorta-----------------------
2407f6ddb6SDiego Dorta
2507f6ddb6SDiego DortaWrite in mx6sabreauto_defconfig the following define below:
2607f6ddb6SDiego Dorta
2707f6ddb6SDiego DortaCONFIG_SPL_OS_BOOT=y
2807f6ddb6SDiego Dorta
2907f6ddb6SDiego DortaIn order to build it:
3007f6ddb6SDiego Dorta
3107f6ddb6SDiego Dorta$ make mx6sabreauto_defconfig
3207f6ddb6SDiego Dorta
3307f6ddb6SDiego Dorta$ make
3407f6ddb6SDiego Dorta
35*1e46d0bcSFabio EstevamThis will generate the SPL image called SPL and the u-boot-dtb.img.
3607f6ddb6SDiego Dorta
3707f6ddb6SDiego Dorta- Flash the SPL image into the SD card:
3807f6ddb6SDiego Dorta
3907f6ddb6SDiego Dorta$ sudo dd if=SPL of=/dev/sdb bs=1K seek=1 && sync
4007f6ddb6SDiego Dorta
41*1e46d0bcSFabio Estevam- Flash the u-boot-dtb.img image into the SD card:
4207f6ddb6SDiego Dorta
43*1e46d0bcSFabio Estevam$ sudo dd if=u-boot-dtb.img of=/dev/sdb bs=1K seek=69 && sync
4407f6ddb6SDiego Dorta
4507f6ddb6SDiego DortaCreate a FAT16 boot partition to store uImage and the dtb file, then copy the files there:
4607f6ddb6SDiego Dorta
4707f6ddb6SDiego Dorta$ sudo cp uImage /media/boot
4807f6ddb6SDiego Dorta
4907f6ddb6SDiego Dorta$ sudo cp imx6dl-sabreauto.dtb /media/boot
5007f6ddb6SDiego Dorta
5107f6ddb6SDiego DortaCreate a partition for root file system and extract it there:
5207f6ddb6SDiego Dorta
5307f6ddb6SDiego Dorta$ sudo tar xvf rootfs.tar.gz -C /media/root
5407f6ddb6SDiego Dorta
5507f6ddb6SDiego DortaThe SD card must have enough space for raw "args" and "kernel".
5607f6ddb6SDiego DortaTo configure Falcon mode for the first time, on U-Boot do the following commands:
5707f6ddb6SDiego Dorta
5807f6ddb6SDiego Dorta- Load dtb file from boot partition:
5907f6ddb6SDiego Dorta
6007f6ddb6SDiego Dorta# load mmc 0:1 ${fdt_addr} imx6dl-sabreauto.dtb
6107f6ddb6SDiego Dorta
6207f6ddb6SDiego Dorta- Load kernel image from boot partition:
6307f6ddb6SDiego Dorta
6407f6ddb6SDiego Dorta# load mmc 0:1 ${loadaddr} uImage
6507f6ddb6SDiego Dorta
6607f6ddb6SDiego Dorta- Write kernel at 2MB offset:
6707f6ddb6SDiego Dorta
6807f6ddb6SDiego Dorta# mmc write ${loadaddr} 0x1000 0x4000
6907f6ddb6SDiego Dorta
7007f6ddb6SDiego Dorta- Setup kernel bootargs:
7107f6ddb6SDiego Dorta
7207f6ddb6SDiego Dorta# setenv bootargs "console=ttymxc3,115200 root=/dev/mmcblk0p1 rootfstype=ext4 rootwait quiet rw"
7307f6ddb6SDiego Dorta
7407f6ddb6SDiego Dorta- Prepare args:
7507f6ddb6SDiego Dorta
7607f6ddb6SDiego Dorta# spl export fdt ${loadaddr} - ${fdt_addr}
7707f6ddb6SDiego Dorta
7807f6ddb6SDiego Dorta- Write args 1MB data (0x800 sectors) to 1MB offset (0x800 sectors)
7907f6ddb6SDiego Dorta
8007f6ddb6SDiego Dorta# mmc write 18000000 0x800 0x800
8107f6ddb6SDiego Dorta
8207f6ddb6SDiego Dorta- Restart the board and then SPL binary will launch the kernel directly.
83