1Kontron SMARC-sAL28 2=================== 3 4How to build it 5=============== 6 7Configure Buildroot: 8 9 $ make kontron_smarc_sal28_defconfig 10 11Change settings to fit your needs (optional): 12 13 $ make menuconfig 14 15Compile everything and build the rootfs image: 16 17 $ make 18 19Copying the image to a storage device 20===================================== 21 22Buildroot builds an image which can be written to the internal eMMC 23storage, a SD card or an USB thumb drive. You can use the following 24command on your host: 25 26 $ sudo dd if=output/images/sdcard-emmc.img of=/dev/sdx bs=1M 27 28Where /dev/sdx is the corresponding block device of your SD card or USB 29thumb drive. To flash it on your internal eMMC use the following command on 30the board: 31 32 # dd if=sdcard-emmc.img of=/dev/mmcblk1 bs=1M 33 34Be sure you have not booted from the internal eMMC in this case! 35 36Booting the board 37================= 38 39By default the bootloader will search for the first valid image, starting 40with the internal eMMC. Consult the vendor documentation on how to use the 41DIP switches to select specific boot devices. To use the bootloader 42environment set the boot_targets correspondingly. E.g.: 43 44 # setenv boot_targets usb0 45 46To boot from an USB thumb drive. 47 48The device tree is loaded according to the filename in fdtfile. The 49following command will set the default device tree, which works on almost 50all variants (with less features of course): 51 52 # setenv fdtfile freescale/fsl-ls1028a-kontron-sl28.dtb 53 54Set this to a device tree which fits your board variant. 55 56Connect your serial cable to SER1 and open your favorite terminal emulation 57program (baudrate 115200, 8n1). E.g.: 58 59 $ picocom -b 115200 /dev/ttyUSB0 60 61You will get a warning reported by fdisk when you examine the SD card. 62This is because the genimage.cfg file doesn't specify the SD card size 63(as people will naturally have different sized cards), so the 64secondary GPT header is placed after the rootfs rather than at the end 65of the disk where it is expected to be. 66 67You will see something like this at boot time: 68 69[ 4.552797] GPT:Primary header thinks Alt. header is not at the end of the disk. 70[ 4.560237] GPT:266272 != 7864319 71[ 4.563565] GPT:Alternate GPT header not at the end of the disk. 72[ 4.569596] GPT:266272 != 7864319 73[ 4.572925] GPT: Use GNU Parted to correct GPT errors. 74 75Updating the bootloader 76======================= 77 78Buildroot will automatically build the u-boot bootloader. The resulting 79image is called u-boot.rom and you can find it in the images/ directory. 80 81To update the bootloader on the board you could either copy it to an 82USB thumb drive or you could put it on a TFTP server. The following 83example assumes you have the bootloader image copied to the root of 84a thumb drive: 85 86 # usb start 87 # load usb 0:1 $loadaddr u-boot.rom 88 # sf probe 0 && sf update $fileaddr 0x210000 $filesize 89