Home - EstAK/zephyr-aslr GitHub Wiki
Welcome to the zephyr-aslr wiki!
porting the khadas edge2
first, you have to tweak the uboot source code (as its broken atm) -> fixing uboot
make a fake file file system
dd if=/dev/zero of=fs.img bs=1 count=524288
mkfs.ext4 fs.img
the size depends on the size of the extracted
dtb.img
that was extracted + some padding -> 512 KiB should be enough
then, put the dtb.img
at the root of the fs
burn a zephyr image on the board
- download rkdeveloptool I will assume from here that it was added to path
- put the card in maskrom mode (press fun three times)
- burn the khadas spl (either the one obtained from compiling or the provided one)
rkdeveloptool db rk3588_spl_loader_*.sh
- burn uboot
rkdeveloptool wl 0x4000 uboot.img
- (lie to the bootloader) burn a file system on its rootfs
rkdeveloptool wl 0x6000 ../../fs.img
- load the zephyr image on a random sector of the eMMC
rkdeveloptool wl 0x100000 zephyr.img
rkdeveloptool rd
Ox100000
was arbitrarily chosen, if you change it be sure to change all of its occurrences from here onwards
- in the uboot console,
mmc read $pxefile_addr_r 0x100000 0x11b
bootm start pxefile_addr_r
bootm loados
bootm go
the
0x11b
is the size number of blocks taken by the image to get it dohex(ceil(image_size / 512))