Ok I will follow your instruction mentioned on your wiki page.
So using that I understand that i need to dd 4 lines to the boot partition and those will be the following for my pkgbuild.
I hope this will work. I will copy these files in the boot directory of rootfs from where they will be dd’ed to the boot partition when the pkgbuild is run.
Next I will also use the uEnv.txt to be copied to the boot partition from the boot directory when i build the kernel and move the kernel img as uImage to boot partition. Is this second part of uEnv.txt and uImage correct? From what I have observed from the existing ubuntu img.
Third rootfs will be generated from manjaro linux along with the kernel from your branch.
please do not copy any files to /boot in rootfs because it is the mountpoint for boot-partition and boot will fail if it is not empty. where do you call pkgbuild?
if you do not change filename of kernel (leave uImage and replace the old) you do not need to create a uEnv.txt, only if the name changes or you want to change/extend other vars in the environment. uEnv.txt/uImage needs to be located in the folder you’ve seen above. if you add a new uImage without replacing the old, say uImage_5.3 you create a uEnv.txt and add this at the end (if it exists or you copy an existing file):
kernel=uImage_5.3
btw. instead of copying the 4 files you can simply copy the first 1M from my image to yours…re-read partition table, create filesystems and add kernel+rootfs+modules
Yes boot directory in rootfs will be empty as it is cleaned after using its files
What I used to do is compile kernel along with files needed for boot partition using pkgbuild and then build the whole manjaro linux using manjaro-arm-tool official tool this gives us manjaro img to be flashed on media for booting.
No will go with the standard practice of using uImage and will not be changing the name instead will compile kernel separately for every build.
Yes this I can use for testing if the first method fails but to maintain the device with updates I think the first method is stable. Is that correct?
as the 3 headers (and in your case uboot too) do not change, you can simple use the 1MB-DD from my image…as i said you still can update uboot by overwriting the old one…had no problems with this method and i did it many many times
now i load uboot for testing via tftp to protect my card
Thanks for this guidance.
But why do you suggest to use 7GB img against small multiple imgs?
also Is there latest u-boot.bin file pre-compiled? Just to test once this approach works fine then will built it from scratch.
Yes But to copy it again and again everytime I build a new release then thats time consuming. As the rootfs is prepared in qemu, I hope you understand that this img will be copied to boot until theyre dd’ed to the partition, Thats my concern.
Oh I think I can get the uboot from the Flashed img of ubuntu.
Why do this everytime? My way saves time because you have 1 image with 1mb size you can use multiple times and only need to create filesystems. also this does not need to be done everytime…just replace content on your rootfs-partition
From what I understood here, is to create a blank img file of 7gb and then just dd that zero’s img to boot partition with just 1M count=1 that means only 1MB space is zero’ed
After going through the steps mentioned in this thread and your wiki tutorial my initial plan was to follow it step by step but the shortcut you’re following got me confused. So I am sharing the script I will be using to achieve a bootable image Here. I have written the whole script to be used with bpi-r2. If you think this will work fine then let me try this way then once I understand it further then you can explain me your method of 1m.
First is right…you create a new img file (you file should be names e.g. bpi-r2-manjaro.img ) only containing zeros with size 7168mb
Second step i’ve mention is to copy boot-related bytes (first 1mb) from my image to yours (using a separat img-file to reuse it later without extracting it again and you can delete my 7g image). Of course you can use the smaller official head-imgs,but this is more work (3 img+parttable+uboot) and everytime you want to do this you have to look which file needs to be on which offset…the 1mb bootsect.img is simply burned to offset 0 (leave all bs,seek,skip options so you have a simpler dd-command with only if and of param)
if you have flashed the bootheaders,you can re-read the partition-table (eject and reinsert sd). Then create filesystems on both partitions (p1 fat,p2 ext). Then copy your rootfs to p2 and then kernel+modules