xref: /rk3399_rockchip-uboot/board/freescale/mx6sabreauto/README (revision 39632b4a01210e329333d787d828157dcd2c7328)
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
12d7c11502SVanessa MaegimaThis will generate the SPL and u-boot.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
18d7c11502SVanessa Maegima- Flash the u-boot.img binary into the SD card:
19d7c11502SVanessa Maegima
20d7c11502SVanessa Maegima$ sudo dd if=u-boot.img of=/dev/sdX bs=1K seek=69 && sync
21*07f6ddb6SDiego Dorta
22*07f6ddb6SDiego DortaBooting via Falcon mode
23*07f6ddb6SDiego Dorta-----------------------
24*07f6ddb6SDiego Dorta
25*07f6ddb6SDiego DortaWrite in mx6sabreauto_defconfig the following define below:
26*07f6ddb6SDiego Dorta
27*07f6ddb6SDiego DortaCONFIG_SPL_OS_BOOT=y
28*07f6ddb6SDiego Dorta
29*07f6ddb6SDiego DortaIn order to build it:
30*07f6ddb6SDiego Dorta
31*07f6ddb6SDiego Dorta$ make mx6sabreauto_defconfig
32*07f6ddb6SDiego Dorta
33*07f6ddb6SDiego Dorta$ make
34*07f6ddb6SDiego Dorta
35*07f6ddb6SDiego DortaThis will generate the SPL image called SPL and the u-boot.img.
36*07f6ddb6SDiego Dorta
37*07f6ddb6SDiego Dorta- Flash the SPL image into the SD card:
38*07f6ddb6SDiego Dorta
39*07f6ddb6SDiego Dorta$ sudo dd if=SPL of=/dev/sdb bs=1K seek=1 && sync
40*07f6ddb6SDiego Dorta
41*07f6ddb6SDiego Dorta- Flash the u-boot.img image into the SD card:
42*07f6ddb6SDiego Dorta
43*07f6ddb6SDiego Dorta$ sudo dd if=u-boot.img of=/dev/sdb bs=1K seek=69 && sync
44*07f6ddb6SDiego Dorta
45*07f6ddb6SDiego DortaCreate a FAT16 boot partition to store uImage and the dtb file, then copy the files there:
46*07f6ddb6SDiego Dorta
47*07f6ddb6SDiego Dorta$ sudo cp uImage /media/boot
48*07f6ddb6SDiego Dorta
49*07f6ddb6SDiego Dorta$ sudo cp imx6dl-sabreauto.dtb /media/boot
50*07f6ddb6SDiego Dorta
51*07f6ddb6SDiego DortaCreate a partition for root file system and extract it there:
52*07f6ddb6SDiego Dorta
53*07f6ddb6SDiego Dorta$ sudo tar xvf rootfs.tar.gz -C /media/root
54*07f6ddb6SDiego Dorta
55*07f6ddb6SDiego DortaThe SD card must have enough space for raw "args" and "kernel".
56*07f6ddb6SDiego DortaTo configure Falcon mode for the first time, on U-Boot do the following commands:
57*07f6ddb6SDiego Dorta
58*07f6ddb6SDiego Dorta- Load dtb file from boot partition:
59*07f6ddb6SDiego Dorta
60*07f6ddb6SDiego Dorta# load mmc 0:1 ${fdt_addr} imx6dl-sabreauto.dtb
61*07f6ddb6SDiego Dorta
62*07f6ddb6SDiego Dorta- Load kernel image from boot partition:
63*07f6ddb6SDiego Dorta
64*07f6ddb6SDiego Dorta# load mmc 0:1 ${loadaddr} uImage
65*07f6ddb6SDiego Dorta
66*07f6ddb6SDiego Dorta- Write kernel at 2MB offset:
67*07f6ddb6SDiego Dorta
68*07f6ddb6SDiego Dorta# mmc write ${loadaddr} 0x1000 0x4000
69*07f6ddb6SDiego Dorta
70*07f6ddb6SDiego Dorta- Setup kernel bootargs:
71*07f6ddb6SDiego Dorta
72*07f6ddb6SDiego Dorta# setenv bootargs "console=ttymxc3,115200 root=/dev/mmcblk0p1 rootfstype=ext4 rootwait quiet rw"
73*07f6ddb6SDiego Dorta
74*07f6ddb6SDiego Dorta- Prepare args:
75*07f6ddb6SDiego Dorta
76*07f6ddb6SDiego Dorta# spl export fdt ${loadaddr} - ${fdt_addr}
77*07f6ddb6SDiego Dorta
78*07f6ddb6SDiego Dorta- Write args 1MB data (0x800 sectors) to 1MB offset (0x800 sectors)
79*07f6ddb6SDiego Dorta
80*07f6ddb6SDiego Dorta# mmc write 18000000 0x800 0x800
81*07f6ddb6SDiego Dorta
82*07f6ddb6SDiego Dorta- Restart the board and then SPL binary will launch the kernel directly.
83